$(document).ready(function(){
	if($('.nav li.cur').children().is('span')){
		$('.nav li.cur').find('span').css('display','block');
		$('.nav').css('height','71px')
	};
$('.news_l ul li:last-child').addClass('nb');
$('.sl_table tr:even').addClass('change_color');
$('#sub_rgz li:even').addClass('news_white');
$('#subhotnews li:even').addClass('news_white');
$('.zzs_list:odd').addClass('zzs_white');
$('.nav li').hover(function(){
	$('.nav li').removeClass('cur');
	$(this).addClass('cur');
	if($(this).children().is('span')){
		$('.nav li span').css('display','none');
		$(this).find('span').css('display','block');
		$('.nav').css('height','71px')
	}
	else {
			$('.nav li span').css('display','none');
			$('.nav').css('height','45px')
		}
})
$("#KinSlideshow").KinSlideshow();
$("#tab_news a").each(
	function(){
		$(this).hover(function(){
			$("#tab_news a").removeClass("cur");
			$(this).addClass("cur");
			var idt = $("#tab_news a").index(this);
			$(".news_l ul").hide();
			$(".news_l ul:eq("+idt+")").show();
		})
	})
$(".rank h3 a").each(
	function(){
		$(this).hover(function(){
			$(".rank h3 a").removeClass("cur");
			$(this).addClass("cur");
			var idt = $(".rank h3 a").index(this);
			$(".rank ul").hide();
			$(".rank ul:eq("+idt+")").show();
		})
	})
$(".video li").hover(function(){
	$(".video_layer").css('display','block');
},function(){
	$(".video_layer").css('display','none');
})
$(".video_layer").hover(function(){
	$(this).css('display','block');
},function(){
	$(this).css('display','none');
})
$(".video_layer a").each(
	function(){
		$(this).click(function(){
			$(".video_layer a").removeClass("cur");
			$(this).addClass("cur");
			var idt = $(".video_layer a").index(this);
			$(".video li").hide();
			$(".video li:eq("+idt+")").show();
		})
	})
$("#hotsrcoll").jCarouselLite({
      visible: 1, //可见li数量为4，显示4个页面动
      speed:500, //控制滚动速度，删除即默认速度
						vertical:true,
						scroll:1,
	  auto:3000,
	  onMouse:true
});
$("#scrollimg").jCarouselLite({
      btnNext: ".btn_l", //控制左移
      btnPrev: ".btn_r", //控制右移
      visible: 1, //可见li数量为4，显示4个页面动
      speed:200, //控制滚动速度，删除即默认速度
						vertical:true,
						scroll:1,
	  			auto:3000,
				onMouse:true
});
$("#subscrollimg").jCarouselLite({
      btnNext: ".btn_l", //控制左移
      btnPrev: ".btn_r", //控制右移
      visible:1, //可见li数量为4，显示4个页面动
      speed:200, //控制滚动速度，删除即默认速度
	vertical:true,
	scroll:1,
      auto:3000,
	  onMouse:true
	 });
$("#srcollvideo").jCarouselLite({
      btnNext: ".btn_l", //控制左移
      btnPrev: ".btn_r", //控制右移
      visible:7, //可见li数量为4，显示4个页面动
      speed:200, //控制滚动速度，删除即默认速度
	  onMouse:true
	 });
$('#gallery a.galleryimg').lightBox();
});
function showDetail(id){
	$.ajax({
		   type: "GET",
		   url: "/e/action/ShowInfo.php?classid=36&",
		   data: "id="+id,
		   success: function(msg){
			$('body').append('<div id="layer"></div><div id="popbox">'+msg+'</div>');
			$('#layer').css('height',$('body').get(0).scrollHeight);
			//$('#popbox').css('margin-top',-($('#popbox').height())/2+'px');
			$('#popbox').css('top',$(document).scrollTop()+($('#popbox').height())/2-130+'px');
			$('#popbox').css('margin-left',-335+'px');
		   }
	}); 
}
function closePop(){
	$('#layer').remove();	
	$('#popbox').remove();	
}

