/*产品目录 begin*/
/*产品目录第一个默认展开*/
$(function(){ $(".cp_type .bd ul li").first().children('div').show();$(".cp_type .bd ul li").first().addClass('on');});
$(".cp_type .bd ul li p span").click(function () {
	if($(this).parents('li').hasClass('on')){
		$(this).parents('li').removeClass('on').find('div').stop().slideUp();
	}else{
		$(this).parents('li').find('div').removeAttr("style");
		$(this).parents('li').addClass('on').find('div').stop().slideDown();
	}
});

if(document.body.clientWidth <=1079){  
	$(".cp_type .hd").click(function () {
		if($(this).hasClass('on')){
			$(this).next('div').removeAttr("style");
			$(this).removeClass('on').next('div').stop().slideUp();
		}else{
			$(this).next('div').removeAttr("style");
			$(this).addClass('on').next('div').stop().slideDown();
		}
	});
}	
/*产品目录 end*/

/*侧边漂浮*/
$(function() {
    var time;
    //var winHeight = top.window.document.body.clientHeight || $(window.parent).height();
    $('.client-2').css({
        'marginTop': -($('.client-2').height() / 2)
    });
    $('#client-2 li').bind({
        'mouseenter': function() {
            var scope = this;
            time = setTimeout(function() {
                var divDom = $(scope).children('div');
                var maxWidth = divDom.width();
                $(scope).stop().animate({
                    left: 77 - maxWidth
                },
                'normal',
                function() {
                    var pic = $(scope).find('.my-kefu-weixin-pic');
                    if (pic.length > 0) {
                        pic.show();
                    }
                });
            },
            100)
        },
        'mouseleave': function() {
            var pic = $(this).find('.my-kefu-weixin-pic');
            var divDom = $(this).children('div');
            var maxWidth = divDom.width();
            if (pic.length > 0) {
                pic.hide();
            }
            clearTimeout(time);
            var divDom = $(this).children('div');
            $(this).stop().animate({
                left: 0
            },
            "normal",
            function() {});
        }
    });
    //返回顶部
    $(window).scroll(function() {
        var scrollTop = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop;
        var eltop = $("#client-2").find(".my-kefu-ftop");
        if (scrollTop > 0) {
            eltop.show();
        } else {
            eltop.hide();
        }
    });
    $("#client-2").find(".my-kefu-ftop").click(function() {
        var scrollTop = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop;
        if (scrollTop > 0) {
            $("html,body").animate({
                scrollTop: 0
            },
            "slow");
        }
    });
});

<!--导航响应式按钮-->
$(function () {
	$(".menu_open").click(function () {
		$(".nav").animate({ 'left': '0' }, 400);
		$(".hcover").animate({ 'right': '0' }, 400);
	});
	$(".hcover").click(function () {
		$(this).animate({ 'right': '-50%' }, 400);
		$(".nav").animate({ 'left': '-50%' }, 400);
		$(".nav_ul").animate({ 'left': '0' }, 400);
		$('.nav_item_open').css('left', '-50%');
	});
	$(".nav_item i").click(function () {
		$(".nav_ul").animate({ 'left': '-100%' }, 400);
		$(this).next('.nav_item_open').css('left', '0');
	});
	$(".subopen").click(function () {
		$(this).parent('.nav_item_open').css('left', '-50%');
		$(".nav_ul").animate({ 'left': '0' }, 400);
	});

});



$('.shuzi').countUp();


var swiper4 = new Swiper('.swiper-container4', {      
			autoplay: 3000,//自动播放时间
			loop: true,//开启循环true or false
			slidesPerView: 4, //列数
			spaceBetween: 20, //slides之间间隔
			breakpointsInverse: true,
			nextButton: '.swiper-button-next',
			prevButton: '.swiper-button-prev',
			paginationClickable: true,
			observer:true,
			observeParents:true,
			autoplayDisableOnInteraction:false,
			observer:true,
			observeParents:true,
			autoplayDisableOnInteraction:false,
			breakpoints: {
				320: {
					slidesPerView: 1,
					spaceBetween: 20
				},
				767: {
					slidesPerView: 1,
					spaceBetween: 20
				},
				1080: {
					slidesPerView: 3,
					spaceBetween: 20
				},
				1200: {
					slidesPerView: 4,
					spaceBetween: 20
				}
			}
		});
