function doInstallModule(a){var b=[];b.module_name=a,exec_xml("install","procInstallAdminInstall",b,completeInstallModule)}function doUpdateModule(a){var b=[];b.module_name=a,exec_xml("install","procInstallAdminUpdate",b,completeInstallModule)}function completeInstallModule(a){alert(a.message),location.reload()}function getOffset(a,b){for(var c=0,d=0;a&&a!=b;)c+=a.offsetTop,d+=a.offsetLeft,a=a.offsetParent;return{top:c,left:d}}jQuery(function(a){function b(){var b=a(".x>.body"),c=b.find(">.gnb"),d=b.children("#content.content");d.width("99.99%"),setTimeout(function(){d.removeAttr("style"),c.height()>d.height()&&d.height(c.height())},100)}if(window.scrollTo(0,0),a(document.body).on("click",".x [data-toggle]",function(){var b=a(this);if(b.is("a")&&b.attr("href")!=b.attr("data-toggle")){var c=b.attr("href");b.attr("data-toggle",c)}var d=a(b.attr("data-toggle")),e="a,input,button,textarea,select";return d.toggle(),d.is(":visible")&&!d.find(e).length?d.not(":disabled").attr("tabindex","0").focus():d.is(":visible")&&d.find(e).length?d.not(":disabled").find(e).eq(0).focus():b.focus(),!1}),a(document.body).on("click",".x [data-show]",function(){var b=a(this);if(b.is("a")&&b.attr("href")!=b.attr("data-show")){var c=b.attr("href");b.attr("data-show",c)}return a(b.attr("data-show")).show().attr("tabindex","0").focus(),!1}),a(document.body).on("click",".x [data-hide]",function(){var b=a(this);if(b.is("a")&&b.attr("href")!=b.attr("data-hide")){var c=b.attr("href");b.attr("data-hide",c)}return a(b.attr("data-hide")).hide(),b.focus(),!1}),a.fn.xeTabbable=function(){a(this).each(function(){var b=a(this);b.find(">.x_nav-tabs>li>a").each(function(b){a(this).attr("data-index",b+1)}),b.find(">.x_tab-content>.x_tab-pane").each(function(b){a(this).attr("data-index",b+1)})}),a('.x .x_tab-content>.x_tab-pane:not(".x_active")').hide()},a(".x .x_tabbable").xeTabbable(),a(document.body).on("click",'.x .x_nav-tabs>li>a[href^="#"]',function(){var b=a(this);return!b.parent("li").hasClass("x_disabled")&&(b.parent("li").addClass("x_active").siblings().removeClass("x_active"),b.closest(".x_nav-tabs").next(".x_tab-content").find(">.x_tab-pane").eq(b.attr("data-index")-1).addClass("x_active").show().siblings(".x_tab-pane").removeClass("x_active").hide(),b.parents(".x_tabbable").trigger("tab_change",[parseInt(b.attr("data-index"))-1,b]),!1)}),a.fn.gnb=function(){var c=a(".x>.body"),d=c.find(">.gnb"),e=d.find(">ul>li"),f=new Date;f.setTime(f.getTime()+30758400),e.find(">a").prepend(""),e.find(">ul").prev("a").append(""),e.each(function(b){a(this).attr("data-index",b+1)});var g=e.find(">ul>li.active_").closest("li.active").attr("data-index");e.find(">ul>li.active_").clone().addClass("active").attr("data-index",g).prependTo("#gnbNav").find(">a").prepend(""),e.find(">a").click(function(){function d(){c.removeClass("wide"),b()}var e=a(this),g=a(this).parent("li"),h=g.hasClass("open"),i=g.hasClass("active"),j=g.find(">ul").length>=1,k=c.hasClass("wide");return h||i||!j?h&&!i&&j&&!k?(g.removeClass("open").find(">ul").slideUp(100),d(),setCookie("__xe_admin_gnb_tx_"+e.data("href"),"close",f),!1):k&&!j||i||k&&h?(d(),!1):void 0:(g.addClass("open").find(">ul").slideDown(100),d(),setCookie("__xe_admin_gnb_tx_"+e.data("href"),"open",f),!1)}),d.find('>a[href="#gnbNav"]').click(function(){return a(this).parent(".gnb").toggleClass("open"),c.toggleClass("wide"),a(window).width()<=980&&!d.hasClass("open")&&a("#gnbNav").removeClass("ex"),b(),a(this).parent(".gnb").hasClass("open")?setCookie("__xe_admin_gnb_status","open",f):setCookie("__xe_admin_gnb_status","close",f),!1}),d.find(".exMenu>button").click(function(){a("#gnbNav").toggleClass("ex"),b(),a("#gnbNav").hasClass("ex")?setCookie("__xe_admin_gnb_ex_status","open",f):setCookie("__xe_admin_gnb_ex_status","close",f)});var h=getCookie("__xe_admin_gnb_status");h&&setCookie("__xe_admin_gnb_status",h,f);var i=getCookie("__xe_admin_gnb_ex_status");if(i&&setCookie("__xe_admin_gnb_xe_status",i,f),"undefined"!=typeof __xe_admin_gnb_txs)for(var j in __xe_admin_gnb_txs){var k=__xe_admin_gnb_txs[j],l=getCookie(k);setCookie(k,l,f)}},a(".gnb").gnb(),a(".x #lang").mouseleave(function(){a(this).hide()}).focusout(function(){var b=a(this);setTimeout(function(){b.find("a:focus").length||b.mouseleave()},500)}),a(".x th :checkbox").change(function(){var b=a(this),c=b.data("name");b.closest("table").find(":checkbox").filter(function(){var b=a(this);return!b.prop("disabled")&&(b.attr("name")==c||b.data("name")==c)}).prop("checked",b.prop("checked")).end().end().trigger("update.checkbox",[c,this.checked])}),a(document.body).on("click",".x .x_pagination .x_disabled, .x .x_pagination .x_active",function(){return!1}),a(".x .section").length>1){var c=a(".x .section").find(">h1:first");c.each(function(){var b=a(this);b.next().length&&b.append('')}),a(".x .section.collapsed>h1>.snToggle").removeClass("x_icon-chevron-up").addClass("x_icon-chevron-down"),c.click(function(){var c=a(this),d=a(this).find(">.snToggle"),e=c.closest(".section");e.hasClass("collapsed")?(e.removeClass("collapsed"),d.removeClass("x_icon-chevron-down").addClass("x_icon-chevron-up")):(e.addClass("collapsed"),d.removeClass("x_icon-chevron-up").addClass("x_icon-chevron-down")),b()})}var d=a(".x .x_alert");d.prepend(''),d.children(".x_close").click(function(){a(this).parent(".x_alert").hide()}),a(".x .x_btn").click(function(){if(a(this).hasClass("x_disabled"))return!1}),a.fn.vr=function(){this.each(function(){var b=a(this);"|"==b.text()&&b.addClass("vr").filter(":first-child, :last-child").remove()})},a(".x i").vr(),a.fn.labelMaker=function(){this.each(function(b){b+=1;var c=a(this),d="input, textarea, select",e=":radio, :checkbox",f="[id]",g="i"+b;c.next(d).filter(f).not(e).length?c.attr("for",c.next().attr("id")):c.next(d).not(f).not(e).length?c.attr("for",g).next().attr("id",g):c.prev(e).filter(f).length?c.attr("for",c.prev().attr("id")):c.prev(e).not(f).length?c.attr("for",g).prev().attr("id",g):c.children(d).filter(f).length?c.attr("for",c.children(d).filter(f).eq(0).attr("id")):c.children(d).not(f).length&&c.attr("for",g).children(d).not(f).eq(0).attr("id",g)})},a("label:not([for])").labelMaker(),a.fn.checkToggle=function(){function b(){setTimeout(function(){a(":checked").parent("label").addClass("checked"),a(':not(":checked")').parent("label").removeClass("checked")},0)}this.change(b),b()},a(":radio, :checkbox").checkToggle(),a.fn.fileTypeOverlap=function(){this.each(function(){var b=a(this);b.wrap('').before(b.attr("title"))})},a('input[type="file"].overlap').fileTypeOverlap(),a.fn.tableSpan=function(){this.each(function(){var b=a(this),c=b.find(">thead>tr:eq(0)>th").length,d=b.find(">tbody>tr:eq(0)>td:only-child");c!=d.attr("colspan")&&d.attr("colspan",c).css("text-align","center")})},a("table").tableSpan()}),jQuery(function(a){var b=[],c=1040,d=a('
').appendTo("body").hide();a.fn.xeModalWindow=function(){this.not(".xe-modal-window").addClass("xe-modal-window").each(function(){a(a(this).attr("href")).addClass("x").hide()}).click(function(){var b,c=a(this);return b=a(c.attr("href")),"showing"==b.data("state")?c.trigger("close.mw"):c.trigger("open.mw"),!1}).bind("open.mw",function(){function e(){j.trigger("after-open.mw")}var f,g,h,i,j=a(this);if(f=a(j.attr("href")),!b.length||b[b.length-1].get(0)!=f.get(0)){if(f.parent("body").length||(g=a(''),g.click(function(){f.data("anchor").trigger("close.mw")}),f.find("[data-hide]").click(function(){f.data("anchor").trigger("close.mw")}),a("body").append(f),f.prepend(g)),f.data("anchor",j),h=a.Event("before-open.mw"),j.trigger(h),h.isDefaultPrevented())return!1;i=j.data("duration")||"fast",f.data("state","showing"),a(document).bind("keydown.mw",function(a){if(27==a.which)return j.trigger("close.mw"),!1}),f.fadeIn(i,e).find("button.x_close:first").focus(),a("body").css("overflow","hidden"),b.push(f);var k=c+2*(b.length-1);d.css("z-index",k).show();var l=d.height(),m=l;m-=f.find(".x_modal-header:visible").height(),m-=f.find(".x_modal-footer:visible").height(),m-=150,f.find(".x_modal-body").css("height",m),f.css("z-index",k+1)}}).bind("close.mw",function(){function e(){i.trigger("after-close.mw")}var f,g,h,i=a(this);if(g=a(i.attr("href")),!b.length||b[b.length-1].get(0)==g.get(0)){if(f=a.Event("before-close.mw"),i.trigger(f),f.isDefaultPrevented())return!1;h=i.data("duration")||"fast",g.data("state","hiding"),g.fadeOut(h,e),a("body").css("overflow","auto"),i.focus(),b.pop();var j=c+2*(b.length-1);b.length?d.css("z-index",j):d.hide()}}),a("div.x_modal").addClass("x")},a("a.modalAnchor").xeModalWindow()}),jQuery(function(a){var b=!1;a.fn.xeContentToggler=function(){return this.not(".xe-content-toggler").addClass("xe-content-toggler").each(function(){var c=a(this);$layer=a(c.attr("href")),$layer.hide().not(".xe-toggling-content").addClass("xe-toggling-content").mousedown(function(a){b=!0}).focusout(function(a){setTimeout(function(){b||$layer.find(":focus").length||"showing"!=$layer.data("state")||c.trigger("close.tc"),b=!1},1)})}).click(function(){var b,c=a(this);return b=a(c.attr("href")),b.data("anchor",c),"showing"==b.data("state")?c.trigger("close.tc"):c.trigger("open.tc"),!1}).bind("open.tc",function(){function c(){g.trigger("after-open.tc")}var d,e,f,g=a(this);switch(d=a(g.attr("href")),e=g.data("effect"),f=g.data("duration")||"fast",d.data("state","showing"),g.trigger("before-open.tc"),b=!1,a(document).unbind("mousedown.tc keydown.tc").bind("mousedown.tc keydown.tc",function(b){if(b){if("keydown"==b.type&&27!=b.which)return!0;if("mousedown"==b.type){var c=a(b.target);if(c.is("html,.tgAnchor,.tgContent")||d.has(c).length)return!0}}return g.trigger("close.tc"),!1}),e){case"slide":d.slideDown(f,c);break;case"slide-h":var h=d.css({"overflow-x":"",width:""}).width();d.show().css({"overflow-x":"hidden",width:"0px"}).animate({width:h},f,function(){d.css({"overflow-x":"",width:""}),c()});break;case"fade":d.fadeIn(f,c);break;default:d.show(),g.trigger("after-open.tc")}}).bind("close.tc",function(){function b(){f.trigger("after-close.tc")}var c,d,e,f=a(this);switch(a(document).unbind("mousedown.tc keydown.tc"),c=a(f.attr("href")),d=f.data("effect"),e=f.data("duration")||"fast",c.data("state","hiding"),f.trigger("before-close.tc"),d){case"slide":c.slideUp(e,b);break;case"slide-h":c.animate({width:0},e,function(){c.hide(),b()});break;case"fade":c.fadeOut(e,b);break;default:c.hide(),f.trigger("after-close.tc")}}),this},a("a.tgAnchor").xeContentToggler()}),jQuery(function(a){a.fn.xeModuleFinder=function(){return this.not(".xe-module-finder").addClass("xe-module-finder").find("a.tgAnchor.findsite").bind("before-open.tc",function(){function b(b){var e,f,g,h=b.site_list;if(d.empty(),c.closest(".modulefinder").find(".moduleList,.moduleIdList").attr("disabled","disabled"),b.error||!a.isArray(h))return void c.trigger("close.tc");for(f=0,g=h.length;f").appendTo(d),a('

"),a("body").append(b),b.find("._ok").click(function(){a.xeMsgBox.fnOnOK()}),b.find("._cancel").click(function(){a.xeMsgBox.fnOnCancel()}),b.bind("show",function(){a.xeMsgBox.bVisible=!0,a.xeMsgBox._showFoggy(),a.xeMsgBox.fnOnShow(),b.find("input,button").length>0&&setTimeout(function(){b.find("input,button").each(function(b,c){var d=a(c);if(d.is(":visible"))return d.focus(),!1})},0)}),b.bind("hide",function(){a.xeMsgBox.bVisible=!1,a.xeMsgBox._hideFoggy(),a.xeMsgBox.fnOnHide()}),a(document.body).on("keydown",function(c){a.xeMsgBox.bVisible&&27===c.keyCode&&(b.find("._cancel").click(),c.preventDefault())}),a.xeMsgBox.fnOnOK=function(){"function"==typeof a.xeMsgBox.htOptions.fnOnOK&&a.xeMsgBox.htOptions.fnOnOK()||b.hide()},a.xeMsgBox.fnOnCancel=function(){"function"==typeof a.xeMsgBox.htOptions.fnOnCancel&&a.xeMsgBox.htOptions.fnOnCancel(),b.hide()},a.xeMsgBox.fnOnShow=function(){"function"==typeof a.xeMsgBox.htOptions.fnOnShow&&a.xeMsgBox.htOptions.fnOnShow()},a.xeMsgBox.fnOnHide=function(){"function"==typeof a.xeMsgBox.htOptions.fnOnHide&&a.xeMsgBox.htOptions.fnOnHide()},a.xeMsgBox.showMsgBox=function(c){a('head>link[rel="stylesheet"]:last').after(''),c=a.xeMsgBox.htOptions=c||{};var d=c.sTitle||"",e=c.sText||"",f=c.bDanger||!1;b.find("._title").html(d),b.find("._text").html(e),""===e?b.addClass("_nobody"):b.removeClass("_nobody");var g=b.find("._ok");f?(g.removeClass("x_btn-inverse"),g.addClass("x_btn-danger")):(g.removeClass("x_btn-danger"),g.addClass("x_btn-inverse")),c.bSmall?b.addClass("_small"):b.removeClass("_small"),c.bAlert?b.addClass("_type_alert"):b.removeClass("_type_alert"),b.show()},a.xeMsgBox.alertDialog=function(a){a=a||{},a.bAlert=!0,this.showMsgBox(a)},a.xeMsgBox.alert=function(a){htOptions={bAlert:!0,bNobody:!0,bSmall:!0,sText:a},this.showMsgBox(htOptions)},a.xeMsgBox.confirmDialog=function(a){a=a||{},a.bAlert=!1,this.showMsgBox(a)};var c=a.xeMsgBox.$foggyLayer=a("
");c.css({position:"fixed",top:0,left:0,backgroundColor:"#000",opacity:.5,display:"none",zIndex:9998}),a(a.find("body")).append(c),a.xeMsgBox._resizeFoggy=function(){c.css({width:0,height:0}),setTimeout(function(){c.css({width:a(document).width(),height:a(document).height()})},0)},a(window).resize(a.xeMsgBox._resizeFoggy),a.xeMsgBox._resizeFoggy(),a.xeMsgBox._showFoggy=function(){c.show()},a.xeMsgBox._hideFoggy=function(){c.hide()}}),jQuery(function(a){a.xeFoggy={};var b=a.xeFoggy.$foggyLayer=a("
");b.css({position:"fixed",top:0,left:0,backgroundColor:"#000",opacity:.5,display:"none",zIndex:9998}),a("body").append(b),a.xeFoggy._resizeFoggy=function(){b.css({width:0,height:0}),setTimeout(function(){b.css({width:a(document).width(),height:a(document).height()})},0)},a(window).resize(a.xeFoggy._resizeFoggy),a.xeFoggy._resizeFoggy(),a.xeFoggy.show=function(a){a?b.css({opacity:0}):b.css({opacity:.5}),b.show()},a.xeFoggy.hide=function(){b.hide()}}),jQuery(function(a){var b=!1,c=a(' ');a.fn.xeSortableTable=function(){return this.not(".xe-sortable-table").addClass("xe-sortable-table").delegate("button.dragBtn","mousedown.st",function(d){var e,f,g,h,i,j,k,l,m,n,o,p;if(1==d.which){if(e=a(this),f=e.closest("tr"),g=e.closest("table"),p=g.get(0).offsetParent,i=f.height(),j=f.width(),before_event=a.Event("before-drag.st"),g.trigger(before_event),before_event.isDefaultPrevented())return!1;l={x:d.pageX,y:d.pageY},k=getOffset(f.get(0),p),$clone=f.attr("target",!0).clone(!0).appendTo(g),o=(h=g.find("thead th")).length,h.filter("[colspan]").attr("colspan",function(a,b){o+=b-1}),c.find("td").attr("colspan",o),m=[],g.find("tbody>tr:not([target],.sticky,:hidden)").each(function(){var b,c=a(this);b=getOffset(this,p),m.push({top:b.top,bottom:b.top+c.height(),$item:c})}),$clone.addClass("draggable").css({position:"absolute",opacity:.6,width:j,height:i,left:k.left,top:k.top,zIndex:100}),c.css({position:"absolute",opacity:.6,width:j,height:"10px",left:k.left,top:k.top,backgroundColor:"#bbb",overflow:"hidden",zIndex:99}).appendTo(g),f.css("opacity",.6),a(document).unbind("mousedown.st mouseup.st").bind("mousemove.st",function(a){var b,d,e,f,g;for(n=null,b={x:l.x-a.pageX,y:l.y-a.pageY},d=k.top-b.y,e=0,f=m.length;ed||ed-12?(n.state="before",c.css("top",g.top-5)):(n.state="after",c.css("top",g.bottom-5)));$clone.css({top:d})}).bind("mouseup.st",function(d){var e;b=!1,a(document).unbind("mousemove.st mouseup.st"),f.removeAttr("target").css("opacity",""),$clone.remove(),c.remove(),n&&(e=a(n.element),e[n.state](f),g.trigger("after-drag.st"))})}}),this},a("table.sortable").xeSortableTable()}),jQuery(function(a){a(".filebox").bind("before-open.mw",function(){function b(e){d.html(e.html),d.find(".select").bind("click",function(b){var d=a("input.select_checkbox:checked");if(0===d.length){var e=a(this).closest("tr").find("img.filebox_item").attr("src");e?(c.trigger("filebox.selected",[e]),c.trigger("close.mw")):alert("None selected!")}else c.trigger("filebox.selected",[d]),c.trigger("close.mw");return!1}),d.find(".x_pagination").find("a").filter(function(){return!a(this).data("toggle")&&(!a(this).parent().hasClass("x_disabled")&&!a(this).parent().hasClass("x_active"))}).bind("click",function(){var c=a(this).attr("page");return a.exec_json("module.getFileBoxListHtml",{page:c},b),!1}),a("#goToFileBox").find("button").bind("click",function(){var c=a(this).prev("input").val();return a.exec_json("module.getFileBoxListHtml",{page:c},b),!1}),d.closest(".x_modal-body").scrollTop(0)}var c,d,e;c=a(this),e=c.attr("href"),d=a(e).find(".filebox_list"),a.exec_json("module.getFileBoxListHtml",{page:"1"},b)});var b=a(".x .dsTg .__simple"),c=a(".x .dsTg .__detail");a(".x .dsTg td.title").each(function(){var b=a(this);0===b.find("p.x_alert").length&&b.addClass("tg").find(">*:not(:first-child)").hide()});var d=a(".x .dsTg td.tg>*:not(:first-child)");b.click(function(){d.hide(),c.removeClass("x_active"),b.addClass("x_active")}),c.click(function(){d.show(),c.addClass("x_active"),b.removeClass("x_active")})}),jQuery(function(a){a.fn.xeMultilingualWindow=function(b){function c(){return o.is(":visible")&&q&&confirm(xe.msg_confirm_save_and_use_multilingual)&&o.find(".save-useit").trigger("click"),!0}function d(){if(p.is(":visible")&&p.find(".editMode").length){var a=p.find(".editMode");confirm(xe.msg_confirm_save_and_use_multilingual)?a.find(".save").trigger("click"):a.find(".cancel").trigger("click")}return!0}function e(){return p.find(".item > fieldset").hide().prev("a").children("i").removeClass("x_icon-chevrom-up").addClass("x_icon-chevron-down"),n.find('[href="#lang_create"]').trigger("click"),o.find(".editMode").children("textarea").val(""),q=!1,!0}function f(a){a?(i(1,xe.current_lang,"",a,!1),n.find('[href="#lang_search"]').trigger("click",!0)):i(1,xe.current_lang,"","",!1)}function g(){return!!c()&&(!!d()&&(!!e()&&void 0))}function h(a,b){var c=n.data("lang-target");q=!1,c&&c.trigger("selected.g11n",[a,b])}function i(c,d,e,f,g){void 0===c&&(c=1),void 0===d&&(d=xe.current_lang),void 0===e&&(e=""),void 0===f&&(f=""),void 0===g&&(g=!0),a.exec_json("module.getModuleAdminLangListHtml",{page:c,lang_code:d,search_keyword:e,name:f,list_count:b.list_count,mid:current_url.getQuery("mid")},function(b){b&&b.html&&(p.html(b.html),j(),k(),l(),m(),g&&(document.location.href="#lang_search"),f&&a("#lang_search").find('[href^="#lang-"]').trigger("click"))})}function j(){p.find(".x_pagination a").click(function(){var b=a(this).data("page"),c=a(this).data("search_keyword"),d=a(this).data("current_lang");if(b)return i(b,d,c),!1}),p.find(".x_pagination").submit(function(){var b=a(this).find('[name="page"]').val(),c=a(this).data("search_keyword"),d=a(this).data("current_lang");return!!b&&(i(b,d,c),!1)})}function k(){p.find(".search").submit(function(){var b=a(this).find('[name="search_keyword"]').val();return i(1,a(this).find('[name="lang_code"]').val(),b),!1}),p.find("#search_cancel").click(function(){i(1,xe.current_lang,"")})}function l(){p.find(".set").append('').click(function(){function b(b){c.next("fieldset").find("textarea").each(function(){var c=a(this),d=b.langs[c.data("lang")];/^\$user_lang->/.test(d)?c.val("").data("value",""):c.val(d).data("value",d)}),c.data("is_loaded",!0)}var c=a(this),e=c.data("lang_code");d();var f="x_icon-chevron-up",g="x_icon-chevron-down";c.next("fieldset").is(":visible")?c.children("i").removeClass(f).addClass(g):(c.parent(".item").siblings(".item").find("a > i").removeClass(f).addClass(g).end().children("fieldset").hide(),c.children("i").removeClass(g).addClass(f)),void 0===c.data("is_loaded")&&a.exec_json("module.getModuleAdminLangCode",{name:e,mid:current_url.getQuery("mid")},b)})}function m(){b.view_use||p.find(".useit").hide(),b.view_modify||p.find(".modify").hide(),b.view_delete||p.find(".delete").hide(),"save"==b.modify_type&&p.find(".save").text(xe.cmd_save),p.find(".modify").click(function(){a(this).closest("fieldset").addClass("editMode").find("textarea").removeAttr("disabled"),a(this).siblings(".cancel").prependTo(a(this).parent()),a(this).siblings(".delete").attr("disabled","disabled")}),p.find(".cancel").click(function(){return a(this).closest("fieldset").removeClass("editMode").find("textarea").attr("disabled","disabled").each(function(){var b=a(this);b.val(b.data("value"))}),a(this).siblings(".modify").prependTo(a(this).parent()),a(this).siblings(".delete").removeAttr("disabled"),!1}),p.find(".delete").click(function(){if(confirm(xe.confirm_delete)){var b=a(this);lang_name=b.closest(".item").find('[href^="#lang-"]').data("lang_code"),a.exec_json("module.procModuleAdminDeleteLang",{name:lang_name,mid:current_url.getQuery("mid")},function(a){if(a){if(a.error)return void alert(a.message);var b=p.find(".x_pagination"),c=b.data("page"),d=b.data("search_keyword"),e=b.data("lang_code");c||($page=1),i(c,e,d)}})}}),p.find(".item").submit(function(){var b=a(this),c=b.find(".editMode").children("textarea"),d=b.find('[href^="#lang-"]'),e={},f=null;return c.each(function(){var b=a(this);e[b.attr("class")]=b.val(),b.data("tmp_value",b.val()),xe.current_lang==b.attr("class")&&(f=b.val())}),e.lang_name=d.data("lang_code"),e.mid=current_url.getQuery("mid"),a.exec_json("module.procModuleAdminInsertLang",e,function(e){e&&!e.error&&e.name&&(c.each(function(){var b=a(this);b.data("value",b.data("tmp_value"))}),d.children("span").html(f),p.find(".cancel").trigger("click"),b.find(".useit").trigger("click"))}),!1}),p.find(".useit").click(function(){var b=a(this),c=b.closest(".item").find('[href^="#lang-"]');h(c.data("lang_code"),c.children("span").text())})}var n=a(this),o=n.find("#lang_create"),p=n.find("#lang_search"),q=!1;return b=a.extend({create_type:"save_and_use",modify_type:"save_and_use",view_use:!0,view_modify:!0,view_delete:!1,list_count:5},b||{}),"save_and_use"!=b.create_type&&o.find(".save-useit").text(xe.cmd_save),n.find(".x_tabbable").xeTabbable(),o.find(".editMode textarea").change(function(){q=!0}),o.submit(function(){function c(a){a&&!a.error&&a.name&&("save_and_use"==b.create_type?h(a.name,g):(alert(a.message),e()))}var d=a(this),f={},g=null;return d.find(".editMode").children("textarea").each(function(){var b=a(this);f[b.attr("class")]=b.val(),xe.current_lang==b.attr("class")&&(g=b.val())}),g?(f.mid=current_url.getQuery("mid"),a.exec_json("module.procModuleAdminInsertLang",f,c),!1):(alert(xe.msg_empty_multilingual),!1)}),n.find('[href="#lang_search"]').click(function(a,b){void 0===b&&i()}),n.bind("reset.g11n",function(){e()}),n.bind("before-open.g11n",function(a,b){f(b)}),n.bind("before-close.g11n",function(){return g()}),this}});var is_loaded_multilingual_window_html=!1;jQuery(function(a){a.fn.xeLoadMultilingualWindowHtml=function(){function b(b){var c=a(a("#content").length>0?"#content":"body");a(b.html).appendTo(c).xeMultilingualWindow(),a(".lang_code").trigger("loaded-multilingualWindow")}return a.exec_json("module.getModuleAdminMultilingualHtml",{mid:current_url.getQuery("mid")},b),this}});var multilingual_id_count=0;jQuery(function(a){a.fn.xeApplyMultilingualUI=function(){return a(this).each(function(){function b(){function b(){g.val(l.val()).width(g.data("width")).removeAttr("disabled").data("active",!1),g.parent(".g11n").removeClass("active")}function f(){function c(a){if(a&&a.langs){var b=g.width();g.closest(".g11n").addClass("active"),g.val(a.langs[xe.current_lang]).attr("disabled","disabled").width(b-44).data("active",!0)}}b(),/^\$user_lang->/.test(g.val())&&a.exec_json("module.getModuleAdminLangCode",{name:g.val().replace("$user_lang->",""),mid:current_url.getQuery("mid")},c)}var g,h=a("#g11n"),i=c.width();g="TEXTAREA"==d.tagName||"textarea"==c.data("type")?a('