function isIE() {
	if (!!window.ActiveXObject || "ActiveXObject" in window)
	return true;
	else
	return false;
}
//分享
//$('#share').share({ sites: ['weibo', 'wechat'] });
//头部
$(".top-main").mouseDelay(false).hover(function () {
    $(this).addClass("hover");
}, function () {
    if ($(".fixed-menu").hasClass("show")) {
        $(this).addClass("hover");
    } else {
        if ($('body').hasClass("same-body")) {
            $(this).removeClass("hover");
        } else {
            $(this).addClass("hover");
        }
    }
	
			$(".top-search").fadeOut();
});

$(".top-menu li").each(function () {
    var n = $(this).find(".sub").find(".auto-inner > .list").length
    if (n >= 1) {
        var nth = Math.floor(n/3)+1
		//console.log(nth)
        //组合
        $(this).find(".sub").find(".list").each(function (i) {
            if (i % nth == 0) {
                temp = $("<div class='list-row'></div>")
                temp.appendTo($(this).parent());
            }
            $(this).appendTo(temp);
        });
        //end
    }
	
    //下拉菜单
    if ($(this).find(".sub").length >= 1) {
        $(this).addClass("has-sub");
        $(this).mouseDelay(false).hover(function () {
            $(this).find(".sub").slideDown('fast');
            $(this).addClass("aon");
			$(".top-search").fadeOut();
        }, function () {
            $(this).find(".sub").slideUp('fast');
            $(this).removeClass("aon");
            //$("#m"+m).addClass("aon");
        });
    }
    //end
    //二级菜单
    $(this).find(".sub").find(".list-row").each(function () {
        $(this).find(".list").mouseDelay(false).hover(function () {
            $(this).parent(".list-row").siblings().find(".list").removeClass("off").removeClass("on");
            $(this).parent(".list-row").siblings().find(".list-sub").fadeOut('fast');
            $(this).removeClass("off").addClass("on");
            $(this).siblings().removeClass("on").addClass("off");
            $(this).siblings().find(".list-sub").fadeOut('fast');
            $(this).find(".list-sub").fadeIn('fast');
            var thish = $(this).find(".list-sub").outerHeight();
            $(this).parent(".list-row").css("min-height", thish)
        });
    });
    //初始选中
    $(this).find(".sub").find(".list-row").eq(0).find(".list").eq(0).addClass("on");
    $(this).find(".sub").find(".list-row").eq(0).find(".list").eq(0).siblings().addClass("off");
    $(this).find(".sub").find(".list-row").eq(0).find(".list").eq(0).find(".list-sub").show();
    //end
		//buy
    $(this).find(".sub-column").find(".left").each(function () {
        $(this).find(".list").mouseDelay(false).hover(function () {
			var liste=$(this).index();
            $(this).addClass("on");
            $(this).siblings().removeClass("on");
            $(this).parent(".left").next(".right").find("ol").eq(liste).fadeIn('fast');
            $(this).parent(".left").next(".right").find("ol").eq(liste).siblings().hide();
        });
    });
    //初始选中
    $(this).find(".sub-column").find(".left").find(".list").eq(0).addClass("on");
	$(this).find(".sub-column").find(".right").find("ol").eq(0).show();
   //end 	
});


//打开菜单
$("#open-pc").click(function () {
    if ($(this).hasClass("on")) {
        $(this).removeClass("on");
        $('body').removeClass("body-hidden");
        //$('.top-main').removeClass("hover");
        $(".fixed-menu").removeClass("show");
    } else {
        $(this).addClass("on");
        $('body').addClass("body-hidden");
        $('.top-main').addClass("hover");
        $(".fixed-menu").addClass("show");
    }
});


$("#open-wap").click(function () {
    if ($(this).hasClass("on")) {
        $(this).removeClass("on");
        $(".wap-menu").removeClass("show");
        $('.wap-layer').fadeOut();
    } else {
        $(this).addClass("on");
        $('.wap-layer').fadeIn();
        $(".wap-menu").addClass("show");
    }
});

