$(function(){let e=$("#header"),n=$("#header .gnb-nav li"),a=$("#header .gnb-nav"),t=0,o;function s(){n.each(function(){let e=$(this);e.find(">.nav-sub").outerHeight()>=t&&(t=e.find(">.nav-sub").outerHeight())}),n.on("mouseenter",function(){e.addClass("active"),gsap.to("#header .nav-sub-bg",{autoAlpha:1,height:t,duration:.3}),$("#header .nav-sub").stop().fadeIn(400)}),a.on("mouseleave",function(){e.removeClass("active"),$("#header .nav-sub").stop().fadeOut(100),gsap.to("#header .nav-sub-bg",{autoAlpha:0,height:0,duration:.3})})}(o=document.getElementById("isIndex"))&&"Y"==o.value?(document.getElementById("sjs").remove(),document.getElementById("scss").remove()):(document.getElementById("mjs").remove(),document.getElementById("mcss").remove()),$("#family-sites").on("change",function(e){window.open(e.target.value,"_blank")}),s(),$(window).on("scroll",function(){$(window).scrollTop()>=100?(e.addClass("sticky"),$("#quick-btns").addClass("show")):(e.removeClass("sticky"),$("#quick-btns").removeClass("show"))});let l=$("#header-mb"),d=$("#header-mb .nav-sub .sub-menu"),i=$("#header-mb .gnb-nav a");$("#header-mb .gnb-nav a").on("click",function(e){var n=$(e.target).closest("p").index();d.removeClass("on"),d.eq(n).addClass("on"),i.removeClass("on"),i.eq(n).addClass("on")}),$(".gnb-hamburger").on("click",e=>{let n=$(e.currentTarget);l.stop().fadeToggle(400),n.toggleClass("close")}),$(window).on("resize",()=>{0==t&&window.outerWidth>=991&&s()});let r;window.onload=(r=$("#page-loader"),void(r.find(".loader-stage").fadeOut("slow",function(){setTimeout(function(){r.fadeOut("slow")},100)}),null!=document.getElementById("isIndex")&&$(".hero").addClass("--load"))),$(".gnb-lang a").on("click",function(e){let n="ko"!=$(this).data().lang,a=location.pathname.split("/").filter(e=>""!=e&&"en"!=e),t="";(location.href.match("/bizdemo")||location.href.match("/default"))&&(t="/"+a[0],a=a.slice(1,a.length)),location.href=location.origin+t+"/"+(n?"en/":"")+a.join("/")})});