// JavaScript Document
var t = n = count = 0;
$(function()
{
	/*Banner切换效果 start*/
	//$("#bannerul").show();
	count = $("#bannerul li").size();
	$(".bannerimg a:first-child").show();
	$("#bannerul li:first-child").css({ "background": "#004d9b" }).siblings().css({ "background": "#c9cacc" });
	$("#bannerul li").click(function()
	{
		var i = $("#bannerul li").index(this);
		n = i;
		if (i >= count) return;
		$(".bannerimg a").filter(":visible").fadeOut(400).parent().children().eq(i).fadeIn(1000);
		$(this).css({ "background": "#4c789d" }).siblings().css({ "background": "#c9cacc" });
	});
	t = setInterval("showAuto()", 10000);
	$(".bannerimg").hover(function() { clearInterval(t) }, function() { t = setInterval("showAuto()", 10000); });
});

function showAuto()
{
	n = n >= (count - 1) ? 0 : n + 1;
	$("#bannerul li").eq(n).trigger('click');
}