//移动端菜单
$(".wap-menu .left li").each(function () {
    var e = $(this).attr("rel");
    var a = $(this).index();
    var eh = $(this).outerHeight() * a;
    //var et=$(this).offset().top
    $("#show" + e).css("padding-top", eh);
    var num = $("#show" + e).find("dt").length
    if (num >= 1) {
        $(this).addClass("has-dt");
        $(this).click(function () {
            $("#show" + e).show();
            $("#show" + e).siblings().hide();
            $(this).addClass("active");
            $(this).siblings().removeClass("active");
        });
    }
});
$(".wap-menu .left li.has-dt").eq(0).click();

//获取个文字高度最高值
var h_max = 0;
$(".fixed-menu li").each(function () {
    var h = $(this).height();
    h_max = h > h_max ? h : h_max;
});
//给每一个元素设置相同的高
$(".fixed-menu li dl").css("min-height", h_max);

function fixedmenu() {
    var th = $(".top-main").outerHeight()
    $(".fixed-menu").css("padding-top", th);
    var a = ($(window).height() - th) * 0.9;
    var b = $(".fixed-menu .auto-inner").height();
    var c = (a - b) / 2
    $(".fixed-menu ul").css("padding", "" + c + "px 0")
}

$(function () {
    fixedmenu();
});
$(window).resize(function () {
    fixedmenu();
})

//打开搜索
$(".open-search").click(function (e) {
    if ($(this).hasClass("on")) {
        $(this).removeClass("on");
    } else {
        $(this).addClass("on");
    }
    $(".top-search").stop(true, true).fadeToggle();
    $(document).on("click", function () {
        $(".top-search").stop(true, true).fadeOut();
        $(".open-search").removeClass("on");
    });
    e.stopPropagation();
});
$(".top-search").on("click", function (e) {
    e.stopPropagation();
});


  $("#TopBtn").jqSearch({
	  TxtVal: "请输入搜索关键字",
	  KeyTxt1: "输入关键词搜索！",
	  KeyTxt2: "输入的关键词字数不要过多！",
	  KeyTxt3: "您输入的内容存在特殊字符！",
	  KeyId: "TopKey", //输入框id
	  KeyUrl: topsearchpath, //跳转链接
	  KeyHref: "key", //链接传值
	  Static: false //是否静态站
  });

//底部搜索
$("#bottomBtn").jqSearch({
    TxtVal: "请输入搜索关键字",
    KeyTxt1: "输入关键词搜索！",
    KeyTxt2: "输入的关键词字数不要过多！",
    KeyTxt3: "您输入的内容存在特殊字符！",
    KeyId: "bottomKey", //输入框id
    KeyUrl: bottomsearchpath, //跳转链接
    KeyHref: "key", //链接传值
    Static: false //是否静态站
});

//底部集团站群
$(".copyright .group > span").click(function () {
    if ($(this).hasClass("on")) {
        $(this).removeClass("on");
    } else {
        $(this).addClass("on");
    }
    $(this).next("ul").slideToggle('fast');
});
$(".copyright .group").mouseleave(function () {
    $(this).find("ul").slideUp('fast');
    $(this).find("span").removeClass("on");
});

$(".footer .link .book").click(function () {
    $(".fixed-Popups").fadeIn();
});
$(".fixed-Popups .close").click(function () {
    $(".fixed-Popups").fadeOut();
});

//打开视频
var myvideo = document.getElementById("video");
$(".play").click(function () {
    $(".home-box3 .video").addClass("show");
    myvideo.play();
});

$(".play-video").click(function () {
    $(this).fadeOut();
    $(this).next(".files").addClass("show");
    var video = document.getElementById("video");
    video.play();
});

