/*! www.vancheer.com  |  Powered by vancheer */
$(function(){
    //--
    //$('.lxpro li').click(function () {
    //    var ind = $(this).index();
    //    $(this).addClass('liNow').siblings().removeClass('liNow');
    //    $('.lxpro .list .lxUl').eq(ind).show().siblings().hide();
    //});
    $('.lx-tabTlt li').click(function () {
        var ind = $(this).index();
        $(this).addClass('liNow').siblings().removeClass('liNow');
        $('.lxpro .list .lxUl').eq(ind).show().siblings().hide();
    });
	//--
	//$('.pagenav').find('li').find('a').hover(
//	   function(){
//		   $(this).stop().animate({top: -10}, 100);
//		   $(this).delay(100).animate({top: 0}, 200);
//		   },
//	   function(){
//		   }
//	)
	//--
	$('.notice1').find('li').find('.txt').find('a').each(function (i) {
        $(this).hover(
		   function () {
				$('.notice1').find('li').find('.time').eq(i).addClass('on');
		   },
		   function () {
			   $('.notice1').find('li').find('.time').eq(i).removeClass('on');
		   }
		)
    })
	//--
	$('.lnav').find('li').each(function(i){
		$(this).click(function(){
			$('.lnav').find('li').removeClass('liNow');
			$(this).addClass('liNow');
			$('body,html').stop().animate({scrollTop: $('.projectDiv').eq(i).offset().top-0}, 500,'easeOutQuart');
			})
	})
	//--
	$('.indexPart6').find('.wq').click(function(){
		$('.indexPart7').slideToggle(500);
		})
	//$('.wangqun').find('.top').click(function(){
//		$('.wangqun').find('.wqlist').toggle();
//		})
	//-
	$('.headDiv').find('.searchbtn').click(function(){
		$('.Searchdiv').animate({top:"60",height:"100%"}, 500);
		})
	$('.Searchdiv').find('.closeBtn').click(function(){
		$('.Searchdiv').animate({top: "-100%",height:0}, 500);
		})
	//--
	$('.navIco').click(function(){
		$('.navLayer').fadeToggle(500);
		$('.navIco').toggleClass('on');
		})
	//--
	$('.pagenavph').find('.Now').click(function(){
		$('.pagenavph').find('ul').fadeToggle(500);
		$('.pagenavph').find('.Now').toggleClass('on');
		})
	//--

	$('.casenav').find('li').each(function(i){
		$(this).find('.top').each(function(ii){
			$(this).click(
			function(){
				$('.casenav').find('dl').eq(i).fadeToggle(500);
				$('.casenav').find('.top').eq(i).toggleClass('on');
				}	
				)
			})
		})
	//--
	$('.tabContentDiv').find('.tabContent:first').show();
	$('.tab').each(function(i){
		$(this).find('li').each(function(ii){
			$(this).hover(
			function(){
				$('.tab').eq(i).find('li').removeClass('liNow');
				$(this).addClass('liNow');
				$('.tabContentDiv').eq(i).find('.tabContent').hide();
				$('.tabContentDiv').eq(i).find('.tabContent').eq(ii).show();
				},
			function(){}	
				)
			})
		})
	//--
	$('.tabContentDiv2').find('.tabContent2:first').show();
	$('.tab2').each(function(i){
		$(this).find('li').each(function(ii){
			$(this).click(
			function(){
				$('.tab2').eq(i).find('li').removeClass('liNow');
				$(this).addClass('liNow');
				$('.tabContentDiv2').eq(i).find('.tabContent2').hide();
				$('.tabContentDiv2').eq(i).find('.tabContent2').eq(ii).show();
				}	
				)
			})
		})
	//--
	$('.sNavA').each(function(i){
		$(this).hover(
		   function(){
			   $('.sNav').eq(i).show();
			   //$('.sNav').eq(i).css('left',$(this).offset().left);
			   },
		   function(){
			   $('.sNav').hide();
			   }
		)
		})
	$('.sNav').each(function(i){
		$(this).hover(
		   function(){
			   $('.sNavA').eq(i).addClass('aNow');
			   $(this).show();
			   },
		   function(){
			   $('.sNavA').removeClass('aNow');
			   $(this).hide();
			   }
		)
		})
	//--
	$(".subNav").click(function(){
			$(this).toggleClass("currentDt").siblings(".subNav").removeClass("currentDt")
			$(this).next(".navContent").slideToggle(300).siblings(".navContent").slideUp(500)
	})
	//--
	$(".subNav2").click(function(){
			$(this).toggleClass("currentDt").siblings(".subNav2").removeClass("currentDt")
			$(this).next(".navContent2").slideToggle(300).siblings(".navContent2").slideUp(500)
	})
	
	 //--返回顶部
	if($('.topA').length>0){
		$(window).scroll(function(){
			if($(window).scrollTop()>200){
				$('.topA').fadeIn(200);
				}else{
					$('.topA').fadeOut(200);
					}
			})
		}
	$('.topA').click(function(){
		$('body,html').animate({scrollTop: 0}, 500);
	})
    //--
	$('.botLayer').find('.close').click(function () {
	    $('.botLayer').hide();
	})
    //
	$('.production2').find('.tab2').find('li').click(function () {
	    $('body,html').stop().animate({ scrollTop: $('.production2').find('.tabContentDiv2').offset().top }, 600, 'easeOutQuart');
	})
	//--
})
	



jQuery(document).ready(function($){
	// browser window scroll (in pixels) after which the "back to top" link is shown
	var offset = 300,
		//browser window scroll (in pixels) after which the "back to top" link opacity is reduced
		offset_opacity = 1200,
		//duration of the top scrolling animation (in ms)
		scroll_top_duration = 700,
		//grab the "back to top" link
		$back_to_top = $('.cd-top');

	//hide or show the "back to top" link
	$(window).scroll(function(){
		( $(this).scrollTop() > offset ) ? $back_to_top.addClass('cd-is-visible') : $back_to_top.removeClass('cd-is-visible cd-fade-out');
		if( $(this).scrollTop() > offset_opacity ) { 
			$back_to_top.addClass('cd-fade-out');
		}
	});

	//smooth scroll to top
	$back_to_top.on('click', function(event){
		event.preventDefault();
		$('body,html').animate({
			scrollTop: 0 ,
		 	}, scroll_top_duration
		);
	});

});	

function search() {
        var keys = document.getElementById("txtk").value;
        location.href = "/NewsCenter/search.aspx?a=n&keys=" + keys;
    }
    function entersearch() {
        //alert(dd);
        var keys = document.getElementById("txtk").value;
        var event = window.event || arguments.callee.caller.arguments[0];
        if (event.keyCode == 13) {
            //search();
            window.locations.href = "/NewsCenter/search.aspx?a=n&keys=" + keys;
            return false;
        }
    }


