if(typeof(worker) == "undefined"){ $("body").addclass("iebody"); }else{ $("body").wrapinner("
"); var wow = new wow({ mobile: false, live: true }); wow.init(); aos.init({ disable: 'mobile', easing: 'ease-out-back', duration: 1000 }); } if($(window).width()<993){ $(".hmfocus video").remove(); } //导航 function webheader(){ if($(window).width() < 1199){ $(".mmmenulay dl").each(function(i) { var _this = $(this); if(_this.find("dd").length>0){ _this.find(".mtoggle").show(); } }); $(".mtoggle").click(function(e){ e.stoppropagation(); var _this2 = $(this); if(_this2.parents("dl").hasclass("on")){ _this2.parents("dl").removeclass("on"); _this2.removeclass("mtoggle2"); _this2.parents("dl").find(".mtoggle_a").removeclass("mtoggle2_a"); _this2.parents("dl").find(".mmenu_dd3").slideup(300); }else{ $(".mmmenulay dl").removeclass("on"); $(".mtoggle").removeclass("mtoggle2"); _this2.addclass("mtoggle2"); _this2.parents("dl").addclass("on"); $(".mtoggle_a").removeclass("mtoggle2_a"); $(".mmenu_dd3").slideup(300); } }); $(".mtoggle_a").click(function(event){ event.stoppropagation(); var _this3 = $(this); _this3.toggleclass("mtoggle2_a"); _this3.parents("dd").next(".mmenu_dd3").slidetoggle(300); }); $(".mopenbtn").click(function(e){ $(".mmenulaybg,.mmmenulay,.mclosebtn").addclass("on"); $("body").css("overflow","hidden"); }); $(".mclosebtn,.mmenulaybg").click(function(){ $(".mmenulaybg,.mmmenulay,.mclosebtn").removeclass("on"); $("body").css("overflow","inherit"); }); }else{ $(".subnav_box dl").each(function(i) { if($(this).find("dd").length<1){ $(this).find(".nav_btn").hide(); } }); $(".nav_btn").click(function(){ $(this).parents("dt").next("dd").slidetoggle(300); }); } } webheader(); settimeout(function(){$('.m2banner').addclass("on");},100); jquery(document).ready(function($) { if($(".tsheader").length){ $('body').waypoint(function(direction){if(direction==='down'){ $(".header").addclass("out"); settimeout(function(){ $(".header").removeclass("out"); $(".header").addclass("in"); $("body").removeclass("tsheadertop"); },500); }else{ $("body").addclass("tsheadertop"); $(".header").addclass("out"); settimeout(function(){ $(".header").removeclass("in"); },500); settimeout(function(){ $(".header").removeclass("out"); },100); }},{offset:"-10px" } ); } //banner /*index*/ //轮播图 if($(".hmfocus").length>0){ $('.hmfocus').slick({ autoplay: true, autoplayspeed: 5000, pauseonhover: false, dots: true, infinite: true, arrows:false, speed: 400, fade: true, cssease: 'linear', responsive: [ { breakpoint: 993, settings: { autoplay: true, autoplayspeed: 6000, } } ] }); $('.hmfocus').init(function(slick){ $('.hmfocus_item.slick-current').addclass('active').siblings().removeclass('active'); }) $('.hmfocus').on('afterchange',function(slick,currentslide){ $('.hmfocus_item.slick-current').addclass('active').siblings().removeclass('active'); }) /* var i=0, slidenum = $(".hmfocus_doc li").length, imgtime = 5000, videotime = 10000; var timer=""; var videoobj = document.getelementbyid("focusvideo"); function changefocus(){ if(i==0){ i++; videoobj.play(); cleartimeout(timer); timer = settimeout(function(){$('.hmfocus').slick('slickgoto', i);},videotime); }else{ videoobj.pause(); videoobj.currenttime = 0; i<(slidenum-1)?i++:i=0; cleartimeout(timer); timer = settimeout(function(){$('.hmfocus').slick('slickgoto', i);},imgtime); } } $('.hmfocus').init(function(slick){ $('.hmfocus_item.slick-current').addclass('active').siblings().removeclass('active'); $('.hmfs_docx').eq(0).addclass('on'); videoobj.play(); changefocus(); }) $('.hmfocus').on('afterchange',function(slick,currentslide){ $('.hmfocus_item.slick-current').addclass('active').siblings().removeclass('active'); $(".hmfs_docx").removeclass("on"); $('.hmfs_docx').eq($('.hmfocus').slick('slickcurrentslide')).addclass('on'); changefocus(); $(".index_section1 .prev,.index_section1 .next").removeclass("on"); }) //$('.hmfocus_doc li').css("width",(100/$('.hmfocus_doc li').size())+"%"); $('.hmfocus_doc li').click(function(){ $('.hmfocus').slick('slickgoto',$(this).index()); i = $(this).index(); $(".hmfs_docx").removeclass("on"); $(this).find('.hmfs_docx').addclass("on"); }); $(".index_section1 .prev").click(function(){ $('.hmfocus').slick('slickprev') }); $(".index_section1 .next").click(function(){ $('.hmfocus').slick('slicknext') }); if ($(window).width() / $(window).height() > 1.78) { $(".hmfocus video").css({ 'width': '110%', 'height': 'auto ' }); } else { $(".hmfocus video").css({ 'height': '110%', 'width': 'auto' }); }*/ } if($(".mv_swiper").length){ $(".mv_swiper").each(function(i) { $('.mv_swiper').eq(i).slick({ autoplay: true, arrows: true, dots:true, infinite: true, speed: 500, autoplayspeed: 5000, pauseonhover: true, touchthreshold:1000, draggable:false, slidestoshow: 2, responsive: [ { breakpoint: 767, settings: { arrows: false, dots:true, slidestoshow: 1, } } ] }); }); } if($(".kw_swiper").length){ $(".kw_swiper").each(function(i) { $('.kw_swiper').eq(i).slick({ autoplay: true, arrows: true, dots:false, infinite: true, speed: 500, autoplayspeed: 5000, pauseonhover: true, touchthreshold:1000, draggable:false, slidestoshow: 2, responsive: [ { breakpoint: 767, settings: { slidestoshow: 1, arrows: false, dots:true, } } ] }); }); } if($('.kw_page').length) { $('.kw_page').parallax('center', 0.35); } var tsw = $(window).width()*0.08; $('.his_page').waypoint(function(direction){if(direction==='down'){ $(window).scroll(function () { var anitop = $('.his_page').offset().top; ts = (1 - (anitop - $(window).scrolltop())/anitop * 500) + 20 ; if(ts <= -tsw){ts = -tsw} if(ts >= -0){ts = 0} ts2 = (1 - (anitop - $(window).scrolltop())/anitop * 500) + 20 ; if(ts2 <= -tsw){ts2 = -tsw} if(ts2 >= -0){ts2 = 0} $('.his_page i').eq(0).css("height",-ts2); $('.his_page i').eq(1).css("width",-ts); $('.his_page i').eq(2).css("width",-ts); }) }else{ }},{offset:"100%" } ); if($(".his_sw").length){ $('.his_sw').slick({ autoplay: true, arrows: false, dots:false, infinite: true, speed: 500, autoplayspeed: 5000, pauseonhover: true, touchthreshold:1000, fade: true, responsive: [ { breakpoint: 992, settings: { dots:true, } } ] }); $('.his_btna').click(function(){ $('.his_sw').slick('slickgoto',$('.his_btna').index(this)); $(".his_bg").removeclass("on"); $(".his_bg").eq($('.his_btna').index(this)).addclass("on"); }); } if($(".ygdls").length){ $('.ygdls').slick({ autoplay: true, arrows: true, dots:false, infinite: true, speed: 500, autoplayspeed: 5000, pauseonhover: true, touchthreshold:1000, slidestoshow: 3, responsive: [ { breakpoint: 992, settings: { slidestoshow: 2, } }, { breakpoint: 767, settings: { slidestoshow: 1, arrows:false, dots:true, } } ] }); } $('.cm_bmx strong span').length && $('.cm_bmx strong span').countup(); $('.tc_nums li strong span').length && $('.tc_nums li strong span').countup(); $('.hmc6ul li strong span').length && $('.hmc6ul li strong span').countup(); $('.hmc3code strong').length && $('.hmc3code strong').countup(); //$('.hmc3nums li strong span').length && $('.hmc3nums li strong span').countup(); if($(".zzry_sw").length){ var zzry_sw = new swiper('.zzry_sw .swiper-container', { effect: 'coverflow', grabcursor: true, centeredslides: true, slidesperview: 'auto', loop: true, nextbutton: '.zzryfun .next', /*autoplay: { delay: 15000, disableoninteraction: false, },*/ prevbutton: '.zzryfun .prev', pagination : '.zzry_spg', paginationtype : 'custom', paginationcustomrender: function (swiper, current, total) { return ""+ addprezero(current) +" / "+ addprezero(total) +""; }, coverflow: { rotate: 35, stretch: 0, depth: 80, modifier: 1.95, slideshadows : false }, ontransitionend: function(zzry_sw){ $(".zzry_ps p").removeclass("on"); $(".zzry_ps p").eq(zzry_sw.realindex).addclass("on"); } }); setinterval(function(){ $(".zzryfun .next").click(); },5000); } if($(".ywc3_c1txt").length){ $(".ywc3_c1txt").each(function(i) { var ywc3_c1txt = new swiper($(this).find(".swiper-container"), { nextbutton: $(this).find(".next"), prevbutton: $(this).find(".prev"), slidesperview: 1, paginationclickable: true, spacebetween: 0, loop: true, observer: true, observeparents: true, }); }); } if($(".yw3c1sw").length){ $('.yw3c1sw').slick({ autoplay: true, arrows: false, dots:false, infinite: true, speed: 500, autoplayspeed: 5000, pauseonhover: true, touchthreshold:1000, slidestoshow: 5, variablewidth: true, asnavfor: '.ywc3bsw', focusonselect: true, /*centermode: true, centerpadding: '0px',*/ responsive: [ { breakpoint: 992, settings: { } } ] }); $('.ywc3bsw').slick({ autoplay: true, arrows: false, dots:false, infinite: true, speed: 500, autoplayspeed: 5000, pauseonhover: true, touchthreshold:1000, asnavfor: '.yw3c1sw', fade: true, responsive: [ { breakpoint: 993, settings: { dots:true, } } ] }); } $('.yw3_bantag li p span').length && $('.yw3_bantag li p span').countup(); $('.yw3con1').waypoint(function(direction){if(direction==='down'){ $(".ywrmenu").fadeout(300); }else{ $(".ywrmenu").fadein(300); }},{offset:"50%" } ); if($(".ywc3_c2sw").length){ if($(".ywc3_c2sw dd").length == 2){ $(".ywc3_c2sw").append($(".ywc3_c2sw").html()); } $('.ywc3_c2sw').slick({ autoplay: true, arrows: true, dots:false, infinite: true, speed: 500, autoplayspeed: 5000, pauseonhover: true, touchthreshold:1000, slidestoshow: 2, responsive: [ { breakpoint: 992, settings: { dots: true, slidestoshow: 1, } } ] }); } if($(".bus_c2sw").length){ $('.bus_c2sw').slick({ autoplay: false, arrows: false, dots:false, infinite: false, speed: 500, autoplayspeed: 5000, pauseonhover: true, touchthreshold:1000, fade: true, responsive: [ { breakpoint: 992, settings: { } } ] }); $('.bus_c2sw').init(function(slick){ $('.bus_c2sw .slick-current').addclass('on').siblings().removeclass('on'); $('.bus_c2nums li strong span').length && $('.bus_c2nums li strong span').countup(); }) $('.bus_c2sw').on('afterchange',function(slick,currentslide){ $('.bus_c2sw .slick-current').addclass('on').siblings().removeclass('on'); $('.bus_c2nums li strong span').length && $('.bus_c2nums li strong span').countup(); }) $('.bus_c2btn').hover(function(){ $('.bus_c2sw').slick('slickgoto',$('.bus_c2btn').index(this)); $(this).addclass("on").siblings(".bus_c2btn").removeclass("on") }); } $(".bus_c3tab a").hover(function(){ $(this).addclass("on").siblings("a").removeclass("on"); $(".bus_c3item").removeclass("on"); $(".bus_c3item").eq($(".bus_c3tab a").index(this)).addclass("on"); }); if($(".hmc5sw").length){ $('.hmc5sw').slick({ autoplay: false, arrows: false, dots:false, infinite: false, speed: 200, autoplayspeed: 5000, pauseonhover: true, touchthreshold:1000, asnavfor: '.hmc5bgs', fade: true, responsive: [ { breakpoint: 992, settings: { dots:true, } } ] }); $(".hmc5_bg").height($(".hmc5bgs").height()); $('.hmc5bgs').slick({ autoplay: false, arrows: false, dots:false, infinite: true, speed: 500, autoplayspeed: 5000, pauseonhover: true, touchthreshold:1000, asnavfor: '.hmc5sw', fade: true, }); $('.hmc5sw').init(function(slick){ $('.hmc5sw .slick-current').addclass('on').siblings().removeclass('on'); }) $('.hmc5sw').on('afterchange',function(slick,currentslide){ $('.hmc5sw .slick-current').addclass('on').siblings().removeclass('on'); $(".hmc5_bg").removeclass("on"); $(".hmc5_bg").eq($('.hmc5sw').slick('slickcurrentslide')).addclass("on"); $('.yw3_bantag li p span').length && $('.yw3_bantag li p span').countup(); }) $('.hmc5rma').click(function(){ $('.hmc5sw').slick('slickgoto',$('.hmc5rma').index(this)); $(this).addclass("on").siblings(".hmc5rma").removeclass("on") }); } if($(".tc_c2sw").length){ $(".tc_c2fun span.num2").text(addprezero($(".tc_c2sw dd").length)); $('.tc_c2sw').slick({ autoplay: true, arrows: false, dots:false, infinite: true, speed: 500, autoplayspeed: 5000, pauseonhover: true, touchthreshold:1000, slidestoshow: 5, centermode: true, centerpadding: '0px', variablewidth: true, responsive: [ { breakpoint: 992, settings: { } } ] }); $('.tc_c2sw').on('afterchange',function(slick,currentslide){ $(".tc_c2fun span.num1").text(addprezero($('.tc_c2sw').slick('slickcurrentslide')+1)); }) $('.tc_c2fun .prev').click(function(){ $('.tc_c2sw').slick('slickprev') }) $('.tc_c2fun .next').click(function(){ $('.tc_c2sw').slick('slicknext'); }); } if($(".tc_c3swiper").length){ var tc_c3swiper = new swiper('.tc_c3swiper .swiper-container', { autoplay : 3000, loop : true, effect: 'coverflow', grabcursor: true, centeredslides: true, nextbutton: '.tc_c3swiper .next', prevbutton: '.tc_c3swiper .prev', slidesperview: 'auto', coverflow: { rotate: 0, stretch: 30, depth: 150, modifier:2, slideshadows : false } }); } $(".tc_c4tab a").hover(function(){ $(this).addclass("on").siblings("a").removeclass("on"); $(".tc_c4item").removeclass("on"); $(".tc_c4item").eq($(".tc_c4tab a").index(this)).addclass("on"); }); if($(".tc_c4swiper_1").length){ var tc_c4swiper_1 = new swiper('.tc_c4swiper_1 .swiper-container', { autoplay : 3000, loop : true, effect: 'coverflow', grabcursor: true, centeredslides: true, nextbutton: '.tc_c4swiper_1 .next', prevbutton: '.tc_c4swiper_1 .prev', slidesperview: 'auto', coverflow: { rotate: 0, stretch: 10, depth: 100, modifier:1.7, slideshadows : false } }); var tc_c4swiper_2 = new swiper('.tc_c4swiper_2 .swiper-container', { autoplay : 3000, loop : true, effect: 'coverflow', grabcursor: true, centeredslides: true, nextbutton: '.tc_c4swiper_2 .next', prevbutton: '.tc_c4swiper_2 .prev', slidesperview: 'auto', coverflow: { rotate: 0, stretch: 10, depth: 100, modifier:1.7, slideshadows : false } }); } $(".hmc3changex a").hover(function(){ $(this).addclass("on").siblings("a").removeclass("on"); $(".hmc3map_item").removeclass("on"); $(".hmc3map_item").eq($(".hmc3changex a").index(this)).addclass("on"); }) if($(".hmcon2wpr").length){ s1init(); function s1init() { window.onload = function () { var skr = skrollr.init({ forceheight: false, smoothscrollingduration: 500 }); } var sticky = new sticky('.hmcon2'); settimeout(function () { $(".hmc2logo").show(); }, 100); $(window).resize(function () { $(".hmc2logo").hide(); settimeout(function () { $(".hmc2logo").show(); }, 100); }) } } $('.hmcon2wpr').waypoint(function(direction){if(direction==='down'){ $(".hmc2_bmx").addclass("out"); }else{ $(".hmc2_bmx").removeclass("out"); }},{offset:"-20%" } ); $('.hmcon2wpr_b').waypoint(function(direction){if(direction==='down'){ settimeout(function(){$('.hmc3nums li strong span').length && $('.hmc3nums li strong span').countup();},1000); }else{ }},{offset:"-50%" } ); if($(".hmc4dls").length && $(window).width()<767){ $('.hmc4dls').slick({ autoplay: true, arrows: false, dots:true, infinite: true, speed: 500, autoplayspeed: 5000, pauseonhover: true, touchthreshold:1000, }); } $(".backtop").click(function(){$("body,html").animate({"scrolltop":0},500);}); //搜素 $(".serbtn").click(function(){ $(".serbg,.serlayer").fadein(500); $(".serclose").removeclass("on"); }); $(".serclose").click(function(){ $(".serbg,.serlayer").fadeout(500); $(".serclose").addclass("on"); }); }); //视频播放 //mvbtn data-mvsrc="video/video.mp4" if($(".mvbtn").length){ $("body").append("
"); } $("body").on('click','.mvbtn', function(){ $(".mvbox").attr("src",$(this).attr("data-mvsrc")); $(".mvlaybg,.mvclose,.mvbox").fadein(600); document.getelementbyid("mvplayer").play(); }); $("body").on('click','.mvclose', function(){ $(".mvlaybg,.mvclose,.mvbox").fadeout(600); document.getelementbyid("mvplayer").pause(); }); $("body").on('click','.mvlaybg', function(){ $(".mvlaybg,.mvclose,.mvbox").fadeout(600); document.getelementbyid("mvplayer").pause(); }); //自定义函数 function autoh(classname){ var maxh = 0; $(classname).each(function() { var cuth = $(this).innerheight(); if(cuth>maxh){ maxh = cuth; } }); $(classname).innerheight(maxh); } function autow(classname){ var maxw = 0; $(classname).each(function() { var cutw = $(this).innerwidth(); if(cutw>maxw){ maxw = cutw; } }); $(classname).innerwidth(maxw); } function addprezero(num){ if(num<10){ var t = (num+'').length, s = ''; for(var i=0; i<2-t; i++){ s += '0'; } return s+num; }else{ return num; } } //屏蔽页面错误 window.onerror = function(){ return true; }