/*=======================================================================*\
|| ###################################################################### ||
|| # vBulletin 5.4.2
|| # ------------------------------------------------------------------ # ||
|| # Copyright 2000-2018 vBulletin Solutions Inc. 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 E=["log","debug","info","warn","error","assert","dir","dirxml","group","groupEnd","time","timeEnd","count","trace","profile","profileEnd"];for(var C=0;C<E.length;C++){var B=typeof window.console[E[C]];if(B!="function"&&B!="object"){window.console[E[C]]=function(){}}}D(".js-module__hide-if-empty:not(:has(*))").each(function(){var G=D(this);if(/\s/.test(G.html())){G.closest(".js-module").hide()}});D.ajaxPrefilter("script",function(G){G.cache=true});window.vBulletin.normalizeAjaxUrl=function(G){if(G.indexOf("http://")==0){return G.substring(5)}else{if(G.indexOf("https://")==0){return G.substring(6)}else{return G}}};window.vBulletin.getAjaxBaseurl=function(){return window.vBulletin.normalizeAjaxUrl(pageData.baseurl)};vBulletin.getAbsoluteUrl=(function(){var G;return function(H){if(!G){G=document.createElement("a")}G.href=H;return G.href}})();vBulletin.regexEscape=function(G){return G.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")};vBulletin.isInternalUrl=(function(){var G=vBulletin.normalizeAjaxUrl(pageData.baseurl),H=new RegExp("^"+vBulletin.regexEscape(G));return function(I){I=vBulletin.normalizeAjaxUrl(vBulletin.getAbsoluteUrl(I));return H.test(I)}})();vBulletin.isInternalJSUrl=(function(){var G=vBulletin.normalizeAjaxUrl(pageData.baseurl),H=new RegExp("^"+vBulletin.regexEscape(G+"/js/")+".*.js");return function(I){I=vBulletin.normalizeAjaxUrl(vBulletin.getAbsoluteUrl(I));return H.test(I)}})();vBulletin.isAbsoluteUrl=(function(){var G=new RegExp("^(?:[a-z]+:)?//","i");return function(H){return G.test(H)}})();D.ajaxPrefilter(function(G,K,I){if(G.url){if(!vBulletin.isInternalUrl(G.url)){console.log("Skipping security token for external url: "+G.url);return }else{if(vBulletin.isInternalJSUrl(G.url)){console.log("Skipping security token for javascript file: "+G.url);return }}}if(typeof (G.data)=="undefined"){G.data="securitytoken="+pageData.securitytoken;if(typeof G.formData!=="undefined"){if(Array.isArray(G.formData)){G.formData.push({name:"securitytoken",value:pageData.securitytoken})}}}else{if(typeof FormData!=="undefined"&&G.data instanceof FormData){G.data.append("securitytoken",pageData.securitytoken)}else{var H=true;var J=G.data.split("&");D.each(J,function(L,M){if(M.match(/^securitytoken=/)){H=false;return false}});if(H){G.data+="&securitytoken="+pageData.securitytoken}}}});D.ajaxPrefilter(function(G,I,H){(function(){var K=vBulletin.getAjaxBaseurl();if((I.url.indexOf(K)==0&&I.url.substr(K.length).indexOf("/ajax/render/")==0)||(I&&I.data&&I.data.isAjaxTemplateRender)){var J=G.success;G.success=function(){console.log("Intercept AJAX template render calls: Start (URL: {0})".format(G.url));var Q=arguments[0];if(!Q||typeof Q!="object"||D.isEmptyObject(Q)){if(typeof J=="function"){return J.apply(this,arguments)}return false}if(I.data&&I.data.isAjaxTemplateRenderWithData){arguments[0]=Q}else{arguments[0]=Q.template;arguments[1]=Q.errors}var V=Q.css_links;if(!V||V.length==0){console.log("Intercept AJAX template render calls: No CSS");if(typeof J=="function"){console.log("Intercept AJAX template render calls: Calling original success handler");return J.apply(this,arguments)}}else{console.log("Intercept AJAX template render calls: Has CSS");var P=/sheet=([^&]+)&/,X=V.pop(),S=(X.match(P)!=null);V.push(X);var L=function(Z){var a=Z.match(P);var Y={};if(a&&a[1]){D.each(a[1].split(","),function(b,c){Y[c]=Z})}else{Y[Z.replace(/^.*\//g,"")]=Z}return Y};var R={};D("head link[rel=stylesheet]").each(function(){D.extend(R,L(D(this).attr("href")))});var U={};D.each(V,function(Y,Z){D.extend(U,L(Z))});var W=[];D.each(U,function(Y,Z){if(Y&&typeof R[Y]=="undefined"){if(S){W.push(Y)}else{W.push(Z)}}});if(W.length==0){console.log("Intercept AJAX template render calls: Needed CSS is already on the page");if(typeof J=="function"){console.log("Intercept AJAX template render calls: Calling original success handler");return J.apply(this,arguments)}}else{var N=[];if(S){console.log("Intercept AJAX template render calls: found DB CSS");N.push(X.replace(/sheet=[^&]+&/,"sheet="+W.join(",")+"&"))}else{console.log("Intercept AJAX template render calls: found FS CSS");N=W}var M=this,T=arguments;console.log("Intercept AJAX template render calls: Fetching CSS: {0}".format(N.join(", ")));var O=function(Z){if(Z.length==0){console.log("Intercept AJAX template render calls: Done. Calling original callback.");window.setTimeout(function(){if(typeof J=="function"){return J.apply(M,T)}},50);return }var Y=D("<div />").append(Z.shift()).text();console.log("Intercept AJAX template render calls: Fetching CSS file: {0}".format(Y));D.get(Y,{cache:true},function(b){var a=D("<link />",{rel:"stylesheet",type:"text/css",href:Y}),c=D(".js-additional-css");if(c.length==1){c.before(a)}else{D("head").append(a)}}).then(function(){console.log("Intercept AJAX template render calls: Fetched CSS file: {0}".format(Y));if(D(".js-debug-css-template-list").length>0){var b=L(Y),a=D("<ol />");D.each(b,function(e,f){if(S){a.append(D("<li />").append(e))}else{a.append(D("<li />").append(f))}});var c=D(".js-debug-css-template-list").append(D("<li />").append(vBulletin.phrase.get("added_via_ajax_call")+":").append(a));var d=c.prev("b");d.text(parseInt(d.text(),10)+1)}O(Z)},function(){console.warn("Intercept AJAX template render calls: Failed to fetch CSS file: {0}".format(Y));O(Z)})};O(N)}}}}})()});String.prototype.format=function(){var H=this,G=arguments.length;while(G--){H=H.replace(new RegExp("\\{"+G+"\\}","gm"),arguments[G])}return H};jQuery.fn.reverse=[].reverse;window.vBulletin=window.vBulletin||{};vBulletin.getStackTrace=function(){var G=new Error();return G.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(H,G){H=H||"";G=G||"get";if(G=="set"){H=H.replace(/"/g,".");H=H.replace(/:/g,"-");H=H.replace(/;/g,"_")}else{H=H.replace(/\./g,'"');H=H.replace(/-/g,":");H=H.replace(/_/g,";")}return H};vBulletin.cookie.fetchBbarrayCookie=function(G,J){if(typeof vBulletin.cookie.bbarraycookiecache=="undefined"){vBulletin.cookie.bbarraycookiecache={}}var H=D.cookie(pageData.cookie_prefix+G);if(H!=""&&!vBulletin.cookie.bbarraycookiecache[G]){try{vBulletin.cookie.bbarraycookiecache[G]=D.parseJSON(vBulletin.cookie.convertBbarrayCookie(H))}catch(I){vBulletin.cookie.bbarraycookiecache[G]=null}}if(vBulletin.cookie.bbarraycookiecache[G]){return vBulletin.cookie.bbarraycookiecache[G][J]?vBulletin.cookie.bbarraycookiecache[G][J]:null}else{return null}};vBulletin.cookie.setBbarrayCookie=function(G,M,I,K){if(typeof vBulletin.cookie.bbarraycookiecache=="undefined"){vBulletin.cookie.bbarraycookiecache={}}var H=D.cookie(pageData.cookie_prefix+G);if(H!=""&&!vBulletin.cookie.bbarraycookiecache[G]){try{vBulletin.cookie.bbarraycookiecache[G]=D.parseJSON(vBulletin.cookie.convertBbarrayCookie(H))}catch(J){vBulletin.cookie.bbarraycookiecache[G]=null}}if(!vBulletin.cookie.bbarraycookiecache[G]){vBulletin.cookie.bbarraycookiecache[G]={}}vBulletin.cookie.bbarraycookiecache[G][M]=I;var L={path:pageData.cookie_path,domain:pageData.cookie_domain};if(K){L.expires=365}D.cookie(pageData.cookie_prefix+G,vBulletin.cookie.convertBbarrayCookie(JSON.stringify(vBulletin.cookie.bbarraycookiecache[G]),"set"),L)};vBulletin.cookie.unsetBbarrayCookie=function(G,K){if(typeof vBulletin.cookie.bbarraycookiecache=="undefined"){vBulletin.cookie.bbarraycookiecache={}}var H=D.cookie(pageData.cookie_prefix+G);if(H!=""&&!vBulletin.cookie.bbarraycookiecache[G]){try{vBulletin.cookie.bbarraycookiecache[G]=D.parseJSON(vBulletin.cookie.convertBbarrayCookie(H))}catch(I){vBulletin.cookie.bbarraycookiecache[G]=null}}if(!vBulletin.cookie.bbarraycookiecache[G]||!vBulletin.cookie.bbarraycookiecache[G][K]){return }delete vBulletin.cookie.bbarraycookiecache[G][K];var J={path:pageData.cookie_path,domain:pageData.cookie_domain};D.cookie(pageData.cookie_prefix+G,vBulletin.cookie.convertBbarrayCookie(JSON.stringify(vBulletin.cookie.bbarraycookiecache[G]),"set"),J)};jQuery.fn.swipeable=function(H){H=H||{};if(typeof H=="object"){H.swiping=H.swiping||function(){};H.swipeend=H.swipeend||function(){};H.swipeleft=H.swipeleft||function(){};H.swiperight=H.swiperight||function(){};H.swipeup=H.swipeup||function(){};H.swipedown=H.swipedown||function(){}}var O=false,Q=false,N={start:null,previous:null,current:null,moved:null,totalMoved:null,target:null,};function P(S){var R={x:0,y:0};try{R={x:S.pageX||S.originalEvent.touches[0].pageX||0,y:S.pageY||S.originalEvent.touches[0].pageY||0,}}catch(S){}return R}function L(R,S){return{x:R.x-S.x,y:R.y-S.y,}}function J(){if(!N.totalMoved){return false}var V=40,U=Math.abs(N.totalMoved.x),T=Math.abs(N.totalMoved.y),S=Math.max(U,T),R=Math.min(U,T);if(S<V){return false}if(S<=(R*2)){return false}if(U>T){return N.totalMoved.x<0?"left":"right"}else{return N.totalMoved.y<0?"up":"down"}}function M(R){O=true;Q=false;N.start=P(R);N.previous=P(R);N.current=P(R);N.moved={x:0,y:0};N.totalMoved={x:0,y:0};N.target=R.target;if(R.type!="touchstart"){R.preventDefault()}}function K(R){if(O){N.current=P(R);N.moved=L(N.current,N.previous);N.totalMoved=L(N.current,N.start);if(N.moved.x||N.moved.y){Q=true}H.swiping.call(this,R,N);N.previous=N.current}}function G(R){if(O){if(R.type=="mouseup"&&R.target!=N.target){I.call(this,R)}else{if(R.type=="mouseleave"){I.call(this,R)}}}O=false;R.preventDefault()}function I(T){var R=J();if(R){var S="swipe"+R;H[S].call(this,T,N)}H.swipeend.call(this,T,N);O=false;N={start:null,previous:null,current:null,moved:null,totalMoved:null,target:null,};if(Q){Q=false;return false}}return this.each(function(){var R=D(this);if(H=="disable"){R.off(".vbswipeable","body")}else{R.on("mousedown.vbswipeable touchstart.vbswipeable","body",M).on("mousemove.vbswipeable touchmove.vbswipeable","body",K).on("mouseup.vbswipeable mouseleave.vbswipeable touchcancel.vbswipeable","body",G).on("click.vbswipeable touchend.vbswipeable","body",I)}})};D.widget("ui.dialog",D.ui.dialog,{_allowInteraction:function(G){if(this._super(G)){return true}if(G.target.ownerDocument!=this.document[0]){return true}if(D(G.target).closest(".cke_dialog").length){return true}if(D(G.target).closest(".cke").length){return true}}});(function(){var G=jQuery.fn.dialog;jQuery.fn.dialog=function(){if(typeof arguments[0]=="object"){var H=false;if(typeof arguments[0].open=="function"){H=arguments[0].open}arguments[0].open=function(){var I=D(this);window.setTimeout(function(){vBulletin.Responsive.Debounce.runCallbacks();I.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(H){return H.apply(this,arguments)}}}return G.apply(this,arguments)}})();(function(){var G=jQuery.fn.selectBox;jQuery.fn.selectBox=function(){var H=D(this);if(typeof H.attr("tabindex")=="undefined"){H.attr("tabindex","0")}var I=G.apply(this,arguments);D(".selectBox-arrow").addClass("b-icon b-icon__arrow-down-s");return I}})();(function A(){(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",function(M){try{var L=D(this),J=L.closest(".js-comp-menu-dropdown"),H=L.contents().find("html"),I=H.outerHeight();if(!J.is(".b-comp-menu-dropdown--open")){J.addClass("b-comp-menu-dropdown--open");I=H.outerHeight();J.removeClass("b-comp-menu-dropdown--open")}if(I>0){L.height(I);L.parent().height(I)}}catch(K){}});var G=D(".js-top-menu-user--list");G.on("vbulletin:shrink",function(){G.find(".js-menu__username-label").addClass("h-hide-imp")});G.on("vbulletin:unshrink",function(){G.find(".js-menu__username-label").removeClass("h-hide-imp");var H=vBulletin.Responsive.Debounce.checkElementShrinkRequirement(G);if(H=="need_shrink"){G.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(I,H){if(D.isArray(I)){I.unshift(H)}else{var G=I;I=function(){H.apply(this,arguments);if(typeof G=="function"){G.apply(this,arguments)}}}return I};window.vBulletin.pageHasSelectors=function(G){if(D.isArray(G)&&G.length>0&&D.trim(G.toString())!=""){var H=false;D.each(G,function(I,J){if(D(J).length>0){H=true;return false}});return H}return true};window.vBulletin.areJsonObjectsEqual=function(I,G){var H=function(L,K){for(var J in L){if(L.hasOwnProperty(J)&&K.hasOwnProperty(J)){var N=L[J],M=K[J];if(N!=M){if(N instanceof Array&&M instanceof Array){if(D(N).not(M).length>0||D(M).not(N).length>0){return false}else{continue}}else{return false}switch(N.constructor){case Object:if(!window.vBulletin.areJsonObjectsEqual(N,M)){return false}break;case Function:if(N.toString()!=M.toString()){return false}break;default:return false}}}else{return false}}return true};return(Object.keys(I).length==Object.keys(G).length)?H(I,G):false};window.vBulletin.ajaxSetup=(function(){var G=false;return{init:function(){if(G){return }G=true;D.ajaxSetup({contentType:"application/x-www-form-urlencoded; charset=UTF-8"})}}})();window.vBulletin.ajaxSetup.init();window.vBulletin.ajaxProfile=(function(){var I=[],J=false,H=true,G=false;return{init:function(){if(J){return }J=true;D(function(){if(D("#debug-information").length==0){H=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()});G=true});function K(){if(G){D("#debug-information #debug-ajax-request-count").text(I.length);D.each(I,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 L=this.totalTimeTaken-this.networkTimeTaken;var M='{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,L,this.totalTimeTaken,(this.errorThrown?" Error: "+this.errorThrown:""));D("#debug-ajax-request-list .js-request-counter-"+this.requestCounter).html(M)})}}D.ajaxPrefilter(function(L,O,M){if(!H){return }var N=I.length;console.log("vBulletin AJAX profile: Before request #"+N);I.push({displayed:false,url:L.url,relUrl:"",startTimeStamp:(new Date()).getTime(),endTimeStamp:0,finalTimeStamp:0,textStatus:"UNKNOWN",errorThrown:"",requestCounter:N,networkTimeTaken:0,totalTimeTaken:0});L.success=vBulletin.runBeforeCallback(L.success,function(Q,R,P){I[N].endTimeStamp=(new Date()).getTime()});L.error=vBulletin.runBeforeCallback(L.error,function(P,R,Q){I[N].endTimeStamp=(new Date()).getTime();I[N].errorThrown=Q});L.complete=vBulletin.runBeforeCallback(L.complete,function(P,Q){I[N].finalTimeStamp=(new Date()).getTime();I[N].status=Q;I[N].networkTimeTaken=I[N].endTimeStamp-I[N].startTimeStamp;I[N].totalTimeTaken=I[N].finalTimeStamp-I[N].startTimeStamp;K()})})}}})();window.vBulletin.ajaxProfile.init();window.vBulletin.loadingIndicator=(function(){var L=0,K=false,J=false,H=0,G=0;function I(N){if(N){var P=D(".js-loading-indicator"),O=P.outerWidth(),M=vBulletin.isRtl(),Q=M?"margin-right":"margin-left";if(O>0){P.css(Q,-(O/2))}P.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(K){return }D(document).ajaxStart(function(){window.vBulletin.loadingIndicator.show("ajaxStart")});D(document).ajaxStop(function(){window.vBulletin.loadingIndicator.hide("ajaxStop")});K=true},show:function(M){if(H>0&&M=="ajaxStart"){--H;++G;console.log("vBulletin.loadingIndicator.show ajax indicator suppressed");return }++L;console.log("vBulletin.loadingIndicator.show Counter: "+L+" Source: "+(M||"Unspecified"));if(L>0){J=window.setTimeout(function(){if(J){I(true);J=false}},1000)}},hide:function(M){if(G>0&&M=="ajaxStop"){--G;console.log("vBulletin.loadingIndicator.hide ajax indicator suppressed");return }--L;L=L<0?0:L;if(!M){L=0}console.log("vBulletin.loadingIndicator.hide Counter: "+L+" Source: "+(M||"Unspecified"));if(L<1){if(J){window.clearTimeout(J);J=false}I(false)}},suppressNextAjaxIndicator:function(){++H}}})();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(H,G){for(var I=1;I<H.length;++I){G=G.replace(new RegExp("%"+I+"\\$s","gm"),H[I])}return G};window.vBulletin.phrase.remoteGet=function(H,J){J.push(H);var I={},G=H;D.each(J,function(L,K){if(K!=""&&(typeof I[K]=="undefined")){I[K]=""}});I=Object.keys(I);if(I.length>0){vBulletin.loadingIndicator.suppressNextAjaxIndicator();D.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/api/phrase/getPhrases",async:false,data:({phrases:I}),type:"POST",dataType:"json",success:function(K){if(K&&K.phrases){var L=K.phrases;if(typeof (L[H])!="undefined"){G=L[H]}window.vBulletin.cache.setBucket("phrases"+pageData.languageid);D.each(I,function(O,N){var M=N;if(typeof (L[N])!="undefined"){M=L[N]}window.vBulletin.cache.set(N,M)});J.length=0}else{console.warn("Unexpected result when fetching phrases")}},error:function(M,L,K){console.warn("Error when fetching phrases: {0}".format(K))}})}return G};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","all_changes_made_will_be_lost_would_you_like_to_continue","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","unsubscribe","unsubscribe_overlay_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 G=window.vBulletin.cache.get(arguments[0]);return window.vBulletin.phrase.render(arguments,G)};window.vBulletin.getScrollbarWidth=function(){if(D("body").data("scrollbar-width")){return D("body").data("scrollbar-width")}var G=D('<div style="width:50px;height:50px;overflow:auto;position:absolute;top:-99999px;"><div /></div>').appendTo("body"),I=G.children(),H=I.innerWidth()-I.height(99).innerWidth();G.remove();D("body").data("scrollbar-width",H);return H};window.vBulletin.options=window.vBulletin.options||{};window.vBulletin.options.precache=window.vBulletin.options.precache||[];window.vBulletin.options.remoteGet=function(H,J){var I=[H];D.each(J,function(L,K){if(D.inArray(K,I)===-1){I.push(K)}});var G=null;D.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/api/options/fetchValues",async:false,data:({options:I}),type:"POST",dataType:"json",success:function(K){if(K){vBulletin.cache.setBucket("options");D.each(K,function(L,M){if(L==H){G=M}vBulletin.cache.set(L,M)});J.length=0}else{console.warn("Unexpected result when fetching options")}},error:function(M,L,K){console.warn("Error when fetching options: {0}".format(K))}});return G};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(G){window.vBulletin.cache.setBucket("options");return window.vBulletin.cache.get(G)};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(K,J,G,H){if(D(J).data("in-progress")){return false}D("body").css("cursor","wait");var I=arguments.callee.caller;D(J).data("in-progress",true);vBulletin.AJAX({call:"/ajax/api/user/currentUserHasAdminPermission",data:{adminPermission:K},complete:function(){D("body").css("cursor","auto");D(J).data("in-progress",null)},success:function(L){if(L===true){G()}else{vBulletin.error("error","unable_to_check_admin_permissions");D("#config-dialog .loader").hide()}},api_error:(typeof H=="undefined"?undefined:function(L){if(vBulletin.ajaxtools.hasError(L,"inlinemodauth_required")){vBulletin.ajaxlib.inlineMod(H);return false}return true}),error_phrase:"unable_to_check_admin_permissions",})};vBulletin.selectTabByIndex=function(G){var H=this instanceof D?this:D(this);if(H.length&&G>-1&&H.hasClass("ui-tabs")){H.data("noPushState",true).tabs("option","active",G).data("noPushState",null).find(".ui-tabs-nav li").removeClass("ui-state-focus").eq(G).addClass("ui-state-focus").find("a").focus()}};D.ui.tabs.prototype._isLocal=function(){return true};vBulletin.tabify=function(H){var I=this instanceof D?this:D(this);if(I.length){var G={tabOptions:{},tabHistory:null,allowHistory:false,tabParamAsQueryString:true,hash:"",getTabIndexByHash:function(){return -1}};H=D.extend({},G,H);if(H.tabHistory instanceof vBulletin.history.instance&&H.tabHistory.isEnabled()){I.on("tabscreate",function(M,O){var J=vBulletin.parseQueryString(location.search,["_"]),P=Object.keys(J).length,L=vBulletin.getSelectedTabHashOrPath(I,H.tabParamAsQueryString),N=H.tabHistory.getState();if(((H.tabParamAsQueryString&&P>1&&typeof J.tab!="undefined")||(!H.tabParamAsQueryString&&P>0))&&(!N||D.isEmptyObject(N.data))){var K={from:"tabs",tab:L};H.tabHistory.setDefaultState(K,document.title,location.href)}H.tabHistory.setStateChange(function(V){var U=H.tabHistory.getState();if(U.data.from=="tabs"){H.tabHistory.log(U.data,U.title,U.url);var S=H.getTabIndexByHash(U.data.tab),Q=vBulletin.parseQueryString(U.url,["tab","_"]);if(I.tabs("option","selected")!=S){vBulletin.selectTabByIndex.call(I,S);if(!D.isEmptyObject(Q)){D(window).trigger("statechange.filter",["tabs",Q])}}else{if(!D.isEmptyObject(Q)){D(window).trigger("statechange.filter",["tabs",Q])}else{var R,T,W;if(U.data.tab){T=H.tabParamAsQueryString?D(U.data.tab):D('.ui-tabs .ui-tabs-panel[data-url-path="'+U.data.tab+'"]')}R=(T&&T.length&&T)||D(I.closest(".canvas-widget").data("widget-default-tab"));W=D(".toolbar-filter-overlay .filter-options .js-default-checked",R);if(W.length){W.prop("checked",true).first().data("bypass-filter-display",true).trigger("change",[true]).data("bypass-filter-display",null);D(".filtered-by",R).addClass("h-hide").find(".filter-text-wrapper").empty()}else{D(".conversation-toolbar .js-default-checked",R).first().trigger("click",[true])}}}}},"tabs");if(typeof H.tabOptions.create=="function"){H.tabOptions.create.call(I[0],M,O)}})}if(H.allowHistory&&H.tabHistory instanceof vBulletin.history.instance){I.on("tabsbeforeactivate",function(O,P){var J=P.newPanel,M=P.newTab;if(typeof H.tabOptions.beforeActivate=="function"&&H.tabOptions.beforeActivate.call(this,O,P)===false){return false}var L,Q=(H.tabParamAsQueryString?J.selector:D(M.context).data("url-path")),N=undefined;if(!H.tabParamAsQueryString){N=[];I.find(".ui-tabs-nav > li > a, .widget-tabs-panel").each(function(R,T){var S=D(this).data("url-path");if(D.inArray(S,N)==-1){N.push(S)}})}if(!H.tabHistory.isEnabled()){L=vBulletin.makeFilterUrlFromSelectedFilters(J,Q.replace("#",""),H.tabParamAsQueryString,N,H.hash);location.href=L;return false}if(!I.data("noPushState")){var K={from:"tabs",tab:Q};L=vBulletin.makeFilterUrlFromSelectedFilters(J,Q.replace("#",""),H.tabParamAsQueryString,N);H.tabHistory.pushState(K,document.title,L)}else{I.data("noPushState",null)}})}I.tabs(H.tabOptions)}return I};vBulletin.getSelectedTabHashOrPath=function(H,I){var G;if(I){G=H.find(".ui-tabs-nav > .ui-tabs-active > a").prop("hash")}else{G=H.find(".ui-tabs-nav > .ui-tabs-active > a").data("url-path")}return G||""};vBulletin.parseUrl=function(H){var G=document.createElement("a"),I;G.href=H||"/";I=G.pathname;if(I.indexOf("/")!=0){I="/"+I}return{protocol:G.protocol,hostname:G.hostname,port:G.port,pathname:I,search:G.search,hash:G.hash}};vBulletin.makeHistoryUrl=function(L,G,J,H,K){var I=vBulletin.makePaginatedUrl(L,G);I=vBulletin.makeTabUrl(I,J.tab,J.tabParamAsQueryString);I=vBulletin.makeFilterUrl(I,H.filterName,H.filterValue,H.context,K);return I};vBulletin.makeTabUrl=function(H,J,N,L,K){if(H){var M=vBulletin.parseUrl(H),O;if(N){K=K||"tab";O=new RegExp("([?+|&+])"+K+"=\\w+[-\\w]*","i");if(M.search.match(O)){H=M.pathname+M.search.replace(O,"$1{0}={1}".format(K,J))}else{if(M.search){H="{0}{1}&{2}={3}".format(M.pathname,M.search,K,J)}else{H="{0}?{1}={2}".format(M.pathname,K,J)}}}else{var I=M.pathname.replace(/\/$/,""),G=I.split("/");O="\\/"+G[G.length-(I.match(/\/page([0-9]+)/)?2:1)]+"$";H=M.pathname.replace(new RegExp(O),"/"+J)+M.search}}else{H="/"}if(L){H+="#"+L}return H};vBulletin.makePaginatedUrl=function(I,H){if(I){var G=I.match(/\/page[0-9]+/);if(G){if(H>1){I=I.replace(G[0],"/page"+H)}else{I=I.replace(G[0],"")}}else{if(H>1){if(I.match(/\?/)){I=I.replace(/\?/,"/page"+H+"?")}else{if(I.match(/\#/)){I=I.replace(/\#.*/,"/page"+H)}else{I+="/page"+H}}}}}return I};vBulletin.makeFilterUrl=function(G,L,P,H,K,I){I=I||false;G=G||location.href;var Q=D(".filtered-by",H),N=vBulletin.parseUrl(G),R=N.search;var M=D(".js-button-filter.js-default-checked.js-checked",H);if(M.data("filter-name")==L&&M.data("filter-value")==P){I=true}if(!I&&((Q.data("clicked")&&D('.toolbar-filter-overlay input[name="{0}"][value="{1}"]'.format(L,P),H).hasClass("js-default-checked"))||(D('.toolbar-search-form input[name="{0}"]'.format(L),H).length&&!P))){I=true;Q.data("clicked",null)}G=N.pathname;if(R&&R.length>1){if(R.match(new RegExp(L+"=","i"))){var J=vBulletin.parseQueryString(R);if(!D.isEmptyObject(J)){var O="";D.each(J,function(S,T){if(!I||S!=L){O+="{0}={1}&".format(S,(S==L?P:T))}});if(O){G+="?"+O.substring(0,O.length-1)}}}else{if(!I){G+=R+"&{0}={1}".format(L,encodeURIComponent(P))}else{G+=R}}}else{if(!I){G+="?{0}={1}".format(L,encodeURIComponent(P))}}if(K){G+="#"+K}return G};vBulletin.getSelectedFilters=function(G,H){var I={};if(!H){var J=G.serializeArray();D.each(J,function(M,N){if(N.name!="securitytoken"){if(N.name.slice(-2)=="[]"){var L=N.name.split("[]");I[L[0]]=I[L[0]]||[];I[L[0]].push(N.value)}else{I[N.name]=N.value}}})}else{var K=G.parent().find(".filtered-by .filter-text").filter(":visible");G.find(":input:radio:checked").each(function(M,O){var N=D(O);if((N.hasClass("js-default-checked")||N.data("bypass-filter-display")==1)&&(K.length==0||K.filter('[data-filter-name={0}][data-filter-value="{1}"]').length==0)){return true}if(O.name.slice(-2)=="[]"){var L=O.name.split("[]");I[L[0]]=I[L[0]]||[];I[L[0]].push(O.value)}else{I[O.name]=O.value}})}return I};vBulletin.makeFilterUrlFromSelectedFilters=function(K,L,U,Q,N){var S,J=location.pathname.replace(/\/$/,"").replace(/\/page[0-9]+/,""),I=D(".toolbar-filter-overlay",K),P=vBulletin.getSelectedFilters(I,true),R=D(".pagenav-form .js-pagenum",K).val()||1,M=D(".toolbar-search-form .js-filter-search",K).val()||"",W=D(K).closest(".canvas-widget"),T=D(".conversation-toolbar-wrapper",K).length?(D(".conversation-toolbar-wrapper",K).data("allow-history")=="1"):(D(K).data("allow-history")=="1"),H=new vBulletin.history.instance(T),G=W.data("widget-default-tab")||W.find(".ui-tabs-nav > li:first-child a").attr("href");if(D.isEmptyObject(P)){D(".conversation-toolbar .js-button-filters",K).each(function(){var X=D(".js-button-filter.js-checked:not(.js-default-checked)",this);if(X.length){P[X.data("filter-name")]=X.data("filter-name")}})}if(!U){var V=new RegExp("\\/("+Q.join("|")+")/?$"),O=J.match(V);if(O){J=J.replace(new RegExp(O[0]),"/"+L)}else{J+="/"+L}}if(R>1&&H.isEnabled()){J+="/page"+R}if(U&&L&&G!=("#"+L)){P.tab=L;if(!H.isEnabled()){J+="?tab="+L}}if(!H.isEnabled()){return J+(N?"#"+N:"")}if(M){P.q=M}S=D.param(P);return J+(S?"?"+S:"")+(N?"#"+N:"")};vBulletin.parseQueryString=function(J,H){var G={},K;if(J&&J.length>1){K=J.indexOf("?");H=(H instanceof Array)?H:[];if(K!=-1){var I=J.substring(K+1).split("&");D.each(I,function(L,N){var M=N.split("=");if(H.length==0||(D.inArray(M[0],H)==-1)){G[M[0]]=decodeURIComponent((M[1]||"")).replace(/\+/g," ")}})}}return G};vBulletin.pagination=function(M){var U={context:document,onPageChanged:null,tabParamAsQueryString:true,allowHistory:false};if(M&&typeof M=="object"){D.extend(U,M)}var I,J=D(".pagenav-controls .pagenav-form",U.context),T=Number(D(".defaultpage",J).val())||Number(D(".js-pagenum",J).val())||1,O=new vBulletin.history.instance(U.allowHistory);J.data("object-instance",this);if(O.isEnabled()){var P=vBulletin.parseQueryString(location.search,["_"]),K=location.pathname.match(/\/page([0-9]+)/),H=O.getState();if(K&&Number(K[1])>1&&D.isEmptyObject(P)&&(!H||D.isEmptyObject(H.data))){I=vBulletin.makePaginatedUrl(location.href,T);var Q={from:"pagination",page:T,tab:U.tabParamAsQueryString?"#"+J.closest(".ui-tabs-panel").attr("id"):vBulletin.getSelectedTabHashOrPath(J.closest(".ui-tabs"),false)};O.setDefaultState(Q,document.title,I)}O.setStateChange(function(c){var V=O.getState();if(V.data.from=="pagination"){O.log(V.data,V.title,V.url);if(location.search){var f=vBulletin.parseQueryString(location.search,["_"]);if(!D.isEmptyObject(f)||f.tab=="groups-tab"){delete f.tab;D(window).trigger("statechange.filter",["pagination",f]);return }}var Z,X,g,d,b;if(V.data.tab){Z=U.tabParamAsQueryString?D(V.data.tab):D('.ui-tabs .ui-tabs-panel[data-url-path="'+V.data.tab+'"]')}X=(Z&&Z.length&&Z)||U.context;g=D(".conversation-toolbar .filter-wrapper",X).data("object-instance");if(g){g.resetFilters(true)}if(V.data.tab){d=Z.closest(".ui-tabs");$tabAnchor=U.tabParamAsQueryString?d.find('.ui-tabs-nav > li > a[href*="{0}"]'.format(V.data.tab)):d.find('.ui-tabs-nav > li > a[data-url-path="'+V.data.tab+'"]');if(!$tabAnchor.parent().hasClass("ui-tabs-active")){var a=$tabAnchor.parent().index();vBulletin.selectTabByIndex.call(d,a);return }}var h=D(".pagenav-controls .pagenav-form",X);var Y=h.data("object-instance");if(Y&&typeof Y.getOption=="function"&&typeof Y.getOption("onPageChanged")=="function"){var W=V.data.page||T;Y.getOption("onPageChanged").apply(h.get(0),[W,false,!location.search,location.search])}}},"pagination")}function G(){return parseInt((D(".pagetotal",this).html()||"").replace(/[^\d]+/g,""),10)||1}function N(W,a){var Z=G.apply(this),V=D(".arrow[rel=next]",this),Y=D(".arrow[rel=prev]",this);if(W<1){W=1}else{if(W>Z){W=Z}}D(".js-pagenum",this).val(W);if(W==Z){V.addClass("h-disabled").removeAttr("href")}else{V.removeClass("h-disabled").attr("href",vBulletin.makePaginatedUrl(location.href,W+1))}if(W==1){Y.addClass("h-disabled").removeAttr("href")}else{Y.removeClass("h-disabled").attr("href",vBulletin.makePaginatedUrl(location.href,W-1))}if(typeof U.onPageChanged=="function"){U.onPageChanged.apply(this,[W,a])}if(Z>1&&O.isEnabled()&&!a){var b=O.getState();if(!b||!b.data||!b.data.from||D.inArray(b.data.from,["filter_blogs","filter_groups"]==-1)){if(W==1){I=D(".arrow[rel=next]",this).attr("href")}else{I=D(".arrow[rel=prev]",this).attr("href")}if(I){I=vBulletin.makePaginatedUrl(I,W);var X={from:"pagination",page:W,tab:U.tabParamAsQueryString?"#"+D(this).closest(".ui-tabs-panel").attr("id"):vBulletin.getSelectedTabHashOrPath(D(this).closest(".ui-tabs"),false)};O.pushState(X,document.title,I)}}}}function S(V){var W=parseInt(V);if(W&&typeof W==="number"){D("input[name=result-id]",J).val(W)}}function L(V){D("a.see-all-btn",this).closest(".pagenav-controls")[V?"addClass":"removeClass"]("h-hide")}D(".arrow",J).off("click").on("click",function(X){var W=D(this),Y=this.form||W.closest("form").get(0);if(!W.hasClass("h-disabled")){var V=parseInt(D(".js-pagenum",Y).val())+((W.attr("rel")=="next")?1:-1);if(!O.isEnabled()&&U.allowHistory){if(!this.href||this.hash==this.href){this.href=vBulletin.makePaginatedUrl(location.href,V)}return true}N.apply(Y,[V,false])}return false});function R(){D(U.context).off("click",".js-pagenav .js-pagenav-button").on("click",".js-pagenav .js-pagenav-button",function(X){if(O.isEnabled()){var Y=D(this),V=Y.data("page"),W=D(".pagenav-form",U.context).get(0);N.apply(W,[V,false]);return false}return true}).off("mouseover",".js-pagenav .js-pagenav-button").on("mouseover",".js-pagenav .js-pagenav-button",function(W){var V=D(this);if(!V.prop("href")){V.prop("href",vBulletin.makePaginatedUrl(location.href,parseInt(V.data("page"),10)))}});D(".js-pagenav .js-pagenav-button",U.context).each(function(){this.href=vBulletin.makePaginatedUrl(location.href,parseInt(D(this).data("page")))});(function(){function V(){var Z=D(this);var b=Z.data("vbshrink-hidden-elements");if(typeof b!="undefined"){b.removeClass("h-hide-imp")}var Y=Z.find("> .js-pagenav-button").filter(":visible"),W=D(),X=D(),a=Y.filter(".js-pagenav-current-button").data("page");Y.each(function(k,e){var c=D(e),i=c.data("page"),d=c.is(".js-pagenav-prev-button, .js-pagenav-current-button, .js-pagenav-next-button"),j=c.is(".js-pagenav-first-button, .js-pagenav-last-button"),g=(i==(a-1)||i==(a+1)),f=(!j&&!g),h=(j?"1":(g?"2":"3"));if(!d){W=W.add(c);c.data("vbshrink-priority",h)}});D.each(["3","2","1"],function(c,d){W.each(function(e,g){var f=D(g);if(f.data("vbshrink-priority")!=d){return true}var h=vBulletin.Responsive.Debounce.checkElementShrinkRequirement(Z);if(h=="need_shrink"){f.addClass("h-hide-imp");X=X.add(f)}else{return false}})});Z.data("vbshrink-hidden-elements",X)}D(document).on("vbulletin:shrink vbulletin:unshrink",".js-pagenav",V);vBulletin.Responsive.Debounce.checkShrinkEvent(D(".js-pagenav"))})()}R();D(".js-pagenum",J).off("keypress").on("keypress",function(X){if(X.keyCode==13){X.preventDefault();var V=parseInt(D(this).val(),10);var W=G.apply(this.form);if(V>W){V=W}if(V<1){V=1}if(O.isEnabled()){N.apply(this.form,[V,false])}else{if(U.allowHistory){location.href=vBulletin.makePaginatedUrl(location.href,V)}else{N.apply(this.form,[V,false])}}}});D(".js-pagenum",J).off("click").on("click",function(V){D(this).select()});this.updatePageInfo=function(W,V){if(W&&typeof W=="object"){var X=W.totalpages||1,Y=D(".pagenav-controls .pagenav-form",U.context);D(".pagetotal",Y).text(X);if(typeof W.showseemore!="undefined"){if(W.showseemore){L.apply(Y,[false])}else{L.apply(Y,[true])}}W.perpage=vBulletin.conversation.POSTS_PER_PAGE;if(V&&D(".pagenav-container",U.context).length>0){D.post(pageData.baseurl+"/ajax/render/pagenav",{pagenav:W},function(Z){if(Z){D(".pagenav-container",U.context).replaceWith(Z.template);R()}},"json")}N.apply(Y.get(0),[W.pagenumber,V])}};this.updateResultId=function(V){S(V)};this.setOption=function(V,W){U[V]=W};this.getOption=function(V){return U[V]};this.updatePageNavigation=function(W,V,X){N.apply(W.get(0),[V,X])}};vBulletin.conversation=vBulletin.conversation||{};vBulletin.conversation.toggleCommentBox=function(){var G=D(this).closest(".js-comment-entry__parent").find(".js-comment-entry");G.slideToggle("fast",function(){var H=D(this).find(".js-comment-entry__textbox");if(H.is(":visible")){H.focus()}});G.find(".js-comment-entry__cancel").off("click").on("click",function(H){G.slideToggle();return false});return false};vBulletin.conversation.postComment=function(J,H){var P=this,M=D(P),L=M.closest(".js-comment-entry"),I=L.find(".js-comment-entry__textbox"),N=D.trim(I.val());if(!N||(I.hasClass("placeholder")&&N==I.attr("placeholder"))){vBulletin.warning("post_comment","please_enter_your_comment",function(){I.focus()});return false}D("body").css("cursor","wait");M.blur();var K=M.closest(".js-comment-entry__parent"),O=M.closest(".js-comment-entry--blog").length==1?1:0,G=M.closest(".js-comment-entry--article").length==1?1:0;vBulletin.AJAX({call:"/ajax/post-comment",data:({text:N,parentid:K.attr("data-node-id"),postindex:K.find(".js-post__content .b-post__count").text().replace("#",""),view:K.parent().hasClass("stream-view")?"stream":"thread",redirecturl:I.hasClass(".reload-on-post")?1:0,isblogcomment:O,isarticlecomment:G,humanverify:{input:L.find('[name="humanverify[input]"]').val(),hash:L.find('[name="humanverify[hash]"]').val()},}),complete:function(){console.log("post-comment complete.");D("body").css("cursor","auto");vBulletin.hv.reset()},success:function(Q,S,T){if(typeof H=="function"){H.apply(P,[Q])}if(!O&&!G){L.slideToggle()}vBulletin.subscribe.updateSubscribeButton(Q.topic_subscribed);var R=K.attr("data-node-id");if(pageData.threadmarking=="0"||pageData.userid=="0"){vBulletin.cookie.setBbarrayCookie("discussion_view",R,Math.round(new Date().getTime()/1000))}else{vBulletin.markRead(R)}},title_phrase:"conversation",error_phrase:"error_posting_comment_code",})};vBulletin.conversation.showIp=function(H){var J=D(this),I=D(this).data("post-ip"),G=D(this).data("post-host");openAlertDialog({title:vBulletin.phrase.get("ip_info"),message:vBulletin.phrase.get("ip_address_is")+": "+I+"<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:I},success:function(K,L,M){D(".ip-host-name").removeClass("loading").html(K)}});return false};vBulletin.conversation.showPostHistory=function(J){var K=D(this);var I=D(this).closest(".js-post").attr("data-node-id");var H=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 M=H.find(".post-history-form");var L={oldpost:M.find("input:radio[name=old]:checked").val()||1,newpost:M.find("input:radio[name=new]:checked").val()||1,nodeid:I};D("#btnConfirmDialogYes").hide();var N=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()}});G(N,"post_history_form",L)}}});G(H,"post_history_form",{nodeid:I});function G(L,M,N){N.isAjaxTemplateRenderWithData=true;vBulletin.AJAX({call:"/ajax/render/"+M,data:N,success:function(O){L.removeClass("loading").find(".dialog-content .message").html(O.template).find("[placeholder]").placeholder().end().end().dialog("option","position",{of:window})},after_error:function(){L.dialog("close")}})}};vBulletin.conversation.flagPost=function(H){var I=D(this),G=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(J){D("body").css("cursor","wait");vBulletin.AJAX({call:"/report/report",data:{reason:J,reportnodeid:G},success:function(K){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(M,P){var R=D(this),I,Q,N=R.closest(".conversation-list");if(R.closest(".js-comments").length>0){I="comment"}var J=D(".edit-conversation-container form",N);if(J.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(J.closest(".js-post").offset().top,{duration:"slow"})}});return }if(P&&P.isFilterSelected("conversations_on")){P.toggleNewConversations(false)}window.vBulletin.loadingIndicator.show();M.preventDefault();var H=R.parent().attr("data-node-id"),G=(I=="comment")?R.closest(".js-comment"):R.closest(".js-post__content-wrapper");if(N.hasClass("thread-view")){Q="thread"}else{if(N.hasClass("full-activity-view")){Q="full-activity-stream"}else{if(N.hasClass("activity-view")){Q="activity-stream"}else{Q="stream"}}}I=I||G.attr("data-node-type")||"";var L,O=D(".b-post__count",G).text()||"1";if(I=="comment"&&(Q=="thread"||N.closest(".blog-conversation-content-widget").length==1)){L=Number(O.replace("#",""))}else{L=Number(O.replace("#",""))-1}var K=function(T,W,X,S){var Y=D(".edit-conversation-container form",G).data("content-type");var U=vBulletin.triggerHandler.apply(S.get(0),["afterSave",D(document),T]);if(U===false){D("body").trigger(Y+"_editform_onunload",[G]);window.vBulletin.loadingIndicator.hide();return }var V=pageData;V["posts-perpage"]=vBulletin.conversation.POSTS_PER_PAGE;if(Q=="thread"){V["comments-perpage"]=vBulletin.conversation.COMMENTS_PER_PAGE}if(T&&vBulletin.ajaxtools.hasError(T.warnings,"warning_spam_post")){vBulletin.ajaxtools.showApiError(T.warnings,T,{title_phrase:"warning",after_error:function(){if(T.warningReturnUrl){location.href=T.warningReturnUrl}else{window.location.reload(true)}}});return }var X=D.post(vBulletin.getAjaxBaseurl()+"/create-content/loadnode",{nodeid:H,view:Q,index:L,page:V,type:I,isAjaxTemplateRender:true,isAjaxTemplateRenderWithData:true},function(e){if(e.error){openAlertDialog({title:vBulletin.phrase.get("conversation"),message:vBulletin.phrase.get(e.error),iconType:"error"})}else{var Z=S.closest(".js-content-entry").data("current-channelid"),b=S.find('input[name="parentid"]:checked').val(),a=D(e.template);if(Z>0&&b>0&&(Z!=b)){window.location.reload(true);return }D("body").trigger(Y+"_editform_onunload",[G]);if(P&&P.isFilterSelected("conversations_on")){P.toggleNewConversations(true)}R.closest(".js-post").replaceWith(a);if(e.hasOwnProperty("template_article_title_info")){var c=D(".js-update-article-title-info"),g=D(e.template_article_title_info);if(c.length>0){c.empty().append(g)}}D("body").trigger(Y+"_newcontent_onload",[a]);var f=a.attr("data-node-id");if(a.hasClass("js-conversation-starter")){var d=D(".js-post-title",a).first().text();document.title=d+" - "+vBulletin.options.get("bbtitle");D(".page-title-widget .js-main-title").text(d)}D(".js-select-box",a).selectBox();vBulletin.animateScrollTop(a.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:H,type:I,view:Q,isAjaxTemplateRender:true},function(S,V){if(V){vBulletin.error("edit_conversation",V[0])}else{var T=function(){if(typeof vBulletin.upload=="undefined"||typeof vBulletin.tagEditor=="undefined"||typeof vBulletin.contentEntryBox.init=="undefined"){vBulletin.ckeditor.loadScripts("",{},T);return }G.addClass("b-post--edit");G.find(".js-post__content").first().addClass("b-post__content--edit");G.find(".b-post__footer").first().addClass("b-post__footer--edit");$container=G.find(".edit-conversation-container").first();G.closest(".js-album-detail").find(".conversation-body, .profile-media-uploadphotos, .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 X=$container.find(".js-attach-list");vBulletin.upload.initializePhotoUpload(G);var W=D(".js-post[data-node-id={0}] .tag-editor-container .tag-input".format(H));if(W.length>0&&typeof vBulletin.tagEditor!="undefined"){var Y=new vBulletin.tagEditor.instance(W.selector)}if(X.data("attach-count")>0){$container.find(".b-toolbar__item").filter(function(){return D(this).data("panel")=="b-content-entry-panel__content--attachment"}).click()}vBulletin.contentEntryBox.afterPanelChange(G);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",G).first().hide().html(S);var U=D(".edit-conversation-container form",G).data("content-type");D(window).off("beforeunload.editPost").on("beforeunload.editPost",function(){return vBulletin.phrase.get("onbeforeunload_message_while_editing_post")});D("body").trigger(U+"_editform_onload",[G,T]);D(".edit-conversation-container input[placeholder], .edit-conversation-container textarea[placeholder]",G).placeholder();vBulletin.ajaxForm.apply(D("form",G),[{dataType:"json",success:K,beforeSerialize:function(W){console.log("ajaxForm beforeSerialize (vBulletin.conversation.editPost)");W.trigger("beforeSave");var X=D("body").triggerHandler(U+"_editform_onbeforeserialize",[W]);return(X===false)?false:true},beforeSubmit:function(Z,Y,X){var W=vBulletin.contentEntryBox.validateForm.apply(Y,[X]);if(W===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(T,U,S){openAlertDialog({title:vBulletin.phrase.get("edit_conversation"),message:"HTTP {0} - {1}".format(T.status,S),iconType:"error"})}).complete(function(T,U,S){window.vBulletin.loadingIndicator.hide()})};vBulletin.conversation.votePost=function(K){var J=D(this).closest(".js-post").attr("data-node-id"),I,H,G;D("body").css("cursor","wait");if(!D(this).hasClass("voted")){I="vote";H="unvote_cap";G=true}else{I="unvote";H="vote_cap";G=false}vBulletin.AJAX({call:"/ajax/api/reputation/"+I,data:{nodeid:J},success:function(M){var L=D(".js-post[data-node-id="+J+"]");L.find(".votecount").html(M.votes);L.find(".js-post-control__vote").toggleClass("voted",G).find(".b-post-control__label").text(vBulletin.phrase.get(H))},complete:function(){D("body").css("cursor","default")},title_phrase:"error_saving_vote"})};vBulletin.conversation.showWhoVoted=function(I){var G=D(this);if(D(this).hasClass("novotepopup")){return }var H=G.closest(".js-post").attr("data-node-id");G.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:H},dataType:"json",once:false,success:function(M,K){if(M.errors){this.set("content.text",M.errors[0][0])}else{if(M.length<1){this.set("content.text",vBulletin.phrase.get("no_one_voted"))}else{var O="<ul>";for(x in M){var J=pageData.baseurl+M[x].profileurl,R;if(!M[x].avatarurl){R=pageData.baseurl_core+"/image.php?u="+M[x].userid+"&type=profile"}else{R=pageData.baseurl_core+"/"+M[x].avatarurl}var N=D("<img>").attr("src",R).attr("alt",M[x].username),Q=D("<a>").attr("href",J).addClass("avatar"),L=D("<a>").attr("href",J).addClass("username").html(M[x].musername),S=D("<li>"),P=D("<div>").addClass("usertitle").html(M[x].usertitle);Q.append(N);S.append(Q);S.append(L);S.append(P);O+=D("<div>").append(S).html()}O+="</ul>";this.set("content.text",O)}}},error:function(J,L,K){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"}});G.qtip("api").show()};vBulletin.conversation.processPostContent=function(G){G.css("border-bottom","").filter(".stream-view.activity-view").find(".list-item-poll form.poll").each(function(H,I){if(D(this).is(":visible")&&D(".view-less-ctrl",this).hasClass("h-hide")){vBulletin.conversation.limitVisiblePollOptionsInAPost(this,3)}})};vBulletin.conversation.limitVisiblePollOptionsInAPost=function(K,J){if(typeof J=="undefined"){J=3}var H=0,I=D("ul.poll li",K),G=parseInt(I.css("line-height"),10);I.each(function(L){D(this).removeClass("h-hide");var M=D(this).height();H+=M/G;if(H>J){D(this).addClass("h-hide")}else{D(this).css("display","")}});if(H>3){D(".view-more-ctrl",K).removeClass("h-hide").next(".js-button-group").addClass("h-hide").next(".view-less-ctrl").addClass("h-hide")}else{D(".view-more-ctrl",K).addClass("h-hide").next(".js-button-group").removeClass("h-hide").next(".view-less-ctrl").addClass("h-hide")}};vBulletin.conversation.bindEditFormEventHandlers=function(K){K=(K)?K.toLowerCase():"";if(D.inArray(K,["text","gallery","video","poll","link","comment","event"])!=-1||K=="all"){var I=function(N,M){if(typeof M=="function"){console.log("Edit mode: initializeEditor");var L=N.find(".js-editor");if(L.length>0){vBulletin.ckeditor.initEditor(L,{success:function(O){if(typeof M=="function"){M();vBulletin.contentEntryBox.afterPanelChange(N);vBulletin.ckeditor.initEditorComponents(N);var P=this;window.setTimeout(function(){console.log("Edit mode: Adding post data to CKEditor (vBulletin.conversation.bindEditFormEventHandlers)");P.setData(L.prev(".js-editor-parsed-text").html(),function(){var Q=vBulletin.ckeditor.getEditor(O);vBulletin.ckeditor.fixTableFunctionality.call(vBulletin.ckeditor,{},Q);Q.focus()})},0)}},error:function(P){if(typeof M=="function"){M()}L.prop("disabled",false).removeClass("ckeditor-load-on-focus").closest(".js-content-entry").addClass("b-content-entry--no-ckeditor");var O=L.prev(".js-editor-parsed-text").html();if(O!=""){vBulletin.AJAX({url:vBulletin.getAjaxBaseurl()+"/ajax/api/editor/convertHtmlToBbcode",data:{nodeid:pageData.nodeid,data:O,allowsmilie:1,securitytoken:pageData.securitytoken},success:function(Q){if(Q&&Q.data){L.html(Q.data)}else{openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("invalid_server_response_please_try_again"),iconType:"error"})}},error_phrase:"error_converting_message"})}},hideLoadingDialog:false})}else{if(typeof M=="function"){M();L.focus()}}}};var J=function(N){var M=N.find(".js-editor");if(M.length>0){var L=M.attr("id");if(vBulletin.ckeditor.editorExists(L)){vBulletin.ckeditor.destroyEditor(L)}}M.closest("form").remove()};var H={};H.comment=function(){D("body").off("comment_editform_onload").on("comment_editform_onload",function(M,N,L){if(typeof L=="function"){L();D(".js-editor",N).focus().filter(".autogrow").elastic().off("blur.elastic")}}).off("comment_editform_onunload").on("comment_editform_onunload",function(L,M){})};H.text=function(){D("body").off("text_editform_onload").on("text_editform_onload",function(M,N,L){I(N,L)}).off("text_editform_onunload").on("text_editform_onunload",function(L,M){J(M)}).off("text_newcontent_onload").on("text_newcontent_onload",function(L,M){if(M.closest(".conversation-list.stream-view.activity-view").length>0){vBulletin.truncatePostContent(M)}})};H.event=function(){D("body").off("event_editform_onload").on("event_editform_onload",function(M,N,L){I(N,L)}).off("event_editform_onunload").on("event_editform_onunload",function(L,M){J(M)}).off("event_newcontent_onload").on("event_newcontent_onload",function(L,M){if(M.closest(".conversation-list.stream-view.activity-view").length>0){vBulletin.truncatePostContent(M)}})};H.poll=function(){var L=function(M){M.find(".js-remove-button").prop("disabled",(M.find("li").length<=2))};D("body").off("poll_editform_onload").on("poll_editform_onload",function(N,O,M){I(O,M);L(D(this).find(".b-poll-fieldset__poll-answers"))}).off("poll_editform_onunload").on("poll_editform_onunload",function(M,N){J(N)}).off("poll_newcontent_onload").on("poll_newcontent_onload",function(M,N){L(D(this).find(".b-poll-fieldset__poll-answers"));if(N.closest(".conversation-list.stream-view.activity-view").length>0){vBulletin.truncatePostContent(N);vBulletin.conversation.limitVisiblePollOptionsInAPost(D("form.poll",N),3)}})};H.gallery=function(){D("body").off("gallery_editform_onload").on("gallery_editform_onload",function(M,N,L){D('.b-toolbar__item[data-panel="b-content-entry-panel__content--gallery"]',N).trigger("click");I(N,function(){if(typeof L=="function"){L()}vBulletin.upload.initializePhotoUpload(N)})}).off("gallery_editform_onunload").on("gallery_editform_onunload",function(L,M){J(M)}).off("gallery_editform_onbeforeserialize").on("gallery_editform_onbeforeserialize",function(M,L){L.find(".caption-box").each(function(){var N=D(this);if(N.hasClass("placeholder")&&N.val()==N.attr("placeholder")){N.val("")}});return true}).off("gallery_newcontent_onload").on("gallery_newcontent_onload",function(L,M){if(M.closest(".conversation-list.stream-view.activity-view").length>0){vBulletin.truncatePostContent(M)}})};H.video=function(){D("body").off("video_editform_onload").on("video_editform_onload",function(M,N,L){D('.b-toolbar__item[data-panel="b-content-entry-panel__content--video"]',N).trigger("click");I(N,function(){if(typeof L=="function"){L()}G(D(".b-content-entry-panel__content--video",N),"video")});D(".js-attach-button",N).on("click",function(R){R.preventDefault();var O=D(this),S=O.closest(".b-content-entry-panel__content--video"),Q=D(".b-link-input__url",S),P=D.trim(Q.val());if(!P){openAlertDialog({title:vBulletin.phrase.get("attach_video"),message:vBulletin.phrase.get("please_enter_video_url"),iconType:"warning",onAfterClose:function(){Q.focus()}});return false}O.prop("disabled",true);D(".js-contententry-buttons .b-button",S).prop("disabled",true);D("body").css("cursor","wait");D.post(vBulletin.getAjaxBaseurl()+"/link/getlinkdata",{url:P,isAjaxTemplateRender:true},function(U){if(U.error){openAlertDialog({title:vBulletin.phrase.get("attach_video"),message:vBulletin.phrase.get(U.error),iconType:"warning",onAfterClose:function(){Q.focus()}})}else{$template=D(U);S.find(".js-panel-content").append($template);G(S,"video");$template.fadeIn("slow",function(){Q.val("");D(".b-link-input",S).addClass("h-hide")});var T=N.closest("form");if($template.find("js-video-url")){T.data("content-type","video")}else{T.data("content-type","link")}}},"json").error(function(V,U,T){openAlertDialog({title:vBulletin.phrase.get("attach_video"),message:"HTTP {0} - {1}".format(V.status,T),iconType:"error"})}).complete(function(){D("body").css("cursor","default");O.prop("disabled",false);D(".js-contententry-buttons .b-button",S).prop("disabled",false)})})}).off("video_editform_onunload").on("video_editform_onunload",function(L,M){J(M)}).off("video_newcontent_onload").on("video_newcontent_onload",function(L,M){if(M.closest(".conversation-list.stream-view.activity-view").length>0){vBulletin.truncatePostContent(M)}})};H.link=function(){D("body").off("link_editform_onload").on("link_editform_onload",function(M,N,L){D('.b-toolbar__item[data-panel="b-content-entry-panel__content--link"]',N).trigger("click");I(N,function(){if(typeof L=="function"){L()}G(D(".b-content-entry-panel__content--link",N),"link")});D(".js-attach-button",N).on("click",function(R){R.preventDefault();var O=D(this),S=O.closest(".b-content-entry-panel__content--link"),Q=D(".b-link-input__url",S),P=D.trim(Q.val());if(!P){openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("please_enter_a_valid_url_and_click_attach"),iconType:"warning",onAfterClose:function(){Q.focus()}});return false}if(!P.match(/^https?:\/\//)){P="http://"+P;Q.val(P)}O.prop("disabled",true);D(".js-contententry-buttons .b-button",S).prop("disabled",true);D("body").css("cursor","wait");D.post(vBulletin.getAjaxBaseurl()+"/link/getlinkdata",{url:P,isAjaxTemplateRender:true},function(V){if(V.error){openAlertDialog({title:vBulletin.phrase.get("attach_link"),message:vBulletin.phrase.get(V.error),iconType:"warning",onAfterClose:function(){Q.focus()}})}else{var U=D(V);U.find("img").error(function(){D(this).closest("li").remove()});S.find(".js-panel-content").append(U);G(S,"link");U.fadeIn("slow",function(){Q.val("");D(".b-link-input",S).addClass("h-hide")});var T=N.closest("form");if(U.find("js-video-url")){T.data("content-type","video")}else{T.data("content-type","link")}}},"json").error(function(V,U,T){openAlertDialog({title:vBulletin.phrase.get("attach_link"),message:"HTTP {0} - {1}".format(V.status,T),iconType:"error"})}).complete(function(){D("body").css("cursor","default");O.prop("disabled",false);D(".js-contententry-buttons .b-button",S).prop("disabled",false)})})}).off("link_editform_onunload").on("link_editform_onunload",function(L,M){J(M)}).off("link_newcontent_onload").on("link_newcontent_onload",function(L,M){if(M.closest(".conversation-list.stream-view.activity-view").length>0){vBulletin.truncatePostContent(M)}}).off("link_savepost_success").on("link_savepost_success",function(L,M){D(".b-link-input",M).removeClass("h-hide-imp")})};var G=function(M,N){D(".b-link-content__urlinfo .js-link-edit",M).on("click",function(P){P.preventDefault();var O=D(this).parent().parent();O.addClass("b-link-content__urlinfo-meta--edit-mode");D(".js-link-textbox",O).val(D.trim(D(".b-link-content__urlinfo-text",O).text())).trigger("focus");D(".js-link-save",O).on("click",function(Q){Q.preventDefault();D(".b-link-content__urlinfo-text",O).text(D(".js-link-textbox",O).val());O.removeClass("b-link-content__urlinfo-meta--edit-mode")})});D(".js-link-remove",M).on("click",function(O){O.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",M).removeClass("h-hide")});if(N=="link"){D(".js-link-preview-checkbox",M).off("click").on("click",function(){D(".b-link-content__thumbnail",M)[this.checked?"addClass":"removeClass"]("h-hide")});var L=D(".b-link-thumbnail-list__item",M).length;D(".b-link-thumbnail-list",M).jcarousel({scroll:1,wrap:null,size:L,rtl:vBulletin.isRtl(),buttonNextCallback:function(Q,P,O){D(".b-thumbnail-nav .b-thumbnail-nav__next-arrow",M).toggleClass("b-icon--disabled",!O)},buttonPrevCallback:function(Q,P,O){D(".b-thumbnail-nav .b-thumbnail-nav__prev-arrow",M).toggleClass("b-icon--disabled",!O)},initCallback:function(P,O){if(O=="init"&&L>0){D(".b-thumbnail-nav .b-thumbnail-nav__counter",M).html("1/"+L);D(".b-thumbnail-nav .b-thumbnail-nav__prev-arrow",M).off("click").on("click",function(){if(!D(this).hasClass("b-icon--disabled")){D(".jcarousel-container .jcarousel-prev",M).trigger("click")}});D(".b-thumbnail-nav .b-thumbnail-nav__next-arrow",M).off("click").on("click",function(){if(!D(this).hasClass("b-icon--disabled")){D(".jcarousel-container .jcarousel-next",M).trigger("click")}})}},itemVisibleInCallback:function(R,P,O,Q){if(Q=="init"){return false}D(".b-thumbnail-nav .b-thumbnail-nav__counter",M).html(O+"/"+L);D('input[type="radio"]',P).prop("checked",true)},itemFallbackDimension:90})}};if(K!="all"){H[K].call()}else{D.each(H,function(L,M){M.call()})}}};vBulletin.isScrolledIntoView=function(I,N){var O=false;if(D.isPlainObject(N)&&(N).toString()=="[object Object]"){O=true;N.top=0;N.bottom=0}I=(I instanceof D)?I:D(I);if(I.length==0){return false}var G=D(window).scrollTop(),H=G+D(window).height(),L=I.offset().top,J=L+I.outerHeight(),M=L-G,K=H-J;if(O){N.top=M;N.bottom=K}return(M>=0&&K>=0)};vBulletin.scrollToFixed=function(K){var G=this,H={element:D(),fixedAt:"top",limit:0,triggerOnload:true,zIndex:99},I=("scrollToFixed"+Math.random()).replace(".","");function J(Q){H=D.extend({},H,Q);if(H.element){H.element=(H.element instanceof D)?H.element:D(H.element);if(H.element.length>0){if(D.inArray(H.fixedAt,["top","bottom"])){H.fixedAt="top"}var N=H.element,L="scrolltofixed",M={width:N.width(),offset:N.offset(),"margin-top":parseInt(N.css("margin-top"),10),"margin-bottom":parseInt(N.css("margin-bottom"),10),cssPosition:N.css("position"),coordinates:{left:N.css("left"),top:N.css("top"),right:N.css("right"),bottom:N.css("bottom")}};var P=D("<div />").addClass("scrolltofixed-filler").hide().insertAfter(N);N.data("origOffsetTop",M.offset.top);N.css("z-index",H.zIndex);N.data("object-instance",G);var O=D(window).off("scroll."+I).on("scroll."+I,function(){if(N.is(":hidden")){return }var U=D(this).scrollTop();if(H.limit>0&&U>H.limit&&N.hasClass(L)){N.removeClass(L).css({position:"absolute",left:"auto",right:"auto",top:"auto",bottom:"auto",width:M.width})}else{if((H.limit>0&&U<H.limit&&U>M.offset.top&&!N.hasClass(L))||(H.limit<=0&&U>M.offset.top&&!N.hasClass(L))){P.css({display:N.css("display"),width:N.outerWidth(true),height:N.outerHeight(true),"float":N.css("float")});var R=(vBulletin.Responsive&&vBulletin.Responsive.scrollToFixedBreakPoint)?vBulletin.Responsive.scrollToFixedBreakPoint:0;if(D("#vb-page-body").width()>R){N.addClass(L).width(M.width).css({left:M.offset.left,right:"auto",width:M.width,top:(H.fixedAt=="top")?0:"auto",bottom:(H.fixedAt=="bottom")?0:"auto",position:""})}else{P.hide()}var T=M["margin-"+H.fixedAt];if(T){var S={};S[H.fixedAt]=-T+"px";N.animate(S,"fast")}}else{if(U<=M.offset.top&&N.hasClass(L)){P.hide();N.removeClass(L).css({position:"",width:"",left:"",top:"",right:"",bottom:""})}}}}).off("resize."+I).on("resize."+I,function(){N.removeClass(L).width("auto").css({position:"",left:""});M.width=N.width();M.offset=N.offset();D(this).trigger("scroll."+I)});if(H.triggerOnload){O.trigger("scroll."+I)}}}}this.updateLimit=function(L){if(!isNaN(Number(L))){H.limit=L;D(window).trigger("scroll."+I)}};this.addLimit=function(L){if(!isNaN(Number(L))){H.limit+=L;D(window).trigger("scroll."+I)}};this.reset=function(L){J(L)};J(K)};vBulletin.scrollToAnchor=function(J){J=J.replace(/(:|\.|\[|\]|,|\/)/g,"\\$1");var N=D(J);console.log("vBulletin.scrollToAnchor() hash: {0}, found: {1}".format(J,N.length));if(N.length>0){var H=N.show().offset().top-2;N.hide();var L=D("html,body"),M=D(".scrolltofixed-floating.scrolltofixed-top"),G=false;if(M.length>0){if(D(".list-container .list-item:first a.anchor"+J).length==1){if(M.hasClass("scrolltofixed")){M.removeClass("scrolltofixed")}H=M.offset().top;G=true}else{if(M.hasClass("scrolltofixed")){H-=M.outerHeight()}}}function K(Q){var P=Q.show().offset().top;Q.hide();P-=(M.hasClass("scrolltofixed")?M.outerHeight():0);return Math.round(P)}function O(){L.stop(true)}var I="scroll mousedown wheel DOMMouseScroll mousewheel keyup";L.off(I,O).one(I,O);L.animate({scrollTop:H},{duration:1000,step:function(P,Q){if(!G){Q.end=K(N)}},always:function(){D("a.anchor").show();N.show();L.off(I,O)}});return false}D("a.anchor").show();return true};if(location.hash){vBulletin.scrollToAnchor(location.hash)}vBulletin.animateScrollTop=function(H,I){console.log("vBulletin.animateScrollTop({0})".format(H));var G=D(".scrolltofixed-floating.scrolltofixed-top");if(G.length>0){var J=G.data("origOffsetTop")||G.offset().top;if(!G.hasClass("scrolltofixed")&&J<H){H-=G.outerHeight(true)}if(J<H){H-=G.outerHeight()}}D("html, body").animate({scrollTop:H},I)};vBulletin.truncatePostContent=function(G){G=(G instanceof D)?G:D(G);if(G.selector==""){G=D("body")}D(".poll-desc.ellipsis, .message-body.ellipsis",G).each(function(){var H=D(this);truncatedHeight=H.height();H.removeClass("ellipsis");var I=H.height();H.addClass("ellipsis");if(I>truncatedHeight){H.closest(".list-item-body").find(".post-links").removeClass("hide-see-link").find(".see-link").off("click").on("click",function(){var K=D(this);if(K.hasClass("more")){H.removeClass("ellipsis")}else{H.addClass("ellipsis")}K.toggleClass("more less");var J=K.text();K.text(K.data("toggle-text")).data("toggle-text",J);return false})}});D(".list-item .see-link.more").each(function(H){var I=D(this).closest(".list-item"),K=D(I).find(".post-content.restore");if(K.length>0){var N=false,L=false,P=D(this).text(),J="",O=D(K).html(),M=this;D(this).on("click",function(){nodeid=D(I).attr("data-node-id");if(N){D(M).text(P);D(K).html(O);N=false}else{if(L){D(M).text(vBulletin.phrase.get("see_less"));N=true;D(K).html(J)}else{if(!L&&nodeid){vBulletin.AJAX({call:"/activity/fetchText",data:{nodeid:nodeid},success:function(Q){J=Q.nodeText;if(J.length<=O.length){D(M).addClass("ui-helper-hidden");postLink=D(M).closest(".post-links").html().replace("<span>|</span>","");D(M).closest(".post-links").html(postLink)}else{D(K).html(Q.nodeText);D(M).text(vBulletin.phrase.get("see_less"));console.log("loaded content for node "+nodeid);N=true;L=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 G=D.cookie(pageData.cookie_prefix+"lastvisit");if(parseInt(pageData.userid)>0&&(!G||pageData.lastvisit>G)){G=pageData.lastvisit}var H=Math.round(new Date().getTime()/1000),I=H-vBulletin.options.get("markinglimit")*86400;D(".forum-item").each(function(){var K=parseInt(D(this).attr("data-lastcontent")),J=0;if(K<=G){D(this).find(".icon").removeClass(".b-icon__speech-double-m--blue").addClass(".b-icon__speech-double-m--gray");return }J=vBulletin.cookie.fetchBbarrayCookie("channel_view",D(this).attr("data-channel-id"));J=J?parseInt(J):0;var L=(K>J);D(this).find(".icon").toggleClass("b-icon__speech-double-m--blue",L).toggleClass("b-icon__speech-double-m--gray",!L)});D(".subforum-item").each(function(){var K=parseInt(D(this).attr("data-lastcontent")),J=0;if(K<=G){D(this).find(".icon").removeClass("b-icon__speech-single2--blue").addClass("b-icon__speech-single2--gray");return }J=vBulletin.cookie.fetchBbarrayCookie("channel_view",D(this).attr("data-channel-id"));J=J?parseInt(J):0;var L=(K>J);D(this).find(".icon").toggleClass("b-icon__speech-single2--blue",L).toggleClass("b-icon__speech-single2--gray",!L)});D(".topic-item").each(function(){var K=parseInt(D(this).attr("data-lastcontent")),L=0,J=0,N=0;if(pageData.userid=="0"){if(K<=G){D(this).addClass("read");return }J=vBulletin.cookie.fetchBbarrayCookie("channel_view",D(this).attr("data-channel-id"));J=J?parseInt(J):0;L=vBulletin.cookie.fetchBbarrayCookie("discussion_view",D(this).attr("data-node-id"));L=L?parseInt(L):0;N=Math.max(J,L)}else{N=D(this).attr("data-readtime")?parseInt(D(this).attr("data-readtime")):0;J=D(this).attr("data-channelreadtime")?parseInt(D(this).attr("data-channelreadtime")):0;N=Math.max(N,J,I)}if(K<=N||D(this).hasClass("redirect")){D(this).addClass("read")}else{if(D(this).find(".topic-wrapper .js-go-to-first-unread").length==0){var M=D(this).find(".topic-wrapper .topic-title").attr("href");if(typeof (M)!="undefined"){M+=(M.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",M).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(M,N,J){if(parseInt(M)){vBulletin.setChannelRead(M,N)}else{if(pageData.channelid&&parseInt(pageData.channelid)&&parseInt(pageData.threadmarking)>0&&parseInt(pageData.userid)>0){vBulletin.setChannelRead(pageData.channelid,N)}else{var H=[],I=D(J).closest(".widget-content").find(".forum-list-container"),G=I.find(".forum-item"),L=I.find(".subforum-item");var K=function(O,Q){var P=parseInt(D(Q).attr("data-channel-id"),10);if(P){H.push(P)}};D.each(G,K);D.each(L,K);D.each(H,function(O,P){if(O>=H.length-1){vBulletin.setChannelRead(P,N)}else{vBulletin.setChannelRead(P,[])}})}}};vBulletin.markRead=function(G){vBulletin.AJAX({call:"/ajax/api/node/markRead",data:{nodeid:G},success:D.noop,api_error:D.noop,error:D.noop,})};vBulletin.setChannelRead=function(H,I){var J=Math.round(new Date().getTime()/1000);success=((I.success&&typeof I.success=="function")?I.success:D.noop);if(pageData.threadmarking=="0"||!parseInt(pageData.userid)){if(H==0){D.cookie(pageData.cookie_prefix+"lastvisit",J)}else{var G;try{G=D.parseJSON(vBulletin.cookie.convertBbarrayCookie(D.cookie(pageData.cookie_prefix+"channel_view")))||{}}catch(K){G={}}G[H]=J;var L={path:pageData.cookie_path,domain:pageData.cookie_domain};L.expires=365;D.cookie(pageData.cookie_prefix+"channel_view",vBulletin.cookie.convertBbarrayCookie(JSON.stringify(G),"set"),L)}success()}else{vBulletin.AJAX({call:"/ajax/api/node/markChannelsRead",data:{nodeid:H},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 J=navigator.userAgent.toLowerCase(),K=J.match(/edge[ \/](\d+.?\d*)/),H=J.indexOf("trident/")>-1,M=!!(K||H);var I={ie:M,edge:!!K,webkit:!M&&(J.indexOf(" applewebkit/")>-1),air:(J.indexOf(" adobeair/")>-1),mac:(J.indexOf("macintosh")>-1),quirks:(document.compatMode=="BackCompat"&&(!document.documentMode||document.documentMode<10)),mobile:(J.indexOf("mobile")>-1),iOS:/(ipad|iphone|ipod)/.test(J)};I.gecko=(navigator.product=="Gecko"&&!I.webkit&&!I.opera&&!I.ie);if(I.webkit){if(J.indexOf("chrome")>-1){I.chrome=true}else{I.safari=true}}var G=0;if(I.ie){if(K){G=parseFloat(K[1])}else{if(I.quirks||!document.documentMode){G=parseFloat(J.match(/msie (\d+)/)[1])}else{G=document.documentMode}}I.ie9Compat=G==9;I.ie8Compat=G==8;I.ie7Compat=G==7;I.ie6Compat=G<7||I.quirks}if(I.gecko){var L=J.match(/rv:([\d\.]+)/);if(L){L=L[1].split(".");G=L[0]*10000+(L[1]||0)*100+(L[2]||0)*1}}if(I.air){G=parseFloat(J.match(/ adobeair\/(\d+)/)[1])}if(I.webkit){G=parseFloat(J.match(/ applewebkit\/(\d+)/)[1])}var N=(!(I.ie&&G<7)&&!(I.gecko&&G<40000)&&!(I.webkit&&G<534));return N};vBulletin.ckeditor.fireCallbacks=function(J,H,G,I){if(G=="error"&&typeof H.error=="function"){H.error(J)}if(G=="success"&&typeof H.success=="function"){H.success.apply(I,[J,I])}if(typeof H.complete=="function"){H.complete(J)}};vBulletin.ckeditor.initEditor=function(I,H){H=H||{};I=vBulletin.ckeditor.verifyEditorId(I);console.log("Ckeditor: initEditor({0})".format(I));if(!vBulletin.ckeditor.checkEnvironment()){var G=D("#"+I).closest(".js-content-entry");G.find("li[data-panel=b-content-entry-panel__content--toggle-editor]").addClass("h-hide");G.find("li[data-panel=b-content-entry-panel__content--smiley]").addClass("h-hide");G.find("form").append(D('<input type="hidden" name="nl2br" value="1" />'));vBulletin.ckeditor.fireCallbacks(I,H,"error");return }if(vBulletin.ckeditor.requiredScriptsLoaded){vBulletin.ckeditor.doInitEditor(I,H)}else{vBulletin.ckeditor.loadScripts(I,H)}};vBulletin.ckeditor.loadScripts=function(I,H,G){if(vBulletin.ckeditor.requiredScriptLoadingStarted){console.warn("Ckeditor: Trying to load required scripts more than once.");return }vBulletin.ckeditor.requiredScriptLoadingStarted=true;H=H||{};I=I||"";if(typeof (H.hideLoadingDialog)!=="undefined"&&!H.hideLoadingDialog){vBulletin.ckeditor.showLoadingDialog(I)}var K=function(){if(H.showError||!vBulletin.ckeditor.requiredScriptsLoadFailed){vBulletin.warning("error","error_loading_ckeditor_script")}vBulletin.loadingIndicator.hide();vBulletin.ckeditor.requiredScriptsLoadFailed=true;vBulletin.ckeditor.fireCallbacks(I,H,"error")};var J=function(){if(!vBulletin.ckeditor.requiredScriptsLoadFailed){if(typeof G=="function"){G()}if(typeof vBulletin.ckeditor.doInitEditor=="function"&&window.CKEDITOR){vBulletin.ckeditor.requiredScriptsLoaded=true;vBulletin.ckeditor.doInitEditor(I,H)}else{setTimeout(J,10)}}else{vBulletin.ckeditor.fireCallbacks(I,H,"error");if(!H.hideLoadingDialog){vBulletin.ckeditor.hideLoadingDialog(I)}}};if(typeof vBulletin.ckeditor.doInitEditor!="function"&&!window.CKEDITOR){vBulletin.AJAX({url:vBulletin.getAjaxBaseurl()+"/ajax/render/ckeditor_javascript",success:function(M){var L=[];var N=/src="([^"]+)"/g;while(match=N.exec(M)){L.push(match[1])}var O=function(){if(L.length>0){console.log("Ckeditor: Calling getScript for: {0}".format(L[0]));D.getScript(L[0],function(P,R,Q){if(R!="success"){console.warn("Ckeditor: Error loading "+L[0]);K();return false}console.log("Ckeditor: Script loaded: "+L[0]);L.splice(0,1);O()}).fail(function(Q,R,P){console.warn("Ckeditor: Error loading script: "+R+" Exception: "+P);K()})}else{J()}};O()},error_phrase:"error_fetching_dialog"})}else{J()}};vBulletin.ckeditor.editorExists=function(G){return false};vBulletin.ckeditor.isEditorEmpty=function(G){return true};vBulletin.ckeditor.resetEditor=function(G){return false};vBulletin.ckeditor.getEditorContent=function(H){H=vBulletin.ckeditor.verifyEditorId(H);if(!H){return false}if(vBulletin.ckeditor.editorExists(H)){var G=vBulletin.ckeditor.getEditor(H);if(G&&G.getData){return D.trim(G.getData())}else{return false}}else{return D.trim(D("#"+H).val())}};vBulletin.ckeditor.focusEditor=function(H){H=vBulletin.ckeditor.verifyEditorId(H);if(!H){return }if(vBulletin.ckeditor.editorExists(H)){var G=vBulletin.ckeditor.getEditor(H);if(G){G.focus()}}else{D("#"+H).focus()}};vBulletin.ckeditor.loadingDialogStack={};vBulletin.ckeditor.showLoadingDialog=function(G){if((typeof vBulletin.ckeditor.loadingDialogStack[G]!="undefined")&&vBulletin.ckeditor.loadingDialogStack[G]){return }vBulletin.ckeditor.loadingDialogStack[G]=true;var H=D("#"+G);if(H.length>0&&H.is(":visible")){H.prop("disabled",true)}window.vBulletin.loadingIndicator.show("vBulletin.ckeditor.showLoadingDialog editorId: "+G)};vBulletin.ckeditor.hideLoadingDialog=function(G){if((typeof vBulletin.ckeditor.loadingDialogStack[G]=="undefined")||!vBulletin.ckeditor.loadingDialogStack[G]){return }vBulletin.ckeditor.loadingDialogStack[G]=false;D("#"+G).prop("disabled",false);window.vBulletin.loadingIndicator.hide("vBulletin.ckeditor.hideLoadingDialog editorId: "+G)};vBulletin.ckeditor.generatedIdCounter=0;vBulletin.ckeditor.verifyEditorId=function(H){H=H||"";if(typeof H=="string"){return H}else{if(typeof H=="object"&&typeof H.checkDirty!="undefined"&&typeof H.name!="undefined"){return H.name}else{var G=H instanceof D?H:D(H);if(!G.attr("id")){++vBulletin.ckeditor.generatedIdCounter;G.attr("id",("vb-cke-instance-"+vBulletin.ckeditor.generatedIdCounter))}return G.attr("id")}}};vBulletin.ckeditor.initEditorComponents=function(H,G){H=H||document;D(function(){D(".js-ckeditor-init-on-focus",H).off("focus").on("focus",function(){vBulletin.ckeditor.initEditor(D(this))});D(".js-ckeditor-init-on-page-load",H).each(function(){vBulletin.ckeditor.initEditor(D(this))});if(G){return }(function(){var K=function(M){return D(".js-content-entry-post-icons option",H).filter(function(){return(D(this).val()==M)}).data("icon-url")};var L=function(M){return D(".js-content-entry-post-icons option",H).filter(function(){return(D(this).val()==M)}).text()};var J=function(N){if(N==0){return D("<span />").html(vBulletin.phrase.get("no_icon")).get(0)}var O=K(N);if(O){var M=L(N);return D("<img />").attr("src",O).attr("alt","").attr("title",M).get(0)}else{return""}};D(".js-content-entry-post-icons",H).selectBox().change(function(){var M=D(this).val();D(".js-content-entry-post-icons.selectBox-dropdown .selectBox-label",H).html(J(M))});D(".js-content-entry-post-icons-selectBox-dropdown-menu li a").each(function(){var M=D(this).attr("rel");D(this).html(J(M))});D(".js-content-entry-post-icons",H).trigger("change")})();D(".js-content-entry-prefixes",H).selectBox();var I=[];D(".js-select-box",H).each(function(){var J=D(this),K;while(J.is(":hidden")){K=J.closest(".h-hide");if(K.length<1){break}I.push(K);K.removeClass("h-hide")}J.selectBox()});D.each(I,function(J,K){K.addClass("h-hide")})})};vBulletin.ckeditor.initEditorComponents(document);D(".js-focus-on-page-load").first().focus();vBulletin.doReplaceSecurityToken=function(G){if(typeof (G)=="undefined"||G==""){return }D("form").each(function(){var H=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(H.find('input[name="securitytoken"]').length){H.find('input[name="securitytoken"]').val(G)}else{H.append('<input type="hidden" name="securitytoken" value="'+G+'" />')}}});pageData.securitytoken=G;console.log("Securitytoken updated")};window.openAlertDialog=function(M){var L=D("#alert-dialog");M=M||{};if(!L.data("created")){L.dialog({autoOpen:false,modal:true,resizable:false,closeOnEscape:false,showCloseButton:false,dialogClass:"dialog-container alert-dialog-container dialog-box",create:function(){L.data("created",true)}})}L.dialog("option","width",M.width||500);L.dialog("option","title",M.title||vBulletin.phrase.get("alert"));var H=L.find(".dialog-content"),I=H.find(".message"),G=H.find(".icon"),K=D("#btnAlertDialogOK"),J="",N="";if(M.maxHeight){J=M.maxHeight;N="auto"}H.css({"max-height":J,overflow:N});if(M.message){I.html(M.message)}G.removeClass(function(O,P){return(P.match(/b-icon\S+\b/g)||[]).join(" ")+" no-icon b-icon"});M.buttonLabel=M.buttonLabel||vBulletin.phrase.get("ok");K.html(M.buttonLabel);L.find(".js-button").toggleClass("b-button--sitebuilder",D("body").is(".edit-mode, .js-edit-mode-style"));L.off("dialogopen").on("dialogopen",function(){K.off("click").on("click",function(){if(typeof M.onBeforeClose=="function"){M.onBeforeClose.apply(this)}L.dialog("close")}).focus();L.parent(".alert-dialog-container").css("z-index","10100")});L.off("dialogclose").on("dialogclose",function(){if(typeof M.onAfterClose=="function"){M.onAfterClose.apply(K)}});switch(M.iconType){case"warning":case"error":G.addClass("b-icon b-icon__warning-l--red h-margin-right-xl");G.show();break;default:G.addClass("no-icon").hide();break}L.dialog("open");return L};vBulletin.warning=function(I,G,H){vBulletin.alert(I,G,"warning",H)};vBulletin.error=function(I,G,H){vBulletin.alert(I,G,"error",H)};vBulletin.alert=function(J,G,I,H){openAlertDialog({title:vBulletin.phrase.get(J),message:vBulletin.phrase.get(G),iconType:I,onAfterClose:H})};window.openConfirmDialog=function(K){K=K||{};var G=D("#confirm-dialog");if(!G.data("created")){G.dialog({autoOpen:false,modal:true,resizable:false,closeOnEscape:false,showCloseButton:false,create:function(){G.data("created",true)}})}var N=K.title||vBulletin.phrase.get("confirmation");G.dialog("option","title",N);G.closest(".ui-dialog").find(".ui-dialog-title").html(N);var O=G.find(".dialog-content");var L=O.find(".message");var M=O.find(".icon");if(K.message){L.html(K.message.replace("\n","<br />"))}G.dialog("option","width",(K.width?K.width:500));G.dialog("option","dialogClass","dialog-container confirm-dialog-container dialog-box "+(K.dialogClass||""));M.removeClass(function(P,Q){return(Q.match(/b-icon\S+\b/g)||[]).join(" ")+" no-icon b-icon"});K.buttonLabel=K.buttonLabel||{};K.buttonLabel.yesLabel=K.buttonLabel.yesLabel||vBulletin.phrase.get("yes");K.buttonLabel.noLabel=K.buttonLabel.noLabel||vBulletin.phrase.get("no");var I=D("#btnConfirmDialogYes").html(K.buttonLabel.yesLabel);var J=D("#btnConfirmDialogNo").html(K.buttonLabel.noLabel);I.addClass("b-button--primary").removeClass("b-button--secondary");J.addClass("b-button--secondary").removeClass("b-button--primary");G.find(".js-button").toggleClass("b-button--sitebuilder",D("body").is(".edit-mode, .js-edit-mode-style"));var H;G.off("dialogopen").on("dialogopen",function(){var Q=D("#btnConfirmDialogYes").off("click").on("click",function(){H=this;var S,R;if(typeof K.onClickYes=="function"){S=K.onClickYes.apply(this);if(typeof K.onClickYesWithAjax!="undefined"&&K.onClickYesWithAjax){return false}}if(S===false){return false}if(typeof K.onBeforeClose=="function"){R=K.onBeforeClose.apply(this);if(typeof K.onBeforeCloseWithAjax!="undefined"&&K.onBeforeCloseWithAjax){return false}}if(R===false){return false}G.dialog("close")}).focus();var P=D("#btnConfirmDialogNo").off("click").on("click",function(){H=this;if(typeof K.onClickNo=="function"){K.onClickNo.apply(this)}if(typeof K.onBeforeClose=="function"){K.onBeforeClose.apply(this)}G.dialog("close")})});G.off("dialogclose").on("dialogclose",function(Q,P){if(typeof K.onAfterClose=="function"){K.onAfterClose.apply(H)}});switch(K.iconType){case"warning":M.addClass("b-icon b-icon__warning-l--red h-margin-right-xl");M.show();break;default:M.addClass("no-icon").hide();break}G.dialog("open");return G};vBulletin.openPromptDialog=function(J){var L=D("#prompt-dialog");if(!L.data("created")){L.dialog({autoOpen:false,modal:true,resizable:false,closeOnEscape:false,showCloseButton:false,width:500,dialogClass:"dialog-container prompt-dialog-container dialog-box",create:function(){L.data("created",true)}})}J=J||{};L.dialog("option","title",J.title||vBulletin.phrase.get("prompt"));var O=L.find(".dialog-content"),K=O.find(".message"),M;if(J.message){K.html(J.message)}var G=J.initialValue||"";if(!J.multiline){M=L.find("input.input-box").val(G).removeClass("h-hide");M.next().addClass("h-hide");if(Number(J.maxlength)){M.attr("maxlength",Number(J.maxlength))}else{M.removeAttr("maxlength")}O.addClass("table");O.find("> div").addClass("td")}else{M=L.find("textarea.input-box").val(G).removeClass("h-hide");M.prev().addClass("h-hide");O.removeClass("table");O.find("> .td").removeClass("td")}J.buttonLabel=J.buttonLabel||{};J.buttonLabel.okLabel=J.buttonLabel.okLabel||vBulletin.phrase.get("ok");J.buttonLabel.cancelLabel=J.buttonLabel.cancelLabel||vBulletin.phrase.get("cancel");var N=D("#btnPromptDialogOK").html(J.buttonLabel.okLabel),I=D("#btnPromptDialogCancel").html(J.buttonLabel.cancelLabel),H;L.find(".js-button").toggleClass("b-button--sitebuilder",D("body").is(".edit-mode, .js-edit-mode-style"));L.off("dialogopen").on("dialogopen",function(){var Q=D("#btnPromptDialogOK").off("click").on("click",function(){H=this;var T=D.trim(M.val()),S,W;if(J.validation&&typeof J.validation=="object"){var V=J.validation;if(!V.override&&V.callback){var U=V.callback;if(!Array.isArray(U)){U=[U]}for(C=0;C<U.length;C++){if(typeof U[C]=="function"){var R=U[C].apply(L,[M,J]);if(R!==true){if(R&&V.showError){L.find(".js-prompt-error").html(vBulletin.phrase.get(R)).removeClass("h-hide")}M.trigger("select").trigger("focus");return false}}}}if(typeof V.custom=="function"){if(!V.custom.apply(this,[M])){return false}}}if(typeof J.onClickOK=="function"){W=J.onClickOK.apply(this,[T]);if(typeof J.onClickOKWithAjax!="undefined"&&J.onClickOKWithAjax){return false}}if(W===false){return false}if(typeof J.onBeforeClose=="function"){S=J.onBeforeClose.apply(this);if(typeof J.onBeforeCloseWithAjax!="undefined"&&J.onBeforeCloseWithAjax){return false}}if(S===false){return false}L.dialog("close")}).trigger("focus");var P=D("#btnPromptDialogCancel").off("click").on("click",function(){H=this;if(typeof J.onClickCancel=="function"){J.onClickCancel.apply(this)}if(typeof J.onBeforeClose=="function"){J.onBeforeClose.apply(this)}L.dialog("close")})});L.off("dialogclose").on("dialogclose",function(){L.find(".js-prompt-error").addClass("h-hide");if(typeof J.onAfterClose=="function"){J.onAfterClose.apply(H);M.val("")}});L.dialog("open");M.trigger("focus");return L};vBulletin.openPromptDialog.validationString=function(I,H){var G=D.trim(I.val());if(!G){return"please_enter_a_value"}else{if(H.multiline&&G.length>H.maxlength){return["message_too_long",H.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(G){return D(G).on("reset",function(H,I){if(typeof I=="function"){I()}})};window.vBulletin=window.vBulletin||{};vBulletin.sitebuilder=vBulletin.sitebuilder||{};vBulletin.sitebuilder.toggleSitebuilder=function(G){var H=D(this);if(H.hasClass("on")){D.removeCookie(pageData.sb_state_cookie,{path:pageData.cookie_path,domain:pageData.cookie_domain});D(".js-top-menu-sitebuilder").slideUp("fast");H.removeClass("on");return true}if(D(".js-top-menu-sitebuilder").length>0){D(".js-top-menu-sitebuilder").slideDown("fast");H.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(G,I){G=G||false;function H(){if(typeof I=="function"){return I()}}if(D("#sitebuilder-wrapper").is(".js-sb-loaded")){return H()}vBulletin.AJAX({call:"/ajax/activate-sitebuilder",data:{pageid:pageData.pageid,nodeid:pageData.nodeid,userid:pageData.userid,loadMenu:G},cache:false,isAjaxTemplateRender:true,isAjaxTemplateRenderWithData:true,success:function(J){if(J&&J.templates){if(G){D("head").append(J.templates.css);D(".js-top-menu-sitebuilder--list").hide().html(J.templates.menu)}D("#sitebuilder-wrapper").prepend(J.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 H()}},})};vBulletin.sitebuilder.menuClickProxy=function(){var G=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(G).click()});return false};if(typeof (tzOffset)!="undefined"){var F=new Date().getTimezoneOffset()/60;if(Math.abs(tzOffset+F)==1){vBulletin.AJAX({call:"/profile/save-dst",data:{userid:pageData.userid,clientUtcOffset:F},success:function(){window.location.reload()},api_error:D.noop,error:D.noop})}}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 H(){window.vBulletin.loadingIndicator.init();D(document).off("click","a.animate-scroll").on("click","a.animate-scroll",function(){var Q=vBulletin.scrollToAnchor(this.hash);if(Q){window.location.href=this.href}return false});var P=function(Q){D(this).closest(".split-button").toggleClass("open").find(".submenu").toggleClass("h-hide");D("body").off("click.buttonset").on("click.buttonset",function(R){if(D(R.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",P).closest(".button-set").buttonset().filter(".one-click").find(".button-text").on("click",P);D(document).off("click",".canvas-widget .toggle-button").on("click",".canvas-widget .toggle-button",function(W,Q){var V=D(this),X=V.closest(".canvas-widget"),R=D(".widget-content",X),U=X.data("widget-instance-id"),T=V.closest(".edit-mode").length;if(V.hasClass("expand")){X.removeClass("collapsed");if(Q){R.show()}else{R.slideDown("slow")}if(!T){vBulletin.arraystore.unset("collapse",U)}}else{if(Q){R.hide();X.addClass("collapsed")}else{R.slideUp("slow",function(){X.addClass("collapsed")})}if(!T){vBulletin.arraystore.set("collapse",U,1)}}V.toggleClass("collapse expand");var S=V.attr("title");V.attr("title",V.data("toggle-title")).data("toggle-title",S);return false});(function(){var Q=vBulletin.arraystore.getAll("collapse");if(Q&&Q!=null){D.each(Q,function(R,S){D("#widget_"+R+":not(.widget-no-header-buttons) .widget-header .toggle-button").trigger("click",[true])})}})();D(".conversation-toolbar-wrapper form.toolbar-filter-overlay").trigger("reset");var M=!!("placeholder" in document.createElement("input"));if(!M){var L=D("input[placeholder], textarea[placeholder]");L.filter(":focus").addClass("js-temp-focus").blur();L.placeholder();var O=function(R){var Q=L.filter(".js-temp-focus").focus();if(R){Q.removeClass("js-temp-focus")}};D(window).on("load.placeholder_temp",function(){O(true);D(window).off("load.placeholder_temp")});O()}if(D("textarea.autogrow").length>0){D("textarea.autogrow").elastic().off("blur.elastic")}D(".edit-switch-container .switch-control").on("mousedown",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(Q){if(Q.which==32||Q.which==13){if(Q.target&&Q.target.nodeName&&(Q.target.nodeName+"").toLowerCase()=="label"&&D(Q.target).find("input").length==1){D(Q.target).find("input").trigger("click")}else{D(this).trigger("click")}Q.preventDefault()}});D(document).off("keypress",".js-link").on("keypress",".js-link",function(Q){if(Q.which==13){D(this).trigger("click");Q.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(Q){D(this).next("ol, ul").toggle()});D(document).off("click",".js-toggle-slider").on("click",".js-toggle-slider",function(){var T=D(this);if(T.is(".b-toggle-slider--yes")){T.removeClass("b-toggle-slider--yes").addClass("b-toggle-slider--no");T.find(".b-toggle-slider__radio--no").prop("checked",true);T.data("value","0")}else{T.removeClass("b-toggle-slider--no").addClass("b-toggle-slider--yes");T.find(".b-toggle-slider__radio--yes").prop("checked",true);T.data("value","1")}var S=D(".js-toggle-slider, .js-toggle-slider__dependent"),Q=S.index(T),R=false;S.each(function(U,V){if(U==Q){R=true}else{if(R==true){var W=D(this);if(W.is(".js-toggle-slider__dependent")){W.toggleClass("h-hide")}else{R=false;return false}}}});T.trigger("change",T.data("value"));return false});D(".js-select-box").selectBox();D(".mainmenu li:has(.submenu)").on("click",function(Q){D(".submenu",this).show();return false}).hover(function(){},function(Q){D(".submenu",this).hide()});D(".mainmenu.textControls li").on("click",function(Q){if(D(".tagCtrl",this).length==0){D("#tag-dialog").hide()}});D(".mainmenu .submenu li a").on("click",function(R){var Q=D(this).closest(".js-comp-menu-dropdown");if(Q.length){Q.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(R){var Q=R.which;if(!R.shiftKey&&!R.altKey&&!R.ctrlKey&&((Q>=48&&Q<=57)||(Q>=96&&Q<=105)||Q==8||Q==9||Q==13||Q==35||Q==36||Q==37||Q==39||Q==46||Q==45)){return true}return false});D(document).off("click",".js-post__manage").on("click",".js-post__manage",function(){if(typeof vBulletin.inlinemod=="undefined"){var R=vBulletin.getAjaxBaseurl()+"/js/inlinemod.js?v="+pageData.simpleversion,Q=this;D.getScript(R,function(){vBulletin.inlinemod.manage_deleted_form.apply(Q)}).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 S=D(this),R=S.text(),Q=S.data("toggle-text");if(S.hasClass("js-post__show-hide--show")){S.closest(".js-post").addClass("b-post--show-deleted-content");S.html(Q).data("toggle-text",R).removeClass("js-post__show-hide--show")}else{S.closest(".js-post").removeClass("b-post--show-deleted-content");S.html(Q).data("toggle-text",R).addClass("js-post__show-hide--show")}});D(document).off("click","a.video-frame").on("click","a.video-frame",function(S){S.preventDefault();var R={code:this.getAttribute("data-vcode"),provider:this.getAttribute("data-vprovider")};if(this.getAttribute("data-height")){R.height=this.getAttribute("data-height")}if(this.getAttribute("data-width")){R.width=this.getAttribute("data-width")}var Q=D(this);D.post(vBulletin.getAjaxBaseurl()+"/ajax/render/bbcode_video",R,function(T){if(T){Q.replaceWith(T)}},"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(Q){Q.preventDefault();D("body,html").animate({scrollTop:0},800)});var N=function(T){var R=T.data("action"),S=!T.is(":checked"),Q=D(document).find(T.data("on"));if(R=="invisible"){Q.toggleClass("h-invisible",S)}else{Q.find(":input").addBack(":input").prop("disabled",S)}};D("input.js-dependent-master").each(function(){var S=D(this),R=S.attr("type"),Q=function(){N(S)};if(R=="checkbox"){S.on("change",Q)}else{if(R=="radio"){S.closest("form").find('input[name="'+S.attr("name")+'"]').on("change",Q)}}});D("input.js-select-all-master").on("change",function(){var Q=D(this);$list=D(document).find(Q.data("list"));$list.prop("checked",Q.is(":checked"))})}function I(){window.clearTimeout(securitytoken_timeout);if(pageData.securitytoken!="guest"){securitytoken_timeout=window.setTimeout(I,3600000);var L=function(){if(++securitytoken_errors==3){vBulletin.doReplaceSecurityToken("guest")}};vBulletin.AJAX({call:"/ajax/replace-securitytoken",data:{securitytoken:pageData.securitytoken},success:function(M){securitytoken_errors=0;vBulletin.doReplaceSecurityToken(M.newtoken)},api_error:L,error:L,})}}function G(){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})}}}H();D("#searchPopupControl").on("click",function(L){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(L){if(D(L.target).closest("#searchForm").size()==0&&D("#searchPopupControl").hasClass("open")){D("#searchPopupControl").removeClass("open");D("#searchPopupContent").hide()}});D("#btnAdvSearch").off("click").on("click",function(M){M.preventDefault();D(this).data("clicked2submit",1);var L=D("#searchForm");D('<input type="hidden" name="AdvSearch" value="1" />').appendTo(L);L.submit()});D("#searchForm").off("submit.searchform").on("submit.searchform",function(R){var T=D(this),Q={},M=T.find("#q"),O=D.trim(M.val());if(O.length>0){Q.keywords=O}else{if(!D("#btnAdvSearch").data("clicked2submit")){vBulletin.warning("search","please_provide_search_string",function(){M.focus()});R.stopPropagation();return false}}var S=T.find(".searchPopupBody"),N=S.find(".searchFields_title_only");if(N.size()>0&&N.prop("checked")){Q.title_only=1}var L=S.find(".searchFields_author");if(L.size()>0&&L.prop("checked")){Q.author=[L.val()]}var P=S.find(".searchFields_channel");if(P.size()>0&&P.prop("checked")){Q.channel=[P.val()]}T.find("input[name=searchJSON]").val(JSON.stringify(Q));return true});var J,K=pageData.cookie_prefix+"np_notices_displayed";if(!(J=D.cookie(K))){J=new Array()}if(!(J instanceof Array)){J=new Array(J)}D('ul.notices li[data-notice-persistent="0"]').each(function(L){J.push(D(this).attr("data-notice-id"))});if(J.length>0){J=null}D.cookie(K,J,{path:pageData.cookie_path,domain:pageData.cookie_domain});D("ul.notices > li > .close").off("click").on("click",function(L){var N=D(this).closest("li"),M=N.attr("data-notice-id");vBulletin.AJAX({call:"/ajax/api/notice/dismiss",data:{noticeid:M},success:function(O){N.hide("slow",function(){var P=D(this).parent();if(P.find(">li:visible").length==0){P.addClass("h-hide")}})}})});D("#frmActivateuser").ajaxForm({dataType:"json",beforeSubmit:function(O,N,M){var L="",P="";if(D.trim(D(".username",N).val())==""){L=vBulletin.phrase.get("please_enter_a_username");P=".username"}else{if(D.trim(D(".activateid",N).val())==""){L=vBulletin.phrase.get("requiredfieldmissing",vBulletin.phrase.get("activation_code"));P=".activateid"}}if(L){openAlertDialog({title:vBulletin.phrase.get("error"),message:L,iconType:"warning",onAfterClose:function(){D(P,N).focus()}});return false}return true},success:function(N,P,Q,M){if(N&&N.response&&N.response.errors){var R=[];for(var L in N.response.errors){if(N.response.errors[L][0]!="exception_trace"&&N.response.errors[L][0]!="errormsg"){R.push(vBulletin.phrase.get(N.response.errors[L]))}}openAlertDialog({title:vBulletin.phrase.get("error"),message:R.join("<br />"),iconType:"warning",onAfterClose:function(){vBulletin.hv.reset(true)}})}else{var O=N.response.msg_params;O.unshift(N.response.msg);openAlertDialog({title:vBulletin.phrase.get("activate_your_account"),message:vBulletin.phrase.get.apply(vBulletin.phrase,O),onAfterClose:function(){window.location.href=pageData.baseurl}})}}});D("#frmActivateemail").ajaxForm({dataType:"json",beforeSubmit:function(O,N,M){var L="",P="";if(D.trim(D(".email",N).val())==""){L=vBulletin.phrase.get("please_enter_your_email_address")}else{if(!isValidEmailAddress(D(".email",N).val())){L=vBulletin.phrase.get("invalid_email_address")}}if(L){openAlertDialog({title:vBulletin.phrase.get("error"),message:L,iconType:"warning",onAfterClose:function(){D(P,N).focus()}});return false}return true},success:function(N,P,Q,M){if(N&&N.response&&N.response.errors){var R=[];for(var L in N.response.errors){if(N.response.errors[L][0]!="exception_trace"&&N.response.errors[L][0]!="errormsg"){R.push(vBulletin.phrase.get(N.response.errors[L]))}}openAlertDialog({title:vBulletin.phrase.get("error"),message:R.join("<br />"),iconType:"warning",onAfterClose:function(){vBulletin.hv.reset(true)}})}else{var O=N.response.msg_params;O.unshift(N.response.msg);openAlertDialog({title:vBulletin.phrase.get("email_activation_codes"),message:vBulletin.phrase.get.apply(vBulletin.phrase,O),onAfterClose:function(){window.location.href=pageData.baseurl}})}}});D(".js-stylechooser a").off("click").on("click",function(){var L=D(this).data("styleid"),M=new Date();M.setDate(M.getDate()+365);D.cookie(pageData.cookie_prefix+"userstyleid",L,{path:pageData.cookie_path,domain:pageData.cookie_domain,expires:M});window.location.reload();return false});D(".js-languagechooser a").off("click").on("click",function(){var L=D(this).data("languageid"),M=new Date();M.setDate(M.getDate()+365);D.cookie(pageData.cookie_prefix+"languageid",L,{path:pageData.cookie_path,domain:pageData.cookie_domain,expires:M});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(I,3600000);securitytoken_errors=0;setTimeout(G,5)},1);vBulletin.getQueryString=function(H){if(H==""){return{}}var G={};for(var I=0;I<H.length;++I){var J=H[I].split("=");if(J.length!=2){continue}G[J[0]]=decodeURIComponent(J[1].replace(/\+/g," "))}return G};vBulletin.triggerHandler=function(G,I,J){if(!I||I.length==0){I=D(document)}else{if(!(I instanceof D)){I=D(I)}}J=J||[];var H=D.Event(G);H.target=this instanceof D?this.get(0):this;return I.triggerHandler(H,J)}})(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)};