$(function(){
	
$("#membernotemenu").hover(function(){
	$("#membernotemenu_menu").css({ left: "978px" ,top: "36px","position": "absolute", "z-index": "50","display":"block"});
	},
	function(){
	$("#membernotemenu_menu").css({ "display":"none"});
	});	

//消息		   
$(".cc").hover(function(){
	$(".tcc").show();
	$(".cc p a").addClass('hoverr');
	$(".cc p a").css("color","#be0606");
	},
	function(){
	$(".tcc").css("display","none");
	$(".cc p a").removeClass('hoverr');
	$(".cc p a").css("color","#000");
	});
//常用功能
$(".cygn").hover(function(){
	$(".list2").show();
	},
	function(){
	$(".list2").hide();	
	});
//地区选择
$(".area1 .abc").each(function(i){
			$(this).hover(function(){
	$(".arealist").eq(i).show();
	$("a",this).addClass("c");
	},
	function(){
	$(".arealist").eq(i).hide();	
	$("a",this).removeClass("c");
	});
 });
//图片切换

	$("#KinSlideshow").KinSlideshow();

//tab切换
$(".ctwh .tit2 h2").each(function(m){
	$(this).click(function(){
	$(".tabarea").hide()
	$(".ctwh .tit2 span").hide( )
	$(".ctwh .tit2 h2 a").css("color","black");
	$(".tabarea").eq(m).show()
	$(".ctwh .tit2 span").eq(m).show()
	$("a",this).css("color","red");
	move =$(".move .tabarea").eq(m);
	wd=move.css("width");
	wd=parseFloat(wd);
	ge=Math.round(wd/217);
	le=move.css("left");
	le=parseFloat(le);
	le=217*Math.floor(le/217); 
	if(le==0){$(".ctwh .btn").eq(1).find("img").attr("src","template/default/images/rightbtn2.png");}else{$(".ctwh .btn").eq(1).find("img").attr("src","template/default/images/rightbtn.png");}
	if(le==-(ge-3)*217){$(".ctwh .btn").eq(0).find("img").attr("src","template/default/images/leftbtn2.png");}else{$(".ctwh .btn").eq(0).find("img").attr("src","template/default/images/leftbtn.png");}
	});
});
//课程，产品切换
$(".Kcxx .tit2 a").click(function(){
	$(".Kcxx .tit2 a").css("color","");
	$(this).css("color","red");
	
});
$(".ArtKcxx .tit2 a").click(function(){
	$(".ArtKcxx .tit2 a").css("color","");
	$(this).css("color","red");
});

//列表滚动
$(".ctwh .btn").click(function(){	
	var b= $(".ctwh .btn").index($(this));
	if($(".tit2 h2 a").eq(0).css("color")=="rgb(255, 0, 0)"||$(".tit2 h2 a").eq(0).css("color")=="red"){move =$(".move .tabarea").eq(0);}else{move =$(".move .tabarea").eq(1);}
	
	wd=move.css("width");
	wd=parseFloat(wd);
	ge=Math.round(wd/217);
	le=move.css("left");
	le=parseFloat(le);
	le=217*Math.floor(le/217); 
	if(le<0&&b==1&&move.not(":animated")){
		if(le==-217){
			$(".ctwh .btn").eq(1).find("img").attr("src","template/default/images/rightbtn2.png");
		}
		$(".ctwh .btn").eq(0).find("img").attr("src","template/default/images/leftbtn.png");
		le=le+217;move.animate({left: le}, 400);}
	if(le>-(ge-3)*217&&b==0&&move.not(":animated")){
		if(le==-(ge-4)*217){
			$(".ctwh .btn").eq(0).find("img").attr("src","template/default/images/leftbtn2.png");
		}
		$(".ctwh .btn").eq(1).find("img").attr("src","template/default/images/rightbtn.png");
		le=le-217;move.animate({left: le}, 400);}

 });


 });




