  
  google.setOnLoadCallback(function() 
      {
            $("#SmallImgBanner2").heartBeat(
			{
			    delayBetweenAnimation:2000, // Delay in ms between fade in and fade out. 
			    delay:1000 // Time it take to do the fading animation.
			});
      

            $(".TopButtonFirst").hover(
                function(){
                    $(this).stop();
                },
                function(){
                    $(this).stop();
                    $(this).animate({ opacity: 0.4}, 1).animate({ opacity: 1}, 1000);
                }                
            );

            $(".TopButton").hover(
                function(){
                    $(this).stop();
                },
                function(){
                    $(this).stop();
                    $(this).animate({ opacity: 0.4}, 1).animate({ opacity: 1}, 1000);
                }                
            );

            $(function() { $(".lavaLampNoImage").lavaLamp({ fx: "backout", speed: 700}) });
            
         
      }
  );

$(document).ready(function() {
    var mygallery=new simpleGallery({
	    wrapperid: "HeaderGallery", //ID of main gallery container,
	    dimensions: [620, 260], //width/height of gallery in pixels. Should reflect dimensions of the images exactly
	    imagearray: [1],
	    autoplay: true,
	    persist: true,
	    showmessage: false,
	    shownavigpannel: false,
	    pause: 8500, //pause between slides (milliseconds)
	    fadeduration: 2000, //transition duration (milliseconds)
	    oninit:function(){ //event that fires when gallery has initialized/ ready to run
	    },
	    onslide:function(curslide, i){ //event that fires after each slide is shown
		    //curslide: returns DOM reference to current slide's DIV (ie: try alert(curslide.innerHTML)
		    //i: integer reflecting current image within collection being shown (0=1st image, 1=2nd etc)
	    }
    })

    var myBannerOnegallery=new simpleGallery({
	    wrapperid: "BannerOneGallery", //ID of main gallery container,
	    dimensions: [162, 90], //width/height of gallery in pixels. Should reflect dimensions of the images exactly
	    imagearray: [2],
	    autoplay: true,
	    persist: true,
	    showmessage: false,
	    shownavigpannel: false,
	    pause: 5500, //pause between slides (milliseconds)
	    fadeduration: 800, //transition duration (milliseconds)
	    oninit:function(){ //event that fires when gallery has initialized/ ready to run
	    },
	    onslide:function(curslide, i){ //event that fires after each slide is shown
		    //curslide: returns DOM reference to current slide's DIV (ie: try alert(curslide.innerHTML)
		    //i: integer reflecting current image within collection being shown (0=1st image, 1=2nd etc)
	    }
    })

    var myBannerTwogallery=new simpleGallery({
	    wrapperid: "BannerTwoGallery", //ID of main gallery container,
	    dimensions: [162, 150], //width/height of gallery in pixels. Should reflect dimensions of the images exactly
	    imagearray: [3],
	    autoplay: true,
	    persist: true,
	    showmessage: false,
	    shownavigpannel: false,
	    pause: 6500, //pause between slides (milliseconds)
	    fadeduration: 800, //transition duration (milliseconds)
	    oninit:function(){ //event that fires when gallery has initialized/ ready to run
	    },
	    onslide:function(curslide, i){ //event that fires after each slide is shown
		    //curslide: returns DOM reference to current slide's DIV (ie: try alert(curslide.innerHTML)
		    //i: integer reflecting current image within collection being shown (0=1st image, 1=2nd etc)
	    }
    })


});