//产品详情
function newprodinfo() {
    $(window).scroll(function () {
        var _this = $(".prod-cur");
        var a = $(".prod-cur-h")
        var stop = $(document).scrollTop()
        var pt = _this.offset().top
        if (stop >= pt) {
            _this.addClass("fixed");
            a.height(_this.outerHeight())
        }
        var at = a.offset().top
        if (stop <= at) {
            a.height(0);
            _this.removeClass("fixed");
        }


        if ($('div').is('.info-css-1')) {
            var b = $(".info-css-1 .box-3").offset().top
            var c = b - ($(window).height() / 2)
            if (stop >= c) {
                $(".info-css-1 .box-3 .play-video").click()
            }
        }
        //end
    });


    $(".prod-cur dd > a").click(function () {
        var rel = $(this).attr("rel");
        $(this).addClass("on");
        $(this).siblings().removeClass("on");
        $(".prod-content .tab-info").hide();
        $("#" + rel).show();
        $('body,html').animate({ scrollTop: 0 }, 500);
        AOS.refresh();
    });
    $(".prod-cur dd > a").eq(0).click();

    $(".prod-cur dd .quanjing").mouseDelay(false).hover(function () {
        $(this).find("figure").fadeIn();
    }, function () {
        $(this).find("figure").fadeOut();
    })
	
	//气泡按摩浴缸 
	qipao();
	$(window).resize(function(){
		qipao();
	});
       function qipao(){
		   var w=$(window).width()
		   if(w<=1024){
			   $(".qipaoanmoyugang .box-2 li:odd").each(function(){
				   $(this).find(".pic").insertAfter($(this).find(".txt"));
			   })	   
		   }else{
			   $(".qipaoanmoyugang .box-2 li:odd").each(function(){
				   $(this).find(".pic").insertBefore($(this).find(".txt"));
			   });
		   }
	   }
		$(".qipaoanmoyugang .box-2 .item-ol ol:odd").each(function(){
			$(this).find(".info").insertBefore($(this).find(".pic"));
		 });
	//气泡按摩浴缸 end

}


function home() {
    //移动端文字大小
    fontsize()
    $(window).resize(function () {
        fontsize();
    })
    function fontsize() {
        var windowwidth = parseInt($(window).width());
        if (windowwidth <= 750) {
            var size = windowwidth * 58 / 750;
            $('.home-banner .txt').css('font-size', size + 'px');
        }
        else {
            $('.home-banner .txt').removeAttr('style');
        }
        //标题
        if (windowwidth <= 750) {
            var sizea = windowwidth * 56 / 750;
            $('.home-tit,.home-box2 ul').css('font-size', sizea + 'px');
        }
        else {
            $('.home-tit,.home-box2 ul').removeAttr('style');
        }
        //列表文本
        if (windowwidth <= 750) {
            var sizeb = windowwidth * 36 / 750;
            $('.home-txt').css('font-size', sizeb + 'px');
        }
        else {
            $('.home-txt').removeAttr('style');
        }
        //更多按钮
        if (windowwidth <= 750) {
            var sizec = windowwidth * 20 / 750;
            $('.home-more').css('font-size', sizec + 'px');
        }
        else {
            $('.home-more').removeAttr('style');
        }
        //按钮
        if (windowwidth <= 750) {
            var sized = windowwidth * 100 / 750;
            $('.home-box1 .btn a,.home-box2 .details,.home-box4 .inner').css('font-size', sized + 'px');
        }
        else {
            $('.home-box1 .btn a,.home-box2 .details,.home-box4 .inner').removeAttr('style');
        }

    };
    //banner
    $('.home-banner .slider').slick({
        dots: true,
        appendDots: $('.page-area .pager'),
        customPaging: function (slider, i) {
            var img = $(".home-banner .small li").eq(i).find("img").attr("src")
            return '<img src="' + img + '">';
        },
        autoplay: true,
        autoplaySpeed: 6500,
        speed: 1500,
    });

    $(".home-banner .slider").each(function () {
        $(this).on('beforeChange', function (event, slick, currentSlide, nextSlide) {
            $(".circleChart").remove();
        });
        $(this).on('afterChange', function (event, slick, currentSlide, nextSlide) {
            firstcircle(currentSlide);
        });
    })
    //end
    firstcircle(0);//初始化第一个
	
	        $(document).ready(function () {
          
            if (IsPC()) {
				$(".videofiles").each(function(){
					$(this).find("video").attr("src", $(this).find("video").attr("data-src"));
				});
                  
            }
            else {
				$(".videofiles").each(function(){
					$(this).parent("li").remove();
				});
            }
        });
        function IsPC() {
            var userAgentInfo = navigator.userAgent;
            var Agents = ["Android", "iPhone",
                "SymbianOS", "Windows Phone",
                "iPad", "iPod"];
            var flag = true;
            for (var v = 0; v < Agents.length; v++) {
                if (userAgentInfo.indexOf(Agents[v]) > 0) {
                    flag = false;
                    break;
                }
            }
            return flag;
        }
}

