/*
Powered by ly200.com		http://www.ly200.com
广州联雅网络科技有限公司		020-83226791
*/
$(function(){
	nav('.head-nav','.head-nav .n_item');
	$('.products .pro_cate .first_cate').on('click',function(){
		$(this).parents('.list').find('.son_cate').toggleClass('on');
		$(this).parents('.list').toggleClass('on');
	})

    $('.search-form').on('click',function(e){
		e.stopPropagation();
		if(!$(this).hasClass('open')){
			$(this).addClass('open');
		}
    });

	$('body').click(function(){
		$('.search-form').removeClass('open');
	});

	$("#footer .link ul li.tit").click(function(){
		$(this).parent().toggleClass('show-child');
	});


	function footer_click(){
		$('#footer .f_list .f_item .item_title').on('click',function(){
			var $this=$(this),
				cur=$this.parent().hasClass('cur');
				if($this.find('em').length==0){ return false; }
				if(cur){
					$this.parent().removeClass('cur');
					$this.next().hide();
				}else{
					$this.parent().addClass('cur');
					$this.next().show();
				}
		})
	}

	if($(window).width()<=768){
		footer_click();
	}

	index_show_video($(".video_btn"));

    $(window).scroll(function(){
        var height = $("#top").outerHeight();
        var w_top = $(this).scrollTop();
        if(w_top > height){
            $('.responsive_pc_header .header_in').addClass('fixed');
        }else{
            $('.responsive_pc_header .header_in').removeClass('fixed');
        }
    });
	
});