/*=======================================================================*\
|| ###################################################################### ||
|| # 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   # ||
|| ###################################################################### ||
\*========================================================================*/
(function(D){if(typeof window.console!="object"){window.console={}}var G=["log","debug","info","warn","error","assert","dir","dirxml","group","groupEnd","time","timeEnd","count","trace","profile","profileEnd"];for(var E=0;E<G.length;E++){var B=typeof window.console[G[E]];if(B!="function"&&B!="object"){window.console[G[E]]=function(){}}}D(".js-module__hide-if-empty:not(:has(*))").each(function(){var L=D(this);if(/\s/.test(L.html())){L.closest(".js-module").hide()}});D.ajaxPrefilter("script",function(L){L.cache=true});window.vBulletin.normalizeAjaxUrl=function(L){if(L.indexOf("http://")==0){return L.substring(5)}else{if(L.indexOf("https://")==0){return L.substring(6)}else{return L}}};window.vBulletin.getAjaxBaseurl=function(){return window.vBulletin.normalizeAjaxUrl(pageData.baseurl)};vBulletin.getAbsoluteUrl=(function(){var L;return function(M){if(!L){L=document.createElement("a")}L.href=M;return L.href}})();vBulletin.regexEscape=function(L){return L.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")};vBulletin.isInternalUrl=(function(){var L=vBulletin.normalizeAjaxUrl(pageData.baseurl),M=new RegExp("^"+vBulletin.regexEscape(L));return function(N){N=vBulletin.normalizeAjaxUrl(vBulletin.getAbsoluteUrl(N));return M.test(N)}})();vBulletin.isInternalJSUrl=(function(){var L=vBulletin.normalizeAjaxUrl(pageData.baseurl),M=new RegExp("^"+vBulletin.regexEscape(L+"/js/")+".*.js");return function(N){N=vBulletin.normalizeAjaxUrl(vBulletin.getAbsoluteUrl(N));return M.test(N)}})();vBulletin.isAbsoluteUrl=(function(){var L=new RegExp("^(?:[a-z]+:)?//","i");return function(M){return L.test(M)}})();D.ajaxPrefilter(function(L,P,N){if(L.url){if(!vBulletin.isInternalUrl(L.url)){console.log("Skipping security token for external url: "+L.url);return }else{if(vBulletin.isInternalJSUrl(L.url)){console.log("Skipping security token for javascript file: "+L.url);return }}}if(typeof (L.data)=="undefined"){L.data="securitytoken="+pageData.securitytoken;if(typeof L.formData!=="undefined"){if(Array.isArray(L.formData)){L.formData.push({name:"securitytoken",value:pageData.securitytoken})}}}else{if(typeof FormData!=="undefined"&&L.data instanceof FormData){L.data.append("securitytoken",pageData.securitytoken)}else{var M=true;var O=L.data.split("&");D.each(O,function(Q,R){if(R.match(/^securitytoken=/)){M=false;return false}});if(M){L.data+="&securitytoken="+pageData.securitytoken}}}});D.ajaxPrefilter(function(L,N,M){(function(){var P=vBulletin.getAjaxBaseurl();if((N.url.indexOf(P)==0&&N.url.substr(P.length).indexOf("/ajax/render/")==0)||(N&&N.data&&N.data.isAjaxTemplateRender)){var O=L.success;L.success=function(){console.log("Intercept AJAX template render calls: Start (URL: {0})".format(L.url));var V=arguments[0];if(!V||typeof V!="object"||D.isEmptyObject(V)){if(typeof O=="function"){return O.apply(this,arguments)}return false}if(N.data&&N.data.isAjaxTemplateRenderWithData){arguments[0]=V}else{arguments[0]=V.template;arguments[1]=V.errors}var a=V.css_links;if(!a||a.length==0){console.log("Intercept AJAX template render calls: No CSS");if(typeof O=="function"){console.log("Intercept AJAX template render calls: Calling original success handler");return O.apply(this,arguments)}}else{console.log("Intercept AJAX template render calls: Has CSS");var U=/sheet=([^&]+)&/,c=a.pop(),X=(c.match(U)!=null);a.push(c);var Q=function(e){var f=e.match(U);var d={};if(f&&f[1]){D.each(f[1].split(","),function(g,h){d[h]=e})}else{d[e.replace(/^.*\//g,"")]=e}return d};var W={};D("head link[rel=stylesheet]").each(function(){D.extend(W,Q(D(this).attr("href")))});var Z={};D.each(a,function(d,e){D.extend(Z,Q(e))});var b=[];D.each(Z,function(d,e){if(d&&typeof W[d]=="undefined"){if(X){b.push(d)}else{b.push(e)}}});if(b.length==0){console.log("Intercept AJAX template render calls: Needed CSS is already on the page");if(typeof O=="function"){console.log("Intercept AJAX template render calls: Calling original success handler");return O.apply(this,arguments)}}else{var S=[];if(X){console.log("Intercept AJAX template render calls: found DB CSS");S.push(c.replace(/sheet=[^&]+&/,"sheet="+b.join(",")+"&"))}else{console.log("Intercept AJAX template render calls: found FS CSS");S=b}var R=this,Y=arguments;console.log("Intercept AJAX template render calls: Fetching CSS: {0}".format(S.join(", ")));var T=function(e){if(e.length==0){console.log("Intercept AJAX template render calls: Done. Calling original callback.");window.setTimeout(function(){if(typeof O=="function"){return O.apply(R,Y)}},50);return }var d=D("<div />").append(e.shift()).text();console.log("Intercept AJAX template render calls: Fetching CSS file: {0}".format(d));D.get(d,{cache:true},function(g){var f=D("<link />",{rel:"stylesheet",type:"text/css",href:d}),h=D(".js-additional-css");if(h.length==1){h.before(f)}else{D("head").append(f)}}).then(function(){console.log("Intercept AJAX template render calls: Fetched CSS file: {0}".format(d));if(D(".js-debug-css-template-list").length>0){var g=Q(d),f=D("<ol />");D.each(g,function(j,k){if(X){f.append(D("<li />").append(j))}else{f.append(D("<li />").append(k))}});var h=D(".js-debug-css-template-list").append(D("<li />").append(vBulletin.phrase.get("added_via_ajax_call")+":").append(f));var i=h.prev("b");i.text(parseInt(i.text(),10)+1)}T(e)},function(){console.warn("Intercept AJAX template render calls: Failed to fetch CSS file: {0}".format(d));T(e)})};T(S)}}}}})()});String.prototype.format=function(){var M=this,L=arguments.length;while(L--){M=M.replace(new RegExp("\\{"+L+"\\}","gm"),arguments[L])}return M};jQuery.fn.reverse=[].reverse;window.vBulletin=window.vBulletin||{};vBulletin.getStackTrace=function(){var L=new Error();return L.stack};vBulletin.isRtl=function(){return(D("html").attr("dir")=="rtl")};vBulletin.arraystore=vBulletin.createVBArrayStore(pageData.cookie_prefix);vBulletin.cookie=vBulletin.cookie||{};vBulletin.cookie.convertBbarrayCookie=function(M,L){M=M||"";L=L||"get";if(L=="set"){M=M.replace(/"/g,".");M=M.replace(/:/g,"-");M=M.replace(/;/g,"_")}else{M=M.replace(/\./g,'"');M=M.replace(/-/g,":");M=M.replace(/_/g,";")}return M};vBulletin.cookie.fetchBbarrayCookie=function(L,O){if(typeof vBulletin.cookie.bbarraycookiecache=="undefined"){vBulletin.cookie.bbarraycookiecache={}}var M=D.cookie(pageData.cookie_prefix+L);if(M!=""&&!vBulletin.cookie.bbarraycookiecache[L]){try{vBulletin.cookie.bbarraycookiecache[L]=D.parseJSON(vBulletin.cookie.convertBbarrayCookie(M))}catch(N){vBulletin.cookie.bbarraycookiecache[L]=null}}if(vBulletin.cookie.bbarraycookiecache[L]){return vBulletin.cookie.bbarraycookiecache[L][O]?vBulletin.cookie.bbarraycookiecache[L][O]:null}else{return null}};vBulletin.cookie.setBbarrayCookie=function(L,R,N,P){if(typeof vBulletin.cookie.bbarraycookiecache=="undefined"){vBulletin.cookie.bbarraycookiecache={}}var M=D.cookie(pageData.cookie_prefix+L);if(M!=""&&!vBulletin.cookie.bbarraycookiecache[L]){try{vBulletin.cookie.bbarraycookiecache[L]=D.parseJSON(vBulletin.cookie.convertBbarrayCookie(M))}catch(O){vBulletin.cookie.bbarraycookiecache[L]=null}}if(!vBulletin.cookie.bbarraycookiecache[L]){vBulletin.cookie.bbarraycookiecache[L]={}}vBulletin.cookie.bbarraycookiecache[L][R]=N;var Q={path:pageData.cookie_path,domain:pageData.cookie_domain};if(P){Q.expires=365}D.cookie(pageData.cookie_prefix+L,vBulletin.cookie.convertBbarrayCookie(JSON.stringify(vBulletin.cookie.bbarraycookiecache[L]),"set"),Q)};vBulletin.cookie.unsetBbarrayCookie=function(L,P){if(typeof vBulletin.cookie.bbarraycookiecache=="undefined"){vBulletin.cookie.bbarraycookiecache={}}var M=D.cookie(pageData.cookie_prefix+L);if(M!=""&&!vBulletin.cookie.bbarraycookiecache[L]){try{vBulletin.cookie.bbarraycookiecache[L]=D.parseJSON(vBulletin.cookie.convertBbarrayCookie(M))}catch(N){vBulletin.cookie.bbarraycookiecache[L]=null}}if(!vBulletin.cookie.bbarraycookiecache[L]||!vBulletin.cookie.bbarraycookiecache[L][P]){return }delete vBulletin.cookie.bbarraycookiecache[L][P];var O={path:pageData.cookie_path,domain:pageData.cookie_domain};D.cookie(pageData.cookie_prefix+L,vBulletin.cookie.convertBbarrayCookie(JSON.stringify(vBulletin.cookie.bbarraycookiecache[L]),"set"),O)};jQuery.fn.swipeable=function(M){M=M||{};if(typeof M=="object"){M.swiping=M.swiping||function(){};M.swipeend=M.swipeend||function(){};M.swipeleft=M.swipeleft||function(){};M.swiperight=M.swiperight||function(){};M.swipeup=M.swipeup||function(){};M.swipedown=M.swipedown||function(){}}var T=false,V=false,S={start:null,previous:null,current:null,moved:null,totalMoved:null,target:null,};function U(X){var W={x:0,y:0};try{W={x:X.pageX||X.originalEvent.touches[0].pageX||0,y:X.pageY||X.originalEvent.touches[0].pageY||0,}}catch(X){}return W}function Q(W,X){return{x:W.x-X.x,y:W.y-X.y,}}function O(){if(!S.totalMoved){return false}var a=40,Z=Math.abs(S.totalMoved.x),Y=Math.abs(S.totalMoved.y),X=Math.max(Z,Y),W=Math.min(Z,Y);if(X<a){return false}if(X<=(W*2)){return false}if(Z>Y){return S.totalMoved.x<0?"left":"right"}else{return S.totalMoved.y<0?"up":"down"}}function R(W){T=true;V=false;S.start=U(W);S.previous=U(W);S.current=U(W);S.moved={x:0,y:0};S.totalMoved={x:0,y:0};S.target=W.target;if(W.type!="touchstart"){W.preventDefault()}}function P(W){if(T){S.current=U(W);S.moved=Q(S.current,S.previous);S.totalMoved=Q(S.current,S.start);if(S.moved.x||S.moved.y){V=true}M.swiping.call(this,W,S);S.previous=S.current}}function L(W){if(T){if(W.type=="mouseup"&&W.target!=S.target){N.call(this,W)}else{if(W.type=="mouseleave"){N.call(this,W)}}}T=false;W.preventDefault()}function N(Y){var W=O();if(W){var X="swipe"+W;M[X].call(this,Y,S)}M.swipeend.call(this,Y,S);T=false;S={start:null,previous:null,current:null,moved:null,totalMoved:null,target:null,};if(V){V=false;return false}}return this.each(function(){var W=D(this);if(M=="disable"){W.off(".vbswipeable","body")}else{W.on("mousedown.vbswipeable touchstart.vbswipeable","body",R).on("mousemove.vbswipeable touchmove.vbswipeable","body",P).on("mouseup.vbswipeable mouseleave.vbswipeable touchcancel.vbswipeable","body",L).on("click.vbswipeable touchend.vbswipeable","body",N)}})};D.widget("ui.dialog",D.ui.dialog,{_allowInteraction:function(L){if(this._super(L)){return true}if(L.target.ownerDocument!=this.document[0]){return true}if(D(L.target).closest(".cke_dialog").length){return true}if(D(L.target).closest(".cke").length){return true}}});(function(){var L=jQuery.fn.dialog;jQuery.fn.dialog=function(){if(typeof arguments[0]=="object"){var M=false;if(typeof arguments[0].open=="function"){M=arguments[0].open}arguments[0].open=function(){var N=D(this);window.setTimeout(function(){vBulletin.Responsive.Debounce.runCallbacks();N.closest(".ui-dialog").find(".ui-dialog-titlebar-close .ui-icon").removeClass("ui-icon ui-icon-closethick").addClass("b-icon b-icon__x-square--gray")},0);if(M){return M.apply(this,arguments)}}}return L.apply(this,arguments)}})();(function(){var L=jQuery.fn.selectBox;jQuery.fn.selectBox=function(){var M=D(this);if(typeof M.attr("tabindex")=="undefined"){M.attr("tabindex","0")}var N=L.apply(this,arguments);D(".selectBox-arrow").addClass("b-icon b-icon__arrow-down-s");return N}})();(function C(){(function(){D(".js-login-menu").find(".js-comp-menu-dropdown__trigger").on("click",function(){if(!(navigator.userAgent.toLowerCase().indexOf("trident/")>-1)){setTimeout(function(){D(".js-menu__login-iframe").contents().find(".js-login-username").focus()},0)}});D(".js-menu__login-iframe").on("load vb-run-now",function(R){try{var Q=D(this),O=Q.closest(".js-comp-menu-dropdown"),M=Q.contents().find("html"),N=M.outerHeight();if(!O.is(".b-comp-menu-dropdown--open")){O.addClass("b-comp-menu-dropdown--open");N=M.outerHeight();O.removeClass("b-comp-menu-dropdown--open")}if(N>0){Q.height(N);Q.parent().height(N)}}catch(P){}}).trigger("vb-run-now");var L=D(".js-top-menu-user--list");L.on("vbulletin:shrink",function(){L.find(".js-menu__username-label").addClass("h-hide-imp")});L.on("vbulletin:unshrink",function(){L.find(".js-menu__username-label").removeClass("h-hide-imp");var M=vBulletin.Responsive.Debounce.checkElementShrinkRequirement(L);if(M=="need_shrink"){L.find(".js-menu__username-label").addClass("h-hide-imp")}})})();D(".ui-tabs .ui-tabs-nav > li").addClass("ui-state-disabled");D(".announcement-tabs .ui-tabs-nav > li").removeClass("ui-state-disabled")})();window.vBulletin.runBeforeCallback=function(N,M){if(D.isArray(N)){N.unshift(M)}else{var L=N;N=function(){M.apply(this,arguments);if(typeof L=="function"){L.apply(this,arguments)}}}return N};window.vBulletin.pageHasSelectors=function(L){if(D.isArray(L)&&L.length>0&&D.trim(L.toString())!=""){var M=false;D.each(L,function(N,O){if(D(O).length>0){M=true;return false}});return M}return true};window.vBulletin.areJsonObjectsEqual=function(N,L){var M=function(Q,P){for(var O in Q){if(Q.hasOwnProperty(O)&&P.hasOwnProperty(O)){var S=Q[O],R=P[O];if(S!=R){if(S instanceof Array&&R instanceof Array){if(D(S).not(R).length>0||D(R).not(S).length>0){return false}else{continue}}else{return false}switch(S.constructor){case Object:if(!window.vBulletin.areJsonObjectsEqual(S,R)){return false}break;case Function:if(S.toString()!=R.toString()){return false}break;default:return false}}}else{return false}}return true};return(Object.keys(N).length==Object.keys(L).length)?M(N,L):false};window.vBulletin.ajaxSetup=(function(){var L=false;return{init:function(){if(L){return }L=true;D.ajaxSetup({contentType:"application/x-www-form-urlencoded; charset=UTF-8"})}}})();window.vBulletin.ajaxSetup.init();window.vBulletin.ajaxProfile=(function(){var N=[],O=false,M=true,L=false;return{init:function(){if(O){return }O=true;D(function(){if(D("#debug-information").length==0){M=false}D("<ol />").attr("id","debug-ajax-request-list").hide().css({height:"150px",overflow:"auto",padding:"4px",border:"1px solid #CCC",background:"#EEE","margin-top":"2px","margin-bottom":"4px"}).appendTo(D("#debug-information #debug-ajax-request-count").closest("li"));D("#debug-information #debug-ajax-request-count").css("cursor","pointer").on("click",function(){D("#debug-ajax-request-list").toggle()});L=true});function P(){if(L){D("#debug-information #debug-ajax-request-count").text(N.length);D.each(N,function(){if(!this.displayed){this.displayed=true;this.relUrl=this.url.indexOf(pageData.baseurl)==0?this.url.substring(pageData.baseurl.length):this.url;D("<li />").addClass("js-request-counter-"+this.requestCounter).text(this.relUrl).appendTo(D("#debug-ajax-request-list"))}var Q=this.totalTimeTaken-this.networkTimeTaken;var R='{0} <span style="font-size:x-small;">({1}, <span title="Request Time: {2}ms, Processing Time: {3}ms, Total Time: {4}ms" style="text-decoration:underline;">{2}ms, {3}ms</span>){5}</span>'.format(this.relUrl,this.status,this.networkTimeTaken,Q,this.totalTimeTaken,(this.errorThrown?" Error: "+this.errorThrown:""));D("#debug-ajax-request-list .js-request-counter-"+this.requestCounter).html(R)})}}D.ajaxPrefilter(function(Q,T,R){if(!M){return }var S=N.length;console.log("vBulletin AJAX profile: Before request #"+S);N.push({displayed:false,url:Q.url,relUrl:"",startTimeStamp:(new Date()).getTime(),endTimeStamp:0,finalTimeStamp:0,textStatus:"UNKNOWN",errorThrown:"",requestCounter:S,networkTimeTaken:0,totalTimeTaken:0});Q.success=vBulletin.runBeforeCallback(Q.success,function(V,W,U){N[S].endTimeStamp=(new Date()).getTime()});Q.error=vBulletin.runBeforeCallback(Q.error,function(U,W,V){N[S].endTimeStamp=(new Date()).getTime();N[S].errorThrown=V});Q.complete=vBulletin.runBeforeCallback(Q.complete,function(U,V){N[S].finalTimeStamp=(new Date()).getTime();N[S].status=V;N[S].networkTimeTaken=N[S].endTimeStamp-N[S].startTimeStamp;N[S].totalTimeTaken=N[S].finalTimeStamp-N[S].startTimeStamp;P()})})}}})();window.vBulletin.ajaxProfile.init();window.vBulletin.loadingIndicator=(function(){var Q=0,P=false,O=false,M=0,L=0;function N(S){if(S){var U=D(".js-loading-indicator"),T=U.outerWidth(),R=vBulletin.isRtl(),V=R?"margin-right":"margin-left";if(T>0){U.css(V,-(T/2))}U.removeClass("h-hide");D("body").css("cursor","wait")}else{D(".js-loading-indicator").addClass("h-hide");D("body").css("cursor","auto")}}return{init:function(){if(P){return }D(document).ajaxStart(function(){window.vBulletin.loadingIndicator.show("ajaxStart")});D(document).ajaxStop(function(){window.vBulletin.loadingIndicator.hide("ajaxStop")});P=true},show:function(R){if(M>0&&R=="ajaxStart"){--M;++L;console.log("vBulletin.loadingIndicator.show ajax indicator suppressed");return }++Q;console.log("vBulletin.loadingIndicator.show Counter: "+Q+" Source: "+(R||"Unspecified"));if(Q>0){O=window.setTimeout(function(){if(O){N(true);O=false}},1000)}},hide:function(R){if(L>0&&R=="ajaxStop"){--L;console.log("vBulletin.loadingIndicator.hide ajax indicator suppressed");return }--Q;Q=Q<0?0:Q;if(!R){Q=0}console.log("vBulletin.loadingIndicator.hide Counter: "+Q+" Source: "+(R||"Unspecified"));if(Q<1){if(O){window.clearTimeout(O);O=false}N(false)}},suppressNextAjaxIndicator:function(){++M}}})();window.vBulletin.phrase=window.vBulletin.phrase||{};window.vBulletin.phrase.precache=window.vBulletin.phrase.precache||[];window.vBulletin.phrase.precache=D.merge(window.vBulletin.phrase.precache,["alert","cancel","confirmation","no","ok","prompt","yes",]);window.vBulletin.phrase.cache=window.vBulletin.phrase.cache||{};window.vBulletin.phrase.uncachable=window.vBulletin.phrase.uncachable||[];window.vBulletin.phrase.render=function(M,L){L=L.replace(/\{sitename\}/g,vBulletin.options.get("bbtitle")).replace(/\{musername\}/g,pageData.musername).replace(/\{username\}/g,pageData.username).replace(/\{userid\}/g,pageData.userid).replace(/\{registerurl\}/g,pageData.registerurl).replace(/\{activationurl\}/g,pageData.activationurl).replace(/\{helpurl\}/g,pageData.helpurl).replace(/\{contacturl\}/g,pageData.contacturl).replace(/\{homeurl\}/g,pageData.baseurl).replace(/\{date\}/g,pageData.datenow).replace(/\{register_page\}/g,pageData.registerurl).replace(/\{activation_page\}/g,pageData.activationurl).replace(/\{help_page\}/g,pageData.helpurl).replace(/\{sessionurl\}/g,"").replace(/\{sessionurl_q\}/g,"");for(var N=1;N<M.length;++N){L=L.replace(new RegExp("%"+N+"\\$s","gm"),M[N])}return L};window.vBulletin.phrase.remoteGet=function(M,O){O.push(M);var N={},L=M;D.each(O,function(Q,P){if(P!=""&&(typeof N[P]=="undefined")){N[P]=""}});N=Object.keys(N);if(N.length>0){vBulletin.loadingIndicator.suppressNextAjaxIndicator();D.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/api/phrase/getPhrases",async:false,data:({phrases:N}),type:"POST",dataType:"json",success:function(P){if(P&&P.phrases){var Q=P.phrases;if(typeof (Q[M])!="undefined"){L=Q[M]}window.vBulletin.cache.setBucket("phrases"+pageData.languageid);D.each(N,function(T,S){var R=S;if(typeof (Q[S])!="undefined"){R=Q[S]}window.vBulletin.cache.set(S,R)});O.length=0}else{console.warn("Unexpected result when fetching phrases")}},error:function(R,Q,P){console.warn("Error when fetching phrases: {0}".format(P))}})}return L};window.vBulletin=window.vBulletin||{};window.vBulletin.phrase=window.vBulletin.phrase||{};window.vBulletin.phrase.precache=window.vBulletin.phrase.precache||[];window.vBulletin.phrase.precache=D.merge(window.vBulletin.phrase.precache,["admin","admin_auth","april","attach_link","attach_video","august","cancel","cancel_edit","close","compare_versions","conversation","december","done","edit_conversation","email_addresses_must_match","error","error_loading_ckeditor_script","error_loading_editor","error_loading_post","error_posting_comment_code","error_saving_vote","error_x","existing_reply_will_be_deleted","february","flag_a_post","follow","follow_error","following","following_pending","following_remove","friday_min","go_to_first_new_post","hour","inlinemod_auth_password_empty","invalid_data","invalid_data_requested","invalid_email_address","invalid_request","invalid_server_response_please_try_again","invalid_special_channel_subscribe_request","invalid_user_permissions","invalid_username_specified","invalid_username_specified_maxlength_x","invalid_username_specified_minlength_x","invalid_query_definition_x","january","join","joined","join_error","july","june","leave","loading","logged_out_while_editing_post","login","login_success_admin_auth","march","may","minute","moderator","monday_min","new_posts","no","no_create_permissions","no_icon","no_leave_channel_permission","no_one_voted","no_permission","no_update_permissions","no_valid_tags_found","not_logged_no_permission","november","now","october","onbeforeunload_message_while_editing_post","password_must_be_at_least_four_chars","passwords_must_match","people_who_liked","physically_remove_blog","physically_remove_comment","physically_remove_media","physically_remove_reply","physically_remove_topic","physically_remove_visitorMessage","please_enter_a_username","please_enter_a_valid_url_and_click_attach","please_enter_link_url","please_enter_video_url","please_enter_your_comment","please_enter_your_email_address","please_enter_your_reason_why_you_want_to_flag_this_post","please_provide_search_string","post_comment","post_history","posttype_blog","posttype_comment","posttype_media","posttype_reply","posttype_topic","posttype_visitorMessage","preview","saturday_min","search","see_less","see_more","select_option_and_click_delete_button_blog","select_option_and_click_delete_button_comment","select_option_and_click_delete_button_media","select_option_and_click_delete_button_reply","select_option_and_click_delete_button_topic","select_option_and_click_delete_button_visitorMessage","send_report","september","soft_delete_blog","soft_delete_comment","soft_delete_media","soft_delete_notes_blog","soft_delete_notes_comment","soft_delete_notes_media","soft_delete_notes_reply","soft_delete_notes_topic","soft_delete_notes_visitorMessage","soft_delete_reply","soft_delete_topic","soft_delete_visitorMessage","sunday_min","thanks_for_signing_up_log_in","the_report_has_been_sent","time","tuesday_min","thursday_min","unable_to_check_admin_permissions","unable_to_contact_server_please_try_again","unexpected_error","unfollow_error","unvote_cap","usernametaken","vote_a_post","vote_cap","wednesday_min","yes","you_have_a_pending_edit_unsaved"]);window.vBulletin.cache.initBucket("phrases"+pageData.languageid,pageData.phrasedate,window.vBulletin.phrase.precache,window.vBulletin.phrase.remoteGet);window.vBulletin.phrase.get=function(){if(arguments.length<1){console.log("vBulletin.phrase.get() called with no parameters");return""}if(typeof arguments[0]=="object"){arguments=arguments[0]}window.vBulletin.cache.setBucket("phrases"+pageData.languageid);var L=window.vBulletin.cache.get(arguments[0]);return window.vBulletin.phrase.render(arguments,L)};window.vBulletin.getScrollbarWidth=function(){if(D("body").data("scrollbar-width")){return D("body").data("scrollbar-width")}var L=D('<div style="width:50px;height:50px;overflow:auto;position:absolute;top:-99999px;"><div /></div>').appendTo("body"),N=L.children(),M=N.innerWidth()-N.height(99).innerWidth();L.remove();D("body").data("scrollbar-width",M);return M};window.vBulletin.options=window.vBulletin.options||{};window.vBulletin.options.precache=window.vBulletin.options.precache||["bbtitle"];window.vBulletin.options.remoteGet=function(M,O){var N=[M];D.each(O,function(Q,P){if(D.inArray(P,N)===-1){N.push(P)}});var L=null;D.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/api/options/fetchValues",async:false,data:({options:N}),type:"POST",dataType:"json",success:function(P){if(P){vBulletin.cache.setBucket("options");D.each(P,function(Q,R){if(Q==M){L=R}vBulletin.cache.set(Q,R)});O.length=0}else{console.warn("Unexpected result when fetching options")}},error:function(R,Q,P){console.warn("Error when fetching options: {0}".format(P))}});return L};window.vBulletin=window.vBulletin||{};window.vBulletin.options=window.vBulletin.options||{};window.vBulletin.options.precache=window.vBulletin.options.precache||[];window.vBulletin.options.precache=D.merge(window.vBulletin.options.precache,["crontab","bbtitle","markinglimit","threadpreview"]);vBulletin.cache.initBucket("options",window.pageData.optionsdate,window.vBulletin.options.precache,window.vBulletin.options.remoteGet);window.vBulletin.options.get=function(L){window.vBulletin.cache.setBucket("options");return window.vBulletin.cache.get(L)};vBulletin.ajaxtools=vBulletin.createAjaxTools(vBulletin.getAjaxBaseurl(),pageData.userid);vBulletin.ajaxlib=vBulletin.ajaxtools.library;vBulletin.AJAX=vBulletin.ajaxtools.ajax;vBulletin.ajaxForm=vBulletin.ajaxtools.ajaxForm;window.vBulletin.assertUserHasAdminPermission=function(P,O,L,M){if(D(O).data("in-progress")){return false}D("body").css("cursor","wait");var N=arguments.callee.caller;D(O).data("in-progress",true);vBulletin.AJAX({call:"/ajax/api/user/currentUserHasAdminPermission",data:{adminPermission:P},complete:function(){D("body").css("cursor","auto");D(O).data("in-progress",null)},success:function(Q){if(Q===true){L()}else{vBulletin.error("error","unable_to_check_admin_permissions");D("#config-dialog .loader").hide()}},api_error:(typeof M=="undefined"?undefined:function(Q){if(vBulletin.ajaxtools.hasError(Q,"inlinemodauth_required")){vBulletin.ajaxlib.inlineMod(M);return false}return true}),error_phrase:"unable_to_check_admin_permissions",})};vBulletin.selectTabByIndex=function(L){var M=this instanceof D?this:D(this);if(M.length&&L>-1&&M.hasClass("ui-tabs")){M.data("noPushState",true).tabs("option","active",L).data("noPushState",null).find(".ui-tabs-nav li").removeClass("ui-state-focus").eq(L).addClass("ui-state-focus").find("a").focus()}};D.ui.tabs.prototype._isLocal=function(){return true};vBulletin.tabify=function(M){var N=this instanceof D?this:D(this);if(N.length){var L={tabOptions:{},tabHistory:null,allowHistory:false,tabParamAsQueryString:true,hash:"",getTabIndexByHash:function(){return -1}};M=D.extend({},L,M);if(M.tabHistory instanceof vBulletin.history.instance&&M.tabHistory.isEnabled()){N.on("tabscreate",function(R,T){var O=vBulletin.parseQueryString(location.search,["_"]),U=Object.keys(O).length,Q=vBulletin.getSelectedTabHashOrPath(N,M.tabParamAsQueryString),S=M.tabHistory.getState();if(((M.tabParamAsQueryString&&U>1&&typeof O.tab!="undefined")||(!M.tabParamAsQueryString&&U>0))&&(!S||D.isEmptyObject(S.data))){var P={from:"tabs",tab:Q};M.tabHistory.setDefaultState(P,document.title,location.href)}M.tabHistory.setStateChange(function(a){var Z=M.tabHistory.getState();if(Z.data.from=="tabs"){M.tabHistory.log(Z.data,Z.title,Z.url);var X=M.getTabIndexByHash(Z.data.tab),V=vBulletin.parseQueryString(Z.url,["tab","_"]);if(N.tabs("option","selected")!=X){vBulletin.selectTabByIndex.call(N,X);if(!D.isEmptyObject(V)){D(window).trigger("statechange.filter",["tabs",V])}}else{if(!D.isEmptyObject(V)){D(window).trigger("statechange.filter",["tabs",V])}else{var W,Y,b;if(Z.data.tab){Y=M.tabParamAsQueryString?D(Z.data.tab):D('.ui-tabs .ui-tabs-panel[data-url-path="'+Z.data.tab+'"]')}W=(Y&&Y.length&&Y)||D(N.closest(".canvas-widget").data("widget-default-tab"));b=D(".toolbar-filter-overlay .filter-options .js-default-checked",W);if(b.length){b.prop("checked",true).first().data("bypass-filter-display",true).trigger("change",[true]).data("bypass-filter-display",null);D(".filtered-by",W).addClass("h-hide").find(".filter-text-wrapper").empty()}else{D(".conversation-toolbar .js-default-checked",W).first().trigger("click",[true])}}}}},"tabs");if(typeof M.tabOptions.create=="function"){M.tabOptions.create.call(N[0],R,T)}})}if(M.allowHistory&&M.tabHistory instanceof vBulletin.history.instance){N.on("tabsbeforeactivate",function(T,U){var O=U.newPanel,R=U.newTab;if(typeof M.tabOptions.beforeActivate=="function"&&M.tabOptions.beforeActivate.call(this,T,U)===false){return false}var Q,V=(M.tabParamAsQueryString?O.selector:D(R.context).data("url-path")),S=undefined;if(!M.tabParamAsQueryString){S=[];N.find(".ui-tabs-nav > li > a, .widget-tabs-panel").each(function(W,Y){var X=D(this).data("url-path");if(D.inArray(X,S)==-1){S.push(X)}})}if(!M.tabHistory.isEnabled()){Q=vBulletin.makeFilterUrlFromSelectedFilters(O,V.replace("#",""),M.tabParamAsQueryString,S,M.hash);location.href=Q;return false}if(!N.data("noPushState")){var P={from:"tabs",tab:V};Q=vBulletin.makeFilterUrlFromSelectedFilters(O,V.replace("#",""),M.tabParamAsQueryString,S);M.tabHistory.pushState(P,document.title,Q)}else{N.data("noPushState",null)}})}N.tabs(M.tabOptions)}return N};vBulletin.getSelectedTabHashOrPath=function(M,N){var L;if(N){L=M.find(".ui-tabs-nav > .ui-tabs-active > a").prop("hash")}else{L=M.find(".ui-tabs-nav > .ui-tabs-active > a").data("url-path")}return L||""};vBulletin.parseUrl=function(M){var L=document.createElement("a"),N;L.href=M||"/";N=L.pathname;if(N.indexOf("/")!=0){N="/"+N}return{protocol:L.protocol,hostname:L.hostname,port:L.port,pathname:N,search:L.search,hash:L.hash}};vBulletin.makeHistoryUrl=function(Q,L,O,M,P){var N=vBulletin.makePaginatedUrl(Q,L);N=vBulletin.makeTabUrl(N,O.tab,O.tabParamAsQueryString);N=vBulletin.makeFilterUrl(N,M.filterName,M.filterValue,M.context,P);return N};vBulletin.makeTabUrl=function(M,O,S,Q,P){if(M){var R=vBulletin.parseUrl(M),T;if(S){P=P||"tab";T=new RegExp("([?+|&+])"+P+"=\\w+[-\\w]*","i");if(R.search.match(T)){M=R.pathname+R.search.replace(T,"$1{0}={1}".format(P,O))}else{if(R.search){M="{0}{1}&{2}={3}".format(R.pathname,R.search,P,O)}else{M="{0}?{1}={2}".format(R.pathname,P,O)}}}else{var N=R.pathname.replace(/\/$/,""),L=N.split("/");T="\\/"+L[L.length-(N.match(/\/page([0-9]+)/)?2:1)]+"$";M=R.pathname.replace(new RegExp(T),"/"+O)+R.search}}else{M="/"}if(Q){M+="#"+Q}return M};vBulletin.makePaginatedUrl=function(N,M){if(N){var L=N.match(/\/page[0-9]+/);if(L){if(M>1){N=N.replace(L[0],"/page"+M)}else{N=N.replace(L[0],"")}}else{if(M>1){if(N.match(/\?/)){N=N.replace(/\?/,"/page"+M+"?")}else{if(N.match(/\#/)){N=N.replace(/\#.*/,"/page"+M)}else{N+="/page"+M}}}}}return N};vBulletin.makeFilterUrl=function(L,Q,U,M,P,N){N=N||false;L=L||location.href;var V=D(".filtered-by",M),S=vBulletin.parseUrl(L),W=S.search;var R=D(".js-button-filter.js-default-checked.js-checked",M);if(R.data("filter-name")==Q&&R.data("filter-value")==U){N=true}if(!N&&((V.data("clicked")&&D('.toolbar-filter-overlay input[name="{0}"][value="{1}"]'.format(Q,U),M).hasClass("js-default-checked"))||(D('.toolbar-search-form input[name="{0}"]'.format(Q),M).length&&!U))){N=true;V.data("clicked",null)}L=S.pathname;if(W&&W.length>1){if(W.match(new RegExp(Q+"=","i"))){var O=vBulletin.parseQueryString(W);if(!D.isEmptyObject(O)){var T="";D.each(O,function(X,Y){if(!N||X!=Q){T+="{0}={1}&".format(X,(X==Q?U:Y))}});if(T){L+="?"+T.substring(0,T.length-1)}}}else{if(!N){L+=W+"&{0}={1}".format(Q,encodeURIComponent(U))}else{L+=W}}}else{if(!N){L+="?{0}={1}".format(Q,encodeURIComponent(U))}}if(P){L+="#"+P}return L};vBulletin.getSelectedFilters=function(L,M){var N={};if(!M){var O=L.serializeArray();D.each(O,function(R,S){if(S.name!="securitytoken"){if(S.name.slice(-2)=="[]"){var Q=S.name.split("[]");N[Q[0]]=N[Q[0]]||[];N[Q[0]].push(S.value)}else{N[S.name]=S.value}}})}else{var P=L.parent().find(".filtered-by .filter-text").filter(":visible");L.find(":input:radio:checked").each(function(R,T){var S=D(T);if((S.hasClass("js-default-checked")||S.data("bypass-filter-display")==1)&&(P.length==0||P.filter('[data-filter-name={0}][data-filter-value="{1}"]').length==0)){return true}if(T.name.slice(-2)=="[]"){var Q=T.name.split("[]");N[Q[0]]=N[Q[0]]||[];N[Q[0]].push(T.value)}else{N[T.name]=T.value}})}return N};vBulletin.makeFilterUrlFromSelectedFilters=function(P,Q,Z,V,S){var X,O=location.pathname.replace(/\/$/,"").replace(/\/page[0-9]+/,""),N=D(".toolbar-filter-overlay",P),U=vBulletin.getSelectedFilters(N,true),W=D(".pagenav-form .js-pagenum",P).val()||1,R=D(".toolbar-search-form .js-filter-search",P).val()||"",b=D(P).closest(".canvas-widget"),Y=D(".conversation-toolbar-wrapper",P).length?(D(".conversation-toolbar-wrapper",P).data("allow-history")=="1"):(D(P).data("allow-history")=="1"),M=new vBulletin.history.instance(Y),L=b.data("widget-default-tab")||b.find(".ui-tabs-nav > li:first-child a").attr("href");if(D.isEmptyObject(U)){D(".conversation-toolbar .js-button-filters",P).each(function(){var c=D(".js-button-filter.js-checked:not(.js-default-checked)",this);if(c.length){U[c.data("filter-name")]=c.data("filter-name")}})}if(!Z){var a=new RegExp("\\/("+V.join("|")+")/?$"),T=O.match(a);if(T){O=O.replace(new RegExp(T[0]),"/"+Q)}else{O+="/"+Q}}if(W>1&&M.isEnabled()){O+="/page"+W}if(Z&&Q&&L!=("#"+Q)){U.tab=Q;if(!M.isEnabled()){O+="?tab="+Q}}if(!M.isEnabled()){return O+(S?"#"+S:"")}if(R){U.q=R}X=D.param(U);return O+(X?"?"+X:"")+(S?"#"+S:"")};vBulletin.parseQueryString=function(O,M){var L={},P;if(O&&O.length>1){P=O.indexOf("?");M=(M instanceof Array)?M:[];if(P!=-1){var N=O.substring(P+1).split("&");D.each(N,function(Q,S){var R=S.split("=");if(M.length==0||(D.inArray(R[0],M)==-1)){L[R[0]]=decodeURIComponent((R[1]||"")).replace(/\+/g," ")}})}}return L};vBulletin.pagination=function(R){var Z={context:document,onPageChanged:null,tabParamAsQueryString:true,allowHistory:false};if(R&&typeof R=="object"){D.extend(Z,R)}var N,O=D(".pagenav-controls .pagenav-form",Z.context),Y=Number(D(".defaultpage",O).val())||Number(D(".js-pagenum",O).val())||1,T=new vBulletin.history.instance(Z.allowHistory);O.data("object-instance",this);if(T.isEnabled()){var U=vBulletin.parseQueryString(location.search,["_"]),P=location.pathname.match(/\/page([0-9]+)/),M=T.getState();if(P&&Number(P[1])>1&&D.isEmptyObject(U)&&(!M||D.isEmptyObject(M.data))){N=vBulletin.makePaginatedUrl(location.href,Y);var V={from:"pagination",page:Y,tab:Z.tabParamAsQueryString?"#"+O.closest(".ui-tabs-panel").attr("id"):vBulletin.getSelectedTabHashOrPath(O.closest(".ui-tabs"),false)};T.setDefaultState(V,document.title,N)}T.setStateChange(function(i){var a=T.getState();if(a.data.from=="pagination"){T.log(a.data,a.title,a.url);if(location.search){var k=vBulletin.parseQueryString(location.search,["_"]);if(!D.isEmptyObject(k)||k.tab=="groups-tab"){delete k.tab;D(window).trigger("statechange.filter",["pagination",k]);return }}var f,c,l,j,h;if(a.data.tab){f=Z.tabParamAsQueryString?D(a.data.tab):D('.ui-tabs .ui-tabs-panel[data-url-path="'+a.data.tab+'"]')}c=(f&&f.length&&f)||Z.context;l=D(".conversation-toolbar .filter-wrapper",c).data("object-instance");if(l){l.resetFilters(true)}if(a.data.tab){j=f.closest(".ui-tabs");$tabAnchor=Z.tabParamAsQueryString?j.find('.ui-tabs-nav > li > a[href*="{0}"]'.format(a.data.tab)):j.find('.ui-tabs-nav > li > a[data-url-path="'+a.data.tab+'"]');if(!$tabAnchor.parent().hasClass("ui-tabs-active")){var g=$tabAnchor.parent().index();vBulletin.selectTabByIndex.call(j,g);return }}var m=D(".pagenav-controls .pagenav-form",c);var d=m.data("object-instance");if(d&&typeof d.getOption=="function"&&typeof d.getOption("onPageChanged")=="function"){var b=a.data.page||Y;d.getOption("onPageChanged").apply(m.get(0),[b,false,!location.search,location.search])}}},"pagination")}function L(){return parseInt((D(".pagetotal",this).html()||"").replace(/[^\d]+/g,""),10)||1}function S(b,f){var e=L.apply(this),a=D(".arrow[rel=next]",this),d=D(".arrow[rel=prev]",this);if(b<1){b=1}else{if(b>e){b=e}}D(".js-pagenum",this).val(b);if(b==e){a.addClass("h-disabled").removeAttr("href")}else{a.removeClass("h-disabled").attr("href",vBulletin.makePaginatedUrl(location.href,b+1))}if(b==1){d.addClass("h-disabled").removeAttr("href")}else{d.removeClass("h-disabled").attr("href",vBulletin.makePaginatedUrl(location.href,b-1))}if(typeof Z.onPageChanged=="function"){Z.onPageChanged.apply(this,[b,f])}if(e>1&&T.isEnabled()&&!f){var g=T.getState();if(!g||!g.data||!g.data.from||D.inArray(g.data.from,["filter_blogs","filter_groups"]==-1)){if(b==1){N=D(".arrow[rel=next]",this).attr("href")}else{N=D(".arrow[rel=prev]",this).attr("href")}if(N){N=vBulletin.makePaginatedUrl(N,b);var c={from:"pagination",page:b,tab:Z.tabParamAsQueryString?"#"+D(this).closest(".ui-tabs-panel").attr("id"):vBulletin.getSelectedTabHashOrPath(D(this).closest(".ui-tabs"),false)};T.pushState(c,document.title,N)}}}}function X(a){var b=parseInt(a);if(b&&typeof b==="number"){D("input[name=result-id]",O).val(b)}}function Q(a){D("a.see-all-btn",this).closest(".pagenav-controls")[a?"addClass":"removeClass"]("h-hide")}D(".arrow",O).off("click").on("click",function(c){var b=D(this),d=this.form||b.closest("form").get(0);if(!b.hasClass("h-disabled")){var a=parseInt(D(".js-pagenum",d).val())+((b.attr("rel")=="next")?1:-1);if(!T.isEnabled()&&Z.allowHistory){if(!this.href||this.hash==this.href){this.href=vBulletin.makePaginatedUrl(location.href,a)}return true}S.apply(d,[a,false])}return false});function W(){D(Z.context).off("click",".js-pagenav .js-pagenav-button").on("click",".js-pagenav .js-pagenav-button",function(c){if(T.isEnabled()){var d=D(this),a=d.data("page"),b=D(".pagenav-form",Z.context).get(0);S.apply(b,[a,false]);return false}return true}).off("mouseover",".js-pagenav .js-pagenav-button").on("mouseover",".js-pagenav .js-pagenav-button",function(b){var a=D(this);if(!a.prop("href")){a.prop("href",vBulletin.makePaginatedUrl(location.href,parseInt(a.data("page"),10)))}});D(".js-pagenav .js-pagenav-button",Z.context).each(function(){this.href=vBulletin.makePaginatedUrl(location.href,parseInt(D(this).data("page")))});(function(){function a(){var e=D(this);var g=e.data("vbshrink-hidden-elements");if(typeof g!="undefined"){g.removeClass("h-hide-imp")}var d=e.find("> .js-pagenav-button").filter(":visible"),b=D(),c=D(),f=d.filter(".js-pagenav-current-button").data("page");d.each(function(p,j){var h=D(j),n=h.data("page"),i=h.is(".js-pagenav-prev-button, .js-pagenav-current-button, .js-pagenav-next-button"),o=h.is(".js-pagenav-first-button, .js-pagenav-last-button"),l=(n==(f-1)||n==(f+1)),k=(!o&&!l),m=(o?"1":(l?"2":"3"));if(!i){b=b.add(h);h.data("vbshrink-priority",m)}});D.each(["3","2","1"],function(h,i){b.each(function(j,l){var k=D(l);if(k.data("vbshrink-priority")!=i){return true}var m=vBulletin.Responsive.Debounce.checkElementShrinkRequirement(e);if(m=="need_shrink"){k.addClass("h-hide-imp");c=c.add(k)}else{return false}})});e.data("vbshrink-hidden-elements",c)}D(document).on("vbulletin:shrink vbulletin:unshrink",".js-pagenav",a);vBulletin.Responsive.Debounce.checkShrinkEvent(D(".js-pagenav"))})()}W();D(".js-pagenum",O).off("keypress").on("keypress",function(c){if(c.keyCode==13){c.preventDefault();var a=parseInt(D(this).val(),10);var b=L.apply(this.form);if(a>b){a=b}if(a<1){a=1}if(T.isEnabled()){S.apply(this.form,[a,false])}else{if(Z.allowHistory){location.href=vBulletin.makePaginatedUrl(location.href,a)}else{S.apply(this.form,[a,false])}}}});D(".js-pagenum",O).off("click").on("click",function(a){D(this).select()});this.updatePageInfo=function(b,a){if(b&&typeof b=="object"){var c=b.totalpages||1,d=D(".pagenav-controls .pagenav-form",Z.context);D(".pagetotal",d).text(c);if(typeof b.showseemore!="undefined"){if(b.showseemore){Q.apply(d,[false])}else{Q.apply(d,[true])}}b.perpage=vBulletin.conversation.POSTS_PER_PAGE;if(a&&D(".pagenav-container",Z.context).length>0){D.post(pageData.baseurl+"/ajax/render/pagenav",{pagenav:b},function(e){if(e){D(".pagenav-container",Z.context).replaceWith(e.template);W()}},"json")}S.apply(d.get(0),[b.pagenumber,a])}};this.updateResultId=function(a){X(a)};this.setOption=function(a,b){Z[a]=b};this.getOption=function(a){return Z[a]};this.updatePageNavigation=function(b,a,c){S.apply(b.get(0),[a,c])}};vBulletin.conversation=vBulletin.conversation||{};vBulletin.conversation.toggleCommentBox=function(){var L=D(this).closest(".js-comment-entry__parent").find(".js-comment-entry");L.slideToggle("fast",function(){var M=D(this).find(".js-comment-entry__textbox");if(M.is(":visible")){M.focus()}});L.find(".js-comment-entry__cancel").off("click").on("click",function(M){L.slideToggle();return false});return false};vBulletin.conversation.postComment=function(O,M){var U=this,R=D(U),Q=R.closest(".js-comment-entry"),N=Q.find(".js-comment-entry__textbox"),S=D.trim(N.val());if(!S||(N.hasClass("placeholder")&&S==N.attr("placeholder"))){vBulletin.warning("post_comment","please_enter_your_comment",function(){N.focus()});return false}D("body").css("cursor","wait");R.blur();var P=R.closest(".js-comment-entry__parent"),T=R.closest(".js-comment-entry--blog").length==1?1:0,L=R.closest(".js-comment-entry--article").length==1?1:0;vBulletin.AJAX({call:"/ajax/post-comment",data:({text:S,parentid:P.attr("data-node-id"),postindex:P.find(".js-post__content .b-post__count").text().replace("#",""),view:P.parent().hasClass("stream-view")?"stream":"thread",redirecturl:N.hasClass(".reload-on-post")?1:0,isblogcomment:T,isarticlecomment:L,humanverify:{input:Q.find('[name="humanverify[input]"]').val(),hash:Q.find('[name="humanverify[hash]"]').val()},}),complete:function(){console.log("post-comment complete.");D("body").css("cursor","auto");vBulletin.hv.reset()},success:function(V,X,Y){if(typeof M=="function"){M.apply(U,[V])}if(!T&&!L){Q.slideToggle()}vBulletin.subscribe.updateSubscribeButton(V.topic_subscribed);var W=P.attr("data-node-id");if(pageData.threadmarking=="0"||pageData.userid=="0"){vBulletin.cookie.setBbarrayCookie("discussion_view",W,Math.round(new Date().getTime()/1000))}else{vBulletin.markRead(W)}},api_error:vBulletin.hv.resetOnError,title_phrase:"conversation",error_phrase:"error_posting_comment_code",})};vBulletin.conversation.showIp=function(M){var O=D(this),N=D(this).data("post-ip"),L=D(this).data("post-host");openAlertDialog({title:vBulletin.phrase.get("ip_info"),message:vBulletin.phrase.get("ip_address_is")+": "+N+"<br />"+vBulletin.phrase.get("host_name_is")+': <span class="ip-host-name loading">...</span>',iconType:"none"});vBulletin.AJAX({call:"/ajax/api/node/getHostName",data:{ip:N},success:function(P,Q,R){D(".ip-host-name").removeClass("loading").html(P)}});return false};vBulletin.conversation.showPostHistory=function(O){var P=D(this);var N=D(this).closest(".js-post").attr("data-node-id");var M=openConfirmDialog({title:vBulletin.phrase.get("post_history"),message:vBulletin.phrase.get("loading")+"...",width:800,dialogClass:"post-history-dialog dialog-container dialog-box loading",buttonLabel:{yesLabel:vBulletin.phrase.get("compare_versions"),noLabel:vBulletin.phrase.get("cancel")},onAfterClose:function(){if(this.id=="btnConfirmDialogYes"){var R=M.find(".post-history-form");var Q={oldpost:R.find("input:radio[name=old]:checked").val()||1,newpost:R.find("input:radio[name=new]:checked").val()||1,nodeid:N};D("#btnConfirmDialogYes").hide();var S=openConfirmDialog({title:vBulletin.phrase.get("post_history"),message:vBulletin.phrase.get("loading")+"...",width:800,dialogClass:"post-history-comparison-dialog dialog-container dialog-box loading",buttonLabel:{yesLabel:vBulletin.phrase.get("compare_versions"),noLabel:vBulletin.phrase.get("close")},onAfterClose:function(){D("#btnConfirmDialogYes").show()}});L(S,"post_history_form",Q)}}});L(M,"post_history_form",{nodeid:N});function L(Q,R,S){S.isAjaxTemplateRenderWithData=true;vBulletin.AJAX({call:"/ajax/render/"+R,data:S,success:function(T){Q.removeClass("loading").find(".dialog-content .message").html(T.template).find("[placeholder]").placeholder().end().end().dialog("option","position",{of:window})},after_error:function(){Q.dialog("close")}})}};vBulletin.conversation.flagPost=function(M){var N=D(this),L=D(this).closest(".js-post").attr("data-node-id");vBulletin.openPromptDialog({title:vBulletin.phrase.get("flag_a_post"),message:vBulletin.phrase.get("please_enter_your_reason_why_you_want_to_flag_this_post"),buttonLabel:{okLabel:vBulletin.phrase.get("send_report"),cancelLabel:vBulletin.phrase.get("cancel")},multiline:true,validation:{callback:vBulletin.openPromptDialog.validationString,showError:true},onClickOK:function(O){D("body").css("cursor","wait");vBulletin.AJAX({call:"/report/report",data:{reason:O,reportnodeid:L},success:function(P){D("#prompt-dialog").dialog("close");vBulletin.alert("flag_a_post","the_report_has_been_sent")},complete:function(){D("body").css("cursor","default")},error_phrase:"unable_to_contact_server_please_try_again",title_phrase:"flag_a_post"});return false}});return false};vBulletin.conversation.editPost=function(R,U){var W=D(this),N,V,S=W.closest(".conversation-list");if(W.closest(".js-comments").length>0){N="comment"}var O=D(".edit-conversation-container form",S);if(O.length>0){openAlertDialog({title:vBulletin.phrase.get("edit_conversation"),message:vBulletin.phrase.get("you_have_a_pending_edit_unsaved"),iconType:"warning",onAfterClose:function(){vBulletin.animateScrollTop(O.closest(".js-post").offset().top,{duration:"slow"})}});return }if(U&&U.isFilterSelected("conversations_on")){U.toggleNewConversations(false)}window.vBulletin.loadingIndicator.show();R.preventDefault();var M=W.parent().attr("data-node-id"),L=(N=="comment")?W.closest(".js-comment"):W.closest(".js-post__content-wrapper");if(S.hasClass("thread-view")){V="thread"}else{if(S.hasClass("full-activity-view")){V="full-activity-stream"}else{if(S.hasClass("activity-view")){V="activity-stream"}else{V="stream"}}}N=N||L.attr("data-node-type")||"";var Q,T=D(".b-post__count",L).text()||"1";if(N=="comment"&&(V=="thread"||S.closest(".blog-conversation-content-widget").length==1)){Q=Number(T.replace("#",""))}else{Q=Number(T.replace("#",""))-1}var P=function(Y,b,c,X){var d=D(".edit-conversation-container form",L).data("content-type");var Z=vBulletin.triggerHandler.apply(X.get(0),["afterSave",D(document),Y]);if(Z===false){D("body").trigger(d+"_editform_onunload",[L]);window.vBulletin.loadingIndicator.hide();return }var a=pageData;a["posts-perpage"]=vBulletin.conversation.POSTS_PER_PAGE;if(V=="thread"){a["comments-perpage"]=vBulletin.conversation.COMMENTS_PER_PAGE}if(Y&&vBulletin.ajaxtools.hasError(Y.warnings,"warning_spam_post")){vBulletin.ajaxtools.showApiError(Y.warnings,Y,{title_phrase:"warning",after_error:function(){if(Y.warningReturnUrl){location.href=Y.warningReturnUrl}else{window.location.reload(true)}}});return }var c=D.post(vBulletin.getAjaxBaseurl()+"/create-content/loadnode",{nodeid:M,view:V,index:Q,page:a,type:N,isAjaxTemplateRender:true,isAjaxTemplateRenderWithData:true},function(j){if(j.error){openAlertDialog({title:vBulletin.phrase.get("conversation"),message:vBulletin.phrase.get(j.error),iconType:"error"})}else{var e=X.closest(".js-content-entry").data("current-channelid"),g=X.find('input[name="parentid"]:checked').val(),f=D(j.template);if(e>0&&g>0&&(e!=g)){window.location.reload(true);return }D("body").trigger(d+"_editform_onunload",[L]);if(U&&U.isFilterSelected("conversations_on")){U.toggleNewConversations(true)}W.closest(".js-post").replaceWith(f);if(j.hasOwnProperty("template_article_title_info")){var h=D(".js-update-article-title-info"),l=D(j.template_article_title_info);if(h.length>0){h.empty().append(l)}}D("body").trigger(d+"_newcontent_onload",[f]);var k=f.attr("data-node-id");if(f.hasClass("js-conversation-starter")){var i=D(".js-post-title",f).first().text();document.title=i+" - "+vBulletin.options.get("bbtitle");D(".page-title-widget .js-main-title").text(i)}D(".js-select-box",f).selectBox();vBulletin.animateScrollTop(f.offset().top,{duration:"slow"})}},"json").error(function(){openAlertDialog({title:vBulletin.phrase.get("conversation"),message:vBulletin.phrase.get("error_loading_post"),iconType:"error"})}).complete(function(){window.vBulletin.loadingIndicator.hide()})};D.post(vBulletin.getAjaxBaseurl()+"/create-content/loadeditor",{nodeid:M,type:N,view:V,isAjaxTemplateRender:true},function(X,a){if(a){vBulletin.error("edit_conversation",a[0])}else{var Y=function(){if(typeof vBulletin.upload=="undefined"||typeof vBulletin.tagEditor=="undefined"||typeof vBulletin.contentEntryBox.init=="undefined"){vBulletin.ckeditor.loadScripts("",{},Y);return }L.addClass("b-post--edit");L.find(".js-post__content").first().addClass("b-post__content--edit");L.find(".b-post__footer").first().addClass("b-post__footer--edit");$container=L.find(".edit-conversation-container").first();L.closest(".js-album-detail").find(".conversation-body, .profile-media-uploadphotos, .js-photo-preview").addClass("h-hide-imp");vBulletin.contentEntryBox.init();vBulletin.hv.init($container.find(".js-human-verification"));vBulletin.contentEntryBox.setDefaultTab($container.find(".js-content-entry").first());$container.show();console.log($container);window.vBulletin.loadingIndicator.hide();var c=$container.find(".js-attach-list");vBulletin.upload.initializePhotoUpload(L);var b=D(".js-post[data-node-id={0}] .tag-editor-container .tag-input".format(M));if(b.length>0&&typeof vBulletin.tagEditor!="undefined"){var d=new vBulletin.tagEditor.instance(b.selector)}if(c.data("attach-count")>0){var e=$container.find(".b-toolbar__item").filter(function(){return D(this).data("panel")=="b-content-entry-panel__content--attachment"});if(!e.hasClass("b-toolbar__item--active")){e.trigger("click")}}vBulletin.contentEntryBox.afterPanelChange(L);vBulletin.flatpickr.initPickers()};console.log("Edit mode: Adding Content Entry UI to DOM (contains parsed post text in the .js-editor-parsed-text element)");D(".edit-conversation-container",L).first().hide().html(X);var Z=D(".edit-conversation-container form",L).data("content-type");D(window).off("beforeunload.editPost").on("beforeunload.editPost",function(){return vBulletin.phrase.get("onbeforeunload_message_while_editing_post")});D("body").trigger(Z+"_editform_onload",[L,Y]);D(".edit-conversation-container input[placeholder], .edit-conversation-container textarea[placeholder]",L).placeholder();vBulletin.ajaxForm.apply(D("form",L),[{dataType:"json",success:P,beforeSerialize:function(b){console.log("ajaxForm beforeSerialize (vBulletin.conversation.editPost)");b.trigger("beforeSave");var c=D("body").triggerHandler(Z+"_editform_onbeforeserialize",[b]);return(c===false)?false:true},beforeSubmit:function(e,d,c){var b=vBulletin.contentEntryBox.validateForm.apply(d,[c]);if(b===false){return false}D(window).off("beforeunload.editPost");window.vBulletin.loadingIndicator.show();return true},complete:function(){window.vBulletin.loadingIndicator.hide();console.log("ajaxForm complete (vBulletin.conversation.editPost)")}}])}},"json").error(function(Y,Z,X){openAlertDialog({title:vBulletin.phrase.get("edit_conversation"),message:"HTTP {0} - {1}".format(Y.status,X),iconType:"error"})}).complete(function(Y,Z,X){window.vBulletin.loadingIndicator.hide()})};vBulletin.conversation.votePost=function(P){var O=D(this).closest(".js-post").attr("data-node-id"),N,M,L;D("body").css("cursor","wait");if(!D(this).hasClass("voted")){N="vote";M="unvote_cap";L=true}else{N="unvote";M="vote_cap";L=false}vBulletin.AJAX({call:"/ajax/api/reputation/"+N,data:{nodeid:O},success:function(R){var Q=D(".js-post[data-node-id="+O+"]");Q.find(".votecount").html(R.votes);Q.find(".js-post-control__vote").toggleClass("voted",L).find(".b-post-control__label").text(vBulletin.phrase.get(M))},complete:function(){D("body").css("cursor","default")},title_phrase:"error_saving_vote"})};vBulletin.conversation.showWhoVoted=function(N){var L=D(this);if(D(this).hasClass("novotepopup")){return }var M=L.closest(".js-post").attr("data-node-id");L.qtip({content:{title:{text:vBulletin.phrase.get("people_who_liked"),button:true},text:vBulletin.phrase.get("loading")+"...",ajax:{url:vBulletin.getAjaxBaseurl()+"/ajax/api/reputation/fetchWhovoted",type:"POST",data:{nodeid:M},dataType:"json",once:false,success:function(R,P){if(R.errors){this.set("content.text",R.errors[0][0])}else{if(R.length<1){this.set("content.text",vBulletin.phrase.get("no_one_voted"))}else{var T="<ul>";for(x in R){var O=pageData.baseurl+R[x].profileurl,W;if(!R[x].avatarurl){W=pageData.baseurl_core+"/image.php?u="+R[x].userid+"&type=profile"}else{W=pageData.baseurl_core+"/"+R[x].avatarurl}var S=D("<img>").attr("src",W).attr("alt",R[x].username),V=D("<a>").attr("href",O).addClass("avatar"),Q=D("<a>").attr("href",O).addClass("username").html(R[x].musername),X=D("<li>"),U=D("<div>").addClass("usertitle").html(R[x].usertitle);V.append(S);X.append(V);X.append(Q);X.append(U);T+=D("<div>").append(X).html()}T+="</ul>";this.set("content.text",T)}}},error:function(O,Q,P){this.set("content.text","failed to load.")}}},position:{my:"left top",at:"right top",viewport:D(window)},show:{event:"click"},hide:{event:"unfocus",fixed:true},style:{classes:"ui-tooltip-shadow ui-tooltip-light ui-tooltip-whovoted"}});L.qtip("api").show()};vBulletin.conversation.processPostContent=function(L){L.css("border-bottom","").filter(".stream-view.activity-view").find(".list-item-poll form.poll").each(function(M,N){if(D(this).is(":visible")&&D(".view-less-ctrl",this).hasClass("h-hide")){vBulletin.conversation.limitVisiblePollOptionsInAPost(this,3)}})};vBulletin.conversation.limitVisiblePollOptionsInAPost=function(P,O){if(typeof O=="undefined"){O=3}var M=0,N=D("ul.poll li",P),L=parseInt(N.css("line-height"),10);N.each(function(Q){D(this).removeClass("h-hide");var R=D(this).height();M+=R/L;if(M>O){D(this).addClass("h-hide")}else{D(this).css("display","")}});if(M>3){D(".view-more-ctrl",P).removeClass("h-hide").next(".js-button-group").addClass("h-hide").next(".view-less-ctrl").addClass("h-hide")}else{D(".view-more-ctrl",P).addClass("h-hide").next(".js-button-group").removeClass("h-hide").next(".view-less-ctrl").addClass("h-hide")}};vBulletin.conversation.bindEditFormEventHandlers=function(P){P=(P)?P.toLowerCase():"";if(D.inArray(P,["text","gallery","video","poll","link","comment","event"])!=-1||P=="all"){var N=function(S,R){if(typeof R=="function"){console.log("Edit mode: initializeEditor");var Q=S.find(".js-editor");if(Q.length>0){vBulletin.ckeditor.initEditor(Q,{success:function(T){if(typeof R=="function"){R();vBulletin.contentEntryBox.afterPanelChange(S);vBulletin.ckeditor.initEditorComponents(S);var U=this;window.setTimeout(function(){console.log("Edit mode: Adding post data to CKEditor (vBulletin.conversation.bindEditFormEventHandlers)");U.setData(Q.prev(".js-editor-parsed-text").html(),function(){var V=vBulletin.ckeditor.getEditor(T);vBulletin.ckeditor.fixTableFunctionality.call(vBulletin.ckeditor,{},V);setTimeout(function(){vBulletin.ckeditor.modifyImagePaths(D(V.container.$))},0);V.focus()})},0)}},error:function(U){if(typeof R=="function"){R()}Q.prop("disabled",false).removeClass("ckeditor-load-on-focus").closest(".js-content-entry").addClass("b-content-entry--no-ckeditor");var T=Q.prev(".js-editor-parsed-text").html();if(T!=""){vBulletin.AJAX({call:"/ajax/api/editor/convertHtmlToBbcode",data:{nodeid:pageData.nodeid,data:T,allowsmilie:1,securitytoken:pageData.securitytoken},success:function(V){Q.html(V.data)},error_phrase:"error_converting_message"})}},hideLoadingDialog:false})}else{if(typeof R=="function"){R();Q.focus()}}}};var O=function(S){var R=S.find(".js-editor");if(R.length>0){var Q=R.attr("id");if(vBulletin.ckeditor.editorExists(Q)){vBulletin.ckeditor.destroyEditor(Q)}}R.closest("form").remove()};var M={};M.comment=function(){D("body").off("comment_editform_onload").on("comment_editform_onload",function(R,S,Q){if(typeof Q=="function"){Q();D(".js-editor",S).focus().filter(".autogrow").elastic().off("blur.elastic")}}).off("comment_editform_onunload").on("comment_editform_onunload",function(Q,R){})};M.text=function(){D("body").off("text_editform_onload").on("text_editform_onload",function(R,S,Q){N(S,Q)}).off("text_editform_onunload").on("text_editform_onunload",function(Q,R){O(R)}).off("text_newcontent_onload").on("text_newcontent_onload",function(Q,R){if(R.closest(".conversation-list.stream-view.activity-view").length>0){vBulletin.truncatePostContent(R)}})};M.event=function(){D("body").off("event_editform_onload").on("event_editform_onload",function(R,S,Q){N(S,Q)}).off("event_editform_onunload").on("event_editform_onunload",function(Q,R){O(R)}).off("event_newcontent_onload").on("event_newcontent_onload",function(Q,R){if(R.closest(".conversation-list.stream-view.activity-view").length>0){vBulletin.truncatePostContent(R)}})};M.poll=function(){var Q=function(R){R.find(".js-remove-button").prop("disabled",(R.find("li").length<=2))};D("body").off("poll_editform_onload").on("poll_editform_onload",function(S,T,R){N(T,R);Q(D(this).find(".b-poll-fieldset__poll-answers"))}).off("poll_editform_onunload").on("poll_editform_onunload",function(R,S){O(S)}).off("poll_newcontent_onload").on("poll_newcontent_onload",function(R,S){Q(D(this).find(".b-poll-fieldset__poll-answers"));if(S.closest(".conversation-list.stream-view.activity-view").length>0){vBulletin.truncatePostContent(S);vBulletin.conversation.limitVisiblePollOptionsInAPost(D("form.poll",S),3)}})};M.gallery=function(){D("body").off("gallery_editform_onload").on("gallery_editform_onload",function(R,S,Q){D('.b-toolbar__item[data-panel="b-content-entry-panel__content--gallery"]',S).trigger("click");N(S,function(){if(typeof Q=="function"){Q()}vBulletin.upload.initializePhotoUpload(S)})}).off("gallery_editform_onunload").on("gallery_editform_onunload",function(Q,R){O(R)}).off("gallery_editform_onbeforeserialize").on("gallery_editform_onbeforeserialize",function(R,Q){Q.find(".caption-box").each(function(){var S=D(this);if(S.hasClass("placeholder")&&S.val()==S.attr("placeholder")){S.val("")}});return true}).off("gallery_newcontent_onload").on("gallery_newcontent_onload",function(Q,R){if(R.closest(".conversation-list.stream-view.activity-view").length>0){vBulletin.truncatePostContent(R)}})};M.video=function(){D("body").off("video_editform_onload").on("video_editform_onload",function(R,S,Q){D('.b-toolbar__item[data-panel="b-content-entry-panel__content--video"]',S).trigger("click");N(S,function(){if(typeof Q=="function"){Q()}L(D(".b-content-entry-panel__content--video",S),"video")});D(".js-attach-button",S).off("click").on("click",function(W){W.preventDefault();var T=D(this),X=T.closest(".b-content-entry-panel__content--video"),V=D(".b-link-input__url",X),U=D.trim(V.val());if(!U){openAlertDialog({title:vBulletin.phrase.get("attach_video"),message:vBulletin.phrase.get("please_enter_video_url"),iconType:"warning",onAfterClose:function(){V.focus()}});return false}T.prop("disabled",true);D(".js-contententry-buttons .b-button",X).prop("disabled",true);D("body").css("cursor","wait");D.post(vBulletin.getAjaxBaseurl()+"/link/getlinkdata",{url:U,isAjaxTemplateRender:true},function(Z){if(Z.error){openAlertDialog({title:vBulletin.phrase.get("attach_video"),message:vBulletin.phrase.get(Z.error),iconType:"warning",onAfterClose:function(){V.focus()}})}else{$template=D(Z);X.find(".js-panel-content").append($template);L(X,"video");$template.fadeIn("slow",function(){V.val("");D(".b-link-input",X).addClass("h-hide")});var Y=S.closest("form");if($template.find("js-video-url")){Y.data("content-type","video")}else{Y.data("content-type","link")}}},"json").error(function(a,Z,Y){openAlertDialog({title:vBulletin.phrase.get("attach_video"),message:"HTTP {0} - {1}".format(a.status,Y),iconType:"error"})}).complete(function(){D("body").css("cursor","default");T.prop("disabled",false);D(".js-contententry-buttons .b-button",X).prop("disabled",false)})})}).off("video_editform_onunload").on("video_editform_onunload",function(Q,R){O(R)}).off("video_newcontent_onload").on("video_newcontent_onload",function(Q,R){if(R.closest(".conversation-list.stream-view.activity-view").length>0){vBulletin.truncatePostContent(R)}})};M.link=function(){D("body").off("link_editform_onload").on("link_editform_onload",function(R,S,Q){D('.b-toolbar__item[data-panel="b-content-entry-panel__content--link"]',S).trigger("click");N(S,function(){if(typeof Q=="function"){Q()}L(D(".b-content-entry-panel__content--link",S),"link")});D(".js-attach-button",S).off("click").on("click",function(W){W.preventDefault();var T=D(this),X=T.closest(".b-content-entry-panel__content--link"),V=D(".b-link-input__url",X),U=D.trim(V.val());if(!U){openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("please_enter_a_valid_url_and_click_attach"),iconType:"warning",onAfterClose:function(){V.focus()}});return false}if(!U.match(/^https?:\/\//)){U="http://"+U;V.val(U)}T.prop("disabled",true);D(".js-contententry-buttons .b-button",X).prop("disabled",true);D("body").css("cursor","wait");D.post(vBulletin.getAjaxBaseurl()+"/link/getlinkdata",{url:U,isAjaxTemplateRender:true},function(a){if(a.error){openAlertDialog({title:vBulletin.phrase.get("attach_link"),message:vBulletin.phrase.get(a.error),iconType:"warning",onAfterClose:function(){V.focus()}})}else{var Z=D(a);Z.find("img").error(function(){D(this).closest("li").remove()});X.find(".js-panel-content").append(Z);L(X,"link");Z.fadeIn("slow",function(){V.val("");D(".b-link-input",X).addClass("h-hide")});var Y=S.closest("form");if(Z.find("js-video-url")){Y.data("content-type","video")}else{Y.data("content-type","link")}}},"json").error(function(a,Z,Y){openAlertDialog({title:vBulletin.phrase.get("attach_link"),message:"HTTP {0} - {1}".format(a.status,Y),iconType:"error"})}).complete(function(){D("body").css("cursor","default");T.prop("disabled",false);D(".js-contententry-buttons .b-button",X).prop("disabled",false)})})}).off("link_editform_onunload").on("link_editform_onunload",function(Q,R){O(R)}).off("link_newcontent_onload").on("link_newcontent_onload",function(Q,R){if(R.closest(".conversation-list.stream-view.activity-view").length>0){vBulletin.truncatePostContent(R)}}).off("link_savepost_success").on("link_savepost_success",function(Q,R){D(".b-link-input",R).removeClass("h-hide-imp")})};var L=function(R,S){D(".b-link-content__urlinfo .js-link-edit",R).on("click",function(U){U.preventDefault();var T=D(this).parent().parent();T.addClass("b-link-content__urlinfo-meta--edit-mode");D(".js-link-textbox",T).val(D.trim(D(".b-link-content__urlinfo-text",T).text())).trigger("focus");D(".js-link-save",T).on("click",function(V){V.preventDefault();D(".b-link-content__urlinfo-text",T).text(D(".js-link-textbox",T).val());T.removeClass("b-link-content__urlinfo-meta--edit-mode")})});D(".js-link-remove",R).on("click",function(T){T.preventDefault();D(this).closest(".b-content-entry-panel__content").find(".b-link-input").removeClass("h-hide");D(this).closest(".js-panel-content").empty();D(".b-link-input",R).removeClass("h-hide")});if(S=="link"){D(".js-link-preview-checkbox",R).off("click").on("click",function(){D(".b-link-content__thumbnail",R)[this.checked?"addClass":"removeClass"]("h-hide")});var Q=D(".b-link-thumbnail-list__item",R).length;D(".b-link-thumbnail-list",R).jcarousel({scroll:1,wrap:null,size:Q,rtl:vBulletin.isRtl(),buttonNextCallback:function(V,U,T){D(".b-thumbnail-nav .b-thumbnail-nav__next-arrow",R).toggleClass("b-icon--disabled",!T)},buttonPrevCallback:function(V,U,T){D(".b-thumbnail-nav .b-thumbnail-nav__prev-arrow",R).toggleClass("b-icon--disabled",!T)},initCallback:function(U,T){if(T=="init"&&Q>0){D(".b-thumbnail-nav .b-thumbnail-nav__counter",R).html("1/"+Q);D(".b-thumbnail-nav .b-thumbnail-nav__prev-arrow",R).off("click").on("click",function(){if(!D(this).hasClass("b-icon--disabled")){D(".jcarousel-container .jcarousel-prev",R).trigger("click")}});D(".b-thumbnail-nav .b-thumbnail-nav__next-arrow",R).off("click").on("click",function(){if(!D(this).hasClass("b-icon--disabled")){D(".jcarousel-container .jcarousel-next",R).trigger("click")}})}},itemVisibleInCallback:function(W,U,T,V){if(V=="init"){return false}D(".b-thumbnail-nav .b-thumbnail-nav__counter",R).html(T+"/"+Q);D('input[type="radio"]',U).prop("checked",true)},itemFallbackDimension:90})}};if(P!="all"){M[P].call()}else{D.each(M,function(Q,R){R.call()})}}};vBulletin.isScrolledIntoView=function(N,S){var T=false;if(D.isPlainObject(S)&&(S).toString()=="[object Object]"){T=true;S.top=0;S.bottom=0}N=(N instanceof D)?N:D(N);if(N.length==0){return false}var L=D(window).scrollTop(),M=L+D(window).height(),Q=N.offset().top,O=Q+N.outerHeight(),R=Q-L,P=M-O;if(T){S.top=R;S.bottom=P}return(R>=0&&P>=0)};vBulletin.scrollToFixed=function(P){var L=this,M={element:D(),fixedAt:"top",limit:0,triggerOnload:true,zIndex:99},N=("scrollToFixed"+Math.random()).replace(".","");function O(V){M=D.extend({},M,V);if(M.element){M.element=(M.element instanceof D)?M.element:D(M.element);if(M.element.length>0){if(D.inArray(M.fixedAt,["top","bottom"])){M.fixedAt="top"}var S=M.element,Q="scrolltofixed",R={width:S.width(),offset:S.offset(),"margin-top":parseInt(S.css("margin-top"),10),"margin-bottom":parseInt(S.css("margin-bottom"),10),cssPosition:S.css("position"),coordinates:{left:S.css("left"),top:S.css("top"),right:S.css("right"),bottom:S.css("bottom")}};var U=D("<div />").addClass("scrolltofixed-filler").hide().insertAfter(S);S.data("origOffsetTop",R.offset.top);S.css("z-index",M.zIndex);S.data("object-instance",L);var T=D(window).off("scroll."+N).on("scroll."+N,function(){if(S.is(":hidden")){return }var Z=D(this).scrollTop();if(M.limit>0&&Z>M.limit&&S.hasClass(Q)){S.removeClass(Q).css({position:"absolute",left:"auto",right:"auto",top:"auto",bottom:"auto",width:R.width})}else{if((M.limit>0&&Z<M.limit&&Z>R.offset.top&&!S.hasClass(Q))||(M.limit<=0&&Z>R.offset.top&&!S.hasClass(Q))){U.css({display:S.css("display"),width:S.outerWidth(true),height:S.outerHeight(true),"float":S.css("float")});var W=(vBulletin.Responsive&&vBulletin.Responsive.scrollToFixedBreakPoint)?vBulletin.Responsive.scrollToFixedBreakPoint:0;if(D("#vb-page-body").width()>W){S.addClass(Q).width(R.width).css({left:R.offset.left,right:"auto",width:R.width,top:(M.fixedAt=="top")?0:"auto",bottom:(M.fixedAt=="bottom")?0:"auto",position:""})}else{U.hide()}var Y=R["margin-"+M.fixedAt];if(Y){var X={};X[M.fixedAt]=-Y+"px";S.animate(X,"fast")}}else{if(Z<=R.offset.top&&S.hasClass(Q)){U.hide();S.removeClass(Q).css({position:"",width:"",left:"",top:"",right:"",bottom:""})}}}}).off("resize."+N).on("resize."+N,function(){S.removeClass(Q).width("auto").css({position:"",left:""});R.width=S.width();R.offset=S.offset();D(this).trigger("scroll."+N)});if(M.triggerOnload){T.trigger("scroll."+N)}}}}this.updateLimit=function(Q){if(!isNaN(Number(Q))){M.limit=Q;D(window).trigger("scroll."+N)}};this.addLimit=function(Q){if(!isNaN(Number(Q))){M.limit+=Q;D(window).trigger("scroll."+N)}};this.reset=function(Q){O(Q)};O(P)};vBulletin.scrollToAnchor=function(O){O=O.replace(/(:|\.|\[|\]|,|\/)/g,"\\$1");var S=D(O);console.log("vBulletin.scrollToAnchor() hash: {0}, found: {1}".format(O,S.length));if(S.length>0){var M=S.show().offset().top-2;S.hide();var Q=D("html,body"),R=D(".scrolltofixed-floating.scrolltofixed-top"),L=false;if(R.length>0){if(D(".list-container .list-item:first a.anchor"+O).length==1){if(R.hasClass("scrolltofixed")){R.removeClass("scrolltofixed")}M=R.offset().top;L=true}else{if(R.hasClass("scrolltofixed")){M-=R.outerHeight()}}}function P(V){var U=V.show().offset().top;V.hide();U-=(R.hasClass("scrolltofixed")?R.outerHeight():0);return Math.round(U)}function T(){Q.stop(true)}var N="scroll mousedown wheel DOMMouseScroll mousewheel keyup";Q.off(N,T).one(N,T);Q.animate({scrollTop:M},{duration:1000,step:function(U,V){if(!L){V.end=P(S)}},always:function(){D("a.anchor").show();S.show();Q.off(N,T)}});return false}D("a.anchor").show();return true};if(location.hash){vBulletin.scrollToAnchor(location.hash)}vBulletin.animateScrollTop=function(M,N){console.log("vBulletin.animateScrollTop({0})".format(M));var L=D(".scrolltofixed-floating.scrolltofixed-top");if(L.length>0){var O=L.data("origOffsetTop")||L.offset().top;if(!L.hasClass("scrolltofixed")&&O<M){M-=L.outerHeight(true)}if(O<M){M-=L.outerHeight()}}D("html, body").animate({scrollTop:M},N)};vBulletin.truncatePostContent=function(L){L=(L instanceof D)?L:D(L);if(L.selector==""){L=D("body")}D(".poll-desc.ellipsis, .message-body.ellipsis",L).each(function(){var M=D(this);truncatedHeight=M.height();M.removeClass("ellipsis");var N=M.height();M.addClass("ellipsis");if(N>truncatedHeight){M.closest(".list-item-body").find(".post-links").removeClass("hide-see-link").find(".see-link").off("click").on("click",function(){var P=D(this);if(P.hasClass("more")){M.removeClass("ellipsis")}else{M.addClass("ellipsis")}P.toggleClass("more less");var O=P.text();P.text(P.data("toggle-text")).data("toggle-text",O);return false})}});D(".list-item .see-link.more").each(function(M){var N=D(this).closest(".list-item"),P=D(N).find(".post-content.restore");if(P.length>0){var S=false,Q=false,U=D(this).text(),O="",T=D(P).html(),R=this;D(this).on("click",function(){nodeid=D(N).attr("data-node-id");if(S){D(R).text(U);D(P).html(T);S=false}else{if(Q){D(R).text(vBulletin.phrase.get("see_less"));S=true;D(P).html(O)}else{if(!Q&&nodeid){vBulletin.AJAX({call:"/activity/fetchText",data:{nodeid:nodeid},success:function(V){O=V.nodeText;if(O.length<=T.length){D(R).addClass("ui-helper-hidden");postLink=D(R).closest(".post-links").html().replace("<span>|</span>","");D(R).closest(".post-links").html(postLink)}else{D(P).html(V.nodeText);D(R).text(vBulletin.phrase.get("see_less"));console.log("loaded content for node "+nodeid);S=true;Q=true;return false}},error:vBulletin.ajaxtools.logAjaxError,api_error:vBulletin.ajaxtools.logApiError,})}}}return false})}})};vBulletin.markreadcheck=function(){if((parseInt(pageData.threadmarking)>0)&&(parseInt(pageData.userid)>0)){return }var L=D.cookie(pageData.cookie_prefix+"lastvisit");if(parseInt(pageData.userid)>0&&(!L||pageData.lastvisit>L)){L=pageData.lastvisit}var M=Math.round(new Date().getTime()/1000),N=M-vBulletin.options.get("markinglimit")*86400;D(".forum-item").each(function(){var P=parseInt(D(this).attr("data-lastcontent")),O=0;if(P<=L){D(this).find(".icon").removeClass(".b-icon__speech-double-m--blue").addClass(".b-icon__speech-double-m--gray");return }O=vBulletin.cookie.fetchBbarrayCookie("channel_view",D(this).attr("data-channel-id"));O=O?parseInt(O):0;var Q=(P>O);D(this).find(".icon").toggleClass("b-icon__speech-double-m--blue",Q).toggleClass("b-icon__speech-double-m--gray",!Q)});D(".subforum-item").each(function(){var P=parseInt(D(this).attr("data-lastcontent")),O=0;if(P<=L){D(this).find(".icon").removeClass("b-icon__speech-single2--blue").addClass("b-icon__speech-single2--gray");return }O=vBulletin.cookie.fetchBbarrayCookie("channel_view",D(this).attr("data-channel-id"));O=O?parseInt(O):0;var Q=(P>O);D(this).find(".icon").toggleClass("b-icon__speech-single2--blue",Q).toggleClass("b-icon__speech-single2--gray",!Q)});D(".topic-item").each(function(){var P=parseInt(D(this).attr("data-lastcontent")),Q=0,O=0,S=0;if(pageData.userid=="0"){if(P<=L){D(this).addClass("read");return }O=vBulletin.cookie.fetchBbarrayCookie("channel_view",D(this).attr("data-channel-id"));O=O?parseInt(O):0;Q=vBulletin.cookie.fetchBbarrayCookie("discussion_view",D(this).attr("data-node-id"));Q=Q?parseInt(Q):0;S=Math.max(O,Q)}else{S=D(this).attr("data-readtime")?parseInt(D(this).attr("data-readtime")):0;O=D(this).attr("data-channelreadtime")?parseInt(D(this).attr("data-channelreadtime")):0;S=Math.max(S,O,N)}if(P<=S||D(this).hasClass("redirect")){D(this).addClass("read")}else{if(D(this).find(".topic-wrapper .js-go-to-first-unread").length==0){var R=D(this).find(".topic-wrapper .topic-title").attr("href");if(typeof (R)!="undefined"){R+=(R.indexOf("?")==-1?"?":"&amp;")+"goto=newpost";D("<a />").addClass("go-to-first-unread b-icon b-icon__double-arrow-down--blue js-go-to-first-unread").attr("href",R).attr("title",vBulletin.phrase.get("go_to_first_new_post")).html("&nbsp;").prependTo(D(this).find(".topic-wrapper"));D(this).find(".vb-icon-topic-status").attr("title",vBulletin.phrase.get("new_posts"))}}}})};vBulletin.markchannelsread=function(R,S,O){if(parseInt(R)){vBulletin.setChannelRead(R,S)}else{if(pageData.channelid&&parseInt(pageData.channelid)&&parseInt(pageData.threadmarking)>0&&parseInt(pageData.userid)>0){vBulletin.setChannelRead(pageData.channelid,S)}else{var M=[],N=D(O).closest(".widget-content").find(".forum-list-container"),L=N.find(".forum-item"),Q=N.find(".subforum-item");var P=function(T,V){var U=parseInt(D(V).attr("data-channel-id"),10);if(U){M.push(U)}};D.each(L,P);D.each(Q,P);D.each(M,function(T,U){if(T>=M.length-1){vBulletin.setChannelRead(U,S)}else{vBulletin.setChannelRead(U,[])}})}}};vBulletin.markRead=function(L){vBulletin.AJAX({call:"/ajax/api/node/markRead",data:{nodeid:L},success:D.noop,api_error:D.noop,error:D.noop,})};vBulletin.setChannelRead=function(M,N){var O=Math.round(new Date().getTime()/1000);success=((N.success&&typeof N.success=="function")?N.success:D.noop);if(pageData.threadmarking=="0"||!parseInt(pageData.userid)){if(M==0){D.cookie(pageData.cookie_prefix+"lastvisit",O)}else{var L;try{L=D.parseJSON(vBulletin.cookie.convertBbarrayCookie(D.cookie(pageData.cookie_prefix+"channel_view")))||{}}catch(P){L={}}L[M]=O;var Q={path:pageData.cookie_path,domain:pageData.cookie_domain};Q.expires=365;D.cookie(pageData.cookie_prefix+"channel_view",vBulletin.cookie.convertBbarrayCookie(JSON.stringify(L),"set"),Q)}success()}else{vBulletin.AJAX({call:"/ajax/api/node/markChannelsRead",data:{nodeid:M},success:success,api_error:vBulletin.ajaxtools.logApiError})}return true};vBulletin.ckeditor=vBulletin.ckeditor||{};window.CKEDITOR_BASEPATH=pageData.baseurl+"/js/ckeditor/";vBulletin.ckeditor.requiredScriptsLoaded=false;vBulletin.ckeditor.requiredScriptsLoadFailed=false;vBulletin.ckeditor.requiredScriptLoadingStarted=false;vBulletin.ckeditor.checkEnvironment=function(){var O=navigator.userAgent.toLowerCase(),P=O.match(/edge[ \/](\d+.?\d*)/),M=O.indexOf("trident/")>-1,R=!!(P||M);var N={ie:R,edge:!!P,webkit:!R&&(O.indexOf(" applewebkit/")>-1),air:(O.indexOf(" adobeair/")>-1),mac:(O.indexOf("macintosh")>-1),quirks:(document.compatMode=="BackCompat"&&(!document.documentMode||document.documentMode<10)),mobile:(O.indexOf("mobile")>-1),iOS:/(ipad|iphone|ipod)/.test(O)};N.gecko=(navigator.product=="Gecko"&&!N.webkit&&!N.opera&&!N.ie);if(N.webkit){if(O.indexOf("chrome")>-1){N.chrome=true}else{N.safari=true}}var L=0;if(N.ie){if(P){L=parseFloat(P[1])}else{if(N.quirks||!document.documentMode){L=parseFloat(O.match(/msie (\d+)/)[1])}else{L=document.documentMode}}N.ie9Compat=L==9;N.ie8Compat=L==8;N.ie7Compat=L==7;N.ie6Compat=L<7||N.quirks}if(N.gecko){var Q=O.match(/rv:([\d\.]+)/);if(Q){Q=Q[1].split(".");L=Q[0]*10000+(Q[1]||0)*100+(Q[2]||0)*1}}if(N.air){L=parseFloat(O.match(/ adobeair\/(\d+)/)[1])}if(N.webkit){L=parseFloat(O.match(/ applewebkit\/(\d+)/)[1])}var S=(!(N.ie&&L<7)&&!(N.gecko&&L<40000)&&!(N.webkit&&L<534));return S};vBulletin.ckeditor.fireCallbacks=function(O,M,L,N){if(L=="error"&&typeof M.error=="function"){M.error(O)}if(L=="success"&&typeof M.success=="function"){M.success.apply(N,[O,N])}if(typeof M.complete=="function"){M.complete(O)}};vBulletin.ckeditor.initEditor=function(N,M){M=M||{};N=vBulletin.ckeditor.verifyEditorId(N);console.log("Ckeditor: initEditor({0})".format(N));if(!vBulletin.ckeditor.checkEnvironment()){var L=D("#"+N).closest(".js-content-entry");L.find("li[data-panel=b-content-entry-panel__content--toggle-editor]").addClass("h-hide");L.find("li[data-panel=b-content-entry-panel__content--smiley]").addClass("h-hide");L.find("form").append(D('<input type="hidden" name="nl2br" value="1" />'));vBulletin.ckeditor.fireCallbacks(N,M,"error");return }if(vBulletin.ckeditor.requiredScriptsLoaded){vBulletin.ckeditor.doInitEditor(N,M)}else{vBulletin.ckeditor.loadScripts(N,M)}};vBulletin.ckeditor.loadScripts=function(N,M,L){if(vBulletin.ckeditor.requiredScriptLoadingStarted){console.warn("Ckeditor: Trying to load required scripts more than once.");return }vBulletin.ckeditor.requiredScriptLoadingStarted=true;M=M||{};N=N||"";if(typeof (M.hideLoadingDialog)!=="undefined"&&!M.hideLoadingDialog){vBulletin.ckeditor.showLoadingDialog(N)}var P=function(){if(M.showError||!vBulletin.ckeditor.requiredScriptsLoadFailed){vBulletin.warning("error","error_loading_ckeditor_script")}vBulletin.loadingIndicator.hide();vBulletin.ckeditor.requiredScriptsLoadFailed=true;vBulletin.ckeditor.fireCallbacks(N,M,"error")};var O=function(){if(!vBulletin.ckeditor.requiredScriptsLoadFailed){if(typeof L=="function"){L()}if(typeof vBulletin.ckeditor.doInitEditor=="function"&&window.CKEDITOR){vBulletin.ckeditor.requiredScriptsLoaded=true;vBulletin.ckeditor.doInitEditor(N,M)}else{setTimeout(O,10)}}else{vBulletin.ckeditor.fireCallbacks(N,M,"error");if(!M.hideLoadingDialog){vBulletin.ckeditor.hideLoadingDialog(N)}}};if(typeof vBulletin.ckeditor.doInitEditor!="function"&&!window.CKEDITOR){vBulletin.AJAX({url:vBulletin.getAjaxBaseurl()+"/ajax/render/ckeditor_javascript",success:function(R){var Q=[];var S=/src="([^"]+)"/g;while(match=S.exec(R)){Q.push(match[1])}var T=function(){if(Q.length>0){console.log("Ckeditor: Calling getScript for: {0}".format(Q[0]));D.getScript(Q[0],function(U,W,V){if(W!="success"){console.warn("Ckeditor: Error loading "+Q[0]);P();return false}console.log("Ckeditor: Script loaded: "+Q[0]);Q.splice(0,1);T()}).fail(function(V,W,U){console.warn("Ckeditor: Error loading script: "+W+" Exception: "+U);P()})}else{O()}};T()},error_phrase:"error_fetching_dialog"})}else{O()}};vBulletin.ckeditor.editorExists=function(L){return false};vBulletin.ckeditor.isEditorEmpty=function(L){return true};vBulletin.ckeditor.resetEditor=function(L){return false};vBulletin.ckeditor.getEditorContent=function(M){M=vBulletin.ckeditor.verifyEditorId(M);if(!M){return false}if(vBulletin.ckeditor.editorExists(M)){var L=vBulletin.ckeditor.getEditor(M);if(L&&L.getData){return D.trim(L.getData())}else{return false}}else{return D.trim(D("#"+M).val())}};vBulletin.ckeditor.focusEditor=function(M){M=vBulletin.ckeditor.verifyEditorId(M);if(!M){return }if(vBulletin.ckeditor.editorExists(M)){var L=vBulletin.ckeditor.getEditor(M);if(L){L.focus()}}else{D("#"+M).focus()}};vBulletin.ckeditor.loadingDialogStack={};vBulletin.ckeditor.showLoadingDialog=function(L){if((typeof vBulletin.ckeditor.loadingDialogStack[L]!="undefined")&&vBulletin.ckeditor.loadingDialogStack[L]){return }vBulletin.ckeditor.loadingDialogStack[L]=true;var M=D("#"+L);if(M.length>0&&M.is(":visible")){M.prop("disabled",true)}window.vBulletin.loadingIndicator.show("vBulletin.ckeditor.showLoadingDialog editorId: "+L)};vBulletin.ckeditor.hideLoadingDialog=function(L){if((typeof vBulletin.ckeditor.loadingDialogStack[L]=="undefined")||!vBulletin.ckeditor.loadingDialogStack[L]){return }vBulletin.ckeditor.loadingDialogStack[L]=false;D("#"+L).prop("disabled",false);window.vBulletin.loadingIndicator.hide("vBulletin.ckeditor.hideLoadingDialog editorId: "+L)};vBulletin.ckeditor.generatedIdCounter=0;vBulletin.ckeditor.verifyEditorId=function(M){M=M||"";if(typeof M=="string"){return M}else{if(typeof M=="object"&&typeof M.checkDirty!="undefined"&&typeof M.name!="undefined"){return M.name}else{var L=M instanceof D?M:D(M);if(!L.attr("id")){++vBulletin.ckeditor.generatedIdCounter;L.attr("id",("vb-cke-instance-"+vBulletin.ckeditor.generatedIdCounter))}return L.attr("id")}}};vBulletin.ckeditor.initEditorComponents=function(M,L){M=M||document;D(function(){D(".js-ckeditor-init-on-focus",M).off("focus").on("focus",function(){vBulletin.ckeditor.initEditor(D(this))});D(".js-ckeditor-init-on-page-load",M).each(function(){vBulletin.ckeditor.initEditor(D(this))});if(L){return }(function(){var P=function(R){return D(".js-content-entry-post-icons option",M).filter(function(){return(D(this).val()==R)}).data("icon-url")};var Q=function(R){return D(".js-content-entry-post-icons option",M).filter(function(){return(D(this).val()==R)}).text()};var O=function(S){if(S==0){return D("<span />").html(vBulletin.phrase.get("no_icon")).get(0)}var T=P(S);if(T){var R=Q(S);return D("<img />").attr("src",T).attr("alt","").attr("title",R).get(0)}else{return""}};D(".js-content-entry-post-icons",M).selectBox().change(function(){var R=D(this).val();D(".js-content-entry-post-icons.selectBox-dropdown .selectBox-label",M).html(O(R))});D(".js-content-entry-post-icons-selectBox-dropdown-menu li a").each(function(){var R=D(this).attr("rel");D(this).html(O(R))});D(".js-content-entry-post-icons",M).trigger("change")})();D(".js-content-entry-prefixes",M).selectBox();var N=[];D(".js-select-box",M).each(function(){var O=D(this),P;while(O.is(":hidden")){P=O.closest(".h-hide");if(P.length<1){break}N.push(P);P.removeClass("h-hide")}O.selectBox()});D.each(N,function(O,P){P.addClass("h-hide")})})};vBulletin.ckeditor.initEditorComponents(document);D(".js-focus-on-page-load").first().focus();vBulletin.doReplaceSecurityToken=function(L){if(typeof (L)=="undefined"||L==""){return }D("form").each(function(){var M=D(this);if(this.action&&!vBulletin.isInternalUrl(this.action)){console.log("Skipping security token for external url (form action): "+this.action);return true}if(typeof (this.method)!="undefined"&&this.method.toLowerCase()=="post"){if(M.find('input[name="securitytoken"]').length){M.find('input[name="securitytoken"]').val(L)}else{M.append('<input type="hidden" name="securitytoken" value="'+L+'" />')}}});pageData.securitytoken=L;console.log("Securitytoken updated")};window.openAlertDialog=function(R){var Q=D("#alert-dialog");R=R||{};if(!Q.data("created")){Q.dialog({autoOpen:false,modal:true,resizable:false,closeOnEscape:false,showCloseButton:false,dialogClass:"dialog-container alert-dialog-container dialog-box",create:function(){Q.data("created",true)}})}Q.dialog("option","width",R.width||500);Q.dialog("option","title",R.title||vBulletin.phrase.get("alert"));var M=Q.find(".dialog-content"),N=M.find(".message"),L=M.find(".icon"),P=D("#btnAlertDialogOK"),O="",S="";if(R.maxHeight){O=R.maxHeight;S="auto"}M.css({"max-height":O,overflow:S});if(R.message){N.html(R.message)}L.removeClass(function(T,U){return(U.match(/b-icon\S+\b/g)||[]).join(" ")+" no-icon b-icon"});R.buttonLabel=R.buttonLabel||vBulletin.phrase.get("ok");P.html(R.buttonLabel);Q.find(".js-button").toggleClass("b-button--sitebuilder",D("body").is(".edit-mode, .js-edit-mode-style"));Q.off("dialogopen").on("dialogopen",function(){P.off("click").on("click",function(){if(typeof R.onBeforeClose=="function"){R.onBeforeClose.apply(this)}Q.dialog("close")}).focus();Q.parent(".alert-dialog-container").css("z-index","10100")});Q.off("dialogclose").on("dialogclose",function(){if(typeof R.onAfterClose=="function"){R.onAfterClose.apply(P)}});switch(R.iconType){case"warning":case"error":L.addClass("b-icon b-icon__warning-l--red h-margin-right-xl");L.show();break;default:L.addClass("no-icon").hide();break}Q.dialog("open");return Q};vBulletin.warning=function(N,L,M){vBulletin.alert(N,L,"warning",M)};vBulletin.error=function(N,L,M){vBulletin.alert(N,L,"error",M)};vBulletin.alert=function(O,L,N,M){openAlertDialog({title:vBulletin.phrase.get(O),message:vBulletin.phrase.get(L),iconType:N,onAfterClose:M})};vBulletin.flashMessage=function(M){var L=D(".js-flash-message"),N=L.find(".js-flash-message-content");N.text(M);L.removeClass("h-hide").show();window.setTimeout(function(){L.fadeOut(function(){L.addClass("h-hide")})},5000)};window.openConfirmDialog=function(P){P=P||{};var L=D("#confirm-dialog");if(!L.data("created")){L.dialog({autoOpen:false,modal:true,resizable:false,closeOnEscape:false,showCloseButton:false,create:function(){L.data("created",true)}})}var S=P.title||vBulletin.phrase.get("confirmation");L.dialog("option","title",S);L.closest(".ui-dialog").find(".ui-dialog-title").html(S);var T=L.find(".dialog-content");var Q=T.find(".message");var R=T.find(".icon");if(P.message){Q.html(P.message.replace("\n","<br />"))}L.dialog("option","width",(P.width?P.width:500));L.dialog("option","dialogClass","dialog-container confirm-dialog-container dialog-box "+(P.dialogClass||""));R.removeClass(function(U,V){return(V.match(/b-icon\S+\b/g)||[]).join(" ")+" no-icon b-icon"});P.buttonLabel=P.buttonLabel||{};P.buttonLabel.yesLabel=P.buttonLabel.yesLabel||vBulletin.phrase.get("yes");P.buttonLabel.noLabel=P.buttonLabel.noLabel||vBulletin.phrase.get("no");var N=D("#btnConfirmDialogYes").html(P.buttonLabel.yesLabel);var O=D("#btnConfirmDialogNo").html(P.buttonLabel.noLabel);N.addClass("b-button--primary").removeClass("b-button--secondary");O.addClass("b-button--secondary").removeClass("b-button--primary");L.find(".js-button").toggleClass("b-button--sitebuilder",D("body").is(".edit-mode, .js-edit-mode-style"));var M;L.off("dialogopen").on("dialogopen",function(){var V=D("#btnConfirmDialogYes").off("click").on("click",function(){M=this;var X,W;if(typeof P.onClickYes=="function"){X=P.onClickYes.apply(this);if(typeof P.onClickYesWithAjax!="undefined"&&P.onClickYesWithAjax){return false}}if(X===false){return false}if(typeof P.onBeforeClose=="function"){W=P.onBeforeClose.apply(this);if(typeof P.onBeforeCloseWithAjax!="undefined"&&P.onBeforeCloseWithAjax){return false}}if(W===false){return false}L.dialog("close")}).focus();var U=D("#btnConfirmDialogNo").off("click").on("click",function(){M=this;if(typeof P.onClickNo=="function"){P.onClickNo.apply(this)}if(typeof P.onBeforeClose=="function"){P.onBeforeClose.apply(this)}L.dialog("close")})});L.off("dialogclose").on("dialogclose",function(V,U){if(typeof P.onAfterClose=="function"){P.onAfterClose.apply(M)}});switch(P.iconType){case"warning":R.addClass("b-icon b-icon__warning-l--red h-margin-right-xl");R.show();break;default:R.addClass("no-icon").hide();break}L.dialog("open");return L};vBulletin.openPromptDialog=function(O){var Q=D("#prompt-dialog");if(!Q.data("created")){Q.dialog({autoOpen:false,modal:true,resizable:false,closeOnEscape:false,showCloseButton:false,width:500,dialogClass:"dialog-container prompt-dialog-container dialog-box",create:function(){Q.data("created",true)}})}O=O||{};Q.dialog("option","title",O.title||vBulletin.phrase.get("prompt"));var T=Q.find(".dialog-content"),P=T.find(".message"),R;if(O.message){P.html(O.message)}var L=O.initialValue||"";if(!O.multiline){R=Q.find("input.input-box").val(L).removeClass("h-hide");R.next().addClass("h-hide");if(Number(O.maxlength)){R.attr("maxlength",Number(O.maxlength))}else{R.removeAttr("maxlength")}T.addClass("table");T.find("> div").addClass("td")}else{R=Q.find("textarea.input-box").val(L).removeClass("h-hide");R.prev().addClass("h-hide");T.removeClass("table");T.find("> .td").removeClass("td")}O.buttonLabel=O.buttonLabel||{};O.buttonLabel.okLabel=O.buttonLabel.okLabel||vBulletin.phrase.get("ok");O.buttonLabel.cancelLabel=O.buttonLabel.cancelLabel||vBulletin.phrase.get("cancel");var S=D("#btnPromptDialogOK").html(O.buttonLabel.okLabel),N=D("#btnPromptDialogCancel").html(O.buttonLabel.cancelLabel),M;Q.find(".js-button").toggleClass("b-button--sitebuilder",D("body").is(".edit-mode, .js-edit-mode-style"));Q.off("dialogopen").on("dialogopen",function(){var V=D("#btnPromptDialogOK").off("click").on("click",function(){M=this;var Y=D.trim(R.val()),X,b;if(O.validation&&typeof O.validation=="object"){var a=O.validation;if(!a.override&&a.callback){var Z=a.callback;if(!Array.isArray(Z)){Z=[Z]}for(E=0;E<Z.length;E++){if(typeof Z[E]=="function"){var W=Z[E].apply(Q,[R,O]);if(W!==true){if(W&&a.showError){Q.find(".js-prompt-error").html(vBulletin.phrase.get(W)).removeClass("h-hide")}R.trigger("select").trigger("focus");return false}}}}if(typeof a.custom=="function"){if(!a.custom.apply(this,[R])){return false}}}if(typeof O.onClickOK=="function"){b=O.onClickOK.apply(this,[Y]);if(typeof O.onClickOKWithAjax!="undefined"&&O.onClickOKWithAjax){return false}}if(b===false){return false}if(typeof O.onBeforeClose=="function"){X=O.onBeforeClose.apply(this);if(typeof O.onBeforeCloseWithAjax!="undefined"&&O.onBeforeCloseWithAjax){return false}}if(X===false){return false}Q.dialog("close")}).trigger("focus");var U=D("#btnPromptDialogCancel").off("click").on("click",function(){M=this;if(typeof O.onClickCancel=="function"){O.onClickCancel.apply(this)}if(typeof O.onBeforeClose=="function"){O.onBeforeClose.apply(this)}Q.dialog("close")})});Q.off("dialogclose").on("dialogclose",function(){Q.find(".js-prompt-error").addClass("h-hide");if(typeof O.onAfterClose=="function"){O.onAfterClose.apply(M);R.val("")}});Q.dialog("open");R.trigger("focus");return Q};vBulletin.openPromptDialog.validationString=function(N,M){var L=D.trim(N.val());if(!L){return"please_enter_a_value"}else{if(M.multiline&&L.length>M.maxlength){return["message_too_long",M.maxlength]}}return true};window.openPromptDialog=vBulletin.openPromptDialog;window.openLoadingDialog=function(){console.warn("Function openLoadingDialog is deprecated.");window.vBulletin.loadingIndicator.show("openLoadingDialog")};window.closeLoadingDialog=function(){console.warn("Function closeLoadingDialog is deprecated.");window.vBulletin.loadingIndicator.hide("closeLoadingDialog")};window.bindFormReset=function(L){return D(L).on("reset",function(M,N){if(typeof N=="function"){N()}})};window.vBulletin=window.vBulletin||{};vBulletin.sitebuilder=vBulletin.sitebuilder||{};vBulletin.sitebuilder.toggleSitebuilder=function(L){var M=D(this);if(M.hasClass("on")){D.removeCookie(pageData.sb_state_cookie,{path:pageData.cookie_path,domain:pageData.cookie_domain});D(".js-top-menu-sitebuilder").slideUp("fast");M.removeClass("on");return true}if(D(".js-top-menu-sitebuilder").length>0){D(".js-top-menu-sitebuilder").slideDown("fast");M.addClass("on");D.cookie(pageData.sb_state_cookie,"1",{path:pageData.cookie_path,domain:pageData.cookie_domain});return true}vBulletin.sitebuilder.loadSitebuilderMarkup(true);return true};vBulletin.sitebuilder.loadSitebuilderMarkup=function(L,N){L=L||false;function M(){if(typeof N=="function"){return N()}}if(D("#sitebuilder-wrapper").is(".js-sb-loaded")){return M()}vBulletin.AJAX({call:"/ajax/activate-sitebuilder",data:{pageid:pageData.pageid,nodeid:pageData.nodeid,userid:pageData.userid,loadMenu:L},cache:false,isAjaxTemplateRender:true,isAjaxTemplateRenderWithData:true,success:function(O){if(O&&O.templates){if(L){D("head").append(O.templates.css);D(".js-top-menu-sitebuilder--list").hide().html(O.templates.menu)}D("#sitebuilder-wrapper").prepend(O.templates.main);D(".js-top-menu-sitebuilder").show();D(".edit-switch-container .switch-control").addClass("on");D("#sitebuilder-wrapper").addClass("js-sb-loaded");D.cookie(pageData.sb_state_cookie,"1",{path:pageData.cookie_path,domain:pageData.cookie_domain});return M()}},})};vBulletin.sitebuilder.menuClickProxy=function(){var L=this;vBulletin.sitebuilder.loadSitebuilderMarkup(false,function(){D(".js-top-menu-sitebuilder--list .js-top-menu-link:not(.js-top-menu-tab--admincp)").off("click",vBulletin.sitebuilder.menuClickProxy);D(L).click()});return false};if(typeof (tzOffset)!="undefined"){var J=new Date().getTimezoneOffset()/60;if(Math.abs(tzOffset+J)==1){vBulletin.AJAX({call:"/profile/save-dst",data:{userid:pageData.userid,clientUtcOffset:J},success:function(){window.location.reload()},api_error:D.noop,error:D.noop})}}function K(L,P){var N=0,M=L.length;function O(){if(N==M){P()}}L.each(function(){if(this.complete&&this.naturalHeight>0&&this.src){++N}else{D(this).one("load",function(){++N;O()})}});O()}function I(O,N,Q,R,L){function M(T){var V=T.position().top+T.outerHeight(),U=Math.round(V);return[U-1,U,(U+1)]}function S(W,V){var U,T;for(U in W){for(T in V){if(W[U]===V[T]){return true}}}return false}function P(){var c=D(this);c.trigger("vbulletin:flexgridstart",{isResize:L});var Y=D(N,c),U=Y.last(),a=false,b={},Z=0,X=false,W=false,V="vb-temp-placeholder-grid-lastrow",T=Y.first();if(!Y.length){return }Y.removeClass(Q+" "+V);Y.removeClass(R);setTimeout(function(){a=M(U);Y.each(function(){var e=D(this),f=M(e);if(S(a,f)){e.addClass(V)}else{if(!X){X=f}if(!S(X,f)){++Z;T.addClass(R)}X=f;T=e;if(typeof b[Z]=="undefined"){b[Z]=0}++b[Z]}});if(T!=Y.first()){T.addClass(R)}D.each(b,function(e,f){if(W===false){W=f}if(f<W){W=f}});var d=Y.filter("."+V);d.removeClass(V);if(W===false||d.length<W){d.addClass(Q)}if(W!==false&&d.length==W){d.last().addClass(R)}c.trigger("vbulletin:flexgridready",{isResize:L})},0)}D(O).each(P)}function H(Q,M,R,O,P,N,L){D(Q).each(function(){var S=D(this),T=D(R,S);if(N){I(S,M,O,P,L)}else{K(T,function(){I(S,M,O,P,L)})}})}vBulletin.initFlexGridFixLastRowAll=function(L){L=(typeof L=="undefined")?false:L;function M(N){H(".js-flexgrid",".js-flexgrid-item",".js-flexgrid-image","b-flexgrid__item--lastrow","b-flexgrid__item--lastinrow",true,N);H(".js-photo-preview",".b-gallery-thumbnail-list__item",".b-gallery-thumbnail-list__thumbnail","b-gallery-thumbnail-list__item--lastrow","b-gallery-thumbnail-list__item--lastinrow",false,N)}M(L);vBulletin.Responsive.Debounce.registerCallbackOnce(function(){M(true)})};function A(N,S){function O(T,Y,X){var W={},U,Z,V,e,h,j,k=[],d,f,c;d=4*8;f=T.data.length-d;c=T.data;for(Z=0;Z<f;Z+=d){V=Math.round(c[Z]/Y);e=Math.round(c[Z+1]/Y);h=Math.round(c[Z+2]/Y);j=Math.round(c[Z+3]/Y);U=V+(e*100)+(h*10000)+(j*1000000);if(!W[U]){W[U]=1}else{++W[U]}}for(Z in W){k.push([Z,W[Z]])}k.sort(function(i,g){return i[1]>g[1]?-1:(g[1]>i[1]?1:0)});if(k.length>X){k=k.slice(0,X)}return k}function M(X){var W,V,T,U;U=Math.floor(X/1000000);T=Math.floor(X/10000)-(U*100);V=Math.floor(X/100)-(U*10000)-(T*100);W=X-(U*1000000)-(T*10000)-(V*100);return[W,V,T,U]}function R(d,c){var Z,Y,U,X,e,V,T,W;Z=M(d[0]);Y=M(c[0]);U=Math.min(Z[0],Z[1],Z[2]);X=Math.max(Z[0],Z[1],Z[2]);e=Math.min(Y[0],Y[1],Y[2]);V=Math.max(Y[0],Y[1],Y[2]);T=X-U;W=V-e;return T>W?-1:(W>T?1:0)}function L(U,T){var V,Y,X=0,W=0;V=M(U[0]);Y=M(T[0]);if(V[0]!=V[1]){++X}if(V[0]!=V[2]){++X}if(V[1]!=V[2]){++X}if(Y[0]!=Y[1]){++W}if(Y[0]!=Y[2]){++W}if(Y[1]!=Y[2]){++W}return X>W?-1:(W>X?1:0)}function Q(T,X,c){var e=192,f=255,W=300;W=300;while(true){if(!--W){break}if((T>=f||X>=f||c>=f)||(T>=e&&X>=e&&c>=e)){break}++T;++X;++c}if(T<e||X<e||c<e){var V=f-T,U=f-X,Z=f-c,Y=Math.max(V,U,Z),d=V/Y,a=U/Y,h=Z/Y;W=300;while(true){if(!--W){break}T+=d;X+=a;c+=h;if(T>=e&&X>=e&&c>=e){break}}T=parseInt(Math.round(T),10);X=parseInt(Math.round(X),10);c=parseInt(Math.round(c),10)}return{r:T,g:X,b:c}}function P(j){var Y=D(S,j),h=j.innerWidth(),k=j.innerHeight(),f=Y.outerWidth(),b=Y.outerHeight();if(!Y.length){return }if(f>=h&&b>=k){return }var X=Y.get(0),V=document.createElement("canvas"),U=V.getContext&&V.getContext("2d"),W=X.naturalWidth||f,a=X.naturalHeight||b,T=false;V.width=W;V.height=a;U.drawImage(X,0,0);try{T=U.getImageData(0,0,W,a)}catch(d){}if(!T||!T.data||!T.data.length){return }var Z=20,c=100,i,g;i=O(T,Z,c);i.sort(R);i.sort(L);g=i.shift();g=M(g[0]);g[0]=g[0]*Z;g[1]=g[1]*Z;g[2]=g[2]*Z;g[3]=g[3]*Z;if(g[3]>=245){g[3]=255}j.css("backgroundColor","rgba("+g.join(",")+")")}D(N).each(function(T){var V=D(this),U=D(S,V);if(U.length){setTimeout(function(){K(U,function(){P(V)})},0)}})}vBulletin.initFrameImagesWithColor=function(){A(".js-frame-image-wrapper",".js-frame-image")};function F(){function M(){var Q=D(this),P=Q.prop("title");if(P==""){var O=Q.get(0);if(O.scrollWidth>O.clientWidth){var N=Q.text().trim();if(N.length>300){N=N.substr(0,297)+"..."}Q.prop("title",N)}}Q.addClass("js-ellipsis-has-title")}var L=".ellipsis:not(.js-ellipsis-has-title)";D(document).off("mouseover",L,M).on("mouseover",L,M)}setTimeout(function(){if(!D.support.selectstart){D.fn.extend({disableSelection:function(){return this.each(function(){D(this).css({"-moz-user-select":"-moz-none","-webkit-user-select":"none","-khtml-user-select":"none","-o-user-select":"none","user-select":"none"})})},enableSelection:function(){return this.each(function(){D(this).css({"-moz-user-select":"","-webkit-user-select":"","-khtml-user-select":"","-o-user-select":"","user-select":""})})}})}function M(){window.vBulletin.loadingIndicator.init();D(document).off("click","a.animate-scroll").on("click","a.animate-scroll",function(){var W=vBulletin.scrollToAnchor(this.hash);if(W){window.location.href=this.href}return false});var V=function(W){D(this).closest(".split-button").toggleClass("open").find(".submenu").toggleClass("h-hide");D("body").off("click.buttonset").on("click.buttonset",function(X){if(D(X.target).closest(".split-button").length==0){D(".split-button").removeClass("open").find(".submenu").addClass("h-hide");D("body").off("click.buttonset")}})};D(".split-button .button-text").button().closest(".button-set").find(".js-button__icon").button({text:false,icons:{primary:"vb-icon vb-icon-triangle-down-wide"}}).on("click",V).closest(".button-set").buttonset().filter(".one-click").find(".button-text").on("click",V);D(document).off("click",".canvas-widget .toggle-button").on("click",".canvas-widget .toggle-button",function(c,W){var b=D(this),d=b.closest(".canvas-widget"),X=D(".widget-content",d),a=d.data("widget-instance-id"),Z=b.closest(".edit-mode").length;if(b.hasClass("expand")){d.removeClass("collapsed");if(W){X.show()}else{X.slideDown("slow")}if(!Z){vBulletin.arraystore.unset("collapse",a)}}else{if(W){X.hide();d.addClass("collapsed")}else{X.slideUp("slow",function(){d.addClass("collapsed")})}if(!Z){vBulletin.arraystore.set("collapse",a,1)}}b.toggleClass("collapse expand");var Y=b.attr("title");b.attr("title",b.data("toggle-title")).data("toggle-title",Y);return false});(function(){var W=vBulletin.arraystore.getAll("collapse");if(W&&W!=null){D.each(W,function(X,Y){D("#widget_"+X+":not(.widget-no-header-buttons) .widget-header .toggle-button").trigger("click",[true])})}})();D(".conversation-toolbar-wrapper form.toolbar-filter-overlay").trigger("reset");var R=!!("placeholder" in document.createElement("input"));if(!R){var Q=D("input[placeholder], textarea[placeholder]");Q.filter(":focus").addClass("js-temp-focus").blur();Q.placeholder();var U=function(X){var W=Q.filter(".js-temp-focus").focus();if(X){W.removeClass("js-temp-focus")}};D(window).on("load.placeholder_temp",function(){U(true);D(window).off("load.placeholder_temp")});U()}if(D("textarea.autogrow").length>0){D("textarea.autogrow").elastic().off("blur.elastic")}D(".edit-switch-container .switch-control").on("click",vBulletin.sitebuilder.toggleSitebuilder);D(".js-top-menu-sitebuilder--list .js-top-menu-link:not(.js-top-menu-tab--admincp)").removeClass("b-top-menu__item-link--disabled").on("click",vBulletin.sitebuilder.menuClickProxy);D("select.custom-dropdown").selectBox();D(document).off("keypress",".js-button").on("keypress",".js-button",function(W){if(W.which==32||W.which==13){if(W.target&&W.target.nodeName&&(W.target.nodeName+"").toLowerCase()=="label"&&D(W.target).find("input").length==1){D(W.target).find("input").trigger("click")}else{D(this).trigger("click")}W.preventDefault()}});D(document).off("keypress",".js-link").on("keypress",".js-link",function(W){if(W.which==13){D(this).trigger("click");W.preventDefault()}});D(".js-debug-collapse-list").next("ol, ul").hide();D(document).off("click",".js-debug-collapse-list").on("click",".js-debug-collapse-list",function(W){D(this).next("ol, ul").toggle()});D(document).off("click",".js-toggle-slider").on("click",".js-toggle-slider",function(){var Z=D(this);if(Z.is(".b-toggle-slider--yes")){Z.removeClass("b-toggle-slider--yes").addClass("b-toggle-slider--no");Z.find(".b-toggle-slider__radio--no").prop("checked",true);Z.data("value","0")}else{Z.removeClass("b-toggle-slider--no").addClass("b-toggle-slider--yes");Z.find(".b-toggle-slider__radio--yes").prop("checked",true);Z.data("value","1")}var Y=D(".js-toggle-slider, .js-toggle-slider__dependent"),W=Y.index(Z),X=false;Y.each(function(a,b){if(a==W){X=true}else{if(X==true){var c=D(this);if(c.is(".js-toggle-slider__dependent")){c.toggleClass("h-hide")}else{X=false;return false}}}});Z.trigger("change",Z.data("value"));return false});D(".js-select-box").selectBox();D(".mainmenu li:has(.submenu)").on("click",function(W){D(".submenu",this).show();return false}).hover(function(){},function(W){D(".submenu",this).hide()});D(".mainmenu.textControls li").on("click",function(W){if(D(".tagCtrl",this).length==0){D("#tag-dialog").hide()}});D(".mainmenu .submenu li a").on("click",function(X){var W=D(this).closest(".js-comp-menu-dropdown");if(W.length){W.removeClass("b-comp-menu-dropdown--open")}else{D(this).closest(".submenu").hide()}});D(".channel-content-widget .new-conversation-btn").off("click").on("click",function(){window.location.href=pageData.baseurl+"/new-content/"+pageData.channelid});D(".pagenav-form").submit(function(){if(Number(this.page.value)>0){location.href=this.action+"&p="+this.page.value}return false}).trigger("reset");D(".toolbar-pagenav").off("keydown",".toolbar-pagenav input").on("keydown",".toolbar-pagenav input",function(X){var W=X.which;if(!X.shiftKey&&!X.altKey&&!X.ctrlKey&&((W>=48&&W<=57)||(W>=96&&W<=105)||W==8||W==9||W==13||W==35||W==36||W==37||W==39||W==46||W==45)){return true}return false});D(document).off("click",".js-post__manage").on("click",".js-post__manage",function(){if(typeof vBulletin.inlinemod=="undefined"){var X=vBulletin.getAjaxBaseurl()+"/js/inlinemod.js?v="+pageData.simpleversion,W=this;D.getScript(X,function(){vBulletin.inlinemod.manage_deleted_form.apply(W)}).error(function(){vBulletin.warning("error","error_loading_inlinemod_script")})}else{vBulletin.inlinemod.manage_deleted_form.apply(this)}});D(document).off("click",".js-post__show-hide").on("click",".js-post__show-hide",function(){var Y=D(this),X=Y.text(),W=Y.data("toggle-text");if(Y.hasClass("js-post__show-hide--show")){Y.closest(".js-post").addClass("b-post--show-deleted-content");Y.html(W).data("toggle-text",X).removeClass("js-post__show-hide--show")}else{Y.closest(".js-post").removeClass("b-post--show-deleted-content");Y.html(W).data("toggle-text",X).addClass("js-post__show-hide--show")}});D(document).off("click","a.video-frame").on("click","a.video-frame",function(Y){Y.preventDefault();var X={code:this.getAttribute("data-vcode"),provider:this.getAttribute("data-vprovider")};if(this.getAttribute("data-height")){X.height=this.getAttribute("data-height")}if(this.getAttribute("data-width")){X.width=this.getAttribute("data-width")}var W=D(this);D.post(vBulletin.getAjaxBaseurl()+"/ajax/render/bbcode_video",X,function(Z){if(Z){W.replaceWith(Z)}},"json")});vBulletin.markreadcheck();D(document).off("click","a.markchannelsread, a.navbar_mark_channels_read").on("click","a.markchannelsread, a.navbar_mark_channels_read",function(){vBulletin.markchannelsread(0,{success:function(){location.reload()},},D(this));return false});D(".js-footer-go-to-top").off("click").on("click",function(W){W.preventDefault();D("body,html").animate({scrollTop:0},800)});var T=function(Z){var X=Z.data("action"),Y=!Z.is(":checked"),W=D(document).find(Z.data("on"));if(X=="invisible"){W.toggleClass("h-invisible",Y)}else{W.find(":input").addBack(":input").prop("disabled",Y)}};D("input.js-dependent-master").each(function(){var Y=D(this),X=Y.attr("type"),W=function(){T(Y)};if(X=="checkbox"){Y.on("change",W)}else{if(X=="radio"){Y.closest("form").find('input[name="'+Y.attr("name")+'"]').on("change",W)}}});D("input.js-select-all-master").on("change",function(){var W=D(this);$list=D(document).find(W.data("list"));$list.prop("checked",W.is(":checked"))});function S(X){vBulletin.flashMessage(X);var W=window.location.href,Z,a,Y;Z=W.split("?");a=Z[1];Z=a.split("#");a=Z[0];if(a.match(/&flashmsg=msg-[a-z0-9_-]+/i)){Y=W.replace(/&flashmsg=msg-[a-z0-9_-]+/i,"")}else{if(a.match(/flashmsg=msg-[a-z0-9_-]+&/i)){Y=W.replace(/flashmsg=msg-[a-z0-9_-]+&/i,"")}else{if(a.match(/^flashmsg=msg-[a-z0-9_-]+$/i)){Y=W.replace(/\?flashmsg=msg-[a-z0-9_-]+/i,"")}}}History.replaceState({},null,Y)}if(pageData.flash_message){S(pageData.flash_message)}}function N(){window.clearTimeout(securitytoken_timeout);if(pageData.securitytoken!="guest"){securitytoken_timeout=window.setTimeout(N,3600000);var Q=function(){if(++securitytoken_errors==3){vBulletin.doReplaceSecurityToken("guest")}};vBulletin.AJAX({call:"/ajax/replace-securitytoken",data:{securitytoken:pageData.securitytoken},success:function(R){securitytoken_errors=0;vBulletin.doReplaceSecurityToken(R.newtoken)},api_error:Q,error:Q,})}}function L(){if(typeof (pageData.adminAction)!="undefined"){vBulletin.assertUserHasAdminPermission("canusesitebuilder",self,D.noop,function(){window.location.reload()})}if(vBulletin.options.get("crontab")){if(pageData.nextcron<=pageData.current_server_datetime){vBulletin.loadingIndicator.suppressNextAjaxIndicator();vBulletin.AJAX({call:"/ajax/apidetach/cron/run",api_error:D.noop,error:vBulletin.ajaxtools.logAjaxError})}}}M();D("#searchPopupControl").on("click",function(Q){if(D(this).hasClass("open")){D(this).removeClass("open");D("#searchPopupContent").hide()}else{D(this).addClass("open");D("#searchPopupContent").show()}});D("html").on("click",function(Q){if(D(Q.target).closest("#searchForm").size()==0&&D("#searchPopupControl").hasClass("open")){D("#searchPopupControl").removeClass("open");D("#searchPopupContent").hide()}});D("#btnAdvSearch").off("click").on("click",function(R){R.preventDefault();D(this).data("clicked2submit",1);var Q=D("#searchForm");D('<input type="hidden" name="AdvSearch" value="1" />').appendTo(Q);Q.submit()});D("#searchForm").off("submit.searchform").on("submit.searchform",function(W){var Y=D(this),V={},R=Y.find("#q"),T=D.trim(R.val());if(T.length>0){V.keywords=T}else{if(!D("#btnAdvSearch").data("clicked2submit")){vBulletin.warning("search","please_provide_search_string",function(){R.focus()});W.stopPropagation();return false}}var X=Y.find(".searchPopupBody"),S=X.find(".searchFields_title_only");if(S.size()>0&&S.prop("checked")){V.title_only=1}var Q=X.find(".searchFields_author");if(Q.size()>0&&Q.prop("checked")){V.author=[Q.val()]}var U=X.find(".searchFields_channel");if(U.size()>0&&U.prop("checked")){V.channel=[U.val()]}Y.find("input[name=searchJSON]").val(JSON.stringify(V));return true});var O,P=pageData.cookie_prefix+"np_notices_displayed";if(!(O=D.cookie(P))){O=new Array()}if(!(O instanceof Array)){O=new Array(O)}D('ul.notices li[data-notice-persistent="0"]').each(function(Q){O.push(D(this).attr("data-notice-id"))});if(O.length>0){O=null}D.cookie(P,O,{path:pageData.cookie_path,domain:pageData.cookie_domain});D("ul.notices > li > .close").off("click").on("click",function(Q){var S=D(this).closest("li"),R=S.attr("data-notice-id");vBulletin.AJAX({call:"/ajax/api/notice/dismiss",data:{noticeid:R},success:function(T){S.hide("slow",function(){var U=D(this).parent();if(U.find(">li:visible").length==0){U.addClass("h-hide")}})}})});D("#frmActivateuser").ajaxForm({dataType:"json",beforeSubmit:function(T,S,R){var Q="",U="";if(D.trim(D(".username",S).val())==""){Q=vBulletin.phrase.get("please_enter_a_username");U=".username"}else{if(D.trim(D(".activateid",S).val())==""){Q=vBulletin.phrase.get("requiredfieldmissing",vBulletin.phrase.get("activation_code"));U=".activateid"}}if(Q){openAlertDialog({title:vBulletin.phrase.get("error"),message:Q,iconType:"warning",onAfterClose:function(){D(U,S).focus()}});return false}return true},success:function(S,U,V,R){if(S&&S.response&&S.response.errors){var W=[];for(var Q in S.response.errors){if(S.response.errors[Q][0]!="exception_trace"&&S.response.errors[Q][0]!="errormsg"){W.push(vBulletin.phrase.get(S.response.errors[Q]))}}openAlertDialog({title:vBulletin.phrase.get("error"),message:W.join("<br />"),iconType:"warning",onAfterClose:function(){vBulletin.hv.reset(true)}})}else{var T=S.response.msg_params;T.unshift(S.response.msg);openAlertDialog({title:vBulletin.phrase.get("activate_your_account"),message:vBulletin.phrase.get.apply(vBulletin.phrase,T),onAfterClose:function(){window.location.href=pageData.baseurl}})}}});D("#frmActivateemail").ajaxForm({dataType:"json",beforeSubmit:function(T,S,R){var Q="",U="";if(D.trim(D(".email",S).val())==""){Q=vBulletin.phrase.get("please_enter_your_email_address")}else{if(!isValidEmailAddress(D(".email",S).val())){Q=vBulletin.phrase.get("invalid_email_address")}}if(Q){openAlertDialog({title:vBulletin.phrase.get("error"),message:Q,iconType:"warning",onAfterClose:function(){D(U,S).focus()}});return false}return true},success:function(S,U,V,R){if(S&&S.response&&S.response.errors){var W=[];for(var Q in S.response.errors){if(S.response.errors[Q][0]!="exception_trace"&&S.response.errors[Q][0]!="errormsg"){W.push(vBulletin.phrase.get(S.response.errors[Q]))}}openAlertDialog({title:vBulletin.phrase.get("error"),message:W.join("<br />"),iconType:"warning",onAfterClose:function(){vBulletin.hv.reset(true)}})}else{var T=S.response.msg_params;T.unshift(S.response.msg);openAlertDialog({title:vBulletin.phrase.get("email_activation_codes"),message:vBulletin.phrase.get.apply(vBulletin.phrase,T),onAfterClose:function(){window.location.href=pageData.baseurl}})}}});D(".js-stylechooser a").off("click").on("click",function(){var Q=D(this).data("styleid"),R=new Date();R.setDate(R.getDate()+365);D.cookie(pageData.cookie_prefix+"userstyleid",Q,{path:pageData.cookie_path,domain:pageData.cookie_domain,expires:R});if(pageData.userid){var S={userid:pageData.userid,password:"",user:{styleid:Q},options:[""],adminoptions:[""],userfield:[""],};vBulletin.loadingIndicator.suppressNextAjaxIndicator();vBulletin.AJAX({call:"/ajax/apidetach/user/save",data:S,success:function(){window.location.reload()},})}else{window.location.reload()}return false});D(".js-languagechooser a").off("click").on("click",function(){var Q=D(this).data("languageid"),R=new Date();R.setDate(R.getDate()+365);D.cookie(pageData.cookie_prefix+"languageid",Q,{path:pageData.cookie_path,domain:pageData.cookie_domain,expires:R});window.location.reload();return false});D("a.navbar_profile").on("click",function(){if(pageData.userid=="0"){D("#lnkLoginSignupMenu").click();return false}});vBulletin.doReplaceSecurityToken(pageData.securitytoken);securitytoken_timeout=window.setTimeout(N,3600000);securitytoken_errors=0;vBulletin.initFlexGridFixLastRowAll();vBulletin.initFrameImagesWithColor();F();setTimeout(L,5)},1);vBulletin.getQueryString=function(M){if(M==""){return{}}var L={};for(var N=0;N<M.length;++N){var O=M[N].split("=");if(O.length!=2){continue}L[O[0]]=decodeURIComponent(O[1].replace(/\+/g," "))}return L};vBulletin.triggerHandler=function(L,N,O){if(!N||N.length==0){N=D(document)}else{if(!(N instanceof D)){N=D(N)}}O=O||[];var M=D.Event(L);M.target=this instanceof D?this.get(0):this;return N.triggerHandler(M,O)}})(jQuery);function JShtmlEncode(B){var A="";if(B&&typeof B!=="undefined"&&B.length>0){A=$("<div/>").text(B).html()}A=String(A).replace(/"/g,"&quot;");return A}function isValidEmailAddress(B){var A=new RegExp(/(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/i);return A.test(B)}function str_repeat(D,C){var B="";for(var A=0;A<C;A++){B=B.concat(D)}return B}function showStatusMessage(A,F){var C=$(".conversation-status-message.notice"),E;if(C.length>0){var B=C.filter("."+F);if(B.length==1){C=B}else{if((E=C.filter(".h-hide")).length==1){C=E}else{C=C.first().clone().removeClass().addClass("conversation-status-message notice").appendTo(".conversation-status-messages")}}C=(B.length==1?B:C).show();if(!vBulletin.isScrolledIntoView(C)){var D=C.offset().top-10;C.hide();$("html,body").animate({scrollTop:D},"slow",function(){C.find("span").html(A).end().addClass(F+" show-x").fadeIn("slow","linear")})}else{if(C.hasClass("h-hide")){C.hide().removeClass("h-hide").addClass(F+" show-x").find("span").html(A).end().fadeIn(800,"linear")}else{C.fadeOut("slow","linear",function(){C.find("span").html(A).end().addClass(F+" show-x").fadeIn("slow","linear")})}}}}window.vBulletin.htmlEntities=function(A){return String(A).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")};window.vBulletin.htmlEntities_decode=function(A){return String(A).replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"')};window.vBulletin.loadedIds=window.vBulletin.loadedIds||[];window.vBulletin.isAlreadyLoaded=function(A){if($.inArray(A,window.vBulletin.loadedIds)!=-1){return true}window.vBulletin.loadedIds.push(A)};