function getScrollTop(){ return $('html').scrollTop() || $('body').scrollTop()}
	$(window).scroll(function(){  	
	   var scrollTop = getScrollTop();
	   if(scrollTop>5){
		   $('.page_header').addClass('index_header')
	   }else{
		   $('.page_header').removeClass('index_header');
	   }
	})
/*$(function(){	
	if(!$('.map').length)return;
	var tur = true; 
    $(window).scroll(function(){
        var totalheight = parseFloat($(window).height()) + parseFloat($(window).scrollTop()),mapb=$('.map').height()/2;
        if($('.map').offset().top+mapb < totalheight){
			if(tur){
				$('.map_loading').delay(950).fadeOut(1500);
				tur = false; 
			}
        }
    })
})

$(function(){
	$('.share').share({sites: ['weibo', 'wechat']});
	$('.share_code a').click(function(){
		$(this).find('.img-code').fadeIn();
		$(this).find('.img-code').addClass('cl_hide');
	})
	$(document).on('click','.cl_hide',function(){
		$('.cl_hide').fadeOut();
		$('.img-code').removeClass('cl_hide');
	})
	//
	$('.share .weixin,.foot_share .weixin').hover(function(){
		$(this).find('.ewm').stop(true).fadeIn();
	},function(){
		$(this).find('.ewm').stop(true).fadeOut();
	})
	//
	$(".messageback input[type='text']").focus(function(){
		$(this).val(null);
	});
	$(".messageback input[type='text']").blur(function(){
		$(this).val('Email Address');
	});
	if(!$('.page_banimg').length)return;
	$('.page_banimg .down').click(function(){
		$('.htmlbox').animatescroll({scrollSpeed:1300});
	})
})*/
/*
$(function(){
	$('.job-list li .listdown').click(function(){
		$(this).parent().children('.c-job-editor ').css({'height':'auto'}).end().siblings("li").children('.c-job-editor ').css({'height':'92px'})
		$(this).parent().children('.job-text').hide().end().siblings('li').children('.job-text').show();
		$(this).parent().children('.listdown').fadeOut().end().siblings('li').children('.listdown').fadeIn();
	});	
})

$(function(){
	$(".other_main").children().hide(); 
	$(".other_company li:first").attr("id","current"); 
	$(".other_main>div:first").fadeIn(); 
    $('.other_company li a').click(function(e) {
        e.preventDefault();        
        $(".other_main").children().hide(); 
        $(".other_company li").attr("id",""); 
        $(this).parent().attr("id","current"); 
        $('#' + $(this).attr('data-name')).fadeIn(); 
    });		
})
$(function(){
	if(!$('.temnews_list').length)return;
	$('.temnews_list').flexslider({
		animation: "fade",
		selector: '.tem_newsbox>ul>li',
		directionNav: false,
		controlNav: true,
		manualControls: '.tem_newsnav>ul>li',
		//prevText:'&#xe64e;',
		//nextText:'&#xe646;',
		touch: true,
		slideshow: false,
		pauseOnHover: true
	})		
})*/
/*tem idnex js*/
$(function(){
	var a=$('.tem_banner ol>li').length;
	$('.tem_banner ol>span.all_ol').text('0'+a);
	//
	if(!$('.tem_product').length)return;
	var swiper = new Swiper('.tem_product .swiper-container',{
		autoplay:false,
		speed:1000,
		autoplayDisableOnInteraction : false,
		loop:true,
		centeredSlides : true,
		slidesPerView:2,
		breakpoints: { 
			//当宽度小于等于320
			768: {
			  slidesPerView: 1
			},
			//当宽度小于等于640
			990: {
			  slidesPerView: 2
			}
		},
		pagination : '.swiper-pagination',
		paginationType : 'fraction',
		paginationFractionRender: function (swiper, currentClassName, totalClassName) {
			return '<span class="' + currentClassName + '"></span>' +'<span class="' + totalClassName + '"></span>';
		},	
		prevButton:'.swiper-button-prev',
		nextButton:'.swiper-button-next',
		lazyLoading:true,
		lazyLoadingInPrevNext : true, 
		lazyLoadingInPrevNextAmount: 3,			
		onSlideChangeEnd: function(swiper){ 
			swiper.update(); //swiper更新
		}
	});	
})
$(function(){
	$('.header .nav_list li').hover(function(){
		$(this).children('dl').stop(true).css({'visibility':'visible','top':'78px','opacity':'1'})
	},function(){
		$(this).children('dl').stop(true).css({'visibility':'hidden','top':'150px','opacity':'0'})
	})
	//
	$('.mbx_nav .now_nav').click(function(){
		$(this).next().slideToggle();
	})
	//
	$(document).ready(anm());
	function anm(){
		$('.more_down a span').animate({bottom:'12px'},900);
		$('.more_down a span').animate({bottom:'0px'},800);
		setTimeout(anm,1000);
	}
	//
	$('.pro_leftnav li:first>a').click(function(){
		$(this).next().slideToggle()
	})
	
	$('.pro_nav .now_nav').click(function(){
		$(this).children('dl').slideToggle();
		$('.pro_nav .two_nav').children('dl').slideUp();
	});
	$('.pro_nav .two_nav').click(function(){
		$(this).children('dl').slideToggle();
		$('.pro_nav .now_nav').children('dl').slideUp()
	})
	$('.pro_nav dl .select0 a').click(function(){
		$('.pro_nav .two_nav').fadeIn();
		var main=$(this).text();
		$('.pro_nav .now_nav span').text(main);
	})
	$('.mobile_prolist .nor_proname').click(function(){
		$(this).next().slideToggle()
	})
	$('.mobile_nav .lang_btn').click(function(){
		$('.mobile_nav .nav_btn').removeClass('em_color')
		$('.mob_navlist').removeClass('mob_show')
		$(this).toggleClass("em_color");
		//$("html").addClass("lang-open");
		$(".mob_langs").toggleClass("mob_show");
		
	})
	$('.mobile_nav .nav_btn').click(function(){
		$('.mobile_nav .lang_btn').removeClass('em_color')
		$('.mob_langs').removeClass('mob_show')
		$(this).toggleClass("em_color");
		//$("html").addClass("lang-open");
		$(".mob_navlist").toggleClass("mob_show");
	})	
})
$(function(){
	$('.links_f .links>a').click(function(){
		$(this).next().slideToggle(200);
		return false;
	})
	$('.links_f .links').mouseleave(function(){
		$(this).children('.link_child').stop(true).slideUp(200);
		return false;
	})	
})

