﻿//Precondition: Jquery has loaded first


// Preload the images common to all pages
//urls in javascript resolve relative to the page they are run from rather than relative to this javascript file.
//urls in CSS on the other hand resolve relative to their own location (opposite)

// Preload image method
jQuery.preloadImages = function()
{
  for(var i = 0; i<arguments.length; i++)
  {
    jQuery("<img>").attr("src", arguments[i]);
  }
}
// Preload this site's images
var bp = "App_Themes/BurnettGroup/images/";//basePath
$.preloadImages(bp + "bottom.png", bp + "flag.png", bp + "top.png", bp + "PhotoBackgroundbox.jpg",
bp + "photo1.png", bp + "photo2.png", bp + "photo3.png");



//After the page has loaded...
$(document).ready(function() {
    //Setup These Events

    //NOTE: MultiPage1 must be set in the template
    $('.pageLeft').click(function() {
        MultiPage1.goPrevious(true);
    });
    $('.pageRight').click(function() {
        MultiPage1.goNext(true);
    });

    $('.pageLeft').attr("title", "Previous");
    $('.pageRight').attr("title", "Next");

});

