$(function () { var winW = $(window).width(); if ($('.e-module-202403261417').length > 0) { function module202403261417Fun($target) { var module202403261417Obj = { init: function () { this.win = $(window); this.bannerObj = $target; this.bannerText = this.bannerObj.find('.text'); this.resizeInit(); this.addVideoLink(this.bannerObj.find('>.e-lazy')); this.resizeEvent(); }, resizeInit: function () { this.winw = this.win.width(); }, addVideoLink: function (bgObj) { if (bgObj.data('src') != undefined && bgObj.data('src') != '' && this.winw > 1200) { if (bgObj.find('.video').length == 0) { bgObj.append( "" ); } var videoObj = bgObj.find('.video'); if (videoObj.attr("src") != bgObj.data('src')) { videoObj.attr("src", bgObj.data('src')); } } else { bgObj.find('.video').remove(); } }, setTextTime: function () { if (this.winw > 1200) { var videoObj = $(".e-module-202403261417 .video")[0]; var videoCurrentTime = 0; var loopStart = 5; var loopEnd = 11; var aaa = setInterval(function () { function getOneDecimalPlace(num) { return Math.floor(num * 10) / 10; } videoCurrentTime = getOneDecimalPlace(videoObj.currentTime); if (videoCurrentTime == loopEnd) { videoObj.currentTime = loopStart; } if (videoCurrentTime == loopStart - 1.1) { $(".e-module-202403261417").addClass("animate-v2"); } }, 100); } }, resizeEvent: function () { var _this = this; var resizeWinw = 0; var resizeTimer = ''; this.win.on('resize', function () { var winw = _this.win.width(); if (winw != resizeWinw) { currentWinw = winw; if (resizeTimer) { clearTimeout(resizeTimer); } resizeTimer = setTimeout(function () { _this.resizeInit(); _this.addVideoLink(_this.bannerObj.find('>.e-lazy')); }, 200) } }) } } module202403261417Obj.init(); } $('.e-module-202403261417').each(function () { var _this = $(this); if (_this.data('init')) { return; } _this.data('init', true); module202403261417Fun($(this)); }) }; if ($('.e-module-202502281611').length > 0) { function module202502281611Fun($target) { var module202502281611Obj = { init: function () { this.win = $(window); this.moduleObj = $target; this.moduleWrapperObj = this.moduleObj.find(".swiper-wrapper"); this.moduleSlideObj = this.moduleObj.find(".swiper-slide"); this.resizeInit(); this.lazyPicLink(); this.judgmentSwiper(); this.scrollEvent(); this.resizeEvent(); }, resizeInit: function () { this.winw = this.win.width(); this.winh = this.win.height(); this.scrollTop = this.win.scrollTop(); this.moduleTop = this.moduleObj.offset().top; }, judgmentSwiper: function () { if (this.moduleSlideObj.length > 1) { if (this.moduleObj.data("swiper-init")) { return; }; this.moduleObj.data("swiper-init", true); this.initSwiper(); } else if (this.moduleSlideObj.length == 1) { $target.find(".swiper-button").css({ "display": "none" }); $target.find('.img').addClass('img-len1'); }; }, lazyPicLink: function () { if (this.scrollTop + this.winh * 1.5 > this.moduleTop) { this.moduleSlideObj = this.moduleObj.find('img'); this.moduleSlideObj.each(function () { var $this = $(this); var src = $this.attr("data-original"); if ($this.attr("src") != src) { $this.attr("src", src); $this.parent(".e-lazy").addClass("over").css({ "height": "auto", "background": "none" }); }; }); }; }, initSwiper: function () { var _this = this; var slidesPerGroup = 1; var slideLength = _this.moduleObj.find(".swiper-slide").length; var mySwiper = new Swiper($target.find(".swiper"), { watchOverflow: true, spaceBetween: 40, slidesPerView: 1, slidesPerGroup: 1, autoplay: $target.data("auto-time") ? { delay: $target.data("auto-time"), stopOnLastSlide: false, disableOnInteraction: true } : false, loop: slideLength > 1 ? true : false, navigation: { nextEl: $target.find('.swiper-button-next'), prevEl: $target.find('.swiper-button-prev'), }, pagination: { el: $target.find('.swiper-pagination'), type: 'fraction', }, breakpoints: { 1200: { slidesPerView: 1, spaceBetween: 40, }, }, on: { init: function () { }, resize: function () { var This = this; setTimeout(function () { This.params.slidesPerGroup = 1; This.update(); }, 150) }, }, }); }, scrollEvent: function () { var _this = this; _this.win.on('scroll.202502281611', function () { _this.scrollTop = _this.win.scrollTop(); _this.moduleTop = _this.moduleObj.offset().top; _this.lazyPicLink(); }); }, resizeEvent: function () { var _this = this; var resizeWinw = 0; var resizeTimer = ''; this.win.on('resize.202502281611', function () { var winw = _this.win.width(); if (winw != resizeWinw) { currentWinw = winw; if (resizeTimer) { clearTimeout(resizeTimer); }; resizeTimer = setTimeout(function () { _this.resizeInit(); _this.judgmentSwiper(); _this.scrollEvent(); }, 100); }; }); }, }; module202502281611Obj.init(); }; $('.e-module-202502281611').each(function () { var _this = $(this); if (_this.data('init')) { return; }; _this.data('init', true); module202502281611Fun($(this)); }); }; if ($('.e-module-202409041335').length > 0) { function module202409041335Fun($target) { var module202409041335Obj = { init: function () { this.win = $(window); this.moduleObj = $target; this.moduleWrapperObj = this.moduleObj.find(".swiper-wrapper"); this.moduleSlideObj = this.moduleObj.find(".swiper-slide"); this.resizeInit(); this.judgmentSwiper(); this.scrollEvent(); this.resizeEvent(); this.lazyPicLink(); }, resizeInit: function () { this.winw = this.win.width(); this.winh = this.win.height(); this.scrollTop = this.win.scrollTop(); this.moduleTop = this.moduleObj.offset().top; }, judgmentSwiper: function () { if (this.moduleSlideObj.length > 1) { if (this.moduleObj.data("swiper-init")) { return; }; this.moduleObj.data("swiper-init", true); this.initSwiper(); } }, lazyPicLink: function () { if (this.scrollTop + this.winh * 1.5 > this.moduleTop) { this.moduleSlideObj = this.moduleObj.find(".swiper-slide"); this.moduleSlideObj.each(function () { var $this = $(this); var imgObj = $this.find('img'); var src = imgObj.attr("data-original"); if (imgObj.attr("src") != src) { imgObj.attr("src", src); }; }); }; }, initSwiper: function () { var _this = this; var slidesPerGroup = 2; if (_this.winw > 992) { slidesPerGroup = 4; } var slideLength = $target.find(".swiper-slide").length; var mySwiper = new Swiper($target.find(".swiper"), { watchOverflow: true, spaceBetween: 20, slidesPerView: 2, resistanceRatiao: 1, slidesPerGroup: slidesPerGroup, autoplay: $target.data("auto-time") ? { delay: $target.data("auto-time"), stopOnLastSlide: false, disableOnInteraction: true } : false, loop: slideLength > 2 ? true : false, noSwiping: slideLength > 1 ? false : true, pagination: { el: $target.find('.swiper-pagination'), clickable: true, }, breakpoints: { 1200: { slidesPerView: 4, spaceBetween: 40, loop: slideLength > 4 ? true : false, }, 992: { slidesPerView: 4, spaceBetween: 20, loop: slideLength > 4 ? true : false, }, }, on: { init: function () { if (_this.winw > 992) { if (_this.moduleSlideObj.length < 5) { $target.find('.swiper-button').hide(); $target.find('.swiper-wrapper').css('justify-content', 'space-around'); if (_this.winw > 992 && _this.winw < 1200) { $target.find('.swiper-pagination').hide(); }; }; } else { if (_this.moduleSlideObj.length < 3) { $target.find('.swiper-pagination').hide(); }; }; }, resize: function () { var This = this; setTimeout(function () { if (_this.winw > 992) { slidesPerGroup = 4; } else { slidesPerGroup = 2; } This.emit('init'); This.update(); }, 150); }, }, }); mySwiper.el.onmouseover = function () { mySwiper.autoplay.stop(); }; mySwiper.el.onmouseout = function () { mySwiper.autoplay.start(); }; }, scrollEvent: function () { var _this = this; _this.win.on('scroll.202409041335', function () { _this.scrollTop = _this.win.scrollTop(); _this.moduleTop = _this.moduleObj.offset().top; _this.lazyPicLink(); }); }, resizeEvent: function () { var _this = this; var resizeWinw = 0; var resizeTimer = ''; this.win.on('resize.202409041335', function () { var winw = _this.win.width(); if (winw != resizeWinw) { currentWinw = winw; if (resizeTimer) { clearTimeout(resizeTimer); }; resizeTimer = setTimeout(function () { _this.resizeInit(); _this.judgmentSwiper(); _this.scrollEvent(); }, 100); }; }); }, }; module202409041335Obj.init(); }; $('.e-module-202409041335').each(function () { var _this = $(this); if (_this.data('init')) { return; }; _this.data('init', true); module202409041335Fun($(this)); }); }; $(".e-module-202403261452 .con").hover(function () { var _this = $(this); if ($(window).width() > 1200) { if (_this.find("video").length == 0) { var videoStr = ""; _this.find(".video-box").append(videoStr); } else { _this.find("video")[0].play(); _this.find(".icon").css("zIndex", 1); } } }, function () { var _this = $(this); if (_this.find("video").length > 0) { _this.find("video")[0].pause(); _this.find(".icon").css("zIndex", 3); } }); if ($('.e-module-202210121324').length > 0) { function module202210121324Fun($target) { var module202210121324Obj = { init: function () { this.win = $(window); this.moduleObj = $target; this.rConObj = this.moduleObj.find(".r-box .r-con"); this.resizeInit(); this.lazyPicLink(); this.setHeight(); this.setVideo(); this.scrollEvent(); this.resizeEvent(); }, resizeInit: function () { this.winw = this.win.width(); this.winh = this.win.height(); this.scrollTop = this.win.scrollTop(); this.moduleTop = this.moduleObj.offset().top; }, setHeight: function () { this.rConObj.height("auto"); var maxH = 0; if (this.winw < 1200 && this.winw > 750) { this.rConObj.each(function () { var itemH = $(this).height(); if (itemH > maxH) { maxH = itemH; } }); this.rConObj.height(maxH); } }, setVideo: function () { if (this.moduleObj.hasClass('three')) { let modvideo = this.moduleObj.find(".row-pic .e-col-xl-4"); for (let i = 0; i < modvideo.length; i++) { if (modvideo.eq(i).find('.r-con .vedioplay').attr('data-url') == '') { modvideo.eq(i).find('.r-con').css('cursor', 'auto') } } } }, lazyPicLink: function () { if (this.scrollTop + this.winh * 1.5 > this.moduleTop) { this.moduleImgObj = this.moduleObj.find("img"); this.moduleImgObj.each(function () { var $this = $(this); var src = $this.attr("data-original"); if ($this.attr("src") != src) { $this.attr("src", src) } }) } }, scrollEvent: function () { var _this = this; _this.win.on('scroll.202210121324', function () { _this.scrollTop = _this.win.scrollTop(); _this.moduleTop = _this.moduleObj.offset().top; _this.lazyPicLink(); }); }, resizeEvent: function () { var _this = this; var resizeWinw = 0; var resizeTimer = ''; this.win.on('resize.202210121324', function () { var winw = _this.win.width(); if (winw != resizeWinw) { currentWinw = winw; if (resizeTimer) { clearTimeout(resizeTimer); } resizeTimer = setTimeout(function () { _this.resizeInit(); _this.lazyPicLink(); _this.setHeight(); _this.setVideo(); }, 100) } }) } }; module202210121324Obj.init(); } $('.e-module-202210121324').each(function () { var _this = $(this); if (_this.data('init')) { return; } _this.data('init', true); module202210121324Fun($(this)); }) } if ($('.e-module-202307310942').length > 0) { function module202307310942Fun($target) { var module202307310942Obj = { init: function () { this.win = $(window); this.moduleObj = $target; this.tabUl = this.moduleObj.find('.tab-head ul'); this.tabLi = this.moduleObj.find('.tab-head li'); this.conList = this.moduleObj.find('.tab-con .list'); this.resizeInit(); this.lazyPicLink(); this.addTabTitle(); this.scrollEvent(); this.clickEvent(); this.resizeEvent(); }, resizeInit: function () { var _this = this; this.winw = this.win.width(); this.winh = this.win.height(); this.switch = true; this.oneClick = false; this.ulH = this.tabUl.height(); if (this.ulH > 80) { this.tabUl.addClass('addBorder') } else { this.tabUl.removeClass('addBorder') } if (this.winw > 992) { setTimeout(function () { _this.conList.find(".swiper-wrapper").attr("style", " "); _this.conList.find(".swiper-slide").attr("style", " "); _this.conList.find(".swiper-pagination").hide(); }, 200) } else { setTimeout(function () { _this.conList.find(".right").attr("style", " "); }, 200) } }, setHeight: function (_index) { var imgObj = this.conList.eq(_index).find('.e-col-xl-6'); if (this.winw > 992) { if (this.switch && imgObj.length > 4) { this.switch = false; var rightObj = this.conList.eq(_index).find('.right'); this.marginRight = rightObj.css("paddingRight"); rightObj.css({ height: imgObj.height() * 2 + parseInt(imgObj.css("margin-top")), paddingRight: parseInt(rightObj.css("paddingRight")) - 3 }) } if (this.conList.eq(_index).hasClass('number3')) { var colObj = this.conList.eq(_index).find('.e-col-xl-6'); colObj.eq(0).height(colObj.eq(1).height() * 2 + parseInt(colObj.eq(1).css("margin-top"))); } } else { this.conList.find('.right').removeAttr("style"); } }, addTabTitle: function () { var _this = this; if (_this.winw < 992) { if (_this.conList.find('.wap-tab').length > 0) { return } _this.conList.each(function () { var This = $(this); This.prepend("