function firstcircle(v) {
    $(".home-banner .pager li").eq(v).append("<div class='circleChart'></div>")
    //if (!(/msie [6|7|8|9]/i.test(navigator.userAgent))) {
		if(isIE() == false){
			$(".circleChart").circleChart({ animation: "easeInOutQuad", size: 62, value: 100, speed: 6500 });
		}
   // };
}
//-------------star-------------//


$(".same-from dd").each(function () {
    var tips = $(this).find("label");
    var input = $(this).find(".text");

    input.val("");
    input.focus(function () {
        tips.hide();
    });
    input.blur(function () {
        var val = $(this).val();
        if (val == "") {
            tips.show();
        }
    });
    tips.click(function () {
        $(this).hide();
        $(this).next(".text").focus();
    });
});


$(".search-select dl dt").click(function () {
    $(this).next("dd").slideDown();
});
$(".search-select dl").mouseleave(function () {
    $(this).find("dd").slideUp();
});
$(".search-select dd li > span").click(function () {
    var _a = $(this).parent("li").parent("ul").parent("dd")
    _a.hide();
    if (_a.attr("id") == 'shengfen') {
        var n = $(this).text();
        var _this = _a.prev("dt").find("span")
        _this.text(n);
        _this.removeClass("gray");
        var t = $(this).next("ol").html()
        $("#city ul").html(t);
        $("#city li").click(function () {
            var bt = $(this).find("span").text()
            $("#city").hide();
            $("#city").prev("dt").find("span").text(bt).removeClass("gray");
        });
    }
});

$(".bottom-map .inner .mCustomScrollbar").mCustomScrollbar({
    scrollbarPosition: "outside",
});

//window.onload=function(){
//	$(".store-list").hide();
//}

$("#findstore li").click(function () {
    var e = $(this).attr("rel");
    var url = $(this).attr("data-url")
    if ($(this).hasClass("on")) {
        $(this).removeClass("on");
        $("#iframe" + e).slideUp();
        $("#iframe" + e).find("iframe").attr("src", " ")
    } else {
        $(this).siblings().removeClass("on");
        $(this).addClass("on");
        $("#iframe" + e).siblings().find("iframe").attr("src", " ")
        $("#iframe" + e).siblings(".store-list").slideUp();
        $("#iframe" + e).find("iframe").attr("src", url)
        $("#iframe" + e).slideDown();
    }
});

function about() {
    function a() {
        var imgh = $(".con-4 .bg-img img").height();
        $(".con-4 .auto-inner").css("min-height", imgh);
//品牌介绍		
$(".css-18-1 > ul li").each(function(){
	var aa=$(this).find(".info").height();
	var bb=$(this).find(".pic").height();
	if(bb>aa){
		var c=(bb-aa)/2
		$(this).find(".info").css("padding-top",c);
	}
});

    }
	
	function b(){
		var w=$(window).width()
		if(w>1025){
			$(".css-18-2 li:odd").each(function(){
				$(this).find(".pic").insertAfter($(this).find(".info"));
			});
		}else{
			$(".css-18-2 li:odd").each(function(){
				$(this).find(".pic").insertBefore($(this).find(".info"));
			});	
		}
	}
	b();
	window.onload=function(){
		a();
	};
     
	fontsize()
    $(window).resize(function () { 
	a(); 
	fontsize(); 
	b();
	})
    $('.con-4 .slider').slick({
        slidesToShow: 3,
        arrows: false,
        responsive: [
            { breakpoint: 1024, settings: { slidesToShow: 1, dots: true } }
        ]
    });
    //发展历程
	$(".tab-list").each(function(){
		var e=$(this).index()+1;
		var a='.con-3 .slider-ul-'+e
		var b='.con-3 .slider-'+e
		//console.log(a)
$(a).slick({
  fade: true,
  asNavFor: b
});

	 $(b).slick({
        slidesToShow: 3,
		//centerMode: true,
		//autoplay:true,
        //initialSlide: 1,
       asNavFor: a,
        infinite: false,
        arrows: false,
        centerPadding:0,
		autoplaySpeed:4000,
        responsive: [
            { breakpoint: 1024, settings: { slidesToShow: 2 } },
            { breakpoint: 640, settings: { slidesToShow: 1 } }
        ]
    });		
		//end
	});

	
     $(".con-3 .tab li").click(function(){
		 var e=$(this).index();
		 $(this).addClass("on");
		 $(this).siblings().removeClass("on");
		 $(".slider-nav .tab-list").eq(e).addClass("show");
		 $(".slider-nav .tab-list").eq(e).siblings().removeClass("show");
	 });
     $(".con-3 .tab li").eq(0).click();

    //年份大小
    function fontsize() {
        var windowwidth = parseInt($(window).width());
        if (windowwidth <= 750) {
            var size = windowwidth * 358 / 750;
            $('.con-3 .slider-for li .name').css('font-size', size + 'px');
        }
        else {
            $('.con-3 .slider-for li .name').removeAttr('style');
        }
    };

    //end
}

