var currentBanner = 0;
var $banners = null;
var $links = null;
var currentTimeout = null;
$(document).ready(function()
{
	$("DIV#banner").css({ overflow: "hidden" });
	$banners = $("DIV.bannerLeft");
	$links = $("DIV#bannerMenu UL LI A");
	if($banners.length != $links.length)
		return;
	$links.each(function(index, domElement)
	{
		$(this).click(function()
		{
			window.clearTimeout(currentTimeout);
			currentBanner = (index+1) % $links.length;
			$banners.stop(true, true);
			$($banners.not(index)).fadeOut("fast");
			$($banners[index]).fadeIn("normal");
			$("DIV#bannerMenu UL LI.active").removeClass("active");
			$($(this).parent("LI")).addClass("active");
			$(this).blur();
			currentTimeout = window.setTimeout(showBannerRotation, 10000);
			return false;
		});
	});
	showBannerRotation();
	$("DIV#banner").height($("DIV#banner").height());
});
function showBannerRotation()
{
	$($links[currentBanner]).click();
}