").addClass("usertitle").html(K[x].usertitle);O.append(L);Q.append(O);Q.append(J);Q.append(N);M+=C("
").append(Q).html()}M+="";this.set("content.text",M)}}},error:function(H,J,I){this.set("content.text","failed to load.")}}},position:{my:"left top",at:"right top",viewport:C(window)},show:{event:"click"},hide:{event:"unfocus",fixed:true},style:{classes:"ui-tooltip-shadow ui-tooltip-light ui-tooltip-whovoted"}});E.qtip("api").show()};vBulletin.conversation.processPostContent=function(E){E.css("border-bottom","").filter(".stream-view.activity-view").find(".list-item-poll form.poll").each(function(F,G){if(C(this).is(":visible")&&C(".view-less-ctrl",this).hasClass("h-hide")){vBulletin.conversation.limitVisiblePollOptionsInAPost(this,3)}})};vBulletin.conversation.limitVisiblePollOptionsInAPost=function(I,H){if(typeof H=="undefined"){H=3}var F=0,G=C("ul.poll li",I),E=parseInt(G.css("line-height"),10);G.each(function(J){C(this).removeClass("h-hide");var K=C(this).height();F+=K/E;if(F>H){C(this).addClass("h-hide")}else{C(this).css("display","")}});if(F>3){C(".view-more-ctrl",I).removeClass("h-hide").next(".action-buttons").addClass("h-hide").next(".view-less-ctrl").addClass("h-hide")}else{C(".view-more-ctrl",I).addClass("h-hide").next(".action-buttons").removeClass("h-hide").next(".view-less-ctrl").addClass("h-hide")}};vBulletin.conversation.bindEditFormEventHandlers=function(L){L=(L)?L.toLowerCase():"";if(C.inArray(L,["text","gallery","video","poll","link","comment"])!=-1||L=="all"){var G=function(Q,P){if(typeof P=="function"){console.log("Edit mode: initializeEditor");var O=Q.find(".js-editor");if(O.length>0){vBulletin.ckeditor.initEditor(O,{success:function(R){if(typeof P=="function"){P();vBulletin.contentEntryBox.afterPanelChange(Q);vBulletin.ckeditor.initEditorComponents(Q);var S=this;window.setTimeout(function(){console.log("Edit mode: Adding post data to CKEditor (vBulletin.conversation.bindEditFormEventHandlers)");S.setData(O.prev(".js-editor-parsed-text").html(),function(){var T=vBulletin.ckeditor.getEditor(R);vBulletin.ckeditor.fixTableFunctionality.call(vBulletin.ckeditor,{},T);T.focus()})},0)}},error:function(S){if(typeof P=="function"){P()}O.prop("disabled",false).removeClass("ckeditor-load-on-focus").closest(".js-content-entry").addClass("b-content-entry--no-ckeditor");var R=O.prev(".js-editor-parsed-text").html();if(R!=""){vBulletin.AJAX({url:vBulletin.getAjaxBaseurl()+"/ajax/api/editor/convertHtmlToBbcode",data:{nodeid:pageData.nodeid,data:R,allowsmilie:1,securitytoken:pageData.securitytoken},success:function(T){if(T&&T.data){O.html(T.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 P=="function"){P();O.focus()}}}};var M=function(Q){var P=Q.find(".js-editor");if(P.length>0){var O=P.attr("id");if(vBulletin.ckeditor.editorExists(O)){vBulletin.ckeditor.destroyEditor(O)}}P.closest("form").remove()};var F=function(){C("body").off("comment_editform_onload").on("comment_editform_onload",function(P,Q,O){if(typeof O=="function"){O();C(".js-editor",Q).focus().filter(".autogrow").elastic().off("blur.elastic")}}).off("comment_editform_onunload").on("comment_editform_onunload",function(O,P){})};var I=function(){C("body").off("text_editform_onload").on("text_editform_onload",function(P,Q,O){G(Q,O)}).off("text_editform_onunload").on("text_editform_onunload",function(O,P){M(P)}).off("text_newcontent_onload").on("text_newcontent_onload",function(O,P){if(P.closest(".conversation-list.stream-view.activity-view").length>0){vBulletin.truncatePostContent(P)}})};var J=function(){C("body").off("poll_editform_onload").on("poll_editform_onload",function(P,Q,O){G(Q,O)}).off("poll_editform_onunload").on("poll_editform_onunload",function(O,P){M(P)}).off("poll_newcontent_onload").on("poll_newcontent_onload",function(O,P){if(P.closest(".conversation-list.stream-view.activity-view").length>0){vBulletin.truncatePostContent(P);vBulletin.conversation.limitVisiblePollOptionsInAPost(C("form.poll",P),3)}})};var H=function(){C("body").off("gallery_editform_onload").on("gallery_editform_onload",function(P,Q,O){C('.b-toolbar__item[data-panel="b-content-entry-panel__content--gallery"]',Q).trigger("click");G(Q,function(){if(typeof O=="function"){O()}vBulletin.upload.initializePhotoUpload(Q)})}).off("gallery_editform_onunload").on("gallery_editform_onunload",function(O,P){M(P)}).off("gallery_editform_onbeforeserialize").on("gallery_editform_onbeforeserialize",function(P,O){O.find(".caption-box").each(function(){var Q=C(this);if(Q.hasClass("placeholder")&&Q.val()==Q.attr("placeholder")){Q.val("")}});return true}).off("gallery_newcontent_onload").on("gallery_newcontent_onload",function(O,P){if(P.closest(".conversation-list.stream-view.activity-view").length>0){vBulletin.truncatePostContent(P)}})};var K=function(){C("body").off("video_editform_onload").on("video_editform_onload",function(P,Q,O){C('.b-toolbar__item[data-panel="b-content-entry-panel__content--video"]',Q).trigger("click");G(Q,function(){if(typeof O=="function"){O()}N(C(".b-content-entry-panel__content--video",Q),"video")});C(".js-attach-button",Q).on("click",function(U){U.preventDefault();var R=C(this),V=R.closest(".b-content-entry-panel__content--video"),T=C(".b-link-input__url",V),S=C.trim(T.val());if(!S){openAlertDialog({title:vBulletin.phrase.get("attach_video"),message:vBulletin.phrase.get("please_enter_video_url"),iconType:"warning",onAfterClose:function(){T.focus()}});return false}R.prop("disabled",true);C(".js-button-group .b-button",V).prop("disabled",true);C("body").css("cursor","wait");C.post(vBulletin.getAjaxBaseurl()+"/link/getlinkdata",{url:S,isAjaxTemplateRender:true},function(X){if(X.error){openAlertDialog({title:vBulletin.phrase.get("attach_video"),message:vBulletin.phrase.get(X.error),iconType:"warning",onAfterClose:function(){T.focus()}})}else{$template=C(X);V.find(".js-panel-content").append($template);N(V,"video");$template.fadeIn("slow",function(){T.val("");C(".b-link-input",V).addClass("h-hide")});var W=Q.closest("form");if($template.find("js-video-url")){W.data("content-type","video")}else{W.data("content-type","link")}}},"json").error(function(Y,X,W){openAlertDialog({title:vBulletin.phrase.get("attach_video"),message:"HTTP {0} - {1}".format(Y.status,W),iconType:"error"})}).complete(function(){C("body").css("cursor","default");R.prop("disabled",false);C(".js-button-group .b-button",V).prop("disabled",false)})})}).off("video_editform_onunload").on("video_editform_onunload",function(O,P){M(P)}).off("video_newcontent_onload").on("video_newcontent_onload",function(O,P){if(P.closest(".conversation-list.stream-view.activity-view").length>0){vBulletin.truncatePostContent(P)}})};var E=function(){C("body").off("link_editform_onload").on("link_editform_onload",function(P,Q,O){C('.b-toolbar__item[data-panel="b-content-entry-panel__content--link"]',Q).trigger("click");G(Q,function(){if(typeof O=="function"){O()}N(C(".b-content-entry-panel__content--link",Q),"link")});C(".js-attach-button",Q).on("click",function(U){U.preventDefault();var R=C(this),V=R.closest(".b-content-entry-panel__content--link"),T=C(".b-link-input__url",V),S=C.trim(T.val());if(!S){openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("please_enter_a_valid_url_and_click_attach"),iconType:"warning",onAfterClose:function(){T.focus()}});return false}if(!S.match(/^https?:\/\//)){S="http://"+S;T.val(S)}R.prop("disabled",true);C(".js-button-group .b-button",V).prop("disabled",true);C("body").css("cursor","wait");C.post(vBulletin.getAjaxBaseurl()+"/link/getlinkdata",{url:S,isAjaxTemplateRender:true},function(Y){if(Y.error){openAlertDialog({title:vBulletin.phrase.get("attach_link"),message:vBulletin.phrase.get(Y.error),iconType:"warning",onAfterClose:function(){T.focus()}})}else{var X=C(Y);X.find("img").error(function(){C(this).closest("li").remove()});V.find(".js-panel-content").append(X);N(V,"link");X.fadeIn("slow",function(){T.val("");C(".b-link-input",V).addClass("h-hide")});var W=Q.closest("form");if(X.find("js-video-url")){W.data("content-type","video")}else{W.data("content-type","link")}}},"json").error(function(Y,X,W){openAlertDialog({title:vBulletin.phrase.get("attach_link"),message:"HTTP {0} - {1}".format(Y.status,W),iconType:"error"})}).complete(function(){C("body").css("cursor","default");R.prop("disabled",false);C(".js-button-group .b-button",V).prop("disabled",false)})})}).off("link_editform_onunload").on("link_editform_onunload",function(O,P){M(P)}).off("link_newcontent_onload").on("link_newcontent_onload",function(O,P){if(P.closest(".conversation-list.stream-view.activity-view").length>0){vBulletin.truncatePostContent(P)}}).off("link_savepost_success").on("link_savepost_success",function(O,P){C(".b-link-input",P).removeClass("h-hide-imp")})};var N=function(P,Q){C(".b-link-content__urlinfo .js-link-edit",P).on("click",function(S){S.preventDefault();var R=C(this).parent().parent();R.addClass("b-link-content__urlinfo-meta--edit-mode");C(".js-link-textbox",R).val(C.trim(C(".b-link-content__urlinfo-text",R).text())).trigger("focus");C(".js-link-save",R).on("click",function(T){T.preventDefault();C(".b-link-content__urlinfo-text",R).text(C(".js-link-textbox",R).val());R.removeClass("b-link-content__urlinfo-meta--edit-mode")})});C(".js-link-remove",P).on("click",function(R){R.preventDefault();C(this).closest(".b-content-entry-panel__content").find(".b-link-input").removeClass("h-hide");C(this).closest(".js-panel-content").empty();C(".b-link-input",P).removeClass("h-hide")});if(Q=="link"){C(".js-link-preview-checkbox",P).off("click").on("click",function(){C(".b-link-content__thumbnail",P)[this.checked?"addClass":"removeClass"]("h-hide")});var O=C(".b-link-thumbnail-list__item",P).length;C(".b-link-thumbnail-list",P).jcarousel({scroll:1,wrap:null,size:O,rtl:C("html").attr("dir")=="rtl",buttonNextCallback:function(T,S,R){if(R){C(".b-thumbnail-nav .b-thumbnail-nav__next-arrow",P).removeClass("b-icon__arrow-right-m--disabled").addClass("b-icon__arrow-right-m--default")}else{C(".b-thumbnail-nav .b-thumbnail-nav__next-arrow",P).addClass("b-icon__arrow-right-m--disabled").removeClass("b-icon__arrow-right-m--default")}},buttonPrevCallback:function(T,S,R){if(R){C(".b-thumbnail-nav .b-thumbnail-nav__prev-arrow",P).removeClass("b-icon__arrow-left-m--disabled").addClass("b-icon__arrow-left-m--default")}else{C(".b-thumbnail-nav .b-thumbnail-nav__prev-arrow",P).addClass("b-icon__arrow-left-m--disabled").removeClass("b-icon__arrow-left-m--default")}},initCallback:function(S,R){if(R=="init"&&O>0){C(".b-thumbnail-nav .b-thumbnail-nav__counter",P).html("1/"+O);C(".b-thumbnail-nav .b-thumbnail-nav__prev-arrow",P).off("click").on("click",function(){if(!C(this).hasClass("b-icon__arrow-left-m--disabled")){C(".jcarousel-container .jcarousel-prev",P).trigger("click")}});C(".b-thumbnail-nav .b-thumbnail-nav__next-arrow",P).off("click").on("click",function(){if(!C(this).hasClass("b-icon__arrow-right-m--disabled")){C(".jcarousel-container .jcarousel-next",P).trigger("click")}})}},itemVisibleInCallback:function(U,S,R,T){if(T=="init"){return false}C(".b-thumbnail-nav .b-thumbnail-nav__counter",P).html(R+"/"+O);C('input[type="radio"]',S).prop("checked",true)},itemFallbackDimension:90})}};switch(L){case"text":I();break;case"comment":F();break;case"poll":J();break;case"gallery":H();break;case"video":K();break;case"link":E();break;case"all":I();F();J();H();K();E();break}}};vBulletin.isScrolledIntoView=function(G,L){var M=false;if(C.isPlainObject(L)&&(L).toString()=="[object Object]"){M=true;L.top=0;L.bottom=0}G=(G instanceof C)?G:C(G);if(G.length==0){return false}var E=C(window).scrollTop(),F=E+C(window).height(),J=G.offset().top,H=J+G.outerHeight(),K=J-E,I=F-H;if(M){L.top=K;L.bottom=I}return(K>=0&&I>=0)};vBulletin.scrollToFixed=function(I){var E=this,F={element:C(),fixedAt:"top",limit:0,triggerOnload:true,zIndex:99},G=("scrollToFixed"+Math.random()).replace(".","");function H(P){F=C.extend({},F,P);if(F.element){F.element=(F.element instanceof C)?F.element:C(F.element);if(F.element.length>0){if(C.inArray(F.fixedAt,["top","bottom"])){F.fixedAt="top"}var M=F.element,J="scrolltofixed",L={width:M.width(),offset:M.offset(),"margin-top":parseInt(M.css("margin-top"),10),"margin-bottom":parseInt(M.css("margin-bottom"),10),cssPosition:M.css("position"),coordinates:{left:M.css("left"),top:M.css("top"),right:M.css("right"),bottom:M.css("bottom")}};if(typeof $Rx!=="undefined"){var K=($Rx&&$Rx.scrollToFixedBreakPoint)?$Rx.scrollToFixedBreakPoint:0;var O=C("
");if(C("#vb-page-body").width()>K){O.addClass("scrolltofixed-filler").hide().insertAfter(M)}}M.data("origOffsetTop",L.offset.top);M.css("z-index",F.zIndex);M.data("object-instance",E);var N=C(window).off("scroll."+G).on("scroll."+G,function(){if(M.is(":hidden")){return }var S=C(this).scrollTop();if(F.limit>0&&S>F.limit&&M.hasClass(J)){M.removeClass(J).css({position:"absolute",left:"auto",right:"auto",top:"auto",bottom:"auto",width:L.width})}else{if((F.limit>0&&S
L.offset.top&&!M.hasClass(J))||(F.limit<=0&&S>L.offset.top&&!M.hasClass(J))){O.css({display:M.css("display"),width:M.outerWidth(true),height:M.outerHeight(true),"float":M.css("float")});if(C("#vb-page-body").width()>K){M.addClass(J).width(L.width).css({left:L.offset.left,right:"auto",width:L.width,top:(F.fixedAt=="top")?0:"auto",bottom:(F.fixedAt=="bottom")?0:"auto",position:""})}var R=L["margin-"+F.fixedAt];if(R){var Q={};Q[F.fixedAt]=-R+"px";M.animate(Q,"fast")}}else{if(S<=L.offset.top&&M.hasClass(J)){O.hide();M.removeClass(J).css({position:"",width:"",left:"",top:"",right:"",bottom:""})}}}}).off("resize."+G).on("resize."+G,function(){M.removeClass(J).width("auto").css({position:"",left:""});L.width=M.width();L.offset=M.offset();C(this).trigger("scroll."+G)});if(F.triggerOnload){N.trigger("scroll."+G)}}}}this.updateLimit=function(J){if(!isNaN(Number(J))){F.limit=J;C(window).trigger("scroll."+G)}};this.addLimit=function(J){if(!isNaN(Number(J))){F.limit+=J;C(window).trigger("scroll."+G)}};this.reset=function(J){H(J)};H(I)};vBulletin.scrollToAnchor=function(I){var G=C(I);console.log("vBulletin.scrollToAnchor() hash: {0}, found: {1}".format(I,G.length));if(G.length>0){var F=G.show().offset().top-2;G.hide();var H=C("html,body"),E=C(".scrolltofixed-floating.scrolltofixed-top"),J=false;if(E.length>0){if(C(".list-container .list-item:first a.anchor"+I).length==1){if(E.hasClass("scrolltofixed")){E.removeClass("scrolltofixed")}F=E.offset().top;J=true}else{if(E.hasClass("scrolltofixed")){F-=E.outerHeight()}}}H.animate({scrollTop:F},1000,function(){if(!J){var L=G.show().offset().top;G.hide();var K=C(".scrolltofixed-floating.scrolltofixed-top.scrolltofixed");L-=(K.length>0)?K.outerHeight():0;H.animate({scrollTop:L},"slow")}C("a.anchor").show()});return false}C("a.anchor").show();return true};if(location.hash){vBulletin.scrollToAnchor(location.hash)}vBulletin.animateScrollTop=function(F,G){console.log("vBulletin.animateScrollTop({0})".format(F));var E=C(".scrolltofixed-floating.scrolltofixed-top");if(E.length>0){var H=E.data("origOffsetTop")||E.offset().top;if(!E.hasClass("scrolltofixed")&&HtruncatedHeight){F.closest(".list-item-body").find(".post-links").removeClass("hide-see-link").find(".see-link").off("click").on("click",function(){var I=C(this);if(I.hasClass("more")){F.removeClass("ellipsis")}else{F.addClass("ellipsis")}I.toggleClass("more less");var H=I.text();I.text(I.data("toggle-text")).data("toggle-text",H);return false})}});C(".list-item .see-link.more").each(function(F){var G=C(this).closest(".list-item"),I=C(G).find(".post-content.restore");if(I.length>0){var L=false,J=false,N=C(this).text(),H="",M=C(I).html(),K=this;C(this).on("click",function(){nodeid=C(G).attr("data-node-id");if(L){C(K).text(N);C(I).html(M);L=false}else{if(J){C(K).text(vBulletin.phrase.get("see_less"));L=true;C(I).html(H)}else{if(!J&&nodeid){C.ajax({url:vBulletin.getAjaxBaseurl()+"/activity/fetchText",data:{nodeid:nodeid},dataType:"json",complete:function(){},success:function(O){if(O&&!O.error&&O.nodeText){H=O.nodeText;if(H.length<=M.length){C(K).addClass("ui-helper-hidden");postLink=C(K).closest(".post-links").html().replace("| ","");C(K).closest(".post-links").html(postLink)}else{C(I).html(O.nodeText);C(K).text(vBulletin.phrase.get("see_less"));console.log("loaded content for node "+nodeid);L=true;J=true;return false}}},error:function(Q,P,O){console.log("Attempt to load text for node "+nodeid+" failed:"+O)}})}}}return false})}})};vBulletin.markreadcheck=function(){if((parseInt(pageData.threadmarking)>0)&&(parseInt(pageData.userid)>0)){return }var E=C.cookie(pageData.cookie_prefix+"lastvisit");if(parseInt(pageData.userid)>0&&(!E||pageData.lastvisit>E)){E=pageData.lastvisit}var F=Math.round(new Date().getTime()/1000),G=F-vBulletin.options.get("markinglimit")*86400;C(".forum-item").each(function(){var I=parseInt(C(this).attr("data-lastcontent")),H=0;if(I<=E){C(this).removeClass("new");return }H=vBulletin.cookie.fetchBbarrayCookie("channel_view",C(this).attr("data-channel-id"));H=H?parseInt(H):0;C(this).toggleClass("new",(I>H))});C(".subforum-item").each(function(){var I=parseInt(C(this).attr("data-lastcontent")),H=0;if(I<=E){C(this).removeClass("new").find(".icon").removeClass("new");return }H=vBulletin.cookie.fetchBbarrayCookie("channel_view",C(this).attr("data-channel-id"));H=H?parseInt(H):0;C(this).toggleClass("new",(I>H)).find(".icon").toggleClass("new",(I>H))});C(".topic-item").each(function(){var I=parseInt(C(this).attr("data-lastcontent")),J=0,H=0,L=0;if(pageData.userid=="0"){if(I<=E){C(this).addClass("read");return }H=vBulletin.cookie.fetchBbarrayCookie("channel_view",C(this).attr("data-channel-id"));H=H?parseInt(H):0;J=vBulletin.cookie.fetchBbarrayCookie("discussion_view",C(this).attr("data-node-id"));J=J?parseInt(J):0;L=Math.max(H,J)}else{L=C(this).attr("data-readtime")?parseInt(C(this).attr("data-readtime")):0;H=C(this).attr("data-channelreadtime")?parseInt(C(this).attr("data-channelreadtime")):0;L=Math.max(L,H,G)}if(I<=L||C(this).hasClass("redirect")){C(this).addClass("read")}else{if(C(this).find(".topic-wrapper .go-to-first-unread").length==0){var K=C(this).find(".topic-wrapper .topic-title").attr("href");if(typeof (K)!="undefined"){K+=(K.indexOf("?")==-1?"?":"&")+"goto=newpost";C(" ").addClass("go-to-first-unread").attr("href",K).attr("title",vBulletin.phrase.get("go_to_first_new_post")).html(" ").prependTo(C(this).find(".topic-wrapper"));C(this).find(".vb-icon-topic-status").attr("title",vBulletin.phrase.get("new_posts"))}}}})};vBulletin.markchannelsread=function(G,H,E){channelids=[];if(parseInt(G)){vBulletin.setChannelRead(G,H)}else{if(pageData.channelid&&parseInt(pageData.channelid)&&parseInt(pageData.threadmarking)>0&&parseInt(pageData.userid)>0){vBulletin.setChannelRead(pageData.channelid,H)}else{channels=C(E).closest(".widget-content").find(".forum-list-container .forum-item");subchannels=C(E).closest(".widget-content").find(".forum-list-container .subforum-item");result=false;var F=function(I,K){var J=parseInt(C(K).attr("data-channel-id"),10);if(J){channelids.push(J)}};C.each(channels,F);C.each(subchannels,F)}}C.each(channelids,function(I,J){if(I>=channelids.length-1){vBulletin.setChannelRead(J,H)}else{vBulletin.setChannelRead(J,[])}})};vBulletin.setChannelRead=function(F,G){var H=Math.round(new Date().getTime()/1000);if(pageData.threadmarking=="0"||!parseInt(pageData.userid)){if(F==0){C.cookie(pageData.cookie_prefix+"lastvisit",H)}else{var E;try{E=C.parseJSON(vBulletin.cookie.convertBbarrayCookie(C.cookie(pageData.cookie_prefix+"channel_view")))||{}}catch(I){E={}}E[F]=H;var J={path:pageData.cookie_path,domain:pageData.cookie_domain};J.expires=365;C.cookie(pageData.cookie_prefix+"channel_view",vBulletin.cookie.convertBbarrayCookie(JSON.stringify(E),"set"),J)}if(G.success&&typeof G.success=="function"){G.success()}}else{C.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/api/node/markChannelsRead",data:{nodeid:F},type:"POST",dataType:"json",complete:function(){},success:function(K){if(K&&!K.error){console.log("Channel "+F+" is marked read successfully!")}if(G.success&&typeof G.success=="function"){G.success(K)}else{console.log("Channel "+F+" is marked read failed: "+K.error)}},error:function(M,L,K){console.log("Channel "+F+" is marked read failed:"+error);openAlertDialog({title:vBulletin.phrase.get("forum"),message:"HTTP {0} - {1}".format(M.status,K),iconType:"error"})}})}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 H=navigator.userAgent.toLowerCase();var F=window.opera;var G={ie:(H.indexOf("trident/")>-1),opera:(!!F&&F.version),webkit:(H.indexOf(" applewebkit/")>-1),air:(H.indexOf(" adobeair/")>-1),mac:(H.indexOf("macintosh")>-1),quirks:(document.compatMode=="BackCompat"&&(!document.documentMode||document.documentMode<10)),mobile:(H.indexOf("mobile")>-1),iOS:/(ipad|iphone|ipod)/.test(H)};G.gecko=(navigator.product=="Gecko"&&!G.webkit&&!G.opera&&!G.ie);if(G.webkit){if(H.indexOf("chrome")>-1){G.chrome=true}else{G.safari=true}}var E=0;if(G.ie){if(G.quirks||!document.documentMode){E=parseFloat(H.match(/msie (\d+)/)[1])}else{E=document.documentMode}G.ie9Compat=E==9;G.ie8Compat=E==8;G.ie7Compat=E==7;G.ie6Compat=E<7||G.quirks}if(G.gecko){var I=H.match(/rv:([\d\.]+)/);if(I){I=I[1].split(".");E=I[0]*10000+(I[1]||0)*100+(I[2]||0)*1}}if(G.opera){E=parseFloat(F.version())}if(G.air){E=parseFloat(H.match(/ adobeair\/(\d+)/)[1])}if(G.webkit){E=parseFloat(H.match(/ applewebkit\/(\d+)/)[1])}var J=!G.mobile&&((G.ie&&E>6)||(G.gecko&&E>=10801)||(G.opera&&E>=9.5)||(G.air&&E>=1)||(G.webkit&&E>=522)||false);return J};vBulletin.ckeditor.fireCallbacks=function(H,F,E,G){if(E=="error"&&typeof F.error=="function"){F.error(H)}if(E=="success"&&typeof F.success=="function"){F.success.apply(G,[H,G])}if(typeof F.complete=="function"){F.complete(H)}};vBulletin.ckeditor.initEditor=function(G,F){F=F||{};G=vBulletin.ckeditor.verifyEditorId(G);console.log("Ckeditor: initEditor({0})".format(G));if(!vBulletin.ckeditor.checkEnvironment()){var E=C("#"+G).closest(".js-content-entry");E.find("li[data-panel=b-content-entry-panel__content--toggle-editor]").addClass("h-hide");E.find("form").append(C(' '));vBulletin.ckeditor.fireCallbacks(G,F,"error");return }if(vBulletin.ckeditor.requiredScriptsLoaded){vBulletin.ckeditor.doInitEditor(G,F)}else{vBulletin.ckeditor.loadScripts(G,F)}};vBulletin.ckeditor.loadScripts=function(G,F,E){if(vBulletin.ckeditor.requiredScriptLoadingStarted){console.warn("Ckeditor: Trying to load required scripts more than once.");return }vBulletin.ckeditor.requiredScriptLoadingStarted=true;F=F||{};G=G||"";if(typeof (F.hideLoadingDialog)!=="undefined"&&!F.hideLoadingDialog){vBulletin.ckeditor.showLoadingDialog(G)}var I=function(){if(F.showError||!vBulletin.ckeditor.requiredScriptsLoadFailed){openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("error_loading_ckeditor_script"),iconType:"warning"})}vBulletin.loadingIndicator.hide();vBulletin.ckeditor.requiredScriptsLoadFailed=true;vBulletin.ckeditor.fireCallbacks(G,F,"error")};var H=function(){if(!vBulletin.ckeditor.requiredScriptsLoadFailed){if(typeof E=="function"){E()}if(typeof vBulletin.ckeditor.doInitEditor=="function"&&window.CKEDITOR){vBulletin.ckeditor.requiredScriptsLoaded=true;vBulletin.ckeditor.doInitEditor(G,F)}else{setTimeout(H,10)}}else{vBulletin.ckeditor.fireCallbacks(G,F,"error");if(!F.hideLoadingDialog){vBulletin.ckeditor.hideLoadingDialog(G)}}};if(typeof vBulletin.ckeditor.doInitEditor!="function"&&!window.CKEDITOR){vBulletin.AJAX({url:vBulletin.getAjaxBaseurl()+"/ajax/render/ckeditor_javascript",success:function(K){var J=[];var L=/src="([^"]+)"/g;while(match=L.exec(K)){J.push(match[1])}var M=function(){if(J.length>0){console.log("Ckeditor: Calling getScript for: {0}".format(J[0]));C.getScript(J[0],function(N,P,O){if(P!="success"){console.warn("Ckeditor: Error loading "+J[0]);I();return false}console.log("Ckeditor: Script loaded: "+J[0]);J.splice(0,1);M()}).fail(function(O,P,N){console.warn("Ckeditor: Error loading script: "+P+" Exception: "+N);I()})}else{H()}};M()},error_phrase:"error_fetching_dialog"})}else{H()}};vBulletin.ckeditor.editorExists=function(E){return false};vBulletin.ckeditor.isEditorEmpty=function(E){return true};vBulletin.ckeditor.resetEditor=function(E){return false};vBulletin.ckeditor.getEditorContent=function(F){F=vBulletin.ckeditor.verifyEditorId(F);if(!F){return false}if(vBulletin.ckeditor.editorExists(F)){var E=vBulletin.ckeditor.getEditor(F);if(E&&E.getData){return C.trim(E.getData())}else{return false}}else{return C.trim(C("#"+F).val())}};vBulletin.ckeditor.focusEditor=function(F){F=vBulletin.ckeditor.verifyEditorId(F);if(!F){return }if(vBulletin.ckeditor.editorExists(F)){var E=vBulletin.ckeditor.getEditor(F);if(E){E.focus()}}else{C("#"+F).focus()}};vBulletin.ckeditor.loadingDialogStack={};vBulletin.ckeditor.showLoadingDialog=function(E){if((typeof vBulletin.ckeditor.loadingDialogStack[E]!="undefined")&&vBulletin.ckeditor.loadingDialogStack[E]){return }vBulletin.ckeditor.loadingDialogStack[E]=true;var F=C("#"+E);if(F.length>0&&F.is(":visible")){F.prop("disabled",true)}window.vBulletin.loadingIndicator.show("vBulletin.ckeditor.showLoadingDialog editorId: "+E)};vBulletin.ckeditor.hideLoadingDialog=function(E){if((typeof vBulletin.ckeditor.loadingDialogStack[E]=="undefined")||!vBulletin.ckeditor.loadingDialogStack[E]){return }vBulletin.ckeditor.loadingDialogStack[E]=false;C("#"+E).prop("disabled",false);window.vBulletin.loadingIndicator.hide("vBulletin.ckeditor.hideLoadingDialog editorId: "+E)};vBulletin.ckeditor.generatedIdCounter=0;vBulletin.ckeditor.verifyEditorId=function(F){F=F||"";if(typeof F=="string"){return F}else{var E=F instanceof C?F:C(F);if(!E.attr("id")){++vBulletin.ckeditor.generatedIdCounter;E.attr("id",("vb-cke-instance-"+vBulletin.ckeditor.generatedIdCounter))}return E.attr("id")}};vBulletin.ckeditor.initEditorComponents=function(F,E){F=F||document;C(function(){C(".js-ckeditor-init-on-focus",F).off("focus").on("focus",function(){vBulletin.ckeditor.initEditor(C(this))});C(".js-ckeditor-init-on-page-load",F).each(function(){vBulletin.ckeditor.initEditor(C(this))});if(E){return }(function(){var I=function(J){return C(".js-content-entry-post-icons option",F).filter(function(){return(C(this).val()==J)}).data("icon-url")};var H=function(J){if(J==0){return C(" ").html(vBulletin.phrase.get("no_icon")).get(0)}var K=I(J);if(K){return C(" ").attr("src",K).attr("alt","").get(0)}else{return""}};C(".js-content-entry-post-icons",F).selectBox().change(function(){var J=C(this).val();C(".js-content-entry-post-icons.selectBox-dropdown .selectBox-label",F).html(H(J))});C(".js-content-entry-post-icons-selectBox-dropdown-menu li a",F).each(function(){var J=C(this).attr("rel");C(this).html(H(J))});C(".js-content-entry-post-icons",F).trigger("change")})();C(".js-content-entry-prefixes",F).selectBox();var G=[];C(".js-select-box",F).each(function(){var H=C(this),I;if(H.is(":hidden")){I=H.closest(".h-hide");G.push(I);I.removeClass("h-hide")}H.selectBox()});C.each(G,function(H,I){I.addClass("h-hide")})})};vBulletin.ckeditor.initEditorComponents(document);C(".js-focus-on-page-load").first().focus();vBulletin.errorAlert=function(F,E){console.log(F,E);openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get(vBulletin.phrase.get(E)),iconType:"error"})};vBulletin.makeErrorAlertCallback=function(F,E){return(function(){vBulletin.errorAlert(F,E)})};vBulletin.AJAX=function(F){var E={type:"post",dataType:"json",title_phrase:"error",error_phrase:"error",element:null};C.extend(E,F);if(!E.error){E.error=vBulletin.makeErrorAlertCallback(E.title_phrase,E.error_phrase)}E.success=function(G){if(!G){vBulletin.errorAlert(E.title_phrase,"invalid_server_response_please_try_again")}else{if(G&&G.errors){var H=G.errors;if(C.isArray(H)&&H.length>0){var I=(C("#debug-information").length==1);if(I){console.log("ERROR:");console.dir(H);if(H[0]&&H[0][0]&&H[0][0]=="exception_trace"&&H[1]&&H[1][0]&&H[1][0]=="errormsg"&&H[0][1]&&H[1][1]){vBulletin.errorAlert(E.title_phrase,H[1][1]+'\n");return false}}H=H[0]}if(H=="inlinemodauth_required"){return vBulletin.inlinemod.openAuthDialog(E.element)}vBulletin.errorAlert(E.title_phrase,["error_x",vBulletin.phrase.get(H)]);if(G.wasNotArray){arguments[0]=arguments[0][0]}return false}else{if(F.success){F.success.apply(this,arguments)}}}};C.ajax(E)};vBulletin.ajaxForm=function(F){var E={dataType:"json",title_phrase:"error",error_phrase:"error",element:null,complete:function(){C(".button[type=submit]",this).prop("disabled",false)},beforeSerialize:function(G){C(".placeholder",G).each(function(){var H=C(this);if(H.val()==H.attr("placeholder")){H.val("")}})},beforeSubmit:function(I,H,G){C(".button[type=submit]",this).prop("disabled",true);return true}};C.extend(E,F);if(!E.error){E.error=vBulletin.makeErrorAlertCallback(E.title_phrase,E.error_phrase)}E.success=function(G){if(G&&G.errors){var H=G.errors;if(C.isArray(H)&&H.length>0){H=H[0]}if(H=="inlinemodauth_required"){return vBulletin.inlinemod.openAuthDialog(E.element)}vBulletin.errorAlert(E.title_phrase,["error_x",vBulletin.phrase.get(H)]);if(G.wasNotArray){arguments[0]=arguments[0][0]}return false}else{if(F.success){F.success.apply(this,arguments)}}};this.ajaxForm(E)};window.openAlertDialog=function(J){var I=C("#alert-dialog");J=J||{};if(!I.data("created")){I.dialog({autoOpen:false,zIndex:10100,modal:true,resizable:false,closeOnEscape:false,showCloseButton:false,dialogClass:"dialog-container alert-dialog-container dialog-box",create:function(){I.data("created",true)}})}I.dialog("option","width",J.width||500);I.dialog("option","title",J.title||"Alert");var F=I.find(".dialog-content");var G=F.find(".message");var E=F.find(".icon");var H=C("#btnAlertDialogOK");if(J.maxHeight){F.css({"max-height":J.maxHeight,overflow:"auto"})}else{F.css({"max-height":"",overflow:""})}if(J.message){G.html(J.message)}E.removeClass(function(K,L){return(L.match(/\S+-icon\b/g)||[]).join(" ")});J.buttonLabel=J.buttonLabel||"OK";H.html(J.buttonLabel);I.off("dialogopen").on("dialogopen",function(){H.off("click").on("click",function(){if(typeof J.onBeforeClose=="function"){J.onBeforeClose.apply(this)}I.dialog("close")}).focus()});I.off("dialogclose").on("dialogclose",function(){if(typeof J.onAfterClose=="function"){J.onAfterClose.apply(H)}});switch(J.iconType){case"warning":E.addClass("warning-icon vb-icon vb-icon-warning");E.show();break;case"error":E.addClass("error-icon vb-icon vb-icon-error");E.show();break;default:E.addClass("no-icon").hide()}I.dialog("open");return I};window.openConfirmDialog=function(L){L=L||{};var H=C("#confirm-dialog");if(!H.data("created")){H.dialog({autoOpen:false,modal:true,resizable:false,closeOnEscape:false,showCloseButton:false,create:function(){H.data("created",true)}})}H.dialog("option","title",L.title||"Confirmation");var G=H.find(".dialog-content");var I=G.find(".message");var F=G.find(".icon");if(L.message){I.html(L.message.replace("\n"," "))}H.dialog("option","width",(L.width?L.width:500));H.dialog("option","dialogClass","dialog-container confirm-dialog-container dialog-box "+(L.dialogClass||""));F.removeClass(function(M,N){return(N.match(/\S+-icon\b/g)||[]).join(" ")});L.buttonLabel=L.buttonLabel||{};L.buttonLabel.yesLabel=L.buttonLabel.yesLabel||vBulletin.phrase.get("yes");L.buttonLabel.noLabel=L.buttonLabel.noLabel||vBulletin.phrase.get("no");var K=C("#btnConfirmDialogYes").html(L.buttonLabel.yesLabel);var E=C("#btnConfirmDialogNo").html(L.buttonLabel.noLabel);if(L.primaryButton=="yes"){K.addClass("primary").removeClass("secondary");E.addClass("secondary").removeClass("primary")}else{E.addClass("primary").removeClass("secondary");K.addClass("secondary").removeClass("primary")}var J;H.off("dialogopen").on("dialogopen",function(){var N=C("#btnConfirmDialogYes").off("click").on("click",function(){J=this;var P,O;if(typeof L.onClickYes=="function"){P=L.onClickYes.apply(this);if(typeof L.onClickYesWithAjax!="undefined"&&L.onClickYesWithAjax){return false}}if(P===false){return false}if(typeof L.onBeforeClose=="function"){O=L.onBeforeClose.apply(this);if(typeof L.onBeforeCloseWithAjax!="undefined"&&L.onBeforeCloseWithAjax){return false}}if(O===false){return false}H.dialog("close")});if(L.defaultFocus=="yes"){N.focus()}var M=C("#btnConfirmDialogNo").off("click").on("click",function(){J=this;if(typeof L.onClickNo=="function"){L.onClickNo.apply(this)}if(typeof L.onBeforeClose=="function"){L.onBeforeClose.apply(this)}H.dialog("close")});if(L.defaultFocus!="yes"){M.focus()}});H.off("dialogclose").on("dialogclose",function(N,M){if(typeof L.onAfterClose=="function"){L.onAfterClose.apply(J)}});switch(L.iconType){case"warning":F.addClass("warning-icon vb-icon vb-icon-warning");F.show();break;case"question":F.addClass("question-icon");F.show();break;default:F.addClass("no-icon").hide()}H.dialog("open");return H};window.openPromptDialog=function(H){var J=C("#prompt-dialog");if(!J.data("created")){J.dialog({autoOpen:false,modal:true,resizable:false,closeOnEscape:false,showCloseButton:false,width:500,dialogClass:"dialog-container prompt-dialog-container dialog-box",create:function(){J.data("created",true)}})}H=H||{};J.dialog("option","title",H.title||"Prompt");var M=J.find(".dialog-content"),I=M.find(".message"),K;if(H.message){I.html(H.message)}var E=H.initialValue||"";if(!H.multiline){K=J.find("input.input-box").val(E).removeClass("h-hide");K.next().addClass("h-hide");if(Number(H.maxlength)){K.attr("maxlength",Number(H.maxlength))}else{K.removeAttr("maxlength")}M.addClass("table");M.find("> div").addClass("td")}else{K=J.find("textarea.input-box").val(E).removeClass("h-hide");K.prev().addClass("h-hide");M.removeClass("table");M.find("> .td").removeClass("td")}H.buttonLabel=H.buttonLabel||{};H.buttonLabel.okLabel=H.buttonLabel.okLabel||"OK";H.buttonLabel.cancelLabel=H.buttonLabel.cancelLabel||"Cancel";var L=C("#btnPromptDialogOK").html(H.buttonLabel.okLabel),G=C("#btnPromptDialogCancel").html(H.buttonLabel.cancelLabel),F;J.off("dialogopen").on("dialogopen",function(){var O=C("#btnPromptDialogOK").off("click").on("click",function(){F=this;var Q=C.trim(K.val()),P,R;if(H.validation&&typeof H.validation=="object"){if(H.validation.override&&typeof H.validation.custom=="function"){if(!H.validation.custom.apply(this,[K])){return false}}else{switch(H.validation.type){case"number":Q=Number(Q);if(isNaN(Q)){if(H.validation.showError){openAlertDialog({title:J.dialog("option","title"),message:"Input must be a number.",iconType:"warning",onAfterClose:function(){K.trigger("select").trigger("focus")}})}else{K.trigger("select").trigger("focus")}return false}if(H.validation.range&&typeof H.validation.range=="object"){if(QH.validation.range.max){if(H.validation.showError){openAlertDialog({title:J.dialog("option","title"),message:"Input must be within "+H.validation.range.min+" - "+H.validation.range.max+" only.",iconType:"warning",onAfterClose:function(){K.trigger("select").trigger("focus")}})}else{K.trigger("select").trigger("focus")}return false}}break;case"string":default:if(!Q){if(H.validation.showError){openAlertDialog({title:J.dialog("option","title"),message:"Input required.",iconType:"warning",onAfterClose:function(){K.trigger("select").trigger("focus")}})}else{K.trigger("select").trigger("focus")}return false}else{if(H.multiline&&Q.length>H.maxlength){if(H.validation.showError){openAlertDialog({title:J.dialog("option","title"),message:"Input too long. Maximum allowed is "+H.maxlength+" characters.",iconType:"warning",onAfterClose:function(){K.trigger("select").trigger("focus")}})}else{K.trigger("select").trigger("focus")}return false}}}if(H.validation.set&&C.isArray(H.validation.set)&&H.validation.set.length>0){if(C.inArray(Q,H.validation.set)==-1){if(H.validation.showError){openAlertDialog({title:J.dialog("option","title"),message:"Input must be one of these: "+H.validation.set.join(", ")+".",iconType:"warning",onAfterClose:function(){K.trigger("select").trigger("focus")}})}else{K.trigger("select").trigger("focus")}return false}}if(typeof H.validation.custom=="function"){if(!H.validation.custom.apply(this,[K])){return false}}}}if(typeof H.onClickOK=="function"){R=H.onClickOK.apply(this,[Q]);if(typeof H.onClickOKWithAjax!="undefined"&&H.onClickOKWithAjax){return false}}if(R===false){return false}if(typeof H.onBeforeClose=="function"){P=H.onBeforeClose.apply(this);if(typeof H.onBeforeCloseWithAjax!="undefined"&&H.onBeforeCloseWithAjax){return false}}if(P===false){return false}J.dialog("close")}).trigger("focus");var N=C("#btnPromptDialogCancel").off("click").on("click",function(){F=this;if(typeof H.onClickCancel=="function"){H.onClickCancel.apply(this)}if(typeof H.onBeforeClose=="function"){H.onBeforeClose.apply(this)}J.dialog("close")})});J.off("dialogclose").on("dialogclose",function(){if(typeof H.onAfterClose=="function"){H.onAfterClose.apply(F);K.val("")}});J.dialog("open");K.trigger("focus");return J};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(E){return C(E).on("reset",function(F,G){if(typeof G=="function"){G()}})};window.vBulletin=window.vBulletin||{};vBulletin.sitebuilder=vBulletin.sitebuilder||{};vBulletin.sitebuilder.toggleSitebuilder=function(E){var F=C(this);if(F.closest("li").hasClass("h-disabled")||F.closest("ul").hasClass("h-disabled")){return true}if(F.hasClass("on")){C.removeCookie(pageData.sb_state_cookie,{path:pageData.cookie_path,domain:pageData.cookie_domain});C("#main-navbar .main-nav").hide();F.removeClass("on");return true}if(C("#main-navbar .main-nav li").length>0){C("#main-navbar .main-nav").show();F.addClass("on");C.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(E,G){E=E||false;function F(){if(typeof G=="function"){return G()}}if(C("#sitebuilder-wrapper").is(".js-sb-loaded")){return F()}vBulletin.AJAX({url:vBulletin.getAjaxBaseurl()+"/ajax/activate-sitebuilder",data:{pageid:pageData.pageid,nodeid:pageData.nodeid,userid:pageData.userid,loadMenu:E},cache:false,isAjaxTemplateRender:true,isAjaxTemplateRenderWithData:true,success:function(H){if(H&&H.templates){if(E){C("head").append(H.templates.css);C("#main-navbar .main-nav").hide().html(H.templates.menu)}C("#sitebuilder-wrapper").prepend(H.templates.main);C("#main-navbar .main-nav").show();C(".edit-switch-container .switch-control").addClass("on");C("#sitebuilder-wrapper").addClass("js-sb-loaded");C.cookie(pageData.sb_state_cookie,"1",{path:pageData.cookie_path,domain:pageData.cookie_domain});return F()}else{console.log("activating sitebuilder failed!");openAlertDialog({title:"Error",message:"Error activating SiteBuilder. Please try again.",iconType:"error"})}}})};vBulletin.sitebuilder.menuClickProxy=function(){var E=this;vBulletin.sitebuilder.loadSitebuilderMarkup(false,function(){C("#main-navbar .sb-menu").off("click",vBulletin.sitebuilder.menuClickProxy);C(E).find("a").click()});return false};setTimeout(function(){if(!C.support.selectstart){C.fn.extend({disableSelection:function(){return this.each(function(){C(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(){C(this).css({"-moz-user-select":"","-webkit-user-select":"","-khtml-user-select":"","-o-user-select":"","user-select":""})})}})}function F(){window.vBulletin.loadingIndicator.init();C(document).off("click","a.animate-scroll").on("click","a.animate-scroll",function(){var R=vBulletin.scrollToAnchor(this.hash);if(R){window.location.href=this.href}return false});var Q=function(R){C(this).closest(".split-button").toggleClass("open").find(".submenu").toggleClass("h-hide");C("body").off("click.buttonset").on("click.buttonset",function(S){if(C(S.target).closest(".split-button").length==0){C(".split-button").removeClass("open").find(".submenu").addClass("h-hide");C("body").off("click.buttonset")}})};C(".split-button .button-text").button().closest(".button-set").find(".button-icon").button({text:false,icons:{primary:"vb-icon vb-icon-triangle-down-wide"}}).on("click",Q).closest(".button-set").buttonset().filter(".one-click").find(".button-text").on("click",Q);C(document).off("click",".canvas-widget .toggle-button").on("click",".canvas-widget .toggle-button",function(U,R){var T=C(this),V=T.closest(".canvas-widget");if(T.hasClass("expand")){if(R){C(".widget-content",V).show()}else{C(".widget-content",V).slideDown("slow")}V.removeClass("collapsed")}else{if(R){C(".widget-content",V).hide()}else{C(".widget-content",V).slideUp("slow")}V.addClass("collapsed")}T.toggleClass("collapse expand");var S=T.attr("title");T.attr("title",T.data("toggle-title")).data("toggle-title",S);return false});C(".conversation-toolbar-wrapper form.toolbar-filter-overlay").trigger("reset");var O=!!("placeholder" in document.createElement("input"));if(!O){var N=C("input[placeholder], textarea[placeholder]");N.filter(":focus").addClass("js-temp-focus").blur();N.placeholder();var P=function(S){var R=N.filter(".js-temp-focus").focus();if(S){R.removeClass("js-temp-focus")}};C(window).on("load.placeholder_temp",function(){P(true);C(window).off("load.placeholder_temp")});P()}if(C("textarea.autogrow").length>0){C("textarea.autogrow").elastic().off("blur.elastic")}C(".edit-switch-container .switch-control").on("mousedown",vBulletin.sitebuilder.toggleSitebuilder);C("#main-navbar .lnkAdminCP").removeClass("h-disabled");C("#main-navbar .sb-menu").removeClass("h-disabled").on("click",vBulletin.sitebuilder.menuClickProxy);C("select.custom-dropdown").selectBox();C(document).off("keypress",".js-button").on("keypress",".js-button",function(R){if(R.which==32||R.which==13){if(R.target&&R.target.nodeName&&(R.target.nodeName+"").toLowerCase()=="label"&&C(R.target).find("input").length==1){C(R.target).find("input").trigger("click")}else{C(this).trigger("click")}R.preventDefault()}});C(document).off("keypress",".js-link").on("keypress",".js-link",function(R){if(R.which==13){C(this).trigger("click");R.preventDefault()}});C(".js-debug-collapse-list").next("ol, ul").hide();C(document).off("click",".js-debug-collapse-list").on("click",".js-debug-collapse-list",function(R){C(this).next("ol, ul").toggle()});C(document).off("click",".js-toggle-slider").on("click",".js-toggle-slider",function(){var U=C(this);if(U.is(".b-toggle-slider--yes")){U.removeClass("b-toggle-slider--yes").addClass("b-toggle-slider--no");U.find(".b-toggle-slider__radio--no").prop("checked",true);U.data("value","0")}else{U.removeClass("b-toggle-slider--no").addClass("b-toggle-slider--yes");U.find(".b-toggle-slider__radio--yes").prop("checked",true);U.data("value","1")}var T=C(".js-toggle-slider, .js-toggle-slider__dependent"),R=T.index(U),S=false;T.each(function(V,W){if(V==R){S=true}else{if(S==true){var X=C(this);if(X.is(".js-toggle-slider__dependent")){X.toggleClass("h-hide")}else{S=false;return false}}}});U.trigger("change",U.data("value"));return false});C(".js-select-box").selectBox();C(".mainmenu li:has(.submenu)").on("click",function(R){C(".submenu",this).show();return false}).hover(function(){},function(R){C(".submenu",this).hide()});C(".mainmenu.textControls li").on("click",function(R){if(C(".tagCtrl",this).length==0){C("#tag-dialog").hide()}});C(".mainmenu .submenu li a").on("click",function(R){C(this).closest(".submenu").hide()});C(".channel-content-widget .new-conversation-btn").off("click").on("click",function(){window.location.href=pageData.baseurl+"/new-content/"+pageData.channelid});C(".pagenav-form").submit(function(){if(Number(this.page.value)>0){location.href=this.action+"&p="+this.page.value}return false}).trigger("reset");C(".toolbar-pagenav").off("keydown",".toolbar-pagenav input").on("keydown",".toolbar-pagenav input",function(S){var R=S.which;if(!S.shiftKey&&!S.altKey&&!S.ctrlKey&&((R>=48&&R<=57)||(R>=96&&R<=105)||R==8||R==9||R==13||R==35||R==36||R==37||R==39||R==46||R==45)){return true}return false});C(document).off("click",".js-post__manage").on("click",".js-post__manage",function(){if(typeof vBulletin.inlinemod=="undefined"){var S=vBulletin.getAjaxBaseurl()+"/js/inlinemod.js?v="+pageData.simpleversion,R=this;C.getScript(S,function(){vBulletin.inlinemod.manage_deleted_form.apply(R)}).error(function(){openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("error_loading_inlinemod_script"),iconType:"warning"})})}else{vBulletin.inlinemod.manage_deleted_form.apply(this)}});C(document).off("click",".js-post__show-hide").on("click",".js-post__show-hide",function(){var T=C(this),S=T.text(),R=T.data("toggle-text");if(T.hasClass("js-post__show-hide--show")){T.closest(".js-post").addClass("b-post--show-deleted-content");T.html(R).data("toggle-text",S).removeClass("js-post__show-hide--show")}else{T.closest(".js-post").removeClass("b-post--show-deleted-content");T.html(R).data("toggle-text",S).addClass("js-post__show-hide--show")}});C(document).off("click","a.video-frame").on("click","a.video-frame",function(T){T.preventDefault();var S={code:this.getAttribute("data-vcode"),provider:this.getAttribute("data-vprovider")};if(this.getAttribute("data-height")){S.height=this.getAttribute("data-height")}if(this.getAttribute("data-width")){S.width=this.getAttribute("data-width")}var R=C(this);C.get(vBulletin.getAjaxBaseurl()+"/ajax/render/bbcode_video",S,function(U){if(U){R.replaceWith(U)}},"json")});vBulletin.markreadcheck();C(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()},failed:function(){openAlertDialog({title:vBulletin.phrase.get("forum"),message:"Mark Channels Read failed: {0}".format(result),iconType:"error"})}},C(this));return false});C(".js-footer-go-to-top").off("click").on("click",function(R){R.preventDefault();C("body,html").animate({scrollTop:0},800)})}function G(){window.clearTimeout(N);if(pageData.securitytoken!="guest"){var N=window.setTimeout(G,3600000);C.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/replace-securitytoken",data:{securitytoken:pageData.securitytoken},type:"POST",dataType:"json",success:function(P){if(P&&!P.error){var O=0;L(P.newtoken)}else{console.log("/ajax/replace-securitytoken, error: "+error);if(++O==3){L("guest")}}},error:function(Q,P,O){console.log("/ajax/replace-securitytoken, error: "+O);if(++J==3){L("guest")}}})}}function L(N){if(N==""){return }C("form").each(function(){var O=C(this);if(typeof (this.method)!="undefined"&&this.method.toLowerCase()=="post"){if(O.find('input[name="securitytoken"]').length){O.find('input[name="securitytoken"]').val(N)}else{O.append(' ')}}});pageData.securitytoken=N;console.log("Securitytoken updated")}function M(){if(typeof (pageData.adminAction)!="undefined"){vBulletin.assertUserHasAdminPermission("canusesitebuilder",self,function(){},function(){window.location.reload()})}if(vBulletin.options.get("crontab")){if(pageData.nextcron<=pageData.current_server_datetime){vBulletin.loadingIndicator.suppressNextAjaxIndicator();C.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/api/cron/run",type:"POST",dataType:"json",success:function(N){if(N&&N.errors){console.warn("Cron error: "+vBulletin.phrase.get(N.errors[0][0]))}console.log("Cron run successfully.")},error:function(P,O,N){console.warn("Error when running cron: {0}".format(N))}})}else{}}}F();C("#searchPopupControl").on("click",function(N){if(C(this).hasClass("open")){C(this).removeClass("open");C("#searchPopupContent").hide()}else{C(this).addClass("open");C("#searchPopupContent").show()}});C("html").on("click",function(N){if(C(N.target).closest("#searchForm").size()==0&&C("#searchPopupControl").hasClass("open")){C("#searchPopupControl").removeClass("open");C("#searchPopupContent").hide()}});C("#btnAdvSearch").off("click").on("click",function(O){O.preventDefault();C(this).data("clicked2submit",1);var N=C("#searchForm");C(' ').appendTo(N);N.submit()});C("#searchForm").off("submit.searchform").on("submit.searchform",function(R){var T={},P=C("#q");if(C.trim(P.val()).length>0){T.keywords=C.trim(P.val())}else{if(!C("#btnAdvSearch").data("clicked2submit")){openAlertDialog({title:vBulletin.phrase.get("search"),message:vBulletin.phrase.get("please_provide_search_string"),iconType:"warning",onAfterClose:function(){C("#searchForm #q").focus()}});R.stopPropagation();return false}}var O=C(this).find("#searchPopupContent"),S=O.find(".searchFields_title_only");if(S.size()>0&&S.prop("checked")){T.title_only=1}var N=O.find(".searchFields_author");if(N.size()>0&&N.prop("checked")){T.author=[N.val()]}var Q=O.find(".searchFields_channel");if(Q.size()>0&&Q.prop("checked")){T.channel=[Q.val()]}O.find("input[name=searchJSON]").val(JSON.stringify(T));return true});C(".history-backbutton").off("click").on("click",function(N){history.back()});C(".popupControl[popup-body]").off("click").on("click",function(O){var P=C(this).attr("popup-body");if(!P){return false}var N=C(this).parent().find("."+P);if(!N){return false}C(N).toggleClass("h-hide")});var I;if(!(I=C.cookie(pageData.cookie_prefix+"np_notices_displayed"))){I=new Array()}if(!(I instanceof Array)){I=new Array(I)}C('ul.notices li[data-notice-persistent="0"]').each(function(N){I.push(C(this).attr("data-notice-id"))});if(I.length>0){C.cookie(pageData.cookie_prefix+"np_notices_displayed",I,{path:pageData.cookie_path,domain:pageData.cookie_domain})}else{C.cookie(pageData.cookie_prefix+"np_notices_displayed",null,{path:pageData.cookie_path,domain:pageData.cookie_domain})}C("ul.notices > li > .close").off("click").on("click",function(N){var P=C(this).closest("li"),O=P.attr("data-notice-id");C("body").css("cursor","wait");C.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/api/notice/dismiss",data:{noticeid:O},type:"POST",dataType:"json",complete:function(){C("body").css("cursor","auto")},success:function(Q){if(Q&&!Q.error){console.log("Notice dismissed successfully!");P.hide("slow",function(){if(C(this).parent().find(">li:visible").length==0){C(this).parent().addClass("h-hide")}})}},error:function(S,R,Q){console.log("Notice dismissed failed! error:"+Q);openAlertDialog({title:"Error",message:"Error dismissing the notice.",iconType:"error"})}})});C("#frmActivateuser").ajaxForm({dataType:"json",beforeSubmit:function(Q,P,O){var N="",R="";if(C.trim(C(".username",P).val())==""){N=vBulletin.phrase.get("please_enter_a_username");R=".username"}else{if(C.trim(C(".activateid",P).val())==""){N=vBulletin.phrase.get("requiredfieldmissing",vBulletin.phrase.get("activation_code"));R=".activateid"}}if(N){openAlertDialog({title:vBulletin.phrase.get("error"),message:N,iconType:"warning",onAfterClose:function(){C(R,P).focus()}});return false}return true},success:function(P,R,S,O){if(P&&P.response&&P.response.errors){var T=[];for(var N in P.response.errors){if(P.response.errors[N][0]!="exception_trace"&&P.response.errors[N][0]!="errormsg"){T.push(vBulletin.phrase.get(P.response.errors[N]))}}openAlertDialog({title:vBulletin.phrase.get("error"),message:T.join(" "),iconType:"warning",onAfterClose:function(){vBulletin.hv.reset(true)}})}else{var Q=P.response.msg_params;Q.unshift(P.response.msg);openAlertDialog({title:vBulletin.phrase.get("activate_your_account"),message:vBulletin.phrase.get.apply(vBulletin.phrase,Q),onAfterClose:function(){window.location.href=pageData.baseurl}})}}});C("#frmActivateemail").ajaxForm({dataType:"json",beforeSubmit:function(Q,P,O){var N="",R="";if(C.trim(C(".email",P).val())==""){N=vBulletin.phrase.get("please_enter_your_email_address")}else{if(!isValidEmailAddress(C(".email",P).val())){N=vBulletin.phrase.get("invalid_email_address")}}if(N){openAlertDialog({title:vBulletin.phrase.get("error"),message:N,iconType:"warning",onAfterClose:function(){C(R,P).focus()}});return false}return true},success:function(P,R,S,O){if(P&&P.response&&P.response.errors){var T=[];for(var N in P.response.errors){if(P.response.errors[N][0]!="exception_trace"&&P.response.errors[N][0]!="errormsg"){T.push(vBulletin.phrase.get(P.response.errors[N]))}}openAlertDialog({title:vBulletin.phrase.get("error"),message:T.join(" "),iconType:"warning",onAfterClose:function(){vBulletin.hv.reset(true)}})}else{var Q=P.response.msg_params;Q.unshift(P.response.msg);openAlertDialog({title:vBulletin.phrase.get("email_activation_codes"),message:vBulletin.phrase.get.apply(vBulletin.phrase,Q),onAfterClose:function(){window.location.href=pageData.baseurl}})}}});var K=C.cookie(pageData.cookie_prefix+"userstyleid");if(K){C(".stylechooser").val(K)}C(".stylechooser").change(function(){var N=C("option:selected",C(this)).val(),O=new Date();O.setDate(O.getDate()+365);C.cookie(pageData.cookie_prefix+"userstyleid",N,{path:pageData.cookie_path,domain:pageData.cookie_domain,expires:O});window.location.reload()});var E=C.cookie(pageData.cookie_prefix+"languageid");if(E){C(".languagechooser").val(E)}C(".languagechooser").change(function(){var N=C("option:selected",C(this)).val(),O=new Date();O.setDate(O.getDate()+365);C.cookie(pageData.cookie_prefix+"languageid",N,{path:pageData.cookie_path,domain:pageData.cookie_domain,expires:O});window.location.reload()});C("a.navbar_profile").on("click",function(){if(pageData.userid=="0"){C("#lnkLoginSignupMenu").click();return false}});L(pageData.securitytoken);var H=window.setTimeout(G,3600000),J=0;if(!vBulletin.ckeditor.checkEnvironment()){C(".b-content-entry").find("li[data-panel=b-content-entry-panel__content--toggle-editor]").addClass("h-hide")}setTimeout(M,5)},1);vBulletin.getQueryString=function(F){if(F==""){return{}}var E={};for(var G=0;G0){A=$("
").text(B).html()}A=String(A).replace(/"/g,""");return A}function showPhotoDialog(A){$("#gallery_dialog"+A).dialog()}function displayPositionedPopup(E){if(E.dialog){E.dialog=$(E.dialog)}if(!E.dialog||E.dialog.size()==0){E.dialog=$("
").html(''+E.title+' x
').addClass("custom-dialog").css("z-index",1100).appendTo(document.body);if(E.className){E.dialog.addClass(E.className)}if(E.width){E.dialog.css("width",E.width)}if(typeof E.id=="string"){E.dialog.prop("id",E.id)}E.dialog.find(".btnClose").on("click",function(){E.dialog.fadeOut();return false})}if(E.content){if(typeof E.content=="string"){E.dialog.find(".content").html(E.content);if(typeof E.loaded=="function"){E.loaded(E)}E.dialog.show()}else{if(typeof E.content=="function"){E.dialog.find(".content").html('Loading... ');E.dialog.show();window.setTimeout(function(){E.content(E)},1)}}}var A=$("#wrapper").offset(),D=$("#wrapper").outerWidth(),N=$(E.target).offset(),K=$(E.target).outerWidth(),I=$(E.target).outerHeight(),F=E.dialog.outerWidth(),M=E.dialog.find(".arrow"),H=M.outerWidth(),L=M.outerHeight(),C=F-M.position().left-H,B=N.left+(K/2)-F+C+(H/2)-2;if(B0){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,"&").replace(//g,">").replace(/'"'/g,""")};window.vBulletin.htmlEntities_decode=function(A){return String(A).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/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)};;
// ***************************
// js.compressed/jquery/jquery.history.min.js
// ***************************
/**
* History.js jQuery Adapter and History.js Core
* @author Benjamin Arthur Lupton
* @copyright 2010-2011 Benjamin Arthur Lupton
* @license New BSD License
*
* ============ NOTE: This version contains patch from https://github.com/christanto/history.js/commit/b78af84fc2b6b5da573e5ee0bd72f4213e36bb18 ============
*/
(function(b,d){"use strict";var a=b.History=b.History||{},c=b.jQuery;if(typeof a.Adapter!=="undefined"){throw new Error("History.js Adapter has already been loaded...")}a.Adapter={bind:function(e,f,g){c(e).bind(f,g)},trigger:function(f,g,e){c(f).trigger(g,e)},extractEventData:function(g,h,f){var e=(h&&h.originalEvent&&h.originalEvent[g])||(f&&f[g])||d;return e},onDomLoad:function(e){c(e)}};if(typeof a.init!=="undefined"){a.init()}})(window);(function(g,a){"use strict";var d=g.console||a,i=g.document,l=g.navigator,k=g.sessionStorage||false,c=g.setTimeout,j=g.clearTimeout,e=g.setInterval,n=g.clearInterval,m=g.JSON,h=g.alert,b=g.History=g.History||{},f=g.history;m.stringify=m.stringify||m.encode;m.parse=m.parse||m.decode;if(typeof b.init!=="undefined"){throw new Error("History.js Core has already been loaded...")}b.init=function(){if(typeof b.Adapter==="undefined"){return false}if(typeof b.initCore!=="undefined"){b.initCore()}if(typeof b.initHtml4!=="undefined"){b.initHtml4()}return true};b.initCore=function(){if(typeof b.initCore.initialized!=="undefined"){return false}else{b.initCore.initialized=true}b.options=b.options||{};b.options.hashChangeInterval=b.options.hashChangeInterval||100;b.options.safariPollInterval=b.options.safariPollInterval||500;b.options.doubleCheckInterval=b.options.doubleCheckInterval||500;b.options.storeInterval=b.options.storeInterval||1000;b.options.busyDelay=b.options.busyDelay||250;b.options.debug=b.options.debug||false;b.options.initialTitle=b.options.initialTitle||i.title;b.options.transformHash=b.options.transformHash||true;b.intervalList=[];b.clearAllIntervals=function(){var r,q=b.intervalList;if(typeof q!=="undefined"&&q!==null){for(r=0;r ")&&s[0]){}return(r>4)?r:false})();return q};b.isInternetExplorer=function(){var q=b.isInternetExplorer.cached=(typeof b.isInternetExplorer.cached!=="undefined")?b.isInternetExplorer.cached:Boolean(b.getInternetExplorerMajorVersion());return q};b.emulated={pushState:!Boolean(g.history&&g.history.pushState&&g.history.replaceState&&!((/ Mobile\/([1-7][a-z]|(8([abcde]|f(1[0-8]))))/i).test(l.userAgent)||(/AppleWebKit\/5([0-2]|3[0-2])/i).test(l.userAgent))),hashChange:Boolean(!(("onhashchange" in g)||("onhashchange" in i))||(b.isInternetExplorer()&&b.getInternetExplorerMajorVersion()<8))};b.enabled=!b.emulated.pushState;b.bugs={setHash:Boolean(!b.emulated.pushState&&l.vendor==="Apple Computer, Inc."&&/AppleWebKit\/5([0-2]|3[0-3])/.test(l.userAgent)),safariPoll:Boolean(!b.emulated.pushState&&l.vendor==="Apple Computer, Inc."&&/AppleWebKit\/5([0-2]|3[0-3])/.test(l.userAgent)),ieDoubleCheck:Boolean(b.isInternetExplorer()&&b.getInternetExplorerMajorVersion()<8),hashEscape:Boolean(b.isInternetExplorer()&&b.getInternetExplorerMajorVersion()<7)};b.isEmptyObject=function(r){for(var q in r){return false}return true};b.cloneObject=function(s){var r,q;if(s){r=m.stringify(s);q=m.parse(r)}else{q={}}return q};b.getRootUrl=function(){var q=i.location.protocol+"//"+(i.location.hostname||i.location.host);if(i.location.port||false){q+=":"+i.location.port}q+="/";return q};b.getBaseHref=function(){var q=i.getElementsByTagName("base"),s=null,r="";if(q.length===1){s=q[0];r=s.href.replace(/[^\/]+$/,"")}r=r.replace(/\/+$/,"");if(r){r+="/"}return r};b.getBaseUrl=function(){var q=b.getBaseHref()||b.getBasePageUrl()||b.getRootUrl();return q};b.getPageUrl=function(){var q=b.getState(false,false),s=(q||{}).url||i.location.href,r;r=s.replace(/\/+$/,"").replace(/[^\/]+$/,function(v,u,t){return(/\./).test(v)?v:v+"/"});return r};b.getBasePageUrl=function(){var q=i.location.href.replace(/[#\?].*/,"").replace(/[^\/]+$/,function(t,s,r){return(/[^\/]$/).test(t)?"":t}).replace(/\/+$/,"")+"/";return q};b.getFullUrl=function(r,t){var q=r,s=r.substring(0,1);t=(typeof t==="undefined")?true:t;if(/[a-z]+\:\/\//.test(r)){}else{if(s==="/"){q=b.getRootUrl()+r.replace(/^\/+/,"")}else{if(s==="#"){q=b.getPageUrl().replace(/#.*/,"")+r}else{if(s==="?"){q=b.getPageUrl().replace(/[\?#].*/,"")+r}else{if(t){q=b.getBaseUrl()+r.replace(/^(\.\/)+/,"")}else{q=b.getBasePageUrl()+r.replace(/^(\.\/)+/,"")}}}}}return q.replace(/\#$/,"")};b.getShortUrl=function(s){var r=s,t=b.getBaseUrl(),q=b.getRootUrl();if(b.emulated.pushState){r=r.replace(t,"")}r=r.replace(q,"/");if(b.isTraditionalAnchor(r)){r="./"+r}r=r.replace(/^(\.\/)+/g,"./").replace(/\#$/,"");return r};b.store={};b.idToState=b.idToState||{};b.stateToId=b.stateToId||{};b.urlToId=b.urlToId||{};b.storedStates=b.storedStates||[];b.savedStates=b.savedStates||[];b.normalizeStore=function(){b.store.idToState=b.store.idToState||{};b.store.urlToId=b.store.urlToId||{};b.store.stateToId=b.store.stateToId||{}};b.getState=function(s,r){if(typeof s==="undefined"){s=true}if(typeof r==="undefined"){r=true}var q=b.getLastSavedState();if(!q&&r){q=b.createStateObject()}if(s){q=b.cloneObject(q);q.url=q.cleanUrl||q.url}return q};b.getIdByState=function(q){var s=b.extractId(q.url),r;if(!s){r=b.getStateString(q);if(typeof b.stateToId[r]!=="undefined"){s=b.stateToId[r]}else{if(typeof b.store.stateToId[r]!=="undefined"){s=b.store.stateToId[r]}else{while(true){s=(new Date()).getTime()+String(Math.random()).replace(/\D/g,"");if(typeof b.idToState[s]==="undefined"&&typeof b.store.idToState[s]==="undefined"){break}}b.stateToId[r]=s;b.idToState[s]=q}}}return s};b.normalizeState=function(r){var s,q;if(!r||(typeof r!=="object")){r={}}if(typeof r.normalized!=="undefined"){return r}if(!r.data||(typeof r.data!=="object")){r.data={}}s={};s.normalized=true;s.title=r.title||"";s.url=b.getFullUrl(b.unescapeString(r.url||i.location.href));s.hash=b.getShortUrl(s.url);s.data=b.cloneObject(r.data);s.id=b.getIdByState(s);s.cleanUrl=s.url.replace(/\??\&_suid.*/,"");s.url=s.cleanUrl;q=!b.isEmptyObject(s.data);if(s.title||q){s.hash=b.getShortUrl(s.url).replace(/\??\&_suid.*/,"");if(!/\?/.test(s.hash)){s.hash+="?"}s.hash+="&_suid="+s.id}s.hashedUrl=b.getFullUrl(s.hash);if((b.emulated.pushState||b.bugs.safariPoll)&&b.hasUrlDuplicate(s)){s.url=s.hashedUrl}return s};b.createStateObject=function(s,t,r){var q={data:s,title:t,url:r};q=b.normalizeState(q);return q};b.getStateById=function(r){r=String(r);var q=b.idToState[r]||b.store.idToState[r]||a;return q};b.getStateString=function(r){var q,s,t;q=b.normalizeState(r);s={data:q.data,title:r.title,url:r.url};t=m.stringify(s);return t};b.getStateId=function(r){var q,s;q=b.normalizeState(r);s=q.id;return s};b.getHashByState=function(r){var q,s;q=b.normalizeState(r);s=q.hash;return s};b.extractId=function(s){var t,r,q;r=/(.*)\&_suid=([0-9]+)$/.exec(s);q=r?(r[1]||s):s;t=r?String(r[2]||""):"";return t||false};b.isTraditionalAnchor=function(r){var q=!(/[\/\?\.]/.test(r));return q};b.extractState=function(t,s){var q=null,u,r;s=s||false;u=b.extractId(t);if(u){q=b.getStateById(u)}if(!q){r=b.getFullUrl(t);u=b.getIdByUrl(r)||false;if(u){q=b.getStateById(u)}if(!q&&s&&!b.isTraditionalAnchor(t)){q=b.createStateObject(null,null,r)}}return q};b.getIdByUrl=function(q){var r=b.urlToId[q]||b.store.urlToId[q]||a;return r};b.getLastSavedState=function(){return b.savedStates[b.savedStates.length-1]||a};b.getLastStoredState=function(){return b.storedStates[b.storedStates.length-1]||a};b.hasUrlDuplicate=function(s){var r=false,q;q=b.extractState(s.url);r=q&&q.id!==s.id;return r};b.storeState=function(q){b.urlToId[q.url]=q.id;b.storedStates.push(b.cloneObject(q));return q};b.isLastSavedState=function(t){var s=false,r,q,u;if(b.savedStates.length){r=t.id;q=b.getLastSavedState();u=q.id;s=(r===u)}return s};b.saveState=function(q){if(b.isLastSavedState(q)){return false}b.savedStates.push(b.cloneObject(q));return true};b.getStateByIndex=function(r){var q=null;if(typeof r==="undefined"){q=b.savedStates[b.savedStates.length-1]}else{if(r<0){q=b.savedStates[b.savedStates.length+r]}else{q=b.savedStates[r]}}return q};b.getHash=function(){var q=b.unescapeHash(i.location.hash);return q};b.unescapeString=function(s){var q=s,r;while(true){r=g.unescape(q);if(r===q){break}q=r}return q};b.unescapeHash=function(r){var q=b.normalizeHash(r);q=b.unescapeString(q);return q};b.normalizeHash=function(r){var q=r.replace(/[^#]*#/,"").replace(/#.*/,"");return q};b.setHash=function(u,r){var q,s,t;if(r!==false&&b.busy()){b.pushQueue({scope:b,callback:b.setHash,args:arguments,queue:r});return false}q=b.escapeHash(u);b.busy(true);s=b.extractState(u,true);if(s&&!b.emulated.pushState){b.pushState(s.data,s.title,s.url,false)}else{if(i.location.hash!==q){if(b.bugs.setHash){t=b.getPageUrl();b.pushState(null,null,t+"#"+q,false)}else{i.location.hash=q}}}return b};b.escapeHash=function(r){var q=b.normalizeHash(r);q=g.escape(q);if(!b.bugs.hashEscape){q=q.replace(/\%21/g,"!").replace(/\%26/g,"&").replace(/\%3D/g,"=").replace(/\%3F/g,"?")}return q};b.getHashByUrl=function(q){var r=String(q).replace(/([^#]*)#?([^#]*)#?(.*)/,"$2");r=b.unescapeHash(r);return r};b.setTitle=function(s){var t=s.title,r;if(!t){r=b.getStateByIndex(0);if(r&&r.url===s.url){t=r.title||b.options.initialTitle}}try{i.getElementsByTagName("title")[0].innerHTML=t.replace("<","<").replace(">",">").replace(" & "," & ")}catch(q){}i.title=t;return b};b.queues=[];b.busy=function(r){if(typeof r!=="undefined"){b.busy.flag=r}else{if(typeof b.busy.flag==="undefined"){b.busy.flag=false}}if(!b.busy.flag){j(b.busy.timeout);var q=function(){var t,s,u;if(b.busy.flag){return}for(t=b.queues.length-1;t>=0;--t){s=b.queues[t];if(s.length===0){continue}u=s.shift();b.fireQueueItem(u);b.busy.timeout=c(q,b.options.busyDelay)}};b.busy.timeout=c(q,b.options.busyDelay)}return b.busy.flag};b.busy.flag=false;b.fireQueueItem=function(q){return q.callback.apply(q.scope||b,q.args||[])};b.pushQueue=function(q){b.queues[q.queue||0]=b.queues[q.queue||0]||[];b.queues[q.queue||0].push(q);return b};b.queue=function(r,q){if(typeof r==="function"){r={callback:r}}if(typeof q!=="undefined"){r.queue=q}if(b.busy()){b.pushQueue(r)}else{b.fireQueueItem(r)}return b};b.clearQueue=function(){b.busy.flag=false;b.queues=[];return b};b.stateChanged=false;b.doubleChecker=false;b.doubleCheckComplete=function(){b.stateChanged=true;b.doubleCheckClear();return b};b.doubleCheckClear=function(){if(b.doubleChecker){j(b.doubleChecker);b.doubleChecker=false}return b};b.doubleCheck=function(q){b.stateChanged=false;b.doubleCheckClear();if(b.bugs.ieDoubleCheck){b.doubleChecker=c(function(){b.doubleCheckClear();if(!b.stateChanged){q()}return true},b.options.doubleCheckInterval)}return b};b.safariStatePoll=function(){var r=b.extractState(i.location.href),q;if(!b.isLastSavedState(r)){q=r}else{return}if(!q){q=b.createStateObject()}b.Adapter.trigger(g,"popstate");return b};b.back=function(q){if(q!==false&&b.busy()){b.pushQueue({scope:b,callback:b.back,args:arguments,queue:q});return false}b.busy(true);b.doubleCheck(function(){b.back(false)});f.go(-1);return true};b.forward=function(q){if(q!==false&&b.busy()){b.pushQueue({scope:b,callback:b.forward,args:arguments,queue:q});return false}b.busy(true);b.doubleCheck(function(){b.forward(false)});f.go(1);return true};b.go=function(r,q){var s;if(r>0){for(s=1;s<=r;++s){b.forward(q)}}else{if(r<0){for(s=-1;s>=r;--s){b.back(q)}}else{throw new Error("History.go: History.go requires a positive or negative integer passed.")}}return b};if(b.emulated.pushState){var p=function(){};b.pushState=b.pushState||p;b.replaceState=b.replaceState||p}else{b.onPopState=function(t,q){var v=false,u=false,s,r;b.doubleCheckComplete();s=b.getHash();if(s){r=b.extractState(s||i.location.href,true);if(b.options.transformHash&&r){b.replaceState(r.data,r.title,r.url,false)}else{b.Adapter.trigger(g,"anchorchange");b.busy(false)}b.expectedStateId=false;return false}v=b.Adapter.extractEventData("state",t,q)||false;if(v){u=b.getStateById(v)}else{if(b.expectedStateId){u=b.getStateById(b.expectedStateId)}else{u=b.extractState(i.location.href)}}if(!u){u=b.createStateObject(null,null,i.location.href)}b.expectedStateId=false;if(b.isLastSavedState(u)){b.busy(false);return false}b.storeState(u);b.saveState(u);b.setTitle(u);b.Adapter.trigger(g,"statechange");b.busy(false);return true};b.Adapter.bind(g,"popstate",b.onPopState);b.pushState=function(s,u,r,q){if(b.getHashByUrl(r)&&b.emulated.pushState){throw new Error("History.js does not support states with fragment-identifiers (hashes/anchors).")}if(q!==false&&b.busy()){b.pushQueue({scope:b,callback:b.pushState,args:arguments,queue:q});return false}b.busy(true);var t=b.createStateObject(s,u,r);if(b.isLastSavedState(t)){b.busy(false)}else{b.storeState(t);b.expectedStateId=t.id;f.pushState(t.id,t.title,t.url);b.Adapter.trigger(g,"popstate")}return true};b.replaceState=function(s,u,r,q){if(b.getHashByUrl(r)&&b.emulated.pushState){throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).")}if(q!==false&&b.busy()){b.pushQueue({scope:b,callback:b.replaceState,args:arguments,queue:q});return false}b.busy(true);var t=b.createStateObject(s,u,r);if(b.isLastSavedState(t)){b.busy(false)}else{b.storeState(t);b.expectedStateId=t.id;f.replaceState(t.id,t.title,t.url);b.Adapter.trigger(g,"popstate")}return true}}if(k){try{b.store=m.parse(k.getItem("History.store"))||{}}catch(o){b.store={}}b.normalizeStore()}else{b.store={};b.normalizeStore()}b.Adapter.bind(g,"beforeunload",b.clearAllIntervals);b.Adapter.bind(g,"unload",b.clearAllIntervals);b.saveState(b.storeState(b.extractState(i.location.href,true)));if(k){b.onUnload=function(){var q,s;try{q=m.parse(k.getItem("History.store"))||{}}catch(r){q={}}q.idToState=q.idToState||{};q.urlToId=q.urlToId||{};q.stateToId=q.stateToId||{};for(s in b.idToState){if(!b.idToState.hasOwnProperty(s)){continue}q.idToState[s]=b.idToState[s]}for(s in b.urlToId){if(!b.urlToId.hasOwnProperty(s)){continue}q.urlToId[s]=b.urlToId[s]}for(s in b.stateToId){if(!b.stateToId.hasOwnProperty(s)){continue}q.stateToId[s]=b.stateToId[s]}b.store=q;b.normalizeStore();k.setItem("History.store",m.stringify(q))};b.intervalList.push(e(b.onUnload,b.options.storeInterval));b.Adapter.bind(g,"beforeunload",b.onUnload);b.Adapter.bind(g,"unload",b.onUnload)}if(!b.emulated.pushState){if(b.bugs.safariPoll){b.intervalList.push(e(b.safariStatePoll,b.options.safariPollInterval))}if(l.vendor==="Apple Computer, Inc."||(l.appCodeName||"")==="Mozilla"){b.Adapter.bind(g,"hashchange",function(){b.Adapter.trigger(g,"popstate")});if(b.getHash()){b.Adapter.onDomLoad(function(){b.Adapter.trigger(g,"hashchange")})}}}};b.init()})(window);;
// ***************************
// js.compressed/jquery/jquery.selectBox.min.js
// ***************************
/*
* jQuery selectBox - A cosmetic, styleable replacement for SELECT elements
*
* Copyright 2012 Cory LaViska for A Beautiful Site, LLC.
*
* https://github.com/claviska/jquery-selectBox
*
* Licensed under both the MIT license and the GNU GPLv2 (same as jQuery: http://jquery.org/license)
*
* Note: Modified for vBulletin
*/
if(jQuery){(function(A){A.extend(A.fn,{selectBox:function(K,b){var C,Z="",N=navigator.platform.match(/mac/i);var S=function(k,e){var q;if(navigator.userAgent.match(/iPad|iPhone|Android|IEMobile|BlackBerry/i)){return false}if(k.tagName.toLowerCase()!=="select"){return false}k=A(k);if(k.data("selectBox-control")){return false}if(k.is(":hidden")&&(!e||!e.allowHidden)){return false}var d=A(' '),i=k.attr("multiple")||parseInt(k.attr("size"))>1;var c=e||{};d.addClass(k.attr("class")).attr("title",k.attr("title")||"").attr("tabindex",parseInt(k.attr("tabindex"))).css("display","inline-block").bind("focus.selectBox",function(){if(this!==document.activeElement&&document.body!==document.activeElement){A(document.activeElement).blur()}if(d.hasClass("selectBox-active")){return }d.addClass("selectBox-active");k.trigger("focus")}).bind("blur.selectBox",function(){if(!d.hasClass("selectBox-active")){return }d.removeClass("selectBox-active");k.trigger("blur")});if(!A(window).data("selectBox-bindings")){A(window).data("selectBox-bindings",true).bind("scroll.selectBox",H).bind("resize.selectBox",H)}if(k.attr("disabled")){d.addClass("selectBox-disabled")}k.bind("click.selectBox",function(r){d.focus();r.preventDefault()});if(i){q=M(k,"inline");d.append(q).data("selectBox-options",q).addClass("selectBox-inline selectBox-menuShowing").bind("keydown.selectBox",function(r){O(k,r)}).bind("keypress.selectBox",function(r){D(k,r)}).bind("mousedown.selectBox",function(r){if(A(r.target).is("A.selectBox-inline")){r.preventDefault()}if(!d.hasClass("selectBox-focus")){d.focus()}}).insertAfter(k);d.width(k.css("fontSize",d.css("fontSize")).outerWidth());if(!k[0].style.height){var p=k.attr("size")?parseInt(k.attr("size")):5;var f=d.clone().removeAttr("id").css({position:"absolute",top:"-9999em"}).show().appendTo("body");f.find(".selectBox-options").html("\u00A0 ");var n=parseInt(f.find(".selectBox-options A:first").html(" ").outerHeight());f.remove();d.height(n*p)}I(d)}else{var j=A(' '),m=A(' ');j.attr("class",B(k)).text(Q(k));q=M(k,"dropdown");q.appendTo("BODY");d.data("selectBox-options",q).addClass("selectBox-dropdown").append(j).append(m).bind("mousedown.selectBox",function(r){if(d.hasClass("selectBox-menuShowing")){H()}else{r.stopPropagation();q.data("selectBox-down-at-x",r.screenX).data("selectBox-down-at-y",r.screenY);R(k)}}).bind("keydown.selectBox",function(r){O(k,r)}).bind("keypress.selectBox",function(r){D(k,r)}).bind("open.selectBox",function(s,r){if(r&&r._selectBox===true){return }R(k)}).bind("close.selectBox",function(s,r){if(r&&r._selectBox===true){return }H()}).insertAfter(k);d.width(k.css("fontSize",d.css("fontSize")).width())-parseInt(d.css("border-left-width"),10)-parseInt(d.css("border-right-width"),10);var h=d.width()-m.outerWidth()-parseInt(j.css("paddingLeft"))-parseInt(j.css("paddingRight"));j.width(h);I(d)}var g=A(".selectBox-label",d);var o=parseInt(g.css("paddingLeft"))-4+parseInt(g.css("paddingRight"));var l=d.width()+o;if(l<=d.parent().innerWidth()){d.width(l);g.width(g.width()+o)}k.addClass("selectBox").data("selectBox-control",d).data("selectBox-settings",c).hide()};var M=function(c,h){var e;var d=function(i,j){i.children("OPTION, OPTGROUP").each(function(){if(A(this).is("OPTION")){if(A(this).length>0){G(A(this),j)}else{j.append("\u00A0 ")}}else{var k=A(' ');k.text(A(this).attr("label"));j.append(k);j=d(A(this),j)}});return j};switch(h){case"inline":e=A('');e=d(c,e);e.find("A").bind("mouseover.selectBox",function(i){X(c,A(this).parent())}).bind("mouseout.selectBox",function(i){a(c,A(this).parent())}).bind("mousedown.selectBox",function(i){i.preventDefault();if(!c.selectBox("control").hasClass("selectBox-active")){c.selectBox("control").focus()}}).bind("mouseup.selectBox",function(i){H();W(c,A(this).parent(),i)});I(e);return e;case"dropdown":e=A('');e=d(c,e);e.data("selectBox-select",c).css("display","none").appendTo("BODY").find("A").bind("mousedown.selectBox",function(i){i.preventDefault();if(i.screenX===e.data("selectBox-down-at-x")&&i.screenY===e.data("selectBox-down-at-y")){e.removeData("selectBox-down-at-x").removeData("selectBox-down-at-y");H()}}).bind("mouseup.selectBox",function(i){if(i.screenX===e.data("selectBox-down-at-x")&&i.screenY===e.data("selectBox-down-at-y")){return }else{e.removeData("selectBox-down-at-x").removeData("selectBox-down-at-y")}W(c,A(this).parent());H()}).bind("mouseover.selectBox",function(i){X(c,A(this).parent())}).bind("mouseout.selectBox",function(i){a(c,A(this).parent())});var g=c.attr("class")||"";if(g!==""){g=g.split(" ");for(var f in g){e.addClass(g[f]+"-selectBox-dropdown-menu")}}I(e);return e}};var B=function(c){var d=A(c).find("OPTION:selected");return("selectBox-label "+(d.attr("class")||"")).replace(/\s+$/,"")};var Q=function(c){var d=A(c).find("OPTION:selected");return d.text()||"\u00A0"};var U=function(c){c=A(c);var d=c.data("selectBox-control");if(!d){return }d.find(".selectBox-label").attr("class",B(c)).text(Q(c))};var Y=function(c){c=A(c);var e=c.data("selectBox-control");if(!e){return }var d=e.data("selectBox-options")||A();d.remove();e.remove();c.removeClass("selectBox").removeData("selectBox-control").data("selectBox-control",null).removeData("selectBox-settings").data("selectBox-settings",null).show()};var L=function(c){c=A(c);c.selectBox("options",c.html())};var R=function(d){d=A(d);var i=d.data("selectBox-control")||A(),g=d.data("selectBox-settings")||{},e=i.data("selectBox-options")||A();if(i.hasClass("selectBox-disabled")){return false}H();var f=parseInt(i.css("borderBottomWidth"))||0;e.width(i.innerWidth()).css({top:i.offset().top+i.outerHeight()-f,left:i.offset().left});if(d.triggerHandler("beforeopen")){return false}var h=function(){d.triggerHandler("open",{_selectBox:true});if(!T(e)){e.css("top",parseFloat(e.css("top"))-(i.outerHeight()+e.outerHeight()))}};switch(g.menuTransition){case"fade":e.fadeIn(g.menuSpeed,h);break;case"slide":e.slideDown(g.menuSpeed,h);break;default:e.show(g.menuSpeed,h);break}if(!g.menuSpeed){h()}var c=e.find(".selectBox-selected:first");E(d,c,true);X(d,c);i.addClass("selectBox-menuShowing");A(document).bind("mousedown.selectBox",function(j){if(A(j.target).parents().andSelf().hasClass("selectBox-options")){return }H()})};var H=function(){if(A(".selectBox-dropdown-menu:visible").length===0){return }A(document).unbind("mousedown.selectBox");A(".selectBox-dropdown-menu").each(function(){var d=A(this),c=d.data("selectBox-select")||A(),g=c.data("selectBox-control")||A(),e=c.data("selectBox-settings")||{};if(c.triggerHandler("beforeclose")){return false}var f=function(){c.triggerHandler("close",{_selectBox:true})};switch(e.menuTransition){case"fade":d.fadeOut(e.menuSpeed,f);break;case"slide":d.slideUp(e.menuSpeed,f);break;default:d.hide(e.menuSpeed,f);break}if(!e.menuSpeed){f()}g.removeClass("selectBox-menuShowing")})};var W=function(d,c,j){d=A(d);c=A(c);var k=d.data("selectBox-control")||A(),h=d.data("selectBox-settings")||{};if(k.hasClass("selectBox-disabled")){return false}if(c.length===0||c.hasClass("selectBox-disabled")){return false}if(d.attr("multiple")){if(j.shiftKey&&k.data("selectBox-last-selected")){c.toggleClass("selectBox-selected");var e;if(c.index()>k.data("selectBox-last-selected").index()){e=c.siblings().slice(k.data("selectBox-last-selected").index(),c.index())}else{e=c.siblings().slice(c.index(),k.data("selectBox-last-selected").index())}e=e.not(".selectBox-optgroup, .selectBox-disabled");if(c.hasClass("selectBox-selected")){e.addClass("selectBox-selected")}else{e.removeClass("selectBox-selected")}}else{if((N&&j.metaKey)||(!N&&j.ctrlKey)){c.toggleClass("selectBox-selected")}else{c.siblings().removeClass("selectBox-selected");c.addClass("selectBox-selected")}}}else{c.siblings().removeClass("selectBox-selected");c.addClass("selectBox-selected")}if(k.hasClass("selectBox-dropdown")){k.find(".selectBox-label").text(c.text())}var f=0,g=[];if(d.attr("multiple")){k.find(".selectBox-selected A").each(function(){g[f++]=A(this).attr("rel")})}else{g=c.find("A").attr("rel")}k.data("selectBox-last-selected",c);if(d.val()!==g){d.val(g);U(d);d.trigger("change")}return true};var X=function(d,c){d=A(d);c=A(c);var f=d.data("selectBox-control")||A(),e=f.data("selectBox-options")||A();e.find(".selectBox-hover").removeClass("selectBox-hover");c.addClass("selectBox-hover")};var a=function(d,c){d=A(d);c=A(c);var f=d.data("selectBox-control")||A(),e=f.data("selectBox-options")||A();e.find(".selectBox-hover").removeClass("selectBox-hover")};var E=function(e,d,c){if(!d||d.length===0){return }e=A(e);var j=e.data("selectBox-control")||A(),g=j.data("selectBox-options")||A(),h=j.hasClass("selectBox-dropdown")?g:g.parent(),i=parseInt(d.offset().top-h.position().top),f=parseInt(i+d.outerHeight());if(c){h.scrollTop(d.offset().top-h.offset().top+h.scrollTop()-(h.height()/2))}else{if(i<0){h.scrollTop(d.offset().top-h.offset().top+h.scrollTop())}if(f>h.height()){h.scrollTop((d.offset().top+d.outerHeight())-h.offset().top+h.scrollTop()-h.height())}}};var O=function(k,c){k=A(k);var g=k.data("selectBox-control")||A(),l=g.data("selectBox-options")||A(),e=k.data("selectBox-settings")||{},f=0,h=0;if(g.hasClass("selectBox-disabled")){return }switch(c.keyCode){case 8:c.preventDefault();Z="";break;case 9:case 27:H();a(k);break;case 13:if(g.hasClass("selectBox-menuShowing")){W(k,l.find("LI.selectBox-hover:first"),c);if(g.hasClass("selectBox-dropdown")){H()}}else{R(k)}break;case 38:case 37:c.preventDefault();if(g.hasClass("selectBox-menuShowing")){var d=l.find(".selectBox-hover").prev("LI");f=l.find("LI:not(.selectBox-optgroup)").length;h=0;while(d.length===0||d.hasClass("selectBox-disabled")||d.hasClass("selectBox-optgroup")){d=d.prev("LI");if(d.length===0){if(e.loopOptions){d=l.find("LI:last")}else{d=l.find("LI:first")}}if(++h>=f){break}}X(k,d);W(k,d,c);E(k,d)}else{R(k)}break;case 40:case 39:c.preventDefault();if(g.hasClass("selectBox-menuShowing")){var j=l.find(".selectBox-hover").next("LI");f=l.find("LI:not(.selectBox-optgroup)").length;h=0;while(j.length===0||j.hasClass("selectBox-disabled")||j.hasClass("selectBox-optgroup")){j=j.next("LI");if(j.length===0){if(e.loopOptions){j=l.find("LI:first")}else{j=l.find("LI:last")}}if(++h>=f){break}}X(k,j);W(k,j,c);E(k,j)}else{R(k)}break}};var D=function(c,e){c=A(c);var f=c.data("selectBox-control")||A(),d=f.data("selectBox-options")||A();if(f.hasClass("selectBox-disabled")){return }switch(e.keyCode){case 9:case 27:case 13:case 38:case 37:case 40:case 39:break;default:if(!f.hasClass("selectBox-menuShowing")){R(c)}e.preventDefault();clearTimeout(C);Z+=String.fromCharCode(e.charCode||e.keyCode);d.find("A").each(function(){if(A(this).text().substr(0,Z.length).toLowerCase()===Z.toLowerCase()){X(c,A(this).parent());E(c,A(this).parent());return false}});C=setTimeout(function(){Z=""},1000);break}};var P=function(c){c=A(c);c.attr("disabled",false);var d=c.data("selectBox-control");if(!d){return }d.removeClass("selectBox-disabled")};var J=function(c){c=A(c);c.attr("disabled",true);var d=c.data("selectBox-control");if(!d){return }d.addClass("selectBox-disabled")};var F=function(c,f){c=A(c);c.val(f);f=c.val();var g=c.data("selectBox-control");if(!g){return }var e=c.data("selectBox-settings")||{},d=g.data("selectBox-options")||A();U(c);d.find(".selectBox-selected").removeClass("selectBox-selected");d.find("A").each(function(){if(typeof (f)==="object"){for(var h=0;h ');for(var e in b[g]){c.append(''+b[g][e]+" ")}l.append(c)}else{var h=A(''+b[g]+" ");l.append(h)}}break}if(!f){return }f.data("selectBox-options").remove();var k=f.hasClass("selectBox-dropdown")?"dropdown":"inline";m=M(l,k);f.data("selectBox-options",m);switch(k){case"inline":f.append(m);break;case"dropdown":U(l);A("BODY").append(m);break}};var I=function(c){A(c).css("MozUserSelect","none").bind("selectstart",function(d){d.preventDefault()})};var G=function(e,f){var c=A(" "),d=A(" ");c.addClass(e.attr("class"));c.data(e.data());d.attr("rel",e.val()).text(e.text());c.append(d);if(e.attr("disabled")){c.addClass("selectBox-disabled")}if(e.attr("selected")){c.addClass("selectBox-selected")}f.append(c)};var T=function(e){var i=A(window).scrollTop();var g=i+A(window).height();var c=e.offset().top;var d=c+e.outerHeight();var h=c-i;var f=g-d;return(h>=0&&f>=0)};switch(K){case"control":return A(this).data("selectBox-control");case"settings":if(!b){return A(this).data("selectBox-settings")}A(this).each(function(){A(this).data("selectBox-settings",A.extend(true,A(this).data("selectBox-settings"),b))});break;case"options":if(b===undefined){return A(this).data("selectBox-control").data("selectBox-options")}A(this).each(function(){V(this,b)});break;case"value":if(b===undefined){return A(this).val()}A(this).each(function(){F(this,b)});break;case"refresh":A(this).each(function(){L(this)});break;case"enable":A(this).each(function(){P(this)});break;case"disable":A(this).each(function(){J(this)});break;case"destroy":A(this).each(function(){Y(this)});break;default:A(this).each(function(){S(this,K)});break}return A(this)}})})(jQuery)};;
// ***************************
// js.compressed/jquery/jquery.placeholder.min.js
// ***************************
/*
* Placeholder plugin for jQuery
* ---
* Copyright 2010, Daniel Stocks (http://webcloud.se)
* Released under the MIT, BSD, and GPL Licenses.
*/
(function(e){function t(t){this.input=t;if(t.attr("type")=="password"){this.handlePassword()}e(t[0].form).submit(function(){if(t.hasClass("placeholder")&&t[0].value==t.attr("placeholder")){t[0].value=""}})}t.prototype={show:function(e){if(this.input[0].value===""||e&&this.valueIsPlaceholder()){if(this.isPassword){try{this.input[0].setAttribute("type","text")}catch(t){this.input.before(this.fakePassword.show()).hide()}}this.input.addClass("placeholder");this.input[0].value=this.input.attr("placeholder")}},hide:function(){if(this.valueIsPlaceholder()&&this.input.hasClass("placeholder")){this.input.removeClass("placeholder");this.input[0].value="";if(this.isPassword){try{this.input[0].setAttribute("type","password")}catch(e){}this.input.show();this.input[0].focus()}}},valueIsPlaceholder:function(){return this.input[0].value==this.input.attr("placeholder")},handlePassword:function(){var t=this.input;t.attr("realType","password");this.isPassword=true;if(e.browser.msie&&t[0].outerHTML){var n=e(t[0].outerHTML.replace(/type=(['"])?password\1/gi,"type=$1text$1"));this.fakePassword=n.val(t.attr("placeholder")).addClass("placeholder").focus(function(){t.trigger("focus");e(this).hide()});e(t[0].form).submit(function(){n.remove();t.show()})}}};var n=!!("placeholder"in document.createElement("input"));e.fn.placeholder=function(){return n?this:this.each(function(){var n=e(this);var r=new t(n);r.show(true);n.focus(function(){r.hide()});n.blur(function(){r.show(false)});if(e.browser.msie){e(window).load(function(){if(n.val()){n.removeClass("placeholder")}r.show(true)});n.focus(function(){if(this.value==""){var e=this.createTextRange();e.collapse(true);e.moveStart("character",0);e.select()}})}})};if(!n){var r=e.fn.val;e.fn.val=function(n){if(n==null){var i=e(this);if(i.hasClass("placeholder")){var s=i.attr("placeholder"),o=i.attr("value");if(s&&s==o){var u=new t(i);u.hide();var a=r.call(this);u.show(true);return a}}return r.call(this)}else{return r.call(this,n)}}}})(jQuery);
// ***************************
// js.compressed/jquery/jquery.jcarousel.custom.min.js
// ***************************
/*!
* jCarousel - Riding carousels with jQuery
* http://sorgalla.com/jcarousel/
*
* Copyright (c) 2006 Jan Sorgalla (http://sorgalla.com)
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
* Built on top of the jQuery library
* http://jquery.com
*
* Inspired by the "Carousel Component" by Bill Scott
* http://billwscott.com/carousel/
*
* Modified for vBulletin:
* - added destroy method
* - changed reset method by adding a flag to call setup method
* - added check for undefined instance in the main jcarousel function
*/
(function(c){var d={vertical:false,rtl:false,start:1,offset:1,size:null,scroll:3,visible:null,animation:"normal",easing:"swing",auto:0,wrap:null,initCallback:null,setupCallback:null,reloadCallback:null,itemLoadCallback:null,itemFirstInCallback:null,itemFirstOutCallback:null,itemLastInCallback:null,itemLastOutCallback:null,itemVisibleInCallback:null,itemVisibleOutCallback:null,animationStepCallback:null,buttonNextHTML:"
",buttonPrevHTML:"
",buttonNextEvent:"click",buttonPrevEvent:"click",buttonNextCallback:null,buttonPrevCallback:null,itemFallbackDimension:null},b=false;c(window).bind("load.jcarousel",function(){b=true});c.jcarousel=function(l,g){this.options=c.extend({},d,g||{});this.locked=false;this.autoStopped=false;this.container=null;this.clip=null;this.list=null;this.buttonNext=null;this.buttonPrev=null;this.buttonNextState=null;this.buttonPrevState=null;if(!g||g.rtl===undefined){this.options.rtl=(c(l).attr("dir")||c("html").attr("dir")||"").toLowerCase()=="rtl"}this.wh=!this.options.vertical?"width":"height";this.lt=!this.options.vertical?(this.options.rtl?"right":"left"):"top";var q="",n=l.className.split(" ");for(var k=0;k ").parent()}if(q!==""&&this.container.parent()[0].className.indexOf("jcarousel-skin")==-1){this.container.wrap('
')}this.buttonPrev=c(".jcarousel-prev",this.container);if(this.buttonPrev.size()===0&&this.options.buttonPrevHTML!==null){this.buttonPrev=c(this.options.buttonPrevHTML).appendTo(this.container)}this.buttonPrev.addClass(this.className("jcarousel-prev"));this.buttonNext=c(".jcarousel-next",this.container);if(this.buttonNext.size()===0&&this.options.buttonNextHTML!==null){this.buttonNext=c(this.options.buttonNextHTML).appendTo(this.container)}this.buttonNext.addClass(this.className("jcarousel-next"));this.clip.addClass(this.className("jcarousel-clip")).css({position:"relative"});this.list.addClass(this.className("jcarousel-list")).css({overflow:"hidden",position:"relative",top:0,margin:0,padding:0}).css((this.options.rtl?"right":"left"),0);this.container.addClass(this.className("jcarousel-container")).css({position:"relative"});if(!this.options.vertical&&this.options.rtl){this.container.addClass("jcarousel-direction-rtl").attr("dir","rtl")}var m=this.options.visible!==null?Math.ceil(this.clipping()/this.options.visible):null;var p=this.list.children("li");var r=this;if(p.size()>0){var f=0,h=this.options.offset;p.each(function(){r.format(this,h++);f+=r.dimension(this,m)});this.list.css(this.wh,(f+100)+"px");if(!g||g.size===undefined){this.options.size=p.size()}}this.container.css("display","block");this.buttonNext.css("display","block");this.buttonPrev.css("display","block");this.funcNext=function(){r.next()};this.funcPrev=function(){r.prev()};this.funcResize=function(){if(r.resizeTimer){clearTimeout(r.resizeTimer)}r.resizeTimer=setTimeout(function(){r.reload()},100)};if(this.options.initCallback!==null){this.options.initCallback(this,"init")}if(!b&&c.browser.safari){this.buttons(false,false);c(window).bind("load.jcarousel",function(){r.setup()})}else{this.setup()}};var a=c.jcarousel;a.fn=a.prototype={jcarousel:"0.2.8"};a.fn.extend=a.extend=c.extend;a.fn.extend({setup:function(){this.first=null;this.last=null;this.prevFirst=null;this.prevLast=null;this.animating=false;this.timer=null;this.resizeTimer=null;this.tail=null;this.inTail=false;if(this.locked){return}this.list.css(this.lt,this.pos(this.options.offset)+"px");var e=this.pos(this.options.start,true);this.prevFirst=this.prevLast=null;this.animate(e,false);c(window).unbind("resize.jcarousel",this.funcResize).bind("resize.jcarousel",this.funcResize);if(this.options.setupCallback!==null){this.options.setupCallback(this)}},reset:function(e){this.list.empty();this.list.css(this.lt,"0px");this.list.css(this.wh,"10px");if(this.options.initCallback!==null){this.options.initCallback(this,"reset")}if(e){this.setup()}},reload:function(){if(this.tail!==null&&this.inTail){this.list.css(this.lt,a.intval(this.list.css(this.lt))+this.tail)}this.tail=null;this.inTail=false;if(this.options.reloadCallback!==null){this.options.reloadCallback(this)}if(this.options.visible!==null){var g=this;var h=Math.ceil(this.clipping()/this.options.visible),f=0,e=0;this.list.children("li").each(function(j){f+=g.dimension(this,h);if(j+1