// HOME PAGE INTERAACT BANNER

var imgTimer;
var imgBottomInteraact;
var imgTopInteraact;
var imageNumber2=0;
var bannerImage2=["url(/multimedia/img/nonFlashBanners/0106-interaact/bg-01.jpg)","url(/multimedia/img/nonFlashBanners/0106-interaact/bg-02.jpg)","url(/multimedia/img/nonFlashBanners/0106-interaact/bg-03.jpg)"];


$(document).ready(function($) {
	fadebg2();
});

// CONTINOUSLY FADE THE BACKGROUND BETWEEN 2 IMAGES
	function fadedelay() {
		imgTimer=setTimeout("fadebg2()",5000);
	}
	
	function fadebg2() {
		// Define which banner is at the top and which at the bottom for this round
		if (imageNumber2 < bannerImage2.length-1) {
			imgTopInteraact = bannerImage2[imageNumber2];
			imgBottomInteraact = bannerImage2[imageNumber2+1];
			imageNumber2++;
		} else {
			imgTopInteraact = bannerImage2[imageNumber2];
			imgBottomInteraact = bannerImage2[0];
			imageNumber2 = 0;
		}
		// Place the top banner into the container
		$('#interaact-banner-top').css('background-image', imgTopInteraact);
		// Set the top banner opacity to 100%
		$("#interaact-banner-top").css({ opacity: 1 });
		// Place bottom banner into the container
		$('#interaact-banner-bottom').css('background-image', imgBottomInteraact);
		// Start the fade timer (wait for the bg image to fully load).
		imgTimer=setTimeout("fadeImage2()",5000);
	}
	
	function fadeImage2() {
		$('#interaact-banner-top').fadeTo('slow', 0, function() {
			// onComplete reload fadebg2 function
			fadebg2();
		});
	}




