$(function () { $(".move-area").click(function () { const $target = $(this).attr("href"); const headerH = isMobile ? 100 : 37; $("html, body").animate( { scrollTop: $($target).offset().top - headerH, }, 500 ); if (isMobile) { $(".nav").removeClass("on"); } }); $(".intro__list li").click(function () { const idx = $(this).index(); $(".intro__list li").removeClass("on").eq(idx).addClass("on"); if (isMobile) { $("#introBg img").attr( "src", `/base/img/new/mobile/img-intro${idx + 1}.jpg` ); } else { $(".section4").attr("data-active", idx); $(".section4 .inner img").attr( "src", `/base/img/new/img_intro_text${idx + 1}.png` ); } }); if (isMobile) { $("#btnNavToggle").click(function () { $(this).toggleClass("on"); $(".nav").toggleClass("on"); }); } else { new Swiper(".visual-swiper", { slidesPerView: 1, loop: true, spaceBetween: 0, autoplay: { delay: 2000, }, navigation: { nextEl: ".visual-button-next", prevEl: ".visual-button-prev", }, }); var swiper = new Swiper(".swiperThumbs", { slidesPerView: 7.5, spaceBetween: 10, freeMode: true, watchSlidesProgress: true, }); var swiper2 = new Swiper(".swiperImg", { spaceBetween: 0, slidesPerView: 1, navigation: { nextEl: ".interior-button-next", prevEl: ".interior-button-prev", }, thumbs: { swiper: swiper, }, }); } $(".t-banner").click(function () { $("body").css("overflow", "hidden"); $(".popup").fadeIn(); }); $(".popup .btn_close").click(function () { $("body").css("overflow", "auto"); $(".popup").fadeOut(); }); });