//工程
function project() {
    $(".Current a").eq(1).hide();
    $(".Current i").eq(1).hide();
    //选择
    $(".project-select dl").each(function () {
        $(this).find("dt").click(function () {
            if ($(this).parent("dl").hasClass("on")) {
                $(this).parent("dl").removeClass("on");
                $(this).next("dd").hide();
            } else {
                $(this).parent("dl").addClass("on");
                $(this).next("dd").show();
            }
        });
        $(this).mouseleave(function () {
            $(this).removeClass("on");
            $(this).find("dd").hide();
        });
    });

    $("#quyu dd li").each(function () {
        var e = $(this).find("ul").find("li").length
        if (e >= 1) {
            $(this).find("a").eq(0).attr("href", "javascript:void(0);");
            $(this).click(function () {
                $(this).parent("ul").parent("dd").hide();
                var n = $(this).find("a").eq(0).text()
                $("#quyu dt span").html(n);
                var ul = $(this).find("ul").html()
                $("#leixing dd ul").html(ul);
                $("#leixing dt span").text("请选择");
            });
        } else {
            $(this).find("ul").remove();
        }
    });
    //选中
    var a = lcid
    var b = pid
    if (a == b) {
        $("#quyu dd li").each(function () {
            var rel = $(this).attr("rel")
            if (rel == b) {
                var name = $(this).find("a").eq(0).text()
                $("#quyu dt span").text(name);
            }
        });
    } else {
        //console.log(1)
        $("#quyu dd li").each(function () {
            var rel = $(this).attr("rel")
            if (rel == b) {
                var name = $(this).find("a").eq(0).text()
                $("#quyu dt span").text(name);
                var html = $(this).find("ul").html()
                $("#leixing dd ul").html(html);
            }
        });
        //二级选中显示
        $("#leixing dd li").each(function () {
            var rel = $(this).attr("rel")
            if (rel == a) {
                var name = $(this).find("a").eq(0).text()
                $("#leixing dt span").text(name);
            }
        });
        //end
    }
}

function projectinfo() {
    $(".Current a,.Current i").hide();
    $(".Current a").eq(0).show();
    $(".Current a").eq(1).show();
    $(".Current i").eq(0).show();
    $(".Current i").eq(1).show();
    $('.project-info .pic .slider').slick({ autoplay: true });

    function a() {
        var ah = $(".project-info .pic-info .info .inner").height();
        var bh = $(".project-info .pic-info .pic").height()
        if (bh > ah) {
            var h = (bh - ah) / 2
            $(".project-info .pic-info .info").css({ "padding-top": h });//, "padding-bottom": h
        } else {
            $(".project-info .pic-info .info").css("padding", "5% 0");
        }
    }
    a();
    $(window).resize(function () { a(); })

    //工程应用产品
    $('.recom-prod .slider').slick({
        slidesToShow: 4,
        infinite: false,
        appendArrows: $(".recom-prod .main"),
        prevArrow: '<div class="slider-btn btn-1"><button type="button" data-role="none" class="slick-prev" aria-label="Previous" tabindex="0" role="button">Previous</button></div>',
        nextArrow: '<div class="slider-btn btn-2"><button type="button" data-role="none" class="slick-next" aria-label="Next" tabindex="0" role="button">Next</button></div>',
        responsive: [
            { breakpoint: 1200, settings: { slidesToShow: 3 } },
            { breakpoint: 1024, settings: { slidesToShow: 2 } },
            { breakpoint: 640, settings: { slidesToShow: 1 } }
        ]
    });
	
	if($(".recom-prod .main .slider li").length==0){
		$(".recom-prod").hide();
	}

    function btnarea() {
        var _this = $(".recom-prod")
        var btnh = _this.find("li").eq(0).find(".txt").outerHeight();
        var w = $(window).width();
        var thw = _this.outerWidth();
        var btnw = (w - thw) / 2
        _this.find(".slick-arrow").css({ "bottom": btnh, width: btnw });
        _this.find(".btn-1").css({ "left": -btnw });
        _this.find(".btn-2").css({ "right": -btnw });
    }
    btnarea();
    $(window).resize(function () { btnarea(); })
    //end
}

