/*!=======================================================================*\
|| ###################################################################### ||
|| # vBulletin 5.5.2
|| # ------------------------------------------------------------------ # ||
|| # Copyright 2000-2019 MH Sub I, LLC dba vBulletin. All Rights Reserved.  # ||
|| # This file may not be redistributed in whole or significant part.   # ||
|| # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html   # ||
|| ###################################################################### ||
\*========================================================================*/
// ***************************
// js.compressed/jquery/jquery.thumbnail-radio-checkbox.min.js
// ***************************
(function(a){function i(){return"radio-checkbox-"+this.attr("name").replace(/\[|\]/g,"")}var b="thumbnailRadioCheckbox",c="radio-checkbox-thumbnail-container",d="radio-checkbox-thumbnail",e="selected",f="disabled";var g={thumbnailClass:"",preselect:null,select:null,unselect:null};var h={init:function(h){var j=this;if(typeof h==="object"){j.settings=a.extend({},g,h)}j.each(function(){var g=a(this);g.hide();a("<div></div>").addClass(c).addClass(function(){return g.attr("type")=="radio"?i.apply(g):""}).insertBefore(g).append(a("<div></div>").attr("id",g.attr("id")?"thumbnail-"+g.attr("id"):"").addClass(d+" "+j.settings.thumbnailClass).addClass(function(){return g.attr("type")=="radio"?"has-hover":"no-hover"}).bind("mousedown."+b,function(){return typeof j.settings.preselect==="function"?j.settings.preselect(a("img",this),g):true}).bind("click."+b,function(){if(a(this).hasClass(f)||g.attr("type")=="radio"&&a(this).hasClass(e)){return}if(g.attr("type")=="checkbox"){a(this).toggleClass(e);if(a(this).hasClass(e)){g.attr("checked","checked");if(typeof j.settings.select==="function")j.settings.select(a("img",this),g)}else{g.removeAttr("checked");if(typeof j.settings.unselect==="function")j.settings.unselect(a("img",this),g)}}else{g.attr("checked","checked");a("."+c+"."+i.apply(g)+" > div."+e).removeClass(e);a(this).addClass(e);if(typeof j.settings.unselect==="function")j.settings.unselect(a("img",this),g);if(typeof j.settings.select==="function")j.settings.select(a("img",this),g)}}).append(a("<img />").attr({src:g.attr("data-thumbnail"),alt:g.next("label").text(),title:""}).css({width:g.attr("data-thumbnail-width")?g.attr("data-thumbnail-width")+"px":"auto",height:g.attr("data-thumbnail-height")?g.attr("data-thumbnail-height")+"px":"auto"})).append(g.nextAll(".radio-checkbox-inside-thumbnail"))).append(g.removeAttr("data-thumbnail").removeAttr("data-thumbnail-width").removeAttr("data-thumbnail-height"),g.nextAll());if(g.is(":checked")){g.prev().addClass(e);if(typeof j.settings.select==="function")j.settings.select(a("img",g.prev()),g)}if(g.is(":disabled")){g.prev().addClass(f)}});return this},enable:function(b,c){b.each(function(){var b=a(this);if(c){b.prev().removeClass(f);b.removeAttr("disabled")}else{b.prev().addClass(f);b.attr("disabled","disabled")}});return this},check:function(b,d){var f=b.prev();var g=a("img",f);if(!d){f.removeClass(e);b.removeAttr("checked");if(typeof this.settings.unselect==="function"){this.settings.unselect(g,b)}}else{if(b.attr("type")=="radio"){a("."+c+"."+i.apply(b)+" > div."+e).removeClass(e);if(typeof this.settings.unselect==="function")this.settings.unselect(g,b)}f.addClass(e);b.attr("checked","checked");if(typeof this.settings.select==="function"){this.settings.select(g,b)}}return this},option:function(){if(arguments.length>=2){this.settings[arguments[0]]=arguments[1];return this}else if(arguments.length===1){return this.settings[arguments[0]]}return this}};a.fn.thumbnailRadioCheckbox=function(){var b=arguments[0];this.settings=this.settings||g;if(h[b]){return h[b].apply(this,Array.prototype.slice.call(arguments,1))}else if(typeof b==="object"||!b){return h.init.apply(this,arguments)}else{a.error("Method "+b+" does not exist.")}}})(jQuery);

// ***************************
// js.compressed/sb_page.js
// ***************************
/*=======================================================================*\
|| ###################################################################### ||
|| # vBulletin 5.5.2
|| # ------------------------------------------------------------------ # ||
|| # Copyright 2000-2019 MH Sub I, LLC dba vBulletin. All Rights Reserved.  # ||
|| # This file may not be redistributed in whole or significant part.   # ||
|| # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html   # ||
|| ###################################################################### ||
\*========================================================================*/
window.vBulletin=window.vBulletin||{};window.vBulletin.phrase=window.vBulletin.phrase||{};window.vBulletin.phrase.precache=window.vBulletin.phrase.precache||[];window.vBulletin.phrase.precache=$.merge(window.vBulletin.phrase.precache,["action","active","ad_list_description","add_modules","add_subforum","adding_multiple_modules_not_allowed","all","applying_new_template","are_you_sure_want_to_delete_ad_x","cancel","cannot_add_system_module","cannot_convert_channel","cannot_remove_system_module","channels","check_to_hide_module","choose_base_module","choose_options_site_logo","click_text_edit_title","confirm_deletion_gcpglobal","confirm_deletion_x","confirm_remove_page_desc","content_types","create_ad","create_new_custom_module","delete","display_order","do_you_want_to_cancel_editing_search_module","do_you_want_to_exit_without_saving_page","do_you_want_to_remove_channel","do_you_want_to_remove_forum","do_you_want_to_remove_module","do_you_want_to_remove_tab","drag_and_drop_module_here","drop_page_here","dropping_container_module_into_container_module_not_allowed","edit","edit_ad_x","edit_blog_categories","edit_custom_html_module","edit_navigation_item","edit_search_module","edit_site_logo","error_adding_widgets","error_cloning_widget","error_deleting_page","error_fetching_channels","error_loading_search_config_script","error_processing_site_logo","error_renaming_module_title","error_retrieving_cloned_widget_template","error_retrieving_configuration","error_retrieving_list_user_groups","error_retrieving_modules","error_retrieving_navigation_bar_configuration","error_retrieving_page_map","error_retrieving_templates","error_saving_configuration_module","error_saving_forums","error_saving_forums_code","error_saving_navigation_bar_configuration","error_saving_page","error_saving_search_config","error_saving_site_logo","error_uploading_logo","exit_without_saving_page","expand","forum_changes_will_be_lost","input_navigation_item_name","input_target_url","invalid_image_url","main_navigation_bar","make_category","make_forum","manage_ads","module_configuration","module_icon","move_not_allowed","moving_main_nav_to_own_sub_nav_error","moving_main_nav_with_sub_nav_error","new_navigation_item","new_subnavigation_item","next","no","no_ad_added","no_configurations_found","no_modules","no_permission","none","overwrite_template_continue","page_template_title_cannot_be_empty","page_title_cannot_be_empty","please_choose_overwrite_template_options","please_enter_channel_title","please_enter_new_module_title","please_enter_new_template_name","please_enter_page_name","previous","remove_channel","remove_channel_q","remove_forum","remove_forum_q","remove_module_q","rename","rename_custom_module","reset","save","save_new_page","save_page","search_results","select_edit_link_header","special_options","sub_navigation_bar","subchannels_will_be_deleted","switch_template","template_changes_will_be_lost","this_url_is_already_used","title","unable_to_delete_widget_instances","uncheck_to_unhide_module","url_too_long","user_group_settings","warning","warning_gcpuser","yes","you_are_here","you_can_also_drag_and_drop_modules_here","you_cannot_revert_this_layout_confirm","you_must_specify_a_screen_layout"]);(function(AV){var f,AU,o,Ad,AF,b,AB=[],AD,AJ,t=false,x=false,p={},z=false,AG=false,m=false,v=false,Aa=false,S=false,u=false,h={},y={},AO={},H={},c,AN,r,Ab={saveNewWidgetInstance:false},A=AV("<div>"),P;function Ak(){window.setTimeout(function(){if(vBulletin.vBScroller&&vBulletin.vBScroller.initializeScroller){AV(".js-vbscroller-wrapper:visible").each(function(){vBulletin.vBScroller.initializeScroller(AV(this))})}},0)}function Aj(){var Am=AV("#edit-page-dropdown .panel .panel-main-content:visible");if(Am.length>0){var Al=parseFloat(Am.css("margin-left"))+parseFloat(Am.css("margin-right"))+parseFloat(Am.css("border-left-width"))+parseFloat(Am.css("border-right-width"))+parseFloat(Am.css("padding-left"))+parseFloat(Am.css("padding-right"));AV("#edit-page-dropdown .panel .panel-main-content").width(AV("#edit-page-dropdown .panel:visible").width()-AV("#edit-page-dropdown .panel .panel-header-text:visible").outerWidth(true)-Al-1);AV("#edit-page-dropdown form .form-gutter-right").width(Math.ceil((AV("#edit-page-dropdown form:visible").width()-AV("#edit-page-dropdown .panel:visible").outerWidth(true))/2));Ak()}}function AW(Am,Ao){if(AV.isEmptyObject(Ao)){return }var An=Am.find(".js-admin-widget-list"),Al=false;AV.each(Ao,function(){An.append(this.rendered_template);Al=true});if(Al){An.closest(".js-widget-content").removeClass("h-hide")}An.closest(".js-widget-content").css({minHeight:"35px"});An.css({minHeight:"0",height:"auto",paddingBottom:"10px"})}function AM(Ao,Al,Aq){var Am=Ao.attr("data-widget-id"),Ap=Ao.attr("data-widget-instance-id")||"",An={widgetinstanceid:Ap,widgetid:Am,guid:"",userid:0,channelId:0,withTemplate:false,};if(typeof Aq=="undefined"){Aq=false}else{Aq=Boolean(Aq)}vBulletin.AJAX({call:"/ajax/api/widget/fetchConfigAndIsUserEditable",data:An,success:function(Ar){console.log("fetchConfig in getModuleConfig() successful! result:"+JSON.stringify(Ar));var As=Ar;if(!Aq){As=Ar.config}if(typeof Al=="function"){Al(As)}}})}function AC(Am){if(!Am.tab_data){Am.tab_data=[]}if(!Am.default_tab){Am.default_tab=0}if(!Am.submodules_key){console.log({msg:"Missing submodules key!",config:Am,});Am.submodules_key="tabbedContainerSubModules__temp"}if(!Am.display_tabs){Am.display_tabs=""}if(Am.display_tabs==""){var Al={};AV.each(Am.tab_data,function(Ao,An){Al[Ao]="1"});Am.display_tabs=Al}return Am}function W(){if(typeof r=="undefined"){r=AV("#config_pagetemplateid").val()||AV("#select-template input[type=radio]:checked").val()||""}return r}function d(Al){Al=parseInt(Al,10);r=Al;AV("#config_pagetemplateid, #save-page-form #pagetemplateid-yes, #save-page-form #pagetemplateid-new").val(r)}function a(Am,Al){console.log({msg:"saveModuleConfig()",$module:Am,config:Al,});vBulletin.AJAX({call:"/ajax/api/widget/saveAdminConfig",data:{widgetid:Am.attr("data-widget-id"),widgetinstanceid:Am.attr("data-widget-instance-id")||"",pagetemplateid:W(),data:Al},complete:function(){AV("body").css("cursor","auto")},success:function(An){console.log("saveAdminConfig in saveModuleConfig() successful! result:"+JSON.stringify(An))}})}function s(Am){var Al=Am.parents(".canvas-widget");if(Al.length){$parentModule=AV(Al[0]);return parseInt($parentModule.data("widget-instance-id"),10)}return 0}function R(Am){var Al=Am.parents(".canvas-widget[data-is-tabbed-container='true']");if(Am.data("is-tabbed-container")){console.log("---updating self tabbed container config");V(Am)}if(Al.length==0){console.log("---no parent tabbed container to update");return }console.log("---updating parent tabbed container config");V(AV(Al[0]))}function g(Am){var Al={};Am.find("> .js-admin-widget-content > .js-admin-widget-tab").each(function(){var Aq=AV(this),Ap=[],An=Aq&&Aq.data("tab-number")||0,Ao=Aq&&Aq.data("tab-title")||"";Al[An]={title:Ao};Aq.find("> .widget-content > .canvas-layout-row > .canvas-widget-list > .canvas-widget:not(.dummy-widget)").each(function(){var Au=AV(this),Ar=Au.data("widget-id"),As=Au.data("widget-instance-id")||Au.attr("data-widget-instance-id"),At={};if(As){At.widgetinstanceid=As}if(Ar){At.widgetid=Ar}if(!AV.isEmptyObject(At)){Ap.push(At)}});Al[An]["widgets"]=Ap});return Al}function V(Am){var Al=function(An){var An=AC(An);An.tab_data=g(Am);if(!AV.isEmptyObject(An)){a(Am,An)}};AM(Am,Al)}function AQ(Al){vBulletin.AJAX({call:"/ajax/api/widget/deleteWidgetInstances",data:{widgetInstanceIds:Al},success:function(Am){console.log("saveAdminConfig in saveModuleConfig() successful! removeInstances: "+JSON.stringify(Al)+" result:"+JSON.stringify(Am))},emptyResponse:function(Am){console.log("Empty response from deleteWidgetInstances after parent tab delete.")},api_error:vBulletin.ajaxtools.logApiError,})}function k(Ap,Ao,Am,Aq){var Ar=W(),An=(Ar==""||Ar==0),Al="save-new-widgetinstance-pagetemplateid-ready";if(An){if(!Ab.saveNewWidgetInstance){Ab.saveNewWidgetInstance=true}else{A.one(Al,function(As){k(Ap,Ao,Am,Aq)});return }}vBulletin.AJAX({call:"/ajax/api/widget/saveNewWidgetInstance",data:{containerinstanceid:Ap,widgetid:Ao,pagetemplateid:Ar,subWidgetConfig:Am,},success:function(As){console.log({msg:"/ajax/api/widget/saveNewWidgetInstance success!",result:As,});if(An&&As.pagetemplateid){d(As.pagetemplateid);A.trigger(Al)}if(As.widgetinstanceid){if(typeof Aq=="function"){Aq(As.widgetinstanceid)}}}})}function i(At){if(!At.data("is-tabbed-container")){return }var Ar=At.attr("data-widget-instance-id");if(!Ar){var An=s(At),Am=function(Az){console.log({msg:"added missing tabbed container widgetinstance",widgetinstanceid:Az,parentContainerinstanceid:An,});At.attr("data-widget-instance-id",Az);return i(At)};return k(An,At.attr("data-widget-id"),{},Am)}if(AV.isEmptyObject(AO)){return n(i,[At])}if(At.data("tabbed-container-initialized")){return }var Ax=At.find(".js-admin-widget-tab-panel-template"),Aw=Ax.find(".js-admin-widget-list"),Aq=At.find(".js-admin-widget-tab-header-template"),Au=At.find(".js-admin-widget-content"),Ao=Au.find(".js-tab-headers"),Ay=Ao.find(".js-tab-add"),As,Al;Ax.detach().removeClass("js-admin-widget-tab-panel-template");Aq.detach().removeClass("js-admin-widget-tab-header-template");Au.tabs({beforeActivate:function(Az,A0){if(AV(A0.newTab).hasClass("js-tab-add")){return false}},});As=Au.tabs("widget");Aw.css({minHeight:"60px",height:"auto",paddingBottom:"10px"});Ao.find(".js-tab-add").on("click",function(){var Az=function(A1){var A3=AC(A1.config),A4=A3.tab_data,A5=A4.length||0,A2=A5,A0=A1.isusereditable.tab_data||false;openPromptDialog({title:vBulletin.phrase.get("enter_tab_title"),message:"",buttonLabel:{okLabel:vBulletin.phrase.get("ok"),cancelLabel:vBulletin.phrase.get("cancel")},onClickOK:function(A6){if(!A6){return false}Ap(A6,[],A2,A2,A0);A3.display_tabs[A2]="1";A3.tab_data=g(At);if(!AV.isEmptyObject(A3)){a(At,A3)}}})};AM(At,Az,true)});Aq.find(".js-edit-tab-button").on("click",function(){var A3=AV(this),Az=A3.closest("li[aria-controls]"),A0=Az.attr("aria-controls"),A2=As.find(".js-admin-widget-tab[id='"+A0+"']"),A1=A2&&A2.data("tab-title")||"";var A4=function(A5){var A6=AC(A5),A7=A6.tab_data;openPromptDialog({title:vBulletin.phrase.get("enter_tab_title"),message:"",initialValue:A1,buttonLabel:{okLabel:vBulletin.phrase.get("ok"),cancelLabel:vBulletin.phrase.get("cancel")},onClickOK:function(A8){Az.find("span.js-tab-title").text(A8);A2.data("tab-title",A8);A6.tab_data=g(At);if(!AV.isEmptyObject(A6)){a(At,A6)}}})};AM(At,A4);return false});Aq.find(".js-remove-tab-button").on("click",function(){var A3=AV(this),A0=A3.closest("li[aria-controls]"),A1=A0.attr("aria-controls"),A2=As.find(".js-admin-widget-tab[id='"+A1+"']");var Az=function(A4){var A6=AC(A4.config),A7=A6.tab_data,A8=A7.length||0,A5=A2.data("tab-number");openConfirmDialog({title:vBulletin.phrase.get("remove_tab_q"),message:vBulletin.phrase.get("do_you_want_to_remove_tab",A2.data("tab-title")),iconType:"warning",onClickYes:function(){if(A6.default_tab==A5){A6.default_tab=0}if(!Array.isArray(A6.display_tabs)){A6.display_tabs=AV.map(A6.display_tabs,function(BA){return BA})}A6.display_tabs.splice(A5,1);var A9=[];A2.find(".canvas-widget").each(function(BA,BC){var BB=AV(this).data("widget-instance-id");if(BB){A9.push(BB)}});if(A9.length){AQ(A9)}A0.remove();A2.remove();Ao.find("li:not('.js-tab-add')").each(function(BA,BE){var BB=AV(this),BD=BB.attr("aria-controls"),BC=As.find(".js-admin-widget-tab[id='"+BD+"']");if(BC.length){BC.data("tab-number",BA)}});As.tabs("refresh");A6.tab_data=g(At);if(!AV.isEmptyObject(A6)){a(At,A6)}AA();M();t=true}})};AM(At,Az,true);return false});var Ap=function(BG,A6,BF,A9,A7){if(typeof BG=="undefined"){BG="Untitled Tab"}if(typeof A6=="undefined"){A6=[]}if(typeof BF=="undefined"){var A3=At.find(".js-admin-widget-tab");BF=A3.length}var A8=[];for(BC in A6){if(A6.hasOwnProperty(BC)){A8.push(BC)}}A8.sort(function(BI,BH){return BI-BH});var BE=A8.length,Az=Ax.clone().uniqueId().removeClass("h-hide").data("tab-number",BF).data("tab-title",BG),BD=Az.find(".js-admin-widget-list"),A1=Az.attr("id"),A2=Aq.clone(true).removeClass("h-hide");A2.children("a.js-tab-header-link").attr("href","#"+A1);A2.find("span.js-tab-title").text(BG);for(j=0;j<BE;j++){var BC=A8[j],A0=A6[BC],BA=A0.widgetid||AO[A0.guid],A5=A0.widgetinstanceid||"",A4=AV('<div data-widget-id="'+BA+'" />');A4.attr("data-tab-number",BF);A4.attr("data-widget-order",BC);A4.attr("data-widget-instance-id",A5);A4.append(AV('<img src="images/loader-box-blue.gif" /> '));BD.append(A4);if(BA){var BB=(function(BK,BI,BJ,BH){return function(BQ){BQ=BQ.filter(function(){return this.nodeType===Node.ELEMENT_NODE});if(!BJ){var BL=BK.adminconfig||{},BO=function(BT){BQ.attr("data-widget-instance-id",BT);V(At)};k(Ar,BI,BL,BO)}else{BQ.attr("data-widget-instance-id",BJ)}if(!A7){var BR=BQ.find(".js-move-button"),BM=BQ.find(".js-edit-button"),BS=BQ.find(".js-remove-button"),BN=BQ.find(".js-edit-tab-button"),BP=BQ.find(".js-remove-tab-button");BR.hide();BM.hide();BS.hide();BN.hide();BP.hide();BQ.addClass("js-widget-non-sortable")}BH.replaceWith(BQ);BQ.filter(":not(.container-widget)").find(".toggle-button").trigger("click",[true]);i(BQ)}})(A0,BA,A5,A4);Ai(A4,BB)}}Ay.before(A2);As.append(Az);As.tabs("refresh");As.tabs("option","active",A9);BD.prepend('<div class="canvas-widget dummy-widget dummy-widget--no-fixed-height"><span>{0}</span></div>'.format(vBulletin.phrase.get("drag_and_drop_modules_below")))};var Av=function(A5){var A1=AC(A5.config),A9=A1.tab_data,A7=A9.length,A8=A1.default_tab,A2=A5.isusereditable.tab_data||false;for(var A4=0;A4<A7;A4++){Ap(A9[A4].title,A9[A4].widgets,A4,A8,A2)}if(A2){var A0,A3,Az,A6;Ao.sortable({helper:"clone",opacity:1,axis:"x",items:"li:not('.js-tab-add')",cancel:".js-edit-tab-button, .js-remove-tab-button",start:function(){old_numidx_to_controls={};new_controls_to_numidx={};As.find(".js-admin-widget-tab").each(function(BA,BB){old_numidx_to_controls[BA]=AV(this).attr("id")})},stop:function(){Ao.find("li:not('.js-tab-add')").each(function(BB,BF){var BC=AV(this),BE=BC.attr("aria-controls"),BD=As.find(".js-admin-widget-tab[id='"+BE+"']");if(BD.length){BD.data("tab-number",BB);As.append(BD)}new_controls_to_numidx[BE]=BB});As.tabs("refresh");var BA=function(BB){A8=new_controls_to_numidx[old_numidx_to_controls[A8]];BB.default_tab=A8;var BE={};for(var BF in BB.display_tabs){var BC=new_controls_to_numidx[old_numidx_to_controls[BF]],BD=BB.display_tabs[BF];BE[BC]=BD}BB.display_tabs=BE;BB.tab_data=g(At);if(!AV.isEmptyObject(BB)){a(At,BB)}};AM(At,BA)},})}else{Ay.hide()}};AM(At,Av,true);At.data("tabbed-container-initialized",true)}function I(Am,An){var Al=AV(".js-canvas-layout-container > .canvas-layout").attr("id");if(!vBulletin.sitebuilder.tempModuleHTMLCache){vBulletin.sitebuilder.tempModuleHTMLCache={};AV(".js-canvas-layout-container .canvas-widget").each(function(){var Ao=AV(this).data("widget-instance-id");vBulletin.sitebuilder.tempModuleHTMLCache["widgetinstance_"+Ao]=this.outerHTML})}AV(".js-canvas-layout-container").text("");vBulletin.AJAX({call:"/ajax/get-layouts-for-sitebuilder",data:{pagetemplateid:pageData.pagetemplateid,channelid:pageData.channelid},success:function(Ao){console.log("ajax/get-layouts-for-sitebuilder result:");console.dir(Ao);var Ap=AV(".js-canvas-layout-container");Ap.html(Ao.screenlayoutlist);if(Ao.widgets&&Ao.widgets.length>0){var Aq=AV("#"+Al);AV.each(Ao.widgets,function(Ar,As){var At=Aq.find(".canvas-widget-list.section-"+Ar);AV.each(As,function(Au,Aw){At.append(Aw.rendered_template);var Av=At.find(".canvas-widget").filter(function(){return AV(this).data("widget-instance-id")==Aw.widgetinstanceid});if(typeof Aw.subModules!="undefined"){AW(Av,Aw.subModules)}i(Av)})})}if(vBulletin.inlinemod&&vBulletin.inlinemod.initModMenuHover){vBulletin.inlinemod.initModMenuHover()}if(typeof An=="function"){An()}},title_phrase:"sitebuilder",error_phrase:"unable_to_load_layouts"})}function L(An,Ap){var Al=Ap.enableButtons,Ao=AV(".js-top-menu-sitebuilder--list .js-top-menu-link");if(Al){AV(".js-top-menu-user").removeClass("h-hide");Ao.removeClass("b-top-menu__item-link--selected b-top-menu__item-link--disabled")}else{var Am=AV(Ap.currentButton);Ao.removeClass("b-top-menu__item-link--selected").addClass("b-top-menu__item-link--disabled");Am.addClass("b-top-menu__item-link--selected");AV(".js-top-menu-user").addClass("h-hide")}}AV(document).on("vb-toggle-sitebuilder-menu",L);function Ag(Ao){var An=AV(Ao.target),Al=An.data("panel-name");if(An.is(".b-top-menu__item-link--disabled")){this.blur();Ao.stopPropagation();return false}if(An.is(".js-top-menu-tab--admincp")){return true}var Am="vb-sitebuilder-panel--"+Al;AV(document).trigger(Am);return false}AV(document).on("click",".js-top-menu-sitebuilder--list .js-top-menu-link",Ag);function AX(An,Am){var Al=AV(".js-top-menu-sitebuilder .js-top-menu-link");L(null,{enableButtons:!Am,currentButton:An});AV(document.body).toggleClass("edit-mode "+An.id,Am).toggleClass("view-mode",!Am);AV(".js-top-menu-user").toggleClass("h-hide",Am)}function e(){if(!AV(this).hasClass("selected")&&!AV(document.body).hasClass("edit-mode")){AX(this,true)}return false}vBulletin.sitebuilder.activateSB=e;function D(){AX(this,false);return false}function Z(An,Am){var Al=AV("<div />").append(An.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,'<span class="axd-placeholder">{0}'.format(vBulletin.phrase.get("x_will_show_up_here_when_saved",Am))).replace(/<vb\:/g,"&lt;vb:").replace(/<\/vb\:/g,"&lt;/vb:"));Al.find("span.axd-placeholder").not(":first").remove();Al.find("iframe").remove();return Al.html()}function AT(){var Ao=null,Am=null,A1=null,A2="",Ay="",Aw="",Ar="";var A0=function(A3){if(!A3){A3=""}if(A3.match(/^https?:\/\//i)){return A3}if(A3.substr(0,1)=="/"){return pageData.baseurl+A3}return pageData.baseurl+"/"+A3};var An=function(A9,A5,A6,A8,A3,A4){A3=A3||[];console.log("createNavbarItem... Name: "+A5+" Url: "+A6+" NewWindow: "+A8+" UserGroups: "+A3+" itemAttr: "+A4);A5=JShtmlEncode(A5);var A7=AV("<li />").append("<label>{0}</label>".format(A5)).append(AV("<div />").addClass("nav-item-controls h-right").append('<i>|</i><span class="navbar-item-delete b-icon b-icon__trash b-icon--active" title="{0}"></span>'.format(vBulletin.phrase.get("delete"))).append('<i>|</i><span class="navbar-item-edit b-icon b-icon__pencil b-icon--active" title="{0}"></span>'.format(vBulletin.phrase.get("edit"))).append('<i>|</i><span class="navbar-item-opensubnav b-icon b-icon__arrow-right-m" title="{0}"></span>'.format(vBulletin.phrase.get("expand")))).data({"item-phrase":A9,"item-name":A5,"item-url":A6,"item-newwindow":A8,"item-usergroups":A3,"item-attr":A4});return A7};var Aq=function(A3){return A3.prevAll("li").size()};var Ax=function(){var A4=(Ar=="navbar"),A3=A4?AV("#channel-tabbar ul"):AV("#footer-tabbar ul.nav-list"),A5=A4?AV("#channel-subtabbar ul"):AV();A3.html("");A5.html("");var A6=function(BC,BA,A7){var A9=BA.data("item-newwindow")?' target="_blank"':"",BB=BA.hasClass("selected")&&A7?' class="current"':"",A8=AV("<li{0}><a {1}>{2}</a></li>".format(BB,A9,BA.data("item-name")));A8.find("a").prop("href",A0(BA.data("item-url")));BC.append(A8)};AV("#edit-navbar .navbar-ui-wrapper ul li").each(function(){var A7=AV(this);A6(A3,A7,A4);if(A7.hasClass("selected")){AV(A7.data("subnav-element")).find("li").each(function(){A6(A5,AV(this),true)})}})};var Ap=function(A9,BB,A4,A5,A7,BA,A6){var A3=An(A9,BB,A4,A5,A7,A6);console.log("insertNavbarItem... Name: "+A3.data("item-name")+" Url: "+A3.data("item-url")+" NewWindow: "+A3.data("item-newwindow")+" UserGroups: "+A3.data("item-usergroups")+" itemAttr: "+A3.data("item-attr"));A3.appendTo(Am);var A8=AV("<ul />").addClass("sub-navbar-list navbar-list sortable");AV(BA).each(function(){var BI=this.phrase?this.phrase:"",BD=this.title?this.title:"",BG=this.url?this.url:"",BH=this.newWindow?this.newWindow:false,BC=this.usergroups?this.usergroups:[],BF=this.attr?this.attr:"";var BE=An(BI,BD,BG,BH,BC,BF);BE.appendTo(A8)});(function(){var BC=null;A8.sortable({start:function(BD,BE){BE.placeholder.html(vBulletin.phrase.get("drop_page_here")).height(BE.item.height()-2)},stop:function(BD,BE){Ax()},receive:function(BD,BE){var BF=BE.item.data("subnav-element")||AV();if(BF.is(":visible")){BE.sender.sortable("cancel");vBulletin.warning("move_not_allowed","moving_main_nav_to_own_sub_nav_error")}else{if(BF.find("li").length>0){BE.sender.sortable("cancel");vBulletin.warning("move_not_allowed","moving_main_nav_with_sub_nav_error")}}},connectWith:".sortable",placeholder:"sortable-highlight",forcePlaceholderSize:true}).disableSelection()})();A8.hide();A8.appendTo("#navbar-ui-container .subnavbar-list-container");A3.data("subnav-element",A8);Ax()};var At=function(A4,A6,A7,A8,A3,A5){$newItem=An(A4.data("item-phrase"),A6,A7,A8,A3,A5);console.log("updateNavbarItem... Name: "+$newItem.data("item-name")+" Url: "+$newItem.data("item-url")+" NewWindow: "+$newItem.data("item-newwindow")+" itemAttr: "+$newItem.data("item-attr"));if(A4.data("subnav-element")){$newItem.data("subnav-element",A4.data("subnav-element"))}if(A4.hasClass("selected")){$newItem.addClass("selected")}A4.replaceWith($newItem);Ax()};var Az=function(A4){Ar=A4;if(Ar=="navbar"){A2=AV("#channel-tabbar ul").html();Ay=AV("#channel-subtabbar ul").html();Aw=AV("#channel-tabbar ul li.current a").attr("href");AV("#channel-subtabbar.h-hide").toggleClass("h-hide default-hide")}else{A2=AV("#footer-tabbar ul.nav-list").html();Aw=AV("#footer-tabbar ul.nav-list li.current a").attr("href")}AV("#admin-navbar-strip-gutter").removeClass().addClass("navbar-"+Ar);AV("#header").add("#header-axd").hide();AV("#navbar-ui-container").find(".navbar-ui-wrapper, .subnavbar-ui-wrapper").remove();var A3=AV("#edit-navbar");A3.find(".panel-header-text").hide();AV("#edit-navbar #panel-header-"+Ar).show();A3.slideDown("slow",function(){vBulletin.AJAX({call:"/ajax/api/site/"+(Ar=="navbar"?"loadHeaderNavbar":"loadFooterNavbar"),data:({siteId:1,edit:1}),success:function(A5){var A8=AV("<ul />").addClass("main-navbar-list navbar-list sortable "+Ar),A7=AV("<div />").addClass("new-nav-item main-nav").html(vBulletin.phrase.get("new_navigation_item")),A6=AV("<h4 />").text(vBulletin.phrase.get("main_navigation_bar"));AV("<div />").addClass("navbar-ui-wrapper").append(A6).append(A8).append(A7).appendTo("#navbar-ui-container");var BB=null;A8.sortable({start:function(BD,BE){BE.placeholder.html(vBulletin.phrase.get("drop_page_here")).height(BE.item.height()-2)},stop:function(BD,BE){Ax()},connectWith:".sortable",placeholder:"sortable-highlight",forcePlaceholderSize:true}).disableSelection();Am=A8;var BC=AV("<div />").addClass("subnavbar-list-container"),BA=AV("<div />").addClass("new-nav-item sub-nav").html(vBulletin.phrase.get("new_subnavigation_item")),A9=AV("<h4 />").text(vBulletin.phrase.get("sub_navigation_bar"));AV("<div />").addClass("subnavbar-ui-wrapper").append(A9).append(BC).append(BA).appendTo("#navbar-ui-container").hide();if(A5){console.log("result:",A5);AV(A5).each(function(){var BJ=this.phrase?this.phrase:"",BE=this.title?this.title:"",BH=this.url?this.url:"",BI=this.newWindow?true:false,BD=this.usergroups?this.usergroups:[],BG=this.subnav?this.subnav:[],BF=this.attr?this.attr:"";Ap(BJ,BE,BH,BI,BD,BG,BF)})}AV("#edit-navbar .navbar-ui-wrapper ul li").first().find(".navbar-item-opensubnav").filter(":visible").click()},error_phrase:"error_retrieving_navigation_bar_configuration"})})};AV(document).on("vb-sitebuilder-panel--navbar",function(){var A3=AV(".js-top-menu-tab--navbar").get(0);if(AV("#edit-navbar").is(":hidden")){vBulletin.assertUserHasAdminPermission("canusesitebuilder",A3,function(){e.apply(A3);Az("navbar")})}return false});AV(document).on("vb-sitebuilder-panel--footer",function(){var A3=AV(".js-top-menu-tab--footer").get(0);if(AV("#edit-navbar").is(":hidden")){vBulletin.assertUserHasAdminPermission("canusesitebuilder",A3,function(){e.apply(A3);Az("footer")})}return false});var Al=function(A3){AV("#navbar-edit-item").dialog({autoOpen:true,modal:true,resizable:false,closeOnEscape:false,showCloseButton:false,width:400,dialogClass:"dialog-container navbar-item-dialog-container",open:function(){AV("#navbar-edit-name").focus()}}).dialog("option","title",A3||vBulletin.phrase.get("edit_navigation_item")).dialog("open")};AV("#edit-navbar").on("click",".new-nav-item",function(){Ao=null;if(AV(this).closest(".navbar-ui-wrapper").size()>0){Am=AV(this).closest(".navbar-ui-wrapper").find("ul")}else{Am=AV(this).closest(".subnavbar-ui-wrapper").find("ul").filter(":visible")}AV("#navbar-edit-name").val("");AV("#navbar-edit-url").val("");AV("#navbar-edit-attr").val("");AV("#navbar-edit-newwindow").prop("checked",false);Al(AV(this).html());return false});AV(document).on("click","#navbar-edit-save",function(){if(AV("#navbar-edit-name").val()==""){vBulletin.warning("edit_navigation_item","input_navigation_item_name",function(){AV("#navbar-edit-name").focus()})}else{if(AV("#navbar-edit-url").val()==""){vBulletin.warning("edit_navigation_item","input_target_url",function(){AV("#navbar-edit-url").focus()})}else{console.log("Saving new/edited navbar item");if(!Ao){Ap("",AV("#navbar-edit-name").val(),AV("#navbar-edit-url").val(),AV("#navbar-edit-newwindow").prop("checked"),AV("#navbar-edit-item").data("edit-usergroups"),[],AV("#navbar-edit-attr").val())}else{At(Ao,AV("#navbar-edit-name").val(),AV("#navbar-edit-url").val(),AV("#navbar-edit-newwindow").prop("checked"),AV("#navbar-edit-item").data("edit-usergroups"),AV("#navbar-edit-attr").val())}Ao=null;Am=null;AV("#navbar-edit-item").dialog("close");console.log("Done saving new/edited navbar item")}}return false});AV(document).on("click","#navbar-edit-cancel",function(){AV("#navbar-edit-item").dialog("close");return false});var As=false;AV(document).on("click","#navbar-edit-usergroups",function(){var A4=function(){var A8=AV("#navbar-edit-usergroups-dialog .select_all"),A5=AV("#navbar-edit-usergroups-dialog .navbar-usergroup-checkbox");A5.prop("checked",false);var A6=function(){var A9=(A5.filter(":checked").length==A5.length&&A5.eq(0).is(":checked"));A8.prop("checked",A9)};A5.off("change").on("change",A6);A8.off("change").on("change",function(){A5.prop("checked",AV(this).prop("checked"))});if(!Ao){return false}console.log("Prefilling checked usergroups");console.log(Ao.data("item-name"));console.log(Ao.data("item-url"));console.log(Ao.data("item-usergroups"));if(Ao.data("item-usergroups-temp")){var A7=Ao.data("item-usergroups-temp")}else{var A7=Ao.data("item-usergroups")}console.log(A7);AV.each(A7,function(A9,BA){AV("#navbar-usergroup-checkbox-"+BA).prop("checked",true)});A6()};var A3=function(){var A5=[];AV("#navbar-edit-usergroups-dialog .dialog-body input[type=checkbox]").each(function(){if(AV(this).prop("checked")){A5.push(AV(this).val())}});AV("#navbar-edit-item").data("edit-usergroups",A5);if(Ao){Ao.data("item-usergroups-temp",A5)}console.log("Saving checked usergroups")};if(!As){AV("#navbar-edit-usergroups-dialog").dialog({title:vBulletin.phrase.get("user_group_settings"),autoOpen:true,modal:true,resizable:false,closeOnEscape:false,showCloseButton:false,width:500,dialogClass:"dialog-container pagemap-dialog-container input-dialog",create:function(){AV("#navbar-edit-usergroups-dialog .cancel-button").on("click",function(){AV("#navbar-edit-usergroups-dialog").dialog("close")});AV("#navbar-edit-usergroups-dialog .save-button").on("click",function(){A3();AV("#navbar-edit-usergroups-dialog").dialog("close")});vBulletin.AJAX({call:"/ajax/api/usergroup/fetchUsergroupList",complete:function(){AV("body").css("cursor","auto")},success:function(A5){var A6=[];AV(A5).each(function(){A6.push('<div class="blockrow"><label><input type="checkbox" class="navbar-usergroup-checkbox" id="navbar-usergroup-checkbox-{0}" value="{0}"><span>{1}</span></label></div>'.format(this.usergroupid,this.title))});AV("#navbar-edit-usergroups-dialog .dialog-body").html(A6.join(""));AV("#navbar-edit-usergroups-dialog").dialog("option","position",{of:window});console.log("Done adding usergroups");A4()},error_phrase:"error_retrieving_list_user_groups",after_error:function(){AV("#navbar-edit-usergroups-dialog").dialog("close")}})},close:function(){},open:function(){A4()}});As=true}else{AV("#navbar-edit-usergroups-dialog").dialog("open")}return false});AV("#edit-navbar").on("click",".navbar-item-delete",function(){AV(this).closest("li").remove();Ax();return false});AV("#edit-navbar").on("click",".navbar-item-edit",function(){var A3=AV(this).closest("li");console.log("Click to edit item... Name: "+A3.data("item-name")+" Url: "+A3.data("item-url")+" NewWindow: "+A3.data("item-newwindow")+" UserGroups: "+A3.data("item-usergroups"));Ao=A3;Am=A3.closest("ul");Ao.data("item-usergroups-temp",null);AV("#navbar-edit-name").val(A3.data("item-name"));AV("#navbar-edit-url").val(A3.data("item-url"));AV("#navbar-edit-attr").val(A3.data("item-attr"));AV("#navbar-edit-newwindow").prop("checked",A3.data("item-newwindow"));Al(AV(this).html());return false});AV("#edit-navbar").on("click",".navbar-item-opensubnav",function(){var A5=AV(this),A6=A5.closest("li"),A4=AV("#edit-navbar"),A3=A4.find(".subnavbar-ui-wrapper");console.log("Click to open item subnav ... Name: "+A6.data("item-name")+" Url: "+A6.data("item-url")+" NewWindow: "+A6.data("item-newwindow")+" UserGroups: "+A6.data("item-usergroups"));A4.find("li").removeClass("h-disabled selected");A4.find(".navbar-item-opensubnav").removeClass("b-icon--active");A6.addClass("selected");A5.addClass("b-icon--active");A3.find("ul").hide();AV(A6.data("subnav-element")).show();A3.show();Ax();return false});AV(document).on("click",".navbar-navbar #admin-navbar-strip .lnkExitWithoutSaving, .navbar-footer #admin-navbar-strip .lnkExitWithoutSaving",function(){AV("#edit-navbar").slideUp();AV("#header").add("#header-axd").show();if(Ar=="navbar"){AV("#channel-tabbar ul").html(A2);AV("#channel-subtabbar ul").html(Ay).parent(".default-hide").toggleClass("h-hide default-hide")}else{AV("#footer-tabbar ul.nav-list").html(A2)}});var Au=function(){var A3=[];AV("#edit-navbar .navbar-ui-wrapper ul li").each(function(){var A7=AV(this);var A5=function(A8){return{phrase:A8.data("item-phrase"),title:A8.data("item-name"),url:A8.data("item-url"),newWindow:A8.data("item-newwindow"),usergroups:A8.data("item-usergroups"),attr:A8.data("item-attr")}};var A6=[];A7.data("subnav-element").find("li").each(function(){$subLi=AV(this);A6.push(A5($subLi))});var A4=A5(A7);A4.subnav=A6;A3.push(A4)});vBulletin.AJAX({call:"/ajax/api/site/"+(Ar=="navbar"?"saveHeaderNavbar":"saveFooterNavbar"),data:({siteId:1,data:A3}),success:function(A5){AV("#edit-navbar").slideUp();AV("#header").add("#header-axd").show();AV("#admin-navbar-strip-gutter").addClass("h-hide");AV(document.body).removeClass("edit-mode lnkEditPage lnkNewPage lnkHeader lnkNavBar lnkFooter").addClass("view-mode");L(null,{enableButtons:true,currentButton:null});if(Ar=="navbar"){var A4=false;AV("#edit-navbar .navbar-ui-wrapper ul li").each(function(){var A6=AV(this);if(A0(A6.data("item-url"))==A0(Aw)){A4=true;AV("#edit-navbar .navbar-ui-wrapper ul li").removeClass("selected");A6.addClass("selected");return false}});if(A4){Ax()}else{AV("#channel-tabbar ul li").removeClass("current");AV("#channel-subtabbar ul").html("")}}},error_phrase:"error_saving_navigation_bar_configuration"})};var Av="#admin-navbar-strip .lnkSaveChanges";AV(document).on("click",".navbar-navbar "+Av+", .navbar-footer "+Av,function(){Au()})}function AL(){bindFormReset("#edit-page-dropdown form").trigger("reset",function(){AV("#save-content .template-name").addClass("h-hide");AV("input[type=hidden]",this).each(function(){this.value=this.defaultValue})});AV(".js-top-menu-sitebuilder--list .js-top-menu-link").removeClass("b-top-menu__item-link--disabled");AV(document).on("click","#sitebuilder-wrapper .lnkExitWithoutSaving",function(){if(AV(this).closest("#edit-page-dropdown").length==0){L(null,{enableButtons:true,currentButton:null})}});AV(document).on("vb-sitebuilder-panel--channels",function(){var As=AV(".js-top-menu-tab--channels").get(0);vBulletin.assertUserHasAdminPermission("canusesitebuilder",As,function(){e.apply(As);Y(false);AV(".edit-mode .canvas-widget-list .canvas-widget").addClass("shadow");AV("#header, #header-axd, #save-content").hide();AV("#manage-page").show();AV("#edit-page-dropdown .lnkDeletePage").removeClass("h-hide");AV("#manage-page-dropdown").removeClass("h-hide").slideDown("slow",AE)});return false});function Aq(){var As=AV(".js-sbpanel-pagelist-wrapper");As.find(".tab-item a").on("click",function(At){At.preventDefault()});As.tabs()}function Ap(){var Av=AV(".js-sbpanel-pagelist-wrapper"),At=Av.find(".js-delayed-template-render-insert-here"),Au=Av.find(".js-loading-placeholder"),As={};Av.find(".js-simple-pagination-wrapper").each(function(){var Aw=AV(this);As[Aw.attr("id")]=Aw.find(".js-pagenum").val()||0});Av.tabs("disable");At.html("");Au.removeClass("h-hide");vBulletin.AJAX({call:"/ajax/render/admin_sbpanel_pagelist_content_wrapper",data:{isAjaxTemplateRenderWithData:true},success:function(Aw){At.html(Aw.template);Av.tabs("refresh");Av.tabs("enable");Av.find(".js-simple-pagination-wrapper").each(function(){var Ax=AV(this);Ao(Ax,As[Ax.attr("id")]);Al(Ax);Ar(Ax)})},error_phrase:"error_fetching_dialog",complete:function(){Au.addClass("h-hide")}})}AV(document).on("vb-sitebuilder-panel--pages",function(){var As=AV(".js-top-menu-tab--pages").get(0),At=AV(".js-sbpanel-pagelist-wrapper");if(!At.data("panel-initialized")){At.data("tabspanel-initialized",true);Aq()}vBulletin.assertUserHasAdminPermission("canusesitebuilder",As,function(){if(At.hasClass("h-hide")){e.apply(As);At.removeClass("h-hide").slideDown("slow");Ap()}else{D.apply(As);At.slideUp("fast",function(){At.addClass("h-hide")})}});return false});AV(document).on("click",".js-sbpanel-pagelist-wrapper .js-button--close-panel",function(){var As=AV("#lnkPageList")[0],At=AV(".js-sbpanel-pagelist-wrapper");if(!At.hasClass("h-hide")){D.apply(As);At.slideUp("fast",function(){At.addClass("h-hide")})}});function Al(At){var As=At.data("select-all-checkboxes-initialized")||false;if(As){console.log({msg:"Skipping checkbox init because it's already done.",$wrapper:At,});return }else{At.data("select-all-checkboxes-initialized",true)}At.find(".js-checkbox--checkall").each(function(){var Au=AV(this),Aw=Au.data("group-id"),Ay=At.find(".js-checkbox[data-group-id='"+Aw+"']"),Ax=Ay.length,Av=Ay;Au.on("change",function(Az){var A0=AV(this).prop("checked");Au.prop("indeterminate",false);if(A0){Ay.prop("checked",true)}else{Ay.prop("checked",false)}});Ay.on("change",function(Az){var A1=AV(this).prop("checked"),A0=Ay.filter(":checked").length;if(Ax>A0){if(Au.prop("checked")&&A0>0){Au.prop("indeterminate",true)}Au.prop("checked",false)}else{Au.prop("indeterminate",false);Au.prop("checked",true)}})})}function Ar(At){var As=At.data("actions-initialized")||false;if(As){console.log({msg:"Skipping actions init because it's already done.",$wrapper:At,});return }else{At.data("actions-initialized",true)}At.find(".js-delete-orphaned-pagetemplates").on("click",function(Au){var Ay=AV(this),Aw=Ay.data("group-id"),Av=At.find(".js-checkbox[data-group-id='"+Aw+"']:checked"),Ax={};Av.each(function(){Ax[this.name]=AV(this).val()});if(Av.length<1){vBulletin.error("error","delete_orphaned_pagetemplates_please_select_one")}else{openConfirmDialog({title:vBulletin.phrase.get("delete"),message:vBulletin.phrase.get("delete_orphaned_pagetemplates_prompt_x",Av.length),iconType:"warning",onClickYes:function(){vBulletin.AJAX({call:"/ajax/api/page/deleteOrphanedPagetemplates",data:Av.serializeArray(),success:function(Az){console.log({msg:"/ajax/api/widget/deleteOrphanedPagetemplates success!",result:Az,});Ap()}})}})}})}function Ao(Ax,Ay){var Av=Ax.data("pagination-initialized")||false;if(Av){console.log({msg:"Skipping pagination init because it's already done.",$wrapper:Ax,});return }else{Ax.data("pagination-initialized",true)}var As=Ax.find(".js-pagenav-goprev");var Az=Ax.find(".js-pagenav-gopost");var At=Ax.find(".js-pagenum");var Ay=(Ay&&parseInt(Ay,10))||parseInt(At.val(),10);var A0=Ax.find(".js-paginated-page");var Aw={};var A1=0;A0.each(function(){A1++;Aw[A1]=AV(this)});At.on("blur keyup",function(A3){if(A3.type=="blur"||A3.keyCode=="13"){var A2=parseInt(At.val(),10);Au(A2)}});As.on("click",function(A3){var A2=parseInt(At.val(),10);A2--;Au(A2)});Az.on("click",function(A3){var A2=parseInt(At.val(),10);A2++;Au(A2)});function Au(A2){if(A2<1){A2=1}if(A2>A1){A2=A1}A0.addClass("h-hide");if(Aw[A2]){Aw[A2].removeClass("h-hide")}At.val(A2)}Au(Ay)}AV(document).on("vb-sitebuilder-panel--editpage",function(){var As=AV(".js-top-menu-tab--editpage").get(0);if(AV("#edit-page-dropdown-gutter").is(":hidden")){vBulletin.assertUserHasAdminPermission("canusesitebuilder",As,function(){function At(){u=false;Au();M();Y(false,".container-widget");AV(".edit-mode .canvas-widget-list .canvas-widget").addClass("shadow");f.tabs("option","active",0);AV("#header, #header-axd, #save-content").hide();AV("#edit-content").show();AV("#edit-page-dropdown .lnkSaveChanges .label").text(vBulletin.phrase.get("save_page"));AV("#edit-page-dropdown .lnkDeletePage").removeClass("h-hide");AV("#edit-page-dropdown-gutter").removeClass("h-hide").slideDown("slow",Q);AV(".canvas-widget.axd-widget .widget-content").each(function(){AV(this).html(Z(AV(this).html(),vBulletin.phrase.get("ad")))})}function Au(){var Av=[];AV(".hidden-widget-placeholder").each(function(){Av.push(AV(this).attr("data-widget-instance-id"))});if(Av.length<1){return }vBulletin.AJAX({call:"/ajax/fetch-hidden-modules",data:({modules:Av}),complete:function(){At()},success:function(Aw){if(Aw.length>0){AV.each(Aw,function(Ax,Az){var Ay=AV(Az.template).addClass("hidden-widget");AV('.hidden-widget-placeholder[data-widget-instance-id="'+Az.widgetinstanceid+'"]').replaceWith(Ay)})}}})}e.apply(As);I(false,At)})}return false});AV(document).on("vb-sitebuilder-panel--newpage",function(){var As=AV(".js-top-menu-tab--newpage").get(0);if(AV("#edit-page-dropdown-gutter").is(":hidden")){vBulletin.assertUserHasAdminPermission("canusesitebuilder",As,function(){function At(){u=true;AV(".canvas-widget-list").empty();f.tabs("option","active",0);AV("#change-layout .layout-border.selected").removeClass("selected");AV("#layout-wide-narrow").prev().trigger("click");t=false;AV("#header, #header-axd, #save-content").hide();AV("#edit-content").show();AV("#edit-page-dropdown .lnkSaveChanges .label").text(vBulletin.phrase.get("save_new_page"));AV("#edit-page-dropdown .lnkDeletePage").addClass("h-hide");AV("#edit-page-dropdown-gutter").removeClass("h-hide").slideDown("slow",Q)}e.apply(As);I(true,At)})}return false});var An=false;AV(document).on("vb-sitebuilder-panel--header",function(){var As=AV(".js-top-menu-tab--header").get(0);if(AV("#admin-navbar-strip-gutter").is(":hidden")){vBulletin.assertUserHasAdminPermission("canusesitebuilder",As,function(){e.apply(As);An=false;AV("#admin-navbar-strip-gutter").addClass("navbar-header").removeClass("h-hide").find(".prompt-text").text(vBulletin.phrase.get("select_edit_link_header"));var At=AV("#header"),Au=AV(".header-cell",At);$siteLogoEditStrip=AV("> .admin-only",Au).addClass("h-hide-imp"),w=Au.outerWidth();AV(".disable-overlay",At).width(At.innerWidth()-w).height(At.innerHeight()).show();$siteLogoEditStrip.width(w-(parseInt($siteLogoEditStrip.css("padding-left"),10)+parseInt($siteLogoEditStrip.css("padding-right"),10))).removeClass("h-hide-imp");AV(document).on("focus click mousedown",".edit-mode.lnkHeader #header .site-logo > a",function(Av){this.blur();Av.stopPropagation();return false})})}return false});AT();AV(".js-top-menu-sitebuilder").removeClass("h-hide");AV(document).on("click",".lnkHeader #admin-navbar-strip .lnkSaveChanges",function(){AV("body").css("cursor","wait");if(Number(AV("#header .site-logo img").attr("data-fileid"))>0){var As=An?function(){location.reload(true)}:null;AI(As)}else{if(An){location.reload(true)}else{AV("body").css("cursor","auto");AV("#admin-navbar-strip-gutter").addClass("h-hide").find(".prompt-text").text("");AV(document.body).removeClass("edit-mode lnkHeader").addClass("view-mode");AV("#header .disable-overlay").hide();L(null,{enableButtons:true,currentButton:null})}}});AV(document).on("click",".lnkHeader #admin-navbar-strip .lnkExitWithoutSaving",function(At){if(An){At.stopImmediatePropagation();location.reload(true);return false}else{var As=AV("#header .site-logo img");if(As.attr("src")!=As.attr("data-orig-src")){As.attr("src",As.attr("data-orig-src")).removeAttr("data-fileid")}AV("#admin-navbar-strip-gutter").find(".prompt-text").text("");AV("#header .disable-overlay").hide();L(null,{enableButtons:true,currentButton:null})}});AV(document).on("click","#admin-navbar-strip .lnkExitWithoutSaving",function(){AV("#admin-navbar-strip-gutter").addClass("h-hide");AV(document.body).removeClass("edit-mode lnkEditPage lnkNewPage lnkHeader lnkNavBar lnkFooter").addClass("view-mode");AV("#header").add("#header-axd").show();AV("#edit-navbar").hide();L(null,{enableButtons:true,currentButton:null})});AV("#header-axd .axdnum").change(function(){var As=AV(this),At=parseInt(As.val());window.vBulletin.loadingIndicator.show();vBulletin.AJAX({call:"/ajax/api/ad/saveNumberOfHeaderAds",data:{number:At},success:function(Au){if(At==1){AV("#header-axd").removeClass("axdnum_2").addClass("axdnum_1")}else{AV("#header-axd").removeClass("axdnum_1").addClass("axdnum_2")}},complete:function(){window.vBulletin.loadingIndicator.hide()}})});AV(document).off("click",".axd-edit-button").on("click",".axd-edit-button",function(){var At=AV(this).attr("data-location"),Ay=AV(this).closest(".axd-container");if(Ay.length==0){Ay=AV('.axd-container[data-widget-instance-id="'+At+'"]')}Ax();function Ax(Az){Az=Az||false;AV("body").css("cursor","wait");vBulletin.AJAX({call:"/ajax/api/ad/listAdsByLocation",data:{adlocation:At},cache:false,success:Au,emptyResponse:function(){if(!Az){Av({adlocation:At})}else{Au([])}},complete:function(){AV("body").css("cursor","default")}})}function Au(Az){if(typeof h.axd_list_dialog=="undefined"){vBulletin.AJAX({call:"/ajax/render/dialog_axd_list",success:function(A0){h.axd_list_dialog=A0;AV("body").append(A0);Au(Az)},error_phrase:"error_fetching_dialog"});return }AV("#axd-list-dialog").dialog({title:vBulletin.phrase.get("manage_ads"),autoOpen:true,modal:true,resizable:false,closeOnEscape:false,showCloseButton:false,width:600,dialogClass:"dialog-container ad-list-dialog-container input-dialog",open:function(){var A0=AV(this),A2=[];var A3=function(){A0.dialog("close");A0.dialog("destroy")};for(var A1 in Az){A2.push([Az[A1].title,Az[A1].active,Az[A1].displayorder,Az[A1].adid])}AV(".title",A0).text(vBulletin.phrase.get("ad_list_description"));AV(".axdtable",A0).dataTable({bPaginate:false,bLengthChange:false,bInfo:false,bAutoWidth:false,bDestroy:true,aaSorting:[[2,"asc"]],aoColumns:[{sTitle:vBulletin.phrase.get("title")+"<span></span>",sClass:"axdtable-title axd-cell"},{sTitle:vBulletin.phrase.get("active"),sClass:"axdtable-active axd-cell",bSortable:false,bSearchable:false,fnRender:function(A5,A4){return'<input type="checkbox" class="isactive" data-id="{0}"{1} />'.format(A5.aData[3],((A4=="1")?' checked="checked"':""))}},{sTitle:vBulletin.phrase.get("display_order")+"<span></span>",sClass:"axdtable-display-order axd-cell",bSearchable:false,bUseRendered:false,fnRender:function(A5,A4){return'<input type="text" class="displayorder textbox" value="{0}" data-id="{1}" />'.format(A5.aData[2],A5.aData[3])}},{sTitle:vBulletin.phrase.get("action"),sClass:"axdtable-action axd-cell",bSearchable:false,bSortable:false,bUseRendered:false,fnRender:function(A5,A4){return'<a href="#" class="editlink" data-id="{0}" title="{1}"><span></span></a> <a href="#" class="deletelink" data-id="{0}" title="{2}"><span></span></a>'.format(A5.aData[3],vBulletin.phrase.get("edit"),vBulletin.phrase.get("delete"))}}],aaData:A2});AV(".dataTables_filter input[type=text]",A0).addClass("axdfilter textbox").on("keyup",function(){AV(this).next()[this.value!=""?"removeClass":"addClass"]("h-hide")}).after('<button type="button" class="axdSearchBtn b-button b-button--secondary b-button--sitebuilder h-hide">{0}</button>'.format(vBulletin.phrase.get("reset")));AV(".axdSearchBtn",A0).on("click",function(){AV(this).addClass("h-hide").prev().val("").trigger("keyup")});AV(".axdtable .editlink",A0).off("click").on("click",function(){var A4=AV(this).attr("data-id");A3();Av(Az[A4]);return false});AV(".axdtable .deletelink",A0).off("click").on("click",function(){var A4=AV(this).attr("data-id"),A5=AV(this).closest("tr").find(".isactive").prop("checked");A3();openConfirmDialog({title:vBulletin.phrase.get("confirm_deletion_x",Az[A4].title),message:vBulletin.phrase.get("are_you_sure_want_to_delete_ad_x",Az[A4].title,"adid",A4),iconType:"warning",onClickYes:function(){AV("body").css("cursor","wait");vBulletin.AJAX({call:"/ajax/api/ad/delete",data:{adid:A4},success:function(A6){Ax(true);if(A5){An=true}}})},onClickNo:function(){Ax()}});return false});AV(".axdlist",A0).show();AV(".btnAddAxd",A0).off("click").on("click",function(){A3();Av({adlocation:At});return false});AV(".btnCancelAxd",A0).off("click").on("click",function(){A3()});AV(".btnSaveAxd",A0).off("click").on("click",function(){if(AV(".isactive",A0).length==0){A3();return false}AV("body").css("cursor","wait");var A4={},A5=[];AV(".isactive",A0).each(function(){var A6=AV(this).attr("data-id");A4[A6]={};A4[A6]["displayorder"]=AV('.displayorder[data-id="'+A6+'"]',A0).val();if(AV(this).is(":checked")){A4[A6]["active"]=1;var A7=A4[A6];A7.snippet=Az[A6].snippet;A7.title=Az[A6].title;A5.push(A7)}else{A4[A6]["active"]=0}});vBulletin.AJAX({call:"/ajax/api/ad/quickSave",data:{data:A4},success:function(A6){var A7=AV(".axd_"+At,Ay);if(A7.length==0){A7=AV(".widget-content",Ay)}if(A5.length>0){A5.sort(function(BB,BA){return BB.displayorder-BA.displayorder});var A9="",A8="";AV.map(A5,function(BB,BA){if(BB.snippet){A8+=Z(BB.snippet,BB.title);A9+=BB.snippet}});A7.html(A8);An=Aw(A9)}else{A7.html("")}A7.show();A3();AV("html,body").animate({scrollTop:0},"slow")},complete:function(){AV("body").css("cursor","default")}})})}})}function Av(Az){vBulletin.AJAX({call:"/ajax/render/dialog_axd_config",data:{isAjaxTemplateRenderWithData:true},success:function(A0){h.axd_config_dialog=A0.template;AV("body").append(A0.template);As(Az)},error_phrase:"error_fetching_dialog"})}function As(A0){var Az=A0.adlocation;AV("#axd-config-dialog").dialog({title:vBulletin.phrase.get(A0.adid?["edit_ad_x",A0.title]:"create_ad"),autoOpen:true,modal:true,resizable:false,closeOnEscape:false,showCloseButton:false,width:720,dialogClass:"dialog-container axd-dialog-container input-dialog",open:function(){var A1=AV(this);if(A0.adid){AV(".title",A1).val(A0.title);AV(".axd_html",A1).val(A0.snippet);AV(".active",A1).prop("checked",(A0.active=="1"));AV(".axdid",A1).val(A0.adid);for(var A2 in A0.criterias){var A3=A0.criterias[A2],A4=A3.criteriaid;AV("[name=data\\[criteria\\]\\["+A4+"\\]\\[active\\]]",A1).prop("checked",true);AV("."+A4,A1).each(function(){var A7=AV(this),A6=A7.attr("name").match(/condition\d/);if(A6){A7.val(A3[A6[0]])}})}}else{AV(".axdid",A1).val(0);AV(".configform",A1).trigger("reset")}AV(".axd_location",A1).val(Az);AV(".blockrow select.custom-dropdown",A1).selectBox();AV(".blockrow a.custom-dropdown, .blockrow input[type=text]",A1).on("click",function(A6){return false});AV(".btnAttachHtmlAxd",A1).off("click").on("click",function(){var A6=AV(".configform",A1).serialize();AV("body").css("cursor","wait");vBulletin.AJAX({call:"/ajax/api/ad/save",data:A6,success:function(A7){A5();An=Aw(AV(".configform .axd_html",A1).val())},complete:function(){AV("body").css("cursor","default")}})});AV(".btnCancelEditHtmlAxd",A1).off("click").on("click",function(){A5(true)});function A5(A6){A6=A6||false;AV(":checkbox",A1).prop("checked",false);AV("select",A1).val("");A1.dialog("close");A1.dialog("destroy");AV("#axd-config-dialog").remove();Ax(A6)}}})}function Aw(A1){var A0=AV("<div>"+A1+"</div>");if(A0.filter("script").length>0){return true}else{var Az=A0.find("*").filter(function(){return(this.nodeName.toLowerCase().indexOf("vb:")==0)?this:null});return(Az.length>0||(/\{vb\s*\:\s*[a-z]+\s+.*\}/).test(A1))}}return false});AV("#header .header-cell .js-edit-logo").on("click",function(){AV(".header-edit-box.selected").removeClass("selected");AV(this).closest(".header-edit-box").addClass("selected");AV("#edit-site-logo-dialog").dialog({title:vBulletin.phrase.get("edit_site_logo"),autoOpen:true,modal:true,resizable:false,closeOnEscape:false,showCloseButton:false,width:520,dialogClass:"dialog-container site-logo-dialog-container input-dialog",create:function(){var As=AV(this).closest(".ui-dialog").find(".ui-dialog-title");As.append('<span class="dialog-subtitle"></span>');As.children("span.dialog-subtitle").text(vBulletin.phrase.get("choose_options_site_logo"));AV("#btnCancelEditSiteLogo").on("click",function(){AV("#edit-site-logo-dialog").dialog("close")});AV("#btnSaveEditSiteLogo").on("click",function(){if(Number(AV("#header .site-logo img").attr("data-fileid"))>0){AI(function(){AV("#edit-site-logo-dialog").dialog("close")})}else{AV("#edit-site-logo-dialog").dialog("close")}});AV("#edit-site-logo-dialog .styleselection").change(function(){AV("#header .site-logo img").attr({"data-styleselection":AV(this).val()})});AV("#edit-site-logo-dialog").fileupload({dropZone:null,dataType:"json",add:function(Au,At){AV("body").css("cursor","wait");AV(Au.target).find(".js-upload-progress:first").removeClass("h-hide");At.submit()},done:function(Au,At){if(At.result&&At.result.filedataid){AV("#header .site-logo img").attr({src:At.result.imageUrl,"data-fileid":At.result.filedataid,"data-styleselection":AV("#edit-site-logo-dialog .styleselection:checked").val()})}else{vBulletin.error("error","error_uploading_logo")}},fail:function(Au,At){vBulletin.error("error","error_uploading_logo")},always:function(Au,At){AV("body").css("cursor","auto");AV(Au.target).find(".js-upload-progress:first").addClass("h-hide")}});AV("#edit-site-logo-dialog #btnAttachLogo").on("click",function(){var At=AV.trim(AV("#edit-site-logo-dialog #imageUrl").val());if(At){AV("body").css("cursor","wait");AV(this).closest(".dialog-content").find(".js-upload-progress:last").removeClass("h-hide");vBulletin.AJAX({call:"/uploader/Url",data:({urlupload:At}),complete:function(){AV("body").css("cursor","auto");AV("#edit-site-logo-dialog .js-upload-progress:last").addClass("h-hide")},success:function(Au){AV("#header .site-logo img").attr({src:Au.imageUrl,"data-fileid":Au.filedataid,"data-styleselection":AV("#edit-site-logo-dialog .styleselection:checked").val()})},title_phrase:"edit_site_logo",error_phrase:"error_processing_site_logo",after_error:function(){AV("#edit-site-logo-dialog #imageUrl").focus()}})}else{AV("#edit-site-logo-dialog #imageUrl").focus()}})}})});AV(".admin-button-flat").disableSelection();var Am=function(As){Aj()};f=AV("#edit-content .tabs").tabs({beforeActivate:function(At,Au){AV("#save-content").hide();if(Au.newTab.index()==1){if(m){AV("#edit-page-dropdown .layout-list .layout-border.selected").removeClass("selected");var As=AV("#edit-page-dropdown .layout-list input[type=radio][value={0}]".format(AV(".canvas-layout:visible").attr("data-layout-id")));As.prev().addClass("selected");Ad="canvas-"+As.attr("id")}}},create:function(As,At){Am(At.tab.index())},activate:function(As,At){Am(At.newTab.index())}});AV("#lnkAddModules").on("click",function(){f.tabs("option","active",0);return false});AS();AV(document).on("click",".module-buttons .hide-icon input",function(){var At=AV(this);At.closest(".canvas-widget")[this.checked?"addClass":"removeClass"]("hidden-widget");var As=At.attr("title");At.attr("title",At.data("toggle-title")).data("toggle-title",As)});AV(".canvas-layout-container .canvas-layout").each(function(){AB[this.id]=AV("#"+this.id+' div[class*="section-"]').length});if(!u){Ad="canvas-"+AV("#edit-page-dropdown .layout-list input[type=radio][value={0}]".format(AV(".canvas-layout:visible").attr("data-layout-id"))).prop("checked",true).attr("id")}AF=AV("#edit-page-dropdown .layout-list input[type=radio]").thumbnailRadioCheckbox({thumbnailClass:"layout-border"});AF.thumbnailRadioCheckbox("option","select",function(At,As){AV(".canvas-layout").addClass("h-hide");AV("#canvas-"+As.attr("id")).removeClass("h-hide");B("canvas-"+As.attr("id"));O();AA();t=true})}function B(Ao){if(!Ad){AV(".canvas-layout.h-hide input[type=hidden]").prop("disabled",true);AV("#"+Ao+" input[type=hidden]").prop("disabled",false);Ad=Ao;return }else{if(Ad==Ao){return }else{AV(".canvas-layout.h-hide input[type=hidden]").prop("disabled",true);AV("#"+Ao+" input[type=hidden]").prop("disabled",false);var Am=AB[Ao];var Al=false;var An=0;AV("#"+Ad+" > .canvas-layout-row > .canvas-widget-list").each(function(){var At=AV(this);Al=AR(At,AV("#"+Ao+" > .canvas-layout-row > .canvas-widget-list"));if(!Al.length){An=J(this);Al=AV("#"+Ao+" > .canvas-layout-row > div.section-"+An)}if(!Al.length){var Ap=Am;while(Ap>=0&&AV("#"+Ao+" > .canvas-layout-row > div.section-"+Ap).length==0){Ap--}Al=AV("#"+Ao+" > .canvas-layout-row > div.section-"+Ap)}var Ar=At.children(".canvas-widget");var Au=parseInt(Math.ceil(Ar.length/Al.length),10);console.log("Moving {0} widgets to {1} sections; ChunkSize {2}".format(Ar.length,Al.length,Au));if(Au>0){var As=0,Aq=0;Ar.each(function(){AV(this).appendTo(Al.eq(Aq));++As;if(As>=Au){As=0;++Aq}})}})}}Ad=Ao}function AR(Al,An){var Ap=["js-sectiontype-notice","js-sectiontype-primary","js-sectiontype-secondary","js-sectiontype-extra"],Am,Ao;for(Am in Ap){if(Al.is("."+Ap[Am])){Ao=Ap[Am];break}}return An.filter(function(){return AV(this).is("."+Ao)})}function J(An){var Am=/section-(\d+)/gi;var Al=null;AV(AV(An).attr("class").split(" ")).each(function(Ap,Aq){var Ao=Am.exec(Aq);if(Ao&&!isNaN(Ao[1])){Al=Ao[1]}});return Al}function Ae(Al){if(!AV.isArray(Al)||Al.length==0){return }vBulletin.AJAX({call:"/ajax/admin-template/widget",data:({widgets:Al,pagetemplateid:AV("#save-page-form #pagetemplateid-yes").val()}),success:function(Am){if(AV.isArray(Am.widgets)){AV.each(Am.widgets,function(An,Ap){if(!Ap.widgetid||Number(Ap.widgetid)<1||!AV.trim(Ap.template)){return true}var Aq=(Ap.displaysection&&Number(Ap.displaysection)>0)?Ap.displaysection:0,Ao=AV(Ap.template);Ao.appendTo(AV(".canvas-layout:not(.h-hide) .canvas-widget-list.section-"+Aq).height("auto")).filter(":not(.container-widget)").find(".toggle-button").trigger("click",[true]);Ao.find(".tabs").tabs()})}},error_phrase:"error_adding_widgets",});return false}function Ac(Al,Am){var An=Al.closest(".channel-item-container").children(".sub-channel-container").children(".channel-item-container");if(Al.text()=="<"){Al.text(">");An.slideDown(150)}else{if(typeof (Am)==="undefined"||!Am){Al.text("<");itemContainer.slideUp(150)}}}function K(){AV(".channel-config-dialog .channel-list").sortable({placeholder:"main-channel-container-highlight drag-highlight h-clear",update:function(Al,Am){Am.item.css("z-index","0");p.forum=true;x=true},sort:function(Al,Am){},start:function(Al,Am){if(AV.browser.msie&&parseInt(AV.browser.version,10)==8){Am.item.height(Am.item.height()-4)}Am.item.css("z-index","99999");Am.placeholder.height(Am.item.outerHeight())},over:function(Al,Am){},receive:function(Al,Am){},out:function(Al,Am){},handle:".grip-icon-main",items:".main-channel-container"})}function F(Al){AD=Al.find(".main-channel-container").sortable({connectWith:".sub-channel-container",placeholder:"channel-item-highlight drag-highlight",revert:true,update:function(Am,An){var Ao=An.item.closest(".main-channel-container");if(An.sender&&An.sender.hasClass("main-channel-container")){if(AV("> .channel-item-container",An.sender).length==0){An.sender.slideUp("fast",function(){AV(this).remove()})}}p.forum=true;x=true},sort:function(Am,An){},activate:function(Am,An){},start:function(Am,An){},stop:function(Am,An){AV(".main-channel-container, .sub-channel-container").height("auto")},over:function(Am,An){},receive:function(Am,An){},out:function(Am,An){},handle:".channel-item-inner > .grip-icon-item",items:".channel-item-container"})}function U(Al){AJ=Al.find(".sub-channel-container").sortable({connectWith:".sub-channel-container",revert:true,placeholder:"channel-item-highlight drag-highlight",update:function(Am,An){if(An.sender&&An.sender.hasClass("main-channel-container")){if(AV("> .channel-item-container",An.sender).length==0){An.sender.slideUp("fast",function(){AV(this).remove()})}}p.forum=true;x=true},sort:function(Am,An){},start:function(Am,An){},stop:function(Am,An){AV(".main-channel-container, .sub-channel-container").height("auto")},over:function(An,Ao){var Am=AV(this).closest(".channel-item-container").children(".channel-item").find(".toggle-button");Ac(Am,true)},receive:function(Am,An){},out:function(Am,An){},handle:".channel-item-inner > .grip-icon-item",items:".channel-item-container"})}function Af(Al,Ao,Ap,Aq,At,Av,As){var Ar='<div class="'+(At?"category-to-channel":"channel-to-category")+'"><a href="#">'+vBulletin.phrase.get((At?"make_forum":"make_category"))+"</a></div>";var Au=AV(('<div class="main-channel-container">				<div class="grip-icon grip-icon-main h-left"><div>&uml;</div><div>&uml;</div><div>&uml;</div><div>&uml;</div><div>&uml;</div></div>				<div class="channel-item-container">					<div class="channel-item shadow" data-channel-id="{0}" data-parent-id="{2}">						<div class="channel-item-inner">							<div class="grip-icon grip-icon-item h-left"><div>&uml;</div><div>&uml;</div><div>&uml;</div><div>&uml;</div><div>&uml;</div></div>							<div class="channel-title"><div title="'+vBulletin.phrase.get("click_text_edit_title")+'">{1}</div><input type="text" name="channeltitle" value="{1}" /></div>							<div class="close-button" title="'+vBulletin.phrase.get("remove_forum")+'">x</div>							<div class="toggle-button"><</div>							<div class="num-subchannels">'+As+'</div>							<div class="add-subchannel-button h-right" title="'+vBulletin.phrase.get("add_subforum")+'"><a href="#">+</a></div>							'+Ar+'							<div class="h-clear"></div>						</div>					</div>					<div class="sub-channel-container"></div>				</div>		 </div>').format(Ao,Aq,Ap)).appendTo(Al);if(Av){var Am=AV("#top-level-forum .channel-config-dialog .channel-list");var An=Am.find(".main-channel-container").last();AV("html, body").animate({scrollTop:An.offset().top},"fast")}p.forum=true;x=true;return Au}function AP(An,Ao,Ap,As,Am,Ar){var Aq='<div class="'+(As?"category-to-channel":"channel-to-category")+'"><a href="#">'+vBulletin.phrase.get((As?"make_forum":"make_category"))+"</a></div>";var At=Am.hasClass("main-channel-container")?AV("> .channel-item-container > .sub-channel-container",Am):AV("> .sub-channel-container",Am);var Al=AV(('<div class="channel-item-container">				<div class="channel-item shadow" data-channel-id="{0}" data-parent-id="{2}">					<div class="channel-item-inner">						<div class="grip-icon grip-icon-item h-left"><div>&uml;</div><div>&uml;</div><div>&uml;</div><div>&uml;</div><div>&uml;</div></div>						<div class="channel-title"><div title="Click text to edit title">{1}</div><input type="text" name="channeltitle" value="{1}" /></div>						<div class="close-button" title="'+vBulletin.phrase.get("remove_forum")+'">x</div>						<div class="toggle-button"><</div>						<div class="num-subchannels">'+Ar+'</div>						<div class="add-subchannel-button h-right" title="'+vBulletin.phrase.get("add_subforum")+'"><a href="#">+</a></div>						'+Aq+'						<div class="h-clear"></div>					</div>			 </div>			 <div class="sub-channel-container"></div>			</div>').format(An,Ap,Ao)).hide().appendTo(At);p.forum=true;x=true;return Al}function AZ(){vBulletin.AJAX({call:"/ajax/fetch-widget-admin-template-list",complete:function(){Aj();AV(window).resize(Aj)},success:function(An){AG=true;if(AV.isArray(An)){if(An.length>0){var Ao={},Ar=0;AV.each(An,function(At,Au){if(!Au.widgetid||Number(Au.widgetid)<1){return true}Ar++;if(!Ao[Au.category]){Ao[Au.category]={count:1,title:Au.category_title}}else{Ao[Au.category].count++}var As=AV("#edit-page-dropdown .module-list .module-icon-template").clone();As.attr("data-widget-id",Au.widgetid).attr("data-title",AV.trim(Au.title).toLowerCase()).data("canbemultiple",Au.canbemultiple).removeClass("module-icon-template").addClass(("module-item category-{0}"+(Au.cloneable=="1"?" module-cloneable":"")).format(Au.category));AV(".module-icon",As).html(AV("<img />").attr("src",pageData.baseurl+"/images/sitebuilder/"+AV.trim(Au.icon)).attr("height",60).attr("width",60).attr("alt",vBulletin.phrase.get("module_icon")));AV(".module-title .main-title",As).html(AV.trim(Au.title));As.appendTo("#edit-page-dropdown .module-list").removeClass("h-hide")});AV(('<div class="category-arrow-left h-left" title="'+vBulletin.phrase.get("previous")+'">&lsaquo;</div>							<div class="scroller category h-left">								<div class="categories h-left">									<div id="category-all" class="category selected">'+vBulletin.phrase.get("all")+' ({0})</div>									<div id="category-result" class="category h-hide">'+vBulletin.phrase.get("search_results")+' (<span></span>)</div>								</div>							</div>							<div class="category-arrow-right h-left" title="'+vBulletin.phrase.get("next")+'">&rsaquo;</div>							<div class="h-clear"></div>').format(Ar)).insertBefore("#edit-page-dropdown .module-list-container .scroller");var Am=0;AV.each(Ao,function(At,Au){var As=AV('<div id="category-{0}" class="category">{1} ({2})</div>'.format(At,Au.title,Au.count)).insertBefore("#category-result");Am+=As.outerWidth(true)});var Aq=Am+AV("#category-all").outerWidth(true);AV(".categories").width(Aq);if(AV(".categories").width()<=AV(".scroller.category").width()){AV(".category-arrow-left, .category-arrow-right").css("visibility","hidden")}else{AV(".category-arrow-right").css("visibility","visible")}Ak();c=AV("#edit-page-dropdown .module-list .module-item").not(".non-module-item");c.draggable({connectToSortable:".canvas-layout-row > .canvas-widget-list:visible",helper:"clone",revert:"invalid",appendTo:"#add-modules .module-list-container",zIndex:2000,start:function(As,At){if(AV(this).data("canbemultiple")=="0"&&AV("#content .canvas-layout .canvas-widget[data-widget-id={0}]".format(AV(this).attr("data-widget-id"))).length>0){vBulletin.warning("move_not_allowed",["adding_multiple_modules_not_allowed",AV(".main-title",this).html()]);return false}v=true},stop:function(As,At){v=false}}).disableSelection();var Al=false;AV("#search-module-keyword").on("keyup",function(As,A0){var Az=AV("#add-modules"),Aw=AV("#category-result"),At=AV(".categories",Az),Au=AV(".scroller.category",Az),Av=false;AV(".module-item",Az).hide();if(!A0){AV(".category.selected",Az).removeClass("selected")}var Ay=AV.trim(this.value.toLowerCase());if(Ay){AV('.module-item[data-title*="{0}"]'.format(Ay),Az).show();Aw.removeClass("h-hide").addClass("selected")}else{AV(".module-item",Az).show();AV("#category-all").removeClass("h-hide").addClass("selected");Aw.addClass("h-hide").removeClass("selected");Av=true}var A1=AV(".module-item:visible",Az).length;AV("span",Aw).text(A1);Ak();if(A1==0){AV(".empty-module",Az).show()}else{AV(".empty-module",Az).hide()}if(Av){At.width(Aq)}else{At.width(Aq+Aw.outerWidth(true))}if(At.width()<=Au.width()){AV(".category-arrow-left, .category-arrow-right",Az).css("visibility","hidden");Au.scrollLeft(0)}else{if(Av){AV(".category-arrow-left",Az).css("visibility","hidden");AV(".category-arrow-right",Az).css("visibility","visible");Au.scrollLeft(0)}else{AV(".category-arrow-left",Az).css("visibility","visible");AV(".category-arrow-right",Az).css("visibility","hidden");var Ax=Au.get(0);Au.scrollLeft(Ax.scrollWidth-Ax.clientWidth)}}return true});AV("#add-modules .categories .category").on("click",function(Au){Au.stopPropagation();if(AV(this).hasClass("selected")){return false}var As=AV(this).closest(".module-list-container"),Av=AV(".module-item",As);AV(".category.selected",As).removeClass("selected");AV(this).addClass("selected");Av.hide();AV(".empty-module",As).hide();var At=this.id;if(At=="category-all"){Av.show();AV(".non-module-item",As).hide()}else{if(At=="category-result"){AV("#search-module-keyword").triggerHandler("keyup",[true])}else{AV(".module-item.{0}".format(At),As).show()}}Ak();return false}).disableSelection();var Ap;AV(".category-arrow-left").on({mousedown:function(){AV(".category-arrow-right").css("visibility","visible");Ap=setInterval(function(){var As=AV(".scroller.category");As.scrollLeft(As.scrollLeft()-20);if(As.scrollLeft()==0){AV(".category-arrow-left").css("visibility","hidden");clearInterval(Ap)}},50)},mouseup:function(){clearInterval(Ap)}}).disableSelection();AV(".category-arrow-right").on({mousedown:function(){AV(".category-arrow-left").css("visibility","visible");Ap=setInterval(function(){var At=AV(".scroller.category");At.scrollLeft(At.scrollLeft()+20);var As=At.get(0);if(At.scrollLeft()==As.scrollWidth-As.clientWidth){AV(".category-arrow-right").css("visibility","hidden");clearInterval(Ap)}},50)},mouseup:function(){clearInterval(Ap)}}).disableSelection()}else{AV('<div class="empty-module">'+vBulletin.phrase.get("no_modules")+"</div>").appendTo("#edit-page-dropdown .module-list")}}},error_phrase:"error_retrieving_modules",})}function n(Am,Al){vBulletin.AJAX({call:"/ajax/api/widget/fetchWidgetGuidToWidgetidMap",success:function(An){if(An.map){AO=An.map}else{AO={error_result:An}}if(typeof Am=="function"){Am.apply(this,Al)}}})}function q(){AV("#edit-page-dropdown .template-list").empty();vBulletin.AJAX({call:"/ajax/api/pagetemplate/fetchPageTemplateList",data:{pagetemplateid:AV("#save-page-form #pagetemplateid-yes").val()},success:function(Am){z=true;if(AV.isArray(Am)&&Am.length>0){var Al=false;AV.each(Am,function(An,Ao){AV('<div class="template-item">								<input type="radio" id="pagetemplateid-{0}" name="pagetemplateid" value="{0}" data-thumbnail="{1}/images/sitebuilder/icon-layout-{4}.png"{2} />								<label class="label">{3}</label>							</div>'.format(Ao.pagetemplateid,pageData.baseurl,(!u&&AV("#save-page-form #pagetemplateid-yes").val()==Ao.pagetemplateid)?' checked="checked"':"",Ao.title,Ao.screenlayoutvarname)).appendTo("#edit-page-dropdown .template-list").data({screenlayoutid:Ao.screenlayoutid,widgetinstances:Ao.widgetinstances});if(AV("#save-page-form #pagetemplateid-yes").val()==Ao.pagetemplateid){Al=true;if(Ao.title==""){window.console.warn("The page template for this page does not have a title.")}}});if(!u&&!Al){window.console.error("The page template for this page was not in the list returned by fetchPageTemplateList! Expected pagetemplateid: {0}. Please ensure that this page template has a title.".format(AV("#save-page-form #pagetemplateid-yes").val()))}AV(".template-item",AV("#edit-page-dropdown .template-list")).each(function(An){AV(this).attr("data-title",AV(".label",AV(this)).text().toLowerCase())});AV("#search-template-keyword").on("keyup",function(Ar){if(Ar.keyCode==13){Ar.preventDefault();return false}var Ao=AV("#select-template"),As=AV(".scroller",Ao),Aq=false;AV(".template-item",Ao).hide();var An=AV.trim(this.value.toLowerCase());if(An){AV('.template-item[data-title*="{0}"]'.format(An),Ao).show()}else{AV(".template-item",Ao).show();Aq=true}var Ap=AV(".template-item:visible",Ao).length;Ak();AV(".empty-template",Ao).toggle(Ap==0);return true});AV("#search-template-keyword").on("keydown",function(An){if(An.keyCode==13){An.preventDefault();return false}});b=AV("#edit-page-dropdown .template-list .template-item input[type=radio]").thumbnailRadioCheckbox({thumbnailClass:"template-border",preselect:function(Ao,An){if(An.is(":checked")){return false}if(t||x){openConfirmDialog({title:vBulletin.phrase.get("switch_template"),message:vBulletin.phrase.get("template_changes_will_be_lost"),iconType:"warning",onClickYes:function(){t=false;x=false;m=true;b.thumbnailRadioCheckbox("check",An,true)}});return false}m=true;return true},select:function(Ar,An){AV(".canvas-layout").addClass("h-hide");var Ap=An.closest(".template-item").data("screenlayoutid");AV(".canvas-layout[data-layout-id="+Ap+"]").removeClass("h-hide");O();AA();AV("#save-page-form #pagetemplateid-yes, #config_pagetemplateid").val(An.val());AV("#save-page-form .page-template-name").html(vBulletin.phrase.get("page_template_name_id",An.closest(".template-item").find(".label").html(),An.val()));if(m){AV(".canvas-widget-list").empty();var Ao=An.closest(".template-item").data("widgetinstances");if(AV.isArray(Ao)&&Ao.length>0){var Aq=[];AV.each(Ao,function(As,At){Aq.push({widgetid:At.widgetid,widgetinstanceid:At.widgetinstanceid})});Ae(Aq,true);M()}else{window.vBulletin.loadingIndicator.hide()}}AV("body").removeClass("lnkNewPage").addClass("lnkEditPage");AV("#save-page-form .new-page-template input").prop("disabled",true);AV("#save-page-form .edit-page-template input").prop("disabled",false);m=true},unselect:function(){}});Ak()}},})}function AI(Al){vBulletin.AJAX({call:"/uploader/setlogo",data:({filedataid:AV("#header .site-logo img").attr("data-fileid"),styleselection:AV("#header .site-logo img").attr("data-styleselection")}),complete:function(){AV("body").css("cursor","auto")},success:function(Am){if(AV.trim(Am)==="true"){AV("#header .site-logo img").removeAttr("data-styleselection").removeAttr("data-fileid").attr("data-orig-src",AV("#header .site-logo img").attr("src"));AV("#admin-navbar-strip-gutter").addClass("h-hide").find(".prompt-text").text("");AV(document.body).removeClass("edit-mode lnkHeader").addClass("view-mode");AV("#header .disable-overlay").hide();L(null,{enableButtons:true,currentButton:null});if(typeof Al=="function"){Al()}}},error_phrase:"error_saving_site_logo"})}function N(Al,Am){AV.each(Al,function(Ao,An){var Ap=AV(('<div class="sub-channel channel" data-channel-id="{0}" data-parent-id="{6}">				<div class="avatar h-left"></div>				<div class="title"><a href="{1}{2}">{3}</a></div>				<div class="info">					<span class="label">'+vBulletin.phrase.get("last_post")+':</span>					<span class="title">{4}</span>				</div>				<div class="h-clear"></div>').format(An.nodeid,pageData.baseurl,An.url,An.title,(An.lastPostTitle?An.lastPostTitle:"<em>"+vBulletin.phrase.get("none")+"</em>"),pageData.baseurl_core,An.parentid)).appendTo(Am);N(Al[Ao].subchannels,Ap.eq(0))})}function AH(Am,Al){AV.each(Am,function(An,Ap){var Ao=AV.map(Ap.subchannels,function(As,Ar){return Ar}).length;var Aq=AP(Ap.nodeid,Ap.parentid,Ap.title,Ap.category,Al,Ao);AH(Ap.subchannels,Aq)})}function AY(){f.tabs("option","active",0);var Ar=AV("#add-modules").height();f.tabs("option","active",1);var Al=AV("#change-layout").height();f.tabs("option","active",2);var Am=AV("#select-template").height();AV("#edit-page-dropdown .lnkSaveChanges").trigger("click");var Ao=AV("#save-page-form").height();f.tabs("option","active",0);var Aq=Math.max(Ar,Al,Am,Ao);var An=AV("#edit-page-dropdown .panel-header-text");An.each(function(){var As=AV(this);As.css("min-height",Aq-parseFloat(As.css("margin-top"))-parseFloat(As.css("margin-bottom"))-parseFloat(As.css("padding-top"))-parseFloat(As.css("padding-bottom")))});var Ap=AV("#edit-page-dropdown .panel-main-content");Ap.each(function(){var As=AV(this);As.css("min-height",Aq-parseFloat(As.css("margin-top"))-parseFloat(As.css("margin-bottom"))-parseFloat(As.css("padding-top"))-parseFloat(As.css("padding-bottom")))})}function Y(Al,Am){var An=(Am&&Am.length>0)?AV(".canvas-layout .canvas-widget").not(Am).find(".widget-content"):AV(".canvas-layout .canvas-widget .widget-content");if(Al){An.each(function(){if(AV(this).is(":hidden")){AV(this).closest(".canvas-widget").find(".widget-header .toggle-button").trigger("click",[true])}})}else{An.each(function(){if(!AV(this).is(":hidden")){AV(this).closest(".canvas-widget").find(".widget-header .toggle-button").trigger("click",[true])}})}}function l(Am,Al){if(Al){if(Am.find(".widget-content").is(":hidden")){Am.find(".toggle-button").trigger("click",[true])}}else{if(!Am.find(".widget-content").is(":hidden")){Am.find(".toggle-button").trigger("click",[true])}}}function M(){if(!u){var Al=AV(".canvas-layout:visible .canvas-widget.subchannel-widget");if(Al.length==1){Al.find(".close-button").hide()}else{Al.find(".close-button").show()}}}function Ai(An,Al){var Am=An.attr("data-widget-id");if(y[Am]==null){vBulletin.AJAX({call:"/ajax/fetch-widget-template",data:({widgetid:Am}),success:function(Ao){var Aq=AV.trim(Ao);if(Aq){var Ap=AV(Aq.replace(/\<\s*script[^\>]*\>(.*?)\<\s*\/\s*script\>/g,""));Ap.attr("data-title",function(){var Ar=AV(".module-title",Ap).clone();Ar.find(".hide-on-viewmode").children().unwrap();Ar.find("*:hidden").remove();return AV.trim(Ar.text()).toLowerCase()});y[Am]=Ap;if(typeof Al=="function"){Al(Ap.clone(true))}}},error_phrase:"error_retrieving_cloned_widget_template",})}else{if(typeof Al=="function"){Al(y[Am].clone(true))}}}function E(Al,Am){AV(".edit-mode .canvas-widget.youtube-widget .widget-content").css("visibility",Al);if(Am){Am.find(".widget-content").css("visibility",(Al=="hidden"?"visible":"hidden"))}}function C(Al){var Ao="js-sb-module-config--viewpermissions--template";if(!Ao.length){return""}if(!Al.hasOwnProperty("defaultvalue")){Al.defaultvalue={show:"all",}}var As=AV("."+Ao).clone().removeClass(Ao+" h-hide"),Au=Al.defaultvalue,At=(Au.hasOwnProperty("hide")?"hide":"show"),Aq=(At=="show"&&typeof Au[At]=="string"&&Au[At]=="all"),Am=As.find("input.js-module_viewpermissions__key[value='show_all']"),Ar=As.find("input.js-module_viewpermissions__key[value='show']"),An=As.find("input.js-module_viewpermissions__key[value='hide']"),Ap=As.find(".js-module_viewpermissions_ugchecklist");if(At=="hide"){At="show";Aq=true;Am.prop("checked",false);Ar.prop("checked",true)}if(At=="hide"){Am.prop("checked",false);Ar.prop("checked",false);An.prop("checked",true)}else{if(Aq){Am.prop("checked",true);Ar.prop("checked",false);An.prop("checked",false);Ap.addClass("h-hide")}else{Am.prop("checked",false);Ar.prop("checked",true);An.prop("checked",false)}}if(!Aq){AV.each(Au[At],function(Av,Aw){Ap.find("input.js-module_viewpermissions__value[value='"+Aw+"']").prop("checked",true)})}As.find("input.js-module_viewpermissions__key").on("change",function(Av){if(this.value=="show_all"){Ap.addClass("h-hide")}else{Ap.removeClass("h-hide")}});return As}function X(Am){var Ao="js-sb-module-config--filter_nodes--template";if(!Ao.length){return""}if(!Am.hasOwnProperty("defaultvalue")){Am.defaultvalue={include:["all"],}}var Ax=AV("."+Ao).clone().removeClass(Ao+" h-hide"),Az=Am.defaultvalue,Ay=(Az.hasOwnProperty("exclude")?"exclude":"include"),An=Az.hasOwnProperty("include_children")?Az.include_children:true,Aw=Ax.find("input[name='data[module_filter_nodes][include_children]']"),A0=Ax.find("input.js-module_filter_nodes__key[value='include']"),Av=Ax.find("input.js-module_filter_nodes__key[value='exclude']"),Aq=Ax.find("select.js-module_filter_nodes-values"),Al=Ax.find("input[name='data[module_filter_nodes][selection_type]']"),Au=Ax.find("*[data-disable-on='exclude']"),As=Ax.find("*[data-disable-on='include']"),Ap=function(A2,A3){var A1=Aq.data("selectBox-control")||{};A2.each(function(){var A4=AV(this);A4.attr("disabled","disabled");if(A4.is("option")&&A1.length>0){A1.find("li:has(> a[rel='"+A4.val()+"'])").removeClass("selectBox-selected").addClass("selectBox-disabled")}});A3.each(function(){var A5=AV(this);A5.removeAttr("disabled");if(A5.is("option")&&A1.length>0){var A4="";if(A5.is(":selected")){A4="selectBox-selected"}A1.find("li:has(> a[rel='"+A5.val()+"'])").removeClass("selectBox-disabled").addClass(A4)}})},At=Ax.find("*[data-hide-on='exclude']"),Ar=Ax.find("*[data-hide-on='include']");Al.on("change vb-init",function(A1){var A3=AV(this),A4=A3.val(),A2=Aq.data("selectBox-control")||{};if(!A3.is(":checked")){return }if(A4=="all"||A4=="current"){Aq.attr("disabled","disabled");if(A2.length>0){A2.addClass("selectBox-disabled")}}else{Aq.removeAttr("disabled");if(A2.length>0){A2.removeClass("selectBox-disabled")}}});Ax.find("input.js-module_filter_nodes__key").on("change",function(A1){if(this.value=="exclude"){Ap(Au,As);At.hide();Ar.show()}else{Ap(As,Au);Ar.hide();At.show()}});if(Ay=="exclude"){A0.prop("checked",false);Av.prop("checked",true);Av.change()}else{Av.prop("checked",false);A0.prop("checked",true);A0.change()}if(!Az.hasOwnProperty(Ay)){Az.key=[]}else{if(typeof Az[Ay]=="string"||typeof Az[Ay]=="number"){Az[Ay]=[Az[Ay]]}}AV.each(Az[Ay],function(A1,A2){if(A2==="all"){Al.filter("[value='all']").prop("checked",true);return false}else{if(A2==="current"){Al.filter("[value='current']").prop("checked",true);return false}else{Al.filter("[value='custom']").prop("checked",true);Aq.find("option[value='"+A2+"']").prop("selected",true)}}});Al.trigger("vb-init");Aw.prop("checked",An);return Ax}function AS(){AV(document).off("click",".canvas-widget.default-widget:not(.js-search-widget) .edit-button").on("click",".canvas-widget.default-widget:not(.js-search-widget) .edit-button",function(){var As=AV(this).closest(".canvas-widget"),Am=As;var An=AV("> .widget-header .module-title",As);(function(){var At=As.data("widget-instance-id");if(vBulletin.sitebuilder.tempModuleHTMLCache["widgetinstance_"+At]){if(AV("#sb-temp-module-cache").length==0){AV('<div id="sb-temp-module-cache" class="h-hide"></div>').appendTo("body")}var Au=AV(vBulletin.sitebuilder.tempModuleHTMLCache["widgetinstance_"+At]);if(Au.find(".widget-tabs").length>0||Au.is(".widget-tabs")){AV("#sb-temp-module-cache").append(Au);delete vBulletin.sitebuilder.tempModuleHTMLCache["widgetinstance_"+At]}}var Av=AV("#sb-temp-module-cache .canvas-widget").filter(function(){return AV(this).data("widget-instance-id")==At});if(Av.length==1&&(Av.find(".widget-tabs").length>0||Av.is(".widget-tabs"))){As=Av}})();if(As.is(".js-search-widget")){return }var Ap=As.attr("data-widget-id");var Ao;if(AV("span.admin-only",An).length>0){Ao=AV("span.admin-only",An).text()}else{Ao=AV(".hide-on-viewmode",An).length>0?AV(".hide-on-viewmode",An).text():An.text()}var Ar=As.data("widget-type")||"";AV("#config-dialog .loader").show();AV("#config-dialog .widget-name h1").html(Ao);AV("#config-dialog .dialog-content .widget-config-container").hide().empty().removeClass("error notice");AV("#config-dialog").data("selected-module",Am);E("hidden");AV("#config-dialog").dialog("open");var Aq=Am.attr("data-widget-instance-id")||"";vBulletin.AJAX({call:"/ajax/api/widget/fetchConfigSchema",data:({widgetid:Ap,widgetinstanceid:Aq,pagetemplateid:W(),configtype:"admin"}),success:function(A9){AV("#config_widgetid").val(A9.widgetid);AV("#config_widgetinstanceid").val(A9.widgetinstanceid);d(A9.pagetemplateid);Am.attr("data-widget-instance-id",A9.widgetinstanceid);if(!Aq){R(Am)}var BA=AV("#config-dialog .dialog-content .widget-config-container");if(!A9.configs||A9.configs.length==0){AV("#config-dialog .widget-config-container").html(vBulletin.phrase.get("no_configurations_found")).addClass("notice");AV("#btnSaveConfig").prop("disabled",true);AV("#btnCloseConfig").focus()}else{var BB=0;AV('<input type="hidden" name="data[widget_type]" />').addClass("widget-type").val(Ar).appendTo(BA);var BG=false,Av=false,A5=false,Az=false,BI,BH=false,A4=Am.data("is-tabbed-container"),A6={display_tabs:false,default_tab:false},A3=(AV("#debug-information").length==1),A2=vBulletin.isRtl();AV.each(A9.configs,function(BU,BN){var BM=null;switch(BN.type){case"Text":var BO=typeof (BN.defaultvalue!="undefined")?BN.defaultvalue:"";BM=AV('<input type="text" name="data[{0}]" id="data[{0}]" />'.format(BN.name)).addClass("textbox config-textbox").val(BO);break;case"LongText":var BO=typeof (BN.defaultvalue!="undefined")?BN.defaultvalue:"";BM=AV('<textarea name="data[{0}]" id="data[{0}]" rows="3" />'.format(BN.name)).addClass("textbox config-textbox").val(BO);break;case"YesNo":var BS={option_1:AV('<input type="radio" value="1" name="data[{0}]" id="data[{0}_1]" />'.format(BN.name)),label_1:AV("<label />").attr({"for":"data["+BN.name+"_1]"}).text(vBulletin.phrase.get("yes")),option_0:AV('<input type="radio" value="0" name="data[{0}]" id="data[{0}_0]" />'.format(BN.name)),label_0:AV("<label />").attr({"for":"data["+BN.name+"_0]"}).text(vBulletin.phrase.get("no"))};var BY=BS["option_"+BN.defaultvalue];if(BY){BY.prop("checked",true)}BM=AV("<div />").append(BS.option_1,BS.label_1,BS.option_0,BS.label_0);break;case"Checkboxes":BM=AV("<div />");AV.each(BN.data,function(Ba,Bc){var Bb="";if(BN.defaultvalue&&typeof BN.defaultvalue[Ba]!="undefined"&&BN.defaultvalue[Ba]==1){Bb=' checked="checked"'}var Bd=AV('<div><label><input type="checkbox" name="data[{0}][{1}]"{2} value="1" class="js-checkbox-always-send" /> {3}</label></div>'.format(BN.name,Ba,Bb,Bc));BM.append(Bd)});break;case"Select":BH=true;BM=AV('<select name="data[{0}]" />'.format(BN.name));var BR;if(BN.data!=""){for(BR in BN.data){if(BN.defaultvalue==BR){AV("<option />").attr("value",BR).attr("selected","selected").text(BN.data[BR]).appendTo(BM)}else{AV("<option />").attr("value",BR).text(BN.data[BR]).appendTo(BM)}}}break;case"ChannelSelect":BH=true;BM=AV('<select name="data[{0}]" />'.format(BN.name));var BW=AV('<optgroup label="{0}" />'.format(vBulletin.phrase.get("special_options"))),BP=AV('<optgroup label="{0}" />'.format(vBulletin.phrase.get("channels"))),BV=false,BX=false;if(BN.data){AV.each(BN.data,function(Ba,Bb){var Bc=null;if(BN.defaultvalue==Bb.nodeid){Bc=AV("<option />").attr("value",Bb.nodeid).attr("selected","selected").html(Bb.text)}else{Bc=AV("<option />").attr("value",Bb.nodeid).html(Bb.text)}if(Bb.nodeid<1){Bc.appendTo(BW);BV=true}else{Bc.appendTo(BP);BX=true}});if(BV){BW.appendTo(BM)}if(BX){BP.appendTo(BM)}}break;case"ContentTypeSelect":BH=true;BM=AV('<select name="data[{0}]" />'.format(BN.name));var BW=AV('<optgroup label="{0}" />'.format(vBulletin.phrase.get("special_options"))),BT=AV('<optgroup label="{0}" />'.format(vBulletin.phrase.get("content_types"))),BV=false,BQ=false;if(BN.data){AV.each(BN.data,function(Ba,Bc){var Bb=null;if(BN.defaultvalue==Bc.value){Bb=AV("<option />").attr("value",Bc.value).attr("selected","selected").html(vBulletin.phrase.get(Bc.phrase))}else{Bb=AV("<option />").attr("value",Bc.value).html(vBulletin.phrase.get(Bc.phrase))}if(Bc.special){Bb.appendTo(BW);BV=true}else{Bb.appendTo(BT);BQ=true}});if(BV){BW.appendTo(BM)}if(BQ){BT.appendTo(BM)}}break;case"ProfileFieldSelect":BH=true;BM=AV('<select name="data[{0}]" />'.format(BN.name));if(BN.data){AV.each(BN.data,function(Ba,Bc){var Bb=null;if(BN.defaultvalue==Bc.field){Bb=AV("<option />").attr("value",Bc.field).attr("selected","selected").html(Bc.title)}else{Bb=AV("<option />").attr("value",Bc.field).html(Bc.title)}Bb.appendTo(BM)})}break;case"Slider":BM=(function(Bg){var Bb,Ba,Bj=0,Bk=0,Bf=1,Bd=0.1,Bc="",Bh="",Bi="";if(Bg.defaultvalue){Bj=Bg.defaultvalue}if(Bg.data&&typeof Bg.data=="object"){var Be=Bg.data;if(Be.hasOwnProperty("min")){Bk=parseFloat(Be.min)}if(Be.hasOwnProperty("max")){Bf=parseFloat(Be.max)}if(Be.hasOwnProperty("interval")){Bd=parseFloat(Be.interval)}if(Be.hasOwnProperty("leftlabel")&&Be.leftlabel){Bi+='<span class="h-left">'+Be.leftlabel+"</span>"}if(Be.hasOwnProperty("rightlabel")&&Be.rightlabel){Bi+='<span class="h-right">'+Be.rightlabel+"</span>"}if(Bi!=""){Bi='<div class="config-slider-label">'+Bi+'<div class="h-clear"></div></div>'}}Bc='data-min="{0}" data-max="{1}" data-interval="{2}"'.format(Bk,Bf,Bd);Bh=Bi+'<div class="js-module-config-slider config-slider" '+Bc+" >"+'	<input type="hidden" name="data[{0}]" value="{1}" />'.format(Bg.name,Bj)+"</div>";Bb=AV(Bh);return Bb})(BN);break;case"ChannelIncludeExclude":BM=X(BN);BH=true;break;case"Custom":switch(BN.name){case"tab_data":BM=AV("<div />");var BZ=g(Am),BL=AV("<div />");AV.each(BZ,function(Bd,Ba){var Bb="[tab_data]["+Bd+"][title]",Bc=Ba.title,Be=AV('<input type="text" name="data{0}" id="data{0}" />'.format(Bb)).addClass("textbox config-textbox").attr("value",Bc);BM.append(Be);AV.each(Ba.widgets,function(Bf,Bg){AV.each(Bg,function(Bi,Bh){Bb="[tab_data]["+Bd+"][widgets]["+Bf+"]["+Bi+"]";Bc=Bh;Be=AV('<input type="text" name="data{0}" id="data{0}" />'.format(Bb)).addClass("textbox config-textbox").attr("value",Bc);BM.append(Be)})})});break;case"module_viewpermissions":BM=C(BN);break;default:break}break;default:console.log("hit default");return ;break}$requiredMark=AV("<div />").addClass("config-required-mark h-left").append(function(){return(BN.isRequired==1)?"*":"&nbsp;"});if(BN.isEditable==0&&BM){BM.find("input").prop("readonly",true);if(!BM.is("input")){BM.prop("disabled",true)}}var BK=AV("<div />").addClass("config-label h-left").addClass(BN.name).html(BN.label);if(A3){BK.prop("title",BN.name)}if(BN.description){AV("<div />").addClass("config-description").html(BN.description).appendTo(BK)}if(BN.ishiddeninput&&BM){BM.attr("hidden",true);BA.append(BM)}else{BA.append(AV("<div></div>").addClass(function(){return"h-clearfix config-row"+(((++BB)%2!=0)?" odd":"")}).append(BK,$requiredMark,AV("<div></div>").addClass("config-value h-left").addClass(BN.name).append(BM)))}if(BN.name=="default_tab"){if(A4){A6.default_tab=BN}else{BG=true}}if(BN.name=="display_tabs"){if(A4){A6.display_tabs=BN}else{Av=true}}if(BN.name=="tab_order"){if(!A4){A5=true}}if(BN.name=="axd"){Az=true}});var BF=null;var Aw=function(){BI=Al(As);var BN=As.attr("data-widget-default-tab"),BL=AV('select[name="data[default_tab]"]',BA),BM;BL.empty();for(var BK in BI){if(Av){if(!AV('input:checkbox[value="'+BI[BK].selector+'"]',BC).is(":checked")){continue}}else{if(!BI[BK].displayed){continue}}BM=AV('<option value="'+BI[BK].selector+'">'+BI[BK].label+"</option>");if(BF&&BF==BI[BK].selector){BM.attr("selected","selected")}else{if(BN==BI[BK].selector){BM.attr("selected","selected")}}BL.append(BM)}};var BD=function(){BI=Al(As);var BL=AV(".config-value.tab_order",BA),BM,BN;BL.empty().append("<ul>");for(var BK in BI){if(Av){if(!AV('input:checkbox[value="'+BI[BK].selector+'"]',BC).is(":checked")){continue}}else{if(!BI[BK].displayed){continue}}BM=AV('<li id="'+BI[BK].selector+'">'+BI[BK].label+"</li>");AV("ul",BL).append(BM);BN=AV('<input name="data[tab_order]['+BI[BK].selector.substring(1)+']" value="'+BK+'" type="hidden">');BL.append(BN)}AV("ul",BL).sortable({stop:function(){var BO=AV(this).sortable("toArray");BL.find("input:hidden").remove();for(BK in BO){BN=AV('<input name="data[tab_order]['+BO[BK].substring(1)+']" value="'+BK+'" type="hidden">');BL.append(BN)}}});AV("ul",BL).disableSelection()};if(Av){BI=Al(As);var BC=AV(".config-value.display_tabs",BA),Ay;for(var BE in BI){Ay=AV('<label><input type="checkbox" name="data[display_tabs][]" value="'+BI[BE].selector+'">'+BI[BE].label+"</label>");if(BI[BE].displayed){Ay.find("input:checkbox").attr("checked","checked")}BC.append(Ay)}if(BG){AV("input:checkbox",BC).on("click",function(){Aw();BD()})}}if(A5){BD();AV('select[name="data[default_tab]"]',BA).change(function(){BF=AV(this).val()})}if(BG){Aw()}var Au=s(Am);if(Au){AV("<input type='hidden' name='data[containerinstanceid]' value='"+Au+"' />").appendTo(BA)}if(A4){var A1=g(Am),Ax=AV('select[name="data[default_tab]"]',BA),BJ=AV(".config-value.display_tabs",BA),At=A6.display_tabs&&A6.display_tabs.defaultvalue||"";if(At==""){At={};AV.each(A1,function(BL,BK){At[BL]="1"})}var A8=function(){var BK;Ax.empty();AV.each(A1,function(BM,BL){BK=AV('<option value="'+BM+'">'+BL.title+"</option>");if(At[BM]=="0"){BK.prop("disabled",true)}else{if(A6.default_tab.defaultvalue==BM){BK.attr("selected","selected")}}Ax.append(BK)});if(Ax.is(".selectBox")){Ax.selectBox("refresh")}};if(A6.default_tab){A8()}if(A6.display_tabs){var A0;BJ.empty();AV.each(At,function(BM,BL){var BK="data[display_tabs]["+BM+"]";A0=AV("<label />").append(AV('<input type="hidden" name="'+BK+"\" value='0'/>")).append(AV('<input type="checkbox" name="'+BK+"\" value='1' data-tab-number=\""+BM+'" />')).append(document.createTextNode(A1[BM]["title"]));if(BL=="1"){A0.find("input:checkbox").prop("checked",true)}BJ.append(A0)});AV("input:checkbox",BJ).on("click",function(){var BO=AV(this),BL=BO.prop("checked"),BN=BO.data("tab-number"),BK=Ax.find("option[value='"+BN+"']"),BM=(BK.prop("disabled")!=!BL);At[BN]=BL;if(BM){A8()}})}}if(Az){var A7=AV(".config-value.axd",BA);A7.append('<button class="axd-edit-button b-button b-button--secondary b-button--sitebuilder" data-location="'+A9.widgetinstanceid+'">'+vBulletin.phrase.get("edit")+"</button>")}}BA.show();AV("#config-dialog .loader").hide();if(BH){BA.find("select").selectBox()}BA.find(".js-module-config-slider").each(function(BM){var BL=AV(this),BQ=BL.find("input"),BP=BL.parent().find(".js-slider-output"),BO=BL.data("min"),BK=BL.data("max"),BN=BL.data("interval");if(BQ.length){BL.slider({min:BO,max:BK,step:BN,value:BQ.val(),isRTL:A2,change:function(BR,BS){var BT=BS.value;if(BP.length){BP.val(BT)}BQ.val(BT)},})}});(function(){function BK(){var BL=AV(this),BM=BL.next(".js-checkbox-always-send-hidden");if(BM.length==0&&!BL.prop("checked")){AV('<input type="hidden" name="{0}" class="js-checkbox-always-send-hidden" value="0" />'.format(BL.prop("name"))).insertAfter(BL)}else{BM.remove()}}AV(".js-checkbox-always-send").off("click").on("click",BK);AV(".js-checkbox-always-send").each(BK)})();AV("#config-dialog .dialog-content .widget-config-container input,						#config-dialog .dialog-content .widget-config-container textarea,						#config-dialog .dialog-content .widget-config-container select,						#config-dialog .dialog-content .widget-config-container button").filter(function(){return AV(this).is(":visible")}).first().focus()},error_phrase:["error_retrieving_configuration",Ao],after_error:function(){AV("#config-dialog .loader").hide();AV("#config-dialog").dialog("close")},});return false});function Al(An){var Am=[];AV("ul.widget-tabs-nav li a, .widget-header ul.ui-tabs-nav li a, .widget-tabs-nav ul.ui-tabs-nav li a",An).each(function(){var Ao=AV(this),Ap;if(AV(this).closest("li").hasClass("h-hide")){Ap=false}else{Ap=true}Am.push({selector:Ao.attr("href"),label:Ao.text(),displayed:Ap})});return Am}}function O(){AV(".edit-mode .canvas-layout:visible > .canvas-widget-list").width("").each(function(){AV(this).width(AV(this).width())})}function AA(){if(AV.browser.msie&&parseInt(AV.browser.version,10)==8){var Al=AV(".edit-mode .canvas-layout:visible > .canvas-widget-list");Al.each(function(){var Am=AV(".canvas-widget",this),As=AV(this);var An=Am.outerHeight(true)||50;var Ao=Am.length*Am.outerHeight(true);var Ar=As.height()-Ao;console.log("offset:",Ar);if(Ar>=0&&Ar<An){var Aq=AV(window);var Ap=Aq.scrollTop();As.height(As.height()+(An-Ar));Aq.scrollTop(Ap);return false}else{if((Ar>An&&As.height()>parseInt(As.css("min-height"),10))||Ar<0){var Aq=AV(window);var Ap=Aq.scrollTop();As.height(Ao+An);Aq.scrollTop(Ap);return false}}})}}function AK(){window.console.log("Fetching page manager forums (initializeForumEditor)");vBulletin.AJAX({call:"/ajax/api/widget/fetchPageManagerForums",complete:function(){AV("#config-dialog .loader").hide()},success:function(Al){G=true;var An=AV("<div>").addClass("channel-list");AV.each(Al,function(Ap,Ar){var Aq=AV.map(Ar.subchannels,function(At,As){return As}).length;var Ao=Af(An,Ar.nodeid,Ar.parentid,Ar.title,Ar.category,false,Aq);AH(Ar.subchannels,Ao)});var Am=AV("#top-level-forum .channel-config-dialog");Am.find(".channel-list").remove();F(An);U(An);Am.append(An);AV(document).on("mousedown",".main-channel-container > .channel-item-container > .channel-item .grip-icon",function(){AV(this).closest(".main-channel-container").height(AV(this).closest(".main-channel-container").height())});AV(document).on("mousedown",".sub-channel-container > .channel-item-container > .channel-item .grip-icon",function(){AV(this).closest(".sub-channel-container").height(AV(this).closest(".sub-channel-container").height())});x=false;K()},error_phrase:"error_fetching_channels"});AV(document).on("click keydown",".channel-config-dialog .add-channel-fieldset .add-button, .channel-config-dialog .add-channel-fieldset input",function(Al){if(((Al.type=="click"||Al.which!=13)&&this.type=="text")||(Al.type=="keydown"&&this.type=="button"&&Al.which!=13)){return true}var Ao=(this.type=="text")?AV(this):AV(this).prev();var Am=AV.trim(Ao.val());if(Am&&Am!=Ao.prop("defaultValue")){var An=AV("#top-level-forum .channel-config-dialog .channel-list");Af(An,"","",vBulletin.htmlEntities(Am),0,true,0);F(An);K();Ao.val("");if(this.type=="button"){Ao.focus()}}else{vBulletin.warning("warning_gcpuser","please_enter_channel_title",function(){Ao.focus()})}});AV(document).on("click",".channel-config-dialog .main-channel-container .channel-item .channel-title div",function(){AV(this).hide();var Al=AV(this).next();Al.show();Al.select();Al.focus()});AV(document).on("keydown blur",".channel-config-dialog .main-channel-container .channel-item .channel-title input",function(Al){if(Al.type=="focusout"||(Al.type=="keydown"&&Al.which==13)){if(!AV.trim(this.value)&&Al.type=="focusout"){this.value=this.defaultValue}if(AV.trim(this.value)){AV(this).hide();AV(this).prev().text(this.value);AV(this).prev().show()}}});AV(document).on("click",".channel-config-dialog .channel-item .category-to-channel a",function(){var Al=AV(this).closest(".channel-item");Al.attr("data-switch-category",0);AV(this).parent().removeClass("category-to-channel").addClass("channel-to-category");AV(this).html(vBulletin.phrase.get("make_category"));return false});AV(document).on("click",".channel-config-dialog .channel-item .channel-to-category a",function(){var Al=AV(this).closest(".channel-item");Al.attr("data-switch-category",1);AV(this).parent().removeClass("channel-to-category").addClass("category-to-channel");AV(this).html(vBulletin.phrase.get("make_forum"));return false});AV(document).on("click",".channel-config-dialog .channel-item .toggle-button",function(){Ac(AV(this));return false});AV(document).on("click",".channel-config-dialog .channel-item .add-subchannel-button a",function(){var Al=AV(this).parent().siblings(".toggle-button");Ac(Al,true);var An=AV(this).closest(".channel-item-container");var Am=AP("","",vBulletin.phrase.get("new_channel"),0,An,0);U(An);Am.slideDown(100,function(){var Ao=An.find(".channel-item-inner").first().find(".num-subchannels");Ao.text(parseInt(Ao.text())+1);AV(".channel-title div",Am).click();AV(".channel-title input",Am).get(0).scrollIntoView(false);K()});return false});AV(document).on("click",".channel-config-dialog .channel-list .channel-item .close-button",function(){var Am=AV(this),An=AV("> .sub-channel-container > .channel-item-container",Am.closest(".channel-item-container")).length>0,Al=vBulletin.htmlEntities(Am.prev().text());openConfirmDialog({title:vBulletin.phrase.get("remove_forum_q"),message:vBulletin.phrase.get("do_you_want_to_remove_forum",Al,(An)?" "+vBulletin.phrase.get("subchannels_will_be_deleted"):""),iconType:"warning",onClickYes:function(){var Ar=Am.closest(".channel-item-container"),Aq=Ar.parent(),Ap=Am.closest(".channel-item").attr("data-channel-id");var Ao=function(){Ar.remove();if(Aq.hasClass("main-channel-container")){Aq.slideUp("fast",function(){AV(this).remove()})}};if(Ap){vBulletin.AJAX({call:"/ajax/api/content_channel/delete",data:{nodeid:Ap},success:function(As){Ao()},})}else{Ao()}}})})}function Ah(Am){function Al(Ao,Ap,An){vBulletin.AJAX({call:"/ajax/render/{0}_list".format(Ao),data:{page:Ap,isAjaxTemplateRenderWithData:true},complete:function(){AV("#config-dialog .loader").hide();AV("body").css("cursor","auto")},success:function(Aq){AV(("#top-level-{0} .channel-config-dialog").format(Ao)).html(Aq.template);if(An){vBulletin.pagination({context:("#top-level-{0} .channel-config-dialog").format(Ao),onPageChanged:function(Ar,As){Al(Ao,Ar)}})}},error_phrase:"error_fetching_channels"})}Al(Am,1,true);AV(document).on("click",".page_manager_table .channel_name div",function(){AV(this).hide();var An=AV(this).next();An.show();An.select();An.focus()});AV(document).on("keydown blur",".page_manager_table .channel_name input",function(Ap){if(Ap.type=="focusout"||(Ap.type=="keydown"&&Ap.which==13)){if(!AV.trim(this.value)&&Ap.type=="focusout"){this.value=this.defaultValue}var Ao=AV.trim(this.value),An=AV(this);if(Ao&&An.prev().html()!=Ao){AV("body").css("cursor","wait");vBulletin.AJAX({call:"/ajax/api/Content_Channel/update",data:{nodeid:An.parents(".channel_row").data("nodeid"),data:{title:Ao}},complete:function(){AV("#config-dialog .loader").hide();AV("body").css("cursor","auto")},success:function(Aq){An.hide();An.prev().html(Ao);An.prev().show()},error_phrase:"error_saving_page"})}}});AV(document).on("click",".page_manager_table .delete",function(){var An=AV(this);openConfirmDialog({title:vBulletin.phrase.get("remove_channel_q"),message:vBulletin.phrase.get("do_you_want_to_remove_channel",An.parents(".channel_row").find(".channel_name_val").text()),iconType:"warning",onClickYes:function(){vBulletin.AJAX({call:"/ajax/api/content_channel/delete",data:{nodeid:An.parents(".channel_row").data("nodeid")},success:function(Ao){An.parents(".channel_row").remove()}})}})})}var G=false;function AE(){AV("body").css("cursor","wait");var Al=function(An){var Am=An.index();if(Am==0&&!G){AK()}if((Am==1||Am==2)){Ah(AV(An.context).data("top-level"))}};o=AV("#manage-pages").tabs({beforeActivate:function(Ao,Ap){var An=Ap.newTab.index();if(An!=0&&x){var Am=openConfirmDialog({title:vBulletin.phrase.get("exit_without_saving_page"),message:vBulletin.phrase.get("forum_changes_will_be_lost"),iconType:"warning",onClickYes:function(){x=false;o.tabs("option","active",An)}});return false}},create:function(Am,An){Al(An.tab)},activate:function(Am,An){Al(An.newTab)}});o.tabs("option","active",0);AV("#manage-page-dropdown .lnkSaveChanges").on("click",function(){console.log("Saving forum/channel data");var Am=AV(this);if(Am.hasClass("h-disabled")){console.log("We're busy saving already. Try again later.");return }Am.addClass("h-disabled");vBulletin.loadingIndicator.show();AV("body").css("cursor","wait");var An=[];function Ao(Ar,Ap,Aq){var As=AV("> .channel-item-container",Ar);if(As.length>0){As.each(function(Au){var At=AV("> .channel-item",this);var Av=At.attr("data-channel-id");var Aw=At.attr("data-parent-id");subchannelObj={nodeid:Av||"0",previousParentId:Aw,title:AV(".channel-title div",At).html(),displayorder:Au+1,parentid:Aq||"0",subchannels:[]};if(At.attr("data-switch-category")!=null){subchannelObj.switchCategory=At.attr("data-switch-category")}Ap.subchannels.push(subchannelObj);Ao(At.next(".sub-channel-container"),Ap.subchannels[Au],Av)})}}if(p.forum){AV(".channel-config-dialog .channel-list .main-channel-container").each(function(Ar){var Aq=AV("> .channel-item-container > .channel-item",this);var As=Aq.attr("data-channel-id");var At=Aq.attr("data-parent-id");var Ap={nodeid:As,previousParentId:At,title:AV(".channel-title div",Aq).html(),displayorder:Ar+1,subchannels:[]};if(Aq.attr("data-switch-category")!=null){Ap.switchCategory=Aq.attr("data-switch-category")}Ao(Aq.next(".sub-channel-container"),Ap,As);An.push(Ap)});vBulletin.AJAX({call:"/ajax/api/widget/saveForums",data:{data:JSON.stringify(An)},complete:function(){AV("body").css("cursor","auto");vBulletin.loadingIndicator.hide();Am.removeClass("h-disabled")},success:function(Ap){console.log("Forum/channel changes successfully saved");if(Ap&&Ap.forums&&Ap.forums.length>0){x=false;p.forum=false;location.reload(true)}else{openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("error_saving_forums"),iconType:"error"});return false}},error_phrase:"error_saving_channels_code"})}else{console.log("No forum/channel changes to save");vBulletin.loadingIndicator.hide();AV("body").css("cursor","auto");Am.removeClass("h-disabled")}});AV(document).on("click","#manage-page-dropdown .lnkExitWithoutSaving",function(){if(x){openConfirmDialog({title:vBulletin.phrase.get("exit_without_saving_page"),message:vBulletin.phrase.get("do_you_want_to_exit_without_saving_page"),iconType:"warning",onClickYes:function(){location.reload(true)}})}else{location.reload(true)}})}function Q(){AV(document).on("focus click",".edit-mode .widget-content a, .edit-mode #channel-tabbar a, .edit-mode #btnSearch, .edit-mode #q",function(As){this.blur();return false});if(!AG){AZ()}if(!z){q()}else{b.thumbnailRadioCheckbox("check",AV("#select-template .template-border.selected").next("input"),false);if(!u){AV("#select-template .template-item input[value={0}]".format(AV("#pagetemplateid-yes").val())).prev().trigger("click")}}if(AV.isEmptyObject(AO)){n()}Ak();AV("#config_pagetemplateid").val("");r=undefined;if(u){AV("#save-page-form #pagetitle").val("");AV("#save-page-form #pageurl").val("");AV("#save-page-form #pagetemplateid").val("0");AV("#save-page-form #pageid").val("0");AV("#save-page-form #ishomeroute").prop("disabled",false).prop("checked",false)}AV("#edit-page-dropdown .lnkDeletePage").on("click",function(){openConfirmDialog({title:vBulletin.phrase.get("confirm_deletion_gcpglobal"),message:vBulletin.phrase.get("confirm_remove_page_desc"),buttonLabel:{yesLabel:vBulletin.phrase.get("delete_page"),noLabel:vBulletin.phrase.get("cancel")},iconType:"warning",onClickYes:function(){vBulletin.AJAX({call:"/ajax/api/page/delete",data:{pageid:pageData.pageid},dataType:"json",complete:function(){AV("body").css("cursor","auto")},success:function(As){console.log("deleted page "+pageData.pageid);window.location.href=pageData.baseurl},error:function(Au,At,As){console.log("page delete  failed! result:"+As);openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("error_deleting_page",Au.status),iconType:"error"})}})}})});AV("#edit-page-dropdown .lnkSaveChanges").on("click",function(){AV("#edit-page-dropdown .tabs li").removeClass("ui-tabs-active ui-state-active");AV("#edit-page-dropdown .tabs .tab").addClass("ui-tabs-hide");AV("#save-content").show();AV("#save-page-form .edit-page-template").css("display","");AV("#save-page-form .edit-page-template").prev("label").css("display","");if(AV("body").hasClass("lnkNewPage")){AV("#save-page-form .new-page-template input").prop("disabled",false);AV("#save-page-form .edit-page-template input").prop("disabled",true)}else{if(!AV("#pagetemplateid-yes").prop("checked")&&!AV("#pagetemplateid-no").prop("checked")){AV("#pagetemplateid-yes").prop("checked",true)}AV("#save-page-form .edit-page-template input").prop("disabled",false);AV("#save-page-form .new-page-template input").prop("disabled",true);if(u&&(!t&&!x)){AV("#save-page-form .edit-page-template").css("display","none");AV("#save-page-form .edit-page-template").prev("label").css("display","none")}if(AV("#pagetemplateid-yes").prop("checked")){AV("#save-page-form #templatetitle").prop("disabled",false);AV("#save-page-form #templatetitle-edit").prop("disabled",true);AV("#save-page-form .page-template-name").removeClass("h-hide")}else{AV("#save-page-form #templatetitle").prop("disabled",true);AV("#save-page-form #templatetitle-edit").prop("disabled",false);AV("#save-page-form .page-template-name").addClass("h-hide")}}});AV(document).on("click","#edit-page-dropdown .lnkExitWithoutSaving",function(){if(t||x||m||(!u&&(AV("#pagetitle").val()!=AV("#pagetitle").prop("defaultValue")||AV("#pageurl").val()!=AV("#pageurl").prop("defaultValue")))||(u&&(AV("#pagetitle").val()!=""||AV("#pageurl").val()!=""))){openConfirmDialog({title:vBulletin.phrase.get("exit_without_saving_page"),message:vBulletin.phrase.get("do_you_want_to_exit_without_saving_page"),iconType:"warning",onClickYes:function(){var As=parseInt(AV("input#pagetemplateid-new").val(),10);if(!isNaN(As)&&As>0){vBulletin.AJAX({call:"/ajax/api/page/deleteOrphanedPagetemplates",data:{pagetemplateids:[As]},success:function(At){console.log({msg:"/ajax/api/widget/deleteOrphanedPagetemplates success!",result:At,})},complete:function(){location.reload(true)},})}else{location.reload(true)}}})}else{location.reload(true)}});var Al=0;AV(window).on("resize.canvas",function(){clearTimeout(Al);Al=setTimeout(O,200)});var Ao=function(As){return'<label class="hide-icon module-button-item"><input type="checkbox" title="{0}" data-toggle-title="{1}"{2} /></label>'.format(vBulletin.phrase.get("check_to_hide_module"),vBulletin.phrase.get("uncheck_to_unhide_module"),As?' checked="checked"':"")};AV(".canvas-widget.container-widget .canvas-widget:not(.dummy-widget)").each(function(){var As=AV(this).hasClass("hidden-widget");AV(".module-buttons .admin-only",this).prepend(Ao(As));if(As){AV(".module-buttons .admin-only .hide-icon input",this).trigger("click").prop("checked",true)}});var Ar=function(Au,Av,Ax){var Aw=Av.item,Ax=Av.item.hasClass("module-item");var As=AV("> .canvas-widget.container-widget {0}".format(Ax?".module-item":".canvas-widget.container-widget"),this);if(As.length>0){var At=As.closest(".canvas-widget.container-widget");if(At.attr("data-widget-id")==As.attr("data-widget-id")){if(Ax){As.remove()}else{if(Av.sender){Av.sender.sortable("cancel")}else{AV(this).sortable("cancel")}}Ap=true;openAlertDialog({title:vBulletin.phrase.get("move_not_allowed"),message:vBulletin.phrase.get("dropping_container_module_into_container_module_not_allowed"),iconType:"warning"});return true}return false}return false};var An=function(As){if(As.parents(".canvas-widget.container-widget").length>0){if(AV(".module-buttons .admin-only .hide-icon",As).length==0){AV(".module-buttons .admin-only",As).prepend(Ao())}}else{As.removeClass("hidden-widget").find("> .widget-header .module-buttons .admin-only .hide-icon").remove()}};var Ap=false;AN=AV(".edit-mode .canvas-layout .canvas-widget-list:not(.js-draggable-module-target)");AN.sortable({revert:true,tolerance:"pointer",connectWith:".edit-mode .canvas-layout:visible .canvas-widget-list",placeholder:"canvas-widget canvas-widget-highlight drag-highlight",create:function(){O();AA()},update:function(At,Au){var Ax=this;if(Aa){if(!Ap){Ai(Au.item,function(A1){A1=A1.filter(function(){return this.nodeType===Node.ELEMENT_NODE});Au.item.replaceWith(A1);A1.filter(":not(.container-widget)").find(".toggle-button").trigger("click",[true]);if(!Ar.apply(Ax,[At,Au])){An(A1);A1.addClass("shadow").find(".widget-tabs").andSelf().filter(".widget-tabs").tabs();M();A1.parents(".canvas-widget.container-widget").find(".canvas-widget.dummy-widget").remove();var A2=A1.parents(".canvas-widget.container-widget");if(A2.length==1){A2.find(".canvas-widget-highlight").remove();A2.find(".module-item").remove()}}var Az=A1.data("widget-id"),Ay=s(A1),A0=function(A3){A1.attr("data-widget-instance-id",A3);if(Ay){R(A1)}i(A1)};if(Az){k(Ay,Az,{},A0)}})}}else{if(!Ar.apply(Ax,[At,Au])){An(Au.item);M()}if(AV.contains(this,Au.item[0])){var Aw=Au.item.closest(".canvas-widget"),As=s(Aw),Av=Aw.data("widget-instance-id")||0;R(Aw);if(Av){vBulletin.AJAX({call:"/ajax/api/widget/saveWidgetinstanceContainerinstanceid",data:{widgetinstanceid:Av,containerinstanceid:As},success:function(Ay){console.log("saveWidgetinstanceContainerinstanceid success: "+JSON.stringify(Ay))}})}}}if(Au.sender){var Aw=Au.sender.closest(".canvas-widget");if(Aw.length){R(Aw)}}t=true},out:function(As,At){AV(this).css("overflow","")},sort:function(As,At){if(v){Aa=true}var Au=At.placeholder.closest(".canvas-widget.container-widget");if(Au.length==1&&Au.find(".canvas-widget:last-child").hasClass("canvas-widget-highlight")){At.placeholder.css({"margin-bottom":0,"margin-top":-3})}else{At.placeholder.css({"margin-bottom":"","margin-top":""})}},start:function(As,At){E("hidden",At.item)},over:function(As,At){},stop:function(At,Au){AV(this).css("overflow","");Ap=false;AA();Aa=false;Au.item.height("auto");E("visible");AV(".canvas-layout .canvas-widget-list .canvas-widget-highlight").remove();var As=AV(".canvas-layout > .canvas-layout-row .canvas-widget-list > .canvas-widget.container-widget");AV(".canvas-layout > .canvas-layout-row .canvas-widget-list > .canvas-widget.container-widget").each(function(){var Av=AV(".canvas-widget-list",this);if(Av.children().length==0){Av.append('<div class="canvas-widget dummy-widget"><span>{0}</span></div>'.format(vBulletin.phrase.get("you_can_also_drag_and_drop_modules_here")))}else{if(Av.find(".canvas-widget.dummy-widget").length>0&&Av.find(".canvas-widget:not(.dummy-widget,.canvas-widget-highlight)").length>0){Av.find(".canvas-widget.dummy-widget").remove()}}})},receive:function(As,At){if(At.item.hasClass("module-item")){Ar.apply(this,[As,At,true])}},handle:".move-icon",items:".canvas-widget:not(.js-widget-non-sortable,.js-widget-pinned-sortable)",}).find(".canvas-widget .widget-header").disableSelection();AV(document).on("click",".edit-mode .canvas-widget .js-pin-module-button",function(){var Ax=AV(this),Aw=Ax.closest(".canvas-widget"),As=Aw.find("js-move-button"),Av="js-widget-pinned-sortable",Au="pin-icon--pinned",At=Aw.hasClass(Av);Aw.toggleClass(Av,!At);Ax.toggleClass(Au,!At)});AV(document).on("click",".edit-mode .canvas-widget .close-button",function(){var As=AV(this);openConfirmDialog({title:vBulletin.phrase.get("remove_module_q"),message:vBulletin.phrase.get("do_you_want_to_remove_module",As.closest(".widget-header").find(".module-title").text()),iconType:"warning",onClickYes:function(){var Aw=As.closest(".canvas-widget"),Av=Aw.data("widget-instance-id"),Au=Aw.parent(),At=Aw.parents(".canvas-widget.container-widget");Aw.remove();AA();M();t=true;AQ([Av]);R(Au);if(At.find(".canvas-widget").length==0){At.find(".canvas-widget-list").append('<div class="canvas-widget dummy-widget"><span>{0}</span></div>'.format(vBulletin.phrase.get("you_can_also_drag_and_drop_modules_here")))}}})});AV(document).on("click",".edit-mode .js-search-widget .edit-button",function(){E("hidden");Am(AV(this).closest(".js-search-widget"));AV("#search-config-dialog").dialog("open");return false});function Aq(A4,A3){var As=AV("#edit-page-dropdown .lnkSaveChanges .label").text();if(!A3){if(!AV.trim(AV("#save-page-form #pagetitle").val())){openAlertDialog({title:As,message:vBulletin.phrase.get("please_enter_page_name"),iconType:"warning",onAfterClose:function(){AV("#save-page-form #pagetitle").focus()}});return false}if(AV("body").hasClass("lnkEditPage")){var A2=AV("#save-page-form #pagetemplateid-yes");var At=AV("#save-page-form #pagetemplateid-no");if(!A2.prop("checked")&&!At.prop("checked")){openAlertDialog({title:As,message:vBulletin.phrase.get("please_choose_overwrite_template_options"),iconType:"warning",onAfterClose:function(){AV("#save-page-form #pagetemplateid-yes").focus()}});return false}else{if(At.prop("checked")){var Au=AV("#save-page-form #templatetitle-edit");var A7=AV.trim(Au.val());if(!A7||A7==Au.prop("defaultValue")){openAlertDialog({title:As,message:vBulletin.phrase.get("please_enter_new_template_name"),iconType:"warning",onAfterClose:function(){AV("#save-page-form #templatetitle-edit").focus()}});return false}openConfirmDialog({title:As,message:vBulletin.phrase.get("applying_new_template",AV("#save-page-form #templatetitle-edit").val()),buttonLabel:{yesLabel:vBulletin.phrase.get("save_page"),noLabel:vBulletin.phrase.get("cancel")},iconType:"warning",onClickYes:function(){},onAfterClose:function(){if(AV(this).attr("id")=="btnConfirmDialogYes"){AV("#save-page-form #btnOK").trigger("click",true)}}});return false}else{if(A2.prop("checked")){if(u&&(!t&&!x)){AV("#save-page-form #btnOK").trigger("click",true)}else{openConfirmDialog({title:As,message:vBulletin.phrase.get("overwrite_template_continue"),buttonLabel:{yesLabel:vBulletin.phrase.get("save_page"),noLabel:vBulletin.phrase.get("cancel")},iconType:"warning",onClickYes:function(){},onAfterClose:function(){if(AV(this).attr("id")=="btnConfirmDialogYes"){AV("#save-page-form #btnOK").trigger("click",true)}}})}return false}}}}else{var Au=AV("#save-page-form #templatetitle-new");var A7=AV.trim(Au.val());if(!A7||A7==Au.prop("defaultValue")){openAlertDialog({title:As,message:vBulletin.phrase.get("please_enter_new_template_name"),iconType:"warning",onAfterClose:function(){AV("#save-page-form #templatetitle-new").focus()}});return false}}}var A6=AV(".canvas-layout:visible");Ad=A6.attr("id");var A1=parseInt(A6.attr("data-layout-id"),10);AV("#save-page-form #screenlayoutid").val(A1);function Av(BB){var BC={widgetId:BB.attr("data-widget-id"),widgetInstanceId:(BB.attr("data-widget-instance-id")||"0")};if(BB.hasClass("container-widget")){var A8=[];var BA=[];AV("div.canvas-widget-list > div.canvas-widget",BB).each(function(BD){if(!AV(this).hasClass("hidden-widget")){BA.push(AV(this).attr("data-widget-instance-id"))}A8.push(Av(AV(this)))});BC.subModules=A8;BC.displaySubModules=BA}if(BB.data("is-tabbed-container")){var A9=[];BB.find("> .js-admin-widget-content > .js-admin-widget-tab").each(function(){var BD=AV(this);BD.find("> .widget-content > .canvas-layout-row > .canvas-widget-list > .canvas-widget:not(.dummy-widget)").each(function(){var BE=AV(this);A9.push(Av(BE))})});BC.tabbedContainerSubModules=A9}return BC}AV('input[type=hidden][name*="displaysections"]',A6).clone().appendTo(AV("#moduleData").empty());AV("#"+Ad+" > .canvas-layout-row > div.canvas-widget-list").each(function(){var A8=[],A9=J(this);AV(this).children("div.canvas-widget").each(function(){A8.push(Av(AV(this)))});AV('#save-page-form input[name="displaysections['+A9+']"]').val(JSON.stringify(A8))});var A0=AV("#save-page-form"),Az=A0.find("#ishomepage"),Ax={};if(!Az.prop("disabled")){Ax.ishomepage=0}AV.each(A0.serializeArray(),function(A8,A9){Ax[A9.name]=A9.value});function A5(A8){vBulletin.AJAX({call:"/admin/savepage",data:{input:A8,url:window.location.href},complete:function(){AV("body").css("cursor","auto")},success:function(A9){if(A9.url!=null){window.location.href=A9.url}},error_phrase:"error_saving_page",})}var Aw=AV("input[name='screenlayoutid'][value='"+A1+"']");if(Aw.length>0&&Aw.attr("data-guid")=="vbulletin-screenlayout-bare-full-57433eecd10803.93763070"){var Ay={title:vBulletin.phrase.get("warning"),message:vBulletin.phrase.get("you_cannot_revert_this_layout_confirm"),onClickYes:function(){A5(Ax)}};openConfirmDialog(Ay)}else{A5(Ax)}}AV(document).on("click","#save-page-form #btnOK",Aq);AV("#config-dialog").dialog({title:vBulletin.phrase.get("module_configuration"),autoOpen:false,modal:true,resizable:false,closeOnEscape:false,showCloseButton:false,height:500,width:800,dialogClass:"dialog-container config-dialog-container input-dialog",open:function(){AV("#config-dialog .loader").show();AV("body").css("cursor","wait")},create:function(){AV(document).on("submit",".sitebuilder-widget-form",function(){function At(Av){AV("body").css("cursor","wait");AV("#config-dialog .js-button").prop("disabled",true);var Aw=AV("#config-dialog").data("selected-module");var Au=Av.action;vBulletin.AJAX({url:Au,type:Av.method,data:(AV(Av).serializeArray()),success:function(Ay){AV("body").css("cursor","auto");if(Ay.data){var Ax=Ay.data.title||Ay.data.searchResultTitle||Ay.data.searchTitle;if(Ax){Aw.find(".module-title .admin-only").text(vBulletin.phrase.get("x_module",Ax))}switch(Ay.data.widget_type){case"custom-html-widget":Aw.find(".widget-content").html(Ay.data.html);l(Aw,true);break;case"video-widget":var Az=Ay.data.embed_data;if(Az){var A2=Aw.find(".widget-content .videocontainer");if(A2.length==0){A2=AV("<div />").addClass("videocontainer").appendTo(Aw.find(".widget-content"))}var A1={code:Az.code,provider:Az.provider,width:"100%",height:260};AV.post(vBulletin.getAjaxBaseurl()+"/ajax/render/bbcode_video",A1,function(A3){if(A3){A2.empty().append(A3);l(Aw,true)}},"json");Aw.find(".widget-content").find(".note").addClass("h-hide")}break}var A0=AV('select[name="data[default_tab]"]',AV(Av));if(A0.length>0){Aw.attr("data-widget-default-tab",A0.val())}x=true}AV("#config-dialog").dialog("close")},after_error:function(){AV("#config-dialog .loader").hide();AV("#config-dialog .js-button").prop("disabled",false)},error_phrase:["error_saving_configuration_module",AV("#config-dialog .widget-name h1").text()],})}var As=this;At(As);return false});AV("#btnCloseConfig").on("click",function(){AV("#config-dialog").dialog("close")})},close:function(){E("visible");AV("#config-dialog .js-button").prop("disabled",false)}});AV("#pagetitle").on("keyup blur",function(As){if(u){AV("#pageurl").val(this.value.replace(/[^\w-]+/g,""))}return true});AV("#save-page-form #pagetemplateid-yes").on("click",function(){AV("#save-page-form .template-name").addClass("h-hide");AV("#save-page-form #templatetitle").prop("disabled",false);AV("#save-page-form #templatetitle-edit").prop("disabled",true);AV("#save-page-form .page-template-name").removeClass("h-hide")});AV("#save-page-form #pagetemplateid-no").on("click",function(){AV("#save-page-form .template-name").removeClass("h-hide");AV("#save-page-form #templatetitle").prop("disabled",true);AV("#save-page-form #templatetitle-edit").prop("disabled",false);AV("#save-page-form .page-template-name").addClass("h-hide")});function Am(As){if(typeof h.search_config_dialog=="undefined"){vBulletin.AJAX({call:"/ajax/render/dialog_search_config",success:function(At){h.search_config_dialog=At;AV("body").append(At);Am(As)},error_phrase:"error_fetching_dialog"});return }if(As){AV("#search-config-dialog").data("search-widget",As)}AV("#search-config-dialog").dialog({title:vBulletin.phrase.get("edit_search_module"),autoOpen:true,modal:true,resizable:false,closeOnEscape:false,showCloseButton:false,width:800,dialogClass:"dialog-container search-config-dialog-container input-dialog",close:function(){E("visible")},open:function(){var At=this;AV("#customSearchDialog",At).addClass("h-invisible");AV("body").css("cursor","wait");setTimeout(function(){vBulletin.search=vBulletin.search||{};var Aw=function(){S=new vBulletin.search.SearchControl("#customSearchDialog");T(S)};var Av=AV("#search-config-dialog").data("search-widget");var Ay={id:Av.attr("data-widget-id"),instanceid:Av.attr("data-widget-instance-id")};if(typeof vBulletin.search.SearchControl=="undefined"){var Ax=["/js/jquery/jquery.qtip.min.js","/js/tag-editor.js","/js/sb_search.js"];var Au=function(){if(Ax.length==0){AV("body").css("cursor","auto");AV("#customSearchDialog",At).removeClass("h-invisible");Aw();return }var Az=Ax.shift();AV.getScript(vBulletin.getAjaxBaseurl()+Az+"?"+pageData.simpleversion,Au).error(function(A3,A2,A0){var A1=(A0&&A0.message)?"{0}: {1}".format(vBulletin.phrase.get("error"),A0.message):"HTTP {0}: {1}".format(A3.status,A3.statusText);AV("#search-config-dialog").dialog("close");openAlertDialog({title:vBulletin.phrase.get("error"),message:"{0}<br /><br />({1})".format(vBulletin.phrase.get("error_loading_search_config_script"),A1),iconType:"error"})}).complete(function(){})};Au()}else{AV("#customSearchDialog",At).removeClass("h-invisible");Aw()}},1);x=false},create:function(){AV("#btnSaveSearchConfig").on("click",function(){AV("body").css("cursor","wait");var Av=AV("#search-config-dialog").data("search-widget");var A3={id:Av.attr("data-widget-id"),instanceid:Av.attr("data-widget-instance-id")};var Ay={pageid:pageData.pageid,widgetid:A3.id,widgetinstanceid:A3.instanceid,pagetemplateid:AV("#select-template input[type=radio]:checked").val(),searchJSON:{}};var A7=AV("#searchTitle");if(A7.length>0&&AV.trim(A7.val()).length>0){Ay.searchTitle=AV.trim(A7.val());A7.data("defaultValue",Ay.searchTitle)}var A0=AV("#resultsPerPage");if(A0.length>0&&AV.trim(A0.val()).length>0){Ay.resultsPerPage=AV.trim(A0.val());A0.data("defaultValue",Ay.resultsPerPage)}var Aw=["hide_avatars","hide_module_when_empty","hide_usernames","displayFooter"];for(var Az=0;Az<Aw.length;Az++){var At=Aw[Az],Ax=AV("input[name='"+At+"'][value='1']");if(Ax.length>0&&Ax.prop("checked")){Ay[At]="1";Ax.data("defaultValue","1")}else{Ay[At]="0";Ax.data("defaultValue","0")}}var A2=AV(".js-searchmodule-show-at-breakpoints");if(A2.length>0){Ay.show_at_breakpoints={desktop:1,small:1,xsmall:1};A2.find("input").each(function(){var A8=AV(this);switch(A8.prop("name")){case"show_at_breakpoints[desktop]":Ay.show_at_breakpoints.desktop=A8.prop("checked")?1:0;break;case"show_at_breakpoints[small]":Ay.show_at_breakpoints.small=A8.prop("checked")?1:0;break;case"show_at_breakpoints[xsmall]":Ay.show_at_breakpoints.xsmall=A8.prop("checked")?1:0;break}});A2.data("defaultValue",Ay.show_at_breakpoints)}var A6=AV("#search-config-dialog .js-sb-module-config--viewpermissions");if(A6.length>0){Ay.module_viewpermissions={};var A1=A6.find("input.js-module_viewpermissions__key:checked"),A5="show_all",Au=A6.find("input.js-module_viewpermissions__value:checked"),A4="all";if(A1.length){A5=A1.prop("value")}if(Au.length){A4=[];AV.each(Au,function(A8,A9){A4.push(AV(A9).prop("value"))})}Ay.module_viewpermissions={key:A5,value:A4,}}Ay.searchJSON=S.load();vBulletin.AJAX({call:"/ajax/api/widget/saveSearchWidgetConfig",data:{data:JSON.stringify(Ay)},complete:function(){AV("body").css("cursor","auto")},success:function(A8){if(A8.widgetinstanceid>0&&A8.searchJSON){Av.attr("data-widget-instance-id",A8.widgetinstanceid);Av.find(".main-title").text(Ay.searchTitle);AV("#config_widgetinstanceid").val(A8.widgetinstanceid);AV("#config_pagetemplateid").val(A8.pagetemplateid);AV("#pagetemplateid-new").val(A8.pagetemplateid);AV("#search-config-dialog").dialog("close");l(Av,true);x=true}},error_phrase:"error_saving_search_config",})});AV("#btnCancelSearchConfig").on("click",function(){function At(){AV("#search-config-dialog").dialog("close");S.set("{}");var A3=AV("#search-config-dialog #searchTitle");A3.val(A3.data("defaultValue"));var Az=AV("#search-config-dialog #resultsPerPage");Az.val(Az.data("defaultValue"));var Aw=["hide_avatars","hide_module_when_empty","hide_usernames","displayFooter"];for(var Ay=0;Ay<Aw.length;Ay++){var Av=Aw[Ay],Ax=AV("#search-config-dialog input[name='"+Av+"'][value='1']"),A0=AV("#search-config-dialog input[name='"+Av+"'][value='0']");if(Ax.data("defaultValue")=="1"){Ax.prop("checked",true)}else{A0.prop("checked",true)}}var A1=AV("#search-config-dialog .js-searchmodule-show-at-breakpoints");if(A1.length>0){var A2=A1.data("defaultValue");if(typeof (A2)!="undefined"){A1.find("input").each(function(){var A4=AV(this);switch(A4.prop("name")){case"show_at_breakpoints[desktop]":A4.prop("checked",A2.desktop?"checked":"");break;case"show_at_breakpoints[small]":A4.prop("checked",A2.small?"checked":"");break;case"show_at_breakpoints[xsmall]":A4.prop("checked",A2.xsmall?"checked":"");break}})}}}if(x){var Au=AV(this);openConfirmDialog({title:vBulletin.phrase.get("cancel_edit"),message:vBulletin.phrase.get("do_you_want_to_cancel_editing_search_module"),iconType:"warning",onClickYes:At})}else{At()}})}})}AV("#blog-category-dialog").dialog({title:vBulletin.phrase.get("edit_blog_categories"),autoOpen:false,modal:true,resizable:false,closeOnEscape:false,showCloseButton:false,width:800,dialogClass:"dialog-container blog-category-dialog-container input-dialog",close:function(){E("visible")},open:function(){var As=this;x=false},create:function(){AV("#blog-category-dialog #btnSaveCategories").on("click",function(){AV("body").css("cursor","wait");AV("#blog-category-dialog dialog-content loader").show();var As=AV("#search-config-dialog").data("blog-category-widget");var At={id:As.attr("data-widget-id"),instanceid:As.attr("data-widget-instance-id")};vBulletin.AJAX({call:"/ajax/api/widget/saveBlogCategories",data:{},complete:function(){AV("body").css("cursor","auto");AV("#blog-category-dialog dialog-content loader").hide()},success:function(Au){AV("#blog-category-dialog dialog-content widget-config-container").html(Au)},error_phrase:"error_saving_blog_categories"})});AV("#blog-category-dialog #btnNewCategory").on("click",function(){});AV("#blog-category-dialog #btnCloseCategories").on("click",function(){if(x){var As=AV(this);openConfirmDialog({title:vBulletin.phrase.get("cancel_edit"),message:vBulletin.phrase.get("do_you_want_to_cancel_editing_blog_categories_module"),iconType:"warning",onClickYes:AV("#blog-category-dialog").dialog("close")})}else{AV("#blog-category-dialog").dialog("close")}})}})}function T(Al){var An=AV(this).closest(".canvas-widget"),Am=AV("#search-config-dialog").data("search-widget"),Ao={id:Am.attr("data-widget-id"),instanceid:Am.attr("data-widget-instance-id")};vBulletin.AJAX({call:"/ajax/api/widget/fetchSearchConfig",data:({widgetid:Ao.id,widgetinstanceid:Ao.instanceid||"",pagetemplateid:W(),configtype:"admin"}),complete:function(){AV("body").css("cursor","auto")},success:function(Ap){if(Ap.searchTitle){AV("#searchTitle").val(Ap.searchTitle)}if(Ap.resultsPerPage){AV("#resultsPerPage").val(Ap.resultsPerPage)}var Au=["hide_avatars","hide_module_when_empty","hide_usernames","displayFooter"];for(var At=0;At<Au.length;At++){var Ar=Au[At];value=((Ap[Ar]&&parseInt(Ap[Ar],10)==1)?1:0);AV("input[name='"+Ar+"'][value='"+value+"']").prop("checked",true)}if(Ap.show_at_breakpoints){var Av=AV("#search-config-dialog .js-searchmodule-show-at-breakpoints");if(Av.length>0){Av.find("input").each(function(){var Aw=AV(this);switch(Aw.prop("name")){case"show_at_breakpoints[desktop]":Aw.prop("checked",Ap.show_at_breakpoints.desktop?"checked":"");break;case"show_at_breakpoints[small]":Aw.prop("checked",Ap.show_at_breakpoints.small?"checked":"");break;case"show_at_breakpoints[xsmall]":Aw.prop("checked",Ap.show_at_breakpoints.xsmall?"checked":"");break}})}if(Ap.module_viewpermissions){var Aq=AV("#search-config-dialog .js-searchmodule-module_viewpermissions--replaceme"),As=C({defaultvalue:Ap.module_viewpermissions});Aq.replaceWith(As)}}Al.set(Ap.searchJSON||{},Ap.contentTypes||{},Ap.channels||{});AV("#config-dialog .dialog-content .widget-config-container").show();AV("#search-config-dialog .form_layout .form_row .field_column select").selectBox();AV("#config-dialog .loader").hide()},after_error:function(){AV("#config-dialog .loader").hide();AV("#config-dialog").dialog("close")}})}AV(document).ready(function(){AL()})})(jQuery);;

// ***************************
// js.compressed/jquery/jquery.qtip.min.js
// ***************************
/*
* qTip2 - Pretty powerful tooltips
* http://craigsworks.com/projects/qtip2/
*
* Version: nightly
* Copyright 2009-2010 Craig Michael Thompson - http://craigsworks.com
*
* Dual licensed under MIT or GPLv2 licenses
*   http://en.wikipedia.org/wiki/MIT_License
*   http://en.wikipedia.org/wiki/GNU_General_Public_License
*
* Date: Mon Dec 19 15:43:28.0000000000 2011
*//*jslint browser: true, onevar: true, undef: true, nomen: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: true *//*global window: false, jQuery: false, console: false */(function(a,b,c){function E(b){var c=this,d=b.elements,e=d.tooltip,f=".bgiframe-"+b.id;a.extend(c,{init:function(){d.bgiframe=a('<iframe class="ui-tooltip-bgiframe" frameborder="0" tabindex="-1" src="javascript:\'\';"  style="display:block; position:absolute; z-index:-1; filter:alpha(opacity=0); -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";"></iframe>'),d.bgiframe.appendTo(e),e.bind("tooltipmove"+f,c.adjust)},adjust:function(){var a=b.get("dimensions"),c=b.plugins.tip,f=d.tip,g,h;h=parseInt(e.css("border-left-width"),10)||0,h={left:-h,top:-h},c&&f&&(g=c.corner.precedance==="x"?["width","left"]:["height","top"],h[g[1]]-=f[g[0]]()),d.bgiframe.css(h).css(a)},destroy:function(){d.bgiframe.remove(),e.unbind(f)}}),c.init()}function D(c){var f=this,g=c.options.show.modal,i=c.elements,j=i.tooltip,k="#qtip-overlay",l=".qtipmodal",m=l+c.id,o="is-modal-qtip",q=a(document.body),r;c.checks.modal={"^show.modal.(on|blur)$":function(){f.init(),i.overlay.toggle(j.is(":visible"))}},a.extend(f,{init:function(){if(!g.on)return f;r=f.create(),j.attr(o,d).css("z-index",h.modal.zindex+a(n+"["+o+"]").length).unbind(l).unbind(m).bind("tooltipshow"+l+" tooltiphide"+l,function(b,c,d){var e=b.originalEvent;if(e&&b.type==="tooltiphide"&&/mouse(leave|enter)/.test(e.type)&&a(e.relatedTarget).closest(r[0]).length)try{b.preventDefault()}catch(g){}else(!e||e&&!e.solo)&&f[b.type.replace("tooltip","")](b,d)}).bind("tooltipfocus"+l,function(b){if(!b.isDefaultPrevented()){var c=a(n).filter("["+o+"]"),d=h.modal.zindex+c.length,e=parseInt(j[0].style.zIndex,10);r[0].style.zIndex=d-1,c.each(function(){this.style.zIndex>e&&(this.style.zIndex-=1)}),c.end().filter("."+p).qtip("blur",b.originalEvent),j.addClass(p)[0].style.zIndex=d;try{b.preventDefault()}catch(f){}}}).bind("tooltiphide"+l,function(b){a("["+o+"]").filter(":visible").not(j).last().qtip("focus",b)}),g.escape&&a(b).unbind(m).bind("keydown"+m,function(a){a.keyCode===27&&j.hasClass(p)&&c.hide(a)}),g.blur&&i.overlay.unbind(m).bind("click"+m,function(a){j.hasClass(p)&&c.hide(a)});return f},create:function(){var c=a(k);if(c.length)return i.overlay=c.insertAfter(a(n).last());r=i.overlay=a("<div />",{id:k.substr(1),html:"<div></div>",mousedown:function(){return e}}).insertAfter(a(n).last()),a(b).unbind(l).bind("resize"+l,function(){r.css({height:a(b).height(),width:a(b).width()})}).triggerHandler("resize");return r},toggle:function(b,c,h){if(b&&b.isDefaultPrevented())return f;var i=g.effect,k=c?"show":"hide",l=r.is(":visible"),p=a("["+o+"]").filter(":visible").not(j),s;r||(r=f.create());if(r.is(":animated")&&l===c||!c&&p.length)return f;c?(r.css({left:0,top:0}),r.toggleClass("blurs",g.blur),q.bind("focusin"+m,function(b){var c=a(b.target),d=c.closest(".qtip"),f=d.length<1?e:parseInt(d[0].style.zIndex,10)>parseInt(j[0].style.zIndex,10);!f&&a(b.target).closest(n)[0]!==j[0]&&j.find("input:visible").filter(":first").focus()})):q.undelegate("*","focusin"+m),r.stop(d,e),a.isFunction(i)?i.call(r,c):i===e?r[k]():r.fadeTo(parseInt(h,10)||90,c?1:0,function(){c||a(this).hide()}),c||r.queue(function(a){r.css({left:"",top:""}),a()});return f},show:function(a,b){return f.toggle(a,d,b)},hide:function(a,b){return f.toggle(a,e,b)},destroy:function(){var d=r;d&&(d=a("["+o+"]").not(j).length<1,d?(i.overlay.remove(),a(b).unbind(l)):i.overlay.unbind(l+c.id),q.undelegate("*","focusin"+m));return j.removeAttr(o).unbind(l)}}),f.init()}function C(b,g){function w(a){var b=a.precedance==="y",c=n[b?"width":"height"],d=n[b?"height":"width"],e=a.string().indexOf("center")>-1,f=c*(e?.5:1),g=Math.pow,h=Math.round,i,j,k,l=Math.sqrt(g(f,2)+g(d,2)),m=[p/f*l,p/d*l];m[2]=Math.sqrt(g(m[0],2)-g(p,2)),m[3]=Math.sqrt(g(m[1],2)-g(p,2)),i=l+m[2]+m[3]+(e?0:m[0]),j=i/l,k=[h(j*d),h(j*c)];return{height:k[b?0:1],width:k[b?1:0]}}function v(b){var c=k.titlebar&&b.y==="top",d=c?k.titlebar:k.content,e=a.browser.mozilla,f=e?"-moz-":a.browser.webkit?"-webkit-":"",g=b.y+(e?"":"-")+b.x,h=f+(e?"border-radius-"+g:"border-"+g+"-radius");return parseInt(d.css(h),10)||parseInt(l.css(h),10)||0}function u(a,b,c){b=b?b:a[a.precedance];var d=l.hasClass(r),e=k.titlebar&&a.y==="top",f=e?k.titlebar:k.content,g="border-"+b+"-width",h;l.addClass(r),h=parseInt(f.css(g),10),h=(c?h||parseInt(l.css(g),10):h)||0,l.toggleClass(r,d);return h}function t(a,f,g,h){if(k.tip){var l=i.corner.clone(),n=g.adjusted,o=b.options.position.adjust.method.split(" "),p=o[0],q=o[1]||o[0],r={left:e,top:e,x:0,y:0},s,t={},u;i.corner.fixed!==d&&(p==="shift"&&l.precedance==="x"&&n.left&&l.y!=="center"?l.precedance=l.precedance==="x"?"y":"x":p==="flip"&&n.left&&(l.x=l.x==="center"?n.left>0?"left":"right":l.x==="left"?"right":"left"),q==="shift"&&l.precedance==="y"&&n.top&&l.x!=="center"?l.precedance=l.precedance==="y"?"x":"y":q==="flip"&&n.top&&(l.y=l.y==="center"?n.top>0?"top":"bottom":l.y==="top"?"bottom":"top"),l.string()!==m.corner.string()&&(m.top!==n.top||m.left!==n.left)&&i.update(l,e)),s=i.position(l,n),s.right!==c&&(s.left=-s.right),s.bottom!==c&&(s.top=-s.bottom),s.user=Math.max(0,j.offset);if(r.left=p==="shift"&&!!n.left)l.x==="center"?t["margin-left"]=r.x=s["margin-left"]-n.left:(u=s.right!==c?[n.left,-s.left]:[-n.left,s.left],(r.x=Math.max(u[0],u[1]))>u[0]&&(g.left-=n.left,r.left=e),t[s.right!==c?"right":"left"]=r.x);if(r.top=q==="shift"&&!!n.top)l.y==="center"?t["margin-top"]=r.y=s["margin-top"]-n.top:(u=s.bottom!==c?[n.top,-s.top]:[-n.top,s.top],(r.y=Math.max(u[0],u[1]))>u[0]&&(g.top-=n.top,r.top=e),t[s.bottom!==c?"bottom":"top"]=r.y);k.tip.css(t).toggle(!(r.x&&r.y||l.x==="center"&&r.y||l.y==="center"&&r.x)),g.left-=s.left.charAt?s.user:p!=="shift"||r.top||!r.left&&!r.top?s.left:0,g.top-=s.top.charAt?s.user:q!=="shift"||r.left||!r.left&&!r.top?s.top:0,m.left=n.left,m.top=n.top,m.corner=l.clone()}}var i=this,j=b.options.style.tip,k=b.elements,l=k.tooltip,m={top:0,left:0},n={width:j.width,height:j.height},o={},p=j.border||0,q=".qtip-tip",s=!!(a("<canvas />")[0]||{}).getContext;i.mimic=i.corner=f,i.border=p,i.offset=j.offset,i.size=n,b.checks.tip={"^position.my|style.tip.(corner|mimic|border)$":function(){i.init()||i.destroy(),b.reposition()},"^style.tip.(height|width)$":function(){n={width:j.width,height:j.height},i.create(),i.update(),b.reposition()},"^content.title.text|style.(classes|widget)$":function(){k.tip&&i.update()}},a.extend(i,{init:function(){var b=i.detectCorner()&&(s||a.browser.msie);b&&(i.create(),i.update(),l.unbind(q).bind("tooltipmove"+q,t));return b},detectCorner:function(){var a=j.corner,c=b.options.position,f=c.at,g=c.my.string?c.my.string():c.my;if(a===e||g===e&&f===e)return e;a===d?i.corner=new h.Corner(g):a.string||(i.corner=new h.Corner(a),i.corner.fixed=d);return i.corner.string()!=="centercenter"},detectColours:function(c){var d,e,f,g=k.tip.css("cssText",""),h=c||i.corner,m=h[h.precedance],p="border-"+m+"-color",q="border"+m.charAt(0)+m.substr(1)+"Color",s=/rgba?\(0, 0, 0(, 0)?\)|transparent|#123456/i,t="background-color",u="transparent",v=" !important",w=a(document.body).css("color"),x=b.elements.content.css("color"),y=k.titlebar&&(h.y==="top"||h.y==="center"&&g.position().top+n.height/2+j.offset<k.titlebar.outerHeight(1)),z=y?k.titlebar:k.content;l.addClass(r),o.fill=e=g.css(t),o.border=f=g[0].style[q]||g.css(p)||l.css(p);if(!e||s.test(e))o.fill=z.css(t)||u,s.test(o.fill)&&(o.fill=l.css(t)||e);if(!f||s.test(f)||f===w)o.border=z.css(p)||u,s.test(o.border)&&(o.border=f);a("*",g).add(g).css("cssText",t+":"+u+v+";border:0"+v+";"),l.removeClass(r)},create:function(){var b=n.width,c=n.height,d;k.tip&&k.tip.remove(),k.tip=a("<div />",{"class":"ui-tooltip-tip"}).css({width:b,height:c}).prependTo(l),s?a("<canvas />").appendTo(k.tip)[0].getContext("2d").save():(d='<vml:shape coordorigin="0,0" style="display:inline-block; position:absolute; behavior:url(#default#VML);"></vml:shape>',k.tip.html(d+d),a("*",k.tip).bind("click mousedown",function(a){a.stopPropagation()}))},update:function(b,c){var g=k.tip,l=g.children(),q=n.width,r=n.height,t="px solid ",v="px dashed transparent",x=j.mimic,y=Math.round,z,A,C,D,E;b||(b=m.corner||i.corner),x===e?x=b:(x=new h.Corner(x),x.precedance=b.precedance,x.x==="inherit"?x.x=b.x:x.y==="inherit"?x.y=b.y:x.x===x.y&&(x[b.precedance]=b[b.precedance])),z=x.precedance,i.detectColours(b),o.border!=="transparent"&&o.border!=="#123456"?(p=u(b,f,d),j.border===0&&p>0&&(o.fill=o.border),i.border=p=j.border!==d?j.border:p):i.border=p=0,C=B(x,q,r),i.size=E=w(b),g.css(E),b.precedance==="y"?D=[y(x.x==="left"?p:x.x==="right"?E.width-q-p:(E.width-q)/2),y(x.y==="top"?E.height-r:0)]:D=[y(x.x==="left"?E.width-q:0),y(x.y==="top"?p:x.y==="bottom"?E.height-r-p:(E.height-r)/2)],s?(l.attr(E),A=l[0].getContext("2d"),A.restore(),A.save(),A.clearRect(0,0,3e3,3e3),A.translate(D[0],D[1]),A.beginPath(),A.moveTo(C[0][0],C[0][1]),A.lineTo(C[1][0],C[1][1]),A.lineTo(C[2][0],C[2][1]),A.closePath(),A.fillStyle=o.fill,A.strokeStyle=o.border,A.lineWidth=p*2,A.lineJoin="miter",A.miterLimit=100,p&&A.stroke(),A.fill()):(C="m"+C[0][0]+","+C[0][1]+" l"+C[1][0]+","+C[1][1]+" "+C[2][0]+","+C[2][1]+" xe",D[2]=p&&/^(r|b)/i.test(b.string())?parseFloat(a.browser.version,10)===8?2:1:0,l.css({antialias:""+(x.string().indexOf("center")>-1),left:D[0]-D[2]*Number(z==="x"),top:D[1]-D[2]*Number(z==="y"),width:q+p,height:r+p}).each(function(b){var c=a(this);c[c.prop?"prop":"attr"]({coordsize:q+p+" "+(r+p),path:C,fillcolor:o.fill,filled:!!b,stroked:!b}).css({display:p||b?"block":"none"}),!b&&c.html()===""&&c.html('<vml:stroke weight="'+p*2+'px" color="'+o.border+'" miterlimit="1000" joinstyle="miter"  style="behavior:url(#default#VML); display:inline-block;" />')})),c!==e&&i.position(b)},position:function(b){var c=k.tip,f={},g=Math.max(0,j.offset),h,l,m;if(j.corner===e||!c)return e;b=b||i.corner,h=b.precedance,l=w(b),m=[b.x,b.y],h==="x"&&m.reverse(),a.each(m,function(a,c){var e,i;c==="center"?(e=h==="y"?"left":"top",f[e]="50%",f["margin-"+e]=-Math.round(l[h==="y"?"width":"height"]/2)+g):(e=u(b,c,d),i=v(b),f[c]=a?p?u(b,c):0:g+(i>e?i:0))}),f[b[h]]-=l[h==="x"?"width":"height"],c.css({top:"",bottom:"",left:"",right:"",margin:""}).css(f);return f},destroy:function(){k.tip&&k.tip.remove(),l.unbind(q)}}),m.corner=new h.Corner(i.init())}function B(a,b,c){var d=Math.ceil(b/2),e=Math.ceil(c/2),f={bottomright:[[0,0],[b,c],[b,0]],bottomleft:[[0,0],[b,0],[0,c]],topright:[[0,c],[b,0],[b,c]],topleft:[[0,0],[0,c],[b,c]],topcenter:[[0,c],[d,0],[b,c]],bottomcenter:[[0,0],[b,0],[d,c]],rightcenter:[[0,0],[b,e],[0,c]],leftcenter:[[b,0],[b,c],[0,e]]};f.lefttop=f.bottomright,f.righttop=f.bottomleft,f.leftbottom=f.topright,f.rightbottom=f.topleft;return f[a.string()]}function A(b){var c=this,f=b.elements.tooltip,g=b.options.content.ajax,h=".qtip-ajax",i=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,j=d;b.checks.ajax={"^content.ajax":function(a,b,d){b==="ajax"&&(g=d),b==="once"?c.init():g&&g.url?c.load():f.unbind(h)}},a.extend(c,{init:function(){g&&g.url&&f.unbind(h)[g.once?"one":"bind"]("tooltipshow"+h,c.load);return c},load:function(d,f){function p(a,c,d){a.status!==0&&b.set("content.text",c+": "+d)}function o(c){k&&(c=a("<div/>").append(c.replace(i,"")).find(k)),b.set("content.text",c)}function n(){l&&(b.show(d.originalEvent),f=e),a.isFunction(g.complete)&&g.complete.apply(this,arguments)}var h=g.url.indexOf(" "),j=g.url,k,l=g.once&&!g.loading&&f;if(l)try{d.preventDefault()}catch(m){}else if(d&&d.isDefaultPrevented())return c;h>-1&&(k=j.substr(h),j=j.substr(0,h)),a.ajax(a.extend({success:o,error:p,context:b},g,{url:j,complete:n}))}}),c.init()}function z(b,c){var i,j,k,l,m,n=a(this),o=a(document.body),p=this===document?o:n,q=n.metadata?n.metadata(c.metadata):f,r=c.metadata.type==="html5"&&q?q[c.metadata.name]:f,s=n.data(c.metadata.name||"qtipopts");try{s=typeof s==="string"?(new Function("return "+s))():s}catch(t){w("Unable to parse HTML5 attribute data: "+s)}l=a.extend(d,{},g.defaults,c,typeof s==="object"?x(s):f,x(r||q)),j=l.position,l.id=b;if("boolean"===typeof l.content.text){k=n.attr(l.content.attr);if(l.content.attr!==e&&k)l.content.text=k;else{w("Unable to locate content for tooltip! Aborting render of tooltip on element: ",n);return e}}j.container.length||(j.container=o),j.target===e&&(j.target=p),l.show.target===e&&(l.show.target=p),l.show.solo===d&&(l.show.solo=o),l.hide.target===e&&(l.hide.target=p),l.position.viewport===d&&(l.position.viewport=j.container),j.at=new h.Corner(j.at),j.my=new h.Corner(j.my);if(a.data(this,"qtip"))if(l.overwrite)n.qtip("destroy");else if(l.overwrite===e)return e;l.suppress&&(m=a.attr(this,"title"))&&a(this).removeAttr("title").attr(u,m),i=new y(n,l,b,!!k),a.data(this,"qtip",i),n.bind("remove.qtip-"+b,function(){i.destroy()});return i}function y(s,t,w,y){function R(){var c=[t.show.target[0],t.hide.target[0],z.rendered&&G.tooltip[0],t.position.container[0],t.position.viewport[0],b,document];z.rendered?a([]).pushStack(a.grep(c,function(a){return typeof a==="object"})).unbind(F):t.show.target.unbind(F+"-create")}function Q(){function p(a){E.is(":visible")&&z.reposition(a)}function o(a){if(E.hasClass(m))return e;clearTimeout(z.timers.inactive),z.timers.inactive=setTimeout(function(){z.hide(a)},t.hide.inactive)}function l(b){if(E.hasClass(m)||C||D)return e;var d=a(b.relatedTarget||b.target),g=d.closest(n)[0]===E[0],h=d[0]===f.show[0];clearTimeout(z.timers.show),clearTimeout(z.timers.hide);if(c.target==="mouse"&&g||t.hide.fixed&&(/mouse(out|leave|move)/.test(b.type)&&(g||h)))try{b.preventDefault(),b.stopImmediatePropagation()}catch(i){}else t.hide.delay>0?z.timers.hide=setTimeout(function(){z.hide(b)},t.hide.delay):z.hide(b)}function k(a){if(E.hasClass(m))return e;clearTimeout(z.timers.show),clearTimeout(z.timers.hide);var b=function(){z.toggle(d,a)};t.show.delay>0?z.timers.show=setTimeout(b,t.show.delay):b()}var c=t.position,f={show:t.show.target,hide:t.hide.target,viewport:a(c.viewport),document:a(document),body:a(document.body),window:a(b)},h={show:a.trim(""+t.show.event).split(" "),hide:a.trim(""+t.hide.event).split(" ")},j=a.browser.msie&&parseInt(a.browser.version,10)===6;E.bind("mouseenter"+F+" mouseleave"+F,function(a){var b=a.type==="mouseenter";b&&z.focus(a),E.toggleClass(q,b)}),t.hide.fixed&&(f.hide=f.hide.add(E),E.bind("mouseover"+F,function(){E.hasClass(m)||clearTimeout(z.timers.hide)})),/mouse(out|leave)/i.test(t.hide.event)?t.hide.leave==="window"&&f.window.bind("mouseout"+F+" blur"+F,function(a){/select|option/.test(a.target)&&!a.relatedTarget&&z.hide(a)}):/mouse(over|enter)/i.test(t.show.event)&&f.hide.bind("mouseleave"+F,function(a){clearTimeout(z.timers.show)}),(""+t.hide.event).indexOf("unfocus")>-1&&f.body.bind("mousedown"+F,function(b){var c=a(b.target),d=!E.hasClass(m)&&E.is(":visible");c[0]!==E[0]&&c.parents(n).length===0&&c.add(s).length>1&&!c.attr("disabled")&&z.hide(b)}),"number"===typeof t.hide.inactive&&(f.show.bind("qtip-"+w+"-inactive",o),a.each(g.inactiveEvents,function(a,b){f.hide.add(G.tooltip).bind(b+F+"-inactive",o)})),a.each(h.hide,function(b,c){var d=a.inArray(c,h.show),e=a(f.hide);d>-1&&e.add(f.show).length===e.length||c==="unfocus"?(f.show.bind(c+F,function(a){E.is(":visible")?l(a):k(a)}),delete h.show[d]):f.hide.bind(c+F,l)}),a.each(h.show,function(a,b){f.show.bind(b+F,k)}),"number"===typeof t.hide.distance&&f.show.add(E).bind("mousemove"+F,function(a){var b=H.origin||{},c=t.hide.distance,d=Math.abs;(d(a.pageX-b.pageX)>=c||d(a.pageY-b.pageY)>=c)&&z.hide(a)}),c.target==="mouse"&&(f.show.bind("mousemove"+F,function(a){i={pageX:a.pageX,pageY:a.pageY,type:"mousemove"}}),c.adjust.mouse&&(t.hide.event&&E.bind("mouseleave"+F,function(a){(a.relatedTarget||a.target)!==f.show[0]&&z.hide(a)}),f.document.bind("mousemove"+F,function(a){!E.hasClass(m)&&E.is(":visible")&&z.reposition(a||i)}))),(c.adjust.resize||f.viewport.length)&&(a.event.special.resize?f.viewport:f.window).bind("resize"+F,p),(f.viewport.length||j&&E.css("position")==="fixed")&&f.viewport.bind("scroll"+F,p)}function P(b,d){function g(b){function i(c){c&&(delete h[c.src],clearTimeout(z.timers.img[c.src]),a(c).unbind(F)),a.isEmptyObject(h)&&(z.redraw(),d!==e&&z.reposition(H.event),b())}var g,h={};if((g=f.find("img:not([height]):not([width])")).length===0)return i();g.each(function(b,d){if(h[d.src]===c){var e=0,f=3;(function g(){if(d.height||d.width||e>f)return i(d);e+=1,z.timers.img[d.src]=setTimeout(g,700)})(),a(d).bind("error"+F+" load"+F,function(){i(this)}),h[d.src]=d}})}var f=G.content;if(!z.rendered||!b)return e;a.isFunction(b)&&(b=b.call(s,H.event,z)||""),b.jquery&&b.length>0?f.empty().append(b.css({display:"block"})):f.html(b),z.rendered<0?E.queue("fx",g):(D=0,g(a.noop));return z}function O(b,c){var d=G.title;if(!z.rendered||!b)return e;a.isFunction(b)&&(b=b.call(s,H.event,z));if(b===e)return K(e);b.jquery&&b.length>0?d.empty().append(b.css({display:"block"})):d.html(b),z.redraw(),c!==e&&z.rendered&&E.is(":visible")&&z.reposition(H.event)}function N(a){var b=G.button,c=G.title;if(!z.rendered)return e;a?(c||M(),L()):b.remove()}function M(){var b=B+"-title";G.titlebar&&K(),G.titlebar=a("<div />",{"class":k+"-titlebar "+(t.style.widget?"ui-widget-header":"")}).append(G.title=a("<div />",{id:b,"class":k+"-title","aria-atomic":d})).insertBefore(G.content).delegate(".ui-tooltip-close","mousedown keydown mouseup keyup mouseout",function(b){a(this).toggleClass("ui-state-active ui-state-focus",b.type.substr(-4)==="down")}).delegate(".ui-tooltip-close","mouseover mouseout",function(b){a(this).toggleClass("ui-state-hover",b.type==="mouseover")}),t.content.title.button?L():z.rendered&&z.redraw()}function L(){var b=t.content.title.button,c=typeof b==="string",d=c?b:"Close tooltip";G.button&&G.button.remove(),b.jquery?G.button=b:G.button=a("<a />",{"class":"ui-state-default ui-tooltip-close "+(t.style.widget?"":k+"-icon"),title:d,"aria-label":d}).prepend(a("<span />",{"class":"ui-icon ui-icon-close",html:"&times;"})),G.button.appendTo(G.titlebar).attr("role","button").click(function(a){E.hasClass(m)||z.hide(a);return e}),z.redraw()}function K(a){G.title&&(G.titlebar.remove(),G.titlebar=G.title=G.button=f,a!==e&&z.reposition())}function J(){var a=t.style.widget;E.toggleClass(l,a).toggleClass(o,t.style["default"]&&!a),G.content.toggleClass(l+"-content",a),G.titlebar&&G.titlebar.toggleClass(l+"-header",a),G.button&&G.button.toggleClass(k+"-icon",!a)}function I(a){var b=0,c,d=t,e=a.split(".");while(d=d[e[b++]])b<e.length&&(c=d);return[c||t,e.pop()]}var z=this,A=document.body,B=k+"-"+w,C=0,D=0,E=a(),F=".qtip-"+w,G,H;z.id=w,z.rendered=e,z.elements=G={target:s},z.timers={img:{}},z.options=t,z.checks={},z.plugins={},z.cache=H={event:{},target:a(),disabled:e,attr:y},z.checks.builtin={"^id$":function(b,c,f){var h=f===d?g.nextid:f,i=k+"-"+h;h!==e&&h.length>0&&!a("#"+i).length&&(E[0].id=i,G.content[0].id=i+"-content",G.title[0].id=i+"-title")},"^content.text$":function(a,b,c){P(c)},"^content.title.text$":function(a,b,c){if(!c)return K();!G.title&&c&&M(),O(c)},"^content.title.button$":function(a,b,c){N(c)},"^position.(my|at)$":function(a,b,c){"string"===typeof c&&(a[b]=new h.Corner(c))},"^position.container$":function(a,b,c){z.rendered&&E.appendTo(c)},"^show.ready$":function(){z.rendered?z.toggle(d):z.render(1)},"^style.classes$":function(a,b,c){E.attr("class",k+" qtip ui-helper-reset "+c)},"^style.widget|content.title":J,"^events.(render|show|move|hide|focus|blur)$":function(b,c,d){E[(a.isFunction(d)?"":"un")+"bind"]("tooltip"+c,d)},"^(show|hide|position).(event|target|fixed|inactive|leave|distance|viewport|adjust)":function(){var a=t.position;E.attr("tracking",a.target==="mouse"&&a.adjust.mouse),R(),Q()}},a.extend(z,{render:function(b){if(z.rendered)return z;var c=t.content.text,f=t.content.title.text,g=t.position,i=a.Event("tooltiprender");a.attr(s[0],"aria-describedby",B),E=G.tooltip=a("<div/>",{id:B,"class":k+" qtip ui-helper-reset "+o+" "+t.style.classes+" "+k+"-pos-"+t.position.my.abbrev(),width:t.style.width||"",height:t.style.height||"",tracking:g.target==="mouse"&&g.adjust.mouse,role:"alert","aria-live":"polite","aria-atomic":e,"aria-describedby":B+"-content","aria-hidden":d}).toggleClass(m,H.disabled).data("qtip",z).appendTo(t.position.container).append(G.content=a("<div />",{"class":k+"-content",id:B+"-content","aria-atomic":d})),z.rendered=-1,C=D=1,f&&(M(),a.isFunction(f)||O(f,e)),a.isFunction(c)||P(c,e),z.rendered=d,J(),a.each(t.events,function(b,c){a.isFunction(c)&&E.bind(b==="toggle"?"tooltipshow tooltiphide":"tooltip"+b,c)}),a.each(h,function(){this.initialize==="render"&&this(z)}),Q(),E.queue("fx",function(a){i.originalEvent=H.event,E.trigger(i,[z]),C=D=0,z.redraw(),(t.show.ready||b)&&z.toggle(d,H.event,e),a()});return z},get:function(a){var b,c;switch(a.toLowerCase()){case"dimensions":b={height:E.outerHeight(),width:E.outerWidth()};break;case"offset":b=h.offset(E,t.position.container);break;default:c=I(a.toLowerCase()),b=c[0][c[1]],b=b.precedance?b.string():b}return b},set:function(b,c){function m(a,b){var c,d,e;for(c in k)for(d in k[c])if(e=(new RegExp(d,"i")).exec(a))b.push(e),k[c][d].apply(z,b)}var g=/^position\.(my|at|adjust|target|container)|style|content|show\.ready/i,h=/^content\.(title|attr)|style/i,i=e,j=e,k=z.checks,l;"string"===typeof b?(l=b,b={},b[l]=c):b=a.extend(d,{},b),a.each(b,function(c,d){var e=I(c.toLowerCase()),f;f=e[0][e[1]],e[0][e[1]]="object"===typeof d&&d.nodeType?a(d):d,b[c]=[e[0],e[1],d,f],i=g.test(c)||i,j=h.test(c)||j}),x(t),C=D=1,a.each(b,m),C=D=0,E.is(":visible")&&z.rendered&&(i&&z.reposition(t.position.target==="mouse"?f:H.event),j&&z.redraw());return z},toggle:function(b,c){function q(){b?(a.browser.msie&&E[0].style.removeAttribute("filter"),E.css("overflow",""),"string"===typeof h.autofocus&&a(h.autofocus,E).focus(),p=a.Event("tooltipvisible"),p.originalEvent=c?H.event:f,E.trigger(p,[z]),h.target.trigger("qtip-"+w+"-inactive")):E.css({display:"",visibility:"",opacity:"",left:"",top:""})}if(!z.rendered)return b?z.render(1):z;var g=b?"show":"hide",h=t[g],j=E.is(":visible"),k=!c||t[g].target.length<2||H.target[0]===c.target,l=t.position,m=t.content,o,p;(typeof b).search("boolean|number")&&(b=!j);if(!E.is(":animated")&&j===b&&k)return z;if(c){if(/over|enter/.test(c.type)&&/out|leave/.test(H.event.type)&&c.target===t.show.target[0]&&E.has(c.relatedTarget).length)return z;H.event=a.extend({},c)}p=a.Event("tooltip"+g),p.originalEvent=c?H.event:f,E.trigger(p,[z,90]);if(p.isDefaultPrevented())return z;a.attr(E[0],"aria-hidden",!b),b?(H.origin=a.extend({},i),z.focus(c),a.isFunction(m.text)&&P(m.text,e),a.isFunction(m.title.text)&&O(m.title.text,e),!v&&l.target==="mouse"&&l.adjust.mouse&&(a(document).bind("mousemove.qtip",function(a){i={pageX:a.pageX,pageY:a.pageY,type:"mousemove"}}),v=d),z.reposition(c,arguments[2]),(p.solo=!!h.solo)&&a(n,h.solo).not(E).qtip("hide",p)):(clearTimeout(z.timers.show),delete H.origin,v&&!a(n+'[tracking="true"]:visible',h.solo).not(E).length&&(a(document).unbind("mousemove.qtip"),v=e),z.blur(c)),k&&E.stop(0,1),h.effect===e?(E[g](),q.call(E)):a.isFunction(h.effect)?(h.effect.call(E,z),E.queue("fx",function(a){q(),a()})):E.fadeTo(90,b?1:0,q),b&&h.target.trigger("qtip-"+w+"-inactive");return z},show:function(a){return z.toggle(d,a)},hide:function(a){return z.toggle(e,a)},focus:function(b){if(!z.rendered)return z;var c=a(n),d=parseInt(E[0].style.zIndex,10),e=g.zindex+c.length,f=a.extend({},b),h,i;E.hasClass(p)||(i=a.Event("tooltipfocus"),i.originalEvent=f,E.trigger(i,[z,e]),i.isDefaultPrevented()||(d!==e&&(c.each(function(){this.style.zIndex>d&&(this.style.zIndex=this.style.zIndex-1)}),c.filter("."+p).qtip("blur",f)),E.addClass(p)[0].style.zIndex=e));return z},blur:function(b){var c=a.extend({},b),d;E.removeClass(p),d=a.Event("tooltipblur"),d.originalEvent=c,E.trigger(d,[z]);return z},reposition:function(c,d){if(!z.rendered||C)return z;C=1;var f=t.position.target,g=t.position,j=g.my,l=g.at,m=g.adjust,n=m.method.split(" "),o=E.outerWidth(),p=E.outerHeight(),q=0,r=0,s=a.Event("tooltipmove"),u=E.css("position")==="fixed",v=g.viewport,w={left:0,top:0},x=g.container,y=e,B=z.plugins.tip,D={horizontal:n[0],vertical:n[1]=n[1]||n[0],enabled:v.jquery&&f[0]!==b&&f[0]!==A&&m.method!=="none",left:function(a){var b=D.horizontal==="shift",c=-x.offset.left+v.offset.left+v.scrollLeft,d=j.x==="left"?o:j.x==="right"?-o:-o/2,e=l.x==="left"?q:l.x==="right"?-q:-q/2,f=B&&B.size?B.size.width||0:0,g=B&&B.corner&&B.corner.precedance==="x"&&!b?f:0,h=c-a+g,i=a+o-v.width-c+g,k=d-(j.precedance==="x"||j.x===j.y?e:0),n=j.x==="center";b?(g=B&&B.corner&&B.corner.precedance==="y"?f:0,k=(j.x==="left"?1:-1)*d-g,w.left+=h>0?h:i>0?-i:0,w.left=Math.max(-x.offset.left+v.offset.left+(g&&B.corner.x==="center"?B.offset:0),a-k,Math.min(Math.max(-x.offset.left+v.offset.left+v.width,a+k),w.left))):(h>0&&(j.x!=="left"||i>0)?w.left-=k:i>0&&(j.x!=="right"||h>0)&&(w.left-=n?-k:k),w.left!==a&&n&&(w.left-=m.x),w.left<c&&-w.left>i&&(w.left=a));return w.left-a},top:function(a){var b=D.vertical==="shift",c=-x.offset.top+v.offset.top+v.scrollTop,d=j.y==="top"?p:j.y==="bottom"?-p:-p/2,e=l.y==="top"?r:l.y==="bottom"?-r:-r/2,f=B&&B.size?B.size.height||0:0,g=B&&B.corner&&B.corner.precedance==="y"&&!b?f:0,h=c-a+g,i=a+p-v.height-c+g,k=d-(j.precedance==="y"||j.x===j.y?e:0),n=j.y==="center";b?(g=B&&B.corner&&B.corner.precedance==="x"?f:0,k=(j.y==="top"?1:-1)*d-g,w.top+=h>0?h:i>0?-i:0,w.top=Math.max(-x.offset.top+v.offset.top+(g&&B.corner.x==="center"?B.offset:0),a-k,Math.min(Math.max(-x.offset.top+v.offset.top+v.height,a+k),w.top))):(h>0&&(j.y!=="top"||i>0)?w.top-=k:i>0&&(j.y!=="bottom"||h>0)&&(w.top-=n?-k:k),w.top!==a&&n&&(w.top-=m.y),w.top<0&&-w.top>i&&(w.top=a));return w.top-a}},F;if(a.isArray(f)&&f.length===2)l={x:"left",y:"top"},w={left:f[0],top:f[1]};else if(f==="mouse"&&(c&&c.pageX||H.event.pageX))l={x:"left",y:"top"},c=(c&&(c.type==="resize"||c.type==="scroll")?H.event:c&&c.pageX&&c.type==="mousemove"?c:i&&i.pageX&&(m.mouse||!c||!c.pageX)?{pageX:i.pageX,pageY:i.pageY}:!m.mouse&&H.origin&&H.origin.pageX?H.origin:c)||c||H.event||i||{},w={top:c.pageY,left:c.pageX};else{f==="event"?c&&c.target&&c.type!=="scroll"&&c.type!=="resize"?f=H.target=a(c.target):f=H.target:H.target=a(f),f=a(f).eq(0);if(f.length===0)return z;f[0]===document||f[0]===b?(q=h.iOS?b.innerWidth:f.width(),r=h.iOS?b.innerHeight:f.height(),f[0]===b&&(w={top:u||h.iOS?(v||f).scrollTop():0,left:u||h.iOS?(v||f).scrollLeft():0})):f.is("area")&&h.imagemap?w=h.imagemap(f,l,D.enabled?n:e):f[0].namespaceURI==="http://www.w3.org/2000/svg"&&h.svg?w=h.svg(f,l):(q=f.outerWidth(),r=f.outerHeight(),w=h.offset(f,x)),w.offset&&(q=w.width,r=w.height,y=w.flipoffset,w=w.offset);if(h.iOS<4.1&&h.iOS>3.1||h.iOS==4.3||!h.iOS&&u)F=a(b),w.left-=F.scrollLeft(),w.top-=F.scrollTop();w.left+=l.x==="right"?q:l.x==="center"?q/2:0,w.top+=l.y==="bottom"?r:l.y==="center"?r/2:0}w.left+=m.x+(j.x==="right"?-o:j.x==="center"?-o/2:0),w.top+=m.y+(j.y==="bottom"?-p:j.y==="center"?-p/2:0),D.enabled?(v={elem:v,height:v[(v[0]===b?"h":"outerH")+"eight"](),width:v[(v[0]===b?"w":"outerW")+"idth"](),scrollLeft:u?0:v.scrollLeft(),scrollTop:u?0:v.scrollTop(),offset:v.offset()||{left:0,top:0}},x={elem:x,scrollLeft:x.scrollLeft(),scrollTop:x.scrollTop(),offset:x.offset()||{left:0,top:0}},w.adjusted={left:D.horizontal!=="none"?D.left(w.left):0,top:D.vertical!=="none"?D.top(w.top):0},w.adjusted.left+w.adjusted.top&&E.attr("class",E[0].className.replace(/ui-tooltip-pos-\w+/i,k+"-pos-"+j.abbrev())),y&&w.adjusted.left&&(w.left+=y.left),y&&w.adjusted.top&&(w.top+=y.top)):w.adjusted={left:0,top:0},s.originalEvent=a.extend({},c),E.trigger(s,[z,w,v.elem||v]);if(s.isDefaultPrevented())return z;delete w.adjusted,d===e||isNaN(w.left)||isNaN(w.top)||f==="mouse"||!a.isFunction(g.effect)?E.css(w):a.isFunction(g.effect)&&(g.effect.call(E,z,a.extend({},w)),E.queue(function(b){a(this).css({opacity:"",height:""}),a.browser.msie&&this.style.removeAttribute("filter"),b()})),C=0;return z},redraw:function(){if(z.rendered<1||D)return z;var a=t.position.container,b,c,d,e;D=1,t.style.height&&E.css("height",t.style.height),t.style.width?E.css("width",t.style.width):(E.css("width","").addClass(r),c=E.width()+1,d=E.css("max-width")||"",e=E.css("min-width")||"",b=(d+e).indexOf("%")>-1?a.width()/100:0,d=(d.indexOf("%")>-1?b:1)*parseInt(d,10)||c,e=(e.indexOf("%")>-1?b:1)*parseInt(e,10)||0,c=d+e?Math.min(Math.max(c,e),d):c,E.css("width",Math.round(c)).removeClass(r)),D=0;return z},disable:function(b){"boolean"!==typeof b&&(b=!E.hasClass(m)&&!H.disabled),z.rendered?(E.toggleClass(m,b),a.attr(E[0],"aria-disabled",b)):H.disabled=!!b;return z},enable:function(){return z.disable(e)},destroy:function(){var b=s[0],c=a.attr(b,u),d=s.data("qtip");z.rendered&&(E.remove(),a.each(z.plugins,function(){this.destroy&&this.destroy()})),clearTimeout(z.timers.show),clearTimeout(z.timers.hide),R();if(!d||z===d)a.removeData(b,"qtip"),t.suppress&&c&&(a.attr(b,"title",c),s.removeAttr(u)),s.removeAttr("aria-describedby");s.unbind(".qtip-"+w),delete j[z.id];return s}})}function x(b){var c;if(!b||"object"!==typeof b)return e;if(b.metadata===f||"object"!==typeof b.metadata)b.metadata={type:b.metadata};if("content"in b){if(b.content===f||"object"!==typeof b.content||b.content.jquery)b.content={text:b.content};c=b.content.text||e,!a.isFunction(c)&&(!c&&!c.attr||c.length<1||"object"===typeof c&&!c.jquery)&&(b.content.text=e);if("title"in b.content){if(b.content.title===f||"object"!==typeof b.content.title)b.content.title={text:b.content.title};c=b.content.title.text||e,!a.isFunction(c)&&(!c&&!c.attr||c.length<1||"object"===typeof c&&!c.jquery)&&(b.content.title.text=e)}}if("position"in b)if(b.position===f||"object"!==typeof b.position)b.position={my:b.position,at:b.position};if("show"in b)if(b.show===f||"object"!==typeof b.show)b.show.jquery?b.show={target:b.show}:b.show={event:b.show};if("hide"in b)if(b.hide===f||"object"!==typeof b.hide)b.hide.jquery?b.hide={target:b.hide}:b.hide={event:b.hide};if("style"in b)if(b.style===f||"object"!==typeof b.style)b.style={classes:b.style};a.each(h,function(){this.sanitize&&this.sanitize(b)});return b}function w(){w.history=w.history||[],w.history.push(arguments);if("object"===typeof console){var a=console[console.warn?"warn":"log"],b=Array.prototype.slice.call(arguments),c;typeof arguments[0]==="string"&&(b[0]="qTip2: "+b[0]),c=a.apply?a.apply(console,b):a(b)}}"use strict";var d=!0,e=!1,f=null,g,h,i,j={},k="ui-tooltip",l="ui-widget",m="ui-state-disabled",n="div.qtip."+k,o=k+"-default",p=k+"-focus",q=k+"-hover",r=k+"-fluid",s="-31000px",t="_replacedByqTip",u="oldtitle",v;g=a.fn.qtip=function(b,h,i){var j=(""+b).toLowerCase(),k=f,l=a.makeArray(arguments).slice(1),m=l[l.length-1],n=this[0]?a.data(this[0],"qtip"):f;if(!arguments.length&&n||j==="api")return n;if("string"===typeof b){this.each(function(){var b=a.data(this,"qtip");if(!b)return d;m&&m.timeStamp&&(b.cache.event=m);if(j!=="option"&&j!=="options"||!h)b[j]&&b[j].apply(b[j],l);else if(a.isPlainObject(h)||i!==c)b.set(h,i);else{k=b.get(h);return e}});return k!==f?k:this}if("object"===typeof b||!arguments.length){n=x(a.extend(d,{},b));return g.bind.call(this,n,m)}},g.bind=function(b,f){return this.each(function(k){function r(b){function d(){p.render(typeof b==="object"||l.show.ready),m.show.add(m.hide).unbind(o)}if(p.cache.disabled)return e;p.cache.event=a.extend({},b),p.cache.target=b?a(b.target):[c],l.show.delay>0?(clearTimeout(p.timers.show),p.timers.show=setTimeout(d,l.show.delay),n.show!==n.hide&&m.hide.bind(n.hide,function(){clearTimeout(p.timers.show)})):d()}var l,m,n,o,p,q;q=a.isArray(b.id)?b.id[k]:b.id,q=!q||q===e||q.length<1||j[q]?g.nextid++:j[q]=q,o=".qtip-"+q+"-create",p=z.call(this,q,b);if(p===e)return d;l=p.options,a.each(h,function(){this.initialize==="initialize"&&this(p)}),m={show:l.show.target,hide:l.hide.target},n={show:a.trim(""+l.show.event).replace(/ /g,o+" ")+o,hide:a.trim(""+l.hide.event).replace(/ /g,o+" ")+o},/mouse(over|enter)/i.test(n.show)&&!/mouse(out|leave)/i.test(n.hide)&&(n.hide+=" mouseleave"+o),m.show.bind("mousemove"+o,function(a){i={pageX:a.pageX,pageY:a.pageY,type:"mousemove"}}),m.show.bind(n.show,r),(l.show.ready||l.prerender)&&r(f)})},h=g.plugins={Corner:function(a){a=(""+a).replace(/([A-Z])/," $1").replace(/middle/gi,"center").toLowerCase(),this.x=(a.match(/left|right/i)||a.match(/center/)||["inherit"])[0].toLowerCase(),this.y=(a.match(/top|bottom|center/i)||["inherit"])[0].toLowerCase();var b=a.charAt(0);this.precedance=b==="t"||b==="b"?"y":"x",this.string=function(){return this.precedance==="y"?this.y+this.x:this.x+this.y},this.abbrev=function(){var a=this.x.substr(0,1),b=this.y.substr(0,1);return a===b?a:a==="c"||a!=="c"&&b!=="c"?b+a:a+b},this.clone=function(){return{x:this.x,y:this.y,precedance:this.precedance,string:this.string,abbrev:this.abbrev,clone:this.clone}}},offset:function(a,b){function i(a,b){c.left+=b*a.scrollLeft(),c.top+=b*a.scrollTop()}var c=a.offset(),d=b,e=0,f=document.body,g,h;if(d){do{d.css("position")!=="static"&&(g=d[0]===f?{left:parseInt(d.css("left"),10)||0,top:parseInt(d.css("top"),10)||0}:d.position(),c.left-=g.left+(parseInt(d.css("borderLeftWidth"),10)||0)+(parseInt(d.css("marginLeft"),10)||0),c.top-=g.top+(parseInt(d.css("borderTopWidth"),10)||0),h=d.css("overflow"),(h==="scroll"||h==="auto")&&++e);if(d[0]===f)break}while(d=d.offsetParent());b[0]!==f&&e&&i(b,1)}return c},iOS:parseFloat((""+(/CPU.*OS ([0-9_]{1,3})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_","."))||e,fn:{attr:function(b,c){if(this.length){var d=this[0],e="title",f=a.data(d,"qtip");if(b===e&&f&&"object"===typeof f&&f.options.suppress){if(arguments.length<2)return a.attr(d,u);f&&f.options.content.attr===e&&f.cache.attr&&f.set("content.text",c);return this.attr(u,c)}}return a.fn["attr"+t].apply(this,arguments)},clone:function(b){var c=a([]),d="title",e=a.fn["clone"+t].apply(this,arguments);b||e.filter("["+u+"]").attr("title",function(){return a.attr(this,u)}).removeAttr(u);return e},remove:a.ui?f:function(b,c){a.ui||a(this).each(function(){c||(!b||a.filter(b,[this]).length)&&a("*",this).add(this).each(function(){a(this).triggerHandler("remove")})})}}},a.each(h.fn,function(b,c){if(!c||a.fn[b+t])return d;var e=a.fn[b+t]=a.fn[b];a.fn[b]=function(){return c.apply(this,arguments)||e.apply(this,arguments)}}),g.version="nightly",g.nextid=0,g.inactiveEvents="click dblclick mousedown mouseup mousemove mouseleave mouseenter".split(" "),g.zindex=15e3,g.defaults={prerender:e,id:e,overwrite:d,suppress:d,content:{text:d,attr:"title",title:{text:e,button:e}},position:{my:"top left",at:"bottom right",target:e,container:e,viewport:e,adjust:{x:0,y:0,mouse:d,resize:d,method:"flip flip"},effect:function(b,c,d){a(this).animate(c,{duration:200,queue:e})}},show:{target:e,event:"mouseenter",effect:d,delay:90,solo:e,ready:e,autofocus:e},hide:{target:e,event:"mouseleave",effect:d,delay:0,fixed:e,inactive:e,leave:"window",distance:e},style:{classes:"",widget:e,width:e,height:e,"default":d},events:{render:f,move:f,show:f,hide:f,toggle:f,visible:f,focus:f,blur:f}},h.ajax=function(a){var b=a.plugins.ajax;return"object"===typeof b?b:a.plugins.ajax=new A(a)},h.ajax.initialize="render",h.ajax.sanitize=function(a){var b=a.content,c;b&&"ajax"in b&&(c=b.ajax,typeof c!=="object"&&(c=a.content.ajax={url:c}),"boolean"!==typeof c.once&&c.once&&(c.once=!!c.once))},a.extend(d,g.defaults,{content:{ajax:{loading:d,once:d}}}),h.imagemap=function(b,c,d){function n(a,b,c){var d=0,e=1,f=1,g=0,h=0,i=a.width,j=a.height;while(i>0&&j>0&&e>0&&f>0){i=Math.floor(i/2),j=Math.floor(j/2),c.x==="left"?e=i:c.x==="right"?e=a.width-i:e+=Math.floor(i/2),c.y==="top"?f=j:c.y==="bottom"?f=a.height-j:f+=Math.floor(j/2),d=b.length;while(d--){if(b.length<2)break;g=b[d][0]-a.offset.left,h=b[d][1]-a.offset.top,(c.x==="left"&&g>=e||c.x==="right"&&g<=e||c.x==="center"&&(g<e||g>a.width-e)||c.y==="top"&&h>=f||c.y==="bottom"&&h<=f||c.y==="center"&&(h<f||h>a.height-f))&&b.splice(d,1)}}return{left:b[0][0],top:b[0][1]}}b.jquery||(b=a(b));var e=(b[0].shape||b.attr("shape")).toLowerCase(),f=(b[0].coords||b.attr("coords")).split(","),g=[],h=a('img[usemap="#'+b.parent("map").attr("name")+'"]'),i=h.offset(),j={width:0,height:0,offset:{top:1e10,right:0,bottom:0,left:1e10}},k=0,l=0,m;i.left+=Math.ceil((h.outerWidth()-h.width())/2),i.top+=Math.ceil((h.outerHeight()-h.height())/2);if(e==="poly"){k=f.length;while(k--)l=[parseInt(f[--k],10),parseInt(f[k+1],10)],l[0]>j.offset.right&&(j.offset.right=l[0]),l[0]<j.offset.left&&(j.offset.left=l[0]),l[1]>j.offset.bottom&&(j.offset.bottom=l[1]),l[1]<j.offset.top&&(j.offset.top=l[1]),g.push(l)}else g=a.map(f,function(a){return parseInt(a,10)});switch(e){case"rect":j={width:Math.abs(g[2]-g[0]),height:Math.abs(g[3]-g[1]),offset:{left:Math.min(g[0],g[2]),top:Math.min(g[1],g[3])}};break;case"circle":j={width:g[2]+2,height:g[2]+2,offset:{left:g[0],top:g[1]}};break;case"poly":a.extend(j,{width:Math.abs(j.offset.right-j.offset.left),height:Math.abs(j.offset.bottom-j.offset.top)}),c.string()==="centercenter"?j.offset={left:j.offset.left+j.width/2,top:j.offset.top+j.height/2}:(j.offset=n(j,g.slice(),c),d&&(d[0]==="flip"||d[1]==="flip")&&(j.flipoffset=n(j,g.slice(),{x:c.x==="left"?"right":c.x==="right"?"left":"center",y:c.y==="top"?"bottom":c.y==="bottom"?"top":"center"}),j.flipoffset.left-=j.offset.left,j.flipoffset.top-=j.offset.top)),j.width=j.height=0}j.offset.left+=i.left,j.offset.top+=i.top;return j},h.tip=function(a){var b=a.plugins.tip;return"object"===typeof b?b:a.plugins.tip=new C(a)},h.tip.initialize="render",h.tip.sanitize=function(a){var b=a.style,c;b&&"tip"in b&&(c=a.style.tip,typeof c!=="object"&&(a.style.tip={corner:c}),/string|boolean/i.test(typeof c.corner)||(c.corner=d),typeof c.width!=="number"&&delete c.width,typeof c.height!=="number"&&delete c.height,typeof c.border!=="number"&&c.border!==d&&delete c.border,typeof c.offset!=="number"&&delete c.offset)},a.extend(d,g.defaults,{style:{tip:{corner:d,mimic:e,width:6,height:6,border:d,offset:0}}}),h.svg=function(b,c){var d=a(document),e=b[0],f={width:0,height:0,offset:{top:1e10,left:1e10}},g,h,i,j,k;if(e.getBBox&&e.parentNode){g=e.getBBox(),h=e.getScreenCTM(),i=e.farthestViewportElement||e;if(!i.createSVGPoint)return f;j=i.createSVGPoint(),j.x=g.x,j.y=g.y,k=j.matrixTransform(h),f.offset.left=k.x,f.offset.top=k.y,j.x+=g.width,j.y+=g.height,k=j.matrixTransform(h),f.width=k.x-f.offset.left,f.height=k.y-f.offset.top,f.offset.left+=d.scrollLeft(),f.offset.top+=d.scrollTop()}return f},h.modal=function(a){var b=a.plugins.modal;return"object"===typeof b?b:a.plugins.modal=new D(a)},h.modal.initialize="render",h.modal.sanitize=function(a){a.show&&(typeof a.show.modal!=="object"?a.show.modal={on:!!a.show.modal}:typeof a.show.modal.on==="undefined"&&(a.show.modal.on=d))},h.modal.zindex=g.zindex+1e3,a.extend(d,g.defaults,{show:{modal:{on:e,effect:d,blur:d,escape:d}}}),h.bgiframe=function(b){var c=a.browser,d=b.plugins.bgiframe;if(a("select, object").length<1||(!c.msie||(""+c.version).charAt(0)!=="6"))return e;return"object"===typeof d?d:b.plugins.bgiframe=new E(b)},h.bgiframe.initialize="render"})(jQuery,window);

// ***************************
// js.compressed/qtip.js
// ***************************
/*=======================================================================*\
|| ###################################################################### ||
|| # vBulletin 5.5.2
|| # ------------------------------------------------------------------ # ||
|| # Copyright 2000-2019 MH Sub I, LLC dba vBulletin. All Rights Reserved.  # ||
|| # This file may not be redistributed in whole or significant part.   # ||
|| # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html   # ||
|| ###################################################################### ||
\*========================================================================*/
window.vBulletin=window.vBulletin||{};window.vBulletin.phrase=window.vBulletin.phrase||{};window.vBulletin.phrase.precache=window.vBulletin.phrase.precache||[];window.vBulletin.phrase.precache=$.merge(window.vBulletin.phrase.precache,["no_preview_text_available","working_ellipsis"]);window.vBulletin.options=window.vBulletin.options||{};window.vBulletin.options.precache=window.vBulletin.options.precache||[];window.vBulletin.options.precache=$.merge(window.vBulletin.options.precache,["threadpreview"]);(function(){(function(){function B(F,E){var D=E.elements.tooltip;window.setTimeout(function(){var M=parseInt(D.css("left"),10),G=$(window).scrollLeft();if(M<G){D.css("left",G+1)}else{var L=D.outerWidth(),I=$(window).width(),J=M+L,H=G+I;if(J>H){var N=J-H,K=M-N;D.css("left",K-1)}}},0)}var C=$.fn.qtip;$.fn.qtip=function(){if(typeof arguments[0]=="object"){if(typeof arguments[0].events=="undefined"){arguments[0].events={}}if(typeof arguments[0].events.move=="function"){arguments[0].events.move=vBulletin.runBeforeCallback(arguments[0].events.move,B)}else{arguments[0].events.move=B}}return C.apply(this,arguments)}})();$(".js-tooltip[title]").qtip({style:{classes:"ui-tooltip-shadow"}});if(vBulletin.options.get("threadpreview")>0&&(($(".channel-content-widget").length>0&&$(".channel-content-widget").eq(0).attr("data-canviewtopiccontent"))||$(".search-results-widget").length>0)){var A=function(){var B=$(this);if(B.data("vb-qtip-preview-initialized")=="1"){return }B.data("vb-qtip-preview-initialized","1");var D=B.closest(".topic-item").attr("data-node-id")||B.closest(".js-post").attr("data-node-id"),C=vBulletin.isRtl();D=parseInt(D);B.qtip({content:{text:function(H,G){var F=function(I){var I='<div class="b-topicpreview__previewtext">'+I+"</div>";G.set("content.text",I);return I};var E=function(){return F(vBulletin.phrase.get("no_preview_text_available"))};if(D){vBulletin.AJAX({call:"/ajax/fetch-node-preview?nodeid="+D,data:{},success:function(I){if(typeof (I)!="string"&&typeof (I[0])=="string"){I=I[0]}if($.trim(I)!=""){F(I)}else{E()}},api_error:E,emptyResponse:E,error:function(K,I,J){F(I+": "+J)}});return vBulletin.phrase.get("working_ellipsis")}else{return E()}}},show:{delay:500},position:{my:"top "+(C?"right":"left"),at:"bottom "+(C?"left":"right"),viewport:$(window)},style:{classes:"ui-tooltip-shadow ui-tooltip-rounded b-topicpreview"}});B.trigger("mouseover")};$(document).off("mouseover",".topic-list-container .topic-title, .conversation-list .post-title, .conversation-list .b-post__title").on("mouseover",".topic-list-container .topic-title, .conversation-list .post-title, .conversation-list .b-post__title",A)}})();;

// ***************************
// js.compressed/admin-sbpanel-style.js
// ***************************
/*=======================================================================*\
|| ###################################################################### ||
|| # vBulletin 5.5.2
|| # ------------------------------------------------------------------ # ||
|| # Copyright 2000-2019 MH Sub I, LLC dba vBulletin. All Rights Reserved.  # ||
|| # This file may not be redistributed in whole or significant part.   # ||
|| # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html   # ||
|| ###################################################################### ||
\*========================================================================*/
window.vBulletin=window.vBulletin||{};window.vBulletin.phrase=window.vBulletin.phrase||{};window.vBulletin.phrase.precache=window.vBulletin.phrase.precache||[];window.vBulletin.phrase.precache=$.merge(window.vBulletin.phrase.precache,["cancel","changed_extra_css_warning","error_loading_css","error_setting_theme","loading_themes","no_preview_available","revert","revert_extra_css_warning","save_and_continue","success","there_are_no_themes_installed","confirm_action"]);window.vBulletin.options=window.vBulletin.options||{};window.vBulletin.options.precache=window.vBulletin.options.precache||[];window.vBulletin.options.precache=$.merge(window.vBulletin.options.precache,["styleid"]);(function(U){var G=false,k,T="",Y=0,i="",H=0,N=false,D=function(m){var l=this;vBulletin.assertUserHasAdminPermission("canusesitebuilder",l,function(){B.call(l)});return false},B=function(l,q){var p=U(this),o=U(document.body),n=!p.hasClass("selected"),m=true;if(typeof l!="undefined"){n=!!l}if(typeof q!="undefined"){m=!!q}if(n){U(document.body).addClass("js-edit-mode-style");P();f();U(".js-style-panel").css("display","none").removeClass("h-hide").slideDown("400",W)}else{e(!n,p);U(".js-style-panel").slideUp("fast",function(){U(document.body).removeClass("js-edit-mode-style");if(!m){return }var r=window.location.href;if(r.indexOf("adminAction=stylePanel&")!=-1){r=r.replace("adminAction=stylePanel&","")}else{r=r.replace("?adminAction=stylePanel","")}if(r!=window.location.href){window.location.href=r}else{window.location.reload(true)}})}},c=function(l){B(false,l)},e=function(l,m){U(document).trigger("vb-toggle-sitebuilder-menu",{enableButtons:l,currentButton:m})},f=function(){},I=function(m,n){var l=U(".js-theme-selector__list:visible .js-theme-selector__theme-radio:checked").val();vBulletin.AJAX({call:"/ajax/api/style/setDefaultStyle",data:{styleid:l},error_phrase:"error_setting_theme",success:function(){var o=new Date();o.setDate(o.getDate()+365);U.cookie(pageData.cookie_prefix+"userstyleid",l,{path:pageData.cookie_path,domain:pageData.cookie_domain,expires:o});if(typeof n=="undefined"||n){c(true)}}});return false},O=function(l){c(false);return false},b=function(l){h(k.getValue(),null,Y,i)},K=function(l){openConfirmDialog({title:vBulletin.phrase.get("revert"),message:vBulletin.phrase.get("revert_extra_css_warning"),iconType:"warning",onClickYes:function(m){T="";k.setValue("");h("",X,Y,i)}});return false},V=function(l){c(true);return false},A=function(l){k.setValue(T)},g=function(p,l,q){if(!l&&p&&p.target){var l=U(p.target).closest(".js-theme-selector__theme").data("preview-url")}if(!q){var q=U(p.target).closest(".js-theme-selector__list")}var o=q.closest(".js-panel").find(".js-theme-selector__theme-preview"),n,m=o.find("> img, > p");if(o.length!=1){return }if(l){n=U("<img />").prop("src",l)}else{n=U("<p />").addClass("b-theme-selector__theme-preview-message").text(vBulletin.phrase.get("no_preview_available"))}if(m.is("p")&&n.is("p")){m.fadeTo(200,"0.5",function(){U(this).fadeTo(400,1)})}else{m.css("zIndex","2");n.css("zIndex","1").hide();o.append(n);m.fadeOut({duration:300,queue:false,complete:function(){U(this).remove()}});n.fadeIn({duration:600,queue:false})}},R=function(){var l=U(this);l.closest(".js-theme-selector__list").find(".js-theme-selector__theme").removeClass("b-theme-selector__theme--selected js-theme-selector__theme--selected js-vbscroller-selected-item");l.closest(".js-theme-selector__theme").addClass("b-theme-selector__theme--selected js-theme-selector__theme--selected js-vbscroller-selected-item")},C=function(v,q,m){var p=this,o="js-theme-selector__theme b-theme-selector__theme h-margin-right-xl",r=U('<input type="radio" name="styleid" value="'+p.styleid+'" />').addClass("js-theme-selector__theme-radio b-theme-selector__theme-radio h-margin-none h-margin-right-s"),t=U("<label />").prop("title",p.title),s=U("<div />").addClass("h-margin-s h-margin-bottom-none b-theme-selector__theme-title").text(p.title.length>30?p.title.substr(0,20)+" ...":p.title),l=U("<img />").addClass("h-margin-s h-margin-bottom-m").prop("src",p.iconurl),n=U("<div />").addClass("b-theme-selector__theme-thumbnail");var u=function(w){var x=new Image();x.src=w};u(p.iconurl);u(p.previewurl);if(q==p.styleid){r.prop("checked","checked");r.attr("checked","checked");g({},p.previewurl,v);o+=" js-theme-selector__theme--selected b-theme-selector__theme--selected js-vbscroller-selected-item"}n.append(l);s.prepend(r);t.append(n).append(s);U("<div />").addClass(o).data("preview-url",(p.previewurl||"")).append(t).appendTo(v);Z.call(l.get(0),2)},Z=function(v){var p=U(this);p.css({maxWidth:"none",maxHeight:"none"});var o=p.outerWidth()||0,w=p.outerHeight()||0,l=o>w?"height":"width",x,r,m,s=false;if(o>0&&w>0){var u=false;if(l=="width"&&o>100){x=100/o;r=o*x;m=w*x;u=true}else{if(l=="height"&&w>100){x=100/w;r=o*x;m=w*x;u=true}else{}}if(u){p.removeClass("h-margin-s h-margin-bottom-m").css({maxWidth:r,maxHeight:m});var q=p.parent();var t=U("<div />").addClass("b-theme-selector__image-resize-wrapper h-margin-s h-margin-bottom-m").css({width:100,height:100,overflow:"hidden"});t.append(p);q.append(t);s=true}}else{}if(!s){p.css({maxWidth:"100px",maxHeight:"100px"});if(v>0){var n=this;window.setTimeout(function(){Z.call(n,--v)},100)}else{var n=this;p.off("load").on("load",function(){Z.call(n,--v)})}}},j=function(m,p){var n,o=0,l=vBulletin.options.get("styleid");p.html("");if(m&&m.themes){U.each(m.themes,function(){C.apply(this,[p,l,o]);++o})}if(!o){U("<div />").addClass("b-theme-selector__message").text(vBulletin.phrase.get("there_are_no_themes_installed")).appendTo(p)}else{d(p)}},d=function(l){if(vBulletin.vBScroller&&vBulletin.vBScroller.initializeScroller){var m=l.closest(".js-vbscroller-wrapper");vBulletin.vBScroller.initializeScroller(m)}},E=function(o,p,m){var n=U(this).closest(".js-theme-selector__theme"),l=n.find(".js-theme-selector__theme-radio");if(n.is(".js-theme-selector__theme--selected")){return }l.attr("checked","checked");R.call(this);g.call(this,o);if(m.liveUpdate){I.call(this,o,false)}},J=function(m){var l={liveUpdate:false,container:document};m=U.extend({},l,m);var o=U(".js-theme-selector__list",m.containerSelector);function n(p){E.call(this,p,o,m)}o.off("change",".js-theme-selector__theme-radio").on("change",".js-theme-selector__theme-radio",n);o.off("click",".js-theme-selector__theme label img").on("click",".js-theme-selector__theme label img",n);vBulletin.AJAX({call:"/ajax/api/style/getThemeInfo",error:function(){var p=U("<div />").addClass("b-theme-selector__message").text(vBulletin.phrase.get("error_fetching_themes"));o.html(p)},success:function(p){j.apply(this,[p,o])}})},F=function(m){var l=U(m.target);if(l.is(".js_stylepanel_selectStyle")&&isNaN(parseFloat(l.val()))){return false}if(l.is(".js_stylepanel_selectTemplate")&&l.val()==""){return false}currentText=k.getValue();if(T!=k.getValue()){L()}else{X()}},S=function(l){if(typeof l=="string"){l=parseInt(l,10)}H=!!l;U(".js-textonly").prop("checked",H)},M=function(){var o=new Date(),l=U(".js_stylepanel_selectStyle").val(),m=U(".js-sb-sprite-icon-preview-img"),n=m.attr("src");n=n.replace(/styleid=\d+/,"styleid="+l);n=n.replace(/ts=\d+/,"ts="+o.getTime());m.attr("src",n)},a=function(m){var l=U(".js-sb-sprite-icon-preview");if(!l.data("preview-initialized")){U(".js-sb-sprite-icon-preview-bg-btn").css("background-color",function(){return U(this).data("bgcolor")}).on("click",function(){var n=U(this);U(".js-sb-sprite-icon-preview-img-wrapper").css("background-color",n.data("bgcolor"));U(".js-sb-sprite-icon-preview-bg-btn").removeClass("sb-sprite-icon-preview-bg-btn--selected");n.addClass("sb-sprite-icon-preview-bg-btn--selected");return false}).eq(1).click();l.data("preview-initialized","1")}if(m&&m=="css_sprite_icons_general.css"){l.removeClass("h-hide");M()}else{l.addClass("h-hide")}},X=function(){var n=U(".js_stylepanel_selectStyle"),m=U(".js_stylepanel_selectTemplate");if(!N){var l=U.cookie(pageData.cookie_prefix+"userstyleid");if(l){n.val(l)}n.selectBox();m.selectBox();N=true}vBulletin.AJAX({call:"/ajax/api/template/getCssTemplateSbEditor",data:{styleid:n.val(),templateName:m.val()},success:function(o){if(typeof (o.template)=="undefined"||typeof (o.template["template_un"])=="undefined"){T="";S(0)}else{T=o.template["template_un"];S(o.template["textonly"])}k.setValue(T);T=k.getValue();Y=n.val();i=m.val();a(i)},api_error:function(){T="";k.setValue("");Y=n.val();i=m.val();S(0);a("")},error_phrase:"error_loading_css",})},L=function(){openConfirmDialog({title:vBulletin.phrase.get("confirm_action"),message:vBulletin.phrase.get("changed_extra_css_warning"),iconType:"warning",buttonLabel:{yesLabel:vBulletin.phrase.get("save_and_continue"),noLabel:vBulletin.phrase.get("cancel")},onClickYes:function(l){h(k.getValue(),X,Y,i)},onClickNo:function(l){U(".js_stylepanel_selectStyle").selectBox("value",Y);U(".js_stylepanel_selectTemplate").selectBox("value",i);S(H)}})},h=function(p,n,l,m){var o=U(".js-textonly").prop("checked")?1:0;vBulletin.AJAX({call:"/ajax/api/template/saveCssTemplateSbEditor",data:{text:p,styleid:l,templateName:m,textonly:o},success:function(){T=p;M();vBulletin.alert("success","css_saved","",n)},error_phrase:"error_saving_css",})},W=function(){function l(){if(typeof (k)=="undefined"){var m=U(".sb-style-panel_cssextraedit").get(0);k=CodeMirror.fromTextArea(m,{mode:"css",lineNumbers:true});var n=U(m).attr("dir");if(n){U(k.display.wrapper).attr("dir",n)}T="";U(".js-style-panel #admin-stylepanel-csseditor .js_stylepanel_selectStyle").change();U(".js-tooltip[title]").qtip({style:{classes:"ui-tooltip-shadow"}});U(".sb-style-panel .tab-item a").off("click",l)}}U(".sb-style-panel .tab-item a").off("click",l).on("click",l);if(U(".js-style-panel .js-admin-stylepanel-csseditor").is(":visible")){l()}},P=function(){if(G){return }U(".js-style-panel .tabs").tabs();var l;l=".js-style-panel #admin-stylepanel-themes .js-button--save";U(document).off("click",l).on("click",l,I);l=".js-style-panel #admin-stylepanel-themes .js-button--cancel";U(document).off("click",l).on("click",l,O);l=".js-style-panel #admin-stylepanel-csseditor .js-button--revert";U(document).off("click",l).on("click",l,K);l=".js-style-panel #admin-stylepanel-csseditor .js-button--cancel";U(document).off("click",l).on("click",l,A);l=".js-style-panel #admin-stylepanel-csseditor .js-button--close";U(document).off("click",l).on("click",l,V);l=".js-style-panel #admin-stylepanel-csseditor .js-button--save";U(document).off("click",l).on("click",l,b);var m=".js-style-panel #admin-stylepanel-csseditor ";l=m+".js_stylepanel_selectStyle, "+m+".js_stylepanel_selectTemplate";U(document).off("change",l).on("change",l,F);if(U(".js-style-panel .js-theme-selector__container").length==1){J({liveUpdate:false,containerSelector:".js-style-panel"})}if(U(".js-style-panel .js-admin-stylepanel-csseditor").length==1){W()}G=true},Q=function(){U(function(){U(document).on("vb-sitebuilder-panel--style",D);if(typeof (pageData.adminAction)!="undefined"&&pageData.adminAction=="stylePanel"){U(".js-top-menu-tab--style").click()}})};window.vBulletin=window.vBulletin||{};window.vBulletin.sitebuilder=window.vBulletin.sitebuilder||{};window.vBulletin.sitebuilder.initThemesInQuickConfig=function(){J({liveUpdate:true,containerSelector:".js-config-site-panel"})};Q()})(jQuery);;

// ***************************
// js.compressed/vbulletin_stylegenerator.js
// ***************************
window.vBulletin=window.vBulletin||{};window.vBulletin.phrase=window.vBulletin.phrase||{};window.vBulletin.phrase.precache=window.vBulletin.phrase.precache||[];window.vBulletin.phrase.precache=$.merge(window.vBulletin.phrase.precache,["style_generator_browser_not_supported","show_tooltips","hide_tooltips","enter_hex_value","enter_distance_angle","enter_complement_hue","enter_hue","err_invalid_name","err_order_need_name","err_order_need_order","err_order_negative","err_order_too_large","done","error","saved_style_x_successfully","primary_color","enter_hex","primary0_info","primary1_info","primary2_info","primary3_info","primary4_info","secondary0_info","secondary1_info","secondary2_info","secondary4_info","warning"]);var drag={on:false,dot:null};var defs={FPSlimiter:10,MaxRedrawRate:200,dotSize:6,wheelMid:{X:190,Y:190},sliderMid:{X:95,Y:95},sliderWidth:140,CBPreview:0};var API={on:false};var SchemeID,styleGeneratorContent;$("#edit-content .tab-item a[id!=colorStyleTab]").on("click",function(){changePreview("","default")});$("#colorStyleTab").on("click",function(){var A=parseInt($.browser.version,10);if($.browser.msie&&A<7){openAlertDialog({title:vBulletin.phrase.get("warning"),message:vBulletin.phrase.get("style_generator_browser_not_supported"),iconType:"warning"});return }if(typeof styleGeneratorContent=="undefined"){vBulletin.AJAX({url:vBulletin.getAjaxBaseurl()+"/ajax/render/style_generator",success:function(B){styleGeneratorContent=B;$("#color-style").html(B);showStyleGenerator()},error_phrase:"error_fetching_dialog"});return }showStyleGenerator()});function showStyleGenerator(){$("#jscheck").hide();$("#color-style").show().find("select.custom-dropdown").selectBox().end().find("a").on("click",function(){$(this).blur()});$("#model a").on("click",function(){setScheme(this.id);return false});$("#tab-wheel").on("click",function(){togglePane("wheel");return false});$("#tab-vars").on("click",function(){togglePane("vars");return false});$("#wheel,#saturation,#contrast").on("mousedown",function(H){H.preventDefault();var J=$(this);var I=J.offset();drag.on=true;drag.dW=J.width();drag.dH=J.height();drag.dX=I.left+drag.dW/2;drag.dY=I.top+drag.dH/2;J.on("mousemove",function(K){K.preventDefault();dragMove(K,this)});if(!drag.dot){dragMove(H,this)}}).on("mouseup",function(H){H.preventDefault();$(this).off("mousemove");drag.on=false;drag.dot=null;updateColorData()});$(".dot").on("mousedown",function(H){drag.dot=this}).on("mouseup",function(H){drag.dot=null});$("#dot1").on("dblclick",enterHue);$("#hue-val").on("click",enterHue);$("#dot2").on("dblclick",enterComplHue);$("#dot3").on("dblclick",enterDist);$("#dist-val").on("click",enterDist);$("#rgb-val").on("click",enterRGB);$("#sample-val").on("dblclick",function(I){var H=prompt(vBulletin.phrase.get("enter_hex"))});toggleContrast();$("#tab-light-ps").on("click",function(){pagePreview("light-ps");return false});$("#tab-light-pt").on("click",function(){pagePreview("light-pt");return false});$("#tab-grey").on("click",function(){pagePreview("grey");return false});$("#tab-dark").on("click",function(){pagePreview("dark");return false});$("#menu a").on("click",function(H){H.preventDefault();$(this).blur()});$("#menu-undo").on("click",function(){History.back();return false});$("#menu-redo").on("click",function(){History.fwd();return false});$("#save-color-style").on("click",function(){exportCols();return false});$("#menu-tooltips").on("click",function(){useShowTooltips();return false});$("#preview-palette .cbox").on("click",function(){if($("#tab-vars").hasClass("sel")&&UseManualVars){var H=$(this).attr("rel");var I=H.split("-");I=I[0];$("#manualvars a.ttl").filter(function(){return $(this).attr("rel")==I}).click();$("#manualvars a.col").filter(function(){return $(this).attr("rel")==H}).click()}return false});showTooltips();History.updateMenu();var D=document.location.search.substring(1);if(D){D=D.split("&");var C,A,E,B,G;API.data={};for(C=0,A=D.length;C<A;C++){E=D[C].split("=");B=E[0].toString();G=E[1].toString();API.data[B]=G}if(API.data.returnurl){API.on=true;if(API.data.format!="hex"&&API.data.format!="rgb"){API.data.format="hex"}if(API.data.method!="get"&&API.data.method!="post"){API.data.format="get"}}}var F=document.location.hash.substring(1);if(F){loadScheme(F)}else{loadScheme("3E11TvVw5w0w0");usePreset("default");updateScheme();if(Palette.UseVarsOverlay){toggleContrast()}}populatePaletteText("light-ps");changePreview()}function setStyleAttr(D,A,C,B){if(D instanceof $&&D.length>0){return D.each(function(){var E=$(this),G=E.attr("style")?E.attr("style").split(";"):[],F=[];$.each(G,function(I,H){if(A==$.trim(H.split(":")[0])){F.push("{0}:{1}{2}".format(A,C,(B?" !important":"")))}else{F.push(H)}});if(!E.data("orig-style")&&E.attr("style")){E.data("orig-style",E.attr("style"))}E.attr("style",F.join(";"))})}return $()}function loadScheme(A){Palette.unserialize(A);updateScheme();if(Palette.UseVarsOverlay){toggleContrast()}}function togglePane(B,A){if(A==undefined){var A=true}if(!$("#tab-"+B).hasClass("sel")){$(".pane").hide();$("#pane-"+B).fadeIn(250);$("#tabs-color a").removeClass("sel");$("#tab-"+B).addClass("sel").blur()}if(B=="wheel"){updateWheel();$("#manualvars a.sel").removeClass("sel");$("#manualvars a#pal-pri-0").addClass("sel")}else{if((B=="vars")&&(A)){updateVars();setOriginalColor()}}}function toggleContrast(A){if(A=="c1"){Palette.resetVarsOverlay()}else{$("#manualvars, #ttl-c2").fadeIn(750);UseManualVars=true}updateVars()}function setScheme(A){Palette.setScheme(A);updateScheme()}function usePreset(B){if(!B){return }var A=Palette.usePreset(B);updateVars()}function useColorBlind(A){defs.CBPreview=A;$("#menu-vision, #colorblind a").removeClass("sel");if(A>0){$("#menu-vision").addClass("sel");$("#colorblind a").eq(A).addClass("sel");$("#cb-warning").show()}else{$("#cb-warning").hide()}colorize()}function useShowTooltips(){var A=!$("#menu-tooltips").hasClass("sel");if(A){showTooltips()}else{hideTooltips()}}function checkFPS_on(){}function checkFPS_off(){}function updateScheme(){var A=Palette.Scheme;$("#model a").removeClass("sel");$("#"+A).addClass("sel").blur();$("#dot3").css("display",Boolean(Palette.Sec1)?"block":"none");$("#dist-val").css("display",Boolean(Palette.Sec1)?"block":"none");updateWheel();if($("#tab-vars").hasClass("sel")){updateVars()}}function updateWheel(){checkFPS_on();moveDot(1,Palette.Primary);moveDot(3,Palette.Sec1);var A=Palette.Primary.Col[0].RGB;$("#hue-val span").html(Palette.H+"&deg;");$("#rgb-val span").text(A.getHex());$("#rgb-r").html(Math.round(A.R/255*100)+" %");$("#rgb-g").html(Math.round(A.G/255*100)+" %");$("#rgb-b").html(Math.round(A.B/255*100)+" %");$("#dist-val span").html(Palette.Dist+"&deg;");colorize();checkFPS_off()}function updateVars(){if(UseManualVars){updateManualVars()}else{$("#saturation").css("background-color",Palette.Primary.Base.RGB.getCSS());updateContrast()}updateSV()}function updateSV(){checkFPS_on();var A,C;if(UseManualVars){var B=Palette.getVarOverlay(VarSelected[0],VarSelected[1]);A=B[0];C=B[1];A=A-0.5;C=C-0.5;moveSliderDot("#dots,#dotv"+VarSelected[1],A,-C)}else{A=Palette.dS;C=Palette.dV;A=A<0?(A+1)*0.9-0.5:0.4+A*0.1;C=C<0?(C+1)*0.9-0.5:0.4+C*0.1;moveSliderDot("#dots",A,-C)}colorize();checkFPS_off()}function updateContrast(){checkFPS_on();var A=Palette.cL,B=Palette.cS;moveSliderDot("#dotc",A-0.5,0.5-B);colorize();checkFPS_off()}var UseManualVars=false;var VarSelected=[0,0];var ColorHash={pri:0,sec1:1,sec2:2,compl:3};function updateManualVars(){function A(J,I,C){var H,F,D,G='<a class="ttl" rel="'+I+'" href="#"></a>';G+='<ul class="var-set" id="">';for(var E=0;E<5;E++){H=J.getVarRGB(E).getHex();F=I+"-"+E;G+='<li><a class="col" id="pal-'+F+'" rel="'+F+'" href="#"><img src="'+pageData.baseurl+'/images/style_generator/e.png" id="cbox-bg-'+F+'" class="cbox bg-'+F+'" />';G+='<span id="info-'+I+"-"+E+'" class="paletteInfo"></span>';G+="</a></li>"}G+="</ul>";return G}var B='<ul class="palettedisplay">';B+="<li>"+A(Palette.Primary,"pri","")+"</li>";B+="<li>"+A(Palette.Sec1,"sec1","")+"</li>";B+="</ul>";$("#manualvars").html(B);$("#manualvars a.ttl").on("click",function(){var D,C,E=$(this).attr("rel");for(D=0;D<5;D++){C=Palette.getVarOverlay(ColorHash[E],D);moveSliderDot("#dotv"+D,C[0]-0.5,-C[1]+0.5)}if($(this).next(".var-set").hasClass("sel")){return false}$("#manualvars .var-set.sel").removeClass("sel").slideUp("fast");$(this).blur().next(".var-set").addClass("sel").slideDown("fast").find("a.col").eq(0).click();return false});$("#manualvars a.col").on("mouseenter",function(){var C=$("#preview-palette").find(".bg-"+$(this).attr("rel")).addClass("hilite")}).on("mouseleave",function(){var C=$("#preview-palette").find(".bg-"+$(this).attr("rel")).removeClass("hilite")}).on("click",function(){$("#manualvars a.sel").removeClass("sel");$(this).blur().addClass("sel");VarSelected=$(this).attr("rel").split("-");VarSelected[0]=ColorHash[VarSelected[0]];$("#saturation").css("background-color",Palette.getColorByIdx(VarSelected[0]).Base.RGB.getCSS());setOriginalColor();updateSV();return false});$("#manualvars a.ttl").eq(0).click();$("#manualvars a.col").on("click",function(){togglePane("vars",false)});populatePaletteText($("#tabs-preview a.sel").attr("id").replace(/tab-/g,""))}function exportCols(){if(check_save_valid!==undefined){if(!check_save_valid()){return false}}function B(H){var G=[];for(var F=0;F<5;F++){v=H.getVarRGB(F);G.push({hex:v.getHex(),r:v.R,g:v.G,b:v.B})}return G}var A={primary:B(Palette.Primary)};if(Palette.Sec1){A.secondary=B(Palette.Sec1)}if(Palette.Compl){A.complement=B("Palette.Compl")}var E=$("#styleform #form-name").val();var C=$("#styleform select[name=parentid]");var D=C.val();vBulletin.AJAX({url:vBulletin.getAjaxBaseurl()+"/style/saveGeneratedStyle",error_phrase:"style_errors",data:{type:$(".previewtab.sel").data("type"),id:SchemeID,scheme:A,name:E,parentid:D,displayorder:$("#styleform #form-displayorder").val(),userselect:$("#styleform input:radio[name=userselect]:checked").val()},success:function(F){var G=$("#styleform select[name=parentid] option[value={0}]".format(D));var H=G.data("depth")+2;G.after('<option value="{0}" data-depth="{2}">{1}</option>'.format(F.overwritestyleid,str_repeat(C.data("indent"),H)+E,H));C.val(F.overwritestyleid);$("#styleform #form-name").val("");openAlertDialog({title:vBulletin.phrase.get("done"),message:vBulletin.phrase.get("saved_style_x_successfully",E)})}})}function pagePreview(A){var B=$("#tabs-preview a.sel").attr("id").replace("tab-","");$("a.previewtab").removeClass("sel");$("#tab-"+A).addClass("sel").blur();$("a.previewing").removeClass("selected");$("li.savemenu").removeClass("selected");$("#menu-"+A).addClass("selected").blur();$("#menu-export-"+A).addClass("selected").blur();populatePaletteText(A);changePreview(B,A);colorize()}function changePreview(B,G){function A(I){$.each(I,function(J,K){$(J).removeClass(K);$(J).attr("style",$(J).data("orig-style"))})}function F(I){$.each(I,function(J,K){$(J).addClass(K);$(J).css("background-color","")})}var E={"#vb-page-body":"bg-pri-0","#vb-page-body":"col-pri-0","#wrapper":"bg-pri-3","#header":"bg-pri-2","#channel-tabbar, #channel-subtabbar, #footer-subtabbar, #footer-tabbar":"bg-pri-2","#channel-tabbar ul, #channel-subtabbar ul, #footer-subtabbar ul, #footer-tabbar ul.nav-list":"bg-sec1-0","#channel-tabbar ul li, #channel-subtabbar ul li, #footer-subtabbar ul li, #footer-tabbar ul.nav-list li":"bg-sec1-0","#channel-tabbar ul li a, #channel-subtabbar ul li a, #footer-subtabbar ul li a,  #footer-tabbar ul.nav-list li a":"col-pri-1",".canvas-widget":"bg-pri-1","#subforumdescription":"bg-pri-3","#footer-tabbar":"bg-pri-2",".topic-title":"col-pri-2",".b-post-control__label":"col-pri-2",".widget-content, .post-content":"col-pri-0",};var D={"#wrapper":"bg-wh-sec0","#vb-page-body":"col-pri-1","#channel-tabbar, #channel-subtabbar, #footer-subtabbar, #footer-tabbar":"bg-pri-1","#channel-tabbar ul, #channel-subtabbar ul, #footer-subtabbar ul, #footer-tabbar ul.nav-list":"bg-pri-1","#channel-tabbar ul li, #channel-subtabbar ul li, #footer-subtabbar ul li, #footer-tabbar ul.nav-list li":"bg-pri-2","#channel-tabbar ul li a, #channel-subtabbar ul li a, #footer-subtabbar ul li a,  #footer-tabbar ul.nav-list li a":"col-pri-1",".canvas-widget":"bg-wy-sec0",".topic-title":"col-pri-0",".b-post-control__label":"col-pri-0",".widget-content, .post-content":"col-pri-0",".list-item":"bg-wy-sec0"};var C={"#vb-page-body":"bg-gy-pri0","#wrapper":"bg-gy-sec0","#header":"bg-gy-pri0","#channel-tabbar, #channel-subtabbar, #footer-subtabbar, #footer-tabbar":"bg-gy-pri0","#channel-tabbar ul, #channel-subtabbar ul, #footer-subtabbar ul, #footer-tabbar ul.nav-list":"bg-pri-0","#channel-tabbar ul li, #channel-subtabbar ul li, #footer-subtabbar ul li, #footer-tabbar ul.nav-list li":"bg-pri-0",".canvas-widget":"bg-gy-sec0","#subforumdescription":"bg-gy-pri0",".topic-title":"col-pri-3",".b-post-control__label":"col-pri-3",".widget-content, .post-content":"col-pri-0",".list-item":"bg-gy-sec0"};var H={"#vb-page-body":"bg-dk-pri0","#wrapper":"bg-dk-pri0","#header":"bg-dk-pri0","#channel-tabbar, #channel-subtabbar, #footer-subtabbar, #footer-tabbar":"bg-dk-pri0","#channel-tabbar ul, #channel-subtabbar ul, #footer-subtabbar ul, #footer-tabbar ul.nav-list":"bg-pri-0","#channel-tabbar ul li, #channel-subtabbar ul li, #footer-subtabbar ul li, #footer-tabbar ul.nav-list li":"bg-pri-0",".canvas-widget":"bg-pri-0","#subforumdescription":"bg-dk-pri0",".topic-title":"col-pri-3",".b-post-control__label":"col-pri-3",".widget-content, .post-content":"col-dk-sec0",".list-item":"bg-dk-sec0"};switch(B){case"light-ps":A(E);break;case"light-pt":A(D);break;case"grey":A(C);break;case"dark":A(H);break;default:A(E);A(D);A(C);A(H)}switch(G){case"light-pt":F(D);break;break;case"grey":F(C);break;case"dark":F(H);break;case"default":break;case"light-ps":default:F(E)}}var LastRefresh=0,RefreshTimerID;function colorize(){var A=new Date().valueOf();var B=A-LastRefresh;if(B<defs.MaxRedrawRate){if(!RefreshTimerID){RefreshTimerID=setTimeout(doColorize,defs.MaxRedrawRate-B)}}else{doColorize()}}function doColorize(){if(RefreshTimerID){clearTimeout(RefreshTimerID)}RefreshTimerID=null;LastRefresh=new Date().valueOf();var F,E,G,A;$(".bg-pri").css("background-color",Palette.Primary.Base.RGB.getCSS());for(var D=0;D<5;D++){G=Palette.Primary.Col[D];if(Palette.Sec1){A=Palette.Sec1.Col[D]}else{A=Palette.Primary.Col[3]}F=G.RGB;E=A.RGB;if(defs.CBPreview){F="#"+ColorBlind.getHex(F.R,F.G,F.B,defs.CBPreview);E="#"+ColorBlind.getHex(E.R,E.G,E.B,defs.CBPreview)}else{F=F.getCSS();E=E.getCSS()}var C=parseInt($.browser.version,10);if($.browser.msie&&C==7){$("#cbox-bg-pri-"+D).attr("title",rgb2hex(F));$("#cbox-bg-sec1-"+D).attr("title",rgb2hex(E))}$(".col-pri-"+D).css("color",F);$(".col-sec1-"+D).css("color",E);$(".bg-pri-"+D).css("background-color",F).each(function(){this.paletteInfo={col:G,out:F}});$(".bg-sec1-"+D).css("background-color",E).each(function(){this.paletteInfo={col:A,out:E}});$("#currentcolor").css("background-color",$(".var-set .sel img").css("background-color"));$(".brd-pri-"+D).css("border-color",F);$(".brd-sec1-"+D).css("border-color",E)}SchemeID=Palette.serialize();var B=SchemeID;if(B.length>64){B="ID too long to display"}$("#schemeid a").html(B).attr("href",document.location.pathname+"#"+SchemeID);if(!drag.on){updateColorData()}}function updateColorData(){History.add();var A=parseInt($.browser.version,10);if($.browser.msie&&A==7){return }}var History={List:[],Ptr:-1,add:function(){setOriginalColor();if(this.Ptr<0||this.List[this.Ptr]!=SchemeID){if(this.List.length>this.Ptr+1){this.List=this.List.splice(0,this.Ptr+1)}this.List.push(SchemeID);this.Ptr++;this.updateMenu()}},back:function(){if(this.Ptr<1){return }this.Ptr--;loadScheme(this.List[this.Ptr]);this.updateMenu()},fwd:function(){if(this.Ptr>=this.List.length-1){return }this.Ptr++;loadScheme(this.List[this.Ptr]);this.updateMenu()},updateMenu:function(){if(this.Ptr>0){$("#menu-undo").removeClass("h-disabled")}else{$("#menu-undo").addClass("h-disabled")}if(this.Ptr<this.List.length-1){$("#menu-redo").removeClass("h-disabled")}else{$("#menu-redo").addClass("h-disabled")}}};var moveTimer=0;function dragMove(B,C){var A=new Date();if(A-moveTimer<defs.FPSlimiter){return false}moveTimer=A;if(C.id=="wheel"){moveOnWheel(B)}else{moveOnSlider(B,C)}}function moveOnWheel(E){var A,H,C,D,G=false,F=false;if(E){A=E.pageX-drag.dX;H=E.pageY-drag.dY;C=Math.round(((Math.atan2(-A,H)*180/Math.PI)+180)%360);D=Math.sqrt(A*A+H*H)}else{G=true,F=true}if(D>60&&D<160){var B="dot1";if(drag.dot){B=drag.dot.id}if(B=="dot1"||B=="dot2"){if(D>125){if(D<135){C=(Math.floor((C-7.5)/15+1)*15)%360}else{C=(Math.floor((C-15)/30+1)*30)%360}}if(B=="dot2"){C=(C+180)%360}G=Palette.setHue(C)}else{if(Palette.Scheme=="m1"&&B=="dot4"){C=(C+180)%360}F=Palette.setDist(C)}}if(G||F){updateWheel()}}function moveOnSlider(F,H){var B=F.pageX-drag.dX;var G=F.pageY-drag.dY;B=B/defs.sliderWidth;G=G/defs.sliderWidth;if(B<-0.5){B=-0.5}if(B>0.5){B=0.5}if(G<-0.5){G=-0.5}if(G>0.5){G=0.5}if(H.id=="saturation"){var E,C;if(UseManualVars){E=B+0.5;C=-G+0.5;Palette.setVarOverlay(VarSelected[0],VarSelected[1],E,C)}else{E=B>0.4?(B-0.4)/0.1:(B+0.5)/0.9-1;G=-G;C=G>0.4?(G-0.4)/0.1:(G+0.5)/0.9-1;Palette.setSV(E,C)}updateSV()}else{if(H.id=="contrast"){var A=B+0.5;var D=0.5-G;Palette.setContrast(D,A);updateContrast()}}}function moveDot(D,A){if(!A){return }var B=A.Col[0].HSV.H;var C=(B-90)/360*2*Math.PI;x=Math.round(defs.wheelMid.X+109*Math.cos(C))-defs.dotSize;y=Math.round(defs.wheelMid.Y+109*Math.sin(C))-defs.dotSize;$("#dot"+D).css("left",x+"px").css("top",y+"px")}function moveSliderDot(B,A,C){A=defs.sliderMid.X+A*defs.sliderWidth-defs.dotSize+1;C=defs.sliderMid.Y+C*defs.sliderWidth-defs.dotSize+3;$(B).css("left",A+"px").css("top",C+"px")}function myPrompt(B,A,C){vBulletin.openPromptDialog({message:B,initialValue:A,validation:{callback:vBulletin.openPromptDialog.validationString,showError:true},onClickOK:C})}function getExpr(s){if(!s){return""}s=String(s);if(s.match(/[0-9\.\+\-\*/ ]+/)){s=eval(s)}return s}function enterHue(){myPrompt(vBulletin.phrase.get("enter_hue")+" (0&deg;-360&deg;)",Palette.H,enterHue2)}function enterHue2(A){A=parseInt(getExpr(A),10)%360;if(A>=0&&A<=360){Palette.setHue(A%360);updateWheel()}}function enterComplHue(){myPrompt(vBulletin.phrase.get("enter_complement_hue")+" (0&deg;&ndash;360&deg;)",(Palette.H+180)%360,enterComplHue2)}function enterComplHue2(A){A=parseInt(getExpr(A),10)%360;if(A>=0&&A<=360){Palette.setHue((A+180)%360);updateWheel()}}function enterDist(){var B=Palette.SchemeModel.minD,A=Palette.SchemeModel.maxD;myPrompt(vBulletin.phrase.get("enter_distance_angle")+" ("+B+"&deg;&ndash;"+A+"&deg;)",Palette.Dist,enterDist2)}function enterDist2(B){var C=Palette.SchemeModel.minD,A=Palette.SchemeModel.maxD;B=Math.abs(parseInt(getExpr(B),10));if(B>=C&&B<=A){Palette.setDistNum(B);updateWheel()}}function enterRGB(){myPrompt(vBulletin.phrase.get("enter_hex_value")+" (000000&ndash;FFFFFF)",Palette.Primary.getVarRGB(0).getHex(),enterRGB2)}function enterRGB2(D){if(!D){return""}D=String(D);if(D.match(/^\s*#?([0-9a-f]{6}|[0-9a-f]{3})\s*$/i)){if(D.length==3){D="#"+D}if(D.length==4){D=D.substr(1,1)+D.substr(1,1)+D.substr(2,1)+D.substr(2,1)+D.substr(3,1)+D.substr(3,1)}if(D.length==6){D="#"+D}D=D.substr(1,6);var F=hex2dec(D.substring(0,2));var E=hex2dec(D.substring(2,4));var A=hex2dec(D.substring(4,6));var C=new RGB(F,E,A);var B=ColorWheel.getColorByRGB(C);Palette.setHSV(B);updateWheel()}}function showTooltips(){$("#menu-tooltips").addClass("sel").html(vBulletin.phrase.get("hide_tooltips"))}function hideTooltips(){$("#menu-tooltips").removeClass("sel").html(vBulletin.phrase.get("show_tooltips"))}function populatePaletteText(B){var G=$("#debug-information").length==1;switch(B){case"light-ps":var E=palInfoColorPri;var F=palInfoColorSec;break;case"light-pt":var E=palInfoWhitePri;var F=palInfoWhiteSec;break;default:var E=palInfoDarkPri;var F=palInfoDarkSec}for(var D=0;D<5;D++){$("#pal-pri-"+D).parent().css("display",E[D]==""?"none":"");$("#pal-sec1-"+D).parent().css("display",F[D]==""?"none":"");var C=parseInt($.browser.version,10);if($.browser.msie&&C==7){var A=$("#cbox-bg-pri-"+D).css("background-color");var H=rgb2hex(A);$("#cbox-bg-pri-"+D).attr("title",H);$("#cbox-bg-sec1-"+D).attr("title",H)}$("#info-pri-"+D).html(vBulletin.phrase.get(E[D])+(G?" (Primary "+D+")":""));$("#info-sec1-"+D).html(vBulletin.phrase.get(F[D])+(G?" (Secondary "+D+")":""))}}function rgb2hex(A){A=A.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);if(!A){return""}return"#"+hex(A[1])+hex(A[2])+hex(A[3])}function hex(A){hexDigits=new Array("0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F");return isNaN(A)?"00":hexDigits[(A-A%16)/16]+hexDigits[A%16]}function setOriginalColor(){$("#originalcolor").css("background-color",$("#manualvars a.sel img").css("background-color"))}function check_save_valid(){var B=document.getElementById("form-name");if(B===null){openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("err_order_need_name"),iconType:"warning"});return false}B.value=$.trim(B.value);if(B.value==""){openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("err_order_need_name"),iconType:"warning",onAfterClose:function(){B.focus()}});return false}if(B.value.length>128||B.value.indexOf("'")!==-1||B.value.indexOf('"')!==-1){openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("err_invalid_name"),iconType:"warning",onAfterClose:function(){B.focus()}});return false}var A=document.getElementById("form-displayorder");if(A===null){openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("err_order_need_order"),iconType:"warning"});return false}if(isNaN(parseInt(A.value))){openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("err_order_need_order"),iconType:"warning",onAfterClose:function(){A.focus()}});return false}if(parseInt(A.value)<=0){openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("err_order_negative"),iconType:"warning",onAfterClose:function(){A.focus()}});return false}if(parseInt(A.value)>=1000){openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("err_order_too_large"),iconType:"warning",onAfterClose:function(){A.focus()}});return false}return true}var palInfoColorPri=["primary0_info","primary1_info","primary2_info","primary3_info","primary4_info"];var palInfoColorSec=["secondary0_info","secondary1_info","secondary2_info","","secondary4_info"];var palInfoWhitePri=["primary0_info","primary1_info","primary2_info","",""];var palInfoWhiteSec=["","","","",""];var palInfoDarkPri=["primary0_info","","","primary3_info",""];var palInfoDarkSec=["","","","",""];;

// ***************************
// js.compressed/vbulletin_stylegeneratorcolor.js
// ***************************
function HSV(C,B,A){this.set=function(F,E,D){this.H=F;this.S=E;this.V=D};this.copy=function(){return new HSV(this.H,this.S,this.V)};this.set(C,B,A)}function RGB(C,A,D){this.set=function(F,E,H){this.R=Math.round(F);this.G=Math.round(E);this.B=Math.round(H)};this.copy=function(){return new RGB(this.R,this.G,this.B)};this.toWebCol=function(){this.R=Math.round(this.R/51)*51;this.G=Math.round(this.G/51)*51;this.B=Math.round(this.B/51)*51};this.getCSS=function(){return"rgb("+this.R+","+this.G+","+this.B+")"};this.getHex=function(){return dec2hex(this.R)+dec2hex(this.G)+dec2hex(this.B)};this.set(C,A,D)}var Primary={R:{RGB:new RGB(255,0,0),HSV:new HSV(0,1,1)},RG:{RGB:new RGB(255,255,0),HSV:new HSV(120,1,1)},G:{RGB:new RGB(0,255,0),HSV:new HSV(180,1,0.8)},GB:{RGB:new RGB(0,255,255),HSV:new HSV(210,1,0.6)},B:{RGB:new RGB(0,0,255),HSV:new HSV(255,0.85,0.7)},BR:{RGB:new RGB(255,0,255),HSV:new HSV(315,1,0.65)}};function gInc(B,A,C){return(C==-1)?B:B+(A-B)/(1+C)}function gDec(B,A,C){return(C==-1)?A:A+(B-A)/(1+C)}var ColorWheel={getArc:function(A){if(A<120){return this.RRG}if(A<180){return this.RGG}if(A<210){return this.GGB}if(A<255){return this.GBB}if(A<315){return this.BBR}return this.BRR},RRG:{a:Primary.R,b:Primary.RG,f:function(A){if(A==0){return -1}return Math.tan((120-A)/120*Math.PI/2)*0.5},fi:function(A){if(A==-1){return 0}return 120-Math.atan(A/0.5)*120/Math.PI*2},g:gInc,orderRGB:function(A,B,C){return new RGB(A,B,C)}},RGG:{a:Primary.RG,b:Primary.G,f:function(A){if(A==180){return -1}return Math.tan((A-120)/60*Math.PI/2)*0.5},fi:function(A){if(A==-1){return 180}return 120+Math.atan(A/0.5)*60/Math.PI*2},g:gDec,orderRGB:function(A,B,C){return new RGB(B,A,C)}},GGB:{a:Primary.G,b:Primary.GB,f:function(A){if(A==180){return -1}return Math.tan((210-A)/30*Math.PI/2)*0.75},fi:function(A){if(A==-1){return 180}return 210-Math.atan(A/0.75)*30/Math.PI*2},g:gInc,orderRGB:function(A,B,C){return new RGB(C,A,B)}},GBB:{a:Primary.GB,b:Primary.B,f:function(A){if(A==255){return -1}return Math.tan((A-210)/45*Math.PI/2)*1.33},fi:function(A){if(A==-1){return 255}return 210+Math.atan(A/1.33)*45/Math.PI*2},g:gDec,orderRGB:function(A,B,C){return new RGB(C,B,A)}},BBR:{a:Primary.B,b:Primary.BR,f:function(A){if(A==255){return -1}return Math.tan((315-A)/60*Math.PI/2)*1.33},fi:function(A){if(A==-1){return 255}return 315-Math.atan(A/1.33)*60/Math.PI*2},g:gInc,orderRGB:function(A,B,C){return new RGB(B,C,A)}},BRR:{a:Primary.BR,b:Primary.R,f:function(A){if(A==0){return -1}return Math.tan((A-315)/45*Math.PI/2)*1.33},fi:function(A){if(A==-1){return 0}return 315+Math.atan(A/1.33)*45/Math.PI*2},g:gDec,orderRGB:function(A,B,C){return new RGB(A,C,B)}},getBaseColorByHue:function(E){E=E%360;var D,A,C=this.getArc(E);var B=C.f(E);A=C.g(C.a.HSV.V,C.b.HSV.V,B);D=C.g(C.a.HSV.S,C.b.HSV.S,B);return{HSV:new HSV(E,D,A),RGB:this._getRGB(E,D,A,C,B)}},getRGB:function(E,D,A){var C=this.getArc(E);var B=C.f(E);return this._getRGB(E,D,A,C,B)},_getRGB:function(J,E,C,A,D){var G,I,F,B=A.a.RGB;G=Math.max(B.R,Math.max(B.G,B.B));G=G*C;F=G*(1-E);if(D==-1){I=F}else{I=(G+F*D)/(1+D)}return A.orderRGB(G,I,F)},getColorByRGB:function(F){var J,D,B;if(F.R==F.B&&F.R==F.G){J=0;D=0;B=getLum(F)}else{var G,I,E,A,C;G=Math.max(F.R,Math.max(F.G,F.B));E=Math.min(F.R,Math.min(F.G,F.B));if(G==F.R){if(E==F.B){I=F.G;A=this.RRG}else{I=F.B;A=this.BRR}}else{if(G==F.G){if(E==F.R){I=F.B;A=this.GGB}else{I=F.R;A=this.RGG}}else{if(E==F.R){I=F.G;A=this.GBB}else{I=F.R;A=this.BBR}}}if(I==E){C=-1}else{C=(G-I)/(I-E)}J=A.fi(C);D=(G-E)/G;B=G/255}return new HSV(J,D,B)}};var Model={m1:{getH:function(B,A){return{S1:(B+A)%360,S2:(B-A+360)%360}},minD:5,maxD:360,getD:function(B,A){var C=Math.abs(angleDiff(B,A));return C}}};function angleDiff(C,B){if(B>C){var A=B-C}else{var A=360-(C-B)}return A}var CModel={shadow:[{dS:-0.5,dV:-0.5},{dS:1,dV:-0.7}],light:[{dS:-0.5,dV:1},{dS:-0.9,dV:1}],get:function(D,B){var C,A=[];A.push({dS:this.shadow[0].dS*D,dV:this.shadow[0].dV*D});A.push({dS:this.shadow[1].dS*D,dV:this.shadow[1].dV*D});A.push({dS:this.light[0].dS*B,dV:this.light[0].dV*B});A.push({dS:this.light[1].dS*B,dV:this.light[1].dV*B});return A}};function ColorVar(D,F,B,E,G){this.getVariant=function(M,L,K){function J(N,O){return(O<=0)?N*(O+1):N+(1-N)*O}var I=new HSV(M.H,J(M.S,L),J(M.V,K));var H=ColorWheel.getRGB(I.H,I.S,I.V);return{HSV:I,RGB:H}};this.getOverlayVariant=function(L,K,H){var J=new HSV(L.H,K,H);var I=ColorWheel.getRGB(J.H,J.S,J.V);return{HSV:J,RGB:I}};this.setCol=function(J,I,H){this.Col[J]=this.getVariant(this.Col0.HSV,I,H)};this.getVarHSV=function(H){return this.Col[H].HSV};this.getVarRGB=function(H){return this.Col[H].RGB};this.H=D;this.Base=ColorWheel.getBaseColorByHue(D);this.Col0=this.getVariant(this.Base.HSV,F,B);this.Col=[];if(G[0]){this.Col.push(this.getOverlayVariant(this.Base.HSV,G[0][0],G[0][1]))}else{this.Col.push(this.Col0)}for(var C=0,A=E.length;C<A;C++){if(G[C+1]){this.Col[C+1]=this.getOverlayVariant(this.Base.HSV,G[C+1][0],G[C+1][1])}else{this.Col[C+1]=this.getVariant(this.Col0.HSV,E[C].dS,E[C].dV)}}}var Palette={Scheme:"m1",SchemeModel:Model.m1,H:0,Dist:15,dS:0,dV:0,cS:0.5,cL:0.5,ContrastModel:CModel.get(0.5,0.5),UseVarsOverlay:false,VarsOverlay:[[],[],[],[]],setScheme:function(A){this.Scheme=A;this.SchemeModel=Model[this.Scheme];this.resetVarsOverlay(false);if(this.Sec1){this.setDist(this.Sec1.H)}},setHue:function(A){if(this.H===A){return false}this.H=Math.round(A)%360;this.resetVarsOverlay(false);return true},setHSV:function(A){this.setHue(A.H);var B=this.Primary.Base.HSV;if(B.S==0){this.dS=0}else{if(A.S>B.S){this.dS=(A.S-B.S)/(1-B.S)}else{this.dS=A.S/B.S-1}}if(B.V==0){this.dV=0}else{if(A.V>B.V){this.dV=(A.V-B.V)/(1-B.V)}else{this.dV=A.V/B.V-1}}this.resetVarsOverlay(false)},setDist:function(A){this.Dist=this.SchemeModel.getD(this.H,A);this.resetVarsOverlay(false);return true},setDistNum:function(A){this.Dist=A;this.resetVarsOverlay(false);return true},setSV:function(B,A){this.dS=B;this.dV=A;this.resetVarsOverlay(false)},setContrast:function(B,A){this.UseVarsOverlay=false;this.cS=B;this.cL=A;this.ContrastModel=CModel.get(B,A);this.resetVarsOverlay(false)},resetVarsOverlay:function(A){this.UseVarsOverlay=false;this.VarsOverlay=[[],[],[],[]];if(!A){this.update()}},setVarOverlay:function(C,B,E,D,A){this.UseVarsOverlay=true;this.VarsOverlay[C][B]=[E,D];if(!A){this.update()}},getVarOverlay:function(C,B){var A=this.VarsOverlay[C][B];if(A){return A}var D=this.getColorByIdx(C).Col[B].HSV;return[D.S,D.V]},update:function(A){var B=this.SchemeModel.getH(this.H,this.Dist);if(!A){this.Primary=new ColorVar(this.H,this.dS,this.dV,this.ContrastModel,this.VarsOverlay[0]);this.Compl=B.C==undefined?null:new ColorVar(B.C,this.dS,this.dV,this.ContrastModel,this.VarsOverlay[3])}this.Sec1=B.S1==undefined?null:new ColorVar(B.S1,this.dS,this.dV,this.ContrastModel,this.VarsOverlay[1]);this.Sec2=B.S2==undefined?null:new ColorVar(B.S2,this.dS,this.dV,this.ContrastModel,this.VarsOverlay[2])},serialize:function(){var C="";C+=myB64.encodeInt(this.H,2);C+=this.Scheme.substring(1);C+=myB64.encodeInt(this.Dist+90,2);C+=myB64.encodeFloat((this.dS+1)/2,2);C+=myB64.encodeFloat((this.dV+1)/2,2);C+=myB64.encodeFloat(this.cS,2);C+=myB64.encodeFloat(this.cL,2);if(this.UseVarsOverlay){var B,A;for(B=0;B<4;B++){for(A=0;A<5;A++){if(this.VarsOverlay[B][A]){C+=myB64.encodeInt(8*B+A,1);C+=myB64.encodeFloat((this.VarsOverlay[B][A][0]+1)/2,2);C+=myB64.encodeFloat((this.VarsOverlay[B][A][1]+1)/2,2)}}}}return C},unserialize:function(H){var C,A=[];var F=0;C=H.substring(F,F+2);C=myB64.decodeInt(C);if(C>=0&&C<360){A.push(C)}else{return false}F+=2;C="m"+H.substring(F,F+1);if(Model[C]){A.push(C)}else{return false}F+=1;C=H.substring(F,F+2);C=myB64.decodeInt(C)-90;if(C>=-180&&C<=180){A.push(C)}else{return false}F+=2;C=H.substring(F,F+2);C=myB64.decodeFloat(C,2,5)*2-1;if(C>=-1&&C<=1){A.push(C)}else{return false}F+=2;C=H.substring(F,F+2);C=myB64.decodeFloat(C,2,5)*2-1;if(C>=-1&&C<=1){A.push(C)}else{return false}F+=2;C=H.substring(F,F+2);C=myB64.decodeFloat(C,2,5);if(C>=0&&C<=1){A.push(C)}else{return false}F+=2;C=H.substring(F,F+2);C=myB64.decodeFloat(C,2,5);if(C>=0&&C<=1){A.push(C)}else{return false}F+=2;this.setAll(A[1],A[0],A[2],A[3],A[4],A[5],A[6]);if(H.length>F){var E,D,G,B;while(H.length>F){C=H.substring(F,F+1);C=myB64.decodeInt(C);E=Math.floor(C/8);D=C-E*8;if(E<0||E>3||D<0||D>4){return false}F+=1;C=H.substring(F,F+2);G=myB64.decodeFloat(C,2,5)*2-1;if(G<-1||G>1){return false}F+=2;C=H.substring(F,F+2);B=myB64.decodeFloat(C,2,5)*2-1;if(B<-1||B>1){return false}F+=2;this.setVarOverlay(E,D,G,B,true);push}this.update()}},setAll:function(C,E,G,F,B,D,A){this.Scheme=C;this.SchemeModel=Model[this.Scheme];this.H=E;this.Dist=G;this.dS=F;this.dV=B;this.cS=D;this.cL=A;this.ContrastModel=CModel.get(this.cS,this.cL);this.resetVarsOverlay()},Presets:[{id:"default",name:"Default Scheme",dS:0,dV:0,cS:0.5,cL:0.5}],getPreset:function(C){for(var B=0,A=this.Presets.length;B<A;B++){if(this.Presets[B].id==C){return this.Presets[B]}}return this.Presets[0]},usePreset:function(B){this.resetVarsOverlay();var A=this.getPreset(B);this.setSV(A.dS,A.dV);this.setContrast(A.cS,A.cL)},getColorByIdx:function(B){var A=["Primary","Sec1"];if(!A[B]){B=0}return this[A[B]]}};Palette.update();function dec2hex(C,A){if(!A){A=2}var B=C.toString(16);while(B.length<A){B="0"+B}return B.toUpperCase()}function hex2dec(A){return parseInt(A,16)}function flags2dec(B){var A=0;for(var C=0;C<8;C++){if(B[C]){A|=Math.pow(2,C)}}return A}function dec2flags(C){var A=[];for(var B=0;B<8;B++){A[B]=C&Math.pow(2,B)}return A}function rgb2hex(A){return dec2hex(A.R)+dec2hex(A.G)+dec2hex(A.B)}function getLum(A){return lum=(A.R*0.299+A.G*0.587+A.B*0.114)/255}function col2Gray(B){var A=Math.round(getLum(B)*255);return rgb2hex({R:A,G:A,B:A})}var myB64={_key:"0123456789abcdefghijklmnopqrstuvwxyz.ABCDEFGHIJKLMNOPQRSTUVWXYZ-",_pad:"0000000000000000",encodeInt:function(E,B){var D="",C,A=E;if(!E){D="0"}while(A){C=A&63;D=this._key.charAt(C)+D;A>>=6}if(B){D=this._pad+D;D=D.substring(D.length-B)}return D},decodeInt:function(D){var B,C,E=0;if(!D){return 0}for(var C=0,A=D.length;C<A;C++){E<<=6;B=this._key.indexOf(D.charAt(C));E|=B}return E},encodeFloat:function(B,A){if(!A){A=1}var C=Math.round((Math.pow(64,A)-1)*B);return this.encodeInt(C,A)},decodeFloat:function(D,B,F){var E=this.decodeInt(D);if(!E){return 0}var A=E/(Math.pow(64,B)-1);if(F){var C=Math.pow(10,F);A=Math.round(A*C)/C}return A}};var ColorBlind={getHex:function(A,G,N,L){function E(T,Q,S,R){return Math.round(T-Math.abs((S-R)/51)*(T-Q))}var D=Math.round(A/51)*51;var B=Math.round(G/51)*51;var O=Math.round(N/51)*51;var C=(D<A)?D+51:((D>A)?D-51:D);var P=(B<G)?B+51:((B>G)?B-51:B);var M=(O<N)?O+51:((O>N)?O-51:O);var I=this.colTbl[dec2hex(D)+dec2hex(B)+dec2hex(O)][L];var H=this.colTbl[dec2hex(C)+dec2hex(P)+dec2hex(M)][L];var F=E(hex2dec(I.substring(0,2)),hex2dec(H.substring(0,2)),D,A);var K=E(hex2dec(I.substring(2,4)),hex2dec(H.substring(2,4)),B,G);var J=E(hex2dec(I.substring(4,6)),hex2dec(H.substring(4,6)),O,N);return dec2hex(F)+dec2hex(K)+dec2hex(J)},typeDesc:["Normal vision (85.5 % of population)","Protanopy (1 % of men, 0.02 % of women)","Deuteranopy (1 % of men, 0.1 % of women)","Tritanopy (0.003 % of population)","Protanomaly (1 % of men, 0.01% of women)","Deuteranomaly (5 % of men, 0.4 % of women)","Tritanomaly (0.01 % of population)","Full colorblindness (0.005 % of population)","Atypical monochromatism (0.005 % of population)"],colTbl:{FFFFFF:["FFFFFF","FFFAFA","FFE8EF","F4F0FF","FFFCFC","FFF3F7","F9F7FF","FFFFFF","FFFFFF"],FFFFCC:["FFFFCC","FFF2C8","FFDFC8","FDEFFF","FFF8CA","FFEFCA","FEF7E5","EEEEEE","F1F1E7"],FFFF99:["FFFF99","FFEDA2","FFDAAD","FFEAF9","FFF69D","FFECA3","FFF4C9","DDDDDD","E3E3CF"],FFFF66:["FFFF66","FFEA86","FFD79D","FFE6F5","FFF476","FFEB81","FFF2AD","CCCCCC","D6D6B7"],FFFF33:["FFFF33","FFE975","FFD594","FFE5F3","FFF454","FFEA63","FFF293","BBBBBB","C8C89F"],FFFF00:["FFFF00","FFE871","FFD592","FFE4F2","FFF338","FFEA49","FFF179","AAAAAA","BBBB88"],FFCCFF:["FFCCFF","CFD7FF","E1D8FD","FBD1E1","E7D1FF","F0D2FE","FDCEF0","EEEEEE","F1E7F1"],FFCCCC:["FFCCCC","DED8D2","F1D2CB","FFCAD8","EED2CF","F8CFCB","FFCBD2","DDDDDD","E3D9D9"],FFCC99:["FFCC99","E5D69D","FCCD99","FFC4D1","F2D19B","FDCC99","FFC8B5","CCCCCC","D6CCC1"],FFCC66:["FFCC66","E9D469","FFCA6F","FFC0CD","F4D067","FFCB6A","FFC699","BBBBBB","C8BEAA"],FFCC33:["FFCC33","ECD435","FFC857","FFBFCA","F5D034","FFCA45","FFC57E","AAAAAA","BBB092"],FFCC00:["FFCC00","ECD30F","FFC750","FFBECA","F5CF07","FFC928","FFC565","999999","ADA37A"],FF99FF:["FF99FF","AABDFF","B0BCF9","F6A9B5","D4ABFF","D7AAFC","FAA1DA","DDDDDD","E3CFE3"],FF99CC:["FF99CC","B1B8E0","C5B5C7","FC9FAA","D8A8D6","E2A7C9","FD9CBB","CCCCCC","D6C1CC"],FF9999:["FF9999","BDB6A8","D2B095","FF99A2","DEA7A0","E8A497","FF999D","BBBBBB","C8B4B4"],FF9966:["FF9966","C4B470","DAAC62","FF959E","E1A66B","ECA264","FF9782","AAAAAA","BBA69C"],FF9933:["FF9933","C7B43A","DEAB2A","FF949D","E3A636","EEA22E","FF9668","999999","AD9984"],FF9900:["FF9900","C8B317","DFAA00","FF949C","E3A60B","EFA100","FF964E","888888","9F8B6C"],FF66FF:["FF66FF","98B2FF","85A7F5","F28791","CB8CFF","C286FA","F876C8","CCCCCC","D6B7D6"],FF66CC:["FF66CC","82A0F6","A09FC3","F87981","C083E1","CF82C7","FB6FA6","BBBBBB","C8AABE"],FF6699:["FF6699","999DB9","B19992","FD6E74","CC81A9","D87F95","FE6A86","AAAAAA","BB9CA6"],FF6666:["FF6666","A59B7C","BB955E","FF666C","D28071","DD7D62","FF6669","999999","AD8E8E"],FF6633:["FF6633","AA9A42","BF9322","FF656A","D4803A","DF7C2A","FF654E","888888","9F8177"],FF6600:["FF6600","AC9A1E","C09300","FF6569","D5800F","DF7C00","FF6534","777777","92735F"],FF33FF:["FF33FF","96B1FF","679BF2","F07178","CA72FF","B367F8","F752BB","BBBBBB","C89FC8"],FF33CC:["FF33CC","779DFF","8A92C1","F75E63","BB68E5","C462C6","FB4897","AAAAAA","BB92B0"],FF3399:["FF3399","7A8ECE","9D8B8F","FB4C4F","BC60B3","CE5F94","FD3F74","999999","AD8499"],FF3366:["FF3366","8F8C8B","A7875C","FE3D3E","C75F78","D35D61","FE3852","888888","9F7781"],FF3333:["FF3333","988B4A","AD841C","FF3332","CB5F3E","D65B27","FF3332","777777","926969"],FF3300:["FF3300","9A8B23","AE8600","FF3331","CC5F11","D65C00","FF3318","666666","845B51"],FF00FF:["FF00FF","96B1FF","5E98F1","F06A71","CA58FF","AE4CF8","F735B8","AAAAAA","BB88BB"],FF00CC:["FF00CC","7BA0FF","838FC0","F6555A","BD50E5","C147C6","FA2A93","999999","AD7AA3"],FF0099:["FF0099","6E89D7","97888E","FA4042","B644B8","CB4493","FC206D","888888","9F6C8B"],FF0066:["FF0066","888892","A2835B","FD2B28","C3447C","D04160","FE1547","777777","925F73"],FF0033:["FF0033","93874E","A8801A","FE1A00","C94340","D34026","FE0D19","666666","84515B"],FF0000:["FF0000","968726","A98200","FE1C00","CA4313","D44100","FE0E00","555555","774444"],CCFFFF:["CCFFFF","F8F4F8","FFEAFD","CBEFFF","E2F9FB","E5F4FE","CBF7FF","EEEEEE","E7F1F1"],CCFFCC:["CCFFCC","FFF1C5","FFDECC","D3EFFF","E5F8C8","E5EECC","CFF7E5","DDDDDD","D9E3D9"],CCFF99:["CCFF99","FFEB97","FFD8AB","D9EEFF","E5F598","E5EBA2","D2F6CC","CCCCCC","CCD6C1"],CCFF66:["CCFF66","FFE873","FFD497","DDEEFF","E5F36C","E5E97E","D4F6B2","BBBBBB","BEC8AA"],CCFF33:["CCFF33","FFE75C","FFD38C","E0EEFF","E5F347","E5E95F","D6F699","AAAAAA","B0BB92"],CCFF00:["CCFF00","FFE655","FFD389","E0EEFF","E5F22A","E5E944","D6F67F","999999","A3AD7A"],CCCCFF:["CCCCFF","C4CEFF","CBCCFF","C6D1E1","C8CDFF","CBCCFF","C9CEF0","DDDDDD","D9D9E3"],CCCCCC:["CCCCCC","CFCBCB","DEC6CD","CECAD9","CDCBCB","D5C9CC","CDCBD2","CCCCCC","CCCCCC"],CCCC99:["CCCC99","D7C997","EAC19B","D3C4D3","D1CA98","DBC69A","CFC8B6","BBBBBB","BEBEB4"],CCCC66:["CCCC66","DBC764","F1BE6A","D7C1CF","D3C965","DEC568","D1C69A","AAAAAA","B0B09C"],CCCC33:["CCCC33","DDC631","F5BC3B","D8BFCD","D4C932","E0C437","D2C580","999999","A3A384"],CCCC00:["CCCC00","DDC600","F6C600","D9BECC","D4C900","E1C900","D2C566","888888","95956C"],CC99FF:["CC99FF","98B1FF","8FAEFB","BFA9B6","B2A5FF","ADA3FD","C5A1DA","CCCCCC","CCC1D6"],CC99CC:["CC99CC","9EA8D7","AAA7C9","C79FAB","B5A0D1","BBA0CA","C99CBB","BBBBBB","BEB4BE"],CC9999:["CC9999","AAA5A0","BAA198","CD98A2","BB9F9C","C39D98","CC989D","AAAAAA","B0A6A6"],CC9966:["CC9966","B1A46A","C49D65","D0929D","BE9E68","C89B65","CE9581","999999","A3998E"],CC9933:["CC9933","B5A336","C99B32","D2909A","C09E34","CA9A32","CF9466","888888","958B77"],CC9900:["CC9900","B5A20E","CA9A00","D38F99","C09D07","CB9900","CF944C","777777","887D5F"],CC66FF:["CC66FF","87A7FF","4C97F6","BB8791","A986FF","8C7EFA","C376C8","BBBBBB","BEAAC8"],CC66CC:["CC66CC","648CEB","7B8DC5","C37982","9879DB","A379C8","C76FA7","AAAAAA","B09CB0"],CC6699:["CC6699","7F88AF","918694","C96E75","A577A4","AE7696","CA6A87","999999","A38E99"],CC6666:["CC6666","8C8675","9E8161","CC656C","AC766D","B57363","CC6569","888888","958181"],CC6633:["CC6633","92853C","A47E2B","CE6067","AF7537","B8722F","CD634D","777777","887369"],CC6600:["CC6600","948415","A67F00","CF5F65","B0750A","B97200","CD6232","666666","7A6651"],CC33FF:["CC33FF","8AAAFF","008DEF","B87178","AB6EFF","6660F7","C252BB","AAAAAA","B092BB"],CC33CC:["CC33CC","4387FF","577EC2","C15E64","875DE5","9158C7","C64898","999999","A384A3"],CC3399:["CC3399","5275C8","767591","C64C50","8F54B0","A15495","C93F74","888888","95778B"],CC3366:["CC3366","707387","856F5F","CA3D3F","9E5376","A85162","CB3852","777777","886973"],CC3333:["CC3333","7B7146","8C6C27","CC3334","A3523C","AC4F2D","CC3333","666666","7A5B5B"],CC3300:["CC3300","7E711B","8F6D00","CC3030","A5520D","AD5000","CC3118","555555","6C4E44"],CC00FF:["CC00FF","8CABFF","008CEC","B76A71","AC55FF","6646F5","C135B8","999999","A37AAD"],CC00CC:["CC00CC","5D91FF","4B7AC0","C0555A","9448E5","8B3DC6","C62A93","888888","956C95"],CC0099:["CC0099","356FD5","6E7190","C64043","8037B7","9D3894","C9206E","777777","885F7D"],CC0066:["CC0066","646D90","7E6A5E","CA2B2B","98367B","A53562","CB1548","666666","7A5166"],CC0033:["CC0033","746C4C","856726","CB170B","A0363F","A8332C","CB0B1F","555555","6C444E"],CC0000:["CC0000","786C1E","886900","CC1600","A2360F","AA3400","CC0B00","444444","5F3636"],"99FFFF":["99FFFF","EFECF4","F4E4FF","A6EFFF","C4F5F9","C6F1FF","9FF7FF","DDDDDD","CFE3E3"],"99FFCC":["99FFCC","F7E9C1","FFDDD0","ACEFFF","C8F4C6","CCEECE","A2F7E5","CCCCCC","C1D6CC"],"99FF99":["99FF99","FBE790","FFD6A9","B0EEFF","CAF394","CCEAA1","A4F6CC","BBBBBB","B4C8B4"],"99FF66":["99FF66","FEE65E","FFD291","B4EEFF","CBF262","CCE87B","A6F6B2","AAAAAA","A6BB9C"],"99FF33":["99FF33","FFE532","FFD184","B5EDFF","CCF232","CCE85B","A7F699","999999","99AD84"],"99FF00":["99FF00","FFE41C","FFD080","B6EDFF","CCF10E","CCE740","A7F67F","888888","8B9F6C"],"99CCFF":["99CCFF","B9C5FA","B9C4FF","91D1E1","A9C8FC","A9C8FF","95CEF0","CCCCCC","C1CCD6"],"99CCCC":["99CCCC","C4C1C6","CEBDCF","9CCAD9","AEC6C9","B3C4CD","9ACBD2","BBBBBB","B4BEBE"],"99CC99":["99CC99","CBBF93","DBB89D","A3C4D3","B2C596","BAC29B","9EC8B6","AAAAAA","A6B0A6"],"99CC66":["99CC66","CFBD61","E4B56C","A8C1CF","B4C463","BEC069","A0C69A","999999","99A38E"],"99CC33":["99CC33","D1BC2F","E8B33F","AABFCD","B5C431","C0BF39","A1C580","888888","8B9577"],"99CC00":["99CC00","D2BC00","E9B22A","ABBECD","B5C400","C1BF15","A2C566","777777","7D885F"],"9999FF":["9999FF","83A4FF","6FA4FD","86A9B6","8E9EFF","849EFE","8FA1DA","BBBBBB","B4B4C8"],"9999CC":["9999CC","8F9CCE","929BCC","929FAB","949ACD","959ACC","959CBB","AAAAAA","A6A6B0"],"999999":["999999","9B9899","A6949A","9A97A3","9A9899","9F9699","99989E","999999","999999"],"999966":["999966","A29665","B29068","9F929D","9D9765","A59467","9C9581","888888","8B8B81"],"999933":["999933","A59532","B78E37","A2909A","9F9732","A89335","9D9466","777777","7D7D69"],"999900":["999900","A69500","A69500","A28F99","9F9700","9F9700","9D944C","666666","707051"],"9966FF":["9966FF","709BFF","0090F3","7E8791","8480FF","4C7BF9","8B76C8","AAAAAA","A69CBB"],"9966CC":["9966CC","497BDF","507FC7","8C7982","7170D5","7472C9","926FA7","999999","998EA3"],"996699":["996699","6A77A5","737696","946D75","816E9F","866E97","966987","888888","8B818B"],"996666":["996666","78746D","847064","9A656C","886D69","8E6B65","996569","777777","7D7373"],"996633":["996633","7E7237","8C6D31","9C6067","8B6C35","926932","9A634D","666666","70665B"],"996600":["996600","7F720D","8E6C00","9D5F66","8C6C06","936900","9B6233","555555","625844"],"9933FF":["9933FF","7DA2FF","008DE8","7A7078","8B6AFF","4C60F3","8951BB","999999","9984AD"],"9933CC":["9933CC","007AF6","0073C2","885D64","4C56E1","4C53C7","904898","888888","8B7795"],"993399":["993399","005EBF","496192","914C51","4C48AC","714A95","953F75","777777","7D697D"],"993366":["993366","505B80","625961","963D40","744773","7D4663","973853","666666","705B66"],"993333":["993333","5F5941","6C552D","993335","7C463A","824430","993334","555555","624E4E"],"993300":["993300","635913","705600","9A3032","7E4609","844400","993119","444444","554036"],"9900FF":["9900FF","83A6FF","008CE5","796A71","8E53FF","4C46F2","8935B8","888888","8B6C9F"],"9900CC":["9900CC","2782FF","0073C0","87555B","6041E5","4C39C6","902A93","777777","7D5F88"],"990099":["990099","0067D0","385B90","904044","4C33B4","682D94","94206E","666666","705170"],"990066":["990066","39538F","57535F","962B2C","69297A","782962","971549","555555","624458"],"990033":["990033","55514A","634E2C","981612","77283E","7E272F","980B22","444444","553640"],"990000":["990000","5A5117","674F00","991100","79280B","802700","990800","333333","472828"],"66FFFF":["66FFFF","EAE7F0","EBDFFF","88EFFF","A8F3F7","A8EFFF","77F7FF","CCCCCC","B7D6D6"],"66FFCC":["66FFCC","F1E4BF","FFDDD3","8BEFFF","ABF1C5","B2EECF","78F7E5","BBBBBB","AAC8BE"],"66FF99":["66FF99","F6E28D","FFD5A7","8EEEFF","AEF093","B2EAA0","7AF6CC","AAAAAA","9CBBA6"],"66FF66":["66FF66","F8E15D","FFD08B","90EEFF","AFF061","B2E778","7BF6B2","999999","8EAD8E"],"66FF33":["66FF33","FAE02A","FFCF7C","92EDFF","B0EF2E","B2E757","7CF699","888888","819F77"],"66FF00":["66FF00","FAE000","FFCE79","92EDFF","B0EF00","B2E63C","7CF67F","777777","73925F"],"66CCFF":["66CCFF","B2BEF5","ADBEFF","57D1E1","8CC5FA","89C5FF","5ECEF0","BBBBBB","AABEC8"],"66CCCC":["66CCCC","BDBBC1","C3B7D1","6BCAD9","91C3C6","94C1CE","68CBD2","AAAAAA","9CB0B0"],"66CC99":["66CC99","C4B88F","D2B29F","77C4D3","95C294","9CBF9C","6EC8B6","999999","8EA399"],"66CC66":["66CC66","C8B65E","DAAE6E","7EC1CF","97C162","A0BD6A","72C69A","888888","819581"],"66CC33":["66CC33","CAB52D","DFAC42","81BFCD","98C030","A2BC3A","73C580","777777","738869"],"66CC00":["66CC00","CAB500","E0AC2E","82BECD","98C000","A3BC17","74C566","666666","667A51"],"6699FF":["6699FF","6E98FE","519CFE","3EA9B6","6A98FE","5B9AFE","52A1DA","AAAAAA","9CA6BB"],"6699CC":["6699CC","8593C7","8093CD","5A9FAB","7596C9","7396CC","609CBB","999999","8E99A3"],"669999":["669999","918F93","978C9C","6997A3","7B9496","7E929A","67989E","888888","818B8B"],"669966":["669966","988C61","A4876A","71929D","7F9263","859068","6B9581","777777","737D73"],"669933":["669933","9B8B2F","AA853B","74909A","809231","888F37","6D9466","666666","66705B"],"669900":["669900","9B8B00","AC8421","758F9A","809200","898E10","6D944D","555555","586244"],"6666FF":["6666FF","518DFF","0090EE","228791","5B79FF","337BF6","4476C8","999999","8E8EAD"],"6666CC":["6666CC","326ED5","0076C9","4D7982","4C6AD0","336ECA","596FA7","888888","818195"],"666699":["666699","59699C","586A98","5E6D75","5F679A","5F6898","626987","777777","73737D"],"666666":["666666","686666","6F6367","67656C","676666","6A6466","666569","666666","666666"],"666633":["666633","6D6432","795F35","6B6067","696532","6F6234","68634D","555555","58584E"],"666600":["666600","6F6300","7B5E11","6C5F66","6A6400","706208","696233","444444","4A4A36"],"6633FF":["6633FF","6E9AFF","008CE4","007179","6A66FF","335FF1","3352BC","888888","81779F"],"6633CC":["6633CC","0074EA","0076C2","445D64","3353DB","3354C7","554898","777777","736988"],"663399":["663399","0059B4","005995","584C51","3346A6","334697","5F3F75","666666","665B70"],"663366":["663366","324676","3D4763","623D41","4C3C6E","513D64","643853","555555","584E58"],"663333":["663333","46433A","4F4031","663336","563B36","5A3932","663334","444444","4A4040"],"663300":["663300","4A420B","534000","673033","583A05","5C3900","663119","333333","3D3328"],"6600FF":["6600FF","7AA1FF","008BE1","006B73","7050FF","3345F0","3335B9","777777","735F92"],"6600CC":["6600CC","007CF8","0076BF","42545B","333EE2","333BC5","542A93","666666","66517A"],"660099":["660099","0065CA","005A94","563F44","3332B1","332D96","5E1F6E","555555","584462"],"660066":["660066","00478E","253D60","602B2D","33237A","451E63","631549","444444","4A364A"],"660033":["660033","323748","3F352F","651615","4C1B3D","521A31","650B24","333333","3D2833"],"660000":["660000","3C360F","453500","660B00","511B07","551A00","660500","222222","2F1B1B"],"33FFFF":["33FFFF","E7E5EF","E7DDFF","74EFFF","8DF2F7","8DEEFF","53F7FF","BBBBBB","9FC8C8"],"33FFCC":["33FFCC","EEE2BD","FCDBD4","76EFFF","90F0C4","97EDD0","54F7E5","AAAAAA","92BBB0"],"33FF99":["33FF99","F3DF8C","FFD4A6","78EEFF","93EF92","99E99F","55F6CC","999999","84AD99"],"33FF66":["33FF66","F5DE5C","FFCF88","79EEFF","94EE61","99E777","56F6B2","888888","779F81"],"33FF33":["33FF33","F7DD29","FFCD78","7AEDFF","95EE2E","99E655","56F699","777777","699269"],"33FF00":["33FF00","F7DD00","FFCD74","7AEDFF","95EE00","99E63A","56F67F","666666","5B8451"],"33CCFF":["33CCFF","AEBBF2","A7BBFF","00D1E0","70C3F8","6DC3FF","19CEEF","AAAAAA","92B0BB"],"33CCCC":["33CCCC","B9B7BF","BDB4D1","3ECAD9","76C1C5","78C0CE","38CBD2","999999","84A3A3"],"33CC99":["33CC99","C0B48E","CCAEA0","54C4D3","79C093","7FBD9C","43C8B6","888888","77958B"],"33CC66":["33CC66","C4B25D","D6AB6F","5EC1CF","7BBF61","84BB6A","48C69A","777777","698873"],"33CC33":["33CC33","C6B22C","DAA943","63BFCD","7CBF2F","86BA3B","4BC580","666666","5B7A5B"],"33CC00":["33CC00","C6B100","DBA830","64BFD7","7CBE00","87BA18","4BC56B","555555","4E6C44"],"3399FF":["3399FF","6993FA","3999FF","00ABB7","4E96FC","3699FF","19A2DB","999999","8499AD"],"3399CC":["3399CC","7F8EC3","758FCE","00A0AC","5993C7","5494CD","199CBC","888888","778B95"],"339999":["339999","8C8A90","8F879D","3997A3","5F9194","61909B","36989E","777777","697D7D"],"339966":["339966","92875E","9D826B","49929D","629062","688D68","3E9581","666666","5B7066"],"339933":["339933","95862E","A4803C","4F909A","648F30","6B8C37","419466","555555","4E624E"],"339900":["339900","958600","A58600","518F9A","648F00","6C8F00","42944D","444444","405536"],"3366FF":["3366FF","2581FF","0090EC","009099","2C73FF","197BF5","197BCC","888888","77819F"],"3366CC":["3366CC","2067CD","0078C9","007F87","2966CC","196FCA","1972A9","777777","697388"],"336699":["336699","506195","43639A","146D76","416397","3B6499","236987","666666","5B6670"],"336666":["336666","5E5D61","615B68","35656D","486163","4A6067","346569","555555","4E5858"],"336633":["336633","645B2F","6D5737","3F6068","4B6031","505E35","39634D","444444","404A40"],"336600":["336600","655B00","705617","415F66","4C6000","515E0B","3A6233","333333","333D28"],"3333FF":["3333FF","6094FF","008CE2","008187","4963FF","195FF0","195AC3","777777","696992"],"3333CC":["3333CC","0070E1","0078C2","006A70","1951D6","1955C7","194E9E","666666","5B5B7A"],"333399":["333399","0054AA","005D99","005056","1943A1","194899","194177","555555","4E4E62"],"333366":["333366","19376A","003B65","263C41","263568","193765","2C3753","444444","40404A"],"333333":["333333","343333","373133","333236","333333","353233","333234","333333","333333"],"333300":["333300","373200","3D2F09","363033","353200","383104","343119","222222","25251B"],"3300FF":["3300FF","739DFF","008BDF","007C82","534EFF","1945EF","193EC0","666666","5B5184"],"3300CC":["3300CC","0079F2","0076BF","006469","193CDF","193BC5","19329A","555555","4E446C"],"330099":["330099","0062C4","005D96","00474B","1931AE","192E97","192372","444444","403655"],"330066":["330066","00468B","003F67","212A2D","192378","191F66","2A1549","333333","33283D"],"330033":["330033","002448","131E30","301517","19123D","230F31","310A25","222222","251B25"],"330000":["330000","1E1B08","221A00","330600","280D04","2A0D00","330300","111111","170D0D"],"00FFFF":["00FFFF","E6E4EE","E6DCFF","6EEFFF","73F1F6","73EDFF","37F7FF","AAAAAA","88BBBB"],"00FFCC":["00FFCC","EDE1BD","FBDAD4","70EFFF","76F0C4","7DECD0","38F7E5","999999","7AADA3"],"00FF99":["00FF99","F2DF8C","FFD3A6","72EEFF","79EF92","7FE99F","39F6CC","888888","6C9F8B"],"00FF66":["00FF66","F5DD5C","FFCF87","73EEFF","7AEE61","7FE776","39F6B2","777777","5F9273"],"00FF33":["00FF33","F6DD29","FFCD77","73EDFF","7BEE2E","7FE655","39F699","666666","51845B"],"00FF00":["00FF00","F6DC00","FFCD72","73EDFF","7BED00","7FE639","39F67F","555555","447744"],"00CCFF":["00CCFF","ADBAF2","A5BBFF","00D0DF","56C3F8","52C3FF","00CEEF","999999","7AA3AD"],"00CCCC":["00CCCC","B8B6BF","BBB3D1","29CAD9","5CC1C5","5DBFCE","14CBD2","888888","6C9595"],"00CC99":["00CC99","BFB38D","CBAEA0","47C4D3","5FBF93","65BD9C","23C8B6","777777","5F887D"],"00CC66":["00CC66","C3B25D","D4AA6F","54C1CF","61BF61","6ABB6A","2AC69A","666666","517A66"],"00CC33":["00CC33","C5B12B","D9A844","59BFCD","62BE2F","6CBA3B","2CC580","555555","446C4E"],"00CC00":["00CC00","C5B000","DAA831","5ABFCD","62BE00","6DBA18","2DC566","444444","365F36"],"0099FF":["0099FF","6792F8","3398FF","00ACB7","3395FB","1998FF","00A2DB","888888","6C8B9F"],"0099CC":["0099CC","7E8DC2","728ECF","00A1AC","3F93C7","3993CD","009DBC","777777","5F7D88"],"009999":["009999","8A898F","8D869D","1F97A3","459194","468F9B","0F989E","666666","517070"],"009966":["009966","90865E","9B816C","39929D","488F62","4D8D69","1C9581","555555","446258"],"009933":["009933","93852D","A27E3D","42909A","498F30","518B38","219466","444444","365540"],"009900":["009900","948500","A37E25","448F9A","4A8F00","518B12","22944D","333333","284728"],"0066FF":["0066FF","007EFE","0090EC","00929A","0072FE","007BF5","007CCC","777777","5F7392"],"0066CC":["0066CC","1A66CC","0078C9","00828A","0D66CC","006FCA","0074AB","666666","51667A"],"006699":["006699","4E5F93","3D629A","00727A","276296","1E6499","006C89","555555","445862"],"006666":["006666","5C5B5F","5E5A69","15656D","2E6062","2F6067","0A6569","444444","364A4A"],"006633":["006633","61592E","6A5538","2A6068","305F30","355D35","15634D","333333","283D33"],"006600":["006600","635800","6D5418","2D5F66","315F00","365D0C","166233","222222","1B2F1B"],"0033FF":["0033FF","5B91FF","008CE2","008389","2D62FF","005FF0","005BC4","666666","515B84"],"0033CC":["0033CC","006FDE","0078C2","006F74","0051D5","0055C7","0051A0","555555","444E6C"],"003399":["003399","0053A6","005E9A","00595E","00439F","004899","00467B","444444","364055"],"003366":["003366","0D3366","003E68","004347","063366","003867","003B56","333333","28333D"],"003333":["003333","2E2E30","2F2D34","0A3236","173031","173033","053234","222222","1B2525"],"003300":["003300","312C00","362A0C","173033","182F00","1B2E06","0B3119","111111","0D170D"],"0000FF":["0000FF","719CFF","008BDF","007F85","384EFF","0045EF","003FC2","555555","444477"],"0000CC":["0000CC","0078F0","0076BE","006A6E","003CDE","003BC5","00359D","444444","36365F"],"000099":["000099","0060C1","005E97","005155","0030AD","002F98","002877","333333","282847"],"000066":["000066","004487","004168","003739","002276","002067","001B4F","222222","1B1B2F"],"000033":["000033","002346","002135","001C1D","00113C","001034","000E28","111111","0D0D17"],"000000":["000000","000000","000000","000000","000000","000000","000000","000000","000000"]}};;

// ***************************
// js.compressed/jquery/datatables/js/jquery.dataTables.min.js
// ***************************
/*
 * File:        jquery.dataTables.min.js
 * Version:     1.9.1
 * Author:      Allan Jardine (www.sprymedia.co.uk)
 * Info:        www.datatables.net
 * 
 * Copyright 2008-2012 Allan Jardine, all rights reserved.
 *
 * This source file is free software, under either the GPL v2 license or a
 * BSD style license, available at:
 *   http://datatables.net/license_gpl2
 *   http://datatables.net/license_bsd
 * 
 * This source file is distributed in the hope that it will be useful, but 
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
 * or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
 */
(function(h,V,l,m){var j=function(e){function o(a,b){var c=j.defaults.columns,d=a.aoColumns.length,c=h.extend({},j.models.oColumn,c,{sSortingClass:a.oClasses.sSortable,sSortingClassJUI:a.oClasses.sSortJUI,nTh:b?b:l.createElement("th"),sTitle:c.sTitle?c.sTitle:b?b.innerHTML:"",aDataSort:c.aDataSort?c.aDataSort:[d],mDataProp:c.mDataProp?c.oDefaults:d});a.aoColumns.push(c);if(a.aoPreSearchCols[d]===m||null===a.aoPreSearchCols[d])a.aoPreSearchCols[d]=h.extend({},j.models.oSearch);else{c=a.aoPreSearchCols[d];
if(c.bRegex===m)c.bRegex=!0;if(c.bSmart===m)c.bSmart=!0;if(c.bCaseInsensitive===m)c.bCaseInsensitive=!0}s(a,d,null)}function s(a,b,c){b=a.aoColumns[b];if(c!==m&&null!==c){if(c.sType!==m)b.sType=c.sType,b._bAutoType=!1;h.extend(b,c);p(b,c,"sWidth","sWidthOrig");if(c.iDataSort!==m)b.aDataSort=[c.iDataSort];p(b,c,"aDataSort")}b.fnGetData=W(b.mDataProp);b.fnSetData=ta(b.mDataProp);if(!a.oFeatures.bSort)b.bSortable=!1;if(!b.bSortable||-1==h.inArray("asc",b.asSorting)&&-1==h.inArray("desc",b.asSorting))b.sSortingClass=
a.oClasses.sSortableNone,b.sSortingClassJUI="";else if(b.bSortable||-1==h.inArray("asc",b.asSorting)&&-1==h.inArray("desc",b.asSorting))b.sSortingClass=a.oClasses.sSortable,b.sSortingClassJUI=a.oClasses.sSortJUI;else if(-1!=h.inArray("asc",b.asSorting)&&-1==h.inArray("desc",b.asSorting))b.sSortingClass=a.oClasses.sSortableAsc,b.sSortingClassJUI=a.oClasses.sSortJUIAscAllowed;else if(-1==h.inArray("asc",b.asSorting)&&-1!=h.inArray("desc",b.asSorting))b.sSortingClass=a.oClasses.sSortableDesc,b.sSortingClassJUI=
a.oClasses.sSortJUIDescAllowed}function k(a){if(!1===a.oFeatures.bAutoWidth)return!1;ba(a);for(var b=0,c=a.aoColumns.length;b<c;b++)a.aoColumns[b].nTh.style.width=a.aoColumns[b].sWidth}function x(a,b){for(var c=-1,d=0;d<a.aoColumns.length;d++)if(!0===a.aoColumns[d].bVisible&&c++,c==b)return d;return null}function r(a,b){for(var c=-1,d=0;d<a.aoColumns.length;d++)if(!0===a.aoColumns[d].bVisible&&c++,d==b)return!0===a.aoColumns[d].bVisible?c:null;return null}function v(a){for(var b=0,c=0;c<a.aoColumns.length;c++)!0===
a.aoColumns[c].bVisible&&b++;return b}function A(a){for(var b=j.ext.aTypes,c=b.length,d=0;d<c;d++){var f=b[d](a);if(null!==f)return f}return"string"}function E(a,b){for(var c=b.split(","),d=[],f=0,g=a.aoColumns.length;f<g;f++)for(var i=0;i<g;i++)if(a.aoColumns[f].sName==c[i]){d.push(i);break}return d}function y(a){for(var b="",c=0,d=a.aoColumns.length;c<d;c++)b+=a.aoColumns[c].sName+",";return b.length==d?"":b.slice(0,-1)}function J(a,b,c,d){var f,g,i,e,u;if(b)for(f=b.length-1;0<=f;f--){var n=b[f].aTargets;
h.isArray(n)||F(a,1,"aTargets must be an array of targets, not a "+typeof n);for(g=0,i=n.length;g<i;g++)if("number"===typeof n[g]&&0<=n[g]){for(;a.aoColumns.length<=n[g];)o(a);d(n[g],b[f])}else if("number"===typeof n[g]&&0>n[g])d(a.aoColumns.length+n[g],b[f]);else if("string"===typeof n[g])for(e=0,u=a.aoColumns.length;e<u;e++)("_all"==n[g]||h(a.aoColumns[e].nTh).hasClass(n[g]))&&d(e,b[f])}if(c)for(f=0,a=c.length;f<a;f++)d(f,c[f])}function H(a,b){var c;c=h.isArray(b)?b.slice():h.extend(!0,{},b);var d=
a.aoData.length,f=h.extend(!0,{},j.models.oRow);f._aData=c;a.aoData.push(f);for(var g,f=0,i=a.aoColumns.length;f<i;f++)if(c=a.aoColumns[f],"function"===typeof c.fnRender&&c.bUseRendered&&null!==c.mDataProp?I(a,d,f,R(a,d,f)):I(a,d,f,w(a,d,f)),c._bAutoType&&"string"!=c.sType&&(g=w(a,d,f,"type"),null!==g&&""!==g))if(g=A(g),null===c.sType)c.sType=g;else if(c.sType!=g&&"html"!=c.sType)c.sType="string";a.aiDisplayMaster.push(d);a.oFeatures.bDeferRender||ca(a,d);return d}function ua(a){var b,c,d,f,g,i,e,
u,n;if(a.bDeferLoading||null===a.sAjaxSource){e=a.nTBody.childNodes;for(b=0,c=e.length;b<c;b++)if("TR"==e[b].nodeName.toUpperCase()){u=a.aoData.length;e[b]._DT_RowIndex=u;a.aoData.push(h.extend(!0,{},j.models.oRow,{nTr:e[b]}));a.aiDisplayMaster.push(u);i=e[b].childNodes;g=0;for(d=0,f=i.length;d<f;d++)if(n=i[d].nodeName.toUpperCase(),"TD"==n||"TH"==n)I(a,u,g,h.trim(i[d].innerHTML)),g++}}e=S(a);i=[];for(b=0,c=e.length;b<c;b++)for(d=0,f=e[b].childNodes.length;d<f;d++)g=e[b].childNodes[d],n=g.nodeName.toUpperCase(),
("TD"==n||"TH"==n)&&i.push(g);for(f=0,e=a.aoColumns.length;f<e;f++){n=a.aoColumns[f];if(null===n.sTitle)n.sTitle=n.nTh.innerHTML;g=n._bAutoType;u="function"===typeof n.fnRender;var o=null!==n.sClass,k=n.bVisible,m,s;if(g||u||o||!k)for(b=0,c=a.aoData.length;b<c;b++){d=a.aoData[b];m=i[b*e+f];if(g&&"string"!=n.sType&&(s=w(a,b,f,"type"),""!==s))if(s=A(s),null===n.sType)n.sType=s;else if(n.sType!=s&&"html"!=n.sType)n.sType="string";if("function"===typeof n.mDataProp)m.innerHTML=w(a,b,f,"display");if(u)s=
R(a,b,f),m.innerHTML=s,n.bUseRendered&&I(a,b,f,s);o&&(m.className+=" "+n.sClass);k?d._anHidden[f]=null:(d._anHidden[f]=m,m.parentNode.removeChild(m));n.fnCreatedCell&&n.fnCreatedCell.call(a.oInstance,m,w(a,b,f,"display"),d._aData,b,f)}}if(0!==a.aoRowCreatedCallback.length)for(b=0,c=a.aoData.length;b<c;b++)d=a.aoData[b],D(a,"aoRowCreatedCallback",null,[d.nTr,d._aData,b])}function K(a,b){return b._DT_RowIndex!==m?b._DT_RowIndex:null}function da(a,b,c){for(var b=L(a,b),d=0,a=a.aoColumns.length;d<a;d++)if(b[d]===
c)return d;return-1}function X(a,b,c){for(var d=[],f=0,g=a.aoColumns.length;f<g;f++)d.push(w(a,b,f,c));return d}function w(a,b,c,d){var f=a.aoColumns[c];if((c=f.fnGetData(a.aoData[b]._aData,d))===m){if(a.iDrawError!=a.iDraw&&null===f.sDefaultContent)F(a,0,"Requested unknown parameter "+("function"==typeof f.mDataProp?"{mDataprop function}":"'"+f.mDataProp+"'")+" from the data source for row "+b),a.iDrawError=a.iDraw;return f.sDefaultContent}if(null===c&&null!==f.sDefaultContent)c=f.sDefaultContent;
else if("function"===typeof c)return c();return"display"==d&&null===c?"":c}function I(a,b,c,d){a.aoColumns[c].fnSetData(a.aoData[b]._aData,d)}function W(a){if(null===a)return function(){return null};if("function"===typeof a)return function(b,d){return a(b,d)};if("string"===typeof a&&-1!=a.indexOf(".")){var b=a.split(".");return function(a){for(var d=0,f=b.length;d<f;d++)if(a=a[b[d]],a===m)return m;return a}}return function(b){return b[a]}}function ta(a){if(null===a)return function(){};if("function"===
typeof a)return function(b,d){a(b,"set",d)};if("string"===typeof a&&-1!=a.indexOf(".")){var b=a.split(".");return function(a,d){for(var f=0,g=b.length-1;f<g;f++)if(a=a[b[f]],a===m)return;a[b[b.length-1]]=d}}return function(b,d){b[a]=d}}function Y(a){for(var b=[],c=a.aoData.length,d=0;d<c;d++)b.push(a.aoData[d]._aData);return b}function ea(a){a.aoData.splice(0,a.aoData.length);a.aiDisplayMaster.splice(0,a.aiDisplayMaster.length);a.aiDisplay.splice(0,a.aiDisplay.length);B(a)}function fa(a,b){for(var c=
-1,d=0,f=a.length;d<f;d++)a[d]==b?c=d:a[d]>b&&a[d]--; -1!=c&&a.splice(c,1)}function R(a,b,c){var d=a.aoColumns[c];return d.fnRender({iDataRow:b,iDataColumn:c,oSettings:a,aData:a.aoData[b]._aData,mDataProp:d.mDataProp},w(a,b,c,"display"))}function ca(a,b){var c=a.aoData[b],d;if(null===c.nTr){c.nTr=l.createElement("tr");c.nTr._DT_RowIndex=b;if(c._aData.DT_RowId)c.nTr.id=c._aData.DT_RowId;c._aData.DT_RowClass&&h(c.nTr).addClass(c._aData.DT_RowClass);for(var f=0,g=a.aoColumns.length;f<g;f++){var i=a.aoColumns[f];
d=l.createElement(i.sCellType);d.innerHTML="function"===typeof i.fnRender&&(!i.bUseRendered||null===i.mDataProp)?R(a,b,f):w(a,b,f,"display");if(null!==i.sClass)d.className=i.sClass;i.bVisible?(c.nTr.appendChild(d),c._anHidden[f]=null):c._anHidden[f]=d;i.fnCreatedCell&&i.fnCreatedCell.call(a.oInstance,d,w(a,b,f,"display"),c._aData,b,f)}D(a,"aoRowCreatedCallback",null,[c.nTr,c._aData,b])}}function va(a){var b,c,d;if(0!==a.nTHead.getElementsByTagName("th").length)for(b=0,d=a.aoColumns.length;b<d;b++){if(c=
a.aoColumns[b].nTh,c.setAttribute("role","columnheader"),a.aoColumns[b].bSortable&&(c.setAttribute("tabindex",a.iTabIndex),c.setAttribute("aria-controls",a.sTableId)),null!==a.aoColumns[b].sClass&&h(c).addClass(a.aoColumns[b].sClass),a.aoColumns[b].sTitle!=c.innerHTML)c.innerHTML=a.aoColumns[b].sTitle}else{var f=l.createElement("tr");for(b=0,d=a.aoColumns.length;b<d;b++)c=a.aoColumns[b].nTh,c.innerHTML=a.aoColumns[b].sTitle,c.setAttribute("tabindex","0"),null!==a.aoColumns[b].sClass&&h(c).addClass(a.aoColumns[b].sClass),
f.appendChild(c);h(a.nTHead).html("")[0].appendChild(f);T(a.aoHeader,a.nTHead)}h(a.nTHead).children("tr").attr("role","row");if(a.bJUI)for(b=0,d=a.aoColumns.length;b<d;b++){c=a.aoColumns[b].nTh;f=l.createElement("div");f.className=a.oClasses.sSortJUIWrapper;h(c).contents().appendTo(f);var g=l.createElement("span");g.className=a.oClasses.sSortIcon;f.appendChild(g);c.appendChild(f)}if(a.oFeatures.bSort)for(b=0;b<a.aoColumns.length;b++)!1!==a.aoColumns[b].bSortable?ga(a,a.aoColumns[b].nTh,b):h(a.aoColumns[b].nTh).addClass(a.oClasses.sSortableNone);
""!==a.oClasses.sFooterTH&&h(a.nTFoot).children("tr").children("th").addClass(a.oClasses.sFooterTH);if(null!==a.nTFoot){c=O(a,null,a.aoFooter);for(b=0,d=a.aoColumns.length;b<d;b++)if(c[b])a.aoColumns[b].nTf=c[b],a.aoColumns[b].sClass&&h(c[b]).addClass(a.aoColumns[b].sClass)}}function U(a,b,c){var d,f,g,i=[],e=[],h=a.aoColumns.length,n;c===m&&(c=!1);for(d=0,f=b.length;d<f;d++){i[d]=b[d].slice();i[d].nTr=b[d].nTr;for(g=h-1;0<=g;g--)!a.aoColumns[g].bVisible&&!c&&i[d].splice(g,1);e.push([])}for(d=0,f=
i.length;d<f;d++){if(a=i[d].nTr)for(;g=a.firstChild;)a.removeChild(g);for(g=0,b=i[d].length;g<b;g++)if(n=h=1,e[d][g]===m){a.appendChild(i[d][g].cell);for(e[d][g]=1;i[d+h]!==m&&i[d][g].cell==i[d+h][g].cell;)e[d+h][g]=1,h++;for(;i[d][g+n]!==m&&i[d][g].cell==i[d][g+n].cell;){for(c=0;c<h;c++)e[d+c][g+n]=1;n++}i[d][g].cell.rowSpan=h;i[d][g].cell.colSpan=n}}}function z(a){var b,c,d=[],f=0,g=a.asStripeClasses.length;b=a.aoOpenRows.length;c=D(a,"aoPreDrawCallback","preDraw",[a]);if(-1!==h.inArray(!1,c))G(a,
!1);else{a.bDrawing=!0;if(a.iInitDisplayStart!==m&&-1!=a.iInitDisplayStart)a._iDisplayStart=a.oFeatures.bServerSide?a.iInitDisplayStart:a.iInitDisplayStart>=a.fnRecordsDisplay()?0:a.iInitDisplayStart,a.iInitDisplayStart=-1,B(a);if(a.bDeferLoading)a.bDeferLoading=!1,a.iDraw++;else if(a.oFeatures.bServerSide){if(!a.bDestroying&&!wa(a))return}else a.iDraw++;if(0!==a.aiDisplay.length){var i=a._iDisplayStart;c=a._iDisplayEnd;if(a.oFeatures.bServerSide)i=0,c=a.aoData.length;for(;i<c;i++){var e=a.aoData[a.aiDisplay[i]];
null===e.nTr&&ca(a,a.aiDisplay[i]);var j=e.nTr;if(0!==g){var n=a.asStripeClasses[f%g];if(e._sRowStripe!=n)h(j).removeClass(e._sRowStripe).addClass(n),e._sRowStripe=n}D(a,"aoRowCallback",null,[j,a.aoData[a.aiDisplay[i]]._aData,f,i]);d.push(j);f++;if(0!==b)for(e=0;e<b;e++)if(j==a.aoOpenRows[e].nParent){d.push(a.aoOpenRows[e].nTr);break}}}else{d[0]=l.createElement("tr");if(a.asStripeClasses[0])d[0].className=a.asStripeClasses[0];b=a.oLanguage;g=b.sZeroRecords;if(1==a.iDraw&&null!==a.sAjaxSource&&!a.oFeatures.bServerSide)g=
b.sLoadingRecords;else if(b.sEmptyTable&&0===a.fnRecordsTotal())g=b.sEmptyTable;b=l.createElement("td");b.setAttribute("valign","top");b.colSpan=v(a);b.className=a.oClasses.sRowEmpty;b.innerHTML=ha(a,g);d[f].appendChild(b)}D(a,"aoHeaderCallback","header",[h(a.nTHead).children("tr")[0],Y(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay]);D(a,"aoFooterCallback","footer",[h(a.nTFoot).children("tr")[0],Y(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay]);f=l.createDocumentFragment();b=l.createDocumentFragment();
if(a.nTBody){g=a.nTBody.parentNode;b.appendChild(a.nTBody);if(!a.oScroll.bInfinite||!a._bInitComplete||a.bSorted||a.bFiltered)for(;b=a.nTBody.firstChild;)a.nTBody.removeChild(b);for(b=0,c=d.length;b<c;b++)f.appendChild(d[b]);a.nTBody.appendChild(f);null!==g&&g.appendChild(a.nTBody)}D(a,"aoDrawCallback","draw",[a]);a.bSorted=!1;a.bFiltered=!1;a.bDrawing=!1;a.oFeatures.bServerSide&&(G(a,!1),a._bInitComplete||Z(a))}}function $(a){a.oFeatures.bSort?P(a,a.oPreviousSearch):a.oFeatures.bFilter?M(a,a.oPreviousSearch):
(B(a),z(a))}function xa(a){var b=h("<div></div>")[0];a.nTable.parentNode.insertBefore(b,a.nTable);a.nTableWrapper=h('<div id="'+a.sTableId+'_wrapper" class="'+a.oClasses.sWrapper+'" role="grid"></div>')[0];a.nTableReinsertBefore=a.nTable.nextSibling;for(var c=a.nTableWrapper,d=a.sDom.split(""),f,g,i,e,u,n,o,k=0;k<d.length;k++){g=0;i=d[k];if("<"==i){e=h("<div></div>")[0];u=d[k+1];if("'"==u||'"'==u){n="";for(o=2;d[k+o]!=u;)n+=d[k+o],o++;"H"==n?n="fg-toolbar ui-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix":
"F"==n&&(n="fg-toolbar ui-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix");-1!=n.indexOf(".")?(u=n.split("."),e.id=u[0].substr(1,u[0].length-1),e.className=u[1]):"#"==n.charAt(0)?e.id=n.substr(1,n.length-1):e.className=n;k+=o}c.appendChild(e);c=e}else if(">"==i)c=c.parentNode;else if("l"==i&&a.oFeatures.bPaginate&&a.oFeatures.bLengthChange)f=ya(a),g=1;else if("f"==i&&a.oFeatures.bFilter)f=za(a),g=1;else if("r"==i&&a.oFeatures.bProcessing)f=Aa(a),g=1;else if("t"==i)f=Ba(a),g=
1;else if("i"==i&&a.oFeatures.bInfo)f=Ca(a),g=1;else if("p"==i&&a.oFeatures.bPaginate)f=Da(a),g=1;else if(0!==j.ext.aoFeatures.length){e=j.ext.aoFeatures;o=0;for(u=e.length;o<u;o++)if(i==e[o].cFeature){(f=e[o].fnInit(a))&&(g=1);break}}1==g&&null!==f&&("object"!==typeof a.aanFeatures[i]&&(a.aanFeatures[i]=[]),a.aanFeatures[i].push(f),c.appendChild(f))}b.parentNode.replaceChild(a.nTableWrapper,b)}function T(a,b){var c=h(b).children("tr"),d,f,g,i,e,j,n,o;a.splice(0,a.length);for(f=0,j=c.length;f<j;f++)a.push([]);
for(f=0,j=c.length;f<j;f++)for(g=0,n=c[f].childNodes.length;g<n;g++)if(d=c[f].childNodes[g],"TD"==d.nodeName.toUpperCase()||"TH"==d.nodeName.toUpperCase()){var k=1*d.getAttribute("colspan"),m=1*d.getAttribute("rowspan"),k=!k||0===k||1===k?1:k,m=!m||0===m||1===m?1:m;for(i=0;a[f][i];)i++;o=i;for(e=0;e<k;e++)for(i=0;i<m;i++)a[f+i][o+e]={cell:d,unique:1==k?!0:!1},a[f+i].nTr=c[f]}}function O(a,b,c){var d=[];if(!c)c=a.aoHeader,b&&(c=[],T(c,b));for(var b=0,f=c.length;b<f;b++)for(var g=0,i=c[b].length;g<
i;g++)if(c[b][g].unique&&(!d[g]||!a.bSortCellsTop))d[g]=c[b][g].cell;return d}function wa(a){if(a.bAjaxDataGet){a.iDraw++;G(a,!0);var b=Ea(a);ia(a,b);a.fnServerData.call(a.oInstance,a.sAjaxSource,b,function(b){Fa(a,b)},a);return!1}return!0}function Ea(a){var b=a.aoColumns.length,c=[],d,f,g,i;c.push({name:"sEcho",value:a.iDraw});c.push({name:"iColumns",value:b});c.push({name:"sColumns",value:y(a)});c.push({name:"iDisplayStart",value:a._iDisplayStart});c.push({name:"iDisplayLength",value:!1!==a.oFeatures.bPaginate?
a._iDisplayLength:-1});for(g=0;g<b;g++)d=a.aoColumns[g].mDataProp,c.push({name:"mDataProp_"+g,value:"function"===typeof d?"function":d});if(!1!==a.oFeatures.bFilter){c.push({name:"sSearch",value:a.oPreviousSearch.sSearch});c.push({name:"bRegex",value:a.oPreviousSearch.bRegex});for(g=0;g<b;g++)c.push({name:"sSearch_"+g,value:a.aoPreSearchCols[g].sSearch}),c.push({name:"bRegex_"+g,value:a.aoPreSearchCols[g].bRegex}),c.push({name:"bSearchable_"+g,value:a.aoColumns[g].bSearchable})}if(!1!==a.oFeatures.bSort){var e=
0;d=null!==a.aaSortingFixed?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(g=0;g<d.length;g++){f=a.aoColumns[d[g][0]].aDataSort;for(i=0;i<f.length;i++)c.push({name:"iSortCol_"+e,value:f[i]}),c.push({name:"sSortDir_"+e,value:d[g][1]}),e++}c.push({name:"iSortingCols",value:e});for(g=0;g<b;g++)c.push({name:"bSortable_"+g,value:a.aoColumns[g].bSortable})}return c}function ia(a,b){D(a,"aoServerParams","serverParams",[b])}function Fa(a,b){if(b.sEcho!==m){if(1*b.sEcho<a.iDraw)return;a.iDraw=
1*b.sEcho}(!a.oScroll.bInfinite||a.oScroll.bInfinite&&(a.bSorted||a.bFiltered))&&ea(a);a._iRecordsTotal=parseInt(b.iTotalRecords,10);a._iRecordsDisplay=parseInt(b.iTotalDisplayRecords,10);var c=y(a),c=b.sColumns!==m&&""!==c&&b.sColumns!=c,d;c&&(d=E(a,b.sColumns));for(var f=W(a.sAjaxDataProp)(b),g=0,i=f.length;g<i;g++)if(c){for(var e=[],h=0,n=a.aoColumns.length;h<n;h++)e.push(f[g][d[h]]);H(a,e)}else H(a,f[g]);a.aiDisplay=a.aiDisplayMaster.slice();a.bAjaxDataGet=!1;z(a);a.bAjaxDataGet=!0;G(a,!1)}function za(a){var b=
a.oPreviousSearch,c=a.oLanguage.sSearch,c=-1!==c.indexOf("_INPUT_")?c.replace("_INPUT_",'<input type="text" />'):""===c?'<input type="text" />':c+' <input type="text" />',d=l.createElement("div");d.className=a.oClasses.sFilter;d.innerHTML="<label>"+c+"</label>";if(!a.aanFeatures.f)d.id=a.sTableId+"_filter";c=h('input[type="text"]',d);d._DT_Input=c[0];c.val(b.sSearch.replace('"',"&quot;"));c.bind("keyup.DT",function(){for(var c=a.aanFeatures.f,d=""===this.value?"":this.value,i=0,e=c.length;i<e;i++)c[i]!=
h(this).parents("div.dataTables_filter")[0]&&h(c[i]._DT_Input).val(d);d!=b.sSearch&&M(a,{sSearch:d,bRegex:b.bRegex,bSmart:b.bSmart,bCaseInsensitive:b.bCaseInsensitive})});c.attr("aria-controls",a.sTableId).bind("keypress.DT",function(a){if(13==a.keyCode)return!1});return d}function M(a,b,c){var d=a.oPreviousSearch,f=a.aoPreSearchCols,g=function(a){d.sSearch=a.sSearch;d.bRegex=a.bRegex;d.bSmart=a.bSmart;d.bCaseInsensitive=a.bCaseInsensitive};if(a.oFeatures.bServerSide)g(b);else{Ga(a,b.sSearch,c,b.bRegex,
b.bSmart,b.bCaseInsensitive);g(b);for(b=0;b<a.aoPreSearchCols.length;b++)Ha(a,f[b].sSearch,b,f[b].bRegex,f[b].bSmart,f[b].bCaseInsensitive);Ia(a)}a.bFiltered=!0;h(a.oInstance).trigger("filter",a);a._iDisplayStart=0;B(a);z(a);ja(a,0)}function Ia(a){for(var b=j.ext.afnFiltering,c=0,d=b.length;c<d;c++)for(var f=0,g=0,i=a.aiDisplay.length;g<i;g++){var e=a.aiDisplay[g-f];b[c](a,X(a,e,"filter"),e)||(a.aiDisplay.splice(g-f,1),f++)}}function Ha(a,b,c,d,f,g){if(""!==b)for(var i=0,b=ka(b,d,f,g),d=a.aiDisplay.length-
1;0<=d;d--)f=la(w(a,a.aiDisplay[d],c,"filter"),a.aoColumns[c].sType),b.test(f)||(a.aiDisplay.splice(d,1),i++)}function Ga(a,b,c,d,f,g){d=ka(b,d,f,g);f=a.oPreviousSearch;c||(c=0);0!==j.ext.afnFiltering.length&&(c=1);if(0>=b.length)a.aiDisplay.splice(0,a.aiDisplay.length),a.aiDisplay=a.aiDisplayMaster.slice();else if(a.aiDisplay.length==a.aiDisplayMaster.length||f.sSearch.length>b.length||1==c||0!==b.indexOf(f.sSearch)){a.aiDisplay.splice(0,a.aiDisplay.length);ja(a,1);for(b=0;b<a.aiDisplayMaster.length;b++)d.test(a.asDataSearch[b])&&
a.aiDisplay.push(a.aiDisplayMaster[b])}else for(b=c=0;b<a.asDataSearch.length;b++)d.test(a.asDataSearch[b])||(a.aiDisplay.splice(b-c,1),c++)}function ja(a,b){if(!a.oFeatures.bServerSide){a.asDataSearch.splice(0,a.asDataSearch.length);for(var c=b&&1===b?a.aiDisplayMaster:a.aiDisplay,d=0,f=c.length;d<f;d++)a.asDataSearch[d]=ma(a,X(a,c[d],"filter"))}}function ma(a,b){var c="";if(a.__nTmpFilter===m)a.__nTmpFilter=l.createElement("div");for(var d=a.__nTmpFilter,f=0,g=a.aoColumns.length;f<g;f++)a.aoColumns[f].bSearchable&&
(c+=la(b[f],a.aoColumns[f].sType)+"  ");if(-1!==c.indexOf("&"))d.innerHTML=c,c=d.textContent?d.textContent:d.innerText,c=c.replace(/\n/g," ").replace(/\r/g,"");return c}function ka(a,b,c,d){if(c)return a=b?a.split(" "):na(a).split(" "),a="^(?=.*?"+a.join(")(?=.*?")+").*$",RegExp(a,d?"i":"");a=b?a:na(a);return RegExp(a,d?"i":"")}function la(a,b){return"function"===typeof j.ext.ofnSearch[b]?j.ext.ofnSearch[b](a):null===a?"":"html"==b?a.replace(/[\r\n]/g," ").replace(/<.*?>/g,""):"string"===typeof a?
a.replace(/[\r\n]/g," "):a}function na(a){return a.replace(RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\|\\$|\\^)","g"),"\\$1")}function Ca(a){var b=l.createElement("div");b.className=a.oClasses.sInfo;if(!a.aanFeatures.i)a.aoDrawCallback.push({fn:Ja,sName:"information"}),b.id=a.sTableId+"_info";a.nTable.setAttribute("aria-describedby",a.sTableId+"_info");return b}function Ja(a){if(a.oFeatures.bInfo&&0!==a.aanFeatures.i.length){var b=a.oLanguage,c=a._iDisplayStart+1,d=a.fnDisplayEnd(),
f=a.fnRecordsTotal(),g=a.fnRecordsDisplay(),i;i=0===g&&g==f?b.sInfoEmpty:0===g?b.sInfoEmpty+" "+b.sInfoFiltered:g==f?b.sInfo:b.sInfo+" "+b.sInfoFiltered;i+=b.sInfoPostFix;i=ha(a,i);null!==b.fnInfoCallback&&(i=b.fnInfoCallback.call(a.oInstance,a,c,d,f,g,i));a=a.aanFeatures.i;b=0;for(c=a.length;b<c;b++)h(a[b]).html(i)}}function ha(a,b){var c=a.fnFormatNumber(a._iDisplayStart+1),d=a.fnDisplayEnd(),d=a.fnFormatNumber(d),f=a.fnRecordsDisplay(),f=a.fnFormatNumber(f),g=a.fnRecordsTotal(),g=a.fnFormatNumber(g);
a.oScroll.bInfinite&&(c=a.fnFormatNumber(1));return b.replace("_START_",c).replace("_END_",d).replace("_TOTAL_",f).replace("_MAX_",g)}function aa(a){var b,c,d=a.iInitDisplayStart;if(!1===a.bInitialised)setTimeout(function(){aa(a)},200);else{xa(a);va(a);U(a,a.aoHeader);a.nTFoot&&U(a,a.aoFooter);G(a,!0);a.oFeatures.bAutoWidth&&ba(a);for(b=0,c=a.aoColumns.length;b<c;b++)if(null!==a.aoColumns[b].sWidth)a.aoColumns[b].nTh.style.width=q(a.aoColumns[b].sWidth);a.oFeatures.bSort?P(a):a.oFeatures.bFilter?
M(a,a.oPreviousSearch):(a.aiDisplay=a.aiDisplayMaster.slice(),B(a),z(a));null!==a.sAjaxSource&&!a.oFeatures.bServerSide?(c=[],ia(a,c),a.fnServerData.call(a.oInstance,a.sAjaxSource,c,function(c){var g=""!==a.sAjaxDataProp?W(a.sAjaxDataProp)(c):c;for(b=0;b<g.length;b++)H(a,g[b]);a.iInitDisplayStart=d;a.oFeatures.bSort?P(a):(a.aiDisplay=a.aiDisplayMaster.slice(),B(a),z(a));G(a,!1);Z(a,c)},a)):a.oFeatures.bServerSide||(G(a,!1),Z(a))}}function Z(a,b){a._bInitComplete=!0;D(a,"aoInitComplete","init",[a,
b])}function oa(a){var b=j.defaults.oLanguage;!a.sEmptyTable&&a.sZeroRecords&&"No data available in table"===b.sEmptyTable&&p(a,a,"sZeroRecords","sEmptyTable");!a.sLoadingRecords&&a.sZeroRecords&&"Loading..."===b.sLoadingRecords&&p(a,a,"sZeroRecords","sLoadingRecords")}function ya(a){if(a.oScroll.bInfinite)return null;var b='<select size="1" '+('name="'+a.sTableId+'_length"')+">",c,d,f=a.aLengthMenu;if(2==f.length&&"object"===typeof f[0]&&"object"===typeof f[1])for(c=0,d=f[0].length;c<d;c++)b+='<option value="'+
f[0][c]+'">'+f[1][c]+"</option>";else for(c=0,d=f.length;c<d;c++)b+='<option value="'+f[c]+'">'+f[c]+"</option>";b+="</select>";f=l.createElement("div");if(!a.aanFeatures.l)f.id=a.sTableId+"_length";f.className=a.oClasses.sLength;f.innerHTML="<label>"+a.oLanguage.sLengthMenu.replace("_MENU_",b)+"</label>";h('select option[value="'+a._iDisplayLength+'"]',f).attr("selected",!0);h("select",f).bind("change.DT",function(){var b=h(this).val(),f=a.aanFeatures.l;for(c=0,d=f.length;c<d;c++)f[c]!=this.parentNode&&
h("select",f[c]).val(b);a._iDisplayLength=parseInt(b,10);B(a);if(a.fnDisplayEnd()==a.fnRecordsDisplay()&&(a._iDisplayStart=a.fnDisplayEnd()-a._iDisplayLength,0>a._iDisplayStart))a._iDisplayStart=0;if(-1==a._iDisplayLength)a._iDisplayStart=0;z(a)});h("select",f).attr("aria-controls",a.sTableId);return f}function B(a){a._iDisplayEnd=!1===a.oFeatures.bPaginate?a.aiDisplay.length:a._iDisplayStart+a._iDisplayLength>a.aiDisplay.length||-1==a._iDisplayLength?a.aiDisplay.length:a._iDisplayStart+a._iDisplayLength}
function Da(a){if(a.oScroll.bInfinite)return null;var b=l.createElement("div");b.className=a.oClasses.sPaging+a.sPaginationType;j.ext.oPagination[a.sPaginationType].fnInit(a,b,function(a){B(a);z(a)});a.aanFeatures.p||a.aoDrawCallback.push({fn:function(a){j.ext.oPagination[a.sPaginationType].fnUpdate(a,function(a){B(a);z(a)})},sName:"pagination"});return b}function pa(a,b){var c=a._iDisplayStart;if("number"===typeof b){if(a._iDisplayStart=b*a._iDisplayLength,a._iDisplayStart>a.fnRecordsDisplay())a._iDisplayStart=
0}else if("first"==b)a._iDisplayStart=0;else if("previous"==b){if(a._iDisplayStart=0<=a._iDisplayLength?a._iDisplayStart-a._iDisplayLength:0,0>a._iDisplayStart)a._iDisplayStart=0}else if("next"==b)0<=a._iDisplayLength?a._iDisplayStart+a._iDisplayLength<a.fnRecordsDisplay()&&(a._iDisplayStart+=a._iDisplayLength):a._iDisplayStart=0;else if("last"==b)if(0<=a._iDisplayLength){var d=parseInt((a.fnRecordsDisplay()-1)/a._iDisplayLength,10)+1;a._iDisplayStart=(d-1)*a._iDisplayLength}else a._iDisplayStart=
0;else F(a,0,"Unknown paging action: "+b);h(a.oInstance).trigger("page",a);return c!=a._iDisplayStart}function Aa(a){var b=l.createElement("div");if(!a.aanFeatures.r)b.id=a.sTableId+"_processing";b.innerHTML=a.oLanguage.sProcessing;b.className=a.oClasses.sProcessing;a.nTable.parentNode.insertBefore(b,a.nTable);return b}function G(a,b){if(a.oFeatures.bProcessing)for(var c=a.aanFeatures.r,d=0,f=c.length;d<f;d++)c[d].style.visibility=b?"visible":"hidden";h(a.oInstance).trigger("processing",[a,b])}function Ba(a){if(""===
a.oScroll.sX&&""===a.oScroll.sY)return a.nTable;var b=l.createElement("div"),c=l.createElement("div"),d=l.createElement("div"),f=l.createElement("div"),g=l.createElement("div"),i=l.createElement("div"),e=a.nTable.cloneNode(!1),j=a.nTable.cloneNode(!1),n=a.nTable.getElementsByTagName("thead")[0],o=0===a.nTable.getElementsByTagName("tfoot").length?null:a.nTable.getElementsByTagName("tfoot")[0],k=a.oClasses;c.appendChild(d);g.appendChild(i);f.appendChild(a.nTable);b.appendChild(c);b.appendChild(f);d.appendChild(e);
e.appendChild(n);null!==o&&(b.appendChild(g),i.appendChild(j),j.appendChild(o));b.className=k.sScrollWrapper;c.className=k.sScrollHead;d.className=k.sScrollHeadInner;f.className=k.sScrollBody;g.className=k.sScrollFoot;i.className=k.sScrollFootInner;if(a.oScroll.bAutoCss)c.style.overflow="hidden",c.style.position="relative",g.style.overflow="hidden",f.style.overflow="auto";c.style.border="0";c.style.width="100%";g.style.border="0";d.style.width=""!==a.oScroll.sXInner?a.oScroll.sXInner:"100%";e.removeAttribute("id");
e.style.marginLeft="0";a.nTable.style.marginLeft="0";if(null!==o)j.removeAttribute("id"),j.style.marginLeft="0";d=h(a.nTable).children("caption");0<d.length&&(d=d[0],"top"===d._captionSide?e.appendChild(d):"bottom"===d._captionSide&&o&&j.appendChild(d));if(""!==a.oScroll.sX){c.style.width=q(a.oScroll.sX);f.style.width=q(a.oScroll.sX);if(null!==o)g.style.width=q(a.oScroll.sX);h(f).scroll(function(){c.scrollLeft=this.scrollLeft;if(null!==o)g.scrollLeft=this.scrollLeft})}if(""!==a.oScroll.sY)f.style.height=
q(a.oScroll.sY);a.aoDrawCallback.push({fn:Ka,sName:"scrolling"});a.oScroll.bInfinite&&h(f).scroll(function(){!a.bDrawing&&0!==h(this).scrollTop()&&h(this).scrollTop()+h(this).height()>h(a.nTable).height()-a.oScroll.iLoadGap&&a.fnDisplayEnd()<a.fnRecordsDisplay()&&(pa(a,"next"),B(a),z(a))});a.nScrollHead=c;a.nScrollFoot=g;return b}function Ka(a){var b=a.nScrollHead.getElementsByTagName("div")[0],c=b.getElementsByTagName("table")[0],d=a.nTable.parentNode,f,g,i,e,j,n,o,k,m=[],s=null!==a.nTFoot?a.nScrollFoot.getElementsByTagName("div")[0]:
null,p=null!==a.nTFoot?s.getElementsByTagName("table")[0]:null,l=h.browser.msie&&7>=h.browser.version;h(a.nTable).children("thead, tfoot").remove();i=h(a.nTHead).clone()[0];a.nTable.insertBefore(i,a.nTable.childNodes[0]);null!==a.nTFoot&&(j=h(a.nTFoot).clone()[0],a.nTable.insertBefore(j,a.nTable.childNodes[1]));if(""===a.oScroll.sX)d.style.width="100%",b.parentNode.style.width="100%";var r=O(a,i);for(f=0,g=r.length;f<g;f++)o=x(a,f),r[f].style.width=a.aoColumns[o].sWidth;null!==a.nTFoot&&N(function(a){a.style.width=
""},j.getElementsByTagName("tr"));if(a.oScroll.bCollapse&&""!==a.oScroll.sY)d.style.height=d.offsetHeight+a.nTHead.offsetHeight+"px";f=h(a.nTable).outerWidth();if(""===a.oScroll.sX){if(a.nTable.style.width="100%",l&&(h("tbody",d).height()>d.offsetHeight||"scroll"==h(d).css("overflow-y")))a.nTable.style.width=q(h(a.nTable).outerWidth()-a.oScroll.iBarWidth)}else if(""!==a.oScroll.sXInner)a.nTable.style.width=q(a.oScroll.sXInner);else if(f==h(d).width()&&h(d).height()<h(a.nTable).height()){if(a.nTable.style.width=
q(f-a.oScroll.iBarWidth),h(a.nTable).outerWidth()>f-a.oScroll.iBarWidth)a.nTable.style.width=q(f)}else a.nTable.style.width=q(f);f=h(a.nTable).outerWidth();g=a.nTHead.getElementsByTagName("tr");i=i.getElementsByTagName("tr");N(function(a,b){n=a.style;n.paddingTop="0";n.paddingBottom="0";n.borderTopWidth="0";n.borderBottomWidth="0";n.height=0;k=h(a).width();b.style.width=q(k);m.push(k)},i,g);h(i).height(0);null!==a.nTFoot&&(e=j.getElementsByTagName("tr"),j=a.nTFoot.getElementsByTagName("tr"),N(function(a,
b){n=a.style;n.paddingTop="0";n.paddingBottom="0";n.borderTopWidth="0";n.borderBottomWidth="0";n.height=0;k=h(a).width();b.style.width=q(k);m.push(k)},e,j),h(e).height(0));N(function(a){a.innerHTML="";a.style.width=q(m.shift())},i);null!==a.nTFoot&&N(function(a){a.innerHTML="";a.style.width=q(m.shift())},e);if(h(a.nTable).outerWidth()<f){e=d.scrollHeight>d.offsetHeight||"scroll"==h(d).css("overflow-y")?f+a.oScroll.iBarWidth:f;if(l&&(d.scrollHeight>d.offsetHeight||"scroll"==h(d).css("overflow-y")))a.nTable.style.width=
q(e-a.oScroll.iBarWidth);d.style.width=q(e);b.parentNode.style.width=q(e);if(null!==a.nTFoot)s.parentNode.style.width=q(e);""===a.oScroll.sX?F(a,1,"The table cannot fit into the current element which will cause column misalignment. The table has been drawn at its minimum possible width."):""!==a.oScroll.sXInner&&F(a,1,"The table cannot fit into the current element which will cause column misalignment. Increase the sScrollXInner value or remove it to allow automatic calculation")}else if(d.style.width=
q("100%"),b.parentNode.style.width=q("100%"),null!==a.nTFoot)s.parentNode.style.width=q("100%");if(""===a.oScroll.sY&&l)d.style.height=q(a.nTable.offsetHeight+a.oScroll.iBarWidth);if(""!==a.oScroll.sY&&a.oScroll.bCollapse&&(d.style.height=q(a.oScroll.sY),l=""!==a.oScroll.sX&&a.nTable.offsetWidth>d.offsetWidth?a.oScroll.iBarWidth:0,a.nTable.offsetHeight<d.offsetHeight))d.style.height=q(a.nTable.offsetHeight+l);l=h(a.nTable).outerWidth();c.style.width=q(l);b.style.width=q(l);c=h(a.nTable).height()>
d.clientHeight||"scroll"==h(d).css("overflow-y");b.style.paddingRight=c?a.oScroll.iBarWidth+"px":"0px";if(null!==a.nTFoot)p.style.width=q(l),s.style.width=q(l),s.style.paddingRight=c?a.oScroll.iBarWidth+"px":"0px";h(d).scroll();if(a.bSorted||a.bFiltered)d.scrollTop=0}function N(a,b,c){for(var d=0,f=b.length;d<f;d++)for(var g=0,i=b[d].childNodes.length;g<i;g++)1==b[d].childNodes[g].nodeType&&(c?a(b[d].childNodes[g],c[d].childNodes[g]):a(b[d].childNodes[g]))}function La(a,b){if(!a||null===a||""===a)return 0;
b||(b=l.getElementsByTagName("body")[0]);var c,d=l.createElement("div");d.style.width=q(a);b.appendChild(d);c=d.offsetWidth;b.removeChild(d);return c}function ba(a){var b=0,c,d=0,f=a.aoColumns.length,g,i=h("th",a.nTHead),e=a.nTable.getAttribute("width");for(g=0;g<f;g++)if(a.aoColumns[g].bVisible&&(d++,null!==a.aoColumns[g].sWidth)){c=La(a.aoColumns[g].sWidthOrig,a.nTable.parentNode);if(null!==c)a.aoColumns[g].sWidth=q(c);b++}if(f==i.length&&0===b&&d==f&&""===a.oScroll.sX&&""===a.oScroll.sY)for(g=
0;g<a.aoColumns.length;g++){if(c=h(i[g]).width(),null!==c)a.aoColumns[g].sWidth=q(c)}else{b=a.nTable.cloneNode(!1);g=a.nTHead.cloneNode(!0);d=l.createElement("tbody");c=l.createElement("tr");b.removeAttribute("id");b.appendChild(g);null!==a.nTFoot&&(b.appendChild(a.nTFoot.cloneNode(!0)),N(function(a){a.style.width=""},b.getElementsByTagName("tr")));b.appendChild(d);d.appendChild(c);d=h("thead th",b);0===d.length&&(d=h("tbody tr:eq(0)>td",b));i=O(a,g);for(g=d=0;g<f;g++){var j=a.aoColumns[g];j.bVisible&&
null!==j.sWidthOrig&&""!==j.sWidthOrig?i[g-d].style.width=q(j.sWidthOrig):j.bVisible?i[g-d].style.width="":d++}for(g=0;g<f;g++)a.aoColumns[g].bVisible&&(d=Ma(a,g),null!==d&&(d=d.cloneNode(!0),""!==a.aoColumns[g].sContentPadding&&(d.innerHTML+=a.aoColumns[g].sContentPadding),c.appendChild(d)));f=a.nTable.parentNode;f.appendChild(b);if(""!==a.oScroll.sX&&""!==a.oScroll.sXInner)b.style.width=q(a.oScroll.sXInner);else if(""!==a.oScroll.sX){if(b.style.width="",h(b).width()<f.offsetWidth)b.style.width=
q(f.offsetWidth)}else if(""!==a.oScroll.sY)b.style.width=q(f.offsetWidth);else if(e)b.style.width=q(e);b.style.visibility="hidden";Na(a,b);f=h("tbody tr:eq(0)",b).children();0===f.length&&(f=O(a,h("thead",b)[0]));if(""!==a.oScroll.sX){for(g=d=c=0;g<a.aoColumns.length;g++)a.aoColumns[g].bVisible&&(c=null===a.aoColumns[g].sWidthOrig?c+h(f[d]).outerWidth():c+(parseInt(a.aoColumns[g].sWidth.replace("px",""),10)+(h(f[d]).outerWidth()-h(f[d]).width())),d++);b.style.width=q(c);a.nTable.style.width=q(c)}for(g=
d=0;g<a.aoColumns.length;g++)if(a.aoColumns[g].bVisible){c=h(f[d]).width();if(null!==c&&0<c)a.aoColumns[g].sWidth=q(c);d++}f=h(b).css("width");a.nTable.style.width=-1!==f.indexOf("%")?f:q(h(b).outerWidth());b.parentNode.removeChild(b)}if(e)a.nTable.style.width=q(e)}function Na(a,b){if(""===a.oScroll.sX&&""!==a.oScroll.sY)h(b).width(),b.style.width=q(h(b).outerWidth()-a.oScroll.iBarWidth);else if(""!==a.oScroll.sX)b.style.width=q(h(b).outerWidth())}function Ma(a,b){var c=Oa(a,b);if(0>c)return null;
if(null===a.aoData[c].nTr){var d=l.createElement("td");d.innerHTML=w(a,c,b,"");return d}return L(a,c)[b]}function Oa(a,b){for(var c=-1,d=-1,f=0;f<a.aoData.length;f++){var g=w(a,f,b,"display")+"",g=g.replace(/<.*?>/g,"");if(g.length>c)c=g.length,d=f}return d}function q(a){if(null===a)return"0px";if("number"==typeof a)return 0>a?"0px":a+"px";var b=a.charCodeAt(a.length-1);return 48>b||57<b?a:a+"px"}function Pa(){var a=l.createElement("p"),b=a.style;b.width="100%";b.height="200px";b.padding="0px";var c=
l.createElement("div"),b=c.style;b.position="absolute";b.top="0px";b.left="0px";b.visibility="hidden";b.width="200px";b.height="150px";b.padding="0px";b.overflow="hidden";c.appendChild(a);l.body.appendChild(c);b=a.offsetWidth;c.style.overflow="scroll";a=a.offsetWidth;if(b==a)a=c.clientWidth;l.body.removeChild(c);return b-a}function P(a,b){var c,d,f,g,i,e,o=[],n=[],k=j.ext.oSort,s=a.aoData,l=a.aoColumns,p=a.oLanguage.oAria;if(!a.oFeatures.bServerSide&&(0!==a.aaSorting.length||null!==a.aaSortingFixed)){o=
null!==a.aaSortingFixed?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(c=0;c<o.length;c++)if(d=o[c][0],f=r(a,d),g=a.aoColumns[d].sSortDataType,j.ext.afnSortData[g])if(i=j.ext.afnSortData[g].call(a.oInstance,a,d,f),i.length===s.length)for(f=0,g=s.length;f<g;f++)I(a,f,d,i[f]);else F(a,0,"Returned data sort array (col "+d+") is the wrong length");for(c=0,d=a.aiDisplayMaster.length;c<d;c++)n[a.aiDisplayMaster[c]]=c;var q=o.length,x;for(c=0,d=s.length;c<d;c++)for(f=0;f<q;f++){x=l[o[f][0]].aDataSort;
for(i=0,e=x.length;i<e;i++)g=l[x[i]].sType,g=k[(g?g:"string")+"-pre"],s[c]._aSortData[x[i]]=g?g(w(a,c,x[i],"sort")):w(a,c,x[i],"sort")}a.aiDisplayMaster.sort(function(a,b){var c,d,f,g,i;for(c=0;c<q;c++){i=l[o[c][0]].aDataSort;for(d=0,f=i.length;d<f;d++)if(g=l[i[d]].sType,g=k[(g?g:"string")+"-"+o[c][1]](s[a]._aSortData[i[d]],s[b]._aSortData[i[d]]),0!==g)return g}return k["numeric-asc"](n[a],n[b])})}(b===m||b)&&!a.oFeatures.bDeferRender&&Q(a);for(c=0,d=a.aoColumns.length;c<d;c++)g=l[c].sTitle.replace(/<.*?>/g,
""),f=l[c].nTh,f.removeAttribute("aria-sort"),f.removeAttribute("aria-label"),l[c].bSortable?0<o.length&&o[0][0]==c?(f.setAttribute("aria-sort","asc"==o[0][1]?"ascending":"descending"),f.setAttribute("aria-label",g+("asc"==(l[c].asSorting[o[0][2]+1]?l[c].asSorting[o[0][2]+1]:l[c].asSorting[0])?p.sSortAscending:p.sSortDescending))):f.setAttribute("aria-label",g+("asc"==l[c].asSorting[0]?p.sSortAscending:p.sSortDescending)):f.setAttribute("aria-label",g);a.bSorted=!0;h(a.oInstance).trigger("sort",a);
a.oFeatures.bFilter?M(a,a.oPreviousSearch,1):(a.aiDisplay=a.aiDisplayMaster.slice(),a._iDisplayStart=0,B(a),z(a))}function ga(a,b,c,d){Qa(b,{},function(b){if(!1!==a.aoColumns[c].bSortable){var g=function(){var d,g;if(b.shiftKey){for(var e=!1,h=0;h<a.aaSorting.length;h++)if(a.aaSorting[h][0]==c){e=!0;d=a.aaSorting[h][0];g=a.aaSorting[h][2]+1;a.aoColumns[d].asSorting[g]?(a.aaSorting[h][1]=a.aoColumns[d].asSorting[g],a.aaSorting[h][2]=g):a.aaSorting.splice(h,1);break}!1===e&&a.aaSorting.push([c,a.aoColumns[c].asSorting[0],
0])}else 1==a.aaSorting.length&&a.aaSorting[0][0]==c?(d=a.aaSorting[0][0],g=a.aaSorting[0][2]+1,a.aoColumns[d].asSorting[g]||(g=0),a.aaSorting[0][1]=a.aoColumns[d].asSorting[g],a.aaSorting[0][2]=g):(a.aaSorting.splice(0,a.aaSorting.length),a.aaSorting.push([c,a.aoColumns[c].asSorting[0],0]));P(a)};a.oFeatures.bProcessing?(G(a,!0),setTimeout(function(){g();a.oFeatures.bServerSide||G(a,!1)},0)):g();"function"==typeof d&&d(a)}})}function Q(a){var b,c,d,f,g,e=a.aoColumns.length,j=a.oClasses;for(b=0;b<
e;b++)a.aoColumns[b].bSortable&&h(a.aoColumns[b].nTh).removeClass(j.sSortAsc+" "+j.sSortDesc+" "+a.aoColumns[b].sSortingClass);f=null!==a.aaSortingFixed?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(b=0;b<a.aoColumns.length;b++)if(a.aoColumns[b].bSortable){g=a.aoColumns[b].sSortingClass;d=-1;for(c=0;c<f.length;c++)if(f[c][0]==b){g="asc"==f[c][1]?j.sSortAsc:j.sSortDesc;d=c;break}h(a.aoColumns[b].nTh).addClass(g);a.bJUI&&(c=h("span."+j.sSortIcon,a.aoColumns[b].nTh),c.removeClass(j.sSortJUIAsc+
" "+j.sSortJUIDesc+" "+j.sSortJUI+" "+j.sSortJUIAscAllowed+" "+j.sSortJUIDescAllowed),c.addClass(-1==d?a.aoColumns[b].sSortingClassJUI:"asc"==f[d][1]?j.sSortJUIAsc:j.sSortJUIDesc))}else h(a.aoColumns[b].nTh).addClass(a.aoColumns[b].sSortingClass);g=j.sSortColumn;if(a.oFeatures.bSort&&a.oFeatures.bSortClasses){d=L(a);if(a.oFeatures.bDeferRender)h(d).removeClass(g+"1 "+g+"2 "+g+"3");else if(d.length>=e)for(b=0;b<e;b++)if(-1!=d[b].className.indexOf(g+"1"))for(c=0,a=d.length/e;c<a;c++)d[e*c+b].className=
h.trim(d[e*c+b].className.replace(g+"1",""));else if(-1!=d[b].className.indexOf(g+"2"))for(c=0,a=d.length/e;c<a;c++)d[e*c+b].className=h.trim(d[e*c+b].className.replace(g+"2",""));else if(-1!=d[b].className.indexOf(g+"3"))for(c=0,a=d.length/e;c<a;c++)d[e*c+b].className=h.trim(d[e*c+b].className.replace(" "+g+"3",""));var j=1,o;for(b=0;b<f.length;b++){o=parseInt(f[b][0],10);for(c=0,a=d.length/e;c<a;c++)d[e*c+o].className+=" "+g+j;3>j&&j++}}}function qa(a){if(a.oFeatures.bStateSave&&!a.bDestroying){var b,
c;b=a.oScroll.bInfinite;var d={iCreate:(new Date).getTime(),iStart:b?0:a._iDisplayStart,iEnd:b?a._iDisplayLength:a._iDisplayEnd,iLength:a._iDisplayLength,aaSorting:h.extend(!0,[],a.aaSorting),oSearch:h.extend(!0,{},a.oPreviousSearch),aoSearchCols:h.extend(!0,[],a.aoPreSearchCols),abVisCols:[]};for(b=0,c=a.aoColumns.length;b<c;b++)d.abVisCols.push(a.aoColumns[b].bVisible);D(a,"aoStateSaveParams","stateSaveParams",[a,d]);a.fnStateSave.call(a.oInstance,a,d)}}function Ra(a,b){if(a.oFeatures.bStateSave){var c=
a.fnStateLoad.call(a.oInstance,a);if(c){var d=D(a,"aoStateLoadParams","stateLoadParams",[a,c]);if(-1===h.inArray(!1,d)){a.oLoadedState=h.extend(!0,{},c);a._iDisplayStart=c.iStart;a.iInitDisplayStart=c.iStart;a._iDisplayEnd=c.iEnd;a._iDisplayLength=c.iLength;a.aaSorting=c.aaSorting.slice();a.saved_aaSorting=c.aaSorting.slice();h.extend(a.oPreviousSearch,c.oSearch);h.extend(!0,a.aoPreSearchCols,c.aoSearchCols);b.saved_aoColumns=[];for(d=0;d<c.abVisCols.length;d++)b.saved_aoColumns[d]={},b.saved_aoColumns[d].bVisible=
c.abVisCols[d];D(a,"aoStateLoaded","stateLoaded",[a,c])}}}}function Sa(a){for(var b=V.location.pathname.split("/"),a=a+"_"+b[b.length-1].replace(/[\/:]/g,"").toLowerCase()+"=",b=l.cookie.split(";"),c=0;c<b.length;c++){for(var d=b[c];" "==d.charAt(0);)d=d.substring(1,d.length);if(0===d.indexOf(a))return decodeURIComponent(d.substring(a.length,d.length))}return null}function t(a){for(var b=0;b<j.settings.length;b++)if(j.settings[b].nTable===a)return j.settings[b];return null}function S(a){for(var b=
[],a=a.aoData,c=0,d=a.length;c<d;c++)null!==a[c].nTr&&b.push(a[c].nTr);return b}function L(a,b){var c=[],d,f,g,e,h,j;f=0;var o=a.aoData.length;b!==m&&(f=b,o=b+1);for(g=f;g<o;g++)if(j=a.aoData[g],null!==j.nTr){f=[];for(e=0,h=j.nTr.childNodes.length;e<h;e++)d=j.nTr.childNodes[e].nodeName.toLowerCase(),("td"==d||"th"==d)&&f.push(j.nTr.childNodes[e]);d=0;for(e=0,h=a.aoColumns.length;e<h;e++)a.aoColumns[e].bVisible?c.push(f[e-d]):(c.push(j._anHidden[e]),d++)}return c}function F(a,b,c){a=null===a?"DataTables warning: "+
c:"DataTables warning (table id = '"+a.sTableId+"'): "+c;if(0===b)if("alert"==j.ext.sErrMode)alert(a);else throw Error(a);else V.console&&console.log&&console.log(a)}function p(a,b,c,d){d===m&&(d=c);b[c]!==m&&(a[d]=b[c])}function Ta(a,b){for(var c in b)b.hasOwnProperty(c)&&("object"===typeof e[c]&&!1===h.isArray(b[c])?h.extend(!0,a[c],b[c]):a[c]=b[c]);return a}function Qa(a,b,c){h(a).bind("click.DT",b,function(b){a.blur();c(b)}).bind("keypress.DT",b,function(a){13===a.which&&c(a)}).bind("selectstart.DT",
function(){return!1})}function C(a,b,c,d){c&&a[b].push({fn:c,sName:d})}function D(a,b,c,d){for(var b=a[b],f=[],g=b.length-1;0<=g;g--)f.push(b[g].fn.apply(a.oInstance,d));null!==c&&h(a.oInstance).trigger(c,d);return f}function Ua(a){return function(){var b=[t(this[j.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return j.ext.oApi[a].apply(this,b)}}var Va=V.JSON?JSON.stringify:function(a){var b=typeof a;if("object"!==b||null===a)return"string"===b&&(a='"'+a+'"'),a+"";var c,d,f=[],g=
h.isArray(a);for(c in a)d=a[c],b=typeof d,"string"===b?d='"'+d+'"':"object"===b&&null!==d&&(d=Va(d)),f.push((g?"":'"'+c+'":')+d);return(g?"[":"{")+f+(g?"]":"}")};this.$=function(a,b){var c,d,f=[],g=t(this[j.ext.iApiIndex]);b||(b={});b=h.extend({},{filter:"none",order:"current",page:"all"},b);if("current"==b.page)for(c=g._iDisplayStart,d=g.fnDisplayEnd();c<d;c++)f.push(g.aoData[g.aiDisplay[c]].nTr);else if("current"==b.order&&"none"==b.filter)for(c=0,d=g.aiDisplayMaster.length;c<d;c++)f.push(g.aoData[g.aiDisplayMaster[c]].nTr);
else if("current"==b.order&&"applied"==b.filter)for(c=0,d=g.aiDisplay.length;c<d;c++)f.push(g.aoData[g.aiDisplay[c]].nTr);else if("original"==b.order&&"none"==b.filter)for(c=0,d=g.aoData.length;c<d;c++)f.push(g.aoData[c].nTr);else if("original"==b.order&&"applied"==b.filter)for(c=0,d=g.aoData.length;c<d;c++)-1!==h.inArray(c,g.aiDisplay)&&f.push(g.aoData[c].nTr);else F(g,1,"Unknown selection options");d=h(f);c=d.filter(a);d=d.find(a);return h([].concat(h.makeArray(c),h.makeArray(d)))};this._=function(a,
b){var c=[],d,f,g=this.$(a,b);for(d=0,f=g.length;d<f;d++)c.push(this.fnGetData(g[d]));return c};this.fnAddData=function(a,b){if(0===a.length)return[];var c=[],d,f=t(this[j.ext.iApiIndex]);if("object"===typeof a[0]&&null!==a[0])for(var g=0;g<a.length;g++){d=H(f,a[g]);if(-1==d)return c;c.push(d)}else{d=H(f,a);if(-1==d)return c;c.push(d)}f.aiDisplay=f.aiDisplayMaster.slice();(b===m||b)&&$(f);return c};this.fnAdjustColumnSizing=function(a){var b=t(this[j.ext.iApiIndex]);k(b);a===m||a?this.fnDraw(!1):
(""!==b.oScroll.sX||""!==b.oScroll.sY)&&this.oApi._fnScrollDraw(b)};this.fnClearTable=function(a){var b=t(this[j.ext.iApiIndex]);ea(b);(a===m||a)&&z(b)};this.fnClose=function(a){for(var b=t(this[j.ext.iApiIndex]),c=0;c<b.aoOpenRows.length;c++)if(b.aoOpenRows[c].nParent==a)return(a=b.aoOpenRows[c].nTr.parentNode)&&a.removeChild(b.aoOpenRows[c].nTr),b.aoOpenRows.splice(c,1),0;return 1};this.fnDeleteRow=function(a,b,c){var d=t(this[j.ext.iApiIndex]),f,g,a="object"===typeof a?K(d,a):a,e=d.aoData.splice(a,
1);for(f=0,g=d.aoData.length;f<g;f++)if(null!==d.aoData[f].nTr)d.aoData[f].nTr._DT_RowIndex=f;f=h.inArray(a,d.aiDisplay);d.asDataSearch.splice(f,1);fa(d.aiDisplayMaster,a);fa(d.aiDisplay,a);"function"===typeof b&&b.call(this,d,e);if(d._iDisplayStart>=d.aiDisplay.length&&(d._iDisplayStart-=d._iDisplayLength,0>d._iDisplayStart))d._iDisplayStart=0;if(c===m||c)B(d),z(d);return e};this.fnDestroy=function(a){var b=t(this[j.ext.iApiIndex]),c=b.nTableWrapper.parentNode,d=b.nTBody,f,g,a=a===m?!1:!0;b.bDestroying=
!0;D(b,"aoDestroyCallback","destroy",[b]);for(f=0,g=b.aoColumns.length;f<g;f++)!1===b.aoColumns[f].bVisible&&this.fnSetColumnVis(f,!0);h(b.nTableWrapper).find("*").andSelf().unbind(".DT");h("tbody>tr>td."+b.oClasses.sRowEmpty,b.nTable).parent().remove();b.nTable!=b.nTHead.parentNode&&(h(b.nTable).children("thead").remove(),b.nTable.appendChild(b.nTHead));b.nTFoot&&b.nTable!=b.nTFoot.parentNode&&(h(b.nTable).children("tfoot").remove(),b.nTable.appendChild(b.nTFoot));b.nTable.parentNode.removeChild(b.nTable);
h(b.nTableWrapper).remove();b.aaSorting=[];b.aaSortingFixed=[];Q(b);h(S(b)).removeClass(b.asStripeClasses.join(" "));h("th, td",b.nTHead).removeClass([b.oClasses.sSortable,b.oClasses.sSortableAsc,b.oClasses.sSortableDesc,b.oClasses.sSortableNone].join(" "));b.bJUI&&(h("th span."+b.oClasses.sSortIcon+", td span."+b.oClasses.sSortIcon,b.nTHead).remove(),h("th, td",b.nTHead).each(function(){var a=h("div."+b.oClasses.sSortJUIWrapper,this),c=a.contents();h(this).append(c);a.remove()}));!a&&b.nTableReinsertBefore?
c.insertBefore(b.nTable,b.nTableReinsertBefore):a||c.appendChild(b.nTable);for(f=0,g=b.aoData.length;f<g;f++)null!==b.aoData[f].nTr&&d.appendChild(b.aoData[f].nTr);if(!0===b.oFeatures.bAutoWidth)b.nTable.style.width=q(b.sDestroyWidth);h(d).children("tr:even").addClass(b.asDestroyStripes[0]);h(d).children("tr:odd").addClass(b.asDestroyStripes[1]);for(f=0,g=j.settings.length;f<g;f++)j.settings[f]==b&&j.settings.splice(f,1);b=null};this.fnDraw=function(a){var b=t(this[j.ext.iApiIndex]);!1===a?(B(b),
z(b)):$(b)};this.fnFilter=function(a,b,c,d,f,g){var e=t(this[j.ext.iApiIndex]);if(e.oFeatures.bFilter){if(c===m||null===c)c=!1;if(d===m||null===d)d=!0;if(f===m||null===f)f=!0;if(g===m||null===g)g=!0;if(b===m||null===b){if(M(e,{sSearch:a+"",bRegex:c,bSmart:d,bCaseInsensitive:g},1),f&&e.aanFeatures.f){b=e.aanFeatures.f;c=0;for(d=b.length;c<d;c++)h(b[c]._DT_Input).val(a)}}else h.extend(e.aoPreSearchCols[b],{sSearch:a+"",bRegex:c,bSmart:d,bCaseInsensitive:g}),M(e,e.oPreviousSearch,1)}};this.fnGetData=
function(a,b){var c=t(this[j.ext.iApiIndex]);if(a!==m){var d=a;if("object"===typeof a){var f=a.nodeName.toLowerCase();"tr"===f?d=K(c,a):"td"===f&&(d=K(c,a.parentNode),b=da(c,d,a))}return b!==m?w(c,d,b,""):c.aoData[d]!==m?c.aoData[d]._aData:null}return Y(c)};this.fnGetNodes=function(a){var b=t(this[j.ext.iApiIndex]);return a!==m?b.aoData[a]!==m?b.aoData[a].nTr:null:S(b)};this.fnGetPosition=function(a){var b=t(this[j.ext.iApiIndex]),c=a.nodeName.toUpperCase();if("TR"==c)return K(b,a);return"TD"==c||
"TH"==c?(c=K(b,a.parentNode),a=da(b,c,a),[c,r(b,a),a]):null};this.fnIsOpen=function(a){for(var b=t(this[j.ext.iApiIndex]),c=0;c<b.aoOpenRows.length;c++)if(b.aoOpenRows[c].nParent==a)return!0;return!1};this.fnOpen=function(a,b,c){var d=t(this[j.ext.iApiIndex]),f=S(d);if(-1!==h.inArray(a,f)){this.fnClose(a);var f=l.createElement("tr"),g=l.createElement("td");f.appendChild(g);g.className=c;g.colSpan=v(d);"string"===typeof b?g.innerHTML=b:h(g).html(b);b=h("tr",d.nTBody);-1!=h.inArray(a,b)&&h(f).insertAfter(a);
d.aoOpenRows.push({nTr:f,nParent:a});return f}};this.fnPageChange=function(a,b){var c=t(this[j.ext.iApiIndex]);pa(c,a);B(c);(b===m||b)&&z(c)};this.fnSetColumnVis=function(a,b,c){var d=t(this[j.ext.iApiIndex]),f,g,e=d.aoColumns,h=d.aoData,o,n;if(e[a].bVisible!=b){if(b){for(f=g=0;f<a;f++)e[f].bVisible&&g++;n=g>=v(d);if(!n)for(f=a;f<e.length;f++)if(e[f].bVisible){o=f;break}for(f=0,g=h.length;f<g;f++)null!==h[f].nTr&&(n?h[f].nTr.appendChild(h[f]._anHidden[a]):h[f].nTr.insertBefore(h[f]._anHidden[a],L(d,
f)[o]))}else for(f=0,g=h.length;f<g;f++)null!==h[f].nTr&&(o=L(d,f)[a],h[f]._anHidden[a]=o,o.parentNode.removeChild(o));e[a].bVisible=b;U(d,d.aoHeader);d.nTFoot&&U(d,d.aoFooter);for(f=0,g=d.aoOpenRows.length;f<g;f++)d.aoOpenRows[f].nTr.colSpan=v(d);if(c===m||c)k(d),z(d);qa(d)}};this.fnSettings=function(){return t(this[j.ext.iApiIndex])};this.fnSort=function(a){var b=t(this[j.ext.iApiIndex]);b.aaSorting=a;P(b)};this.fnSortListener=function(a,b,c){ga(t(this[j.ext.iApiIndex]),a,b,c)};this.fnUpdate=function(a,
b,c,d,f){var e=t(this[j.ext.iApiIndex]),b="object"===typeof b?K(e,b):b;if(e.__fnUpdateDeep===m&&h.isArray(a)&&"object"===typeof a){e.aoData[b]._aData=a.slice();e.__fnUpdateDeep=!0;for(c=0;c<e.aoColumns.length;c++)this.fnUpdate(w(e,b,c),b,c,!1,!1);e.__fnUpdateDeep=m}else if(e.__fnUpdateDeep===m&&null!==a&&"object"===typeof a){e.aoData[b]._aData=h.extend(!0,{},a);e.__fnUpdateDeep=!0;for(c=0;c<e.aoColumns.length;c++)this.fnUpdate(w(e,b,c),b,c,!1,!1);e.__fnUpdateDeep=m}else{I(e,b,c,a);var a=w(e,b,c,"display"),
i=e.aoColumns[c];null!==i.fnRender&&(a=R(e,b,c),i.bUseRendered&&I(e,b,c,a));if(null!==e.aoData[b].nTr)L(e,b)[c].innerHTML=a}c=h.inArray(b,e.aiDisplay);e.asDataSearch[c]=ma(e,X(e,b,"filter"));(f===m||f)&&k(e);(d===m||d)&&$(e);return 0};this.fnVersionCheck=j.ext.fnVersionCheck;this.oApi={_fnExternApiFunc:Ua,_fnInitialise:aa,_fnInitComplete:Z,_fnLanguageCompat:oa,_fnAddColumn:o,_fnColumnOptions:s,_fnAddData:H,_fnCreateTr:ca,_fnGatherData:ua,_fnBuildHead:va,_fnDrawHead:U,_fnDraw:z,_fnReDraw:$,_fnAjaxUpdate:wa,
_fnAjaxParameters:Ea,_fnAjaxUpdateDraw:Fa,_fnServerParams:ia,_fnAddOptionsHtml:xa,_fnFeatureHtmlTable:Ba,_fnScrollDraw:Ka,_fnAdjustColumnSizing:k,_fnFeatureHtmlFilter:za,_fnFilterComplete:M,_fnFilterCustom:Ia,_fnFilterColumn:Ha,_fnFilter:Ga,_fnBuildSearchArray:ja,_fnBuildSearchRow:ma,_fnFilterCreateSearch:ka,_fnDataToSearch:la,_fnSort:P,_fnSortAttachListener:ga,_fnSortingClasses:Q,_fnFeatureHtmlPaginate:Da,_fnPageChange:pa,_fnFeatureHtmlInfo:Ca,_fnUpdateInfo:Ja,_fnFeatureHtmlLength:ya,_fnFeatureHtmlProcessing:Aa,
_fnProcessingDisplay:G,_fnVisibleToColumnIndex:x,_fnColumnIndexToVisible:r,_fnNodeToDataIndex:K,_fnVisbleColumns:v,_fnCalculateEnd:B,_fnConvertToWidth:La,_fnCalculateColumnWidths:ba,_fnScrollingWidthAdjust:Na,_fnGetWidestNode:Ma,_fnGetMaxLenString:Oa,_fnStringToCss:q,_fnDetectType:A,_fnSettingsFromNode:t,_fnGetDataMaster:Y,_fnGetTrNodes:S,_fnGetTdNodes:L,_fnEscapeRegex:na,_fnDeleteIndex:fa,_fnReOrderIndex:E,_fnColumnOrdering:y,_fnLog:F,_fnClearTable:ea,_fnSaveState:qa,_fnLoadState:Ra,_fnCreateCookie:function(a,
b,c,d,e){var g=new Date;g.setTime(g.getTime()+1E3*c);var c=V.location.pathname.split("/"),a=a+"_"+c.pop().replace(/[\/:]/g,"").toLowerCase(),i;null!==e?(i="function"===typeof h.parseJSON?h.parseJSON(b):eval("("+b+")"),b=e(a,i,g.toGMTString(),c.join("/")+"/")):b=a+"="+encodeURIComponent(b)+"; expires="+g.toGMTString()+"; path="+c.join("/")+"/";e="";g=9999999999999;if(4096<(null!==Sa(a)?l.cookie.length:b.length+l.cookie.length)+10){for(var a=l.cookie.split(";"),j=0,o=a.length;j<o;j++)if(-1!=a[j].indexOf(d)){var k=
a[j].split("=");try{i=eval("("+decodeURIComponent(k[1])+")")}catch(m){continue}if(i.iCreate&&i.iCreate<g)e=k[0],g=i.iCreate}if(""!==e)l.cookie=e+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; path="+c.join("/")+"/"}l.cookie=b},_fnReadCookie:Sa,_fnDetectHeader:T,_fnGetUniqueThs:O,_fnScrollBarWidth:Pa,_fnApplyToChildren:N,_fnMap:p,_fnGetRowData:X,_fnGetCellData:w,_fnSetCellData:I,_fnGetObjectDataFn:W,_fnSetObjectDataFn:ta,_fnApplyColumnDefs:J,_fnBindAction:Qa,_fnExtend:Ta,_fnCallbackReg:C,_fnCallbackFire:D,
_fnJsonString:Va,_fnRender:R,_fnNodeToColumnIndex:da,_fnInfoMacros:ha};h.extend(j.ext.oApi,this.oApi);for(var ra in j.ext.oApi)ra&&(this[ra]=Ua(ra));var sa=this;return this.each(function(){var a=0,b,c,d;c=this.getAttribute("id");var f=!1,g=!1;if("table"!=this.nodeName.toLowerCase())F(null,0,"Attempted to initialise DataTables on a node which is not a table: "+this.nodeName);else{for(a=0,b=j.settings.length;a<b;a++){if(j.settings[a].nTable==this){if(e===m||e.bRetrieve)return j.settings[a].oInstance;
if(e.bDestroy){j.settings[a].oInstance.fnDestroy();break}else{F(j.settings[a],0,"Cannot reinitialise DataTable.\n\nTo retrieve the DataTables object for this table, pass no arguments or see the docs for bRetrieve and bDestroy");return}}if(j.settings[a].sTableId==this.id){j.settings.splice(a,1);break}}if(null===c||""===c)this.id=c="DataTables_Table_"+j.ext._oExternConfig.iNextUnique++;var i=h.extend(!0,{},j.models.oSettings,{nTable:this,oApi:sa.oApi,oInit:e,sDestroyWidth:h(this).width(),sInstance:c,
sTableId:c});j.settings.push(i);i.oInstance=1===sa.length?sa:h(this).dataTable();e||(e={});e.oLanguage&&oa(e.oLanguage);e=Ta(h.extend(!0,{},j.defaults),e);p(i.oFeatures,e,"bPaginate");p(i.oFeatures,e,"bLengthChange");p(i.oFeatures,e,"bFilter");p(i.oFeatures,e,"bSort");p(i.oFeatures,e,"bInfo");p(i.oFeatures,e,"bProcessing");p(i.oFeatures,e,"bAutoWidth");p(i.oFeatures,e,"bSortClasses");p(i.oFeatures,e,"bServerSide");p(i.oFeatures,e,"bDeferRender");p(i.oScroll,e,"sScrollX","sX");p(i.oScroll,e,"sScrollXInner",
"sXInner");p(i.oScroll,e,"sScrollY","sY");p(i.oScroll,e,"bScrollCollapse","bCollapse");p(i.oScroll,e,"bScrollInfinite","bInfinite");p(i.oScroll,e,"iScrollLoadGap","iLoadGap");p(i.oScroll,e,"bScrollAutoCss","bAutoCss");p(i,e,"asStripeClasses");p(i,e,"asStripClasses","asStripeClasses");p(i,e,"fnServerData");p(i,e,"fnFormatNumber");p(i,e,"sServerMethod");p(i,e,"aaSorting");p(i,e,"aaSortingFixed");p(i,e,"aLengthMenu");p(i,e,"sPaginationType");p(i,e,"sAjaxSource");p(i,e,"sAjaxDataProp");p(i,e,"iCookieDuration");
p(i,e,"sCookiePrefix");p(i,e,"sDom");p(i,e,"bSortCellsTop");p(i,e,"iTabIndex");p(i,e,"oSearch","oPreviousSearch");p(i,e,"aoSearchCols","aoPreSearchCols");p(i,e,"iDisplayLength","_iDisplayLength");p(i,e,"bJQueryUI","bJUI");p(i,e,"fnCookieCallback");p(i,e,"fnStateLoad");p(i,e,"fnStateSave");p(i.oLanguage,e,"fnInfoCallback");C(i,"aoDrawCallback",e.fnDrawCallback,"user");C(i,"aoServerParams",e.fnServerParams,"user");C(i,"aoStateSaveParams",e.fnStateSaveParams,"user");C(i,"aoStateLoadParams",e.fnStateLoadParams,
"user");C(i,"aoStateLoaded",e.fnStateLoaded,"user");C(i,"aoRowCallback",e.fnRowCallback,"user");C(i,"aoRowCreatedCallback",e.fnCreatedRow,"user");C(i,"aoHeaderCallback",e.fnHeaderCallback,"user");C(i,"aoFooterCallback",e.fnFooterCallback,"user");C(i,"aoInitComplete",e.fnInitComplete,"user");C(i,"aoPreDrawCallback",e.fnPreDrawCallback,"user");i.oFeatures.bServerSide&&i.oFeatures.bSort&&i.oFeatures.bSortClasses?C(i,"aoDrawCallback",Q,"server_side_sort_classes"):i.oFeatures.bDeferRender&&C(i,"aoDrawCallback",
Q,"defer_sort_classes");if(e.bJQueryUI){if(h.extend(i.oClasses,j.ext.oJUIClasses),e.sDom===j.defaults.sDom&&"lfrtip"===j.defaults.sDom)i.sDom='<"H"lfr>t<"F"ip>'}else h.extend(i.oClasses,j.ext.oStdClasses);h(this).addClass(i.oClasses.sTable);if(""!==i.oScroll.sX||""!==i.oScroll.sY)i.oScroll.iBarWidth=Pa();if(i.iInitDisplayStart===m)i.iInitDisplayStart=e.iDisplayStart,i._iDisplayStart=e.iDisplayStart;if(e.bStateSave)i.oFeatures.bStateSave=!0,Ra(i,e),C(i,"aoDrawCallback",qa,"state_save");if(null!==e.iDeferLoading)i.bDeferLoading=
!0,a=h.isArray(e.iDeferLoading),i._iRecordsDisplay=a?e.iDeferLoading[0]:e.iDeferLoading,i._iRecordsTotal=a?e.iDeferLoading[1]:e.iDeferLoading;null!==e.aaData&&(g=!0);""!==e.oLanguage.sUrl?(i.oLanguage.sUrl=e.oLanguage.sUrl,h.getJSON(i.oLanguage.sUrl,null,function(a){oa(a);h.extend(!0,i.oLanguage,e.oLanguage,a);aa(i)}),f=!0):h.extend(!0,i.oLanguage,e.oLanguage);if(null===e.asStripeClasses)i.asStripeClasses=[i.oClasses.sStripeOdd,i.oClasses.sStripeEven];c=!1;d=h(this).children("tbody").children("tr");
for(a=0,b=i.asStripeClasses.length;a<b;a++)if(d.filter(":lt(2)").hasClass(i.asStripeClasses[a])){c=!0;break}if(c)i.asDestroyStripes=["",""],h(d[0]).hasClass(i.oClasses.sStripeOdd)&&(i.asDestroyStripes[0]+=i.oClasses.sStripeOdd+" "),h(d[0]).hasClass(i.oClasses.sStripeEven)&&(i.asDestroyStripes[0]+=i.oClasses.sStripeEven),h(d[1]).hasClass(i.oClasses.sStripeOdd)&&(i.asDestroyStripes[1]+=i.oClasses.sStripeOdd+" "),h(d[1]).hasClass(i.oClasses.sStripeEven)&&(i.asDestroyStripes[1]+=i.oClasses.sStripeEven),
d.removeClass(i.asStripeClasses.join(" "));c=[];a=this.getElementsByTagName("thead");0!==a.length&&(T(i.aoHeader,a[0]),c=O(i));if(null===e.aoColumns){d=[];for(a=0,b=c.length;a<b;a++)d.push(null)}else d=e.aoColumns;for(a=0,b=d.length;a<b;a++){if(e.saved_aoColumns!==m&&e.saved_aoColumns.length==b)null===d[a]&&(d[a]={}),d[a].bVisible=e.saved_aoColumns[a].bVisible;o(i,c?c[a]:null)}J(i,e.aoColumnDefs,d,function(a,b){s(i,a,b)});for(a=0,b=i.aaSorting.length;a<b;a++){i.aaSorting[a][0]>=i.aoColumns.length&&
(i.aaSorting[a][0]=0);var k=i.aoColumns[i.aaSorting[a][0]];i.aaSorting[a][2]===m&&(i.aaSorting[a][2]=0);e.aaSorting===m&&i.saved_aaSorting===m&&(i.aaSorting[a][1]=k.asSorting[0]);for(c=0,d=k.asSorting.length;c<d;c++)if(i.aaSorting[a][1]==k.asSorting[c]){i.aaSorting[a][2]=c;break}}Q(i);a=h(this).children("caption").each(function(){this._captionSide=h(this).css("caption-side")});b=h(this).children("thead");0===b.length&&(b=[l.createElement("thead")],this.appendChild(b[0]));i.nTHead=b[0];b=h(this).children("tbody");
0===b.length&&(b=[l.createElement("tbody")],this.appendChild(b[0]));i.nTBody=b[0];i.nTBody.setAttribute("role","alert");i.nTBody.setAttribute("aria-live","polite");i.nTBody.setAttribute("aria-relevant","all");b=h(this).children("tfoot");if(0===b.length&&0<a.length&&(""!==i.oScroll.sX||""!==i.oScroll.sY))b=[l.createElement("tfoot")],this.appendChild(b[0]);if(0<b.length)i.nTFoot=b[0],T(i.aoFooter,i.nTFoot);if(g)for(a=0;a<e.aaData.length;a++)H(i,e.aaData[a]);else ua(i);i.aiDisplay=i.aiDisplayMaster.slice();
i.bInitialised=!0;!1===f&&aa(i)}})};j.fnVersionCheck=function(e){for(var h=function(e,h){for(;e.length<h;)e+="0";return e},m=j.ext.sVersion.split("."),e=e.split("."),k="",l="",r=0,v=e.length;r<v;r++)k+=h(m[r],3),l+=h(e[r],3);return parseInt(k,10)>=parseInt(l,10)};j.fnIsDataTable=function(e){for(var h=j.settings,m=0;m<h.length;m++)if(h[m].nTable===e||h[m].nScrollHead===e||h[m].nScrollFoot===e)return!0;return!1};j.fnTables=function(e){var o=[];jQuery.each(j.settings,function(j,k){(!e||!0===e&&h(k.nTable).is(":visible"))&&
o.push(k.nTable)});return o};j.version="1.9.1";j.settings=[];j.models={};j.models.ext={afnFiltering:[],afnSortData:[],aoFeatures:[],aTypes:[],fnVersionCheck:j.fnVersionCheck,iApiIndex:0,ofnSearch:{},oApi:{},oStdClasses:{},oJUIClasses:{},oPagination:{},oSort:{},sVersion:j.version,sErrMode:"alert",_oExternConfig:{iNextUnique:0}};j.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0};j.models.oRow={nTr:null,_aData:[],_aSortData:[],_anHidden:[],_sRowStripe:""};j.models.oColumn={aDataSort:null,
asSorting:null,bSearchable:null,bSortable:null,bUseRendered:null,bVisible:null,_bAutoType:!0,fnCreatedCell:null,fnGetData:null,fnRender:null,fnSetData:null,mDataProp:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null};j.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],
asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bJQueryUI:!1,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollAutoCss:!0,bScrollCollapse:!1,bScrollInfinite:!1,bServerSide:!1,bSort:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCookieCallback:null,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(e){if(1E3>e)return e;for(var h=e+"",e=h.split(""),j="",h=h.length,k=0;k<h;k++)0===k%3&&0!==k&&(j=this.oLanguage.sInfoThousands+
j),j=e[h-k-1]+j;return j},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:function(e,j,m,k){k.jqXHR=h.ajax({url:e,data:j,success:function(e){h(k.oInstance).trigger("xhr",k);m(e)},dataType:"json",cache:!1,type:k.sServerMethod,error:function(e,h){"parsererror"==h&&k.oApi._fnLog(k,0,"DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.")}})},fnServerParams:null,fnStateLoad:function(e){var e=
this.oApi._fnReadCookie(e.sCookiePrefix+e.sInstance),j;try{j="function"===typeof h.parseJSON?h.parseJSON(e):eval("("+e+")")}catch(m){j=null}return j},fnStateLoadParams:null,fnStateLoaded:null,fnStateSave:function(e,h){this.oApi._fnCreateCookie(e.sCookiePrefix+e.sInstance,this.oApi._fnJsonString(h),e.iCookieDuration,e.sCookiePrefix,e.fnCookieCallback)},fnStateSaveParams:null,iCookieDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iScrollLoadGap:100,iTabIndex:0,oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",
sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sInfoThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sUrl:"",sZeroRecords:"No matching records found"},
oSearch:h.extend({},j.models.oSearch),sAjaxDataProp:"aaData",sAjaxSource:null,sCookiePrefix:"SpryMedia_DataTables_",sDom:"lfrtip",sPaginationType:"two_button",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET"};j.defaults.columns={aDataSort:null,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bUseRendered:!0,bVisible:!0,fnCreatedCell:null,fnRender:null,iDataSort:-1,mDataProp:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,
sType:null,sWidth:null};j.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortClasses:null,bStateSave:null},oScroll:{bAutoCss:null,bCollapse:null,bInfinite:null,iBarWidth:0,iLoadGap:null,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aoColumns:[],aoHeader:[],aoFooter:[],asDataSearch:[],oPreviousSearch:{},aoPreSearchCols:[],
aaSorting:null,aaSortingFixed:null,asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,sPaginationType:"two_button",iCookieDuration:0,sCookiePrefix:"",fnCookieCallback:null,
aoStateSave:[],aoStateLoad:[],oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iDisplayEnd:10,_iRecordsTotal:0,_iRecordsDisplay:0,bJUI:null,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return this.oFeatures.bServerSide?parseInt(this._iRecordsTotal,
10):this.aiDisplayMaster.length},fnRecordsDisplay:function(){return this.oFeatures.bServerSide?parseInt(this._iRecordsDisplay,10):this.aiDisplay.length},fnDisplayEnd:function(){return this.oFeatures.bServerSide?!1===this.oFeatures.bPaginate||-1==this._iDisplayLength?this._iDisplayStart+this.aiDisplay.length:Math.min(this._iDisplayStart+this._iDisplayLength,this._iRecordsDisplay):this._iDisplayEnd},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null};j.ext=h.extend(!0,{},j.models.ext);
h.extend(j.ext.oStdClasses,{sTable:"dataTable",sPagePrevEnabled:"paginate_enabled_previous",sPagePrevDisabled:"paginate_disabled_previous",sPageNextEnabled:"paginate_enabled_next",sPageNextDisabled:"paginate_disabled_next",sPageJUINext:"",sPageJUIPrev:"",sPageButton:"paginate_button",sPageButtonActive:"paginate_active",sPageButtonStaticDisabled:"paginate_button paginate_button_disabled",sPageFirst:"first",sPagePrevious:"previous",sPageNext:"next",sPageLast:"last",sStripeOdd:"odd",sStripeEven:"even",
sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",
sSortIcon:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sFooterTH:""});h.extend(j.ext.oJUIClasses,j.ext.oStdClasses,{sPagePrevEnabled:"fg-button ui-button ui-state-default ui-corner-left",sPagePrevDisabled:"fg-button ui-button ui-state-default ui-corner-left ui-state-disabled",sPageNextEnabled:"fg-button ui-button ui-state-default ui-corner-right",
sPageNextDisabled:"fg-button ui-button ui-state-default ui-corner-right ui-state-disabled",sPageJUINext:"ui-icon ui-icon-circle-arrow-e",sPageJUIPrev:"ui-icon ui-icon-circle-arrow-w",sPageButton:"fg-button ui-button ui-state-default",sPageButtonActive:"fg-button ui-button ui-state-default ui-state-disabled",sPageButtonStaticDisabled:"fg-button ui-button ui-state-default ui-state-disabled",sPageFirst:"first ui-corner-tl ui-corner-bl",sPageLast:"last ui-corner-tr ui-corner-br",sPaging:"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",
sSortAsc:"ui-state-default",sSortDesc:"ui-state-default",sSortable:"ui-state-default",sSortableAsc:"ui-state-default",sSortableDesc:"ui-state-default",sSortableNone:"ui-state-default",sSortJUIAsc:"css_right ui-icon ui-icon-triangle-1-n",sSortJUIDesc:"css_right ui-icon ui-icon-triangle-1-s",sSortJUI:"css_right ui-icon ui-icon-carat-2-n-s",sSortJUIAscAllowed:"css_right ui-icon ui-icon-carat-1-n",sSortJUIDescAllowed:"css_right ui-icon ui-icon-carat-1-s",sSortJUIWrapper:"DataTables_sort_wrapper",sSortIcon:"DataTables_sort_icon",
sScrollHead:"dataTables_scrollHead ui-state-default",sScrollFoot:"dataTables_scrollFoot ui-state-default",sFooterTH:"ui-state-default"});h.extend(j.ext.oPagination,{two_button:{fnInit:function(e,j,m){var k=e.oLanguage.oPaginate,l=function(h){e.oApi._fnPageChange(e,h.data.action)&&m(e)},k=!e.bJUI?'<a class="'+e.oClasses.sPagePrevDisabled+'" tabindex="'+e.iTabIndex+'" role="button">'+k.sPrevious+'</a><a class="'+e.oClasses.sPageNextDisabled+'" tabindex="'+e.iTabIndex+'" role="button">'+k.sNext+"</a>":
'<a class="'+e.oClasses.sPagePrevDisabled+'" tabindex="'+e.iTabIndex+'" role="button"><span class="'+e.oClasses.sPageJUIPrev+'"></span></a><a class="'+e.oClasses.sPageNextDisabled+'" tabindex="'+e.iTabIndex+'" role="button"><span class="'+e.oClasses.sPageJUINext+'"></span></a>';h(j).append(k);var r=h("a",j),k=r[0],r=r[1];e.oApi._fnBindAction(k,{action:"previous"},l);e.oApi._fnBindAction(r,{action:"next"},l);if(!e.aanFeatures.p)j.id=e.sTableId+"_paginate",k.id=e.sTableId+"_previous",r.id=e.sTableId+
"_next",k.setAttribute("aria-controls",e.sTableId),r.setAttribute("aria-controls",e.sTableId)},fnUpdate:function(e){if(e.aanFeatures.p)for(var h=e.oClasses,j=e.aanFeatures.p,k=0,m=j.length;k<m;k++)if(0!==j[k].childNodes.length)j[k].childNodes[0].className=0===e._iDisplayStart?h.sPagePrevDisabled:h.sPagePrevEnabled,j[k].childNodes[1].className=e.fnDisplayEnd()==e.fnRecordsDisplay()?h.sPageNextDisabled:h.sPageNextEnabled}},iFullNumbersShowPages:5,full_numbers:{fnInit:function(e,j,m){var k=e.oLanguage.oPaginate,
l=e.oClasses,r=function(h){e.oApi._fnPageChange(e,h.data.action)&&m(e)};h(j).append('<a  tabindex="'+e.iTabIndex+'" class="'+l.sPageButton+" "+l.sPageFirst+'">'+k.sFirst+'</a><a  tabindex="'+e.iTabIndex+'" class="'+l.sPageButton+" "+l.sPagePrevious+'">'+k.sPrevious+'</a><span></span><a tabindex="'+e.iTabIndex+'" class="'+l.sPageButton+" "+l.sPageNext+'">'+k.sNext+'</a><a tabindex="'+e.iTabIndex+'" class="'+l.sPageButton+" "+l.sPageLast+'">'+k.sLast+"</a>");var v=h("a",j),k=v[0],l=v[1],A=v[2],v=v[3];
e.oApi._fnBindAction(k,{action:"first"},r);e.oApi._fnBindAction(l,{action:"previous"},r);e.oApi._fnBindAction(A,{action:"next"},r);e.oApi._fnBindAction(v,{action:"last"},r);if(!e.aanFeatures.p)j.id=e.sTableId+"_paginate",k.id=e.sTableId+"_first",l.id=e.sTableId+"_previous",A.id=e.sTableId+"_next",v.id=e.sTableId+"_last"},fnUpdate:function(e,m){if(e.aanFeatures.p){var l=j.ext.oPagination.iFullNumbersShowPages,k=Math.floor(l/2),x=Math.ceil(e.fnRecordsDisplay()/e._iDisplayLength),r=Math.ceil(e._iDisplayStart/
e._iDisplayLength)+1,v="",A,E=e.oClasses,y,J=e.aanFeatures.p,H=function(h){e.oApi._fnBindAction(this,{page:h+A-1},function(h){e.oApi._fnPageChange(e,h.data.page);m(e);h.preventDefault()})};-1===e._iDisplayLength?r=k=A=1:x<l?(A=1,k=x):r<=k?(A=1,k=l):r>=x-k?(A=x-l+1,k=x):(A=r-Math.ceil(l/2)+1,k=A+l-1);for(l=A;l<=k;l++)v+=r!==l?'<a tabindex="'+e.iTabIndex+'" class="'+E.sPageButton+'">'+e.fnFormatNumber(l)+"</a>":'<a tabindex="'+e.iTabIndex+'" class="'+E.sPageButtonActive+'">'+e.fnFormatNumber(l)+"</a>";
for(l=0,k=J.length;l<k;l++)0!==J[l].childNodes.length&&(h("span:eq(0)",J[l]).html(v).children("a").each(H),y=J[l].getElementsByTagName("a"),y=[y[0],y[1],y[y.length-2],y[y.length-1]],h(y).removeClass(E.sPageButton+" "+E.sPageButtonActive+" "+E.sPageButtonStaticDisabled),h([y[0],y[1]]).addClass(1==r?E.sPageButtonStaticDisabled:E.sPageButton),h([y[2],y[3]]).addClass(0===x||r===x||-1===e._iDisplayLength?E.sPageButtonStaticDisabled:E.sPageButton))}}}});h.extend(j.ext.oSort,{"string-pre":function(e){"string"!=
typeof e&&(e=null!==e&&e.toString?e.toString():"");return e.toLowerCase()},"string-asc":function(e,h){return e<h?-1:e>h?1:0},"string-desc":function(e,h){return e<h?1:e>h?-1:0},"html-pre":function(e){return e.replace(/<.*?>/g,"").toLowerCase()},"html-asc":function(e,h){return e<h?-1:e>h?1:0},"html-desc":function(e,h){return e<h?1:e>h?-1:0},"date-pre":function(e){e=Date.parse(e);if(isNaN(e)||""===e)e=Date.parse("01/01/1970 00:00:00");return e},"date-asc":function(e,h){return e-h},"date-desc":function(e,
h){return h-e},"numeric-pre":function(e){return"-"==e||""===e?0:1*e},"numeric-asc":function(e,h){return e-h},"numeric-desc":function(e,h){return h-e}});h.extend(j.ext.aTypes,[function(e){if("number"===typeof e)return"numeric";if("string"!==typeof e)return null;var h,j=!1;h=e.charAt(0);if(-1=="0123456789-".indexOf(h))return null;for(var k=1;k<e.length;k++){h=e.charAt(k);if(-1=="0123456789.".indexOf(h))return null;if("."==h){if(j)return null;j=!0}}return"numeric"},function(e){var h=Date.parse(e);return null!==
h&&!isNaN(h)||"string"===typeof e&&0===e.length?"date":null},function(e){return"string"===typeof e&&-1!=e.indexOf("<")&&-1!=e.indexOf(">")?"html":null}]);h.fn.DataTable=j;h.fn.dataTable=j;h.fn.dataTableSettings=j.settings;h.fn.dataTableExt=j.ext})(jQuery,window,document,void 0);
;

