

$('.coop_slide').slick({
  slidesToShow: 7,
  slidesToScroll: 1,
  arrows: true,
  speed: 500,
  autoplay: true,
  autoplaySpeed: 3000,
  responsive: [
    {
      breakpoint: 1660,
      settings: {
        slidesToShow: 6,
      }
    },
    {
      breakpoint: 1440,
      settings: {
        slidesToShow: 5,
      }
    },
    {
      breakpoint: 1200,
      settings: {
        slidesToShow: 5,
      }
    }
  ]
});

$(function(){
	$(window).scroll(function() {
		if ($(this).scrollTop()>100){
			$("#gotop").removeClass("hide");
		}else{
			$("#gotop").addClass("hide");
		};
	});
	$('#gotop').click(function () {
		$('html,body').animate({
			scrollTop : '0px'
		}, 800);
	});	
	 $('.mouse_down').click(function () {
		  var w_h = $(window).height()+'px'
		  //alert(w_h)
		$('html,body').animate({
			scrollTop : w_h
		}, 800);
	  });	
	 	$(".dw2").hover(function(){
		$(this).addClass('on');
	});
	$(".dw2").mouseleave(function(){
		$(this).removeClass('on');
	}); 

 $('.btn[name]').click(function() {
		var tf_name_id = $(this).attr('name');
		$('.tc[name=' + tf_name_id + ']').addClass('act');
		$('.tc-box').addClass('lightSpeedIn');
		$('.tc-box').removeClass('zoomOut');
	});
	$('.close').click(function() {
		$(this).parents('.tc').removeClass('act');
		$('.tc-box').addClass('zoomOut');
		$('.tc-box').removeClass('lightSpeedIn');
	});
	$('.tc-bg').click(function() {
		$(this).parents('.tc').removeClass('act');
		$('.tc-box').addClass('zoomOut');
		$('.tc-box').removeClass('lightSpeedIn');
	});
	
	        $("#bnt_site_map").click(function() {
			$("#site_map_box").fadeIn(0);
			$("#site_map_box .bg_box").fadeIn(0);
			 $("#site_map_box .box").animate({right:"0"});
			$('.j_div_scoll').perfectScrollbar();
		  });
		  $("#bnt_close_nav,#bnt_close").click(function () {
			  $("#site_map_box").fadeOut();
			  $("#site_map_box .bg_box").fadeOut();
			  $("#site_map_box .box").animate({
				  right: "-360px"
			  });
		  });
		  $(document).mouseup(function (e) {
			var _con = $('#bnt_site_map,#bnt_link1,#content_link1'); // 设置目标区域
			if (!_con.is(e.target) && _con.has(e.target).length === 0) { // Mark 1
				$("#content_link1").fadeOut();
				$("#site_map_box").fadeOut();
				$("#site_map_box .bg_box").fadeOut();
				$("#site_map_box .box").animate({
					right: "-360px"
				});
			}
		});
	
	

//=================================锚点跳转
 $(function(){$('a[href*=#],area[href*=#]').click(function(){if(location.pathname.replace(/^\//,'')==this.pathname.replace(/^\//,'')&&location.hostname==this.hostname){var $target=$(this.hash);$target=$target.length&&$target||$('[name='+this.hash.slice(1)+']');if($target.length){var targetOffset=$target.offset().top;$('html,body').animate({scrollTop:targetOffset},1000);return false}}})});	
 
//=================================IE9 兼容placdholder属性
$(function(){
    function placeholderSupport() {
        return 'placeholder' in document.createElement('input');
    }
    if(!placeholderSupport()){   // 判断浏览器是否支持 placeholder
        $("[placeholder]").each(function(){
            var _this = $(this);
           // console.log($(this).height());
            //var inputHeight = parseInt(parseInt($(this).height()-2)-14)/2;
            var inputHeight = parseInt(parseInt(parseInt($(this).height()-2)/2)-7)+'px';
            _this.parent().css({"position": "relative"});
            var left = _this.position().left+parseInt(_this.css("padding-left"))+parseInt(_this.css("margin-left"))+"px";
            //var top = parseInt(_this.css("padding-top"));//+parseInt(_this.css("margin-top"))+"px";
            var top = parseInt(_this.css("padding-top"));//+parseInt(_this.css("margin-top"))+"px";
            _this.after('<span class="placeholder" data-type="placeholder" style="position: absolute;font-size:14px; top: '+ inputHeight +'; left: ' + left + '">' + _this.attr("placeholder") + '</span>');
            //_this.after('<span class="placeholder" data-type="placeholder" style="position: absolute; top: 0px; left: ' + left + '">' + _this.attr("placeholder") + '</span>');
            if(_this.val() != ""){
                _this.parent().find("span.placeholder").hide();
            }
            else{
                _this.parent().find("span.placeholder").show();
            }
        }).on("focus", function(){
            $(this).parent().find("span.placeholder").hide();
        }).on("blur", function(){
            var _this = $(this);
            if(_this.val() != ""){
                _this.parent().find("span.placeholder").hide();
            }
            else{
                _this.parent().find("span.placeholder").show();
            }
        });
        // 点击表示placeholder的标签相当于触发input
        $("span.placeholder").on("click", function(){
            $(this).hide();
            $(this).siblings("[placeholder]").trigger("click");
            $(this).siblings("[placeholder]").trigger("focus");
        });
    }
});


	$("input.focus_js").focus(function(){
		$(".input_tip").addClass("act");
	});
		
	$('.tc_btn[name]').click(function() {
		var tf_name_id = $(this).attr('name');
		$('.tc[name=' + tf_name_id + ']').addClass('act');
	});
	$('.tc_close').click(function() {
		$(this).parents('.tc').removeClass('act')
	});
	$('.tc_bg').click(function() {
		$(this).parents('.tc').removeClass('act');
		$(".input_tip").removeClass("act");
		$("input.focus_js").val("");
	});

	
$('.s_pro_slide').slick({
	  slidesToShow: 4,
	  slidesToScroll: 1,
	  arrows:true,
	  dots: false,
	  touchThreshold:20,
	  speed:1300,
	  autoplay: true,
	  autoplaySpeed:1300,
	  cssEase: 'linear',
	  waitForAnimate:false,
	 responsive: [
	{
      breakpoint: 1440,
      settings: {
        slidesToShow: 3,
      }
    },
    {
      breakpoint: 996,
      settings: {
        slidesToShow: 2,
      }
    },
  ]
	});

$('.s_xilie_slider').slick({
	  slidesToShow: 1,
	  slidesToScroll: 1,
	  dots: false,
	  arrows:false,
	  infinite: true,//循环播放
	  speed: 1500,
	  //fade: true,
	  pauseOnHover: false,
	  autoplay: true,
	  autoplaySpeed:3500,
	  cssEase: 'ease',
	  //waitForAnimate:false,
	  asNavFor: '.s_xilie_slider2'
	});
$('.s_xilie_slider2').slick({
	  slidesToShow: 1,
	  slidesToScroll: 1,
	  dots: true,
	  arrows:true,
	  infinite: true,//循环播放
	  speed: 1500,
	  fade: true,
	  pauseOnHover: false,
	  autoplay: true,
	  autoplaySpeed:3500,
	  cssEase: 'ease',
	  //waitForAnimate:false,
	  asNavFor: '.s_xilie_slider'
	});

 $('.pro_slider-for').slick({
		slidesToShow: 1,
		slidesToScroll: 1,
		arrows: true,
		fade: true,
	    speed: 500,
		autoplay: true,
		autoplaySpeed: 2000,
	  });

$(".louceng_nav").hide();  
	  $(window).scroll(function() {

		if ($(this).scrollTop()>300){
			$(".louceng_nav").fadeIn();
		}else{
			$(".louceng_nav").fadeOut();
		};
	});

	
		
});