$(".buy dt").mouseDelay(false).hover(function () {
    $(this).find("figure").slideDown();
}, function () {
    $(this).find("figure").slideUp();
});

$(".ask dt").click(function () {
    $(this).next("dd").fadeToggle();
});
$(".ask").mouseleave(function () {
    //console.log(1)
    $(this).find("dd").fadeOut();
});

function news() {
    $(function () {
        $("img.lazy").lazyload({
            load: function () {
                puburesize();
                AOS.refresh();
            }
        });
    });
    $(window).resize(function () {
        puburesize()
    })
    //scroll
    //scroll()
    //end
}

function scroll() {
    var wh = $(window).height()
    $(window).scroll(function () {
        var dcom = $(document).scrollTop()
        $(".list-news li").each(function () {
            var st = $(this).offset().top
            if (dcom >= st - wh + 100) {
                $(this).addClass("active");
            }
        })
    });
}

function puburesize() {
    var w = $(window).width();
    if (w <= 1024) {
        if (w <= 480) {
            pubu(1)
        } else {
            pubu(2)
        }
    } else {
        pubu(3)
    }
}

function pubu(n) {
    console.log(1)
    $('.list-news ul').BlocksIt({
        numOfCol: n,
        offsetX: 0,
        offsetY: 0,
        blockElement: 'li'
    });
}

function video() {
    $('.list-video .slider').slick({
        slidesToShow: 3,
        appendArrows: $('.play-list'),
        //infinite: false,
        vertical: true,
        responsive: [
            { breakpoint: 1024, settings: { vertical: false, slidesToShow: 3 } },
            { breakpoint: 640, settings: { vertical: false, slidesToShow: 2 } }
        ]
    });
    $(".list-video .slider li").click(function () {
        var rel = $(this).attr("rel")
        $(".play-area .files").load(rel);
        $(this).removeClass("on").addClass("off");
        $(this).siblings().removeClass("off").addClass("on");
    });
    $(".list-video .slider li").eq(0).click();
	
	
	//视频弹窗
$(".column-video-list li").click(function(e) {
    var files=$(this).attr("rel");
	var tit=$(this).find(".txt aside").text();
	$(".video-box").remove();
	$('body').append("<div class='video-box'><div class='close'></div><section class='ytable'><section class='ytable-cell'><div class='title'><aside class='dot'>"+tit+"</aside></div><div class='files'></div></section></section></div>");
	$(".video-box .files").load(files);
	videoclose()
});

function videoclose(){
  $(".video-box .close").click(function(e) {
     $(".video-box").remove();
});
}
	
}

function prod() {
    menu();
    var timer = null;
    var i = 0;
    $(window).resize(function () {
        i++
        //console.log("i的变化："+i)
        clearTimeout(timer);
        timer = setTimeout(function () {
            //console.log("显示加载i的最后一次："+i)
            menu();
        }, 1000)
    })
    function menu() {
        var _this = $("#nav-menu")
        var a = _this.find(".nav")
        _this.find(".more").find("dd").find("ul").find("li").appendTo(a.find("ul"))
        var lih = a.find("li").eq(0).outerHeight()
        var h = a.find("ul").height()
        if (h > lih) {
            _this.find(".more").show();
            a.addClass("has-more");
            $("#nav-menu .nav li").each(function () {
                var e = $(this).position().top
                if (e > 0) {
                    $(this).appendTo(_this.find(".more").find("dd").find("ul"))
                }
            })
        } else {
            _this.find(".more").hide();
            a.removeClass("has-more");
        }
    }
	
	$("#nav-menu .more dt").click(function(e) {
		$("#nav-menu .more dd").stop(true, true).fadeToggle();
			$(document).on("click", function() {
			   $("#nav-menu .more dd").stop(true, true).fadeOut();
			});
		    e.stopPropagation();
		});
	$("#nav-menu .more dd").on("click", function(e) {
	   e.stopPropagation();
	});
    //$("#nav-menu .more dt").click(function () {
    //    $(this).next("dd").stop(true, true).fadeToggle()
    //});
    //$("#nav-menu .more").mouseleave(function () {
    //    $(this).find("dd").stop(true, true).fadeOut()
    //});
}

