var sNotice=null;function showSideMenuBar(e,i){e>=i?jQuery("#side-menu-bar").css({transform:"matrix(1, 0, 0, 1, 0, 0)"}):jQuery("#side-menu-bar").css({transform:"translate(220%, 0%) matrix(0.76604, 0.64278, -0.64278, 0.76604, 0, 0)"})}function makeNotcie(e){sNotice=new Swiper(".swiper-container",{direction:"vertical",height:e,loop:!0,autoplay:4e3,autoplayDisableOnInteraction:!1})}function getNoticeHeight(e){return e>640?50:25}function resizeDone(){if(allMenuClose(),jQuery("#snotice").length){var e=getNoticeHeight(jQuery(window).width());sNotice.destroy(!0,!0),sNotice=null,makeNotcie(e)}}function allMenuInit(){jQuery("body").removeClass("fixed"),jQuery(".allmenu_bg").hide(),jQuery("#m_nav").hide().css("right","-100%")}function allMenuOpen(){return jQuery("body").addClass("fixed"),jQuery(".allmenu_bg").show(),jQuery("#m_nav").show().animate({right:"0%"},300,function(){}),!1}function allMenuClose(){return jQuery("body").removeClass("fixed"),jQuery("#m_nav").animate({right:"-100%"},350,function(){jQuery(this).hide(),jQuery(".allmenu_bg").hide()}),!1}function allMenuToggle(){jQuery(this).parent().siblings().find("ul").slideUp(),jQuery(this).next().slideToggle()}function allSubMenuToggle(){jQuery(this).parent().siblings().find("ul").slideUp(),jQuery(this).siblings("ul").slideToggle()}function onTop(){return jQuery("html").animate({scrollTop:0},500),!1}function changeCalen(){var e,i;i=isMobile()?["일","월","화","수","목","금","토"]:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"];var t=setInterval(function(){if((e=jQuery("#calendar").find("img")).length){for(var a=0;a.depth01:first-child>a").addClass("active");break;case"사업분야":jQuery(".depth_wrap>.depth01:nth-child(2)>a").addClass("active");break;case"제품소개":jQuery(".depth_wrap>.depth01:nth-child(3)>a").addClass("active");break;case"고객센터":jQuery(".depth_wrap>.depth01:nth-child(4)>a").addClass("active");break;case"채용정보":jQuery(".depth_wrap>.depth01:last-child>a").addClass("active");break;case"마이페이지":jQuery(".fav>.container>ul>li:nth-child(2)>a").addClass("active");break;case"사이트맵":jQuery(".fav>.container>ul>li:last-child>a").addClass("active")}}if(jQuery(".depth_wrap").bind("mouseover",function(){jQuery(".lnb").addClass("on").stop().animate({height:"390px"},200),jQuery(".menu").css("height","390px")}),jQuery(".lnb").bind("mouseleave",function(){jQuery(".lnb").stop().animate({height:"80px"},200,function(){jQuery(this).removeClass("on"),jQuery(".menu").css("height","80px")})}),jQuery(".allmenu").bind("click",allMenuOpen),jQuery(".allmenu_bg").bind("click",allMenuClose),jQuery(".close_btn").bind("click",allMenuClose),jQuery(".menu_list ul li .menu_toggle").bind("click",allMenuToggle),jQuery(".menu_list .sub_menu_toggle").bind("click",allSubMenuToggle),jQuery("#main-window").length&&jQuery("#main-window").bxSlider({mode:"horizontal",speed:5e3,auto:!0,pause:7e3,controls:!1,targetName:"main-window"}),jQuery("#snotice").length){jQuery("#snotice").addClass("swiper-container"),jQuery("#snotice>tbody").addClass("swiper-wrapper"),jQuery("#snotice>tbody>tr").addClass("swiper-slide"),makeNotcie(getNoticeHeight(jQuery(window).width()))}if(jQuery(".goal-num").length&&jQuery(".goal-num").counterUp({delay:10,time:1e3}),jQuery("#gmap").length){map=new google.maps.Map(document.getElementById("gmap"),{center:i,zoom:12,scrollwheel:!1});new google.maps.Marker({icon:t+"/img/pol/img/maptip.png",position:i,map:map,title:"Path of Life"})}jQuery(".schedule-desc").length&&changeCalen(),jQuery(".face").on("click",function(){var e=window.open("https://www.facebook.com/sharer/sharer.php?u="+document.URL,"facebook-popup","height=350,width=600");return e.focus&&e.focus(),!1}),jQuery(".twitter").on("click",function(){var e=window.open("https://twitter.com/share?url="+document.URL,"twitter-popup","height=350,width=600");return e.focus&&e.focus(),!1});var n,o="http://"+POLServerIp+":"+POLServerPort,r="손님",s="PoLB005";function l(e,i,t,a){var n="",o=i;"system"!=e?""!=a?n="

{USER}

{MESSAGE}

":"Path of Life"==o?(o="폴27",n="

{USER}

{MESSAGE}

"):n="

{USER}

{MESSAGE}

":"system"==e&&(n="
×{MESSAGE}
"),n=(n=n.replace("{USER}",o)).replace("{MESSAGE}",t),jQuery(n).appendTo(".pol-message"),jQuery(".pol-message").scrollTop(jQuery(".pol-message")[0].scrollHeight)}jQuery("#openchat").bind("click",function(){jQuery("#chatroom").css({opacity:"1",visibility:"visible",top:"0"})}),jQuery(".chat-top-close").bind("click",function(){jQuery("#chatroom").css({opacity:"0",visibility:"hidden",top:"500px"})}),navigator.platform&&0>"win16|win32|win64|mac".indexOf(navigator.platform.toLowerCase())&&(1,s+=" Mobile"),(n=io.connect(o)).on("connect_error",function(e){!function(){$("#pol-chat-config").remove();var e=document.getElementsByTagName("head")[0],i=document.createElement("script");i.type="text/javascript",i.id="pol-chat-config",i.src="http://pol27.com/pol/js/pol27.chat.config.00.js",e.appendChild(i)}(),jQuery("body").addClass("disconnected"),jQuery("#openchat").css("display","none"),jQuery("#chatroom").css({opacity:"0",visibility:"hidden",top:"500px"}),n.io.engine.hostname=POLServerIp,n.io.opts.hostname=POLServerIp,n.io.uri="http://"+POLServerIp+":"+POLServerPort}),n.on("connection",function(e){jQuery("body").removeClass("disconnected"),"connected"==e.type&&(n.emit("connection",{type:"join",name:r,room:"12",sip:sip,mobile:s}),jQuery("#openchat").css("display","flex"))}),n.on("system",function(e){l("system","system",e.message,"")}),n.on("message",function(e){l("order",e.name,e.message,"")}),n.on("disconnect",function(e){jQuery("#openchat").css("display","none"),jQuery("#chatroom").css({opacity:"0",visibility:"hidden",top:"500px"})}),jQuery("#message-button").click(function(){var e=jQuery("#message-input").val().replace(//gi,">");if(jQuery("#name-input").val().length<=0)return alert("이름을 설정해 주세요."),jQuery("#name-input").focus(),!1;r=jQuery("#name-input").val(),""!=e&&(n.emit("user",{name:r,message:e,sip:sip}),l("me",r,e,sip),jQuery("#message-input").val(""),jQuery("#message-input").focus())}),jQuery("#name-input").keydown(function(e){13==e.which&&jQuery("#message-input").focus()}),jQuery("#message-input").keydown(function(e){var i=jQuery("#message-input").val().replace(//gi,">");if(13==e.keyCode&&""!=i){if(jQuery("#name-input").val().length<=0)return alert("이름을 설정해 주세요."),jQuery("#name-input").focus(),!1;r=jQuery("#name-input").val(),n.emit("user",{name:r,message:i,sip:sip}),l("me",r,i,sip),jQuery("#message-input").val(""),jQuery("#message-input").focus()}}),jQuery(window).resize(function(){clearTimeout(e),e=setTimeout(resizeDone,300)}),jQuery(window).scroll(function(){var e=jQuery(window).scrollTop();showSideMenuBar(e,200),e>200?jQuery("#quickup").css({opacity:"1",display:"block"}):jQuery("#quickup").css({opacity:"0",display:"none"})})});