$(function(){
	if(!$('.pro_imgshow').length)return;
    $('#carousel').flexslider({
        animation: "slide",
        controlNav: false,
        animationLoop: false,
        slideshow: false,
        itemWidth: 86,
        itemMargin: 10,
        asNavFor: '#slider',
		prevText:'',
		nextText:''		
      });

      $('#slider').flexslider({
        animation: "slide",
        controlNav: false,
        animationLoop: false,
        slideshow: false,
        sync: "#carousel"
      });
/*
	$('.other_product').owlCarousel({
		autoPlay:3500,
		items:4,
		itemsDesktop:[1200,4],
		itemsDesktopSmall:[979,3],
		itemsTablet:[768,3],
		lazyLoad:true,
		navigation:false,
		navigationText:['<i class="fa fa-angle-left"></i>','<i class="fa fa-angle-right"></i>'],
		pagination:false,
		paginationNumbers:false
	})	*/  
})

$(function(){
	if(!$('.banner-container').length)return;
	var swiper = new Swiper('.banner-container',{
		autoplay:4000,
		autoplayDisableOnInteraction : false,
		loop:true,
		centeredSlides : true,
		slidesPerView:1,
		pagination:'.swiper-page',	
		paginationClickable :true,
		paginationBulletRender: function (swiper, index, className) {
			return '<span class="' + className + '">' + (index + 1) + '</span>';
		},		
		prevButton:'.swiper-btn-prev',
		nextButton:'.swiper-btn-next',
		lazyLoading:true,
		lazyLoadingInPrevNext : true, 
		lazyLoadingInPrevNextAmount: 1,			
		onSlideChangeEnd: function(swiper){ 
			swiper.update(); //swiper更新
		}
	});
})


