$(function () { if ($('.e-module-202507091116').length > 0) { function module202507091116Fun($target) { var module202507091116Obj = { init: function () { this.win = $(window); this.moduleObj = $target; this.headerObj = $('.e-module-202209210900'); this.blackNavObj = $('.e-module-202208180950'); this.cookieObj = $('.e-module-202208270930'); this.showcaseNavCon = this.moduleObj.find('.showcase-nav-container'); this.conMarginLeft = this.moduleObj.find('.con-margin-left'); this.showcaseNavList = this.moduleObj.find('.showcase-nav-list'); this.showcaseToggleNav = this.moduleObj.find('.showcase-toggleNav'); this.showcaseScale = this.moduleObj.find('.showcase-scale'); this.eventClick = $target.find(".showcase-event-click"); this.showcasePage = $target.find(".showcase-page"); this.videoPopPage = $target.find(".showcase-video-pop-page"); this.documentsPopPage = $target.find(".showcase-documents-pop-page"); this.curObj = $(".home-page"); this.homeIndex = 0; this.homeLength = $(".home-page .point ul li").length; this.proTabList = $target.find(".pro-tab-list"); this.animateScale = this.moduleObj.find('.animate-scale'); this.scaleBack = this.moduleObj.find('.scale-back-btn'); this.resizeInit(); this.setHeight(); this.clickEvent(); this.resizeEvent(); this.homeSetTimerAnimation(); }, resizeInit: function () { this.winh = this.win.height(); this.winw = this.win.width(); this.headerObjH = this.headerObj.height(); this.showcaseTitle = this.showcaseNavCon.find(".showcase-title").outerHeight(); }, setHeight: function () { var cookieHeight = this.cookieObj.height() < 0 ? 0 : 52; var navHeight1 = this.blackNavObj.height(); var h = this.winh - cookieHeight - navHeight1 - this.headerObjH; this.moduleObj.height(h); this.showcasePage.height(h); this.conMarginLeft.height(h); this.videoPopPage.height(h); this.documentsPopPage.height(h); this.showcaseNavCon.css({ 'height': parseInt(this.winh - this.headerObjH - navHeight1), 'position': 'fixed', 'top': parseInt(this.headerObjH + navHeight1) }); this.showcaseNavList.css({ height: parseInt(h - this.showcaseTitle - 70) }); }, homeSetTimerAnimation: function () { var _this = this; var timer = ""; function timerFun() { timer = setInterval(function () { $(".home-page .point ul li").eq(_this.homeIndex % _this.homeLength - 1).removeClass("active"); $(".home-page .point ul li").eq(_this.homeIndex % _this.homeLength).addClass("active"); _this.homeIndex++; }, 2000); }; // timerFun(); $(".home-page .point ul li").hover(function () { clearInterval(timer); $(".home-page .point ul li").removeClass("active"); $(this).addClass("active"); _this.homeIndex = $(this).index() + 1; }, function () { // timerFun(); }); }, clickEvent: function () { var _this = this; _this.showcaseNavList.find(".p-level-1 .iconfont").on("click", function () { $(this).parents(".showcase-nav-list-item").toggleClass("light"); }); _this.showcaseToggleNav.on("click", function () { $(this).parents(".showcase-nav-container").toggleClass("active"); $(".con-margin-left").toggleClass("active"); }); _this.showcaseScale.on("click", function () { if (!document.fullscreenElement) { document.documentElement.requestFullscreen(); $(this).find(".slide-item-img").addClass("style2"); } else { document.exitFullscreen(); $(this).find(".slide-item-img").removeClass("style2"); }; }); this.eventClick.on("click", function () { if ($("." + $(this).data("name")).hasClass("active")) return; if (_this.curObj.find("video").length > 0) { _this.curObj.find("video")[0].play(); }; _this.curObj.fadeOut().removeClass("active").css("z-index", 1); var clickObj = $("." + $(this).data("name")); clickObj.fadeIn().addClass("active").css("z-index", 2); if (clickObj.find("video").length > 0) { clickObj.find("video")[0].play(); }; if (clickObj.find(".swiper").length > 0) { _this.initSwiper(clickObj); }; if ($("." + $(this).data("name")).hasClass("showcase-video-pop-page") || $("." + $(this).data("name")).hasClass("showcase-documents-pop-page")) return; $(this).parents(".showcase-nav-container").find(".active").removeClass("active"); if ($(this).parents(".home-page").length > 0) { $(".showcase-nav-wrapper .showcase-title").removeClass("active"); // var _index = $(this).index(); // var clickHomeObj = $(".showcase-nav-wrapper .showcase-nav-list .showcase-nav-list-item").eq(_index).find(".p-level-1 .showcase-event-click"); // if (clickHomeObj.data("page") == "no-page") { // clickHomeObj.parents("ul").find(">li >ul >li >.showcase-event-click").eq(_index).addClass("active"); // } else { // clickHomeObj.addClass("active"); // }; } if ($(this).data("page") == "no-page") { // $(this).parents("ul").find(">li >ul >li >.showcase-event-click").eq(0).addClass("active"); $(this).parent().find(" >ul >li >.showcase-event-click").eq(0).addClass("active"); } else { $(this).addClass("active"); if ($(this).parents('.showcase-nav-container').length == 0) { $('.showcase-nav-container .showcase-event-click.active').removeClass("active"); var navPObj = $(this).data("name"); if ($(".showcase-nav-container").find("[data-name='" + navPObj + "']").length > 1) { $(".showcase-nav-container").find("[data-name='" + navPObj + "']").eq(1).addClass("active"); } else { $(".showcase-nav-container").find("[data-name='" + navPObj + "']").addClass("active"); } } }; _this.curObj = clickObj; }); this.moduleObj.on("click", ".video-close-btn", function () { $(".showcase-video-pop-page.active").find("video")[0].pause(); $(".showcase-video-pop-page.active").fadeOut().removeClass("active"); _this.curObj.fadeIn().addClass("active").css("z-index", 2); }); this.moduleObj.on("click", ".documents-close-btn", function () { $(".showcase-documents-pop-page.active").fadeOut().removeClass("active"); _this.curObj.fadeIn().addClass("active").css("z-index", 2); setTimeout(() => { $(".showcase-documents-pop-page").find(".showcase-level-3-1-img1").show(); $(".showcase-documents-pop-page").find(".showcase-level-3-1-img2").hide(); }, 500); }); // this.moduleObj.on("click", ".video-img span", function () { // $(this).parents('.video-box').find("video")[0].play(); // $(this).parent().hide(); // }); $(".showcase-event-click-img-show").on("click", function () { $("." + $(this).data("name")).show(); }); _this.proTabList.find(".pro-tab-item").on("click", function () { var $this = $(this); var _index = $this.index(); $this.parents(".showcase-product-detail").find(".pro-tab-item").eq(_index).addClass('active').siblings().removeClass('active'); $this.parents(".showcase-product-detail").find(".pro-detail-item").eq(_index).addClass('active').siblings().removeClass('active'); }); _this.animateScale.on("click", function () { $(this).parents(".showcase-page").find(".showcase-box1").addClass("active"); var index = $(this).parent().index(); $(this).parents(".showcase-page").find(".showcase-product-detail .pro-tab-item").eq(index).addClass("active").siblings().removeClass("active"); $(this).parents(".showcase-page").find(".showcase-product-detail .pro-detail-item").eq(index).addClass("active").siblings().removeClass("active"); $(".con-margin-left").addClass("active"); $(".showcase-nav-container").hide(); $(".showcase-slidebar").hide(); var bgObj = $(this).parents(".showcase-page").find('.bg'); bgObj.css({ transform: "translate(" + bgObj.data("scale")[0] + "%, " + bgObj.data("scale")[1] + "%) scale(" + bgObj.data("scale")[2] + ")" }) setTimeout(() => { $(this).parents(".showcase-page").find(".showcase-box2").addClass("active"); }, 400); }); _this.scaleBack.on("click", function () { $(this).parents(".showcase-page").find(".showcase-box2").removeClass("active"); $(".showcase-nav-container").show(); $(".con-margin-left").removeClass("active"); $(".showcase-slidebar").show(); var bgObj = $(this).parents(".showcase-page").find('.bg'); bgObj.css({ transform: "translate(-50%,-50%) scale(1)" }) setTimeout(() => { $(this).parents(".showcase-page").find(".showcase-box1").removeClass("active"); }, 500); }); _this.moduleObj.find(".home-btn .showcase-point").hover(function () { $(this).parent().addClass("active"); }, function () { $(this).parent().removeClass("active"); }); }, initSwiper: function (target) { var _this = this; var mySwiper = new Swiper(target.find(".swiper"), { slidesPerView: 1, spaceBetween: 20, resistanceRatiao: 0.5, slidesPerGroup: 1, effect: "fade", pagination: { el: target.find('.swiper-pagination'), clickable: true, }, navigation: { nextEl: target.find('.swiper-button-next'), prevEl: target.find('.swiper-button-prev'), }, on: { resize: function () { var _swiper = this; setTimeout(function () { _swiper.update(); }, 250); }, }, }); }, resizeEvent: function () { var _this = this; var resizeWinw = 0; var resizeTimer = ''; this.win.on('resize.202507091116', function () { var winw = _this.win.width(); if (winw != resizeWinw) { currentWinw = winw; if (resizeTimer) { clearTimeout(resizeTimer); } resizeTimer = setTimeout(function () { _this.resizeInit(); _this.setHeight(); }, 100); }; }); }, }; module202507091116Obj.init(); } $('.e-module-202507091116').each(function () { var _this = $(this); if (_this.data('init')) { return; }; _this.data('init', true); module202507091116Fun($(this)); }); }; });