/*产品目录 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 <= 1023){  
	$(".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 () {
	$(".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);
	});

});

/*首页产品滚动*/
jQuery(function() {
	var c_slidesPerView;ssssssssssss
	if(document.body.clientWidth <= 767){  
		c_slidesPerView=1;
	}
	else{  
		c_slidesPerView=1;
	}
	if($('.h_pro_tj_scoll .swiper-slide').length==0){
		$('.h_pro_tj_scoll .swiper-button-next').hide();
		$('.h_pro_tj_scoll .swiper-button-prev').hide();
	}
	if($('.h_pro_tj_scoll .swiper-slide').length>=c_slidesPerView){
	  var mySwiper1 = new Swiper('.h_pro_tj_scoll .swiper-container',{
		pagination: '.h_pro_tj_scoll .pagination',
		paginationClickable: true,
		slidesPerView: c_slidesPerView,
		loop: true,
		autoplay : 5000,
		autoplayDisableOnInteraction : false,
		calculateHeight : true,
		resizeReInit : true,
		roundLengths : true
	  })
	  $('.h_pro_tj_scoll .swiper-button-prev').on('click', function(e){
		e.preventDefault()
		mySwiper1.swipePrev()
	  })
	  $('.h_pro_tj_scoll .swiper-button-next').on('click', function(e){
		e.preventDefault()
		mySwiper1.swipeNext()
	  }) 
  }
});

