﻿// JavaScript Document
$(function () {
	
	//返回顶部
	$(".returnTop").click(function(){
		$("body,html").animate({"scrollTop":"0px"});
	});
	

	//导航
	$(function(){
		 $(".mainlevel:has(div)").hover(function(){
		  $(this).children('a').addClass('hover');
		  $(this).children("div").stop(true,true).slideDown(300)
		  },function(){
		  $(this).children("div").stop(true,true).slideUp(1);
		  $(this).children('a').removeClass('hover');
		  })
		 
		  
	});


	//首页
	$('.picScroll-left3 .bd ul li').hover(function(){
		$(this).find('.BannerHoverCon').stop(true,true).slideDown(500);	
		$('.BannerHoverCur').stop(true,true).fadeIn(500);		
	},function(){
		$(this).find('.BannerHoverCon').stop(false,false).slideUp(500);	
		$('.BannerHoverCur').stop(false,false).fadeOut(500);
	})
	
	$('.inNewsCon ul li').hover(function(){
		$(this).find('.newscur').show();
		$(this).addClass('cur');
	},function(){
		$(this).find('.newscur').hide();
		$(this).removeClass('cur');
	})
	
	$('.inNewsCon ul:eq(0),.inNewsBtn:eq(0)').show();
	
	$('.newsBtn a').click(function(){
		$(this).addClass('cur').siblings().removeClass('cur');
		var index = $(this).index();
		if(index ==0){
			$('.inNewsCon ul:eq(0)').show();
			$('.inNewsCon ul:eq(1)').hide();
			$('.inNewsBtn:eq(0)').show();
			$('.inNewsBtn:eq(1)').hide();	
		}else{
			$('.inNewsCon ul:eq(0)').hide();
			$('.inNewsCon ul:eq(1)').show();
			$('.inNewsBtn:eq(0)').hide();
			$('.inNewsBtn:eq(1)').show();
		}
	})
	
	$('.newsBtn a:eq(0)').addClass('a01');
	
	//底部下拉
	//$(".link span").click(function(){
	//	if($(this).siblings(".select").css("display")=="block"){
	//		$(this).siblings(".select").fadeOut();
	//	}else{
	//		$(this).siblings(".select").fadeIn();
	//	}
	//});
	$(".link").mouseenter(function () {
	    $(this).find(".select").show();
	}).mouseleave(function () {
	    $(this).find(".select").hide();
	})
	//产品综合
	$(".product li,.infolist li").hover(function(){
		$(this).children(".more").show();
		$(this).find('.moreall').show();	
	},function(){
		$(this).children(".more").hide();	
		$(this).find('.moreall').hide();	
	});
	
	//产品详情
	$('.prodatali ol li:first').removeClass("cur");	
	$(".prodatali ol li").hover(function(){
		$(this).addClass("cur");
	},function(){
		$(this).removeClass("cur");	
	})
	
	$('.Combinations').show();
	$(".ConMidBtn a").each(function(index, element) {
		$(this).click(function(){
			$(this).addClass("cur").siblings().removeClass("cur");
			$(".ConMidSwitch").children("div").hide();
			$(".ConMidSwitch").children("div").eq(index).show();
		})
    });
	
})	

 $(function() {
    $(".movetext").mouseover(function() {
        $(this).animate({
            "left": 8
        });
    }).mouseout(function() {
        $(this).animate({
            "left": 0
        });
    });
}); 
			
 $(function() {
    $(".movepic").mouseover(function() {
        $(this).animate({
            "top": -10
        });
    }).mouseout(function() {
        $(this).animate({
            "top": 0
        });
    });
}); 
 
  $(function() {
    $(".moveleft").mouseover(function() {
        $(this).animate({
            "left": -8
        });
    }).mouseout(function() {
        $(this).animate({
            "left": 0
        });
    });
});
  
    $(function() {
    $(".moveright").mouseover(function() {
        $(this).animate({
            "right": -8
        });
    }).mouseout(function() {
        $(this).animate({
            "right": 0
        });
    });
});

$(function(){	
	function scro2(){
		$('.inProCon h3').animate({top:'0px'},1400,'easeOutQuad');
		$('.txtScroll-left .hd .prev').animate({left:'0px'},2000,'easeOutQuad');
		$('.txtScroll-left .hd .next').animate({right:'0px'},2000,'easeOutQuad');
		$('.txtScroll-left .bd li').eq(0).animate({left:'0px'},2000,'easeOutQuad');
		$('.txtScroll-left .bd li').eq(1).animate({left:'0px'},1800,'easeOutQuad');
		$('.txtScroll-left .bd li').eq(2).animate({right:'0px'},1800,'easeOutQuad');
		$('.txtScroll-left .bd li').eq(3).animate({right:'0px'},2000,'easeOutQuad');
		$('.learnBtn').animate({bottom:'58px'},2000,'easeOutQuad');
	}

});