


$(function(){  
		//$(".aj")  
	$(".beauty li").each(function(a){
		a++;
		if (a%3 == 0)
		{
			$(this).css("margin","0px");
		}
	});
	$(".case li").each(function(a){
		a++;
		if (a%3 == 0)
		{
			$(this).css("margin","0px");
		}
	});
	$(".video li").each(function(a){
		a++;
		if (a%3 == 0)
		{
			$(this).css("margin","0px");
		}
	});
	$(".pro_listcon_img").eq(0).show();
	$(".index_banlist li a").eq(0).css("color","#CB965F");
	var b=0;
	var c=0;
	$(".index_imgshow li").css({"opacity":"0","z-index":"0"}).eq(0).css({"z-index":"1","opacity":"1"});
	$(".index_banlist li").each(function(a){
		$(this).mouseover(function(){
		
		if (!$(".index_imgshow li").is(":animated"))
		{	
			$(".index_banlist li a").css("color","#343434");
			$(".index_banlist li a").eq(a).css("color","#CB965F");
			if (a == c)
			{
				
				$(".index_imgshow li").eq(a).css({"opacity":"1","z-index":"1"});
			}
			else
			{
			if (b == 0)
			{
				$(".index_imgshow li").eq(a).css({"opacity":"1"});
				$(".index_imgshow li").eq(b).animate({opacity:"0"},0,function(){
					$(".index_imgshow li").eq(a).css({"z-index":"1"});
					$(this).css("z-index","0");
				});
				
				b = 1;
				c = a;
			}
			else
			{
				$(".index_imgshow li").eq(a).css({"opacity":"1"});
				$(".index_imgshow li").eq(c).animate({opacity:"0"},0,function()
				{
					$(".index_imgshow li").eq(a).css({"z-index":"1"});
					$(this).css("z-index","0")
				});
				c = a;
			}
			}
		}
		});
	});
	
	$(".pro_listcon_title").each(function(a){
		$(this).click(function(){
				if ($(".pro_listcon_img").eq(a).css("display")=="block")
				{
					$(".pro_listcon_img").eq(a).show();
				}
				else
				{
					$(".pro_listcon_img").slideUp(500);
					$(".pro_listcon_img").eq(a).slideDown(1000);
				}
		});
	});
	$(".index_pro").eq(0).show();
	
	$(".pro_right_title_left li").each(function(a){
		$(this).click(function(){
			$(".pro_right_title1").removeClass("pro_right_title1_1");
			$(".pro_right_title2").removeClass("pro_right_title2_1");
			$(".pro_right_title3").removeClass("pro_right_title3_1");
			$(".pro_right_title1").eq(a).addClass("pro_right_title1_1");
			$(".pro_right_title2").eq(a).addClass("pro_right_title2_1");
			$(".pro_right_title3").eq(a).addClass("pro_right_title3_1");
			$(".index_pro").hide().eq(a).show();
		});
	});
	
	var obj=$(".index_case_mids");
	var object=$(".index_case_mids li");
	var num= 1;
	var time = Math.ceil($(object).length/num);
	var n=0;
	$(object).clone().appendTo(obj);
	$(".index_case_paleft").click(function(){
		if(!$(obj).is(":animated")){										 
			if(n==time){n=0;$(obj).css({left:0});};
			$(obj).animate({left: "-="+object.width()}, 1500);
			n++;
		}
	});
	
	$(".index_case_paright").click(function(){
		if(!$(obj).is(":animated")){
			if(n==0)
			{
				n=time;
				$(obj).css({left:-object.width()*$(object).length})
			};
			$(obj).animate({left: "+="+object.width()}, 1500);
			n--;
		}
	});
	/*$(".index_case_mids").hover(function() {
			clearInterval(index_imgs_time);
		}, function() {
			index_imgs_time = setInterval(function(){
				$(".index_case_paleft").click();	
			}, 6000);
		}).trigger("mouseleave");
	*/
	
	var obj1=$(".index_linkcon");
	var object1=$(".index_linkcon li");
	var num1= 1;
	var time1 = Math.ceil($(object1).length/num1);
	var n1=0;
	$(object1).clone().appendTo(obj1);
	$(".index_link_left").click(function(){
		if(!$(obj1).is(":animated")){										 
			if(n1==time1){n1=0;$(obj1).css({left:0});};
			$(obj1).animate({left: "-="+object1.width()}, 1500);
			n1++;
		}
	});
	
	$(".index_link_right").click(function(){
		if(!$(obj1).is(":animated")){
			if(n1==0)
			{
				n1=time1;
				$(obj1).css({left:-object1.width()*$(object1).length})
			};
			$(obj1).animate({left: "+="+object1.width()}, 1500);
			n1--;
		}
	});
	$(".index_side_con").hover(function() {
			clearInterval(index_imgs_time);
		}, function() {
			index_imgs_time = setInterval(function(){
				$(".index_link_left").click();	
			}, 4000);
		}).trigger("mouseleave");
	
	$(".index_tab_right").eq(0).show();
	
	var m0=0,m2=0,m3=0;
	var aaa;
	var m,h;
	var mycars=new Array();
	var mycars1=new Array();
	$(".index_tab_right").each(function(h){
	var obj2=$(".index_tab_mids").eq(h);
	if($(".index_tab_mids").eq(h).children("li").length <= 4)
		{
			$(".index_tab_pageleft").hide();
			$(".index_tab_pageright").hide();
		}
		else
		{
			$(".index_tab_mids").eq(h).children("li").clone().appendTo($(".index_tab_mids").eq(h));
			$(".index_tab_pageleft").show();
			$(".index_tab_pageright").show();
		}
	
	var object2=$(".index_tab_mids").eq(h).children("li");
	var num2= 2;
	var time2;
	mycars[h]= 0;
	
	
	
	$(".index_tab_pageleft").eq(h).click(function(){
		if(!$(obj2).is(":animated")){
			if(mycars[h]==Math.ceil($(".index_tab_mids").eq(h).children("li").length/num2)){mycars[h]= 0;$(obj2).css({left:0});};
			$(obj2).animate({left: "-="+object2.width()}, 1500);
			mycars[h]++;
		}
	});
	
	$(".index_tab_pageright").eq(h).click(function(){
		if(!$(obj2).is(":animated")){
			if(mycars[h]==0)
			{
				mycars[h]=Math.ceil($(".index_tab_mids").eq(h).children("li").length/num2);
				
				$(obj2).css({left:-object2.width()*mycars[h]})
			};
			$(obj2).animate({left: "+="+object2.width()}, 1500);
			mycars[h]--;
		}
	});});
	
	$(".index_tab_left li").each(function(a){
		$(this).click(function(){
							   
				if($(".index_tab_mids").eq(a).children("li").length <= 4)
				{
					$(".index_tab_pageleft").hide();
					$(".index_tab_pageright").hide();
				}
				else
				{
					$(".index_tab_pageleft").show();
					$(".index_tab_pageright").show();
				}
			$(".index_tab_left li").removeClass("on");
			$(".index_tab_left li").eq(a).addClass("on");
			$(".index_tab_right").hide().eq(a).show();
		});
	});
	$("#head_menu li").each(function(a){
		$("#head_menu li").eq(a).children("a").eq(1).hide();
		$("#head_menu li").eq(a).children("a").eq(0).css({"font-family":"Tahoma","font-size":"13px"});
	});
	$("#head_menu li").each(function(a){
		$(this).hover(
			function(){
				$("#head_menu li").eq(a).children("a").eq(0).hide();
				$("#head_menu li").eq(a).children("a").eq(1).show();
			},
			function(){
				$("#head_menu li").eq(a).children("a").eq(0).show();
				$("#head_menu li").eq(a).children("a").eq(1).hide();
				$("#head_menu li").eq($(".top_menu").val()).children("a").eq(1).show();
				$("#head_menu li").eq($(".top_menu").val()).children("a").eq(0).hide();
			}
		);
	});
	$(".index_banlists li:last").css("border-bottom","0px");
	
	$(".middle_left_list_warp").each(function(a){											 
		$(".middle_left_list_title").eq(a).click(function(){
			
			if ($(this).parent().children(".middle_left_list_note").html() != null)
			{
				$(".middle_left_list_title").children("a").removeClass("press");
				$(this).children("a").addClass("press");
				$(".middle_left_list_note").slideUp(500);
				$(this).parent().children(".middle_left_list_note").slideDown(500);
				//$(".middle_left_list_note").eq(a).slideDown(500);
				return false;
				
			}
			
		});
	});
	$("#head_menu li").eq($(".top_menu").val()).children("a").eq(1).show();
	$("#head_menu li").eq($(".top_menu").val()).children("a").eq(0).hide();
	$(".authority li:last").css("background","none");
	
	
		var k=0;
	$("#side_img img").eq(0).show();
	//$(".middle_note_con").eq(0).show();
	$(".head_menu_left li a").eq($(".head_menu").val()).addClass("press");
	$(".ajr_show_page b").each(function(cc){
	$(".ajr_show_page b").eq(cc).click(function(){
		k = cc;
		if ($("#side_img img").eq(1).css("opacity") == 1)
			{
				$(".ajr_show_page b").removeAttr("class");
				$(".ajr_show_page b").eq(cc).addClass("press");
				var indeximg1 = $(".ajr_image").eq(cc).val();							
				var indeximg2 = $("#side_img img").eq(0).attr("src");
				var indexUrl1 = $(".ajr_url").eq(cc).val();	
				var indexUrl2 = $(".pl").eq(0).attr("href");
				//alert (indexUrl2);
				$("#side_img img").eq(0).attr("src",indeximg2);
				$("#side_img img").eq(1).attr("src",indeximg1);
				$(".pl").eq(0).attr("href",indexUrl2);
				$(".pl").eq(1).attr("href",indexUrl1);
				$("#side_img img").css("z-index", "0").eq(1).css("z-index", "10").fadeIn(1000,function(){
				$("#side_img img").eq(0).attr("src",indeximg1);
				$("#side_img img").eq(1).attr("src",indeximg2);



				$(".pl").eq(0).attr("href",indexUrl1);
				$(".pl").eq(1).attr("href",indexUrl2);

				$(".pl").removeAttr("style");
				$(".pl").hide().eq(0).show();	
				});
			}
		});
	});
	
	function hym_show_fun(){
		if ($(".ajr_show_page b").length-1 <= k)
		{
			k=0;
		}
		else
		{
			k++;
		}

		if ($("#side_img img").eq(1).css("opacity") == 1)
			{
				$(".ajr_show_page b").removeAttr("class");
				$(".ajr_show_page b").eq(k).addClass("press");
				var indeximg1 = $(".ajr_image").eq(k).val();
				var indeximg2 = $("#side_img img").eq(0).attr("src");
				var indexUrl1 = $(".ajr_url").eq(k).val();	
				var indexUrl2 = $(".pl").eq(0).attr("href");
				$("#side_img img").eq(0).attr("src",indeximg2);
				$("#side_img img").eq(1).attr("src",indeximg1);
				$(".pl").eq(0).attr("href",indexUrl2);
				$(".pl").eq(1).attr("href",indexUrl1);
				$("#side_img img").css("z-index", "0").eq(1).css("z-index", "10").fadeIn(1000,function(){
				$("#side_img img").eq(0).attr("src",indeximg1);
				$("#side_img img").eq(1).attr("src",indeximg2);
				$(".pl").eq(0).attr("href",indexUrl1);
				$(".pl").eq(1).attr("href",indexUrl2);

				$("#side_img img").removeAttr("style");
				$("#side_img img").hide().eq(0).show();	
				});
			}
	}

	$("#side_img").hover(function() {
			clearInterval(hym_show_time);
		}, function() {
			hym_show_time = setInterval(function(){
				hym_show_fun();
			}, 4000);
		}).trigger("mouseleave");
	

	


	
		var kk=0;
	$("#photo_side_img img").eq(0).show();
	//$(".middle_note_con").eq(0).show();
	
	$(".photo_ajr_show_page b").each(function(cc){
	$(".photo_ajr_show_page b").eq(cc).click(function(){
		kk = cc;
		if ($("#photo_side_img img").eq(1).css("opacity") == 1)
			{
				$(".photo_ajr_show_page b").removeAttr("class");
				$(".photo_ajr_show_page b").eq(cc).addClass("press");
				var indeximg1 = $(".photo_ajr_image").eq(cc).val();							
				var indeximg2 = $("#photo_side_img img").eq(0).attr("src");
				var indexUrl1 = $(".photo_ajr_url").eq(cc).val();	
				var indexUrl2 = $(".photo_pl").eq(0).attr("href");
				//alert (indexUrl2);
				$("#photo_side_img img").eq(0).attr("src",indeximg2);
				$("#photo_side_img img").eq(1).attr("src",indeximg1);
				
				$("#photo_side_img img").css("z-index", "0").eq(1).css("z-index", "10").fadeIn(1000,function(){
				$("#photo_side_img img").eq(0).attr("src",indeximg1);
				$("#photo_side_img img").eq(1).attr("src",indeximg2);

				});
			}
		});
	});
	
	function photo_hym_show_fun(){
		if ($(".photo_ajr_show_page b").length-1 <= kk)
		{
			kk=0;
		}
		else
		{
			kk++;
		}

		if ($("#photo_side_img img").eq(1).css("opacity") == 1)
			{
				$(".photo_ajr_show_page b").removeAttr("class");
				$(".photo_ajr_show_page b").eq(kk).addClass("press");
				var indeximg1 = $(".photo_ajr_image").eq(kk).val();
				var indeximg2 = $("#photo_side_img img").eq(0).attr("src");
				var indexUrl1 = $(".photo_ajr_url").eq(kk).val();
				$("#photo_side_img img").eq(0).attr("src",indeximg2);
				$("#photo_side_img img").eq(1).attr("src",indeximg1);
				$("#photo_side_img img").css("z-index", "0").eq(1).css("z-index", "10").fadeIn(1000,function(){
				$("#photo_side_img img").eq(0).attr("src",indeximg1);
				$("#photo_side_img img").eq(1).attr("src",indeximg2);

				$("#photo_side_img img").removeAttr("style");
				$("#photo_side_img img").hide().eq(0).show();	
				});
			}
	}

	$("#photo_side_img").hover(function() {
			clearInterval(photo_hym_show_time);
		}, function() {
			photo_hym_show_time = setInterval(function(){
				photo_hym_show_fun();
			}, 4000);
		}).trigger("mouseleave");
	


});


