$(function(){let e=$("#header"),t=$("#btn-to-top"),v=$('#btnwrapper');(function e(){let t=document.getElementById("isIndex"),s=document.getElementById("tplCode").value,n="",o="";t&&"Y"==t.value?document.getElementById("mjs")||document.getElementById("mcss")||((n=document.createElement("script")).id="mjs",n.src=s+"/img/onepixel/js/main.min.js",(o=document.createElement("link")).id="mcss",o.rel="stylesheet",o.href=s+"/img/onepixel/css/main.css",document.head.appendChild(o),document.head.appendChild(n)):document.getElementById("sjs")||document.getElementById("scss")||((n=document.createElement("script")).id="sjs",n.src=s+"/img/onepixel/js/sub.min.js",(o=document.createElement("link")).id="scss",o.rel="stylesheet",o.href=s+"/img/onepixel/css/sub.css",document.head.appendChild(o),document.head.appendChild(n))})(),function t(){let s=$("#header .gnb > ul > li"),n=$("#header .megamenu-bg"),o=$("#header .button-hamburger"),l=$("#mobile-header .backdrop"),i=0;n.height(0),s.each(function(){let e=$(this);e.find(">.submenu-items").outerHeight()>=i&&(i=e.find(">.submenu-items").outerHeight())}),s.on("mouseenter",function(){e.addClass("active"),gsap.to("#header .megamenu-bg",{autoAlpha:1,height:i,duration:.3}),$("#header .submenu-items").stop().fadeIn(400)}),$("#header .gnb").on("mouseleave",function(){e.removeClass("active"),$("#header .submenu-items").stop().fadeOut(100),gsap.to("#header .megamenu-bg",{autoAlpha:0,height:0,duration:.3})}),o.on("click",t=>{let s=$(t.currentTarget);s.attr("aria-expanded",function(e,t){return"true"==t?"false":"true"}),s.toggleClass("active"),e.toggleClass("nav-open"),l.stop().fadeToggle(400)}),$("#mobile-header .inner-content > ul > li > a").on("click",e=>{let t=$(e.currentTarget);t.siblings(".submenu-items").length&&(e.preventDefault(),t.parent().hasClass("open")?(t.parent().removeClass("open"),t.siblings(".submenu-items").stop().slideUp(300)):($("#mobile-header .inner-content > ul > li").removeClass("open"),$("#mobile-header .inner-content > ul > li .submenu-items").stop().slideUp(300),t.parent().addClass("open"),t.siblings(".submenu-items").stop().slideDown(300)))})}(),function e(){let s=$("#footer .family-site-wrapper"),n=s.find(".button-opener"),o=s.find(".family-dropdown-items");s.find(".scroll-content").niceScroll({autohidemode:!1,cursorborder:"0px solid #7a7a7a",cursorcolor:"#7a7a7a",background:"#dee2e6",cursorwidth:"4px",railwidth:4,cursorborderradius:"5px",zindex:1,railoffset:{top:0,left:-1},railpadding:{top:0,right:0,left:0,bottom:1}}),n.on("click",e=>{$(e.currentTarget),s.hasClass("--open")?(s.removeClass("--open"),o.stop().slideUp(300)):(s.addClass("--open"),o.stop().slideDown(300),s.find(".scroll-content").getNiceScroll().resize())}),$(document).on("click",e=>{$(e.target).is(n)||(s.removeClass("--open"),o.stop().slideUp(300))}),t.on("click",()=>{$("html, body").stop().animate({scrollTop:0},500)})}(),$(window).on("load",()=>{!function e(){let t=$("#page-loader");t.find(".loader-stage").fadeOut("slow",()=>{setTimeout(()=>{t.fadeOut("slow")},100)})}()}),$(window).on("scroll",()=>{$(window).scrollTop()>=100?e.addClass("sticky"):e.removeClass("sticky");let s,n;s=$(window).scrollTop(),s>=(n=$(window).height())?t.addClass("--show"):t.removeClass("--show");let s1,n1;s1=$(window).scrollTop(),s1>=(n1=$(window).height())?v.addClass("--show"):v.removeClass("--show")})});