//실시간 문의 function icontranform() { if ($('#collapseside').hasClass('show')) { $('#collapseside').removeClass('show'); $('.left-down').addClass('fa-rotate-180'); } else { $('#collapseside').addClass('show'); $('.left-down').removeClass('fa-rotate-180'); } } /* * Name : common.min.js * Version : 1.1.0 * Product : prime05 * Author : 1px studio * Date : 2024.06.19 * Desc : 포인트컬러(style preview) 적용 --------------------------------------------------- */ $(function(){let e;(e=document.getElementById("isIndex"))&&"Y"==e.value?(document.getElementById("sjs").remove(),document.getElementById("scss").remove()):(document.getElementById("mjs").remove(),document.getElementById("mcss").remove());let t;window.onload=(t=$("#page-loader"),void(t.find(".loader-stage").fadeOut("slow",function(){setTimeout(function(){t.fadeOut("slow")},100)}),null==document.getElementById("isIndex")&&$(".hero").addClass("--load")));let o=new Lenis({duration:.8,easing:e=>1-Math.pow(1-e,3),wheelMultiplier:2});function n(e){o.raf(e),requestAnimationFrame(n)}o.on("scroll",e=>{}),requestAnimationFrame(n);let s=0,r=null,i=$("#header");function l(){clearTimeout(r)}function a(){l();$("#hamburger").hasClass("open")&&window.outerWidth<1280||(r=setTimeout(function(){i.addClass("hide")},2500))}function c(){let e=$("#header .gnb > ul > li"),t=!1;if($.each(e,function(e){if(0==$(this).outerWidth()){$("#header").attr("data-gnb",0),t=!0;return}$(this).css("width",$(this).outerWidth()+"px"),$("#header").attr("data-gnb",1)}),!t){let o=$("#header .gnb > ul > li .gnb-sub");$.each(o,function(e){$(this).css("width",$(this).outerWidth()+"px")})}}$(window).on("scroll",function(){let e=$(window).scrollTop();s>e&&i.removeClass("hide"),e>=200?(i.addClass("fixed"),a(),$("#quick-btns").addClass("show")):(i.removeClass("fixed"),l(),$("#quick-btns").removeClass("show")),s=e}),i.on("mouseover",function(e){l()}),i.on("mouseout",function(e){a()}),c(),$(window).on("resize",()=>{!1==$("#header").attr("data-gnb")&&window.outerWidth>1280&&c()});let d=$("#header-mb"),u=!1;$("#hamburger").on("click",function(e){if($(this).hasClass("open")){if(u)return!1;u=!0,$(this).removeClass("open"),gsap.to(d,{opacity:0,duration:.8,ease:"power2.out"}).then(function(){gsap.set(d,{display:"none"}).then(function(){u=!1,a()})})}else{if(u)return!1;u=!0,l(),$(this).addClass("open"),gsap.set(d,{display:"block"}).then(function(){gsap.to(d,{opacity:1,duration:.8,ease:"power2.out"}).then(function(){u=!1})})}}),$("#header-mb .gnb-top").on("click",function(e){let t=$(this).next(".gnb-sub");if(t.hasClass("open")){t.removeClass("open");return}$("#header-mb .gnb-sub").removeClass("open"),t.addClass("open")}),!function e(){if(/Mobi/i.test(window.navigator.userAgent)){$(".px-cursor").remove();return}let t=document.querySelector(".cursor-ball"),o=document.querySelector(".cursor-inner");$(document).on("mousemove",function e(o){TweenMax.to(t,.6,{x:o.clientX-34,y:o.clientY-34})}),$(document).on("mouseenter","a, button",function e(){TweenMax.to(t,.3,{scale:.5})}),$(document).on("mouseleave","a, button",function e(){TweenMax.to(t,.3,{scale:1})}),$(".hero-buttons *").on("mouseenter",function e(n){$(o).addClass("big");let s=$(n.target).attr("data-cursor");$(t).css({"mix-blend-mode":"unset"}),$(t).append('