var $w = $(window), $d = $(document), $b = $('body', $d), ww = $w.width(); $(window).resize(function() { ww = $w.width(); }); $(function() { if (!$.fn.lazyload) return; $(".lazy", $b).lazyload({ effect: "fadein", threshold: 400, failure_limit: 0 }); }); // $w.resize(function() { // location.reload(); // }); $(function() { if ($w.width() > 992) { if (!(/msie [6|7|8|9]/i.test(navigator.useragent))) { new wow().init(); }; } }); $(function() { $('.header .pc-search .search-button').click(function() { $('.header .pc-search form').slidedown(); }); $('.header .pc-search .close-search').click(function() { $('.header .pc-search form').slideup(); }); }); $(function() { $('.counter').countup(); }); $(".header .nav .nav-list1 > li").click(function() { if ($w.width() < 1200) { var par = $(this); if (par.hasclass('on')) { $(".header .nav .nav-list1 > li").addclass("on").children('.nav-list2').slideup(); par.children('.nav-list2').slidedown(); par.removeclass("on").addclass("current").siblings().removeclass('current'); } else { par.children('.nav-list2').slideup(); par.addclass("on").removeclass("current"); } } }); $(function() { if (ww < 1200) return; $(".header .nav .nav-list1 > li").on("mouseenter", function() { $(this).children(".nav-list2").stop().slidedown(200); }).on("mouseleave", function() { $(this).children(".nav-list2").stop().slideup(200); }); }); $(function() { $('.header .nav .nav-list1 .nav-list2 .nav-sort ul li').mouseover(function() { var liindex = $('.header .nav .nav-list1 .nav-list2 .nav-sort ul li').index(this); $(this).addclass('active').siblings().removeclass('active'); $('.header .nav .nav-list1 .nav-list2 .nav-list').eq(liindex).show().siblings('.header .nav .nav-list1 .nav-list2 .nav-list').hide(); }); }); $(".header .nav .nav-list2 li a").click(function() { if ($w.width() < 1200) { $(".nav-collapse").removeclass("active"); $(".nav").removeclass("fade-out"); $(".nav").hide(); } }); $(function() { $(window).on("scroll", function() { var t = document.documentelement.scrolltop || document.body.scrolltop; if ($w.width() > 0) { if (t >= 100) { $(".header").addclass("fixed-header"); } else { $(".header").removeclass("fixed-header"); } } }) }); $(function() { var oset; $(".nav-collapse").click(function(e) { $(".nav-collapse").toggleclass("active"); $(".nav").stop().fadetoggle().toggleclass("fade-out"); if (!$(this).hasclass("active")) { $(".nav").hide(); } else { } }); }); (function($) { var pluginname = 'fullbanner', defaults = { imgw: 1920, imgh: 960, removeheader: true, headerel: ".header-box", }; $.fn[pluginname] = function(options) { var settings = $.extend({}, defaults, options); var $this = $(this), item = $this.find(".item"), imgs = $this.find(".img img"), w = $(window), header = null, headerh = 0, winw = w.width(), winh = w.height(), banw = function() { return winw; }, banh = function() { return winh - headerh; }; function cal() { if (settings.removeheader) { header = $(settings.headerel); if (header) { headerh = header.height(); } }; $this.css("margintop", headerh); item.height(banh()); if (settings.imgw / settings.imgh >= banw() / banh()) { imgs.css({ "height": banh(), "width": banh() / (settings.imgh / settings.imgw), "marginleft": -(banh() / (settings.imgh / settings.imgw)) / 2, "margintop": -banh() / 2 }) } else { imgs.css({ "height": banw() / (settings.imgw / settings.imgh), "width": banw(), "marginleft": -banw() / 2, "margintop": -(banw() / (settings.imgw / settings.imgh)) / 2 }) } } cal(); var oset = null; w.on("resize", function() { cleartimeout(oset); oset = settimeout(function() { winw = w.width(); winh = w.height(); cal(); }, 300); }); $this.on("refresh", function() { cal(); }); } })(jquery); $(function() { if (!$.fn.slick) return; var banner = $('.slick-banner'); $('.slick-banner').slick({ autoplay: false, autoplayspeed: 6000, centermode: true, centerpadding: '0px', arrows: true, fade: true, dots: true, speed: 800, cssease: 'ease', slidestoshow: 1, slidestoscroll: 1, focusonselect: true, touchthreshold: 300, infinite: true, swipetoslide: true, lazyload: 'ondemand', variablewidth: false, adaptiveheight: false, rows: 1, slidesperrow: 1, pauseonhover: false, responsive: [{ breakpoint: 480, settings: { dots: true, } }], }); if (ww < 1200) return; banner.fullbanner({ removeheader: false, imgw: 1920, imgh: 960, }); }); $(function() { if (!$.fn.slick) return; var sliderfor = $('.product-slide'); var slidernav = $('.product-thumbs'); sliderfor.slick({ autoplay: true, autoplayspeed: 4000, slidestoshow: 1, slidestoscroll: 1, arrows: false, fade: true, infinite: true, centermode: false, touchthreshold: 300, asnavfor: '.product-thumbs' }); slidernav.slick({ autoplay: true, autoplayspeed: 4000, slidestoshow:4, slidestoscroll: 1, infinite: true, centermode: false, centerpadding: '0px', asnavfor: '.product-slide', dots: false, arrows: true, touchthreshold: 300, focusonselect: true, responsive: [{ breakpoint: 1200, settings: { slidestoshow: 3, slidestoscroll: 1, } }, { breakpoint: 992, settings: { slidestoshow: 2, slidestoscroll: 1, } }, { breakpoint: 480, settings: { slidestoshow: 2, slidestoscroll: 1, } } ], }); if (slidernav.slick('slickgetoption', 'slidestoshow') >= slidernav.find(".slick-slide").length) { slidernav.slick('slicksetoption', 'centermode', false); slidernav.find(".slick-track").addclass("transform-0"); }; }); $(function() { if (!$.fn.slick) return; $('.cases-scroll').slick({ autoplay: true, autoplayspeed: 3000, arrows: true, fade: false, dots: false, speed: 700, cssease: 'ease', slidestoshow:2, slidestoscroll: 1, focusonselect: false, touchthreshold: 300, infinite: true, lazyload: 'ondemand', variablewidth: false, adaptiveheight: false, rows:1, slidesperrow: 1, pauseonhover: true, responsive: [{ breakpoint: 1200, settings: { slidestoshow: 2, slidestoscroll: 1, } }, { breakpoint: 992, settings: { slidestoshow: 2, slidestoscroll: 1, } }, { breakpoint: 480, settings: { slidestoshow: 1, slidestoscroll: 1, } } ], }); }); $(function() { if (!$.fn.slick) return; $('.news-scroll').slick({ autoplay: true, autoplayspeed: 3000, arrows: false, fade: false, dots: true, speed: 700, cssease: 'ease', slidestoshow:2, slidestoscroll: 1, focusonselect: false, touchthreshold: 300, infinite: true, lazyload: 'ondemand', variablewidth: false, adaptiveheight: false, rows:1, slidesperrow: 1, pauseonhover: false, vertical:true }); }); $(function() { if (!$.fn.slick) return; $('.ability-scroll').slick({ autoplay: true, autoplayspeed: 3000, arrows: true, fade: false, dots: false, speed: 700, cssease: 'ease', slidestoshow:4, slidestoscroll: 1, focusonselect: false, touchthreshold: 300, infinite: true, lazyload: 'ondemand', variablewidth: false, adaptiveheight: false, rows:1, slidesperrow: 1, pauseonhover: false, responsive: [{ breakpoint: 1200, settings: { slidestoshow: 3, slidestoscroll: 1, } }, { breakpoint: 992, settings: { slidestoshow: 3, slidestoscroll: 1, } }, { breakpoint: 480, settings: { slidestoshow: 2, slidestoscroll: 1, } } ], }); }); $(function() { if (!$.fn.slick) return; var historyfor = $('.history-list-scroll'); var historynav = $('.history-year-scroll'); historyfor.slick({ autoplay: false, slidestoshow: 1, slidestoscroll: 1, arrows: false, fade: true, infinite: true, centermode: false, touchthreshold: 300, asnavfor: '.history-year-scroll' }); historynav.slick({ autoplay: false, slidestoshow:5, slidestoscroll: 1, infinite: true, centermode: true, centerpadding: '0px', asnavfor: '.history-list-scroll', dots: false, arrows: true, touchthreshold: 300, focusonselect: true, responsive: [{ breakpoint: 1200, settings: { slidestoshow: 4, slidestoscroll: 1, } }, { breakpoint: 992, settings: { slidestoshow:3, slidestoscroll: 1, } }, { breakpoint: 480, settings: { slidestoshow: 3, slidestoscroll: 1, } } ], }); if (historynav.slick('slickgetoption', 'slidestoshow') >= historynav.find(".slick-slide").length) { historynav.slick('slicksetoption', 'centermode', false); historynav.find(".slick-track").addclass("transform-0"); }; }); $(function() { if (!$.fn.slick) return; $('.certificate-scroll').slick({ autoplay: true, autoplayspeed: 3000, arrows: true, fade: false, dots: false, speed: 700, cssease: 'ease', slidestoshow:4, slidestoscroll: 1, focusonselect: false, touchthreshold: 300, infinite: true, lazyload: 'ondemand', variablewidth: false, adaptiveheight: false, rows:1, slidesperrow: 1, pauseonhover: false, responsive: [{ breakpoint: 1200, settings: { slidestoshow: 3, slidestoscroll: 1, } }, { breakpoint: 992, settings: { slidestoshow: 3, slidestoscroll: 1, } }, { breakpoint: 480, settings: { slidestoshow: 2, slidestoscroll: 1, } } ], }); }); $(function() { if (!$.fn.slick) return; $('.certificate-scroll1').slick({ autoplay: true, autoplayspeed: 4000, arrows: true, fade: false, dots: false, speed: 600, cssease: 'ease', slidestoshow:4, slidestoscroll: 1, focusonselect: false, touchthreshold: 300, infinite: true, lazyload: 'ondemand', variablewidth: false, adaptiveheight: false, rows:1, slidesperrow: 1, pauseonhover: false, responsive: [{ breakpoint: 1200, settings: { slidestoshow: 3, slidestoscroll: 1, } }, { breakpoint: 992, settings: { slidestoshow: 3, slidestoscroll: 1, } }, { breakpoint: 480, settings: { slidestoshow: 2, slidestoscroll: 1, } } ], }); }); $(function() { if (!$.fn.slick) return; $('.certificate-scroll2').slick({ autoplay: true, autoplayspeed: 5000, arrows: true, fade: false, dots: false, speed: 800, cssease: 'ease', slidestoshow:4, slidestoscroll: 1, focusonselect: false, touchthreshold: 300, infinite: true, lazyload: 'ondemand', variablewidth: false, adaptiveheight: false, rows:1, slidesperrow: 1, pauseonhover: false, responsive: [{ breakpoint: 1200, settings: { slidestoshow: 3, slidestoscroll: 1, } }, { breakpoint: 992, settings: { slidestoshow: 3, slidestoscroll: 1, } }, { breakpoint: 480, settings: { slidestoshow: 2, slidestoscroll: 1, } } ], }); }); $(function() { if (!$.fn.slick) return; $('.product-scroll').slick({ autoplay: true, autoplayspeed: 3000, arrows: true, fade: false, dots: false, speed: 1000, cssease: 'ease', slidestoshow:1, slidestoscroll: 1, focusonselect: false, touchthreshold: 300, infinite: true, lazyload: 'ondemand', variablewidth: false, adaptiveheight: false, rows:1, slidesperrow: 1, pauseonhover: false, }); }); $(function() { if (!$.fn.slick) return; $('.products-show-scroll').slick({ autoplay: true, autoplayspeed: 3000, arrows: true, fade: false, dots: false, speed: 700, cssease: 'ease', slidestoshow:1, slidestoscroll: 1, focusonselect: false, touchthreshold: 300, infinite: true, lazyload: 'ondemand', variablewidth: false, adaptiveheight: false, rows:1, slidesperrow: 1, pauseonhover: false, }); }); if (ww > 992) { $(document).ready(function () { $('.zoom').zoom(); }); } $(".smooth").click(function() { var href = $(this).attr("href"); var pos = $(href).offset().top - 30; $("html,body").animate({ scrolltop: pos }, 500); return false; }); $.fn.extend({ 'sameh': function(autoel, resize) { var lis = this.find(autoel), num = 0, oset = null; settimeout(autoh, 500); $(window).on("load resize", function() { cleartimeout(oset); oset = settimeout(autoh, 50); }); function autoh() { if (ww > resize) { lis.css("height", "auto"); num = 0; lis.each(function() { num = math.max(num, $(this).height()); }); lis.height(num); } else { lis.height("auto"); } }; } }); $(function() { $(".inner-about .about-right").sameh(".item", 220); $(".inner-anzhuang-location .anzhuang-location .list").sameh(".subject", 220); if ($w.width() > 767) { $(".inner-culture .culture").sameh(".subject", 220); $(".home-choose .choose").sameh(".subject", 220); $(".inner-anzhuang .anzhuang .list").sameh(".subject", 220); } }); $(function() { $('.header .nav .nav-list1 .nav-products-list2 .nav-info .nav-left .nav-sort > li').mouseover(function() { var liindex = $('.header .nav .nav-list1 .nav-products-list2 .nav-info .nav-left .nav-sort > li').index(this); $(this).addclass('active').siblings().removeclass('active'); $('.header .nav .nav-list1 .nav-products-list2 .nav-img').eq(liindex).show().siblings('.header .nav .nav-list1 .nav-products-list2 .nav-img').hide(); }); }); $(function() { $('.header .pc-search .search-button').click(function() { $('.header .pc-search').toggleclass('searchactive'); }); }); $(".home-category .category .subject .content").hover(function(){ $(this).children(".img").parallax('enable'); },function(){ $(this).children(".img").parallax('disable'); }); $(function() { window.onload = function () { var s = skrollr.init({ smoothscrolling: true, }); } }); $(function() { $("#gotop,.backtop").click(function() { $("html,body").animate({ scrolltop: 0 }, 500) }) }); $(function () { var $sticky = $('.menu'); $sticky.hcsticky({ stickto: '.inner .row', top: $('.header').outerheight(true) , responsive: { 1200: { disable: true, }, }, }); }); $(function() { $('.details .details-sort li').click(function() { var liindex = $('.details .details-sort li').index(this); $(this).addclass('active').siblings().removeclass('active'); $('.details-list').eq(liindex).show().siblings('.details-list').hide(); }).eq(0).click(); }); $(function() { $('.inner-technical .technical-sort li').click(function() { var liindex = $('.inner-technical .technical-sort li').index(this); $(this).addclass('active').siblings().removeclass('active'); $('.technical-info').eq(liindex).show().siblings('.technical-info').hide(); }).eq(0).click(); }); $(function() { var tags = $(".header .nav .nav-list1 > li").length; for (var i = 0; i <= tags; i++) { var tags1 = $(".header .nav .nav-list1 > li").eq(i).find("li").length; if (tags1 > 0) { $(".header .nav .nav-list1 > li").eq(i).addclass("more"); $(".header .nav .nav-list1 > li").eq(i).append("
"); } } }); $(function() { $('.inner-certificate .certificate-sort li').click(function() { var liindex = $('.inner-certificate .certificate-sort li').index(this); $(this).addclass('active').siblings().removeclass('active'); $('.certificate-list').eq(liindex).show().siblings('.certificate-list').hide(); $('.certificate-scroll')[liindex].slick.refresh(); }).eq(0).click(); });