$(function(){
	if(!$('.party_imglist').length)return;
	$('.party_imglist').owlCarousel({
		autoPlay:3500,
		items:4,
		itemsDesktop:[1200,4],
		itemsDesktopSmall:[979,3],
		itemsTablet:[768,2],
		lazyLoad:true,
		navigation:false,
		navigationText:['<i class="fa fa-angle-left"></i>','<i class="fa fa-angle-right"></i>'],
		pagination:true,
		paginationNumbers:false
	})
})
$(function(){
	if(!$('.activity_list').length)return;
	var swiper = new Swiper('.activity_list',{
		autoplay:false,
		speed:1000,
		autoplayDisableOnInteraction : false,
		loop:false,
		centeredSlides : true,
		slidesPerView:1,
		pagination:'.swiper-page',	
		paginationClickable :true,
		paginationBulletRender: function (swiper, index, className) {
			return '<span class="' + className + '">' + (index + 1) + '</span>';
		},		
		prevButton:'.swiper-btn-prev',
		nextButton:'.swiper-btn-next',
		lazyLoading:true,
		lazyLoadingInPrevNext : true, 
		lazyLoadingInPrevNextAmount: 1,			
		onSlideChangeEnd: function(swiper){ 
			swiper.update(); //swiper更新
		}
	});
})
$(function(){
	if(!$('.evaluation_box').length)return;
	var swiper = new Swiper('.listsimg .swiper-container',{
		autoplay:5500,
		speed:1000,
		autoplayDisableOnInteraction : false,		
		loop:true,
		loopAdditionalSlides : 2,
		centeredSlides : true,
		slidesPerView:3,
		spaceBetween : 24,
		breakpoints: { 
			//当宽度小于等于320
			768: {
			  slidesPerView: 1
			},
			//当宽度小于等于640
			990: {
			  slidesPerView: 3
			}
		},		
		pagination:'.swiper-pagination',	
		paginationType : 'fraction',
		prevButton:'.swiper-button-prev',
		nextButton:'.swiper-button-next',
		lazyLoading:true,
		lazyLoadingInPrevNext : true, 
		lazyLoadingInPrevNextAmount: 1,			
		onSlideChangeEnd: function(swiper){ 
			swiper.update(); //swiper更新
		}
	});
})
$(function(){
	$(".brand_main").children().hide(); 
	$(".brand_list .lists li:first").attr("id","current"); 
	$(".brand_main>div:first").show(); 
	$(".brand_main>div:first").find('.bttrlazyloading').bttrlazyloading();
    $('.brand_list .lists li a').click(function(e) {
        e.preventDefault();        
        $(".brand_main").children().hide(); 
        $(".brand_list .lists li").attr("id",""); 
        $(this).parent().attr("id","current"); 
        $('#' + $(this).attr('data-name')).show();
		$('#' + $(this).attr('data-name')).find('.bttrlazyloading').bttrlazyloading();
    });		
})
$(function(){
	$('.sustainable_list li span,.sustainable_list li h3').click(function(){
		$(this).parent().addClass('is-li').end();
		$(this).parent().siblings('li').removeClass('is-li')
	});	
})
$(function(){
	$('.job_menu li>a').click(function(){
		$(this).next().stop().slideToggle(200);
		return false;
	})
	$('.job_menu li').mouseleave(function(){
		$(this).children('dl').stop().slideUp(200);
		return false;
	})
	
	$(document).keypress(function(e) {  
    	// 回车键事件  
       if(e.which == 13) {  
   		jQuery(".job_search i").click();  
       }  
   	}); 
	$('.job_search i').click(function() {
		module = 'recruit';
		keyword = $('.job_search input[name="keyword"]').val();
		searchUrl=$('.job_search').attr('data-url');
		url=searchUrl+'/'+module+'/'+keyword;
        window.location.href=url;
	})	
})
$(function(){
	if (getIEVersion() !== "IE8") {
		$('.video_text h1').addClass('wow fadeInRight');
		$('.video_text h3').addClass('wow fadeInLeft');
		$('.video_text p').addClass('wow fadeInDown');
		$('.tem_product .swiper-slide').each(function(i){
			$(this).addClass('wow fadeInRight');
			$(this).attr('data-wow-delay',i*0.2+'s')
		})
		$('.temabout_main').children().each(function(i){
			$(this).addClass('wow fadeInUp');
			$(this).attr('data-wow-delay',i*0.2+'s')
		})
		$('.four_main').children().each(function(i){
			$(this).addClass('wow zoomIn');
			$(this).attr('data-wow-delay',i*0.2+'s')			
		})
		$('.tem_news h3,.tem_news .more_link').addClass('wow fadeInUp');
		$('.tem_newslist .col-md-5').addClass('wow fadeInLeft');
		$('.tem_newslist .col-md-7 li').each(function(i){
			$(this).addClass('wow fadeInUp');
			$(this).attr('data-wow-delay',i*0.2+'s')			
		})
		$('.tem_links .links:first').addClass('wow fadeInLeft');
		$('.tem_links .links').eq(1).addClass('wow fadeInRight');
		$('.page_ban .ban_text').addClass('wow zoomIn');
		$('.company .editor').children().each(function(i){
			$(this).addClass('wow fadeInUp');
			$(this).attr('data-wow-delay',i*0.2+'s')				
		})
		$('.equipment h2,.equipment .editor').addClass('wow fadeInUp');
		$('.honor .col-md-5').addClass('wow fadeInLeft');
		$('.honor .col-md-7').addClass('wow fadeInRight');
		$('.development h1').addClass('wow fadeInUp');
		$('.development .editor,.history_box h1').addClass('wow fadeInUp');
		$('.history_box .desc').children().each(function(i){
			$(this).addClass('wow fadeInUp');
			$(this).attr('data-wow-delay',i*0.2+'s')			
		})
		$('.history_list li').each(function(i){
			$(this).addClass('wow fadeInDown');
			$(this).attr('data-wow-delay',i*0.2+'s')	
		})
		$('.distribution .item').each(function(i){
			$(this).addClass('wow zoomIn');
			$(this).attr('data-wow-delay',i*0.2+'s')			
		})
		$('.certificate_list>ol>li,.staff_list li').each(function(i){
			$(this).addClass('wow zoomIn');
			$(this).attr('data-wow-delay',i*0.08+'s')			
		})
		$('.sustainable_list li').each(function(i){
			$(this).addClass('wow fadeInUp');
			$(this).attr('data-wow-delay',i*0.2+'s')			
		})
		$('.value_text,.spirit_text,.mission_about .editor').children().each(function(i){
			$(this).addClass('wow fadeInUp');
			$(this).attr('data-wow-delay',i*0.2+'s')			
		})
		$('.enterprise h3').addClass('wow fadeInUp');
		$('.enterprise .enter_text').children().each(function(i){
			$(this).addClass('wow fadeInUp');
			$(this).attr('data-wow-delay',i*0.2+'s')			
		})
		$('.about_show,.talent_main0 .editor,.talent_main1 .editor,.talent_main2 .editor').children().each(function(i){
			$(this).addClass('wow fadeInUp');
			$(this).attr('data-wow-delay',i*0.15+'s')
		})
		$('.social_list li').each(function(i){
			$(this).addClass('wow fadeInUp');
			$(this).attr('data-wow-delay',i*0.15+'s')			
		})
		$('.news_list li').each(function(i){
			$(this).addClass('wow zoomIn');
			$(this).attr('data-wow-delay',i*0.15+'s')			
		})
		$('.talent_main0 h1,.talent_main1 h1,.talent_main2 h1').addClass('wow fadeInUp');
		$('.job_list li').each(function(i){
			$(this).addClass('wow fadeInUp');
			$(this).attr('data-wow-delay',i*0.15+'s')		
		})
		$('.contact_info .editor').children().each(function(i){
			$(this).addClass('wow fadeInLeft');
			$(this).attr('data-wow-delay',i*0.15+'s')			
		})
		$('.innovation_about .editor>p').addClass('wow fadeInUp')
		$('.innovation_about .editor .text_main>p').addClass('wow fadeInUp')
		$('.innovation_about .editor .text_main>.col-md-6:first').addClass('wow fadeInLeft');
		$('.innovation_about .editor .text_main>.col-md-6').eq(1).addClass('wow fadeInRight');
		$(".product_list ul.list li").each(function(i){
			$(this).find('.img').addClass('wow zoomIn');
			$(this).find('.img').attr('data-wow-delay',i*0.1+'s')			
		})
		$('.party_text .editor').children().each(function(i){
			$(this).addClass('wow fadeInUp');
			$(this).attr('data-wow-delay',i*0.1+'s')			
		})
		$('.party_imglist .item').each(function(i){
			$(this).addClass('wow zoomIn');
			$(this).attr('data-wow-delay',i*0.3+'s')			
		})
		$('.img_now').addClass('wow fadeInUp');
		$('.pioneer_text h3').addClass('wow fadeInUp');
		$('.pioneer_text .editor table tr').each(function(i){
			$(this).addClass('wow fadeInUp');
			$(this).attr('data-wow-delay',i*0.1+'s')			
		})
		$('.activity h3').addClass('wow fadeInUp');
		$('.activity_list .swiper-slide').each(function(i){
			$(this).find('.img').addClass('wow zoomIn');
			$(this).find('.img').attr('data-wow-delay',i*0.1+'s')
		})		
		//wow插件执行
		var wow = new WOW({
			boxClass: 'wow',
			animateClass: 'animated',
			offset: 0,
			mobile: true,
			live: true
		});
		wow.init();	
		//
		$.stellar({
			horizontalScrolling: false,
			verticalOffset: 150
		});		
	}

})
$(function(){
	if (!$('.bannerbox .box_skitter').length )return;
	var _animations = ["cube","cubeRandom","block","cubeStop","cubeStopRandom","cubeHide","cubeSize","horizontal","showBars","showBarsRandom","tube","fade","fadeFour","paralell","blind","blindHeight","blindWidth","directionTop","directionBottom","directionRight","directionLeft","cubeSpread","glassCube","glassBlock","circles","circlesInside","circlesRotate","cubeShow","upBars","downBars","hideBars","swapBars","swapBarsBack","swapBlocks","cut"]
	var animations = []
	function pushRandomAnimation(){
		var random = Math.floor(Math.random()*_animations.length)
			random     = _animations[random]
		animations.push( random )
	}
	var wait = $.each(_animations,pushRandomAnimation)
	$('.box_skitter_large').skitter({
		navigation:true,
		show_randomly:false,
		stop_over:false,
		progressbar:true,
		interval:4000,
		with_animations:animations
	});
});
$(function(){
	if(!$('#yourImg').length)return;
	$('.bttrlazyloading').bttrlazyloading();
})


$(function(){
	$(window).resize(function(){
		autosize();
	})
	function autosize(){
		//自适应屏幕JS
		var a=$(window).height();
		$('.tem_banner').height(a)
	}
	autosize();
})


/*
$(function(){
	//自定义滚动条
	if(!$('.news_show,.info_content,.product_show,.culture_box,.page_video,.join-infotext').length)return;
	$(window).on("load",function(){
		$('.backmap').delay(300).fadeOut(400);  
		$('html,body').css({'overflow':'hidden'});
		$("body").mCustomScrollbar({
			theme:"minimal"
		});
	});	
})*/