//筛选
function filter() {
    a();
    $(window).resize(function () {
        a();
    });
    function a() {
        $(".fliter .item").each(function () {
            var h = $(this).find("dl").outerHeight()
            if (h > 30) {
                $(this).find(".more span").css("display", "block");
                $(this).find(".list").find(".inner").height(30);
            } else {
                $(this).find(".more span").hide();
                $(this).find(".list").find(".inner").height("auto");
            }
        });
    }
    $(".fliter .more span").click(function () {
        if ($(this).html() == '更多<i></i>') {
            $(this).html('收起<i></i>');
            $(this).addClass("close");
            $(this).parent().parent().find(".list").find(".inner").height("auto");
        } else {
            $(this).html('更多<i></i>');
            $(this).removeClass("close");
            $(this).parent().parent().find(".list").find(".inner").height(30);
        }
    });
}

function prodinfo() {
	 prod();
    $('.prod-info .left .slider').slick({ arrows: false, dots: true, autoPlay: true });
	
	if($(".prod-info .price dd.before a").length==0){
		$(".prod-info .price dd.before").hide();
		$(".prod-info .price dd.after").show();
	}
    function a() {
        var _this = $(".prod-info")
        var a = _this.find(".left").height()
        var b = _this.find(".right").find(".inner").outerHeight()
        if (a > b) {
            var c = (a - b) / 2
            _this.find(".right").css({ "padding-top": c, "padding-bottom": c });
        }
    }
    a();
    $(window).resize(function () {
        a();
    })
}

function search() {
	a();
	$(window).resize(function(){
		a();
	})
	function a(){
     var tsh=$(".top-search").outerHeight();
	 $(".news-body > .auto-inner").css("padding-top",tsh)		
	}
	//
	$(".result ul li").each(function(){
		var e=$(this).index()+1
		$(this).click(function(){
		$(this).addClass("on");
		$(this).siblings().removeClass("on");
		$(".list-result .box").hide();
		$("#box"+e).show();
	 });
		var num=$("#box"+e).find(".Pages .p_total b").text();
		if(num==''){
		$(this).find("span").text(0);	
		}else{
		$(this).find("span").text(num);	
		}
	});
	$(".result ul li").eq(0).click();
	//end
}


function singlepage(){
	//联系我们
	$(".contact_con .c_box").each(function(i){ 
      $(".contact_con .c_box").slice(i*2,i*2+2).wrapAll("<div class='box-item'></div>");
    });
hmax()
$(window).resize(function(){
  hmax()
});
function hmax() {
$(".contact_con .inner").removeAttr('style');
var h_max = 0;
$(".contact_con .inner").each(function(){
    var  h = $(this).innerHeight();
    h_max = h_max < h ? h : h_max;
})
$(".contact_con .inner").css('min-height',h_max);
}
//end
}

//-------------End-------------//
//整站无图处理
setTimeout(function () { nopic(); }, 1500);
function nopic() {
    jQuery.each(jQuery("img"), function (i, n) {
        jQuery(n).on('error', function () {
            n.src = nopicpath;
            $(this).addClass("nopic")
        });
        n.src = n.src;
    });
}


intAOS();
function intAOS() {
    // AOS配置
    AOS.init({
        offset: 200,
        duration: 1200,
        easing: 'ease',
        delay: 100,
        disable: 'mobile'
    });
}

$(window).resize(function () {
    AOS.refresh();
})
//头部选中
//$("#m"+m).addClass("aon");
