").addClass("usertitle").html(data[x].usertitle);avatar.append(img);li.append(avatar);li.append(username);li.append(usertitle);html+=$("
").append(li).html()}html+="";this.set("content.text",html)}}},error:function(jqXHR,textStatus,errorThrown){this.set("content.text","failed to load.")}}},position:{my:"left top",at:"right top",viewport:$(window)},show:{event:"click"},hide:{event:"unfocus",fixed:true},style:{classes:"ui-tooltip-shadow ui-tooltip-light ui-tooltip-whovoted"}});self.qtip("api").show()};vBulletin.conversation.processPostContent=function($conversationList){$conversationList.css("border-bottom","").filter(".stream-view.activity-view").find(".list-item-poll form.poll").each(function(index,form){if($(this).is(":visible")&&$(".view-less-ctrl",this).hasClass("h-hide")){vBulletin.conversation.limitVisiblePollOptionsInAPost(this,3)}})};vBulletin.conversation.limitVisiblePollOptionsInAPost=function($pollForm,maxLines){if(typeof maxLines=="undefined"){maxLines=3}var lineCount=0,$pollOptionItems=$("ul.poll li",$pollForm),lh=parseInt($pollOptionItems.css("line-height"),10);$pollOptionItems.each(function(index){$(this).removeClass("h-hide");var h=$(this).height();lineCount+=h/lh;if(lineCount>maxLines){$(this).addClass("h-hide")}else{$(this).css("display","")}});if(lineCount>3){$(".view-more-ctrl",$pollForm).removeClass("h-hide").next(".action-buttons").addClass("h-hide").next(".view-less-ctrl").addClass("h-hide")}else{$(".view-more-ctrl",$pollForm).addClass("h-hide").next(".action-buttons").removeClass("h-hide").next(".view-less-ctrl").addClass("h-hide")}};vBulletin.conversation.bindEditFormEventHandlers=function(contentType){contentType=(contentType)?contentType.toLowerCase():"";if($.inArray(contentType,["text","gallery","video","poll","link","comment"])!=-1||contentType=="all"){var initializeEditor=function($container,activateEditModeCallback){if(typeof activateEditModeCallback=="function"){console.log("Edit mode: initializeEditor");var $bareEditor=$container.find(".js-editor");if($bareEditor.length>0){vBulletin.ckeditor.initEditor($bareEditor,{success:function(ckeditorId){if(typeof activateEditModeCallback=="function"){activateEditModeCallback();vBulletin.contentEntryBox.afterPanelChange($container);vBulletin.ckeditor.initEditorComponents($container);this.setData($bareEditor.prev(".js-editor-parsed-text").html());this.focus()}},error:function(ckeditorId){if(typeof activateEditModeCallback=="function"){activateEditModeCallback()}$bareEditor.prop("disabled",false).removeClass("ckeditor-load-on-focus").closest(".js-content-entry").addClass("b-content-entry--no-ckeditor")},hideLoadingDialog:false})}else{if(typeof activateEditModeCallback=="function"){activateEditModeCallback();$bareEditor.focus()}}}};var destroyEditor=function($container){var $bareEditor=$container.find(".js-editor");if($bareEditor.length>0){var editorId=$bareEditor.attr("id");if(vBulletin.ckeditor.editorExists(editorId)){vBulletin.ckeditor.destroyEditor(editorId)}}$bareEditor.closest("form").remove()};var bindCommentEditFormEventHandlers=function(){$("body").off("comment_editform_onload").on("comment_editform_onload",function(e,$container,activateEditModeCallback){if(typeof activateEditModeCallback=="function"){activateEditModeCallback();$(".js-editor",$container).focus().filter(".autogrow").elastic().off("blur.elastic")}}).off("comment_editform_onunload").on("comment_editform_onunload",function(e,$container){})};var bindTextEditFormEventHandlers=function(){$("body").off("text_editform_onload").on("text_editform_onload",function(e,$container,activateEditModeCallback){initializeEditor($container,activateEditModeCallback)}).off("text_editform_onunload").on("text_editform_onunload",function(e,$container){destroyEditor($container)}).off("text_newcontent_onload").on("text_newcontent_onload",function(e,$container){if($container.closest(".conversation-list.stream-view.activity-view").length>0){vBulletin.truncatePostContent($container)}})};var bindPollEditFormEventHandlers=function(){$("body").off("poll_editform_onload").on("poll_editform_onload",function(e,$container,activateEditModeCallback){initializeEditor($container,activateEditModeCallback);$(".js-datepicker",$container).not(".hasDatePicker").datetimepicker({showOn:"both",buttonImage:pageData.baseurl+"/images/calendar-blue.png",buttonImageOnly:true,ampm:true})}).off("poll_editform_onunload").on("poll_editform_onunload",function(e,$container){destroyEditor($container)}).off("poll_newcontent_onload").on("poll_newcontent_onload",function(e,$container){if($container.closest(".conversation-list.stream-view.activity-view").length>0){vBulletin.truncatePostContent($container);vBulletin.conversation.limitVisiblePollOptionsInAPost($("form.poll",$container),3)}})};var bindGalleryEditFormEventHandlers=function(){$("body").off("gallery_editform_onload").on("gallery_editform_onload",function(e,$container,activateEditModeCallback){$('.b-toolbar__item[data-panel="b-content-entry-panel__content--gallery"]',$container).trigger("click");initializeEditor($container,function(){if(typeof activateEditModeCallback=="function"){activateEditModeCallback()}vBulletin.upload.initializePhotoUpload($container)})}).off("gallery_editform_onunload").on("gallery_editform_onunload",function(e,$container){destroyEditor($container)}).off("gallery_editform_onbeforeserialize").on("gallery_editform_onbeforeserialize",function(e,$form){$form.find(".caption-box").each(function(){var $input=$(this);if($input.hasClass("placeholder")&&$input.val()==$input.attr("placeholder")){$input.val("")}});return true}).off("gallery_newcontent_onload").on("gallery_newcontent_onload",function(e,$container){if($container.closest(".conversation-list.stream-view.activity-view").length>0){vBulletin.truncatePostContent($container)}})};var bindVideoEditFormEventHandlers=function(){$("body").off("video_editform_onload").on("video_editform_onload",function(e,$container,activateEditModeCallback){$('.b-toolbar__item[data-panel="b-content-entry-panel__content--video"]',$container).trigger("click");initializeEditor($container,function(){if(typeof activateEditModeCallback=="function"){activateEditModeCallback()}attachLinkContainerEvents($(".b-content-entry-panel__content--video",$container),"video")});$(".js-attach-button",$container).on("click",function(e){e.preventDefault();var self=$(this),$panel=self.closest(".b-content-entry-panel__content--video"),$urlBox=$(".b-link-input__url",$panel),url=$.trim($urlBox.val());if(!url){openAlertDialog({title:vBulletin.phrase.get("attach_video"),message:vBulletin.phrase.get("please_enter_video_url"),iconType:"warning",onAfterClose:function(){$urlBox.focus()}});return false}self.prop("disabled",true);$(".js-button-group .b-button",$panel).prop("disabled",true);$("body").css("cursor","wait");$.post(vBulletin.getAjaxBaseurl()+"/link/getlinkdata",{url:url,isAjaxTemplateRender:true},function(data){if(data.error){openAlertDialog({title:vBulletin.phrase.get("attach_video"),message:vBulletin.phrase.get(data.error),iconType:"warning",onAfterClose:function(){$urlBox.focus()}})}else{$template=$(data);$panel.find(".js-panel-content").append($template);attachLinkContainerEvents($panel,"video");$template.fadeIn("slow",function(){$urlBox.val("");$(".b-link-input",$panel).addClass("h-hide")});var $form=$container.closest("form");if($template.find("js-video-url")){$form.data("content-type","video")}else{$form.data("content-type","link")}}},"json").error(function(xhr,statusText,errorThrown){openAlertDialog({title:vBulletin.phrase.get("attach_video"),message:"HTTP {0} - {1}".format(xhr.status,errorThrown),iconType:"error"})}).complete(function(){$("body").css("cursor","default");self.prop("disabled",false);$(".js-button-group .b-button",$panel).prop("disabled",false)})})}).off("video_editform_onunload").on("video_editform_onunload",function(e,$container){destroyEditor($container)}).off("video_newcontent_onload").on("video_newcontent_onload",function(e,$container){if($container.closest(".conversation-list.stream-view.activity-view").length>0){vBulletin.truncatePostContent($container)}})};var bindLinkEditFormEventHandlers=function(){$("body").off("link_editform_onload").on("link_editform_onload",function(e,$container,activateEditModeCallback){$('.b-toolbar__item[data-panel="b-content-entry-panel__content--link"]',$container).trigger("click");initializeEditor($container,function(){if(typeof activateEditModeCallback=="function"){activateEditModeCallback()}attachLinkContainerEvents($(".b-content-entry-panel__content--link",$container),"link")});$(".js-attach-button",$container).on("click",function(e){e.preventDefault();var self=$(this),$panel=self.closest(".b-content-entry-panel__content--link"),$urlBox=$(".b-link-input__url",$panel),url=$.trim($urlBox.val());if(!url){openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("please_enter_a_valid_url_and_click_attach"),iconType:"warning",onAfterClose:function(){$urlBox.focus()}});return false}if(!url.match(/^https?:\/\//)){url="http://"+url;$urlBox.val(url)}self.prop("disabled",true);$(".js-button-group .b-button",$panel).prop("disabled",true);$("body").css("cursor","wait");$.post(vBulletin.getAjaxBaseurl()+"/link/getlinkdata",{url:url,isAjaxTemplateRender:true},function(data){if(data.error){openAlertDialog({title:vBulletin.phrase.get("attach_link"),message:vBulletin.phrase.get(data.error),iconType:"warning",onAfterClose:function(){$urlBox.focus()}})}else{var $template=$(data);$template.find("img").error(function(){$(this).closest("li").remove()});$panel.find(".js-panel-content").append($template);attachLinkContainerEvents($panel,"link");$template.fadeIn("slow",function(){$urlBox.val("");$(".b-link-input",$panel).addClass("h-hide")});var $form=$container.closest("form");if($template.find("js-video-url")){$form.data("content-type","video")}else{$form.data("content-type","link")}}},"json").error(function(xhr,statusText,errorThrown){openAlertDialog({title:vBulletin.phrase.get("attach_link"),message:"HTTP {0} - {1}".format(xhr.status,errorThrown),iconType:"error"})}).complete(function(){$("body").css("cursor","default");self.prop("disabled",false);$(".js-button-group .b-button",$panel).prop("disabled",false)})})}).off("link_editform_onunload").on("link_editform_onunload",function(e,$container){destroyEditor($container)}).off("link_newcontent_onload").on("link_newcontent_onload",function(e,$container){if($container.closest(".conversation-list.stream-view.activity-view").length>0){vBulletin.truncatePostContent($container)}}).off("link_savepost_success").on("link_savepost_success",function(e,$container){$(".b-link-input",$container).removeClass("h-hide-imp")})};var attachLinkContainerEvents=function($panel,contentType){$(".b-link-content__urlinfo .js-link-edit",$panel).on("click",function(e){e.preventDefault();var $parent=$(this).parent().parent();$parent.addClass("b-link-content__urlinfo-meta--edit-mode");$(".js-link-textbox",$parent).val($.trim($(".b-link-content__urlinfo-text",$parent).text())).trigger("focus");$(".js-link-save",$parent).on("click",function(e){e.preventDefault();$(".b-link-content__urlinfo-text",$parent).text($(".js-link-textbox",$parent).val());$parent.removeClass("b-link-content__urlinfo-meta--edit-mode")})});$(".js-link-remove",$panel).on("click",function(e){e.preventDefault();$(this).closest(".b-content-entry-panel__content").find(".b-link-input").removeClass("h-hide");$(this).closest(".js-panel-content").empty();$(".b-link-input",$panel).removeClass("h-hide")});if(contentType=="link"){$(".js-link-preview-checkbox",$panel).off("click").on("click",function(){$(".b-link-content__thumbnail",$panel)[this.checked?"addClass":"removeClass"]("h-hide")});var thumbnailCount=$(".b-link-thumbnail-list__item",$panel).length;$(".b-link-thumbnail-list",$panel).jcarousel({scroll:1,wrap:null,size:thumbnailCount,rtl:$("html").attr("dir")=="rtl",buttonNextCallback:function(carousel,button,enabled){if(enabled){$(".b-thumbnail-nav .b-thumbnail-nav__next-arrow",$panel).removeClass("b-icon__arrow-right-m--disabled").addClass("b-icon__arrow-right-m--default")}else{$(".b-thumbnail-nav .b-thumbnail-nav__next-arrow",$panel).addClass("b-icon__arrow-right-m--disabled").removeClass("b-icon__arrow-right-m--default")}},buttonPrevCallback:function(carousel,button,enabled){if(enabled){$(".b-thumbnail-nav .b-thumbnail-nav__prev-arrow",$panel).removeClass("b-icon__arrow-left-m--disabled").addClass("b-icon__arrow-left-m--default")}else{$(".b-thumbnail-nav .b-thumbnail-nav__prev-arrow",$panel).addClass("b-icon__arrow-left-m--disabled").removeClass("b-icon__arrow-left-m--default")}},initCallback:function(carousel,state){if(state=="init"&&thumbnailCount>0){$(".b-thumbnail-nav .b-thumbnail-nav__counter",$panel).html("1/"+thumbnailCount);$(".b-thumbnail-nav .b-thumbnail-nav__prev-arrow",$panel).off("click").on("click",function(){if(!$(this).hasClass("b-icon__arrow-left-m--disabled")){$(".jcarousel-container .jcarousel-prev",$panel).trigger("click")}});$(".b-thumbnail-nav .b-thumbnail-nav__next-arrow",$panel).off("click").on("click",function(){if(!$(this).hasClass("b-icon__arrow-right-m--disabled")){$(".jcarousel-container .jcarousel-next",$panel).trigger("click")}})}},itemVisibleInCallback:function(carousel,item,index,state){if(state=="init"){return false}$(".b-thumbnail-nav .b-thumbnail-nav__counter",$panel).html(index+"/"+thumbnailCount);$('input[type="radio"]',item).prop("checked",true)},itemFallbackDimension:90})}};switch(contentType){case"text":bindTextEditFormEventHandlers();break;case"comment":bindCommentEditFormEventHandlers();break;case"poll":bindPollEditFormEventHandlers();break;case"gallery":bindGalleryEditFormEventHandlers();break;case"video":bindVideoEditFormEventHandlers();break;case"link":bindLinkEditFormEventHandlers();break;case"all":bindTextEditFormEventHandlers();bindCommentEditFormEventHandlers();bindPollEditFormEventHandlers();bindGalleryEditFormEventHandlers();bindVideoEditFormEventHandlers();bindLinkEditFormEventHandlers();break}}};vBulletin.isScrolledIntoView=function(elem,elemRelativePos){var isPlainObject=false;if($.isPlainObject(elemRelativePos)&&(elemRelativePos).toString()=="[object Object]"){isPlainObject=true;elemRelativePos.top=0;elemRelativePos.bottom=0}elem=(elem instanceof $)?elem:$(elem);if(elem.length==0){return false}var docViewTop=$(window).scrollTop(),docViewBottom=docViewTop+$(window).height(),elemTop=elem.offset().top,elemBottom=elemTop+elem.outerHeight(),elemRelativeTop=elemTop-docViewTop,elemRelativeBottom=docViewBottom-elemBottom;if(isPlainObject){elemRelativePos.top=elemRelativeTop;elemRelativePos.bottom=elemRelativeBottom}return(elemRelativeTop>=0&&elemRelativeBottom>=0)};vBulletin.scrollToFixed=function(userOptions){var self=this,options={element:$(),fixedAt:"top",limit:0,triggerOnload:true,zIndex:99},namespace=("scrollToFixed"+Math.random()).replace(".","");function init(userOptions){options=$.extend({},options,userOptions);if(options.element){options.element=(options.element instanceof $)?options.element:$(options.element);if(options.element.length>0){if($.inArray(options.fixedAt,["top","bottom"])){options.fixedAt="top"}var $el=options.element,fixedClass="scrolltofixed",origLayout={width:$el.width(),offset:$el.offset(),"margin-top":parseInt($el.css("margin-top"),10),"margin-bottom":parseInt($el.css("margin-bottom"),10),cssPosition:$el.css("position"),coordinates:{left:$el.css("left"),top:$el.css("top"),right:$el.css("right"),bottom:$el.css("bottom")}};if(typeof $Rx!=="undefined"){var scrollToFixedBreakPoint=($Rx&&$Rx.scrollToFixedBreakPoint)?$Rx.scrollToFixedBreakPoint:0;var $filler=$("
");if($("#vb-page-body").width()>scrollToFixedBreakPoint){$filler.addClass("scrolltofixed-filler").hide().insertAfter($el)}}$el.data("origOffsetTop",origLayout.offset.top);$el.css("z-index",options.zIndex);$el.data("object-instance",self);var $w=$(window).off("scroll."+namespace).on("scroll."+namespace,function(){if($el.is(":hidden")){return }var scrollTop=$(this).scrollTop();if(options.limit>0&&scrollTop>options.limit&&$el.hasClass(fixedClass)){$el.removeClass(fixedClass).css({position:"absolute",left:"auto",right:"auto",top:"auto",bottom:"auto",width:origLayout.width})}else{if((options.limit>0&&scrollTop
origLayout.offset.top&&!$el.hasClass(fixedClass))||(options.limit<=0&&scrollTop>origLayout.offset.top&&!$el.hasClass(fixedClass))){$filler.css({display:$el.css("display"),width:$el.outerWidth(true),height:$el.outerHeight(true),"float":$el.css("float")});if($("#vb-page-body").width()>scrollToFixedBreakPoint){$el.addClass(fixedClass).width(origLayout.width).css({left:origLayout.offset.left,right:"auto",width:origLayout.width,top:(options.fixedAt=="top")?0:"auto",bottom:(options.fixedAt=="bottom")?0:"auto",position:""})}var margin=origLayout["margin-"+options.fixedAt];if(margin){var props={};props[options.fixedAt]=-margin+"px";$el.animate(props,"fast")}}else{if(scrollTop<=origLayout.offset.top&&$el.hasClass(fixedClass)){$filler.hide();$el.removeClass(fixedClass).css({position:"",width:"",left:"",top:"",right:"",bottom:""})}}}}).off("resize."+namespace).on("resize."+namespace,function(){$el.removeClass(fixedClass).width("auto").css({position:"",left:""});origLayout.width=$el.width();origLayout.offset=$el.offset();$(this).trigger("scroll."+namespace)});if(options.triggerOnload){$w.trigger("scroll."+namespace)}}}}this.updateLimit=function(limit){if(!isNaN(Number(limit))){options.limit=limit;$(window).trigger("scroll."+namespace)}};this.addLimit=function(limitToAdd){if(!isNaN(Number(limitToAdd))){options.limit+=limitToAdd;$(window).trigger("scroll."+namespace)}};this.reset=function(options){init(options)};init(userOptions)};vBulletin.scrollToAnchor=function(hash){var $anchor=$(hash);console.log("vBulletin.scrollToAnchor() hash: {0}, found: {1}".format(hash,$anchor.length));if($anchor.length>0){var offsetTop=$anchor.show().offset().top-2;$anchor.hide();var $root=$("html,body"),floatingTopBar=$(".scrolltofixed-floating.scrolltofixed-top"),starter=false;if(floatingTopBar.length>0){if($(".list-container .list-item:first a.anchor"+hash).length==1){if(floatingTopBar.hasClass("scrolltofixed")){floatingTopBar.removeClass("scrolltofixed")}offsetTop=floatingTopBar.offset().top;starter=true}else{if(floatingTopBar.hasClass("scrolltofixed")){offsetTop-=floatingTopBar.outerHeight()}}}$root.animate({scrollTop:offsetTop},1000,function(){if(!starter){var offsetTop=$anchor.show().offset().top;$anchor.hide();var floatingTopBar=$(".scrolltofixed-floating.scrolltofixed-top.scrolltofixed");offsetTop-=(floatingTopBar.length>0)?floatingTopBar.outerHeight():0;$root.animate({scrollTop:offsetTop},"slow")}$("a.anchor").show()});return false}$("a.anchor").show();return true};if(location.hash){vBulletin.scrollToAnchor(location.hash)}vBulletin.animateScrollTop=function(offsetTop,animationOptions){console.log("vBulletin.animateScrollTop({0})".format(offsetTop));var $floatingTopBar=$(".scrolltofixed-floating.scrolltofixed-top");if($floatingTopBar.length>0){var offsetTopFloatingBar=$floatingTopBar.data("origOffsetTop")||$floatingTopBar.offset().top;if(!$floatingTopBar.hasClass("scrolltofixed")&&offsetTopFloatingBartruncatedHeight){$content.closest(".list-item-body").find(".post-links").removeClass("hide-see-link").find(".see-link").off("click").on("click",function(){var $self=$(this);if($self.hasClass("more")){$content.removeClass("ellipsis")}else{$content.addClass("ellipsis")}$self.toggleClass("more less");var currentText=$self.text();$self.text($self.data("toggle-text")).data("toggle-text",currentText);return false})}});$(".list-item .see-link.more").each(function($e){var container=$(this).closest(".list-item"),contentBlock=$(container).find(".post-content.restore");if(contentBlock.length>0){var full=false,loaded=false,defaultText=$(this).text(),fullText="",preview=$(contentBlock).html(),linkShowmore=this;$(this).on("click",function(){nodeid=$(container).attr("data-node-id");if(full){$(linkShowmore).text(defaultText);$(contentBlock).html(preview);full=false}else{if(loaded){$(linkShowmore).text(vBulletin.phrase.get("see_less"));full=true;$(contentBlock).html(fullText)}else{if(!loaded&&nodeid){$.ajax({url:vBulletin.getAjaxBaseurl()+"/activity/fetchText",data:{nodeid:nodeid},dataType:"json",complete:function(){},success:function(result){if(result&&!result.error&&result.nodeText){fullText=result.nodeText;if(fullText.length<=preview.length){$(linkShowmore).addClass("ui-helper-hidden");postLink=$(linkShowmore).closest(".post-links").html().replace("| ","");$(linkShowmore).closest(".post-links").html(postLink)}else{$(contentBlock).html(result.nodeText);$(linkShowmore).text(vBulletin.phrase.get("see_less"));console.log("loaded content for node "+nodeid);full=true;loaded=true;return false}}},error:function(xhr,statusText,errorThrown){console.log("Attempt to load text for node "+nodeid+" failed:"+errorThrown)}})}}}return false})}})};vBulletin.markreadcheck=function(){if((parseInt(pageData.threadmarking)>0)&&(parseInt(pageData.userid)>0)){return }var lastvisit=$.cookie(pageData.cookie_prefix+"lastvisit");if(parseInt(pageData.userid)>0&&(!lastvisit||pageData.lastvisit>lastvisit)){lastvisit=pageData.lastvisit}var timenow=Math.round(new Date().getTime()/1000),markinglimittime=timenow-vBulletin.options.get("markinglimit")*86400;$(".forum-item").each(function(){var lastcontent=parseInt($(this).attr("data-lastcontent")),channelview=0;if(lastcontent<=lastvisit){$(this).removeClass("new");return }channelview=vBulletin.cookie.fetchBbarrayCookie("channel_view",$(this).attr("data-channel-id"));channelview=channelview?parseInt(channelview):0;$(this).toggleClass("new",(lastcontent>channelview))});$(".subforum-item").each(function(){var lastcontent=parseInt($(this).attr("data-lastcontent")),channelview=0;if(lastcontent<=lastvisit){$(this).removeClass("new").find(".icon").removeClass("new");return }channelview=vBulletin.cookie.fetchBbarrayCookie("channel_view",$(this).attr("data-channel-id"));channelview=channelview?parseInt(channelview):0;$(this).toggleClass("new",(lastcontent>channelview)).find(".icon").toggleClass("new",(lastcontent>channelview))});$(".topic-item").each(function(){var lastcontent=parseInt($(this).attr("data-lastcontent")),topicview=0,channelview=0,checkview=0;if(pageData.userid=="0"){if(lastcontent<=lastvisit){$(this).addClass("read");return }channelview=vBulletin.cookie.fetchBbarrayCookie("channel_view",$(this).attr("data-channel-id"));channelview=channelview?parseInt(channelview):0;topicview=vBulletin.cookie.fetchBbarrayCookie("discussion_view",$(this).attr("data-node-id"));topicview=topicview?parseInt(topicview):0;checkview=Math.max(channelview,topicview)}else{checkview=$(this).attr("data-readtime")?parseInt($(this).attr("data-readtime")):0;channelview=$(this).attr("data-channelreadtime")?parseInt($(this).attr("data-channelreadtime")):0;checkview=Math.max(checkview,channelview,markinglimittime)}if(lastcontent<=checkview||$(this).hasClass("redirect")){$(this).addClass("read")}else{if($(this).find(".topic-wrapper .go-to-first-unread").length==0){var topicUrl=$(this).find(".topic-wrapper .topic-title").attr("href");if(typeof (topicUrl)!="undefined"){topicUrl+=(topicUrl.indexOf("?")==-1?"?":"&")+"goto=newpost";$(" ").addClass("go-to-first-unread").attr("href",topicUrl).attr("title",vBulletin.phrase.get("go_to_first_new_post")).html(" ").prependTo($(this).find(".topic-wrapper"));$(this).find(".vb-icon-topic-status").attr("title",vBulletin.phrase.get("new_posts"))}}}})};vBulletin.markchannelsread=function(channelid,callbacks,sender){channelids=[];if(parseInt(channelid)){vBulletin.setChannelRead(channelid,callbacks)}else{if(pageData.channelid&&parseInt(pageData.channelid)&&parseInt(pageData.threadmarking)>0&&parseInt(pageData.userid)>0){vBulletin.setChannelRead(pageData.channelid,callbacks)}else{channels=$(sender).closest(".widget-content").find(".forum-list-container .forum-item");subchannels=$(sender).closest(".widget-content").find(".forum-list-container .subforum-item");result=false;var addChannelIds=function(index,channel){var channelid=parseInt($(channel).attr("data-channel-id"),10);if(channelid){channelids.push(channelid)}};$.each(channels,addChannelIds);$.each(subchannels,addChannelIds)}}$.each(channelids,function(index,channelid){if(index>=channelids.length-1){vBulletin.setChannelRead(channelid,callbacks)}else{vBulletin.setChannelRead(channelid,[])}})};vBulletin.setChannelRead=function(channelid,callbacks){var timenow=Math.round(new Date().getTime()/1000);if(pageData.threadmarking=="0"||!parseInt(pageData.userid)){if(channelid==0){$.cookie(pageData.cookie_prefix+"lastvisit",timenow)}else{var channelviews;try{channelviews=$.parseJSON(vBulletin.cookie.convertBbarrayCookie($.cookie(pageData.cookie_prefix+"channel_view")))||{}}catch(e){channelviews={}}channelviews[channelid]=timenow;var cookieoptions={path:pageData.cookie_path,domain:pageData.cookie_domain};cookieoptions.expires=365;$.cookie(pageData.cookie_prefix+"channel_view",vBulletin.cookie.convertBbarrayCookie(JSON.stringify(channelviews),"set"),cookieoptions)}if(callbacks.success&&typeof callbacks.success=="function"){callbacks.success()}}else{$.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/api/node/markChannelsRead",data:{nodeid:channelid},type:"POST",dataType:"json",complete:function(){},success:function(result){if(result&&!result.error){console.log("Channel "+channelid+" is marked read successfully!")}if(callbacks.success&&typeof callbacks.success=="function"){callbacks.success(result)}else{console.log("Channel "+channelid+" is marked read failed: "+result.error)}},error:function(xhr,statusText,errorThrown){console.log("Channel "+channelid+" is marked read failed:"+error);openAlertDialog({title:vBulletin.phrase.get("forum"),message:"HTTP {0} - {1}".format(xhr.status,errorThrown),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 agent=navigator.userAgent.toLowerCase();var opera=window.opera;var env={ie:eval("/*@cc_on!@*/false"),opera:(!!opera&&opera.version),webkit:(agent.indexOf(" applewebkit/")>-1),air:(agent.indexOf(" adobeair/")>-1),mac:(agent.indexOf("macintosh")>-1),quirks:(document.compatMode=="BackCompat"),mobile:(agent.indexOf("mobile")>-1),iOS:/(ipad|iphone|ipod)/.test(agent)};env.gecko=(navigator.product=="Gecko"&&!env.webkit&&!env.opera);if(env.webkit){if(agent.indexOf("chrome")>-1){env.chrome=true}else{env.safari=true}}var version=0;if(env.ie){if(env.quirks||!document.documentMode){version=parseFloat(agent.match(/msie (\d+)/)[1])}else{version=document.documentMode}env.ie9Compat=version==9;env.ie8Compat=version==8;env.ie7Compat=version==7;env.ie6Compat=version<7||env.quirks}if(env.gecko){var geckoRelease=agent.match(/rv:([\d\.]+)/);if(geckoRelease){geckoRelease=geckoRelease[1].split(".");version=geckoRelease[0]*10000+(geckoRelease[1]||0)*100+(geckoRelease[2]||0)*1}}if(env.opera){version=parseFloat(opera.version())}if(env.air){version=parseFloat(agent.match(/ adobeair\/(\d+)/)[1])}if(env.webkit){version=parseFloat(agent.match(/ applewebkit\/(\d+)/)[1])}env.version=version;env.isCompatible=!env.mobile&&((env.ie&&version>6)||(env.gecko&&version>=10801)||(env.opera&&version>=9.5)||(env.air&&version>=1)||(env.webkit&&version>=522)||false);return env.isCompatible};vBulletin.ckeditor.fireCallbacks=function(editorId,options,status,context){if(status=="error"&&typeof options.error=="function"){options.error(editorId)}if(status=="success"&&typeof options.success=="function"){options.success.apply(context,[editorId,context])}if(typeof options.complete=="function"){options.complete(editorId)}};vBulletin.ckeditor.initEditor=function(editorId,options){options=options||{};editorId=vBulletin.ckeditor.verifyEditorId(editorId);console.log("Ckeditor: initEditor({0})".format(editorId));if(!vBulletin.ckeditor.checkEnvironment()){$("#"+editorId).closest(".b-content-entry").find("li[data-panel=b-content-entry-panel__content--toggle-editor]").addClass("h-hide");vBulletin.ckeditor.fireCallbacks(editorId,options,"error");return }if(vBulletin.ckeditor.requiredScriptsLoaded){vBulletin.ckeditor.doInitEditor(editorId,options)}else{vBulletin.ckeditor.loadScripts(editorId,options)}};vBulletin.ckeditor.loadScripts=function(editorId,options,jsloaded){if(vBulletin.ckeditor.requiredScriptLoadingStarted){console.warn("Ckeditor: Trying to load required scripts more than once.");return }vBulletin.ckeditor.requiredScriptLoadingStarted=true;options=options||{};editorId=editorId||"";if(typeof (options.hideLoadingDialog)!=="undefined"&&!options.hideLoadingDialog){vBulletin.ckeditor.showLoadingDialog(editorId)}var fetchScriptError=function(){if(options.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(editorId,options,"error")};var onCkeditorScriptLoad=function(){if(!vBulletin.ckeditor.requiredScriptsLoadFailed){if(typeof jsloaded=="function"){jsloaded()}if(typeof vBulletin.ckeditor.doInitEditor=="function"&&window.CKEDITOR){vBulletin.ckeditor.requiredScriptsLoaded=true;vBulletin.ckeditor.doInitEditor(editorId,options)}else{setTimeout(onCkeditorScriptLoad,10)}}else{vBulletin.ckeditor.fireCallbacks(editorId,options,"error");if(!options.hideLoadingDialog){vBulletin.ckeditor.hideLoadingDialog(editorId)}}};if(typeof vBulletin.ckeditor.doInitEditor!="function"&&!window.CKEDITOR){vBulletin.AJAX({url:vBulletin.getAjaxBaseurl()+"/ajax/render/ckeditor_javascript",success:function(result){var scripts=[];var src_regex=/src="([^"]+)"/g;while(match=src_regex.exec(result)){scripts.push(match[1])}var fetchScript=function(){if(scripts.length>0){console.log("Ckeditor: Calling getScript for: {0}".format(scripts[0]));$.getScript(scripts[0],function(script,textStatus,jqXHR){if(textStatus!="success"){console.warn("Ckeditor: Error loading "+scripts[0]);fetchScriptError();return false}console.log("Ckeditor: Script loaded: "+scripts[0]);scripts.splice(0,1);fetchScript()}).fail(function(jqXHR,errorType,exception){console.warn("Ckeditor: Error loading script: "+errorType+" Exception: "+exception);fetchScriptError()})}else{onCkeditorScriptLoad()}};fetchScript()},error_phrase:"error_fetching_dialog"})}else{onCkeditorScriptLoad()}};vBulletin.ckeditor.editorExists=function(editorId){return false};vBulletin.ckeditor.isEditorEmpty=function(editorId){return true};vBulletin.ckeditor.resetEditor=function(editorId){return false};vBulletin.ckeditor.getEditorContent=function(editorId){editorId=vBulletin.ckeditor.verifyEditorId(editorId);if(!editorId){return false}if(vBulletin.ckeditor.editorExists(editorId)){var ckEditor=vBulletin.ckeditor.getEditor(editorId);if(ckEditor&&ckEditor.getData){return $.trim(ckEditor.getData())}else{return false}}else{return $.trim($("#"+editorId).val())}};vBulletin.ckeditor.focusEditor=function(editorId){editorId=vBulletin.ckeditor.verifyEditorId(editorId);if(!editorId){return }if(vBulletin.ckeditor.editorExists(editorId)){var ckEditor=vBulletin.ckeditor.getEditor(editorId);if(ckEditor){ckEditor.focus()}}else{$("#"+editorId).focus()}};vBulletin.ckeditor.loadingDialogStack={};vBulletin.ckeditor.showLoadingDialog=function(editorId){if((typeof vBulletin.ckeditor.loadingDialogStack[editorId]!="undefined")&&vBulletin.ckeditor.loadingDialogStack[editorId]){return }vBulletin.ckeditor.loadingDialogStack[editorId]=true;var $domElement=$("#"+editorId);if($domElement.length>0&&$domElement.is(":visible")){$domElement.prop("disabled",true)}window.vBulletin.loadingIndicator.show("vBulletin.ckeditor.showLoadingDialog editorId: "+editorId)};vBulletin.ckeditor.hideLoadingDialog=function(editorId){if((typeof vBulletin.ckeditor.loadingDialogStack[editorId]=="undefined")||!vBulletin.ckeditor.loadingDialogStack[editorId]){return }vBulletin.ckeditor.loadingDialogStack[editorId]=false;$("#"+editorId).prop("disabled",false);window.vBulletin.loadingIndicator.hide("vBulletin.ckeditor.hideLoadingDialog editorId: "+editorId)};vBulletin.ckeditor.generatedIdCounter=0;vBulletin.ckeditor.verifyEditorId=function(editorId){editorId=editorId||"";if(typeof editorId=="string"){return editorId}else{var $el=editorId instanceof $?editorId:$(editorId);if(!$el.attr("id")){++vBulletin.ckeditor.generatedIdCounter;$el.attr("id",("vb-cke-instance-"+vBulletin.ckeditor.generatedIdCounter))}return $el.attr("id")}};vBulletin.ckeditor.initEditorComponents=function(context,ckeditorOnly){context=context||document;$(function(){$(".js-ckeditor-init-on-focus",context).off("focus").on("focus",function(){vBulletin.ckeditor.initEditor($(this))});$(".js-ckeditor-init-on-page-load",context).each(function(){vBulletin.ckeditor.initEditor($(this))});if(ckeditorOnly){return }(function(){var getIconUrl=function(iconId){return $(".js-content-entry-post-icons option",context).filter(function(){return($(this).val()==iconId)}).data("icon-url")};var getIconElement=function(iconId){if(iconId==0){return $(" ").html(vBulletin.phrase.get("no_icon")).get(0)}var iconUrl=getIconUrl(iconId);if(iconUrl){return $(" ").attr("src",iconUrl).attr("alt","").get(0)}else{return""}};$(".js-content-entry-post-icons",context).selectBox().change(function(){var iconId=$(this).val();$(".js-content-entry-post-icons.selectBox-dropdown .selectBox-label",context).html(getIconElement(iconId))});$(".js-content-entry-post-icons-selectBox-dropdown-menu li a",context).each(function(){var iconId=$(this).attr("rel");$(this).html(getIconElement(iconId))});$(".js-content-entry-post-icons",context).trigger("change")})();$(".js-content-entry-prefixes",context).selectBox()})};vBulletin.ckeditor.initEditorComponents(document);$(".js-focus-on-page-load").first().focus();vBulletin.errorAlert=function(title,message){console.log(title,message);openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get(vBulletin.phrase.get(message)),iconType:"error"})};vBulletin.makeErrorAlertCallback=function(title,message){return(function(){vBulletin.errorAlert(title,message)})};vBulletin.AJAX=function(ajaxOptions){var defaultOptions={type:"post",dataType:"json",title_phrase:"error",error_phrase:"error",element:null};$.extend(defaultOptions,ajaxOptions);if(!defaultOptions.error){defaultOptions.error=vBulletin.makeErrorAlertCallback(defaultOptions.title_phrase,defaultOptions.error_phrase)}defaultOptions.success=function(response){if(!response){vBulletin.errorAlert(defaultOptions.title_phrase,"invalid_server_response_please_try_again")}else{if(response&&response.errors){var error=response.errors;if($.isArray(error)&&error.length>0){error=error[0]}if(error=="inlinemodauth_required"){return vBulletin.inlinemod.openAuthDialog(defaultOptions.element)}vBulletin.errorAlert(defaultOptions.title_phrase,["error_x",vBulletin.phrase.get(error)]);if(response.wasNotArray){arguments[0]=arguments[0][0]}return false}else{if(ajaxOptions.success){ajaxOptions.success.apply(this,arguments)}}}};$.ajax(defaultOptions)};vBulletin.ajaxForm=function(ajaxOptions){var defaultOptions={dataType:"json",title_phrase:"error",error_phrase:"error",element:null,complete:function(){$(".button[type=submit]",this).prop("disabled",false)},beforeSerialize:function($form){$(".placeholder",$form).each(function(){var $input=$(this);if($input.val()==$input.attr("placeholder")){$input.val("")}})},beforeSubmit:function(formData,form,options){$(".button[type=submit]",this).prop("disabled",true);return true}};$.extend(defaultOptions,ajaxOptions);if(!defaultOptions.error){defaultOptions.error=vBulletin.makeErrorAlertCallback(defaultOptions.title_phrase,defaultOptions.error_phrase)}defaultOptions.success=function(response){if(response&&response.errors){var error=response.errors;if($.isArray(error)&&error.length>0){error=error[0]}if(error=="inlinemodauth_required"){return vBulletin.inlinemod.openAuthDialog(defaultOptions.element)}vBulletin.errorAlert(defaultOptions.title_phrase,["error_x",vBulletin.phrase.get(error)]);if(response.wasNotArray){arguments[0]=arguments[0][0]}return false}else{if(ajaxOptions.success){ajaxOptions.success.apply(this,arguments)}}};this.ajaxForm(defaultOptions)};window.openAlertDialog=function(params){var $alertDialog=$("#alert-dialog");params=params||{};if(!$alertDialog.data("created")){$alertDialog.dialog({autoOpen:false,modal:true,resizable:false,closeOnEscape:false,showCloseButton:false,dialogClass:"dialog-container alert-dialog-container dialog-box",create:function(){$alertDialog.data("created",true)}})}$alertDialog.dialog("option","width",params.width||500);$alertDialog.dialog("option","title",params.title||"Alert");var $dialogContent=$alertDialog.find(".dialog-content");var $message=$dialogContent.find(".message");var $icon=$dialogContent.find(".icon");var $okButton=$("#btnAlertDialogOK");if(params.maxHeight){$dialogContent.css({"max-height":params.maxHeight,overflow:"auto"})}else{$dialogContent.css({"max-height":"",overflow:""})}if(params.message){$message.html(params.message)}$icon.removeClass(function(index,css){return(css.match(/\S+-icon\b/g)||[]).join(" ")});params.buttonLabel=params.buttonLabel||"OK";$okButton.html(params.buttonLabel);$alertDialog.off("dialogopen").on("dialogopen",function(){$okButton.off("click").on("click",function(){if(typeof params.onBeforeClose=="function"){params.onBeforeClose.apply(this)}$alertDialog.dialog("close")}).focus()});$alertDialog.off("dialogclose").on("dialogclose",function(){if(typeof params.onAfterClose=="function"){params.onAfterClose.apply($okButton)}});switch(params.iconType){case"warning":$icon.addClass("warning-icon vb-icon vb-icon-warning");$icon.show();break;case"error":$icon.addClass("error-icon vb-icon vb-icon-error");$icon.show();break;default:$icon.addClass("no-icon").hide()}$alertDialog.dialog("open");return $alertDialog};window.openConfirmDialog=function(params){params=params||{};var $confirmDialog=$("#confirm-dialog");if(!$confirmDialog.data("created")){$confirmDialog.dialog({autoOpen:false,modal:true,resizable:false,closeOnEscape:false,showCloseButton:false,create:function(){$confirmDialog.data("created",true)}})}$confirmDialog.dialog("option","title",params.title||"Confirmation");var $dialogContent=$confirmDialog.find(".dialog-content");var $message=$dialogContent.find(".message");var $icon=$dialogContent.find(".icon");if(params.message){$message.html(params.message.replace("\n"," "))}$confirmDialog.dialog("option","width",(params.width?params.width:500));$confirmDialog.dialog("option","dialogClass","dialog-container confirm-dialog-container dialog-box "+(params.dialogClass||""));$icon.removeClass(function(index,css){return(css.match(/\S+-icon\b/g)||[]).join(" ")});params.buttonLabel=params.buttonLabel||{};params.buttonLabel.yesLabel=params.buttonLabel.yesLabel||vBulletin.phrase.get("yes");params.buttonLabel.noLabel=params.buttonLabel.noLabel||vBulletin.phrase.get("no");var yesButton=$("#btnConfirmDialogYes").html(params.buttonLabel.yesLabel);var noButton=$("#btnConfirmDialogNo").html(params.buttonLabel.noLabel);if(params.primaryButton=="yes"){yesButton.addClass("primary").removeClass("secondary");noButton.addClass("secondary").removeClass("primary")}else{noButton.addClass("primary").removeClass("secondary");yesButton.addClass("secondary").removeClass("primary")}var btn;$confirmDialog.off("dialogopen").on("dialogopen",function(){var yesButton=$("#btnConfirmDialogYes").off("click").on("click",function(){btn=this;var retYes,retClose;if(typeof params.onClickYes=="function"){retYes=params.onClickYes.apply(this);if(typeof params.onClickYesWithAjax!="undefined"&¶ms.onClickYesWithAjax){return false}}if(retYes===false){return false}if(typeof params.onBeforeClose=="function"){retClose=params.onBeforeClose.apply(this);if(typeof params.onBeforeCloseWithAjax!="undefined"&¶ms.onBeforeCloseWithAjax){return false}}if(retClose===false){return false}$confirmDialog.dialog("close")});if(params.defaultFocus=="yes"){yesButton.focus()}var noButton=$("#btnConfirmDialogNo").off("click").on("click",function(){btn=this;if(typeof params.onClickNo=="function"){params.onClickNo.apply(this)}if(typeof params.onBeforeClose=="function"){params.onBeforeClose.apply(this)}$confirmDialog.dialog("close")});if(params.defaultFocus!="yes"){noButton.focus()}});$confirmDialog.off("dialogclose").on("dialogclose",function(e,ui){if(typeof params.onAfterClose=="function"){params.onAfterClose.apply(btn)}});switch(params.iconType){case"warning":$icon.addClass("warning-icon vb-icon vb-icon-warning");$icon.show();break;case"question":$icon.addClass("question-icon");$icon.show();break;default:$icon.addClass("no-icon").hide()}$confirmDialog.dialog("open");return $confirmDialog};window.openPromptDialog=function(params){var $promptDialog=$("#prompt-dialog");if(!$promptDialog.data("created")){$promptDialog.dialog({autoOpen:false,modal:true,resizable:false,closeOnEscape:false,showCloseButton:false,width:500,dialogClass:"dialog-container prompt-dialog-container dialog-box",create:function(){$promptDialog.data("created",true)}})}params=params||{};$promptDialog.dialog("option","title",params.title||"Prompt");var $dialogContent=$promptDialog.find(".dialog-content"),$message=$dialogContent.find(".message"),$input;if(params.message){$message.html(params.message)}var inputVal=params.initialValue||"";if(!params.multiline){$input=$promptDialog.find("input.input-box").val(inputVal).removeClass("h-hide");$input.next().addClass("h-hide");if(Number(params.maxlength)){$input.attr("maxlength",Number(params.maxlength))}else{$input.removeAttr("maxlength")}$dialogContent.addClass("table");$dialogContent.find("> div").addClass("td")}else{$input=$promptDialog.find("textarea.input-box").val(inputVal).removeClass("h-hide");$input.prev().addClass("h-hide");$dialogContent.removeClass("table");$dialogContent.find("> .td").removeClass("td")}params.buttonLabel=params.buttonLabel||{};params.buttonLabel.okLabel=params.buttonLabel.okLabel||"OK";params.buttonLabel.cancelLabel=params.buttonLabel.cancelLabel||"Cancel";var okButton=$("#btnPromptDialogOK").html(params.buttonLabel.okLabel),cancelButton=$("#btnPromptDialogCancel").html(params.buttonLabel.cancelLabel),btn;$promptDialog.off("dialogopen").on("dialogopen",function(){var okButton=$("#btnPromptDialogOK").off("click").on("click",function(){btn=this;var inputValue=$.trim($input.val()),retClose,retYes;if(params.validation&&typeof params.validation=="object"){if(params.validation.override&&typeof params.validation.custom=="function"){if(!params.validation.custom.apply(this,[$input])){return false}}else{switch(params.validation.type){case"number":inputValue=Number(inputValue);if(isNaN(inputValue)){if(params.validation.showError){openAlertDialog({title:$promptDialog.dialog("option","title"),message:"Input must be a number.",iconType:"warning",onAfterClose:function(){$input.trigger("select").trigger("focus")}})}else{$input.trigger("select").trigger("focus")}return false}if(params.validation.range&&typeof params.validation.range=="object"){if(inputValueparams.validation.range.max){if(params.validation.showError){openAlertDialog({title:$promptDialog.dialog("option","title"),message:"Input must be within "+params.validation.range.min+" - "+params.validation.range.max+" only.",iconType:"warning",onAfterClose:function(){$input.trigger("select").trigger("focus")}})}else{$input.trigger("select").trigger("focus")}return false}}break;case"string":default:if(!inputValue){if(params.validation.showError){openAlertDialog({title:$promptDialog.dialog("option","title"),message:"Input required.",iconType:"warning",onAfterClose:function(){$input.trigger("select").trigger("focus")}})}else{$input.trigger("select").trigger("focus")}return false}else{if(params.multiline&&inputValue.length>params.maxlength){if(params.validation.showError){openAlertDialog({title:$promptDialog.dialog("option","title"),message:"Input too long. Maximum allowed is "+params.maxlength+" characters.",iconType:"warning",onAfterClose:function(){$input.trigger("select").trigger("focus")}})}else{$input.trigger("select").trigger("focus")}return false}}}if(params.validation.set&&$.isArray(params.validation.set)&¶ms.validation.set.length>0){if($.inArray(inputValue,params.validation.set)==-1){if(params.validation.showError){openAlertDialog({title:$promptDialog.dialog("option","title"),message:"Input must be one of these: "+params.validation.set.join(", ")+".",iconType:"warning",onAfterClose:function(){$input.trigger("select").trigger("focus")}})}else{$input.trigger("select").trigger("focus")}return false}}if(typeof params.validation.custom=="function"){if(!params.validation.custom.apply(this,[$input])){return false}}}}if(typeof params.onClickOK=="function"){retYes=params.onClickOK.apply(this,[inputValue]);if(typeof params.onClickOKWithAjax!="undefined"&¶ms.onClickOKWithAjax){return false}}if(retYes===false){return false}if(typeof params.onBeforeClose=="function"){retClose=params.onBeforeClose.apply(this);if(typeof params.onBeforeCloseWithAjax!="undefined"&¶ms.onBeforeCloseWithAjax){return false}}if(retClose===false){return false}$promptDialog.dialog("close")}).trigger("focus");var cancelButton=$("#btnPromptDialogCancel").off("click").on("click",function(){btn=this;if(typeof params.onClickCancel=="function"){params.onClickCancel.apply(this)}if(typeof params.onBeforeClose=="function"){params.onBeforeClose.apply(this)}$promptDialog.dialog("close")})});$promptDialog.off("dialogclose").on("dialogclose",function(){if(typeof params.onAfterClose=="function"){params.onAfterClose.apply(btn);$input.val("")}});$promptDialog.dialog("open");$input.trigger("focus");return $promptDialog};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(formSelector){return $(formSelector).on("reset",function(e,callback){if(typeof callback=="function"){callback()}})};setTimeout(function(){if(!$.support.selectstart){$.fn.extend({disableSelection:function(){return this.each(function(){$(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(){$(this).css({"-moz-user-select":"","-webkit-user-select":"","-khtml-user-select":"","-o-user-select":"","user-select":""})})}})}function initPage(){window.vBulletin.loadingIndicator.init();var loadSiteBuilderStyle=function(){$.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/render/stylesheet_block",data:{"cssFiles[]":["sitebuilder-after.css"]},type:"POST",dataType:"json",success:function(response){$("head").append(response)}})};$(document).off("click","a.animate-scroll").on("click","a.animate-scroll",function(){var check=vBulletin.scrollToAnchor(this.hash);if(check){window.location.href=this.href}return false});var splitButtonClickHandler=function(e){$(this).closest(".split-button").toggleClass("open").find(".submenu").toggleClass("h-hide");$("body").off("click.buttonset").on("click.buttonset",function(e){if($(e.target).closest(".split-button").length==0){$(".split-button").removeClass("open").find(".submenu").addClass("h-hide");$("body").off("click.buttonset")}})};$(".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",splitButtonClickHandler).closest(".button-set").buttonset().filter(".one-click").find(".button-text").on("click",splitButtonClickHandler);$(document).off("click",".canvas-widget .toggle-button").on("click",".canvas-widget .toggle-button",function(e,noAnimation){var $btn=$(this),$canvasWidget=$btn.closest(".canvas-widget");if($btn.hasClass("expand")){if(noAnimation){$(".widget-content",$canvasWidget).show()}else{$(".widget-content",$canvasWidget).slideDown("slow")}$canvasWidget.removeClass("collapsed")}else{if(noAnimation){$(".widget-content",$canvasWidget).hide()}else{$(".widget-content",$canvasWidget).slideUp("slow")}$canvasWidget.addClass("collapsed")}$btn.toggleClass("collapse expand");var currentTooltip=$btn.attr("title");$btn.attr("title",$btn.data("toggle-title")).data("toggle-title",currentTooltip);return false});$(".conversation-toolbar-wrapper form.toolbar-filter-overlay").trigger("reset");var nativePlaceholderSupported=!!("placeholder" in document.createElement("input"));if(!nativePlaceholderSupported){var $placeholderFields=$("input[placeholder], textarea[placeholder]");$placeholderFields.filter(":focus").addClass("js-temp-focus").blur();$placeholderFields.placeholder();var setFocusBack=function(removeFocusClass){var $focusedField=$placeholderFields.filter(".js-temp-focus").focus();if(removeFocusClass){$focusedField.removeClass("js-temp-focus")}};$(window).on("load.placeholder_temp",function(){setFocusBack(true);$(window).off("load.placeholder_temp")});setFocusBack()}if($("textarea.autogrow").length>0){$("textarea.autogrow").elastic().off("blur.elastic")}$(".edit-switch-container .switch-control").on("mousedown",function(e){var $self=$(this);if($self.closest("ul").hasClass("h-disabled")){return true}if($self.hasClass("on")){$.removeCookie(pageData.sb_state_cookie,{path:pageData.cookie_path,domain:pageData.cookie_domain});$("#main-navbar .main-nav").hide();$self.removeClass("on");return true}loadSiteBuilderStyle();if($("#main-navbar .main-nav li").length>0){$("#main-navbar .main-nav").show();$self.addClass("on");$.cookie(pageData.sb_state_cookie,"1",{path:pageData.cookie_path,domain:pageData.cookie_domain});return true}loadSitebuilderMarkup(true);return true});$("select.custom-dropdown").selectBox();$(document).off("keypress",".js-button").on("keypress",".js-button",function(e){if(e.which==32||e.which==13){if(e.target&&e.target.nodeName&&(e.target.nodeName+"").toLowerCase()=="label"&&$(e.target).find("input").length==1){$(e.target).find("input").trigger("click")}else{$(this).trigger("click")}e.preventDefault()}});$(document).off("keypress",".js-link").on("keypress",".js-link",function(e){if(e.which==13){$(this).trigger("click");e.preventDefault()}});$(".mainmenu li:has(.submenu)").on("click",function(e){$(".submenu",this).show();return false}).hover(function(){},function(e){$(".submenu",this).hide()});$(".mainmenu.textControls li").on("click",function(e){if($(".tagCtrl",this).length==0){$("#tag-dialog").hide()}});$(".mainmenu .submenu li a").on("click",function(e){$(this).closest(".submenu").hide()});$(".channel-content-widget .new-conversation-btn").off("click").on("click",function(){window.location.href=pageData.baseurl+"/new-content/"+pageData.channelid});$(".pagenav-form").submit(function(){if(Number(this.page.value)>0){location.href=this.action+"&p="+this.page.value}return false}).trigger("reset");$(".toolbar-pagenav").off("keydown",".toolbar-pagenav input").on("keydown",".toolbar-pagenav input",function(e){var key=e.which;if(!e.shiftKey&&!e.altKey&&!e.ctrlKey&&((key>=48&&key<=57)||(key>=96&&key<=105)||key==8||key==9||key==13||key==35||key==36||key==37||key==39||key==46||key==45)){return true}return false});$(document).off("click",".js-post__manage").on("click",".js-post__manage",function(){vBulletin.inlinemod.manage_deleted_form.apply(this)});$(document).off("click",".js-post__show-hide").on("click",".js-post__show-hide",function(){var $self=$(this),origText=$self.text(),toggleText=$self.data("toggle-text");if($self.hasClass("js-post__show-hide--show")){$self.closest(".js-post").addClass("b-post--show-deleted-content");$self.html(toggleText).data("toggle-text",origText).removeClass("js-post__show-hide--show")}else{$self.closest(".js-post").removeClass("b-post--show-deleted-content");$self.html(toggleText).data("toggle-text",origText).addClass("js-post__show-hide--show")}});$(document).off("click","a.video-frame").on("click","a.video-frame",function(e){e.preventDefault();var data={code:this.getAttribute("data-vcode"),provider:this.getAttribute("data-vprovider")};if(this.getAttribute("data-height")){data.height=this.getAttribute("data-height")}if(this.getAttribute("data-width")){data.width=this.getAttribute("data-width")}var videocontainer=$(this);$.get(vBulletin.getAjaxBaseurl()+"/ajax/render/bbcode_video",data,function(template){if(template){videocontainer.replaceWith(template)}},"json")});if($(".js-content-entry-tag-editor").length>0&&vBulletin.tagEditor){new vBulletin.tagEditor.instance(".js-content-entry-tag-editor")}vBulletin.markreadcheck();$(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"})}},$(this));return false})}function replaceSecurityToken(){window.clearTimeout(securitytoken_timeout);if(pageData.securitytoken!="guest"){var securitytoken_timeout=window.setTimeout(replaceSecurityToken,3600000);$.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/replace-securitytoken",data:{securitytoken:pageData.securitytoken},type:"POST",dataType:"json",success:function(result){if(result&&!result.error){var securitytoken_errors=0;doReplaceSecurityToken(result.newtoken)}else{console.log("/ajax/replace-securitytoken, error: "+error);if(++securitytoken_errors==3){doReplaceSecurityToken("guest")}}},error:function(xhr,statusText,error){console.log("/ajax/replace-securitytoken, error: "+error);if(++securitytoken_errors==3){doReplaceSecurityToken("guest")}}})}}function doReplaceSecurityToken(newtoken){if(newtoken==""){return }$("form").each(function(){var frm=$(this);if(typeof (this.method)!="undefined"&&this.method.toLowerCase()=="post"){if(frm.find('input[name="securitytoken"]').length){frm.find('input[name="securitytoken"]').val(newtoken)}else{frm.append(' ')}}});pageData.securitytoken=newtoken;console.log("Securitytoken updated")}function afterInit(){if(vBulletin.options.get("crontab")){if(pageData.nextcron<=pageData.current_server_datetime){vBulletin.loadingIndicator.suppressNextAjaxIndicator();$.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/api/cron/run",type:"POST",dataType:"json",success:function(result){if(result&&result.errors){console.warn("Cron error: "+vBulletin.phrase.get(result.errors[0][0]))}console.log("Cron run successfully.")},error:function(xhr,statusText,error){console.warn("Error when running cron: {0}".format(error))}})}else{}}}function loadSitebuilderMarkup(noLoadingDialog){$("body").css("cursor","wait");if(!noLoadingDialog){window.vBulletin.loadingIndicator.show()}$.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/activate-sitebuilder",data:({pageid:pageData.pageid,nodeid:pageData.nodeid}),type:"POST",dataType:"json",cache:false,complete:function(){console.log("activate-sitebuilder complete.");$("body").css("cursor","auto");if(!noLoadingDialog){window.vBulletin.loadingIndicator.hide()}},success:function(result){console.log("activate-sitebuilder successful! result:"+JSON.stringify(result));if(result&&result.menu&&result.template){$(".edit-switch-container .switch-control").addClass("on");$("#main-navbar .main-nav").hide().html(result.menu);$("#sitebuilder-wrapper").html(result.template);$("#main-navbar .main-nav").show();$.cookie(pageData.sb_state_cookie,"1",{path:pageData.cookie_path,domain:pageData.cookie_domain})}else{console.log("activating sitebuilder failed!");openAlertDialog({title:"Error",message:"Error activating SiteBuilder. Please try again.",iconType:"error"})}},error:function(xhr,statusText,error){console.log("activating sitebuilder failed! error:"+error);openAlertDialog({title:"Error",message:"Error activating SiteBuilder. (Error code {0}) Please try again.".format(xhr.status),iconType:"error"})}})}initPage();$("#searchPopupControl").on("click",function(e){if($(this).hasClass("open")){$(this).removeClass("open");$("#searchPopupContent").hide()}else{$(this).addClass("open");$("#searchPopupContent").show()}});$("html").on("click",function(e){if($(e.target).closest("#searchForm").size()==0&&$("#searchPopupControl").hasClass("open")){$("#searchPopupControl").removeClass("open");$("#searchPopupContent").hide()}});$("#btnAdvSearch").off("click").on("click",function(e){e.preventDefault();$(this).data("clicked2submit",1);var $searchForm=$("#searchForm");$searchForm.attr("action",$searchForm.attr("action")+"&AdvSearch=1");$("#searchForm").submit()});$("#searchForm").off("submit.searchform").on("submit.searchform",function(e){var searchJSON={},searchFields_keywords=$("#q");if($.trim(searchFields_keywords.val()).length>0){searchJSON.keywords=$.trim(searchFields_keywords.val())}else{if(!$("#btnAdvSearch").data("clicked2submit")){openAlertDialog({title:vBulletin.phrase.get("search"),message:vBulletin.phrase.get("please_provide_search_string"),iconType:"warning",onAfterClose:function(){$("#searchForm #q").focus()}});e.stopPropagation();return false}}var container=$(this).find("#searchPopupContent"),searchFields_title_only=container.find(".searchFields_title_only");if(searchFields_title_only.size()>0&&searchFields_title_only.prop("checked")){searchJSON.title_only=1}var searchFields_author=container.find(".searchFields_author");if(searchFields_author.size()>0&&searchFields_author.prop("checked")){searchJSON.author=[searchFields_author.val()]}var searchFields_channel=container.find(".searchFields_channel");if(searchFields_channel.size()>0&&searchFields_channel.prop("checked")){searchJSON.channel=[searchFields_channel.val()]}container.find("input[name=searchJSON]").val(JSON.stringify(searchJSON));return true});$(".history-backbutton").off("click").on("click",function(e){history.back()});$(".popupControl[popup-body]").off("click").on("click",function(e){var popupBodyClass=$(this).attr("popup-body");if(!popupBodyClass){return false}var popupBody=$(this).parent().find("."+popupBodyClass);if(!popupBody){return false}$(popupBody).toggleClass("h-hide")});var np_notices_displayed;if(!(np_notices_displayed=$.cookie(pageData.cookie_prefix+"np_notices_displayed"))){np_notices_displayed=new Array()}if(!(np_notices_displayed instanceof Array)){np_notices_displayed=new Array(np_notices_displayed)}$('ul.notices li[data-notice-persistent="0"]').each(function(index){np_notices_displayed.push($(this).attr("data-notice-id"))});if(np_notices_displayed.length>0){$.cookie(pageData.cookie_prefix+"np_notices_displayed",np_notices_displayed,{path:pageData.cookie_path,domain:pageData.cookie_domain})}else{$.cookie(pageData.cookie_prefix+"np_notices_displayed",null,{path:pageData.cookie_path,domain:pageData.cookie_domain})}$("ul.notices > li > .close").off("click").on("click",function(e){var noticeli=$(this).closest("li"),noticeid=noticeli.attr("data-notice-id");$("body").css("cursor","wait");$.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/api/notice/dismiss",data:{noticeid:noticeid},type:"POST",dataType:"json",complete:function(){$("body").css("cursor","auto")},success:function(result){if(result&&!result.error){console.log("Notice dismissed successfully!");noticeli.hide("slow",function(){if($(this).parent().find(">li:visible").length==0){$(this).parent().addClass("h-hide")}})}},error:function(xhr,statusText,error){console.log("Notice dismissed failed! error:"+error);openAlertDialog({title:"Error",message:"Error dismissing the notice.",iconType:"error"})}})});$("#frmActivateuser").ajaxForm({dataType:"json",beforeSubmit:function(formData,form,options){var error="",focusfield="";if($.trim($(".username",form).val())==""){error=vBulletin.phrase.get("please_enter_a_username");focusfield=".username"}else{if($.trim($(".activateid",form).val())==""){error=vBulletin.phrase.get("requiredfieldmissing",vBulletin.phrase.get("activation_code"));focusfield=".activateid"}}if(error){openAlertDialog({title:vBulletin.phrase.get("error"),message:error,iconType:"warning",onAfterClose:function(){$(focusfield,form).focus()}});return false}return true},success:function(response,statusText,xhr,$form){if(response&&response.response&&response.response.errors){var errors=[];for(var x in response.response.errors){if(response.response.errors[x][0]!="exception_trace"&&response.response.errors[x][0]!="errormsg"){errors.push(vBulletin.phrase.get(response.response.errors[x]))}}openAlertDialog({title:vBulletin.phrase.get("error"),message:errors.join(" "),iconType:"warning",onAfterClose:function(){vBulletin.hv.reset(true)}})}else{var messagephraseparams=response.response.msg_params;messagephraseparams.unshift(response.response.msg);openAlertDialog({title:vBulletin.phrase.get("activate_your_account"),message:vBulletin.phrase.get.apply(vBulletin.phrase,messagephraseparams),onAfterClose:function(){window.location.href=pageData.baseurl}})}}});$("#frmActivateemail").ajaxForm({dataType:"json",beforeSubmit:function(formData,form,options){var error="",focusfield="";if($.trim($(".email",form).val())==""){error=vBulletin.phrase.get("please_enter_your_email_address")}else{if(!isValidEmailAddress($(".email",form).val())){error=vBulletin.phrase.get("invalid_email_address")}}if(error){openAlertDialog({title:vBulletin.phrase.get("error"),message:error,iconType:"warning",onAfterClose:function(){$(focusfield,form).focus()}});return false}return true},success:function(response,statusText,xhr,$form){if(response&&response.response&&response.response.errors){var errors=[];for(var x in response.response.errors){if(response.response.errors[x][0]!="exception_trace"&&response.response.errors[x][0]!="errormsg"){errors.push(vBulletin.phrase.get(response.response.errors[x]))}}openAlertDialog({title:vBulletin.phrase.get("error"),message:errors.join(" "),iconType:"warning",onAfterClose:function(){vBulletin.hv.reset(true)}})}else{var messagephraseparams=response.response.msg_params;messagephraseparams.unshift(response.response.msg);openAlertDialog({title:vBulletin.phrase.get("email_activation_codes"),message:vBulletin.phrase.get.apply(vBulletin.phrase,messagephraseparams),onAfterClose:function(){window.location.href=pageData.baseurl}})}}});var styleid=$.cookie(pageData.cookie_prefix+"userstyleid");if(styleid){$(".stylechooser").val(styleid)}$(".stylechooser").change(function(){var styleid=$("option:selected",$(this)).val(),expiredate=new Date();expiredate.setDate(expiredate.getDate()+365);$.cookie(pageData.cookie_prefix+"userstyleid",styleid,{path:pageData.cookie_path,domain:pageData.cookie_domain,expires:expiredate});window.location.reload()});var languageid=$.cookie(pageData.cookie_prefix+"languageid");if(languageid){$(".languagechooser").val(languageid)}$(".languagechooser").change(function(){var languageid=$("option:selected",$(this)).val(),expiredate=new Date();expiredate.setDate(expiredate.getDate()+365);$.cookie(pageData.cookie_prefix+"languageid",languageid,{path:pageData.cookie_path,domain:pageData.cookie_domain,expires:expiredate});window.location.reload()});$("a.navbar_profile").on("click",function(){if(pageData.userid=="0"){$("#lnkLoginSignupMenu").click();return false}});doReplaceSecurityToken(pageData.securitytoken);var securitytoken_timeout=window.setTimeout(replaceSecurityToken,3600000),securitytoken_errors=0;if(!vBulletin.ckeditor.checkEnvironment()){$(".b-content-entry").find("li[data-panel=b-content-entry-panel__content--toggle-editor]").addClass("h-hide")}setTimeout(afterInit,5)},1);vBulletin.getQueryString=function(a){if(a==""){return{}}var b={};for(var i=0;i0){A=$("
").text(B).html()}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+"http://"+(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