function fnPcbangPop(){return window.open("http://pcbang.webzen.co.kr/PCSearch/findPCBang","PopName1","width=500,height=300,scrollbars=yes"),!1}function fnLayerFunction(n,t,i,r){var u=[];return u.push('<div class="PopContsBox">'),u.push("<p class=\"popclose\"><a href='#' onclick='parent.fnLayerCloseFunction();return false'><img src=\""+__DOMAIN_IMAGE+'/Images/common/template_btn_close.gif" alt="CLOSE" /><\/a><\/p>'),u.push('<div class="ContsArea">'),u.push('<h1 class="title" id="layerTitle"><img src=\''+r+"'/><\/h1>"),u.push('<div id="layerBox" style=\'height:'+(i-40)+"px'>{content}<\/div>"),u.push("<\/div>"),u.push("<\/div>"),$.openDOMWindow({width:t+62,height:i+37,windowSource:"iframe",windowSourceURL:n,windowPadding:0,borderSize:"6",borderColor:"#b8b8b8",overlayOpacity:"60",windowWrap:u.join(""),contentElement:"layerBox"}),!1}function fnLayerCloseFunction(){$.closeDOMWindow()}function fnCheckValidPassword(n){return/^(?=.{6,20}$)(?=.*\d.*)(?=.*[a-zA-Z].*)(?=.*[!#\$%&\?].*).*/.test(n)||/^(?=.{6,20}$)(?=.*\d.*)(?=.*[a-zA-Z].*).*/.test(n)||/^(?=.{6,20}$)(?=.*\d.*)(?=.*[!#\$%&\?].*).*/.test(n)||/^(?=.{6,20}$)(?=.*[a-zA-Z].*)(?=.*[!#\$%&\?].*).*/.test(n)?!0:!1}function pop_open(n){window.open(n,"pcbang","left=100,top=100,width=1018,height=730,toolbar=0,menubar=0,status=0,scrollbars=1,resizable=1,copyhistory=0")}function trackAction(n){$.ajax({url:wz.Http.Portal+"/RD/TrackingAction?gameCode=09&section="+n,dataType:"jsonp"})}function vat(n){var t="http://vtag16.midas-i.com/vat-tag?cmp_no=1816&depth="+n,i=new Image;i.src=t}function showPopup(n,t,i,r){var e,o,u,f,s,h,c,l=r.href;e=screen.availWidth;o=screen.availHeight;u=t;f=i;s=(e-u)/2;h=(o-f)/2;c=Math.random()*1e4;window.open(l,"","width="+u+",height="+f+",top="+h+",left="+s+",resizable=1,scrollbars=0");return}function loadJsFile(n){var t=document.createElement("script");t.setAttribute("type","text/javascript");t.setAttribute("src",n);typeof t!="undefined"&&document.getElementsByTagName("head")[0].appendChild(t)}function todayClose(n,t){wz.Common.SetCookie("R2Popup"+n,"done",t);layerClose(n)}function layerClose(n){$("#R2Popup"+n).remove()}function AlertResult(n){var t=parseInt(n);switch(t){case 0:case 1:case 2:case 3:case 4:alert("대상자가 아닙니다.");break;case 200:alert("지급이 완료되었습니다.\n웹젠 보관함을 확인해 주세요.");closePopup();break;case-96:alert("이벤트 기간이 아닙니다.");break;case-2:alert("이미 보상을 받으셨습니다.");break;case 401:Common.AlertLogin();break;case 402:case-97:wz.GNB.OpenGameAgreePop(strGameCode);break;case-101:alert("지급 도중에 오류가 발생했습니다.");break;default:alert(n)}}function CheckNewComebackUser(){$.ajax({type:"POST",url:"/main/CheckNewComeback",success:function(n){switch(parseInt(n)){case 0:$(".e-event1 .user").text("기존 용사 대상자입니다.");break;case 2:$(".e-event1 .user").text("복귀 용사 대상자입니다.");break;case 4:$(".e-event1 .user").text("신규 용사 대상자입니다.");break;default:$(".e-event1 .user").text("신규/복귀/기존 용사 대상자가 아닙니다.")}},error:function(n){AlertResult(n.status)}})}function ChekNewUser(){$.ajax({type:"POST",url:checkNewUrl,success:function(n){var t=n.result;t==4?($(".login-id").text(n.accountId),wul.modal.openModal(".pop-new-user")):t>=0&&t<=3?alert("신규 용사 대상자가 아닙니다."):t==-2?alert("이미 신규 용사 보상을 받으셨습니다."):AlertResult(t)},error:function(n){AlertResult(n.status)}})}function ChekComebackNormalUser(n){$.ajax({type:"POST",url:checkComebackNormalUrl,data:{type:n},success:function(t){var i=t.result;n==1?i==0?($(".login-id").text(t.accountId),wul.modal.openModal(".pop-user")):i>=1&&i<=4?alert("기존 용사 대상자가 아닙니다."):i==-2?alert("이미 기존 용사 보상을 받으셨습니다."):AlertResult(i):n==0?i==2?($(".login-id").text(t.accountId),wul.modal.openModal(".pop-comeback-user")):i==0||i==1||i==3||i==4?alert("복귀 용사 대상자가 아닙니다."):i==-2?alert("이미 복귀 용사 보상을 받으셨습니다."):AlertResult(i):AlertResult(i)},error:function(n){AlertResult(n.status)}})}function getNewUserReward(){var n=$(".pop-new-user input[name=selectWeek]:checked").val();if(n==undefined)return alert("서버를 선택해 주세요."),!1;$.ajax({type:"POST",url:newUserRewardUrl,data:{serverIndex:n},success:function(n){var i=n.userStatus,t;if(i!=4)return alert("신규 용사 대상자가 아닙니다."),!1;t=n.result;switch(t){case 200:alert("지급이 완료되었습니다.\n선택한 서버로 캐릭터 생성 시 보상이 지급됩니다.");closePopup();break;case-2:alert("이미 신규 용사 보상을 받으셨습니다.");break;default:AlertResult(t)}},error:function(n){AlertResult(n.status)}})}function getComebackUserReward(){var n=$(".pop-comeback-user input[name=selectWeek]:checked").val();if(n==undefined)return alert("서버를 선택해 주세요."),!1;$.ajax({type:"POST",url:comebackUserRewardUrl,data:{serverIndex:n},success:function(n){var i=n.userStatus,t;if(i!=2)return alert("복귀 용사 대상자가 아닙니다."),!1;t=n.result;switch(t){case-2:alert("이미 복귀 용사 보상을 받으셨습니다.");break;default:AlertResult(t)}},error:function(n){AlertResult(n.status)}})}function getNormalUserReward(){var n=$(".pop-user input[name=selectWeek]:checked").val();if(n==undefined)return alert("서버를 선택해 주세요."),!1;$.ajax({type:"POST",url:normalUserRewardUrl,data:{serverIndex:n},success:function(n){var i=n.userStatus,t;if(i!=0)return alert("기존 용사 대상자가 아닙니다."),!1;t=n.result;switch(t){case-2:alert("이미 기존 용사 보상을 받으셨습니다.");break;default:AlertResult(t)}},error:function(n){AlertResult(n.status)}})}function closePopup(){wul.modal.closeModal(".pop-ranking");$(".custom-select .selected").text("서버 선택");$(".custom-select input[name=selectWeek]").prop("checked",!1)}var Common,strGameCode,GameLib;(function(n){typeof define=="function"&&define.amd?define(["jquery"],n):n(jQuery)})(function(n){function r(t,i){var r,f,e,o=t.nodeName.toLowerCase();return"area"===o?(r=t.parentNode,f=r.name,!t.href||!f||r.nodeName.toLowerCase()!=="map")?!1:(e=n("img[usemap='#"+f+"']")[0],!!e&&u(e)):(/^(input|select|textarea|button|object)$/.test(o)?!t.disabled:"a"===o?t.href||i:i)&&u(t)}function u(t){return n.expr.filters.visible(t)&&!n(t).parents().addBack().filter(function(){return n.css(this,"visibility")==="hidden"}).length}var f,i,e,t,o,s;n.ui=n.ui||{};n.extend(n.ui,{version:"1.11.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}});n.fn.extend({scrollParent:function(t){var i=this.css("position"),u=i==="absolute",f=t?/(auto|scroll|hidden)/:/(auto|scroll)/,r=this.parents().filter(function(){var t=n(this);return u&&t.css("position")==="static"?!1:f.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return i==="fixed"||!r.length?n(this[0].ownerDocument||document):r},uniqueId:function(){var n=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++n)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&n(this).removeAttr("id")})}});n.extend(n.expr[":"],{data:n.expr.createPseudo?n.expr.createPseudo(function(t){return function(i){return!!n.data(i,t)}}):function(t,i,r){return!!n.data(t,r[3])},focusable:function(t){return r(t,!isNaN(n.attr(t,"tabindex")))},tabbable:function(t){var i=n.attr(t,"tabindex"),u=isNaN(i);return(u||i>=0)&&r(t,!u)}});n("<a>").outerWidth(1).jquery||n.each(["Width","Height"],function(t,i){function f(t,i,r,u){return n.each(e,function(){i-=parseFloat(n.css(t,"padding"+this))||0;r&&(i-=parseFloat(n.css(t,"border"+this+"Width"))||0);u&&(i-=parseFloat(n.css(t,"margin"+this))||0)}),i}var e=i==="Width"?["Left","Right"]:["Top","Bottom"],r=i.toLowerCase(),u={innerWidth:n.fn.innerWidth,innerHeight:n.fn.innerHeight,outerWidth:n.fn.outerWidth,outerHeight:n.fn.outerHeight};n.fn["inner"+i]=function(t){return t===undefined?u["inner"+i].call(this):this.each(function(){n(this).css(r,f(this,t)+"px")})};n.fn["outer"+i]=function(t,e){return typeof t!="number"?u["outer"+i].call(this,t):this.each(function(){n(this).css(r,f(this,t,!0,e)+"px")})}});n.fn.addBack||(n.fn.addBack=function(n){return this.add(n==null?this.prevObject:this.prevObject.filter(n))});n("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(n.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,n.camelCase(i)):t.call(this)}}(n.fn.removeData));n.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());n.fn.extend({focus:function(t){return function(i,r){return typeof i=="number"?this.each(function(){var t=this;setTimeout(function(){n(t).focus();r&&r.call(t)},i)}):t.apply(this,arguments)}}(n.fn.focus),disableSelection:function(){var n="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(n+".ui-disableSelection",function(n){n.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(t){if(t!==undefined)return this.css("zIndex",t);if(this.length)for(var i=n(this[0]),r,u;i.length&&i[0]!==document;){if(r=i.css("position"),(r==="absolute"||r==="relative"||r==="fixed")&&(u=parseInt(i.css("zIndex"),10),!isNaN(u)&&u!==0))return u;i=i.parent()}return 0}});n.ui.plugin={add:function(t,i,r){var u,f=n.ui[t].prototype;for(u in r)f.plugins[u]=f.plugins[u]||[],f.plugins[u].push([i,r[u]])},call:function(n,t,i,r){var u,f=n.plugins[t];if(f&&(r||n.element[0].parentNode&&n.element[0].parentNode.nodeType!==11))for(u=0;u<f.length;u++)n.options[f[u][0]]&&f[u][1].apply(n.element,i)}};f=0;i=Array.prototype.slice;n.cleanData=function(t){return function(i){for(var r,u,f=0;(u=i[f])!=null;f++)try{r=n._data(u,"events");r&&r.remove&&n(u).triggerHandler("remove")}catch(e){}t(i)}}(n.cleanData);n.widget=function(t,i,r){var s,f,u,o,h={},e=t.split(".")[0];return t=t.split(".")[1],s=e+"-"+t,r||(r=i,i=n.Widget),n.expr[":"][s.toLowerCase()]=function(t){return!!n.data(t,s)},n[e]=n[e]||{},f=n[e][t],u=n[e][t]=function(n,t){if(!this._createWidget)return new u(n,t);arguments.length&&this._createWidget(n,t)},n.extend(u,f,{version:r.version,_proto:n.extend({},r),_childConstructors:[]}),o=new i,o.options=n.widget.extend({},o.options),n.each(r,function(t,r){if(!n.isFunction(r)){h[t]=r;return}h[t]=function(){var n=function(){return i.prototype[t].apply(this,arguments)},u=function(n){return i.prototype[t].apply(this,n)};return function(){var i=this._super,f=this._superApply,t;return this._super=n,this._superApply=u,t=r.apply(this,arguments),this._super=i,this._superApply=f,t}}()}),u.prototype=n.widget.extend(o,{widgetEventPrefix:f?o.widgetEventPrefix||t:t},h,{constructor:u,namespace:e,widgetName:t,widgetFullName:s}),f?(n.each(f._childConstructors,function(t,i){var r=i.prototype;n.widget(r.namespace+"."+r.widgetName,u,i._proto)}),delete f._childConstructors):i._childConstructors.push(u),n.widget.bridge(t,u),u};n.widget.extend=function(t){for(var e=i.call(arguments,1),f=0,o=e.length,r,u;f<o;f++)for(r in e[f])u=e[f][r],e[f].hasOwnProperty(r)&&u!==undefined&&(t[r]=n.isPlainObject(u)?n.isPlainObject(t[r])?n.widget.extend({},t[r],u):n.widget.extend({},u):u);return t};n.widget.bridge=function(t,r){var u=r.prototype.widgetFullName||t;n.fn[t]=function(f){var s=typeof f=="string",o=i.call(arguments,1),e=this;return s?this.each(function(){var i,r=n.data(this,u);return f==="instance"?(e=r,!1):r?!n.isFunction(r[f])||f.charAt(0)==="_"?n.error("no such method '"+f+"' for "+t+" widget instance"):(i=r[f].apply(r,o),i!==r&&i!==undefined?(e=i&&i.jquery?e.pushStack(i.get()):i,!1):void 0):n.error("cannot call methods on "+t+" prior to initialization; attempted to call method '"+f+"'")}):(o.length&&(f=n.widget.extend.apply(null,[f].concat(o))),this.each(function(){var t=n.data(this,u);t?(t.option(f||{}),t._init&&t._init()):n.data(this,u,new r(f,this))})),e}};n.Widget=function(){};n.Widget._childConstructors=[];n.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,i){i=n(i||this.defaultElement||this)[0];this.element=n(i);this.uuid=f++;this.eventNamespace="."+this.widgetName+this.uuid;this.bindings=n();this.hoverable=n();this.focusable=n();i!==this&&(n.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(n){n.target===i&&this.destroy()}}),this.document=n(i.style?i.ownerDocument:i.document||i),this.window=n(this.document[0].defaultView||this.document[0].parentWindow));this.options=n.widget.extend({},this.options,this._getCreateOptions(),t);this._create();this._trigger("create",null,this._getCreateEventData());this._init()},_getCreateOptions:n.noop,_getCreateEventData:n.noop,_create:n.noop,_init:n.noop,destroy:function(){this._destroy();this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(n.camelCase(this.widgetFullName));this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled");this.bindings.unbind(this.eventNamespace);this.hoverable.removeClass("ui-state-hover");this.focusable.removeClass("ui-state-focus")},_destroy:n.noop,widget:function(){return this.element},option:function(t,i){var e=t,r,u,f;if(arguments.length===0)return n.widget.extend({},this.options);if(typeof t=="string")if(e={},r=t.split("."),t=r.shift(),r.length){for(u=e[t]=n.widget.extend({},this.options[t]),f=0;f<r.length-1;f++)u[r[f]]=u[r[f]]||{},u=u[r[f]];if(t=r.pop(),arguments.length===1)return u[t]===undefined?null:u[t];u[t]=i}else{if(arguments.length===1)return this.options[t]===undefined?null:this.options[t];e[t]=i}return this._setOptions(e),this},_setOptions:function(n){for(var t in n)this._setOption(t,n[t]);return this},_setOption:function(n,t){return this.options[n]=t,n==="disabled"&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!t),t&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(t,i,r){var f,u=this;typeof t!="boolean"&&(r=i,i=t,t=!1);r?(i=f=n(i),this.bindings=this.bindings.add(i)):(r=i,i=this.element,f=this.widget());n.each(r,function(r,e){function o(){if(t||u.options.disabled!==!0&&!n(this).hasClass("ui-state-disabled"))return(typeof e=="string"?u[e]:e).apply(u,arguments)}typeof e!="string"&&(o.guid=e.guid=e.guid||o.guid||n.guid++);var s=r.match(/^([\w:-]*)\s*(.*)$/),h=s[1]+u.eventNamespace,c=s[2];c?f.delegate(c,h,o):i.bind(h,o)})},_off:function(t,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace;t.unbind(i).undelegate(i);this.bindings=n(this.bindings.not(t).get());this.focusable=n(this.focusable.not(t).get());this.hoverable=n(this.hoverable.not(t).get())},_delay:function(n,t){function r(){return(typeof n=="string"?i[n]:n).apply(i,arguments)}var i=this;return setTimeout(r,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t);this._on(t,{mouseenter:function(t){n(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){n(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t);this._on(t,{focusin:function(t){n(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){n(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,r){var u,f,e=this.options[t];if(r=r||{},i=n.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],f=i.originalEvent,f)for(u in f)u in i||(i[u]=f[u]);return this.element.trigger(i,r),!(n.isFunction(e)&&e.apply(this.element[0],[i].concat(r))===!1||i.isDefaultPrevented())}};n.each({show:"fadeIn",hide:"fadeOut"},function(t,i){n.Widget.prototype["_"+t]=function(r,u,f){typeof u=="string"&&(u={effect:u});var o,e=u?u===!0||typeof u=="number"?i:u.effect||i:t;u=u||{};typeof u=="number"&&(u={duration:u});o=!n.isEmptyObject(u);u.complete=f;u.delay&&r.delay(u.delay);o&&n.effects&&n.effects.effect[e]?r[t](u):e!==t&&r[e]?r[e](u.duration,u.easing,f):r.queue(function(i){n(this)[t]();f&&f.call(r[0]);i()})}});e=n.widget;t=!1;n(document).mouseup(function(){t=!1});o=n.widget("ui.mouse",{version:"1.11.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(n){return t._mouseDown(n)}).bind("click."+this.widgetName,function(i){if(!0===n.data(i.target,t.widgetName+".preventClickEvent"))return n.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1});this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);this._mouseMoveDelegate&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!t){this._mouseMoved=!1;this._mouseStarted&&this._mouseUp(i);this._mouseDownEvent=i;var r=this,u=i.which===1,f=typeof this.options.cancel=="string"&&i.target.nodeName?n(i.target).closest(this.options.cancel).length:!1;return!u||f||!this._mouseCapture(i)?!0:(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){r.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted))?(i.preventDefault(),!0):(!0===n.data(i.target,this.widgetName+".preventClickEvent")&&n.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(n){return r._mouseMove(n)},this._mouseUpDelegate=function(n){return r._mouseUp(n)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),t=!0,!0)}},_mouseMove:function(t){return this._mouseMoved&&(n.ui.ie&&(!document.documentMode||document.documentMode<9)&&!t.button||!t.which)?this._mouseUp(t):((t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted)?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(i){return this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,i.target===this._mouseDownEvent.target&&n.data(i.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(i)),t=!1,!1},_mouseDistanceMet:function(n){return Math.max(Math.abs(this._mouseDownEvent.pageX-n.pageX),Math.abs(this._mouseDownEvent.pageY-n.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}});n.widget("ui.draggable",n.ui.mouse,{version:"1.11.4",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){this.options.helper==="original"&&this._setPositionRelative();this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._setHandleClassName();this._mouseInit()},_setOption:function(n,t){this._super(n,t);n==="handle"&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){if((this.helper||this.element).is(".ui-draggable-dragging")){this.destroyOnClear=!0;return}this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._removeHandleClassName();this._mouseDestroy()},_mouseCapture:function(t){var i=this.options;return(this._blurActiveElement(t),this.helper||i.disabled||n(t.target).closest(".ui-resizable-handle").length>0)?!1:(this.handle=this._getHandle(t),!this.handle)?!1:(this._blockFrames(i.iframeFix===!0?"iframe":i.iframeFix),!0)},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map(function(){var t=n(this);return n("<div>").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var i=this.document[0];if(this.handleElement.is(t.target))try{i.activeElement&&i.activeElement.nodeName.toLowerCase()!=="body"&&n(i.activeElement).blur()}catch(r){}},_mouseStart:function(t){var i=this.options;return(this.helper=this._createHelper(t),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),n.ui.ddmanager&&(n.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return n(this).css("position")==="fixed"}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(t),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",t)===!1)?(this._clear(),!1):(this._cacheHelperProportions(),n.ui.ddmanager&&!i.dropBehaviour&&n.ui.ddmanager.prepareOffsets(this,t),this._normalizeRightBottom(),this._mouseDrag(t,!0),n.ui.ddmanager&&n.ui.ddmanager.dragStart(this,t),!0)},_refreshOffsets:function(n){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()};this.offset.click={left:n.pageX-this.offset.left,top:n.pageY-this.offset.top}},_mouseDrag:function(t,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var r=this._uiHash();if(this._trigger("drag",t,r)===!1)return this._mouseUp({}),!1;this.position=r.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",n.ui.ddmanager&&n.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var r=this,i=!1;return n.ui.ddmanager&&!this.options.dropBehaviour&&(i=n.ui.ddmanager.drop(this,t)),this.dropped&&(i=this.dropped,this.dropped=!1),this.options.revert==="invalid"&&!i||this.options.revert==="valid"&&i||this.options.revert===!0||n.isFunction(this.options.revert)&&this.options.revert.call(this.element,i)?n(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){r._trigger("stop",t)!==!1&&r._clear()}):this._trigger("stop",t)!==!1&&this._clear(),!1},_mouseUp:function(t){return this._unblockFrames(),n.ui.ddmanager&&n.ui.ddmanager.dragStop(this,t),this.handleElement.is(t.target)&&this.element.focus(),n.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){return this.options.handle?!!n(t.target).closest(this.element.find(this.options.handle)).length:!0},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element;this.handleElement.addClass("ui-draggable-handle")},_removeHandleClassName:function(){this.handleElement.removeClass("ui-draggable-handle")},_createHelper:function(t){var r=this.options,u=n.isFunction(r.helper),i=u?n(r.helper.apply(this.element[0],[t])):r.helper==="clone"?this.element.clone().removeAttr("id"):this.element;return i.parents("body").length||i.appendTo(r.appendTo==="parent"?this.element[0].parentNode:r.appendTo),u&&i[0]===this.element[0]&&this._setPositionRelative(),i[0]===this.element[0]||/(fixed|absolute)/.test(i.css("position"))||i.css("position","absolute"),i},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(t){typeof t=="string"&&(t=t.split(" "));n.isArray(t)&&(t={left:+t[0],top:+t[1]||0});"left"in t&&(this.offset.click.left=t.left+this.margins.left);"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left);"top"in t&&(this.offset.click.top=t.top+this.margins.top);"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_isRootNode:function(n){return/(html|body)/i.test(n.tagName)||n===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),i=this.document[0];return this.cssPosition==="absolute"&&this.scrollParent[0]!==i&&n.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition!=="relative")return{top:0,left:0};var n=this.element.position(),t=this._isRootNode(this.scrollParent[0]);return{top:n.top-(parseInt(this.helper.css("top"),10)||0)+(t?0:this.scrollParent.scrollTop()),left:n.left-(parseInt(this.helper.css("left"),10)||0)+(t?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var f,t,i,r=this.options,u=this.document[0];if(this.relativeContainer=null,!r.containment){this.containment=null;return}if(r.containment==="window"){this.containment=[n(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,n(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,n(window).scrollLeft()+n(window).width()-this.helperProportions.width-this.margins.left,n(window).scrollTop()+(n(window).height()||u.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];return}if(r.containment==="document"){this.containment=[0,0,n(u).width()-this.helperProportions.width-this.margins.left,(n(u).height()||u.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];return}if(r.containment.constructor===Array){this.containment=r.containment;return}(r.containment==="parent"&&(r.containment=this.helper[0].parentNode),t=n(r.containment),i=t[0],i)&&(f=/(scroll|auto)/.test(t.css("overflow")),this.containment=[(parseInt(t.css("borderLeftWidth"),10)||0)+(parseInt(t.css("paddingLeft"),10)||0),(parseInt(t.css("borderTopWidth"),10)||0)+(parseInt(t.css("paddingTop"),10)||0),(f?Math.max(i.scrollWidth,i.offsetWidth):i.offsetWidth)-(parseInt(t.css("borderRightWidth"),10)||0)-(parseInt(t.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(f?Math.max(i.scrollHeight,i.offsetHeight):i.offsetHeight)-(parseInt(t.css("borderBottomWidth"),10)||0)-(parseInt(t.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=t)},_convertPositionTo:function(n,t){t||(t=this.position);var i=n==="absolute"?1:-1,r=this._isRootNode(this.scrollParent[0]);return{top:t.top+this.offset.relative.top*i+this.offset.parent.top*i-(this.cssPosition==="fixed"?-this.offset.scroll.top:r?0:this.offset.scroll.top)*i,left:t.left+this.offset.relative.left*i+this.offset.parent.left*i-(this.cssPosition==="fixed"?-this.offset.scroll.left:r?0:this.offset.scroll.left)*i}},_generatePosition:function(n,t){var i,s,u,f,r=this.options,h=this._isRootNode(this.scrollParent[0]),e=n.pageX,o=n.pageY;return h&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),t&&(this.containment&&(this.relativeContainer?(s=this.relativeContainer.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,n.pageX-this.offset.click.left<i[0]&&(e=i[0]+this.offset.click.left),n.pageY-this.offset.click.top<i[1]&&(o=i[1]+this.offset.click.top),n.pageX-this.offset.click.left>i[2]&&(e=i[2]+this.offset.click.left),n.pageY-this.offset.click.top>i[3]&&(o=i[3]+this.offset.click.top)),r.grid&&(u=r.grid[1]?this.originalPageY+Math.round((o-this.originalPageY)/r.grid[1])*r.grid[1]:this.originalPageY,o=i?u-this.offset.click.top>=i[1]||u-this.offset.click.top>i[3]?u:u-this.offset.click.top>=i[1]?u-r.grid[1]:u+r.grid[1]:u,f=r.grid[0]?this.originalPageX+Math.round((e-this.originalPageX)/r.grid[0])*r.grid[0]:this.originalPageX,e=i?f-this.offset.click.left>=i[0]||f-this.offset.click.left>i[2]?f:f-this.offset.click.left>=i[0]?f-r.grid[0]:f+r.grid[0]:f),r.axis==="y"&&(e=this.originalPageX),r.axis==="x"&&(o=this.originalPageY)),{top:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition==="fixed"?-this.offset.scroll.top:h?0:this.offset.scroll.top),left:e-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition==="fixed"?-this.offset.scroll.left:h?0:this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove();this.helper=null;this.cancelHelperRemoval=!1;this.destroyOnClear&&this.destroy()},_normalizeRightBottom:function(){this.options.axis!=="y"&&this.helper.css("right")!=="auto"&&(this.helper.width(this.helper.width()),this.helper.css("right","auto"));this.options.axis!=="x"&&this.helper.css("bottom")!=="auto"&&(this.helper.height(this.helper.height()),this.helper.css("bottom","auto"))},_trigger:function(t,i,r){return r=r||this._uiHash(),n.ui.plugin.call(this,t,[i,r,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),r.offset=this.positionAbs),n.Widget.prototype._trigger.call(this,t,i,r)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});n.ui.plugin.add("draggable","connectToSortable",{start:function(t,i,r){var u=n.extend({},i,{item:r.element});r.sortables=[];n(r.options.connectToSortable).each(function(){var i=n(this).sortable("instance");i&&!i.options.disabled&&(r.sortables.push(i),i.refreshPositions(),i._trigger("activate",t,u))})},stop:function(t,i,r){var u=n.extend({},i,{item:r.element});r.cancelHelperRemoval=!1;n.each(r.sortables,function(){var n=this;n.isOver?(n.isOver=0,r.cancelHelperRemoval=!0,n.cancelHelperRemoval=!1,n._storedCSS={position:n.placeholder.css("position"),top:n.placeholder.css("top"),left:n.placeholder.css("left")},n._mouseStop(t),n.options.helper=n.options._helper):(n.cancelHelperRemoval=!0,n._trigger("deactivate",t,u))})},drag:function(t,i,r){n.each(r.sortables,function(){var f=!1,u=this;u.positionAbs=r.positionAbs;u.helperProportions=r.helperProportions;u.offset.click=r.offset.click;u._intersectsWith(u.containerCache)&&(f=!0,n.each(r.sortables,function(){return this.positionAbs=r.positionAbs,this.helperProportions=r.helperProportions,this.offset.click=r.offset.click,this!==u&&this._intersectsWith(this.containerCache)&&n.contains(u.element[0],this.element[0])&&(f=!1),f}));f?(u.isOver||(u.isOver=1,r._parent=i.helper.parent(),u.currentItem=i.helper.appendTo(u.element).data("ui-sortable-item",!0),u.options._helper=u.options.helper,u.options.helper=function(){return i.helper[0]},t.target=u.currentItem[0],u._mouseCapture(t,!0),u._mouseStart(t,!0,!0),u.offset.click.top=r.offset.click.top,u.offset.click.left=r.offset.click.left,u.offset.parent.left-=r.offset.parent.left-u.offset.parent.left,u.offset.parent.top-=r.offset.parent.top-u.offset.parent.top,r._trigger("toSortable",t),r.dropped=u.element,n.each(r.sortables,function(){this.refreshPositions()}),r.currentItem=r.element,u.fromOutside=r),u.currentItem&&(u._mouseDrag(t),i.position=u.position)):u.isOver&&(u.isOver=0,u.cancelHelperRemoval=!0,u.options._revert=u.options.revert,u.options.revert=!1,u._trigger("out",t,u._uiHash(u)),u._mouseStop(t,!0),u.options.revert=u.options._revert,u.options.helper=u.options._helper,u.placeholder&&u.placeholder.remove(),i.helper.appendTo(r._parent),r._refreshOffsets(t),i.position=r._generatePosition(t,!0),r._trigger("fromSortable",t),r.dropped=!1,n.each(r.sortables,function(){this.refreshPositions()}))})}});n.ui.plugin.add("draggable","cursor",{start:function(t,i,r){var u=n("body"),f=r.options;u.css("cursor")&&(f._cursor=u.css("cursor"));u.css("cursor",f.cursor)},stop:function(t,i,r){var u=r.options;u._cursor&&n("body").css("cursor",u._cursor)}});n.ui.plugin.add("draggable","opacity",{start:function(t,i,r){var u=n(i.helper),f=r.options;u.css("opacity")&&(f._opacity=u.css("opacity"));u.css("opacity",f.opacity)},stop:function(t,i,r){var u=r.options;u._opacity&&n(i.helper).css("opacity",u._opacity)}});n.ui.plugin.add("draggable","scroll",{start:function(n,t,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1));i.scrollParentNotHidden[0]!==i.document[0]&&i.scrollParentNotHidden[0].tagName!=="HTML"&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(t,i,r){var u=r.options,o=!1,e=r.scrollParentNotHidden[0],f=r.document[0];e!==f&&e.tagName!=="HTML"?(u.axis&&u.axis==="x"||(r.overflowOffset.top+e.offsetHeight-t.pageY<u.scrollSensitivity?e.scrollTop=o=e.scrollTop+u.scrollSpeed:t.pageY-r.overflowOffset.top<u.scrollSensitivity&&(e.scrollTop=o=e.scrollTop-u.scrollSpeed)),u.axis&&u.axis==="y"||(r.overflowOffset.left+e.offsetWidth-t.pageX<u.scrollSensitivity?e.scrollLeft=o=e.scrollLeft+u.scrollSpeed:t.pageX-r.overflowOffset.left<u.scrollSensitivity&&(e.scrollLeft=o=e.scrollLeft-u.scrollSpeed))):(u.axis&&u.axis==="x"||(t.pageY-n(f).scrollTop()<u.scrollSensitivity?o=n(f).scrollTop(n(f).scrollTop()-u.scrollSpeed):n(window).height()-(t.pageY-n(f).scrollTop())<u.scrollSensitivity&&(o=n(f).scrollTop(n(f).scrollTop()+u.scrollSpeed))),u.axis&&u.axis==="y"||(t.pageX-n(f).scrollLeft()<u.scrollSensitivity?o=n(f).scrollLeft(n(f).scrollLeft()-u.scrollSpeed):n(window).width()-(t.pageX-n(f).scrollLeft())<u.scrollSensitivity&&(o=n(f).scrollLeft(n(f).scrollLeft()+u.scrollSpeed))));o!==!1&&n.ui.ddmanager&&!u.dropBehaviour&&n.ui.ddmanager.prepareOffsets(r,t)}});n.ui.plugin.add("draggable","snap",{start:function(t,i,r){var u=r.options;r.snapElements=[];n(u.snap.constructor!==String?u.snap.items||":data(ui-draggable)":u.snap).each(function(){var t=n(this),i=t.offset();this!==r.element[0]&&r.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:i.top,left:i.left})})},drag:function(t,i,r){for(var e,o,s,h,c,a,l,v,w,b=r.options,f=b.snapTolerance,y=i.offset.left,k=y+r.helperProportions.width,p=i.offset.top,d=p+r.helperProportions.height,u=r.snapElements.length-1;u>=0;u--){if(c=r.snapElements[u].left-r.margins.left,a=c+r.snapElements[u].width,l=r.snapElements[u].top-r.margins.top,v=l+r.snapElements[u].height,k<c-f||y>a+f||d<l-f||p>v+f||!n.contains(r.snapElements[u].item.ownerDocument,r.snapElements[u].item)){r.snapElements[u].snapping&&r.options.snap.release&&r.options.snap.release.call(r.element,t,n.extend(r._uiHash(),{snapItem:r.snapElements[u].item}));r.snapElements[u].snapping=!1;continue}b.snapMode!=="inner"&&(e=Math.abs(l-d)<=f,o=Math.abs(v-p)<=f,s=Math.abs(c-k)<=f,h=Math.abs(a-y)<=f,e&&(i.position.top=r._convertPositionTo("relative",{top:l-r.helperProportions.height,left:0}).top),o&&(i.position.top=r._convertPositionTo("relative",{top:v,left:0}).top),s&&(i.position.left=r._convertPositionTo("relative",{top:0,left:c-r.helperProportions.width}).left),h&&(i.position.left=r._convertPositionTo("relative",{top:0,left:a}).left));w=e||o||s||h;b.snapMode!=="outer"&&(e=Math.abs(l-p)<=f,o=Math.abs(v-d)<=f,s=Math.abs(c-y)<=f,h=Math.abs(a-k)<=f,e&&(i.position.top=r._convertPositionTo("relative",{top:l,left:0}).top),o&&(i.position.top=r._convertPositionTo("relative",{top:v-r.helperProportions.height,left:0}).top),s&&(i.position.left=r._convertPositionTo("relative",{top:0,left:c}).left),h&&(i.position.left=r._convertPositionTo("relative",{top:0,left:a-r.helperProportions.width}).left));!r.snapElements[u].snapping&&(e||o||s||h||w)&&r.options.snap.snap&&r.options.snap.snap.call(r.element,t,n.extend(r._uiHash(),{snapItem:r.snapElements[u].item}));r.snapElements[u].snapping=e||o||s||h||w}}});n.ui.plugin.add("draggable","stack",{start:function(t,i,r){var f,e=r.options,u=n.makeArray(n(e.stack)).sort(function(t,i){return(parseInt(n(t).css("zIndex"),10)||0)-(parseInt(n(i).css("zIndex"),10)||0)});u.length&&(f=parseInt(n(u[0]).css("zIndex"),10)||0,n(u).each(function(t){n(this).css("zIndex",f+t)}),this.css("zIndex",f+u.length))}});n.ui.plugin.add("draggable","zIndex",{start:function(t,i,r){var u=n(i.helper),f=r.options;u.css("zIndex")&&(f._zIndex=u.css("zIndex"));u.css("zIndex",f.zIndex)},stop:function(t,i,r){var u=r.options;u._zIndex&&n(i.helper).css("zIndex",u._zIndex)}});s=n.ui.draggable});Common={IsLogin:function(){return wz.Common.isLogin()},IsMobile:function(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?!0:!1},SelfAuth:function(n){return n.target="SelfAuth",n.action=wz.Http.Portal+"/Authenticate/SelfAuthPop.aspx",window.open("about:blank","SelfAuth","width=428,height=535"),n.submit(),!0},fnValidateEmpty:function(n,t){var i=n.value.replace(/(^\s*)|(\s*$)/g,"");return i==""?(t!=""&&(alert(t),n.type!="hidden"&&n.focus()),n.value=i,!1):!0},fnValidateSize:function(n,t,i,r,u){var e=n.value.replace(/(^\s*)|(\s*$)/g,""),f,s,o;if(f=0,r)for(o=0;o<e.length;o++)s=e.charCodeAt(o),s>=0&&s<256?f++:f+=2;else f=e.length;return(blnResult=u==1?f>i?!0:!1:f<i?!0:!1,blnResult)?(t!=""&&(alert(t),n.type!="hidden"&&n.focus()),n.value=e,!1):!0},fnValidateRadio:function(n,t){for(var r=0,i=0;i<n.length;i++)if(n[i].checked){r+=1;break}return r==0?(alert(t),!1):!0},CheckNumeric:function(n){this.IsNumeric(n)||(alert("숫자만 입력 가능합니다."),n.type!="hidden"&&(n.value=""),n.focus())},IsNumeric:function(n){var t=new String(n.value);return t.search(/\D/)!=-1?!1:!0},GoNextField:function(n,t,i){n.value.length>=i&&t.focus()},GoFindID:function(){location.href=wz.Http.Member+"/Forgot/"},GoJoin:function(){location.href=wz.Http.Member+"/signup/"},doLogin:function(){wz.GNB.Login()},AlertLogin:function(){wz.GNB.OpenLogInLayer(480,573,strGameCode)},fnGoPage:function(n,t,i,r,u){var f="";f=n+"?CP="+t+"&ST="+i+"&SK="+escape(r);u.length>0&&(f=f+u);location.href=f},ContentLimit:function(n,t){var n=n;return Common.intStrLen(t)>n?!0:!1},fnCheckInput:function(n){for(var i="0",t=0;t<n.length;t++)n.substring(t,t+1)!=" "&&(i="1");return i=="0"?!1:!0},intStrLen:function(n){for(var t=0,i,r=0;r<n.length;r++)i=n.charCodeAt(r),i>=0&&i<256?t++:t+=2;return t},PrevNext:function(n,t,i){if(n==0){alert("글이 존재하지 않습니다.");return}var i=i+"?S="+n+"&CP="+t;location.href=i},SetCookie:function(n,t,i){var r=new Date;r.setDate(r.getDate()+i);document.cookie=n+"="+escape(t)+";path=/;expires="+r.toUTCString()+";"},SetMidnightCookie:function(n,t){var i=new Date;i.setDate(i.getDate()+1);i.setHours(0,0,0,0);document.cookie=n+"="+escape(t)+";path=/;expires="+i.toUTCString()+";"},SetDomainCookie:function(n,t,i){var r=new Date;r.setDate(r.getDate()+i);document.cookie=n+"="+escape(t)+";path=/;expires="+r.toUTCString()+"; domain="+__DOMAIN_TOP+";"},SetSessionCookie:function(n,t){document.cookie=n+"="+escape(t)+";path=/;expires=0;"},GetCookie:function(n){for(var r=n+"=",t=0,i;t<=document.cookie.length;){if(i=t+r.length,document.cookie.substring(t,i)==r)return(endOfCookie=document.cookie.indexOf(";",i))==-1&&(endOfCookie=document.cookie.length),unescape(document.cookie.substring(i,endOfCookie));if(t=document.cookie.indexOf(" ",t)+1,t==0)break}return""},ImageView:function(n){window.open(n)},intStrLen:function(n){for(var t=0,i,r=0;r<n.length;r++)i=n.charCodeAt(r),i>=0&&i<256?t++:t+=2;return t},CutString:function(n,t){for(var f,e,r=0,u="",i=0;i<n.length;i++)if(f=n.charCodeAt(i),e=n.charAt(i),f>=0&&f<256?r++:r+=2,r>t)break;else u=u+e;return u},strLimit:function(n,t){Common.intStrLen(n.value)>t&&(alert("한글 "+t/2+"자 까지 입력할 수 있습니다."),n.value=Common.CutString(n.value,t))},CheckAuth:function(n){$.ajax({type:"GET",url:n,dataType:"json",success:function(t){t.Return&&t.ReturnCode==0?location.href=n:t.ReturnCode==403?wz.Common.AlertAuthPopup():t.ReturnCode==3?wz.GNB.OpenGameAgreePop(strGameCode):alert(t.Message)},error:function(n){var t=n.status;t==401?Common.AlertLogin():t==402&&wz.GNB.OpenGameAgreePop(strGameCode)}})},getParameterByName:function(n,t){t||(t=window.location.href);n=n.replace(/[\[\]]/g,"\\$&");var r=new RegExp("[?&]"+n+"(=([^&#]*)|&|#|$)"),i=r.exec(t);return i?i[2]?decodeURIComponent(i[2].replace(/\+/g," ")):"":null}};var __blnDev=location.href.indexOf("https://local-")==0,__blnAlpha=location.href.indexOf("https://alpha-")==0,__blnLive=!0,__strHostPreFix="https://";__blnDev&&(__strHostPreFix="https://local-",__blnLive=!1);__blnAlpha&&(__strHostPreFix="https://alpha-",__blnLive=!1);var __DOMAIN_TOP="webzen.co.kr",__DOMAIN_IMAGE="//image.webzen.kr/R2/official/v01",__DOMAIN_MAIN=__strHostPreFix+"r2.webzen.co.kr",__DOMAIN_MEMBER=__strHostPreFix+"member.webzen.co.kr",__DOMAIN_UPLOAD=__strHostPreFix+"upload.webzen.co.kr",__DOMAIN_FILES=__strHostPreFix+"files.webzen.co.kr",__DOMAIN_PAYMENT=__strHostPreFix+"payment.webzen.co.kr",__DOMAIN_SHOP=__strHostPreFix+"shop.r2.webzen.co.kr",__DOMAIN_PLATFORM=__strHostPreFix+"platform.webzen.kr";document.domain=__DOMAIN_TOP;strGameCode="09";GameLib={_ACTIVEX_Version:1029,_GameID:strGameCode,_ServiceID:1,_AuthUseType:1,_FileCheck:0,_MultiClient:1,_GamePlayUrl:"https://"+location.host+"/gamestart/play",_GameStartUrl:"https://"+location.host+"/gamestart",_GameStarterDownLoadUrl:"https://"+location.host+"/gamestart/install",_GameClientDownLoadUrl:"https://"+location.host+"/data/game-download",Exec:function(n){wz.Common.isLogin()?wz.GameStarter.Exec(this._FileCheck,this._GameID,this._ACTIVEX_Version,n,this._AuthUseType,this._MultiClient):(alert("로그인 후 사용 가능합니다."),wz.GNB.Login())},moveStarterDownLoad:function(){var n=this;return $.openDOMWindow({height:340,width:530,borderSize:0,windowSource:"iframe",windowSourceURL:n._GameStarterDownLoadUrl,windowPadding:0,overlayOpacity:60}),!1},moveClientDownLoad:function(){confirm("게임이 설치되어 있지 않습니다.\n\n게임 클라이언트 다운로드 페이지로 이동하시겠습니까?")&&(document.location.href=unescape(this._GameClientDownLoadUrl))},moveGamePlaying:function(n){document.location.href=unescape(this._GamePlayUrl+"?SI="+n)},popSelfCertificateForProtectedAccount:function(n){var t=window.open("/gamestart/protectedaccount/"+n,"popCert","width=650,height=515,top=150,left=200");t.focus()}},function(n){n.fn.closeDOMWindow=function(t){t||(t={});var i=function(){var i,u,r;t.anchoredClassName?(i=n("."+t.anchoredClassName),i.fadeOut("fast",function(){n.fn.draggable?i.draggable("destory").trigger("unload").remove():i.trigger("unload").remove()}),t.functionCallOnClose&&t.functionCallAfterClose()):(u=n("#DOMWindowOverlay"),r=n("#DOMWindow"),u.fadeOut("fast",function(){u.trigger("unload").unbind().remove()}),r.fadeOut("fast",function(){n.fn.draggable?r.draggable("destroy").trigger("unload").remove():r.trigger("unload").remove()}),n(window).unbind("scroll.DOMWindow"),n(window).unbind("resize.DOMWindow"),n.fn.openDOMWindow.isIE6&&n("#DOMWindowIE6FixIframe").remove(),t.functionCallOnClose&&t.functionCallAfterClose())};if(t.eventType)return this.each(function(){n(this).bind(t.eventType,function(){return i(this),!1})});i()};n.closeDOMWindow=function(t){n.fn.closeDOMWindow(t)};n.fn.openDOMWindow=function(t){var r=n.fn.openDOMWindow,i;r.defaultsSettings={anchoredClassName:"",anchoredSelector:"",borderColor:"#ccc",borderSize:"4",draggable:0,eventType:null,fixedWindowY:100,functionCallOnOpen:null,functionCallOnClose:null,height:500,loader:0,loaderHeight:0,loaderImagePath:"",loaderWidth:0,modal:0,overlay:1,overlayColor:"#000",overlayOpacity:"85",positionLeft:0,positionTop:0,positionType:"centered",width:500,windowBGColor:"#fff",windowBGImage:null,windowHTTPType:"get",windowPadding:10,windowSource:"inline",windowSourceID:"",windowSourceURL:"",windowSourceAttrURL:"href",windowWrap:""};i=n.extend({},n.fn.openDOMWindow.defaultsSettings,t||{});r.viewPortHeight=function(){return self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight};r.viewPortWidth=function(){return self.innerWidth||document.documentElement.clientWidth||document.body.clientWidth};r.scrollOffsetHeight=function(){return self.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop};r.scrollOffsetWidth=function(){return self.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft};r.isIE6=typeof document.body.style.maxHeight=="undefined";var f=function(){var t=n("#DOMWindowOverlay"),i,u;r.isIE6?(i=document.documentElement.offsetHeight+document.documentElement.scrollTop-4,u=document.documentElement.offsetWidth-21,t.css({height:i+"px",width:u+"px"})):t.css({height:"100%",width:"100%",position:"fixed"})},e=function(){var t=document.documentElement.offsetHeight+document.documentElement.scrollTop-4,i=document.documentElement.offsetWidth-21;n("#DOMWindowIE6FixIframe").css({height:t+"px",width:i+"px"})},o=function(){var t=n("#DOMWindow");i.height+50>r.viewPortHeight()?t.css("left",Math.round(r.viewPortWidth()/2)+r.scrollOffsetWidth()-Math.round(t.outerWidth()/2)):(t.css("left",Math.round(r.viewPortWidth()/2)+r.scrollOffsetWidth()-Math.round(t.outerWidth()/2)),t.css("top",Math.round(r.viewPortHeight()/2)+r.scrollOffsetHeight()-Math.round(t.outerHeight()/2)))},l=function(){var t=n("#DOMWindowLoader");r.isIE6?(t.css({left:Math.round(r.viewPortWidth()/2)+r.scrollOffsetWidth()-Math.round(t.innerWidth()/2),position:"absolute"}),t.css({top:Math.round(r.viewPortHeight()/2)+r.scrollOffsetHeight()-Math.round(t.innerHeight()/2),position:"absolute"})):t.css({left:"50%",top:"50%",position:"fixed"})},s=function(){var t=n("#DOMWindow");t.css("left",i.positionLeft+r.scrollOffsetWidth());t.css("top",+i.positionTop+r.scrollOffsetHeight())},u=function(t){arguments[0]?(n("."+t+" #DOMWindowLoader").remove(),n("."+t+" #DOMWindowContent").fadeIn("fast",function(){i.functionCallOnOpen&&i.functionCallOnOpen()}),n("."+t+".closeDOMWindow").click(function(){return n.closeDOMWindow(),!1})):(n("#DOMWindowLoader").remove(),n("#DOMWindow").fadeIn("fast",function(){i.functionCallOnOpen&&i.functionCallOnOpen()}),n("#DOMWindow .closeDOMWindow").click(function(){return n.closeDOMWindow(),!1}))},h=function(n){var t={};return n.replace(/b([^&=]*)=([^&=]*)b/g,function(n,i,r){typeof t[i]!="undefined"?t[i]+=","+r:t[i]=r}),t},c=function(t){var a,v,w,c,y;if(i.windowSourceID=n(t).attr("href")||i.windowSourceID,i.windowSourceURL=n(t).attr(i.windowSourceAttrURL)||i.windowSourceURL,i.windowBGImage=i.windowBGImage?"background-image:url("+i.windowBGImage+")":"",i.positionType=="anchored"){var p=n(i.anchoredSelector).position(),b=p.left+i.positionLeft,k=p.top+i.positionTop;n("body").append('<div class="'+i.anchoredClassName+'" style="'+i.windowBGImage+";background-repeat:no-repeat;padding:"+i.windowPadding+"px;overflow:auto;position:absolute;top:"+k+"px;left:"+b+"px;height:"+i.height+"px;width:"+i.width+"px;background-color:"+i.windowBGColor+";border:"+i.borderSize+"px solid "+i.borderColor+';z-index:10001"><div id="DOMWindowContent" style="display:none"><\/div><\/div>');i.loader&&i.loaderImagePath!==""&&n("."+i.anchoredClassName).append('<div id="DOMWindowLoader" style="width:'+i.loaderWidth+"px;height:"+i.loaderHeight+'px;"><img src="'+i.loaderImagePath+'" /><\/div>');n.fn.draggable&&i.draggable&&n("."+i.anchoredClassName).draggable({cursor:"move"});switch(i.windowSource){case"inline":n("."+i.anchoredClassName+" #DOMWindowContent").append(n(i.windowSourceID).children());n("."+i.anchoredClassName).unload(function(){n("."+i.windowSourceID).append(n("."+i.anchoredClassName+" #DOMWindowContent").children())});u(i.anchoredClassName);break;case"iframe":n("."+i.anchoredClassName+" #DOMWindowContent").append('<iframe frameborder="0" hspace="0" wspace="0" src="'+i.windowSourceURL+'" name="DOMWindowIframe'+Math.round(Math.random()*1e3)+'" style="width:100%;height:100%;border:none;background-color:#fff;" class="'+i.anchoredClassName+'Iframe" ><\/iframe>');n("."+i.anchoredClassName+"Iframe").load(u(i.anchoredClassName));break;case"ajax":i.windowHTTPType=="post"?(i.windowSourceURL.indexOf("?")!==-1?(a=i.windowSourceURL.substr(0,i.windowSourceURL.indexOf("?")),v=h(i.windowSourceURL)):(a=i.windowSourceURL,v={}),n("."+i.anchoredClassName+" #DOMWindowContent").load(a,v,function(){u(i.anchoredClassName)})):(i.windowSourceURL.indexOf("?")==-1&&(i.windowSourceURL+="?"),n("."+i.anchoredClassName+" #DOMWindowContent").load(i.windowSourceURL+"&random="+(new Date).getTime(),function(){u(i.anchoredClassName)}))}}else{i.overlay&&(n("body").append('<div id="DOMWindowOverlay" style="z-index:10000;display:none;position:absolute;top:0;left:0;background-color:'+i.overlayColor+";filter:alpha(opacity="+i.overlayOpacity+");-moz-opacity: 0."+i.overlayOpacity+";opacity: 0."+i.overlayOpacity+';"><\/div>'),r.isIE6&&(n("body").append('<iframe id="DOMWindowIE6FixIframe"  src="blank.html"  style="width:100%;height:100%;z-index:9999;position:absolute;top:0;left:0;filter:alpha(opacity=0);"><\/iframe>'),e()),f(),w=n("#DOMWindowOverlay"),w.fadeIn("fast"),i.modal||w.click(function(){n.closeDOMWindow()}));i.loader&&i.loaderImagePath!==""&&(n("body").append('<div id="DOMWindowLoader" style="z-index:10002;width:'+i.loaderWidth+"px;height:"+i.loaderHeight+'px;"><img src="'+i.loaderImagePath+'" /><\/div>'),l());n("body").append('<div id="DOMWindow" style="background-repeat:no-repeat;'+i.windowBGImage+";overflow:hidden;padding:"+i.windowPadding+"px;display:none;height:"+i.height+"px;width:"+i.width+"px;background-color:"+i.windowBGColor+";border:"+i.borderSize+"px solid "+i.borderColor+'; position:absolute;z-index:10001"><\/div>');c=n("#DOMWindow");switch(i.positionType){case"centered":o();i.height+50>r.viewPortHeight()&&c.css("top",i.fixedWindowY+r.scrollOffsetHeight()+"px");break;case"absolute":c.css({top:i.positionTop+r.scrollOffsetHeight()+"px",left:i.positionLeft+r.scrollOffsetWidth()+"px"});n.fn.draggable&&i.draggable&&c.draggable({cursor:"move"});break;case"fixed":s();break;case"anchoredSingleWindow":var p=n(i.anchoredSelector).position(),b=p.left+i.positionLeft,k=p.top+i.positionTop;c.css({top:k+"px",left:b+"px"})}n(window).bind("scroll.DOMWindow",function(){i.overlay&&f();r.isIE6&&e();i.positionType=="centered"&&o();i.positionType=="fixed"&&s()});n(window).bind("resize.DOMWindow",function(){r.isIE6&&e();i.overlay&&f();i.positionType=="centered"&&o()});switch(i.windowSource){case"inline":c.append(n(i.windowSourceID).children());c.unload(function(){n(i.windowSourceID).append(c.children())});u();break;case"iframe":y='<iframe frameborder="0" hspace="0" wspace="0" src="'+i.windowSourceURL+'" name="DOMWindowIframe'+Math.round(Math.random()*1e3)+'" style="width:100%;height:100%;border:none;background-color:#fff;" id="DOMWindowIframe" ><\/iframe>';y=i.windowWrap==""?y:i.windowWrap.replace("{content}",y);c.append(y);n("#DOMWindowIframe").load(u());break;case"ajax":i.windowHTTPType=="post"?(i.windowSourceURL.indexOf("?")!==-1?(a=i.windowSourceURL.substr(0,i.windowSourceURL.indexOf("?")),v=h(i.windowSourceURL)):(a=i.windowSourceURL,v={}),c.load(a,v,function(){u()})):(i.windowSourceURL.indexOf("?")==-1&&(i.windowSourceURL+="?"),c.load(i.windowSourceURL+"&random="+(new Date).getTime(),function(){u()}))}}};if(i.eventType)return this.each(function(){n(this).bind(i.eventType,function(){return c(this),!1})});c()};n.openDOMWindow=function(t){n.fn.openDOMWindow(t)}}(jQuery);$(document).ready(function(){$.ajax({cache:!1,url:"/main/layerpopup",dataType:"json",success:function(n){var t,i,r;for($("body").append($("#popupTemplate").render(n)),t=0;t<n.length;t++)n[t].PositionSet==1?(i=$(window).width()?($(window).width()-n[t].Width)/2:0,r=$(window).height()?($(window).height()-n[t].Height)/2:0,$("#R2Popup"+n[t].PopupSeq).css({top:r+"px",left:i+"px"})):$("#R2Popup"+n[t].PopupSeq).css({top:n[t].PositionY+"px",left:n[t].PositionX+"px"}),$("#R2Popup"+n[t].PopupSeq).css({width:n[t].Width+"px",height:n[t].Height+"px"}),$("#R2Popup"+n[t].PopupSeq).show(),$("#R2Popup"+n[t].PopupSeq).draggable({containment:".main_roll_wrp",scroll:!1})}})});$(document).ready(function(){wz.Common.isLogin()&&$.ajax({type:"POST",url:"/main/CheckNewComeback",success:function(){},error:function(){}})})