$().ready(
function()
{
//顶部导航	
	$(".t_nav_inner ul li a:not(.hover)").hover(
	function()
	{
		$(this).addClass("hover");		
	},
	function()
	{
		$(this).removeClass("hover");	
	});
//左侧导航
//在IE7下，如此调用会出问题，写到页面里没问题，应该好好研究一下
//	if($.browser.msie)
//	{
//		DD_belatedPNG.fix('.ie24');
//	}
	$(".l_nav li:not(.hover)").hover(
	function()
	{
		$(this).css("background-position","10px top");
		$(this).addClass("hover");
		
	},
	function()
	{
		$(this).css("background-position","10px -27px");
		$(this).removeClass("hover");
	});
//常见问题	
	$(".ask li:not(.hover)").hover(
	function()
	{
		$(this).css("background-position","0px top");
		$(this).addClass("hover");
		
	},
	function()
	{
		$(this).css("background-position","0px -27px");
		$(this).removeClass("hover");
	});
//introduction  oa  调整高度	
	var height = 152;
	var tempHeight = 152;
	var ul_num = ($(".r_inner_1 ul").length+1)/3;	
	for(var j=0;j<ul_num;j++)
	{
		height=152;
		temHeight=152;
		for(var i=j*3;i<(j+1)*3;i++)
		{
			if(i<$(".r_inner_1 ul").length)
			{
				if($(".r_inner_1 ul").eq(i).innerHeight()-20>height&&$(".r_inner_1 ul").eq(i).innerHeight()-20>tempHeight)
				{
					tempHeight = $(".r_inner_1 ul").eq(i).innerHeight()-20;
				}
			}			
		}
		for(var i=j*3;i<(j+1)*3;i++)
		{
			if(i<$(".r_inner_1 ul").length)
			{
				$(".r_inner_1 ul").eq(i).css("height",tempHeight+"px");
			}
		}
	}
});

/*banner可以公用的变量*/
var t = n = count = 0;  

/*内页banner*/
 
$().ready(
function()
{ 
	count = $("#play_list_sn a").size();
	$("#play_text_sn li:first-child").addClass("hover");
	$("#play_list_sn a").hide().eq(0).show();
	$("#play_text_sn li").click(
	function() 
	{
		var i = $("#play_text_sn li").index(this);
		n = i;   
		if (i >= count) return; 
		
		$("#play_list_sn a").filter(":visible").fadeOut(500).parent().children().eq(i).fadeIn(1000);   
		$(this).addClass("hover").siblings().removeClass("hover");
	}); 
	
	t = setInterval("showAuto()", 6000); 
	
	$("#play_sn").hover(
	function()
	{
		clearInterval(t)
	}, 
	function()
	{
		t = setInterval("showAuto()", 6000);
	});   
});   

function showAuto()   
{   
	n = n >= (count - 1) ? 0 : n + 1;
	$("#play_text_sn li").eq(n).trigger('click');   
}



/*首页banner*/

$().ready(
function()
{ 
	count = $("#play_list a").size();
	$("#play_text li:first-child").addClass("hover");
	$("#play_list a").hide().eq(0).show();
	$("#play_text li").click(
	function() 
	{
		var i = $("#play_text li").index(this);
		n = i;   
		if (i >= count) return; 
		
		$("#play_list a").filter(":visible").fadeOut(500).parent().children().eq(i).fadeIn(1000);   
		$(this).addClass("hover").siblings().removeClass("hover");
	}); 
	
	t = setInterval("showAuto_i()", 5000); 
	
	$("#play").hover(
	function()
	{
		clearInterval(t)
	}, 
	function()
	{
		t = setInterval("showAuto_i()", 5000);
	});   
});   

function showAuto_i()   
{   
	n = n >= (count - 1) ? 0 : n + 1;
	$("#play_text li").eq(n).trigger('click');   
}   





