// ***************************
// js.compressed/jquery/jquery-ui-1.8.14.custom.min.js
// ***************************
/*!
 * jQuery UI 1.8.14
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI
 */
/*
 * Modified for vBulletin. Added the following:
 * - ability to show/hide the Dialog 'X' button via 'showCloseButton' option.
 * - ability to show/hide the Dialog title bar via 'showTitleBar' option.
 * - ability to skip (designated by 'ui-tabs-skip' class) the first <ul> or <ol> that the Tabs plugin uses by default when tabifying content.
 */
(function(a,b){function c(b,c){var e=b.nodeName.toLowerCase();if("area"===e){var f=b.parentNode,g=f.name,h;if(!b.href||!g||f.nodeName.toLowerCase()!=="map"){return false}h=a("img[usemap=#"+g+"]")[0];return!!h&&d(h)}return(/input|select|textarea|button|object/.test(e)?!b.disabled:"a"==e?b.href||c:c)&&d(b)}function d(b){return!a(b).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}a.ui=a.ui||{};if(a.ui.version){return}a.extend(a.ui,{version:"1.8.14",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});a.fn.extend({_focus:a.fn.focus,focus:function(b,c){return typeof b==="number"?this.each(function(){var d=this;setTimeout(function(){a(d).focus();if(c){c.call(d)}},b)}):this._focus.apply(this,arguments)},scrollParent:function(){var b;if(a.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))){b=this.parents().filter(function(){return/(relative|absolute|fixed)/.test(a.curCSS(this,"position",1))&&/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}else{b=this.parents().filter(function(){return/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}return/fixed/.test(this.css("position"))||!b.length?a(document):b},zIndex:function(c){if(c!==b){return this.css("zIndex",c)}if(this.length){var d=a(this[0]),e,f;while(d.length&&d[0]!==document){e=d.css("position");if(e==="absolute"||e==="relative"||e==="fixed"){f=parseInt(d.css("zIndex"),10);if(!isNaN(f)&&f!==0){return f}}d=d.parent()}}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});a.each(["Width","Height"],function(c,d){function h(b,c,d,f){a.each(e,function(){c-=parseFloat(a.curCSS(b,"padding"+this,true))||0;if(d){c-=parseFloat(a.curCSS(b,"border"+this+"Width",true))||0}if(f){c-=parseFloat(a.curCSS(b,"margin"+this,true))||0}});return c}var e=d==="Width"?["Left","Right"]:["Top","Bottom"],f=d.toLowerCase(),g={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};a.fn["inner"+d]=function(c){if(c===b){return g["inner"+d].call(this)}return this.each(function(){a(this).css(f,h(this,c)+"px")})};a.fn["outer"+d]=function(b,c){if(typeof b!=="number"){return g["outer"+d].call(this,b)}return this.each(function(){a(this).css(f,h(this,b,true,c)+"px")})}});a.extend(a.expr[":"],{data:function(b,c,d){return!!a.data(b,d[3])},focusable:function(b){return c(b,!isNaN(a.attr(b,"tabindex")))},tabbable:function(b){var d=a.attr(b,"tabindex"),e=isNaN(d);return(e||d>=0)&&c(b,!e)}});a(function(){var b=document.body,c=b.appendChild(c=document.createElement("div"));a.extend(c.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});a.support.minHeight=c.offsetHeight===100;a.support.selectstart="onselectstart"in c;b.removeChild(c).style.display="none"});a.extend(a.ui,{plugin:{add:function(b,c,d){var e=a.ui[b].prototype;for(var f in d){e.plugins[f]=e.plugins[f]||[];e.plugins[f].push([c,d[f]])}},call:function(a,b,c){var d=a.plugins[b];if(!d||!a.element[0].parentNode){return}for(var e=0;e<d.length;e++){if(a.options[d[e][0]]){d[e][1].apply(a.element,c)}}}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(b,c){if(a(b).css("overflow")==="hidden"){return false}var d=c&&c==="left"?"scrollLeft":"scrollTop",e=false;if(b[d]>0){return true}b[d]=1;e=b[d]>0;b[d]=0;return e},isOverAxis:function(a,b,c){return a>b&&a<b+c},isOver:function(b,c,d,e,f,g){return a.ui.isOverAxis(b,d,f)&&a.ui.isOverAxis(c,e,g)}})})(jQuery);(function(a,b){if(a.cleanData){var c=a.cleanData;a.cleanData=function(b){for(var d=0,e;(e=b[d])!=null;d++){a(e).triggerHandler("remove")}c(b)}}else{var d=a.fn.remove;a.fn.remove=function(b,c){return this.each(function(){if(!c){if(!b||a.filter(b,[this]).length){a("*",this).add([this]).each(function(){a(this).triggerHandler("remove")})}}return d.call(a(this),b,c)})}}a.widget=function(b,c,d){var e=b.split(".")[0],f;b=b.split(".")[1];f=e+"-"+b;if(!d){d=c;c=a.Widget}a.expr[":"][f]=function(c){return!!a.data(c,b)};a[e]=a[e]||{};a[e][b]=function(a,b){if(arguments.length){this._createWidget(a,b)}};var g=new c;g.options=a.extend(true,{},g.options);a[e][b].prototype=a.extend(true,g,{namespace:e,widgetName:b,widgetEventPrefix:a[e][b].prototype.widgetEventPrefix||b,widgetBaseClass:f},d);a.widget.bridge(b,a[e][b])};a.widget.bridge=function(c,d){a.fn[c]=function(e){var f=typeof e==="string",g=Array.prototype.slice.call(arguments,1),h=this;e=!f&&g.length?a.extend.apply(null,[true,e].concat(g)):e;if(f&&e.charAt(0)==="_"){return h}if(f){this.each(function(){var d=a.data(this,c),f=d&&a.isFunction(d[e])?d[e].apply(d,g):d;if(f!==d&&f!==b){h=f;return false}})}else{this.each(function(){var b=a.data(this,c);if(b){b.option(e||{})._init()}else{a.data(this,c,new d(e,this))}})}return h}};a.Widget=function(a,b){if(arguments.length){this._createWidget(a,b)}};a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(b,c){a.data(c,this.widgetName,this);this.element=a(c);this.options=a.extend(true,{},this.options,this._getCreateOptions(),b);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return a.metadata&&a.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled "+"ui-state-disabled")},widget:function(){return this.element},option:function(c,d){var e=c;if(arguments.length===0){return a.extend({},this.options)}if(typeof c==="string"){if(d===b){return this.options[c]}e={};e[c]=d}this._setOptions(e);return this},_setOptions:function(b){var c=this;a.each(b,function(a,b){c._setOption(a,b)});return this},_setOption:function(a,b){this.options[a]=b;if(a==="disabled"){this.widget()[b?"addClass":"removeClass"](this.widgetBaseClass+"-disabled"+" "+"ui-state-disabled").attr("aria-disabled",b)}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(b,c,d){var e=this.options[b];c=a.Event(c);c.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase();d=d||{};if(c.originalEvent){for(var f=a.event.props.length,g;f;){g=a.event.props[--f];c[g]=c.originalEvent[g]}}this.element.trigger(c,d);return!(a.isFunction(e)&&e.call(this.element[0],c,d)===false||c.isDefaultPrevented())}}})(jQuery);(function(a,b){var c=false;a(document).mousedown(function(a){c=false});a.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var b=this;this.element.bind("mousedown."+this.widgetName,function(a){return b._mouseDown(a)}).bind("click."+this.widgetName,function(c){if(true===a.data(c.target,b.widgetName+".preventClickEvent")){a.removeData(c.target,b.widgetName+".preventClickEvent");c.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(b){if(c){return}this._mouseStarted&&this._mouseUp(b);this._mouseDownEvent=b;var d=this,e=b.which==1,f=typeof this.options.cancel=="string"?a(b.target).closest(this.options.cancel).length:false;if(!e||f||!this._mouseCapture(b)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){d.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)){this._mouseStarted=this._mouseStart(b)!==false;if(!this._mouseStarted){b.preventDefault();return true}}if(true===a.data(b.target,this.widgetName+".preventClickEvent")){a.removeData(b.target,this.widgetName+".preventClickEvent")}this._mouseMoveDelegate=function(a){return d._mouseMove(a)};this._mouseUpDelegate=function(a){return d._mouseUp(a)};a(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);b.preventDefault();c=true;return true},_mouseMove:function(b){if(a.browser.msie&&!(document.documentMode>=9)&&!b.button){return this._mouseUp(b)}if(this._mouseStarted){this._mouseDrag(b);return b.preventDefault()}if(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)){this._mouseStarted=this._mouseStart(this._mouseDownEvent,b)!==false;this._mouseStarted?this._mouseDrag(b):this._mouseUp(b)}return!this._mouseStarted},_mouseUp:function(b){a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;if(b.target==this._mouseDownEvent.target){a.data(b.target,this.widgetName+".preventClickEvent",true)}this._mouseStop(b)}return false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(a){return this.mouseDelayMet},_mouseStart:function(a){},_mouseDrag:function(a){},_mouseStop:function(a){},_mouseCapture:function(a){return true}})})(jQuery);(function(a,b){a.ui=a.ui||{};var c=/left|center|right/,d=/top|center|bottom/,e="center",f=a.fn.position,g=a.fn.offset;a.fn.position=function(b){if(!b||!b.of){return f.apply(this,arguments)}b=a.extend({},b);var g=a(b.of),h=g[0],i=(b.collision||"flip").split(" "),j=b.offset?b.offset.split(" "):[0,0],k,l,m;if(h.nodeType===9){k=g.width();l=g.height();m={top:0,left:0}}else if(h.setTimeout){k=g.width();l=g.height();m={top:g.scrollTop(),left:g.scrollLeft()}}else if(h.preventDefault){b.at="left top";k=l=0;m={top:b.of.pageY,left:b.of.pageX}}else{k=g.outerWidth();l=g.outerHeight();m=g.offset()}a.each(["my","at"],function(){var a=(b[this]||"").split(" ");if(a.length===1){a=c.test(a[0])?a.concat([e]):d.test(a[0])?[e].concat(a):[e,e]}a[0]=c.test(a[0])?a[0]:e;a[1]=d.test(a[1])?a[1]:e;b[this]=a});if(i.length===1){i[1]=i[0]}j[0]=parseInt(j[0],10)||0;if(j.length===1){j[1]=j[0]}j[1]=parseInt(j[1],10)||0;if(b.at[0]==="right"){m.left+=k}else if(b.at[0]===e){m.left+=k/2}if(b.at[1]==="bottom"){m.top+=l}else if(b.at[1]===e){m.top+=l/2}m.left+=j[0];m.top+=j[1];return this.each(function(){var c=a(this),d=c.outerWidth(),f=c.outerHeight(),g=parseInt(a.curCSS(this,"marginLeft",true))||0,h=parseInt(a.curCSS(this,"marginTop",true))||0,n=d+g+(parseInt(a.curCSS(this,"marginRight",true))||0),o=f+h+(parseInt(a.curCSS(this,"marginBottom",true))||0),p=a.extend({},m),q;if(b.my[0]==="right"){p.left-=d}else if(b.my[0]===e){p.left-=d/2}if(b.my[1]==="bottom"){p.top-=f}else if(b.my[1]===e){p.top-=f/2}p.left=Math.round(p.left);p.top=Math.round(p.top);q={left:p.left-g,top:p.top-h};a.each(["left","top"],function(c,e){if(a.ui.position[i[c]]){a.ui.position[i[c]][e](p,{targetWidth:k,targetHeight:l,elemWidth:d,elemHeight:f,collisionPosition:q,collisionWidth:n,collisionHeight:o,offset:j,my:b.my,at:b.at})}});if(a.fn.bgiframe){c.bgiframe()}c.offset(a.extend(p,{using:b.using}))})};a.ui.position={fit:{left:function(b,c){var d=a(window),e=c.collisionPosition.left+c.collisionWidth-d.width()-d.scrollLeft();b.left=e>0?b.left-e:Math.max(b.left-c.collisionPosition.left,b.left)},top:function(b,c){var d=a(window),e=c.collisionPosition.top+c.collisionHeight-d.height()-d.scrollTop();b.top=e>0?b.top-e:Math.max(b.top-c.collisionPosition.top,b.top)}},flip:{left:function(b,c){if(c.at[0]===e){return}var d=a(window),f=c.collisionPosition.left+c.collisionWidth-d.width()-d.scrollLeft(),g=c.my[0]==="left"?-c.elemWidth:c.my[0]==="right"?c.elemWidth:0,h=c.at[0]==="left"?c.targetWidth:-c.targetWidth,i=-2*c.offset[0];b.left+=c.collisionPosition.left<0?g+h+i:f>0?g+h+i:0},top:function(b,c){if(c.at[1]===e){return}var d=a(window),f=c.collisionPosition.top+c.collisionHeight-d.height()-d.scrollTop(),g=c.my[1]==="top"?-c.elemHeight:c.my[1]==="bottom"?c.elemHeight:0,h=c.at[1]==="top"?c.targetHeight:-c.targetHeight,i=-2*c.offset[1];b.top+=c.collisionPosition.top<0?g+h+i:f>0?g+h+i:0}}};if(!a.offset.setOffset){a.offset.setOffset=function(b,c){if(/static/.test(a.curCSS(b,"position"))){b.style.position="relative"}var d=a(b),e=d.offset(),f=parseInt(a.curCSS(b,"top",true),10)||0,g=parseInt(a.curCSS(b,"left",true),10)||0,h={top:c.top-e.top+f,left:c.left-e.left+g};if("using"in c){c.using.call(b,h)}else{d.css(h)}};a.fn.offset=function(b){var c=this[0];if(!c||!c.ownerDocument){return null}if(b){return this.each(function(){a.offset.setOffset(this,b)})}return g.call(this)}}})(jQuery);(function(a,b){a.widget("ui.draggable",a.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper=="original"&&!/^(?:r|a|f)/.test(this.element.css("position")))this.element[0].style.position="relative";this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(!this.element.data("draggable"))return;this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable"+" ui-draggable-dragging"+" ui-draggable-disabled");this._mouseDestroy();return this},_mouseCapture:function(b){var c=this.options;if(this.helper||c.disabled||a(b.target).is(".ui-resizable-handle"))return false;this.handle=this._getHandle(b);if(!this.handle)return false;a(c.iframeFix===true?"iframe":c.iframeFix).each(function(){a('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(a(this).offset()).appendTo("body")});return true},_mouseStart:function(b){var c=this.options;this.helper=this._createHelper(b);this._cacheHelperProportions();if(a.ui.ddmanager)a.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(b);this.originalPageX=b.pageX;this.originalPageY=b.pageY;c.cursorAt&&this._adjustOffsetFromHelper(c.cursorAt);if(c.containment)this._setContainment();if(this._trigger("start",b)===false){this._clear();return false}this._cacheHelperProportions();if(a.ui.ddmanager&&!c.dropBehaviour)a.ui.ddmanager.prepareOffsets(this,b);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(b,true);if(a.ui.ddmanager)a.ui.ddmanager.dragStart(this,b);return true},_mouseDrag:function(b,c){this.position=this._generatePosition(b);this.positionAbs=this._convertPositionTo("absolute");if(!c){var d=this._uiHash();if(this._trigger("drag",b,d)===false){this._mouseUp({});return false}this.position=d.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";if(a.ui.ddmanager)a.ui.ddmanager.drag(this,b);return false},_mouseStop:function(b){var c=false;if(a.ui.ddmanager&&!this.options.dropBehaviour)c=a.ui.ddmanager.drop(this,b);if(this.dropped){c=this.dropped;this.dropped=false}if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper=="original")return false;if(this.options.revert=="invalid"&&!c||this.options.revert=="valid"&&c||this.options.revert===true||a.isFunction(this.options.revert)&&this.options.revert.call(this.element,c)){var d=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){if(d._trigger("stop",b)!==false){d._clear()}})}else{if(this._trigger("stop",b)!==false){this._clear()}}return false},_mouseUp:function(b){if(this.options.iframeFix===true){a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}if(a.ui.ddmanager)a.ui.ddmanager.dragStop(this,b);return a.ui.mouse.prototype._mouseUp.call(this,b)},cancel:function(){if(this.helper.is(".ui-draggable-dragging")){this._mouseUp({})}else{this._clear()}return this},_getHandle:function(b){var c=!this.options.handle||!a(this.options.handle,this.element).length?true:false;a(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==b.target)c=true});return c},_createHelper:function(b){var c=this.options;var d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[b])):c.helper=="clone"?this.element.clone().removeAttr("id"):this.element;if(!d.parents("body").length)d.appendTo(c.appendTo=="parent"?this.element[0].parentNode:c.appendTo);if(d[0]!=this.element[0]&&!/(fixed|absolute)/.test(d.css("position")))d.css("position","absolute");return d},_adjustOffsetFromHelper:function(b){if(typeof b=="string"){b=b.split(" ")}if(a.isArray(b)){b={left:+b[0],top:+b[1]||0}}if("left"in b){this.offset.click.left=b.left+this.margins.left}if("right"in b){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left}if("top"in b){this.offset.click.top=b.top+this.margins.top}if("bottom"in b){this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)b={top:0,left:0};return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.element.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var b=this.options;if(b.containment=="parent")b.containment=this.helper[0].parentNode;if(b.containment=="document"||b.containment=="window")this.containment=[b.containment=="document"?0:a(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,b.containment=="document"?0:a(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,(b.containment=="document"?0:a(window).scrollLeft())+a(b.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(b.containment=="document"?0:a(window).scrollTop())+(a(b.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(b.containment)&&b.containment.constructor!=Array){var c=a(b.containment);var d=c[0];if(!d)return;var e=c.offset();var f=a(d).css("overflow")!="hidden";this.containment=[(parseInt(a(d).css("borderLeftWidth"),10)||0)+(parseInt(a(d).css("paddingLeft"),10)||0),(parseInt(a(d).css("borderTopWidth"),10)||0)+(parseInt(a(d).css("paddingTop"),10)||0),(f?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(a(d).css("borderLeftWidth"),10)||0)-(parseInt(a(d).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(f?Math.max(d.scrollHeight,d.offsetHeight):d.offsetHeight)-(parseInt(a(d).css("borderTopWidth"),10)||0)-(parseInt(a(d).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom];this.relative_container=c}else if(b.containment.constructor==Array){this.containment=b.containment}},_convertPositionTo:function(b,c){if(!c)c=this.position;var d=b=="absolute"?1:-1;var e=this.options,f=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=/(html|body)/i.test(f[0].tagName);return{top:c.top+this.offset.relative.top*d+this.offset.parent.top*d-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():g?0:f.scrollTop())*d),left:c.left+this.offset.relative.left*d+this.offset.parent.left*d-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:f.scrollLeft())*d)}},_generatePosition:function(b){var c=this.options,d=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(d[0].tagName);var f=b.pageX;var g=b.pageY;if(this.originalPosition){var h;if(this.containment){if(this.relative_container){var i=this.relative_container.offset();h=[this.containment[0]+i.left,this.containment[1]+i.top,this.containment[2]+i.left,this.containment[3]+i.top]}else{h=this.containment}if(b.pageX-this.offset.click.left<h[0])f=h[0]+this.offset.click.left;if(b.pageY-this.offset.click.top<h[1])g=h[1]+this.offset.click.top;if(b.pageX-this.offset.click.left>h[2])f=h[2]+this.offset.click.left;if(b.pageY-this.offset.click.top>h[3])g=h[3]+this.offset.click.top}if(c.grid){var j=c.grid[1]?this.originalPageY+Math.round((g-this.originalPageY)/c.grid[1])*c.grid[1]:this.originalPageY;g=h?!(j-this.offset.click.top<h[1]||j-this.offset.click.top>h[3])?j:!(j-this.offset.click.top<h[1])?j-c.grid[1]:j+c.grid[1]:j;var k=c.grid[0]?this.originalPageX+Math.round((f-this.originalPageX)/c.grid[0])*c.grid[0]:this.originalPageX;f=h?!(k-this.offset.click.left<h[0]||k-this.offset.click.left>h[2])?k:!(k-this.offset.click.left<h[0])?k-c.grid[0]:k+c.grid[0]:k}}return{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:d.scrollTop()),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:d.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval)this.helper.remove();this.helper=null;this.cancelHelperRemoval=false},_trigger:function(b,c,d){d=d||this._uiHash();a.ui.plugin.call(this,b,[c,d]);if(b=="drag")this.positionAbs=this._convertPositionTo("absolute");return a.Widget.prototype._trigger.call(this,b,c,d)},plugins:{},_uiHash:function(a){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});a.extend(a.ui.draggable,{version:"1.8.14"});a.ui.plugin.add("draggable","connectToSortable",{start:function(b,c){var d=a(this).data("draggable"),e=d.options,f=a.extend({},c,{item:d.element});d.sortables=[];a(e.connectToSortable).each(function(){var c=a.data(this,"sortable");if(c&&!c.options.disabled){d.sortables.push({instance:c,shouldRevert:c.options.revert});c.refreshPositions();c._trigger("activate",b,f)}})},stop:function(b,c){var d=a(this).data("draggable"),e=a.extend({},c,{item:d.element});a.each(d.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;d.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert)this.instance.options.revert=true;this.instance._mouseStop(b);this.instance.options.helper=this.instance.options._helper;if(d.options.helper=="original")this.instance.currentItem.css({top:"auto",left:"auto"})}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",b,e)}})},drag:function(b,c){var d=a(this).data("draggable"),e=this;var f=function(b){var c=this.offset.click.top,d=this.offset.click.left;var e=this.positionAbs.top,f=this.positionAbs.left;var g=b.height,h=b.width;var i=b.top,j=b.left;return a.ui.isOver(e+c,f+d,i,j,g,h)};a.each(d.sortables,function(f){this.instance.positionAbs=d.positionAbs;this.instance.helperProportions=d.helperProportions;this.instance.offset.click=d.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=a(e).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return c.helper[0]};b.target=this.instance.currentItem[0];this.instance._mouseCapture(b,true);this.instance._mouseStart(b,true,true);this.instance.offset.click.top=d.offset.click.top;this.instance.offset.click.left=d.offset.click.left;this.instance.offset.parent.left-=d.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=d.offset.parent.top-this.instance.offset.parent.top;d._trigger("toSortable",b);d.dropped=this.instance.element;d.currentItem=d.element;this.instance.fromOutside=d}if(this.instance.currentItem)this.instance._mouseDrag(b)}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",b,this.instance._uiHash(this.instance));this.instance._mouseStop(b,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder)this.instance.placeholder.remove();d._trigger("fromSortable",b);d.dropped=false}}})}});a.ui.plugin.add("draggable","cursor",{start:function(b,c){var d=a("body"),e=a(this).data("draggable").options;if(d.css("cursor"))e._cursor=d.css("cursor");d.css("cursor",e.cursor)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._cursor)a("body").css("cursor",d._cursor)}});a.ui.plugin.add("draggable","opacity",{start:function(b,c){var d=a(c.helper),e=a(this).data("draggable").options;if(d.css("opacity"))e._opacity=d.css("opacity");d.css("opacity",e.opacity)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._opacity)a(c.helper).css("opacity",d._opacity)}});a.ui.plugin.add("draggable","scroll",{start:function(b,c){var d=a(this).data("draggable");if(d.scrollParent[0]!=document&&d.scrollParent[0].tagName!="HTML")d.overflowOffset=d.scrollParent.offset()},drag:function(b,c){var d=a(this).data("draggable"),e=d.options,f=false;if(d.scrollParent[0]!=document&&d.scrollParent[0].tagName!="HTML"){if(!e.axis||e.axis!="x"){if(d.overflowOffset.top+d.scrollParent[0].offsetHeight-b.pageY<e.scrollSensitivity)d.scrollParent[0].scrollTop=f=d.scrollParent[0].scrollTop+e.scrollSpeed;else if(b.pageY-d.overflowOffset.top<e.scrollSensitivity)d.scrollParent[0].scrollTop=f=d.scrollParent[0].scrollTop-e.scrollSpeed}if(!e.axis||e.axis!="y"){if(d.overflowOffset.left+d.scrollParent[0].offsetWidth-b.pageX<e.scrollSensitivity)d.scrollParent[0].scrollLeft=f=d.scrollParent[0].scrollLeft+e.scrollSpeed;else if(b.pageX-d.overflowOffset.left<e.scrollSensitivity)d.scrollParent[0].scrollLeft=f=d.scrollParent[0].scrollLeft-e.scrollSpeed}}else{if(!e.axis||e.axis!="x"){if(b.pageY-a(document).scrollTop()<e.scrollSensitivity)f=a(document).scrollTop(a(document).scrollTop()-e.scrollSpeed);else if(a(window).height()-(b.pageY-a(document).scrollTop())<e.scrollSensitivity)f=a(document).scrollTop(a(document).scrollTop()+e.scrollSpeed)}if(!e.axis||e.axis!="y"){if(b.pageX-a(document).scrollLeft()<e.scrollSensitivity)f=a(document).scrollLeft(a(document).scrollLeft()-e.scrollSpeed);else if(a(window).width()-(b.pageX-a(document).scrollLeft())<e.scrollSensitivity)f=a(document).scrollLeft(a(document).scrollLeft()+e.scrollSpeed)}}if(f!==false&&a.ui.ddmanager&&!e.dropBehaviour)a.ui.ddmanager.prepareOffsets(d,b)}});a.ui.plugin.add("draggable","snap",{start:function(b,c){var d=a(this).data("draggable"),e=d.options;d.snapElements=[];a(e.snap.constructor!=String?e.snap.items||":data(draggable)":e.snap).each(function(){var b=a(this);var c=b.offset();if(this!=d.element[0])d.snapElements.push({item:this,width:b.outerWidth(),height:b.outerHeight(),top:c.top,left:c.left})})},drag:function(b,c){var d=a(this).data("draggable"),e=d.options;var f=e.snapTolerance;var g=c.offset.left,h=g+d.helperProportions.width,i=c.offset.top,j=i+d.helperProportions.height;for(var k=d.snapElements.length-1;k>=0;k--){var l=d.snapElements[k].left,m=l+d.snapElements[k].width,n=d.snapElements[k].top,o=n+d.snapElements[k].height;if(!(l-f<g&&g<m+f&&n-f<i&&i<o+f||l-f<g&&g<m+f&&n-f<j&&j<o+f||l-f<h&&h<m+f&&n-f<i&&i<o+f||l-f<h&&h<m+f&&n-f<j&&j<o+f)){if(d.snapElements[k].snapping)d.options.snap.release&&d.options.snap.release.call(d.element,b,a.extend(d._uiHash(),{snapItem:d.snapElements[k].item}));d.snapElements[k].snapping=false;continue}if(e.snapMode!="inner"){var p=Math.abs(n-j)<=f;var q=Math.abs(o-i)<=f;var r=Math.abs(l-h)<=f;var s=Math.abs(m-g)<=f;if(p)c.position.top=d._convertPositionTo("relative",{top:n-d.helperProportions.height,left:0}).top-d.margins.top;if(q)c.position.top=d._convertPositionTo("relative",{top:o,left:0}).top-d.margins.top;if(r)c.position.left=d._convertPositionTo("relative",{top:0,left:l-d.helperProportions.width}).left-d.margins.left;if(s)c.position.left=d._convertPositionTo("relative",{top:0,left:m}).left-d.margins.left}var t=p||q||r||s;if(e.snapMode!="outer"){var p=Math.abs(n-i)<=f;var q=Math.abs(o-j)<=f;var r=Math.abs(l-g)<=f;var s=Math.abs(m-h)<=f;if(p)c.position.top=d._convertPositionTo("relative",{top:n,left:0}).top-d.margins.top;if(q)c.position.top=d._convertPositionTo("relative",{top:o-d.helperProportions.height,left:0}).top-d.margins.top;if(r)c.position.left=d._convertPositionTo("relative",{top:0,left:l}).left-d.margins.left;if(s)c.position.left=d._convertPositionTo("relative",{top:0,left:m-d.helperProportions.width}).left-d.margins.left}if(!d.snapElements[k].snapping&&(p||q||r||s||t))d.options.snap.snap&&d.options.snap.snap.call(d.element,b,a.extend(d._uiHash(),{snapItem:d.snapElements[k].item}));d.snapElements[k].snapping=p||q||r||s||t}}});a.ui.plugin.add("draggable","stack",{start:function(b,c){var d=a(this).data("draggable").options;var e=a.makeArray(a(d.stack)).sort(function(b,c){return(parseInt(a(b).css("zIndex"),10)||0)-(parseInt(a(c).css("zIndex"),10)||0)});if(!e.length){return}var f=parseInt(e[0].style.zIndex)||0;a(e).each(function(a){this.style.zIndex=f+a});this[0].style.zIndex=f+e.length}});a.ui.plugin.add("draggable","zIndex",{start:function(b,c){var d=a(c.helper),e=a(this).data("draggable").options;if(d.css("zIndex"))e._zIndex=d.css("zIndex");d.css("zIndex",e.zIndex)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._zIndex)a(c.helper).css("zIndex",d._zIndex)}})})(jQuery);(function(a,b){a.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"},_create:function(){var b=this.options,c=b.accept;this.isover=0;this.isout=1;this.accept=a.isFunction(c)?c:function(a){return a.is(c)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};a.ui.ddmanager.droppables[b.scope]=a.ui.ddmanager.droppables[b.scope]||[];a.ui.ddmanager.droppables[b.scope].push(this);b.addClasses&&this.element.addClass("ui-droppable")},destroy:function(){var b=a.ui.ddmanager.droppables[this.options.scope];for(var c=0;c<b.length;c++)if(b[c]==this)b.splice(c,1);this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable");return this},_setOption:function(b,c){if(b=="accept"){this.accept=a.isFunction(c)?c:function(a){return a.is(c)}}a.Widget.prototype._setOption.apply(this,arguments)},_activate:function(b){var c=a.ui.ddmanager.current;if(this.options.activeClass)this.element.addClass(this.options.activeClass);c&&this._trigger("activate",b,this.ui(c))},_deactivate:function(b){var c=a.ui.ddmanager.current;if(this.options.activeClass)this.element.removeClass(this.options.activeClass);c&&this._trigger("deactivate",b,this.ui(c))},_over:function(b){var c=a.ui.ddmanager.current;if(!c||(c.currentItem||c.element)[0]==this.element[0])return;if(this.accept.call(this.element[0],c.currentItem||c.element)){if(this.options.hoverClass)this.element.addClass(this.options.hoverClass);this._trigger("over",b,this.ui(c))}},_out:function(b){var c=a.ui.ddmanager.current;if(!c||(c.currentItem||c.element)[0]==this.element[0])return;if(this.accept.call(this.element[0],c.currentItem||c.element)){if(this.options.hoverClass)this.element.removeClass(this.options.hoverClass);this._trigger("out",b,this.ui(c))}},_drop:function(b,c){var d=c||a.ui.ddmanager.current;if(!d||(d.currentItem||d.element)[0]==this.element[0])return false;var e=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var b=a.data(this,"droppable");if(b.options.greedy&&!b.options.disabled&&b.options.scope==d.options.scope&&b.accept.call(b.element[0],d.currentItem||d.element)&&a.ui.intersect(d,a.extend(b,{offset:b.element.offset()}),b.options.tolerance)){e=true;return false}});if(e)return false;if(this.accept.call(this.element[0],d.currentItem||d.element)){if(this.options.activeClass)this.element.removeClass(this.options.activeClass);if(this.options.hoverClass)this.element.removeClass(this.options.hoverClass);this._trigger("drop",b,this.ui(d));return this.element}return false},ui:function(a){return{draggable:a.currentItem||a.element,helper:a.helper,position:a.position,offset:a.positionAbs}}});a.extend(a.ui.droppable,{version:"1.8.14"});a.ui.intersect=function(b,c,d){if(!c.offset)return false;var e=(b.positionAbs||b.position.absolute).left,f=e+b.helperProportions.width,g=(b.positionAbs||b.position.absolute).top,h=g+b.helperProportions.height;var i=c.offset.left,j=i+c.proportions.width,k=c.offset.top,l=k+c.proportions.height;switch(d){case"fit":return i<=e&&f<=j&&k<=g&&h<=l;break;case"intersect":return i<e+b.helperProportions.width/2&&f-b.helperProportions.width/2<j&&k<g+b.helperProportions.height/2&&h-b.helperProportions.height/2<l;break;case"pointer":var m=(b.positionAbs||b.position.absolute).left+(b.clickOffset||b.offset.click).left,n=(b.positionAbs||b.position.absolute).top+(b.clickOffset||b.offset.click).top,o=a.ui.isOver(n,m,k,i,c.proportions.height,c.proportions.width);return o;break;case"touch":return(g>=k&&g<=l||h>=k&&h<=l||g<k&&h>l)&&(e>=i&&e<=j||f>=i&&f<=j||e<i&&f>j);break;default:return false;break}};a.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(b,c){var d=a.ui.ddmanager.droppables[b.options.scope]||[];var e=c?c.type:null;var f=(b.currentItem||b.element).find(":data(droppable)").andSelf();a:for(var g=0;g<d.length;g++){if(d[g].options.disabled||b&&!d[g].accept.call(d[g].element[0],b.currentItem||b.element))continue;for(var h=0;h<f.length;h++){if(f[h]==d[g].element[0]){d[g].proportions.height=0;continue a}}d[g].visible=d[g].element.css("display")!="none";if(!d[g].visible)continue;if(e=="mousedown")d[g]._activate.call(d[g],c);d[g].offset=d[g].element.offset();d[g].proportions={width:d[g].element[0].offsetWidth,height:d[g].element[0].offsetHeight}}},drop:function(b,c){var d=false;a.each(a.ui.ddmanager.droppables[b.options.scope]||[],function(){if(!this.options)return;if(!this.options.disabled&&this.visible&&a.ui.intersect(b,this,this.options.tolerance))d=d||this._drop.call(this,c);if(!this.options.disabled&&this.visible&&this.accept.call(this.element[0],b.currentItem||b.element)){this.isout=1;this.isover=0;this._deactivate.call(this,c)}});return d},dragStart:function(b,c){b.element.parentsUntil("body").bind("scroll.droppable",function(){if(!b.options.refreshPositions)a.ui.ddmanager.prepareOffsets(b,c)})},drag:function(b,c){if(b.options.refreshPositions)a.ui.ddmanager.prepareOffsets(b,c);a.each(a.ui.ddmanager.droppables[b.options.scope]||[],function(){if(this.options.disabled||this.greedyChild||!this.visible)return;var d=a.ui.intersect(b,this,this.options.tolerance);var e=!d&&this.isover==1?"isout":d&&this.isover==0?"isover":null;if(!e)return;var f;if(this.options.greedy){var g=this.element.parents(":data(droppable):eq(0)");if(g.length){f=a.data(g[0],"droppable");f.greedyChild=e=="isover"?1:0}}if(f&&e=="isover"){f["isover"]=0;f["isout"]=1;f._out.call(f,c)}this[e]=1;this[e=="isout"?"isover":"isout"]=0;this[e=="isover"?"_over":"_out"].call(this,c);if(f&&e=="isout"){f["isout"]=0;f["isover"]=1;f._over.call(f,c)}})},dragStop:function(b,c){b.element.parentsUntil("body").unbind("scroll.droppable");if(!b.options.refreshPositions)a.ui.ddmanager.prepareOffsets(b,c)}}})(jQuery);(function(a,b){a.widget("ui.resizable",a.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1e3},_create:function(){var b=this,c=this.options;this.element.addClass("ui-resizable");a.extend(this,{_aspectRatio:!!c.aspectRatio,aspectRatio:c.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:c.helper||c.ghost||c.animate?c.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){if(/relative/.test(this.element.css("position"))&&a.browser.opera)this.element.css({position:"relative",top:"auto",left:"auto"});this.element.wrap(a('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=c.handles||(!a(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all")this.handles="n,e,s,w,se,sw,ne,nw";var d=this.handles.split(",");this.handles={};for(var e=0;e<d.length;e++){var f=a.trim(d[e]),g="ui-resizable-"+f;var h=a('<div class="ui-resizable-handle '+g+'"></div>');if(/sw|se|ne|nw/.test(f))h.css({zIndex:++c.zIndex});if("se"==f){h.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[f]=".ui-resizable-"+f;this.element.append(h)}}this._renderAxis=function(b){b=b||this.element;for(var c in this.handles){if(this.handles[c].constructor==String)this.handles[c]=a(this.handles[c],this.element).show();if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var d=a(this.handles[c],this.element),e=0;e=/sw|ne|nw|se|n|s/.test(c)?d.outerHeight():d.outerWidth();var f=["padding",/ne|nw|n/.test(c)?"Top":/se|sw|s/.test(c)?"Bottom":/^e$/.test(c)?"Right":"Left"].join("");b.css(f,e);this._proportionallyResize()}if(!a(this.handles[c]).length)continue}};this._renderAxis(this.element);this._handles=a(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!b.resizing){if(this.className)var a=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);b.axis=a&&a[1]?a[1]:"se"}});if(c.autoHide){this._handles.hide();a(this.element).addClass("ui-resizable-autohide").hover(function(){if(c.disabled)return;a(this).removeClass("ui-resizable-autohide");b._handles.show()},function(){if(c.disabled)return;if(!b.resizing){a(this).addClass("ui-resizable-autohide");b._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var b=function(b){a(b).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){b(this.element);var c=this.element;c.after(this.originalElement.css({position:c.css("position"),width:c.outerWidth(),height:c.outerHeight(),top:c.css("top"),left:c.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);b(this.originalElement);return this},_mouseCapture:function(b){var c=false;for(var d in this.handles){if(a(this.handles[d])[0]==b.target){c=true}}return!this.options.disabled&&c},_mouseStart:function(b){var d=this.options,e=this.element.position(),f=this.element;this.resizing=true;this.documentScroll={top:a(document).scrollTop(),left:a(document).scrollLeft()};if(f.is(".ui-draggable")||/absolute/.test(f.css("position"))){f.css({position:"absolute",top:e.top,left:e.left})}if(a.browser.opera&&/relative/.test(f.css("position")))f.css({position:"relative",top:"auto",left:"auto"});this._renderProxy();var g=c(this.helper.css("left")),h=c(this.helper.css("top"));if(d.containment){g+=a(d.containment).scrollLeft()||0;h+=a(d.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:g,top:h};this.size=this._helper?{width:f.outerWidth(),height:f.outerHeight()}:{width:f.width(),height:f.height()};this.originalSize=this._helper?{width:f.outerWidth(),height:f.outerHeight()}:{width:f.width(),height:f.height()};this.originalPosition={left:g,top:h};this.sizeDiff={width:f.outerWidth()-f.width(),height:f.outerHeight()-f.height()};this.originalMousePosition={left:b.pageX,top:b.pageY};this.aspectRatio=typeof d.aspectRatio=="number"?d.aspectRatio:this.originalSize.width/this.originalSize.height||1;var i=a(".ui-resizable-"+this.axis).css("cursor");a("body").css("cursor",i=="auto"?this.axis+"-resize":i);f.addClass("ui-resizable-resizing");this._propagate("start",b);return true},_mouseDrag:function(b){var c=this.helper,d=this.options,e={},f=this,g=this.originalMousePosition,h=this.axis;var i=b.pageX-g.left||0,j=b.pageY-g.top||0;var k=this._change[h];if(!k)return false;var l=k.apply(this,[b,i,j]),m=a.browser.msie&&a.browser.version<7,n=this.sizeDiff;this._updateVirtualBoundaries(b.shiftKey);if(this._aspectRatio||b.shiftKey)l=this._updateRatio(l,b);l=this._respectSize(l,b);this._propagate("resize",b);c.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length)this._proportionallyResize();this._updateCache(l);this._trigger("resize",b,this.ui());return false},_mouseStop:function(b){this.resizing=false;var c=this.options,d=this;if(this._helper){var e=this._proportionallyResizeElements,f=e.length&&/textarea/i.test(e[0].nodeName),g=f&&a.ui.hasScroll(e[0],"left")?0:d.sizeDiff.height,h=f?0:d.sizeDiff.width;var i={width:d.helper.width()-h,height:d.helper.height()-g},j=parseInt(d.element.css("left"),10)+(d.position.left-d.originalPosition.left)||null,k=parseInt(d.element.css("top"),10)+(d.position.top-d.originalPosition.top)||null;if(!c.animate)this.element.css(a.extend(i,{top:k,left:j}));d.helper.height(d.size.height);d.helper.width(d.size.width);if(this._helper&&!c.animate)this._proportionallyResize()}a("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",b);if(this._helper)this.helper.remove();return false},_updateVirtualBoundaries:function(a){var b=this.options,c,e,f,g,h;h={minWidth:d(b.minWidth)?b.minWidth:0,maxWidth:d(b.maxWidth)?b.maxWidth:Infinity,minHeight:d(b.minHeight)?b.minHeight:0,maxHeight:d(b.maxHeight)?b.maxHeight:Infinity};if(this._aspectRatio||a){c=h.minHeight*this.aspectRatio;f=h.minWidth/this.aspectRatio;e=h.maxHeight*this.aspectRatio;g=h.maxWidth/this.aspectRatio;if(c>h.minWidth)h.minWidth=c;if(f>h.minHeight)h.minHeight=f;if(e<h.maxWidth)h.maxWidth=e;if(g<h.maxHeight)h.maxHeight=g}this._vBoundaries=h},_updateCache:function(a){var b=this.options;this.offset=this.helper.offset();if(d(a.left))this.position.left=a.left;if(d(a.top))this.position.top=a.top;if(d(a.height))this.size.height=a.height;if(d(a.width))this.size.width=a.width},_updateRatio:function(a,b){var c=this.options,e=this.position,f=this.size,g=this.axis;if(d(a.height))a.width=a.height*this.aspectRatio;else if(d(a.width))a.height=a.width/this.aspectRatio;if(g=="sw"){a.left=e.left+(f.width-a.width);a.top=null}if(g=="nw"){a.top=e.top+(f.height-a.height);a.left=e.left+(f.width-a.width)}return a},_respectSize:function(a,b){var c=this.helper,e=this._vBoundaries,f=this._aspectRatio||b.shiftKey,g=this.axis,h=d(a.width)&&e.maxWidth&&e.maxWidth<a.width,i=d(a.height)&&e.maxHeight&&e.maxHeight<a.height,j=d(a.width)&&e.minWidth&&e.minWidth>a.width,k=d(a.height)&&e.minHeight&&e.minHeight>a.height;if(j)a.width=e.minWidth;if(k)a.height=e.minHeight;if(h)a.width=e.maxWidth;if(i)a.height=e.maxHeight;var l=this.originalPosition.left+this.originalSize.width,m=this.position.top+this.size.height;var n=/sw|nw|w/.test(g),o=/nw|ne|n/.test(g);if(j&&n)a.left=l-e.minWidth;if(h&&n)a.left=l-e.maxWidth;if(k&&o)a.top=m-e.minHeight;if(i&&o)a.top=m-e.maxHeight;var p=!a.width&&!a.height;if(p&&!a.left&&a.top)a.top=null;else if(p&&!a.top&&a.left)a.left=null;return a},_proportionallyResize:function(){var b=this.options;if(!this._proportionallyResizeElements.length)return;var c=this.helper||this.element;for(var d=0;d<this._proportionallyResizeElements.length;d++){var e=this._proportionallyResizeElements[d];if(!this.borderDif){var f=[e.css("borderTopWidth"),e.css("borderRightWidth"),e.css("borderBottomWidth"),e.css("borderLeftWidth")],g=[e.css("paddingTop"),e.css("paddingRight"),e.css("paddingBottom"),e.css("paddingLeft")];this.borderDif=a.map(f,function(a,b){var c=parseInt(a,10)||0,d=parseInt(g[b],10)||0;return c+d})}if(a.browser.msie&&!!(a(c).is(":hidden")||a(c).parents(":hidden").length))continue;e.css({height:c.height()-this.borderDif[0]-this.borderDif[2]||0,width:c.width()-this.borderDif[1]-this.borderDif[3]||0})}},_renderProxy:function(){var b=this.element,c=this.options;this.elementOffset=b.offset();if(this._helper){this.helper=this.helper||a('<div style="overflow:hidden;"></div>');var d=a.browser.msie&&a.browser.version<7,e=d?1:0,f=d?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+f,height:this.element.outerHeight()+f,position:"absolute",left:this.elementOffset.left-e+"px",top:this.elementOffset.top-e+"px",zIndex:++c.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(a,b,c){return{width:this.originalSize.width+b}},w:function(a,b,c){var d=this.options,e=this.originalSize,f=this.originalPosition;return{left:f.left+b,width:e.width-b}},n:function(a,b,c){var d=this.options,e=this.originalSize,f=this.originalPosition;return{top:f.top+c,height:e.height-c}},s:function(a,b,c){return{height:this.originalSize.height+c}},se:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},sw:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,c,d]))},ne:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},nw:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,c,d]))}},_propagate:function(b,c){a.ui.plugin.call(this,b,[c,this.ui()]);b!="resize"&&this._trigger(b,c,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});a.extend(a.ui.resizable,{version:"1.8.14"});a.ui.plugin.add("resizable","alsoResize",{start:function(b,c){var d=a(this).data("resizable"),e=d.options;var f=function(b){a(b).each(function(){var b=a(this);b.data("resizable-alsoresize",{width:parseInt(b.width(),10),height:parseInt(b.height(),10),left:parseInt(b.css("left"),10),top:parseInt(b.css("top"),10),position:b.css("position")})})};if(typeof e.alsoResize=="object"&&!e.alsoResize.parentNode){if(e.alsoResize.length){e.alsoResize=e.alsoResize[0];f(e.alsoResize)}else{a.each(e.alsoResize,function(a){f(a)})}}else{f(e.alsoResize)}},resize:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.originalSize,g=d.originalPosition;var h={height:d.size.height-f.height||0,width:d.size.width-f.width||0,top:d.position.top-g.top||0,left:d.position.left-g.left||0},i=function(b,e){a(b).each(function(){var b=a(this),f=a(this).data("resizable-alsoresize"),g={},i=e&&e.length?e:b.parents(c.originalElement[0]).length?["width","height"]:["width","height","top","left"];a.each(i,function(a,b){var c=(f[b]||0)+(h[b]||0);if(c&&c>=0)g[b]=c||null});if(a.browser.opera&&/relative/.test(b.css("position"))){d._revertToRelativePosition=true;b.css({position:"absolute",top:"auto",left:"auto"})}b.css(g)})};if(typeof e.alsoResize=="object"&&!e.alsoResize.nodeType){a.each(e.alsoResize,function(a,b){i(a,b)})}else{i(e.alsoResize)}},stop:function(b,c){var d=a(this).data("resizable"),e=d.options;var f=function(b){a(b).each(function(){var b=a(this);b.css({position:b.data("resizable-alsoresize").position})})};if(d._revertToRelativePosition){d._revertToRelativePosition=false;if(typeof e.alsoResize=="object"&&!e.alsoResize.nodeType){a.each(e.alsoResize,function(a){f(a)})}else{f(e.alsoResize)}}a(this).removeData("resizable-alsoresize")}});a.ui.plugin.add("resizable","animate",{stop:function(b,c){var d=a(this).data("resizable"),e=d.options;var f=d._proportionallyResizeElements,g=f.length&&/textarea/i.test(f[0].nodeName),h=g&&a.ui.hasScroll(f[0],"left")?0:d.sizeDiff.height,i=g?0:d.sizeDiff.width;var j={width:d.size.width-i,height:d.size.height-h},k=parseInt(d.element.css("left"),10)+(d.position.left-d.originalPosition.left)||null,l=parseInt(d.element.css("top"),10)+(d.position.top-d.originalPosition.top)||null;d.element.animate(a.extend(j,l&&k?{top:l,left:k}:{}),{duration:e.animateDuration,easing:e.animateEasing,step:function(){var c={width:parseInt(d.element.css("width"),10),height:parseInt(d.element.css("height"),10),top:parseInt(d.element.css("top"),10),left:parseInt(d.element.css("left"),10)};if(f&&f.length)a(f[0]).css({width:c.width,height:c.height});d._updateCache(c);d._propagate("resize",b)}})}});a.ui.plugin.add("resizable","containment",{start:function(b,d){var e=a(this).data("resizable"),f=e.options,g=e.element;var h=f.containment,i=h instanceof a?h.get(0):/parent/.test(h)?g.parent().get(0):h;if(!i)return;e.containerElement=a(i);if(/document/.test(h)||h==document){e.containerOffset={left:0,top:0};e.containerPosition={left:0,top:0};e.parentData={element:a(document),left:0,top:0,width:a(document).width(),height:a(document).height()||document.body.parentNode.scrollHeight}}else{var j=a(i),k=[];a(["Top","Right","Left","Bottom"]).each(function(a,b){k[a]=c(j.css("padding"+b))});e.containerOffset=j.offset();e.containerPosition=j.position();e.containerSize={height:j.innerHeight()-k[3],width:j.innerWidth()-k[1]};var l=e.containerOffset,m=e.containerSize.height,n=e.containerSize.width,o=a.ui.hasScroll(i,"left")?i.scrollWidth:n,p=a.ui.hasScroll(i)?i.scrollHeight:m;e.parentData={element:i,left:l.left,top:l.top,width:o,height:p}}},resize:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.containerSize,g=d.containerOffset,h=d.size,i=d.position,j=d._aspectRatio||b.shiftKey,k={top:0,left:0},l=d.containerElement;if(l[0]!=document&&/static/.test(l.css("position")))k=g;if(i.left<(d._helper?g.left:0)){d.size.width=d.size.width+(d._helper?d.position.left-g.left:d.position.left-k.left);if(j)d.size.height=d.size.width/e.aspectRatio;d.position.left=e.helper?g.left:0}if(i.top<(d._helper?g.top:0)){d.size.height=d.size.height+(d._helper?d.position.top-g.top:d.position.top);if(j)d.size.width=d.size.height*e.aspectRatio;d.position.top=d._helper?g.top:0}d.offset.left=d.parentData.left+d.position.left;d.offset.top=d.parentData.top+d.position.top;var m=Math.abs((d._helper?d.offset.left-k.left:d.offset.left-k.left)+d.sizeDiff.width),n=Math.abs((d._helper?d.offset.top-k.top:d.offset.top-g.top)+d.sizeDiff.height);var o=d.containerElement.get(0)==d.element.parent().get(0),p=/relative|absolute/.test(d.containerElement.css("position"));if(o&&p)m-=d.parentData.left;if(m+d.size.width>=d.parentData.width){d.size.width=d.parentData.width-m;if(j)d.size.height=d.size.width/d.aspectRatio}if(n+d.size.height>=d.parentData.height){d.size.height=d.parentData.height-n;if(j)d.size.width=d.size.height*d.aspectRatio}},stop:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.position,g=d.containerOffset,h=d.containerPosition,i=d.containerElement;var j=a(d.helper),k=j.offset(),l=j.outerWidth()-d.sizeDiff.width,m=j.outerHeight()-d.sizeDiff.height;if(d._helper&&!e.animate&&/relative/.test(i.css("position")))a(this).css({left:k.left-h.left-g.left,width:l,height:m});if(d._helper&&!e.animate&&/static/.test(i.css("position")))a(this).css({left:k.left-h.left-g.left,width:l,height:m})}});a.ui.plugin.add("resizable","ghost",{start:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.size;d.ghost=d.originalElement.clone();d.ghost.css({opacity:.25,display:"block",position:"relative",height:f.height,width:f.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof e.ghost=="string"?e.ghost:"");d.ghost.appendTo(d.helper)},resize:function(b,c){var d=a(this).data("resizable"),e=d.options;if(d.ghost)d.ghost.css({position:"relative",height:d.size.height,width:d.size.width})},stop:function(b,c){var d=a(this).data("resizable"),e=d.options;if(d.ghost&&d.helper)d.helper.get(0).removeChild(d.ghost.get(0))}});a.ui.plugin.add("resizable","grid",{resize:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.size,g=d.originalSize,h=d.originalPosition,i=d.axis,j=e._aspectRatio||b.shiftKey;e.grid=typeof e.grid=="number"?[e.grid,e.grid]:e.grid;var k=Math.round((f.width-g.width)/(e.grid[0]||1))*(e.grid[0]||1),l=Math.round((f.height-g.height)/(e.grid[1]||1))*(e.grid[1]||1);if(/^(se|s|e)$/.test(i)){d.size.width=g.width+k;d.size.height=g.height+l}else if(/^(ne)$/.test(i)){d.size.width=g.width+k;d.size.height=g.height+l;d.position.top=h.top-l}else if(/^(sw)$/.test(i)){d.size.width=g.width+k;d.size.height=g.height+l;d.position.left=h.left-k}else{d.size.width=g.width+k;d.size.height=g.height+l;d.position.top=h.top-l;d.position.left=h.left-k}}});var c=function(a){return parseInt(a,10)||0};var d=function(a){return!isNaN(parseInt(a,10))}})(jQuery);(function(a,b){a.widget("ui.selectable",a.ui.mouse,{options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch"},_create:function(){var b=this;this.element.addClass("ui-selectable");this.dragged=false;var c;this.refresh=function(){c=a(b.options.filter,b.element[0]);c.each(function(){var b=a(this);var c=b.offset();a.data(this,"selectable-item",{element:this,$element:b,left:c.left,top:c.top,right:c.left+b.outerWidth(),bottom:c.top+b.outerHeight(),startselected:false,selected:b.hasClass("ui-selected"),selecting:b.hasClass("ui-selecting"),unselecting:b.hasClass("ui-unselecting")})})};this.refresh();this.selectees=c.addClass("ui-selectee");this._mouseInit();this.helper=a("<div class='ui-selectable-helper'></div>")},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy();return this},_mouseStart:function(b){var c=this;this.opos=[b.pageX,b.pageY];if(this.options.disabled)return;var d=this.options;this.selectees=a(d.filter,this.element[0]);this._trigger("start",b);a(d.appendTo).append(this.helper);this.helper.css({left:b.clientX,top:b.clientY,width:0,height:0});if(d.autoRefresh){this.refresh()}this.selectees.filter(".ui-selected").each(function(){var d=a.data(this,"selectable-item");d.startselected=true;if(!b.metaKey){d.$element.removeClass("ui-selected");d.selected=false;d.$element.addClass("ui-unselecting");d.unselecting=true;c._trigger("unselecting",b,{unselecting:d.element})}});a(b.target).parents().andSelf().each(function(){var d=a.data(this,"selectable-item");if(d){var e=!b.metaKey||!d.$element.hasClass("ui-selected");d.$element.removeClass(e?"ui-unselecting":"ui-selected").addClass(e?"ui-selecting":"ui-unselecting");d.unselecting=!e;d.selecting=e;d.selected=e;if(e){c._trigger("selecting",b,{selecting:d.element})}else{c._trigger("unselecting",b,{unselecting:d.element})}return false}})},_mouseDrag:function(b){var c=this;this.dragged=true;if(this.options.disabled)return;var d=this.options;var e=this.opos[0],f=this.opos[1],g=b.pageX,h=b.pageY;if(e>g){var i=g;g=e;e=i}if(f>h){var i=h;h=f;f=i}this.helper.css({left:e,top:f,width:g-e,height:h-f});this.selectees.each(function(){var i=a.data(this,"selectable-item");if(!i||i.element==c.element[0])return;var j=false;if(d.tolerance=="touch"){j=!(i.left>g||i.right<e||i.top>h||i.bottom<f)}else if(d.tolerance=="fit"){j=i.left>e&&i.right<g&&i.top>f&&i.bottom<h}if(j){if(i.selected){i.$element.removeClass("ui-selected");i.selected=false}if(i.unselecting){i.$element.removeClass("ui-unselecting");i.unselecting=false}if(!i.selecting){i.$element.addClass("ui-selecting");i.selecting=true;c._trigger("selecting",b,{selecting:i.element})}}else{if(i.selecting){if(b.metaKey&&i.startselected){i.$element.removeClass("ui-selecting");i.selecting=false;i.$element.addClass("ui-selected");i.selected=true}else{i.$element.removeClass("ui-selecting");i.selecting=false;if(i.startselected){i.$element.addClass("ui-unselecting");i.unselecting=true}c._trigger("unselecting",b,{unselecting:i.element})}}if(i.selected){if(!b.metaKey&&!i.startselected){i.$element.removeClass("ui-selected");i.selected=false;i.$element.addClass("ui-unselecting");i.unselecting=true;c._trigger("unselecting",b,{unselecting:i.element})}}}});return false},_mouseStop:function(b){var c=this;this.dragged=false;var d=this.options;a(".ui-unselecting",this.element[0]).each(function(){var d=a.data(this,"selectable-item");d.$element.removeClass("ui-unselecting");d.unselecting=false;d.startselected=false;c._trigger("unselected",b,{unselected:d.element})});a(".ui-selecting",this.element[0]).each(function(){var d=a.data(this,"selectable-item");d.$element.removeClass("ui-selecting").addClass("ui-selected");d.selecting=false;d.selected=true;d.startselected=true;c._trigger("selected",b,{selected:d.element})});this._trigger("stop",b);this.helper.remove();return false}});a.extend(a.ui.selectable,{version:"1.8.14"})})(jQuery);(function(a,b){a.widget("ui.sortable",a.ui.mouse,{widgetEventPrefix:"sort",options:{appendTo:"parent",axis:false,connectWith:false,containment:false,cursor:"auto",cursorAt:false,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3},_create:function(){var a=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?a.axis==="x"||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var a=this.items.length-1;a>=0;a--)this.items[a].item.removeData("sortable-item");return this},_setOption:function(b,c){if(b==="disabled"){this.options[b]=c;this.widget()[c?"addClass":"removeClass"]("ui-sortable-disabled")}else{a.Widget.prototype._setOption.apply(this,arguments)}},_mouseCapture:function(b,c){if(this.reverting){return false}if(this.options.disabled||this.options.type=="static")return false;this._refreshItems(b);var d=null,e=this,f=a(b.target).parents().each(function(){if(a.data(this,"sortable-item")==e){d=a(this);return false}});if(a.data(b.target,"sortable-item")==e)d=a(b.target);if(!d)return false;if(this.options.handle&&!c){var g=false;a(this.options.handle,d).find("*").andSelf().each(function(){if(this==b.target)g=true});if(!g)return false}this.currentItem=d;this._removeCurrentsFromItems();return true},_mouseStart:function(b,c,d){var e=this.options,f=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(b);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(b);this.originalPageX=b.pageX;this.originalPageY=b.pageY;e.cursorAt&&this._adjustOffsetFromHelper(e.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!=this.currentItem[0]){this.currentItem.hide()}this._createPlaceholder();if(e.containment)this._setContainment();if(e.cursor){if(a("body").css("cursor"))this._storedCursor=a("body").css("cursor");a("body").css("cursor",e.cursor)}if(e.opacity){if(this.helper.css("opacity"))this._storedOpacity=this.helper.css("opacity");this.helper.css("opacity",e.opacity)}if(e.zIndex){if(this.helper.css("zIndex"))this._storedZIndex=this.helper.css("zIndex");this.helper.css("zIndex",e.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML")this.overflowOffset=this.scrollParent.offset();this._trigger("start",b,this._uiHash());if(!this._preserveHelperProportions)this._cacheHelperProportions();if(!d){for(var g=this.containers.length-1;g>=0;g--){this.containers[g]._trigger("activate",b,f._uiHash(this))}}if(a.ui.ddmanager)a.ui.ddmanager.current=this;if(a.ui.ddmanager&&!e.dropBehaviour)a.ui.ddmanager.prepareOffsets(this,b);this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(b);return true},_mouseDrag:function(b){this.position=this._generatePosition(b);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}if(this.options.scroll){var c=this.options,d=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-b.pageY<c.scrollSensitivity)this.scrollParent[0].scrollTop=d=this.scrollParent[0].scrollTop+c.scrollSpeed;else if(b.pageY-this.overflowOffset.top<c.scrollSensitivity)this.scrollParent[0].scrollTop=d=this.scrollParent[0].scrollTop-c.scrollSpeed;if(this.overflowOffset.left+this.scrollParent[0].offsetWidth-b.pageX<c.scrollSensitivity)this.scrollParent[0].scrollLeft=d=this.scrollParent[0].scrollLeft+c.scrollSpeed;else if(b.pageX-this.overflowOffset.left<c.scrollSensitivity)this.scrollParent[0].scrollLeft=d=this.scrollParent[0].scrollLeft-c.scrollSpeed}else{if(b.pageY-a(document).scrollTop()<c.scrollSensitivity)d=a(document).scrollTop(a(document).scrollTop()-c.scrollSpeed);else if(a(window).height()-(b.pageY-a(document).scrollTop())<c.scrollSensitivity)d=a(document).scrollTop(a(document).scrollTop()+c.scrollSpeed);if(b.pageX-a(document).scrollLeft()<c.scrollSensitivity)d=a(document).scrollLeft(a(document).scrollLeft()-c.scrollSpeed);else if(a(window).width()-(b.pageX-a(document).scrollLeft())<c.scrollSensitivity)d=a(document).scrollLeft(a(document).scrollLeft()+c.scrollSpeed)}if(d!==false&&a.ui.ddmanager&&!c.dropBehaviour)a.ui.ddmanager.prepareOffsets(this,b)}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";for(var e=this.items.length-1;e>=0;e--){var f=this.items[e],g=f.item[0],h=this._intersectsWithPointer(f);if(!h)continue;if(g!=this.currentItem[0]&&this.placeholder[h==1?"next":"prev"]()[0]!=g&&!a.ui.contains(this.placeholder[0],g)&&(this.options.type=="semi-dynamic"?!a.ui.contains(this.element[0],g):true)){this.direction=h==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(f)){this._rearrange(b,f)}else{break}this._trigger("change",b,this._uiHash());break}}this._contactContainers(b);if(a.ui.ddmanager)a.ui.ddmanager.drag(this,b);this._trigger("sort",b,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(b,c){if(!b)return;if(a.ui.ddmanager&&!this.options.dropBehaviour)a.ui.ddmanager.drop(this,b);if(this.options.revert){var d=this;var e=d.placeholder.offset();d.reverting=true;a(this.helper).animate({left:e.left-this.offset.parent.left-d.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:e.top-this.offset.parent.top-d.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){d._clear(b)})}else{this._clear(b,c)}return false},cancel:function(){var b=this;if(this.dragging){this._mouseUp({target:null});if(this.options.helper=="original")this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");else this.currentItem.show();for(var c=this.containers.length-1;c>=0;c--){this.containers[c]._trigger("deactivate",null,b._uiHash(this));if(this.containers[c].containerCache.over){this.containers[c]._trigger("out",null,b._uiHash(this));this.containers[c].containerCache.over=0}}}if(this.placeholder){if(this.placeholder[0].parentNode)this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(this.options.helper!="original"&&this.helper&&this.helper[0].parentNode)this.helper.remove();a.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev){a(this.domPosition.prev).after(this.currentItem)}else{a(this.domPosition.parent).prepend(this.currentItem)}}return this},serialize:function(b){var c=this._getItemsAsjQuery(b&&b.connected);var d=[];b=b||{};a(c).each(function(){var c=(a(b.item||this).attr(b.attribute||"id")||"").match(b.expression||/(.+)[-=_](.+)/);if(c)d.push((b.key||c[1]+"[]")+"="+(b.key&&b.expression?c[1]:c[2]))});if(!d.length&&b.key){d.push(b.key+"=")}return d.join("&")},toArray:function(b){var c=this._getItemsAsjQuery(b&&b.connected);var d=[];b=b||{};c.each(function(){d.push(a(b.item||this).attr(b.attribute||"id")||"")});return d},_intersectsWith:function(a){var b=this.positionAbs.left,c=b+this.helperProportions.width,d=this.positionAbs.top,e=d+this.helperProportions.height;var f=a.left,g=f+a.width,h=a.top,i=h+a.height;var j=this.offset.click.top,k=this.offset.click.left;var l=d+j>h&&d+j<i&&b+k>f&&b+k<g;if(this.options.tolerance=="pointer"||this.options.forcePointerForContainers||this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>a[this.floating?"width":"height"]){return l}else{return f<b+this.helperProportions.width/2&&c-this.helperProportions.width/2<g&&h<d+this.helperProportions.height/2&&e-this.helperProportions.height/2<i}},_intersectsWithPointer:function(b){var c=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,b.top,b.height),d=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,b.left,b.width),e=c&&d,f=this._getDragVerticalDirection(),g=this._getDragHorizontalDirection();if(!e)return false;return this.floating?g&&g=="right"||f=="down"?2:1:f&&(f=="down"?2:1)},_intersectsWithSides:function(b){var c=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,b.top+b.height/2,b.height),d=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,b.left+b.width/2,b.width),e=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();if(this.floating&&f){return f=="right"&&d||f=="left"&&!d}else{return e&&(e=="down"&&c||e=="up"&&!c)}},_getDragVerticalDirection:function(){var a=this.positionAbs.top-this.lastPositionAbs.top;return a!=0&&(a>0?"down":"up")},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;return a!=0&&(a>0?"right":"left")},refresh:function(a){this._refreshItems(a);this.refreshPositions();return this},_connectWith:function(){var a=this.options;return a.connectWith.constructor==String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(b){var c=this;var d=[];var e=[];var f=this._connectWith();if(f&&b){for(var g=f.length-1;g>=0;g--){var h=a(f[g]);for(var i=h.length-1;i>=0;i--){var j=a.data(h[i],"sortable");if(j&&j!=this&&!j.options.disabled){e.push([a.isFunction(j.options.items)?j.options.items.call(j.element):a(j.options.items,j.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),j])}}}}e.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(var g=e.length-1;g>=0;g--){e[g][0].each(function(){d.push(this)})}return a(d)},_removeCurrentsFromItems:function(){var a=this.currentItem.find(":data(sortable-item)");for(var b=0;b<this.items.length;b++){for(var c=0;c<a.length;c++){if(a[c]==this.items[b].item[0])this.items.splice(b,1)}}},_refreshItems:function(b){this.items=[];this.containers=[this];var c=this.items;var d=this;var e=[[a.isFunction(this.options.items)?this.options.items.call(this.element[0],b,{item:this.currentItem}):a(this.options.items,this.element),this]];var f=this._connectWith();if(f){for(var g=f.length-1;g>=0;g--){var h=a(f[g]);for(var i=h.length-1;i>=0;i--){var j=a.data(h[i],"sortable");if(j&&j!=this&&!j.options.disabled){e.push([a.isFunction(j.options.items)?j.options.items.call(j.element[0],b,{item:this.currentItem}):a(j.options.items,j.element),j]);this.containers.push(j)}}}}for(var g=e.length-1;g>=0;g--){var k=e[g][1];var l=e[g][0];for(var i=0,m=l.length;i<m;i++){var n=a(l[i]);n.data("sortable-item",k);c.push({item:n,instance:k,width:0,height:0,left:0,top:0})}}},refreshPositions:function(b){if(this.offsetParent&&this.helper){this.offset.parent=this._getParentOffset()}for(var c=this.items.length-1;c>=0;c--){var d=this.items[c];if(d.instance!=this.currentContainer&&this.currentContainer&&d.item[0]!=this.currentItem[0])continue;var e=this.options.toleranceElement?a(this.options.toleranceElement,d.item):d.item;if(!b){d.width=e.outerWidth();d.height=e.outerHeight()}var f=e.offset();d.left=f.left;d.top=f.top}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(var c=this.containers.length-1;c>=0;c--){var f=this.containers[c].element.offset();this.containers[c].containerCache.left=f.left;this.containers[c].containerCache.top=f.top;this.containers[c].containerCache.width=this.containers[c].element.outerWidth();this.containers[c].containerCache.height=this.containers[c].element.outerHeight()}}return this},_createPlaceholder:function(b){var c=b||this,d=c.options;if(!d.placeholder||d.placeholder.constructor==String){var e=d.placeholder;d.placeholder={element:function(){var b=a(document.createElement(c.currentItem[0].nodeName)).addClass(e||c.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!e)b.style.visibility="hidden";return b},update:function(a,b){if(e&&!d.forcePlaceholderSize)return;if(!b.height()){b.height(c.currentItem.innerHeight()-parseInt(c.currentItem.css("paddingTop")||0,10)-parseInt(c.currentItem.css("paddingBottom")||0,10))}if(!b.width()){b.width(c.currentItem.innerWidth()-parseInt(c.currentItem.css("paddingLeft")||0,10)-parseInt(c.currentItem.css("paddingRight")||0,10))}}}}c.placeholder=a(d.placeholder.element.call(c.element,c.currentItem));c.currentItem.after(c.placeholder);d.placeholder.update(c,c.placeholder)},_contactContainers:function(b){var c=null,d=null;for(var e=this.containers.length-1;e>=0;e--){if(a.ui.contains(this.currentItem[0],this.containers[e].element[0]))continue;if(this._intersectsWith(this.containers[e].containerCache)){if(c&&a.ui.contains(this.containers[e].element[0],c.element[0]))continue;c=this.containers[e];d=e}else{if(this.containers[e].containerCache.over){this.containers[e]._trigger("out",b,this._uiHash(this));this.containers[e].containerCache.over=0}}}if(!c)return;if(this.containers.length===1){this.containers[d]._trigger("over",b,this._uiHash(this));this.containers[d].containerCache.over=1}else if(this.currentContainer!=this.containers[d]){var f=1e4;var g=null;var h=this.positionAbs[this.containers[d].floating?"left":"top"];for(var i=this.items.length-1;i>=0;i--){if(!a.ui.contains(this.containers[d].element[0],this.items[i].item[0]))continue;var j=this.items[i][this.containers[d].floating?"left":"top"];if(Math.abs(j-h)<f){f=Math.abs(j-h);g=this.items[i]}}if(!g&&!this.options.dropOnEmpty)return;this.currentContainer=this.containers[d];g?this._rearrange(b,g,null,true):this._rearrange(b,null,this.containers[d].element,true);this._trigger("change",b,this._uiHash());this.containers[d]._trigger("change",b,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder);this.containers[d]._trigger("over",b,this._uiHash(this));this.containers[d].containerCache.over=1}},_createHelper:function(b){var c=this.options;var d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[b,this.currentItem])):c.helper=="clone"?this.currentItem.clone():this.currentItem;if(!d.parents("body").length)a(c.appendTo!="parent"?c.appendTo:this.currentItem[0].parentNode)[0].appendChild(d[0]);if(d[0]==this.currentItem[0])this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")};if(d[0].style.width==""||c.forceHelperSize)d.width(this.currentItem.width());if(d[0].style.height==""||c.forceHelperSize)d.height(this.currentItem.height());return d},_adjustOffsetFromHelper:function(b){if(typeof b=="string"){b=b.split(" ")}if(a.isArray(b)){b={left:+b[0],top:+b[1]||0}}if("left"in b){this.offset.click.left=b.left+this.margins.left}if("right"in b){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left}if("top"in b){this.offset.click.top=b.top+this.margins.top}if("bottom"in b){this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)b={top:0,left:0};return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.currentItem.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var b=this.options;if(b.containment=="parent")b.containment=this.helper[0].parentNode;if(b.containment=="document"||b.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(b.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(b.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(b.containment)){var c=a(b.containment)[0];var d=a(b.containment).offset();var e=a(c).css("overflow")!="hidden";this.containment=[d.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,d.top+(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,d.left+(e?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,d.top+(e?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(b,c){if(!c)c=this.position;var d=b=="absolute"?1:-1;var e=this.options,f=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=/(html|body)/i.test(f[0].tagName);return{top:c.top+this.offset.relative.top*d+this.offset.parent.top*d-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():g?0:f.scrollTop())*d),left:c.left+this.offset.relative.left*d+this.offset.parent.left*d-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:f.scrollLeft())*d)}},_generatePosition:function(b){var c=this.options,d=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(d[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var f=b.pageX;var g=b.pageY;if(this.originalPosition){if(this.containment){if(b.pageX-this.offset.click.left<this.containment[0])f=this.containment[0]+this.offset.click.left;if(b.pageY-this.offset.click.top<this.containment[1])g=this.containment[1]+this.offset.click.top;if(b.pageX-this.offset.click.left>this.containment[2])f=this.containment[2]+this.offset.click.left;if(b.pageY-this.offset.click.top>this.containment[3])g=this.containment[3]+this.offset.click.top}if(c.grid){var h=this.originalPageY+Math.round((g-this.originalPageY)/c.grid[1])*c.grid[1];g=this.containment?!(h-this.offset.click.top<this.containment[1]||h-this.offset.click.top>this.containment[3])?h:!(h-this.offset.click.top<this.containment[1])?h-c.grid[1]:h+c.grid[1]:h;var i=this.originalPageX+Math.round((f-this.originalPageX)/c.grid[0])*c.grid[0];f=this.containment?!(i-this.offset.click.left<this.containment[0]||i-this.offset.click.left>this.containment[2])?i:!(i-this.offset.click.left<this.containment[0])?i-c.grid[0]:i+c.grid[0]:i}}return{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:d.scrollTop()),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:d.scrollLeft())}},_rearrange:function(a,b,c,d){c?c[0].appendChild(this.placeholder[0]):b.item[0].parentNode.insertBefore(this.placeholder[0],this.direction=="down"?b.item[0]:b.item[0].nextSibling);this.counter=this.counter?++this.counter:1;var e=this,f=this.counter;window.setTimeout(function(){if(f==e.counter)e.refreshPositions(!d)},0)},_clear:function(b,c){this.reverting=false;var d=[],e=this;if(!this._noFinalSort&&this.currentItem.parent().length)this.placeholder.before(this.currentItem);this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var f in this._storedCSS){if(this._storedCSS[f]=="auto"||this._storedCSS[f]=="static")this._storedCSS[f]=""}this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}if(this.fromOutside&&!c)d.push(function(a){this._trigger("receive",a,this._uiHash(this.fromOutside))});if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!c)d.push(function(a){this._trigger("update",a,this._uiHash())});if(!a.ui.contains(this.element[0],this.currentItem[0])){if(!c)d.push(function(a){this._trigger("remove",a,this._uiHash())});for(var f=this.containers.length-1;f>=0;f--){if(a.ui.contains(this.containers[f].element[0],this.currentItem[0])&&!c){d.push(function(a){return function(b){a._trigger("receive",b,this._uiHash(this))}}.call(this,this.containers[f]));d.push(function(a){return function(b){a._trigger("update",b,this._uiHash(this))}}.call(this,this.containers[f]))}}}for(var f=this.containers.length-1;f>=0;f--){if(!c)d.push(function(a){return function(b){a._trigger("deactivate",b,this._uiHash(this))}}.call(this,this.containers[f]));if(this.containers[f].containerCache.over){d.push(function(a){return function(b){a._trigger("out",b,this._uiHash(this))}}.call(this,this.containers[f]));this.containers[f].containerCache.over=0}}if(this._storedCursor)a("body").css("cursor",this._storedCursor);if(this._storedOpacity)this.helper.css("opacity",this._storedOpacity);if(this._storedZIndex)this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex);this.dragging=false;if(this.cancelHelperRemoval){if(!c){this._trigger("beforeStop",b,this._uiHash());for(var f=0;f<d.length;f++){d[f].call(this,b)}this._trigger("stop",b,this._uiHash())}return false}if(!c)this._trigger("beforeStop",b,this._uiHash());this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(this.helper[0]!=this.currentItem[0])this.helper.remove();this.helper=null;if(!c){for(var f=0;f<d.length;f++){d[f].call(this,b)}this._trigger("stop",b,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){if(a.Widget.prototype._trigger.apply(this,arguments)===false){this.cancel()}},_uiHash:function(b){var c=b||this;return{helper:c.helper,placeholder:c.placeholder||a([]),position:c.position,originalPosition:c.originalPosition,offset:c.positionAbs,item:c.currentItem,sender:b?b.element:null}}});a.extend(a.ui.sortable,{version:"1.8.14"})})(jQuery);(function(a,b){a.widget("ui.accordion",{options:{active:0,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var b=this,c=b.options;b.running=0;b.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix");b.headers=b.element.find(c.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){if(c.disabled){return}a(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){if(c.disabled){return}a(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){if(c.disabled){return}a(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){if(c.disabled){return}a(this).removeClass("ui-state-focus")});b.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");if(c.navigation){var d=b.element.find("a").filter(c.navigationFilter).eq(0);if(d.length){var e=d.closest(".ui-accordion-header");if(e.length){b.active=e}else{b.active=d.closest(".ui-accordion-content").prev()}}}b.active=b._findActive(b.active||c.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");b.active.next().addClass("ui-accordion-content-active");b._createIcons();b.resize();b.element.attr("role","tablist");b.headers.attr("role","tab").bind("keydown.accordion",function(a){return b._keydown(a)}).next().attr("role","tabpanel");b.headers.not(b.active||"").attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).next().hide();if(!b.active.length){b.headers.eq(0).attr("tabIndex",0)}else{b.active.attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0})}if(!a.browser.safari){b.headers.find("a").attr("tabIndex",-1)}if(c.event){b.headers.bind(c.event.split(" ").join(".accordion ")+".accordion",function(a){b._clickHandler.call(b,a,this);a.preventDefault()})}},_createIcons:function(){var b=this.options;if(b.icons){a("<span></span>").addClass("ui-icon "+b.icons.header).prependTo(this.headers);this.active.children(".ui-icon").toggleClass(b.icons.header).toggleClass(b.icons.headerSelected);this.element.addClass("ui-accordion-icons")}},_destroyIcons:function(){this.headers.children(".ui-icon").remove();this.element.removeClass("ui-accordion-icons")},destroy:function(){var b=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("tabIndex");this.headers.find("a").removeAttr("tabIndex");this._destroyIcons();var c=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");if(b.autoHeight||b.fillHeight){c.css("height","")}return a.Widget.prototype.destroy.call(this)},_setOption:function(b,c){a.Widget.prototype._setOption.apply(this,arguments);if(b=="active"){this.activate(c)}if(b=="icons"){this._destroyIcons();if(c){this._createIcons()}}if(b=="disabled"){this.headers.add(this.headers.next())[c?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")}},_keydown:function(b){if(this.options.disabled||b.altKey||b.ctrlKey){return}var c=a.ui.keyCode,d=this.headers.length,e=this.headers.index(b.target),f=false;switch(b.keyCode){case c.RIGHT:case c.DOWN:f=this.headers[(e+1)%d];break;case c.LEFT:case c.UP:f=this.headers[(e-1+d)%d];break;case c.SPACE:case c.ENTER:this._clickHandler({target:b.target},b.target);b.preventDefault()}if(f){a(b.target).attr("tabIndex",-1);a(f).attr("tabIndex",0);f.focus();return false}return true},resize:function(){var b=this.options,c;if(b.fillSpace){if(a.browser.msie){var d=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}c=this.element.parent().height();if(a.browser.msie){this.element.parent().css("overflow",d)}this.headers.each(function(){c-=a(this).outerHeight(true)});this.headers.next().each(function(){a(this).height(Math.max(0,c-a(this).innerHeight()+a(this).height()))}).css("overflow","auto")}else if(b.autoHeight){c=0;this.headers.next().each(function(){c=Math.max(c,a(this).height("").height())}).height(c)}return this},activate:function(a){this.options.active=a;var b=this._findActive(a)[0];this._clickHandler({target:b},b);return this},_findActive:function(b){return b?typeof b==="number"?this.headers.filter(":eq("+b+")"):this.headers.not(this.headers.not(b)):b===false?a([]):this.headers.filter(":eq(0)")},_clickHandler:function(b,c){var d=this.options;if(d.disabled){return}if(!b.target){if(!d.collapsible){return}this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");var e=this.active.next(),f={options:d,newHeader:a([]),oldHeader:d.active,newContent:a([]),oldContent:e},g=this.active=a([]);this._toggle(g,e,f);return}var h=a(b.currentTarget||c),i=h[0]===this.active[0];d.active=d.collapsible&&i?false:this.headers.index(h);if(this.running||!d.collapsible&&i){return}var j=this.active,g=h.next(),e=this.active.next(),f={options:d,newHeader:i&&d.collapsible?a([]):h,oldHeader:this.active,newContent:i&&d.collapsible?a([]):g,oldContent:e},k=this.headers.index(this.active[0])>this.headers.index(h[0]);this.active=i?a([]):h;this._toggle(g,e,f,i,k);j.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);if(!i){h.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected);h.next().addClass("ui-accordion-content-active")}return},_toggle:function(b,c,d,e,f){var g=this,h=g.options;g.toShow=b;g.toHide=c;g.data=d;var i=function(){if(!g){return}return g._completed.apply(g,arguments)};g._trigger("changestart",null,g.data);g.running=c.size()===0?b.size():c.size();if(h.animated){var j={};if(h.collapsible&&e){j={toShow:a([]),toHide:c,complete:i,down:f,autoHeight:h.autoHeight||h.fillSpace}}else{j={toShow:b,toHide:c,complete:i,down:f,autoHeight:h.autoHeight||h.fillSpace}}if(!h.proxied){h.proxied=h.animated}if(!h.proxiedDuration){h.proxiedDuration=h.duration}h.animated=a.isFunction(h.proxied)?h.proxied(j):h.proxied;h.duration=a.isFunction(h.proxiedDuration)?h.proxiedDuration(j):h.proxiedDuration;var k=a.ui.accordion.animations,l=h.duration,m=h.animated;if(m&&!k[m]&&!a.easing[m]){m="slide"}if(!k[m]){k[m]=function(a){this.slide(a,{easing:m,duration:l||700})}}k[m](j)}else{if(h.collapsible&&e){b.toggle()}else{c.hide();b.show()}i(true)}c.prev().attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).blur();b.prev().attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}).focus()},_completed:function(a){this.running=a?0:--this.running;if(this.running){return}if(this.options.clearStyle){this.toShow.add(this.toHide).css({height:"",overflow:""})}this.toHide.removeClass("ui-accordion-content-active");if(this.toHide.length){this.toHide.parent()[0].className=this.toHide.parent()[0].className}this._trigger("change",null,this.data)}});a.extend(a.ui.accordion,{version:"1.8.14",animations:{slide:function(b,c){b=a.extend({easing:"swing",duration:300},b,c);if(!b.toHide.size()){b.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},b);return}if(!b.toShow.size()){b.toHide.animate({height:"hide",paddingTop:"hide",paddingBottom:"hide"},b);return}var d=b.toShow.css("overflow"),e=0,f={},g={},h=["height","paddingTop","paddingBottom"],i;var j=b.toShow;i=j[0].style.width;j.width(parseInt(j.parent().width(),10)-parseInt(j.css("paddingLeft"),10)-parseInt(j.css("paddingRight"),10)-(parseInt(j.css("borderLeftWidth"),10)||0)-(parseInt(j.css("borderRightWidth"),10)||0));a.each(h,function(c,d){g[d]="hide";var e=(""+a.css(b.toShow[0],d)).match(/^([\d+-.]+)(.*)$/);f[d]={value:e[1],unit:e[2]||"px"}});b.toShow.css({height:0,overflow:"hidden"}).show();b.toHide.filter(":hidden").each(b.complete).end().filter(":visible").animate(g,{step:function(a,c){if(c.prop=="height"){e=c.end-c.start===0?0:(c.now-c.start)/(c.end-c.start)}b.toShow[0].style[c.prop]=e*f[c.prop].value+f[c.prop].unit},duration:b.duration,easing:b.easing,complete:function(){if(!b.autoHeight){b.toShow.css("height","")}b.toShow.css({width:i,overflow:d});b.complete()}})},bounceslide:function(a){this.slide(a,{easing:a.down?"easeOutBounce":"swing",duration:a.down?1e3:200})}}})})(jQuery);(function(a,b){var c=0;a.widget("ui.autocomplete",{options:{appendTo:"body",autoFocus:false,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var b=this,c=this.element[0].ownerDocument,d;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(c){if(b.options.disabled||b.element.attr("readonly")){return}d=false;var e=a.ui.keyCode;switch(c.keyCode){case e.PAGE_UP:b._move("previousPage",c);break;case e.PAGE_DOWN:b._move("nextPage",c);break;case e.UP:b._move("previous",c);c.preventDefault();break;case e.DOWN:b._move("next",c);c.preventDefault();break;case e.ENTER:case e.NUMPAD_ENTER:if(b.menu.active){d=true;c.preventDefault()};case e.TAB:if(!b.menu.active){return}b.menu.select(c);break;case e.ESCAPE:b.element.val(b.term);b.close(c);break;default:clearTimeout(b.searching);b.searching=setTimeout(function(){if(b.term!=b.element.val()){b.selectedItem=null;b.search(null,c)}},b.options.delay);break}}).bind("keypress.autocomplete",function(a){if(d){d=false;a.preventDefault()}}).bind("focus.autocomplete",function(){if(b.options.disabled){return}b.selectedItem=null;b.previous=b.element.val()}).bind("blur.autocomplete",function(a){if(b.options.disabled){return}clearTimeout(b.searching);b.closing=setTimeout(function(){b.close(a);b._change(a)},150)});this._initSource();this.response=function(){return b._response.apply(b,arguments)};this.menu=a("<ul></ul>").addClass("ui-autocomplete").appendTo(a(this.options.appendTo||"body",c)[0]).mousedown(function(c){var d=b.menu.element[0];if(!a(c.target).closest(".ui-menu-item").length){setTimeout(function(){a(document).one("mousedown",function(c){if(c.target!==b.element[0]&&c.target!==d&&!a.ui.contains(d,c.target)){b.close()}})},1)}setTimeout(function(){clearTimeout(b.closing)},13)}).menu({focus:function(a,c){var d=c.item.data("item.autocomplete");if(false!==b._trigger("focus",a,{item:d})){if(/^key/.test(a.originalEvent.type)){b.element.val(d.value)}}},selected:function(a,d){var e=d.item.data("item.autocomplete"),f=b.previous;if(b.element[0]!==c.activeElement){b.element.focus();b.previous=f;setTimeout(function(){b.previous=f;b.selectedItem=e},1)}if(false!==b._trigger("select",a,{item:e})){b.element.val(e.value)}b.term=b.element.val();b.close(a);b.selectedItem=e},blur:function(a,c){if(b.menu.element.is(":visible")&&b.element.val()!==b.term){b.element.val(b.term)}}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu");if(a.fn.bgiframe){this.menu.element.bgiframe()}},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");this.menu.element.remove();a.Widget.prototype.destroy.call(this)},_setOption:function(b,c){a.Widget.prototype._setOption.apply(this,arguments);if(b==="source"){this._initSource()}if(b==="appendTo"){this.menu.element.appendTo(a(c||"body",this.element[0].ownerDocument)[0])}if(b==="disabled"&&c&&this.xhr){this.xhr.abort()}},_initSource:function(){var b=this,d,e;if(a.isArray(this.options.source)){d=this.options.source;this.source=function(b,c){c(a.ui.autocomplete.filter(d,b.term))}}else if(typeof this.options.source==="string"){e=this.options.source;this.source=function(d,f){if(b.xhr){b.xhr.abort()}b.xhr=a.ajax({url:e,data:d,dataType:"json",autocompleteRequest:++c,success:function(a,b){if(this.autocompleteRequest===c){f(a)}},error:function(){if(this.autocompleteRequest===c){f([])}}})}}else{this.source=this.options.source}},search:function(a,b){a=a!=null?a:this.element.val();this.term=this.element.val();if(a.length<this.options.minLength){return this.close(b)}clearTimeout(this.closing);if(this._trigger("search",b)===false){return}return this._search(a)},_search:function(a){this.pending++;this.element.addClass("ui-autocomplete-loading");this.source({term:a},this.response)},_response:function(a){if(!this.options.disabled&&a&&a.length){a=this._normalize(a);this._suggest(a);this._trigger("open")}else{this.close()}this.pending--;if(!this.pending){this.element.removeClass("ui-autocomplete-loading")}},close:function(a){clearTimeout(this.closing);if(this.menu.element.is(":visible")){this.menu.element.hide();this.menu.deactivate();this._trigger("close",a)}},_change:function(a){if(this.previous!==this.element.val()){this._trigger("change",a,{item:this.selectedItem})}},_normalize:function(b){if(b.length&&b[0].label&&b[0].value){return b}return a.map(b,function(b){if(typeof b==="string"){return{label:b,value:b}}return a.extend({label:b.label||b.value,value:b.value||b.label},b)})},_suggest:function(b){var c=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(c,b);this.menu.deactivate();this.menu.refresh();c.show();this._resizeMenu();c.position(a.extend({of:this.element},this.options.position));if(this.options.autoFocus){this.menu.next(new a.Event("mouseover"))}},_resizeMenu:function(){var a=this.menu.element;a.outerWidth(Math.max(a.width("").outerWidth(),this.element.outerWidth()))},_renderMenu:function(b,c){var d=this;a.each(c,function(a,c){d._renderItem(b,c)})},_renderItem:function(b,c){return a("<li></li>").data("item.autocomplete",c).append(a("<a></a>").text(c.label)).appendTo(b)},_move:function(a,b){if(!this.menu.element.is(":visible")){this.search(null,b);return}if(this.menu.first()&&/^previous/.test(a)||this.menu.last()&&/^next/.test(a)){this.element.val(this.term);this.menu.deactivate();return}this.menu[a](b)},widget:function(){return this.menu.element}});a.extend(a.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},filter:function(b,c){var d=new RegExp(a.ui.autocomplete.escapeRegex(c),"i");return a.grep(b,function(a){return d.test(a.label||a.value||a)})}})})(jQuery);(function(a){a.widget("ui.menu",{_create:function(){var b=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(c){if(!a(c.target).closest(".ui-menu-item a").length){return}c.preventDefault();b.select(c)});this.refresh()},refresh:function(){var b=this;var c=this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem");c.children("a").addClass("ui-corner-all").attr("tabindex",-1).mouseenter(function(c){b.activate(c,a(this).parent())}).mouseleave(function(){b.deactivate()})},activate:function(a,b){this.deactivate();if(this.hasScroll()){var c=b.offset().top-this.element.offset().top,d=this.element.scrollTop(),e=this.element.height();if(c<0){this.element.scrollTop(d+c)}else if(c>=e){this.element.scrollTop(d+c-e+b.height())}}this.active=b.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",a,{item:b})},deactivate:function(){if(!this.active){return}this.active.children("a").removeClass("ui-state-hover").removeAttr("id");this._trigger("blur");this.active=null},next:function(a){this.move("next",".ui-menu-item:first",a)},previous:function(a){this.move("prev",".ui-menu-item:last",a)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(a,b,c){if(!this.active){this.activate(c,this.element.children(b));return}var d=this.active[a+"All"](".ui-menu-item").eq(0);if(d.length){this.activate(c,d)}else{this.activate(c,this.element.children(b))}},nextPage:function(b){if(this.hasScroll()){if(!this.active||this.last()){this.activate(b,this.element.children(".ui-menu-item:first"));return}var c=this.active.offset().top,d=this.element.height(),e=this.element.children(".ui-menu-item").filter(function(){var b=a(this).offset().top-c-d+a(this).height();return b<10&&b>-10});if(!e.length){e=this.element.children(".ui-menu-item:last")}this.activate(b,e)}else{this.activate(b,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))}},previousPage:function(b){if(this.hasScroll()){if(!this.active||this.first()){this.activate(b,this.element.children(".ui-menu-item:last"));return}var c=this.active.offset().top,d=this.element.height();result=this.element.children(".ui-menu-item").filter(function(){var b=a(this).offset().top-c+d-a(this).height();return b<10&&b>-10});if(!result.length){result=this.element.children(".ui-menu-item:first")}this.activate(b,result)}else{this.activate(b,this.element.children(".ui-menu-item").filter(!this.active||this.first()?":last":":first"))}},hasScroll:function(){return this.element.height()<this.element[a.fn.prop?"prop":"attr"]("scrollHeight")},select:function(a){this._trigger("selected",a,{item:this.active})}})})(jQuery);(function(a,b){var c,d,e,f,g="ui-button ui-widget ui-state-default ui-corner-all",h="ui-state-hover ui-state-active ",i="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",j=function(){var b=a(this).find(":ui-button");setTimeout(function(){b.button("refresh")},1)},k=function(b){var c=b.name,d=b.form,e=a([]);if(c){if(d){e=a(d).find("[name='"+c+"']")}else{e=a("[name='"+c+"']",b.ownerDocument).filter(function(){return!this.form})}}return e};a.widget("ui.button",{options:{disabled:null,text:true,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset.button").bind("reset.button",j);if(typeof this.options.disabled!=="boolean"){this.options.disabled=this.element.attr("disabled")}this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var b=this,h=this.options,i=this.type==="checkbox"||this.type==="radio",l="ui-state-hover"+(!i?" ui-state-active":""),m="ui-state-focus";if(h.label===null){h.label=this.buttonElement.html()}if(this.element.is(":disabled")){h.disabled=true}this.buttonElement.addClass(g).attr("role","button").bind("mouseenter.button",function(){if(h.disabled){return}a(this).addClass("ui-state-hover");if(this===c){a(this).addClass("ui-state-active")}}).bind("mouseleave.button",function(){if(h.disabled){return}a(this).removeClass(l)}).bind("click.button",function(a){if(h.disabled){a.preventDefault();a.stopImmediatePropagation()}});this.element.bind("focus.button",function(){b.buttonElement.addClass(m)}).bind("blur.button",function(){b.buttonElement.removeClass(m)});if(i){this.element.bind("change.button",function(){if(f){return}b.refresh()});this.buttonElement.bind("mousedown.button",function(a){if(h.disabled){return}f=false;d=a.pageX;e=a.pageY}).bind("mouseup.button",function(a){if(h.disabled){return}if(d!==a.pageX||e!==a.pageY){f=true}})}if(this.type==="checkbox"){this.buttonElement.bind("click.button",function(){if(h.disabled||f){return false}a(this).toggleClass("ui-state-active");b.buttonElement.attr("aria-pressed",b.element[0].checked)})}else if(this.type==="radio"){this.buttonElement.bind("click.button",function(){if(h.disabled||f){return false}a(this).addClass("ui-state-active");b.buttonElement.attr("aria-pressed",true);var c=b.element[0];k(c).not(c).map(function(){return a(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed",false)})}else{this.buttonElement.bind("mousedown.button",function(){if(h.disabled){return false}a(this).addClass("ui-state-active");c=this;a(document).one("mouseup",function(){c=null})}).bind("mouseup.button",function(){if(h.disabled){return false}a(this).removeClass("ui-state-active")}).bind("keydown.button",function(b){if(h.disabled){return false}if(b.keyCode==a.ui.keyCode.SPACE||b.keyCode==a.ui.keyCode.ENTER){a(this).addClass("ui-state-active")}}).bind("keyup.button",function(){a(this).removeClass("ui-state-active")});if(this.buttonElement.is("a")){this.buttonElement.keyup(function(b){if(b.keyCode===a.ui.keyCode.SPACE){a(this).click()}})}}this._setOption("disabled",h.disabled);this._resetButton()},_determineButtonType:function(){if(this.element.is(":checkbox")){this.type="checkbox"}else if(this.element.is(":radio")){this.type="radio"}else if(this.element.is("input")){this.type="input"}else{this.type="button"}if(this.type==="checkbox"||this.type==="radio"){var a=this.element.parents().filter(":last"),b="label[for="+this.element.attr("id")+"]";this.buttonElement=a.find(b);if(!this.buttonElement.length){a=a.length?a.siblings():this.element.siblings();this.buttonElement=a.filter(b);if(!this.buttonElement.length){this.buttonElement=a.find(b)}}this.element.addClass("ui-helper-hidden-accessible");var c=this.element.is(":checked");if(c){this.buttonElement.addClass("ui-state-active")}this.buttonElement.attr("aria-pressed",c)}else{this.buttonElement=this.element}},widget:function(){return this.buttonElement},destroy:function(){this.element.removeClass("ui-helper-hidden-accessible");this.buttonElement.removeClass(g+" "+h+" "+i).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());if(!this.hasTitle){this.buttonElement.removeAttr("title")}a.Widget.prototype.destroy.call(this)},_setOption:function(b,c){a.Widget.prototype._setOption.apply(this,arguments);if(b==="disabled"){if(c){this.element.attr("disabled",true)}else{this.element.removeAttr("disabled")}return}this._resetButton()},refresh:function(){var b=this.element.is(":disabled");if(b!==this.options.disabled){this._setOption("disabled",b)}if(this.type==="radio"){k(this.element[0]).each(function(){if(a(this).is(":checked")){a(this).button("widget").addClass("ui-state-active").attr("aria-pressed",true)}else{a(this).button("widget").removeClass("ui-state-active").attr("aria-pressed",false)}})}else if(this.type==="checkbox"){if(this.element.is(":checked")){this.buttonElement.addClass("ui-state-active").attr("aria-pressed",true)}else{this.buttonElement.removeClass("ui-state-active").attr("aria-pressed",false)}}},_resetButton:function(){if(this.type==="input"){if(this.options.label){this.element.val(this.options.label)}return}var b=this.buttonElement.removeClass(i),c=a("<span></span>").addClass("ui-button-text").html(this.options.label).appendTo(b.empty()).text(),d=this.options.icons,e=d.primary&&d.secondary,f=[];if(d.primary||d.secondary){if(this.options.text){f.push("ui-button-text-icon"+(e?"s":d.primary?"-primary":"-secondary"))}if(d.primary){b.prepend("<span class='ui-button-icon-primary ui-icon "+d.primary+"'></span>")}if(d.secondary){b.append("<span class='ui-button-icon-secondary ui-icon "+d.secondary+"'></span>")}if(!this.options.text){f.push(e?"ui-button-icons-only":"ui-button-icon-only");if(!this.hasTitle){b.attr("title",c)}}}else{f.push("ui-button-text-only")}b.addClass(f.join(" "))}});a.widget("ui.buttonset",{options:{items:":button, :submit, :reset, :checkbox, :radio, a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(b,c){if(b==="disabled"){this.buttons.button("option",b,c)}a.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){var b=this.element.css("direction")==="ltr";this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(b?"ui-corner-left":"ui-corner-right").end().filter(":last").addClass(b?"ui-corner-right":"ui-corner-left").end().end()},destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return a(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy");a.Widget.prototype.destroy.call(this)}})})(jQuery);(function(a,b){var c="ui-dialog "+"ui-widget "+"ui-widget-content "+"ui-corner-all ",d={buttons:true,height:true,maxHeight:true,maxWidth:true,minHeight:true,minWidth:true,width:true},e={maxHeight:true,maxWidth:true,minHeight:true,minWidth:true},f=a.attrFn||{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true,click:true};a.widget("ui.dialog",{options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",showCloseButton:true,showTitleBar:true,dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:{my:"center",at:"center",collision:"fit",using:function(b){var c=a(this).css(b).offset().top;if(c<0){a(this).css("top",b.top-c)}}},resizable:true,show:null,stack:true,title:"",width:300,zIndex:1e3},_create:function(){this.originalTitle=this.element.attr("title");if(typeof this.originalTitle!=="string"){this.originalTitle=""}this.options.title=this.options.title||this.originalTitle;var b=this,d=b.options,e=d.title||"&#160;",f=a.ui.dialog.getTitleId(b.element),g=(b.uiDialog=a("<div></div>")).appendTo(document.body).hide().addClass(c+d.dialogClass).css({zIndex:d.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(c){if(d.closeOnEscape&&c.keyCode&&c.keyCode===a.ui.keyCode.ESCAPE){b.close(c);c.preventDefault()}}).attr({role:"dialog","aria-labelledby":f}).mousedown(function(a){b.moveToTop(false,a)}),h=b.element.show().removeAttr("title").addClass("ui-dialog-content "+"ui-widget-content").appendTo(g),i=(b.uiDialogTitlebar=a("<div></div>")).addClass("ui-dialog-titlebar "+"ui-widget-header "+"ui-corner-all "+(!d.showTitleBar?" ui-helper-hidden":" ui-helper-clearfix")).prependTo(g),j=a('<a href="#"></a>').addClass("ui-dialog-titlebar-close "+"ui-corner-all"+(!d.showCloseButton?" ui-helper-hidden":"")).attr("role","button").hover(function(){j.addClass("ui-state-hover")},function(){j.removeClass("ui-state-hover")}).focus(function(){j.addClass("ui-state-focus")}).blur(function(){j.removeClass("ui-state-focus")}).click(function(a){b.close(a);return false}).appendTo(i),k=(b.uiDialogTitlebarCloseText=a("<span></span>")).addClass("ui-icon "+"ui-icon-closethick").text(d.closeText).appendTo(j),l=a("<span></span>").addClass("ui-dialog-title").attr("id",f).html(e).prependTo(i);if(a.isFunction(d.beforeclose)&&!a.isFunction(d.beforeClose)){d.beforeClose=d.beforeclose}i.find("*").add(i).disableSelection();if(d.draggable&&a.fn.draggable){b._makeDraggable()}if(d.resizable&&a.fn.resizable){b._makeResizable()}b._createButtons(d.buttons);b._isOpen=false;if(a.fn.bgiframe){g.bgiframe()}},_init:function(){if(this.options.autoOpen){this.open()}},destroy:function(){var a=this;if(a.overlay){a.overlay.destroy()}a.uiDialog.hide();a.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");a.uiDialog.remove();if(a.originalTitle){a.element.attr("title",a.originalTitle)}return a},widget:function(){return this.uiDialog},close:function(b){var c=this,d,e;if(false===c._trigger("beforeClose",b)){return}if(c.overlay){c.overlay.destroy()}c.uiDialog.unbind("keypress.ui-dialog");c._isOpen=false;if(c.options.hide){c.uiDialog.hide(c.options.hide,function(){c._trigger("close",b)})}else{c.uiDialog.hide();c._trigger("close",b)}a.ui.dialog.overlay.resize();if(c.options.modal){d=0;a(".ui-dialog").each(function(){if(this!==c.uiDialog[0]){e=a(this).css("z-index");if(!isNaN(e)){d=Math.max(d,e)}}});a.ui.dialog.maxZ=d}return c},isOpen:function(){return this._isOpen},moveToTop:function(b,c){var d=this,e=d.options,f;if(e.modal&&!b||!e.stack&&!e.modal){return d._trigger("focus",c)}if(e.zIndex>a.ui.dialog.maxZ){a.ui.dialog.maxZ=e.zIndex}if(d.overlay){a.ui.dialog.maxZ+=1;d.overlay.$el.css("z-index",a.ui.dialog.overlay.maxZ=a.ui.dialog.maxZ)}f={scrollTop:d.element.attr("scrollTop"),scrollLeft:d.element.attr("scrollLeft")};a.ui.dialog.maxZ+=1;d.uiDialog.css("z-index",a.ui.dialog.maxZ);d.element.attr(f);d._trigger("focus",c);return d},open:function(){if(this._isOpen){return}var b=this,c=b.options,d=b.uiDialog;b.overlay=c.modal?new a.ui.dialog.overlay(b):null;b._size();b._position(c.position);d.show(c.show);b.moveToTop(true);if(c.modal){d.bind("keypress.ui-dialog",function(b){if(b.keyCode!==a.ui.keyCode.TAB){return}var c=a(":tabbable",this),d=c.filter(":first"),e=c.filter(":last");if(b.target===e[0]&&!b.shiftKey){d.focus(1);return false}else if(b.target===d[0]&&b.shiftKey){e.focus(1);return false}})}a(b.element.find(":tabbable").get().concat(d.find(".ui-dialog-buttonpane :tabbable").get().concat(d.get()))).eq(0).focus();b._isOpen=true;b._trigger("open");return b},_createButtons:function(b){var c=this,d=false,e=a("<div></div>").addClass("ui-dialog-buttonpane "+"ui-widget-content "+"ui-helper-clearfix"),g=a("<div></div>").addClass("ui-dialog-buttonset").appendTo(e);c.uiDialog.find(".ui-dialog-buttonpane").remove();if(typeof b==="object"&&b!==null){a.each(b,function(){return!(d=true)})}if(d){a.each(b,function(b,d){d=a.isFunction(d)?{click:d,text:b}:d;var e=a('<button type="button"></button>').click(function(){d.click.apply(c.element[0],arguments)}).appendTo(g);a.each(d,function(a,b){if(a==="click"){return}if(a in f){e[a](b)}else{e.attr(a,b)}});if(a.fn.button){e.button()}});e.appendTo(c.uiDialog)}},_makeDraggable:function(){function f(a){return{position:a.position,offset:a.offset}}var b=this,c=b.options,d=a(document),e;b.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(d,g){e=c.height==="auto"?"auto":a(this).height();a(this).height(a(this).height()).addClass("ui-dialog-dragging");b._trigger("dragStart",d,f(g))},drag:function(a,c){b._trigger("drag",a,f(c))},stop:function(g,h){c.position=[h.position.left-d.scrollLeft(),h.position.top-d.scrollTop()];a(this).removeClass("ui-dialog-dragging").height(e);b._trigger("dragStop",g,f(h));a.ui.dialog.overlay.resize()}})},_makeResizable:function(c){function h(a){return{originalPosition:a.originalPosition,originalSize:a.originalSize,position:a.position,size:a.size}}c=c===b?this.options.resizable:c;var d=this,e=d.options,f=d.uiDialog.css("position"),g=typeof c==="string"?c:"n,e,s,w,se,sw,ne,nw";d.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:d.element,maxWidth:e.maxWidth,maxHeight:e.maxHeight,minWidth:e.minWidth,minHeight:d._minHeight(),handles:g,start:function(b,c){a(this).addClass("ui-dialog-resizing");d._trigger("resizeStart",b,h(c))},resize:function(a,b){d._trigger("resize",a,h(b))},stop:function(b,c){a(this).removeClass("ui-dialog-resizing");e.height=a(this).height();e.width=a(this).width();d._trigger("resizeStop",b,h(c));a.ui.dialog.overlay.resize()}}).css("position",f).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var a=this.options;if(a.height==="auto"){return a.minHeight}else{return Math.min(a.minHeight,a.height)}},_position:function(b){var c=[],d=[0,0],e;if(b){if(typeof b==="string"||typeof b==="object"&&"0"in b){c=b.split?b.split(" "):[b[0],b[1]];if(c.length===1){c[1]=c[0]}a.each(["left","top"],function(a,b){if(+c[a]===c[a]){d[a]=c[a];c[a]=b}});b={my:c.join(" "),at:c.join(" "),offset:d.join(" ")}}b=a.extend({},a.ui.dialog.prototype.options.position,b)}else{b=a.ui.dialog.prototype.options.position}e=this.uiDialog.is(":visible");if(!e){this.uiDialog.show()}this.uiDialog.css({top:0,left:0}).position(a.extend({of:window},b));if(!e){this.uiDialog.hide()}},_setOptions:function(b){var c=this,f={},g=false;a.each(b,function(a,b){c._setOption(a,b);if(a in d){g=true}if(a in e){f[a]=b}});if(g){this._size()}if(this.uiDialog.is(":data(resizable)")){this.uiDialog.resizable("option",f)}},_setOption:function(b,d){var e=this,f=e.uiDialog;switch(b){case"beforeclose":b="beforeClose";break;case"buttons":e._createButtons(d);break;case"closeText":e.uiDialogTitlebarCloseText.text(""+d);break;case"showCloseButton":e.uiDialogTitlebar.find(".ui-dialog-titlebar-close")[d?"removeClass":"addClass"]("ui-helper-hidden");break;case"showTitleBar":if(d){e.uiDialogTitlebar.removeClass("ui-helper-hidden").addClass("ui-helper-clearfix")}else{e.uiDialogTitlebar.addClass("ui-helper-hidden").removeClass("ui-helper-clearfix")}break;case"dialogClass":f.removeClass(e.options.dialogClass).addClass(c+d);break;case"disabled":if(d){f.addClass("ui-dialog-disabled")}else{f.removeClass("ui-dialog-disabled")}break;case"draggable":var g=f.is(":data(draggable)");if(g&&!d){f.draggable("destroy")}if(!g&&d){e._makeDraggable()}break;case"position":e._position(d);break;case"resizable":var h=f.is(":data(resizable)");if(h&&!d){f.resizable("destroy")}if(h&&typeof d==="string"){f.resizable("option","handles",d)}if(!h&&d!==false){e._makeResizable(d)}break;case"title":a(".ui-dialog-title",e.uiDialogTitlebar).html(""+(d||"&#160;"));break}a.Widget.prototype._setOption.apply(e,arguments)},_size:function(){var b=this.options,c,d,e=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0});if(b.minWidth>b.width){b.width=b.minWidth}c=this.uiDialog.css({height:"auto",width:b.width}).height();d=Math.max(0,b.minHeight-c);if(b.height==="auto"){if(a.support.minHeight){this.element.css({minHeight:d,height:"auto"})}else{this.uiDialog.show();var f=this.element.css("height","auto").height();if(!e){this.uiDialog.hide()}this.element.height(Math.max(f,d))}}else{this.element.height(Math.max(b.height-c,0))}if(this.uiDialog.is(":data(resizable)")){this.uiDialog.resizable("option","minHeight",this._minHeight())}}});a.extend(a.ui.dialog,{version:"1.8.14",uuid:0,maxZ:0,getTitleId:function(a){var b=a.attr("id");if(!b){this.uuid+=1;b=this.uuid}return"ui-dialog-title-"+b},overlay:function(b){this.$el=a.ui.dialog.overlay.create(b)}});a.extend(a.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:a.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(a){return a+".dialog-overlay"}).join(" "),create:function(b){if(this.instances.length===0){setTimeout(function(){if(a.ui.dialog.overlay.instances.length){a(document).bind(a.ui.dialog.overlay.events,function(b){if(a(b.target).zIndex()<a.ui.dialog.overlay.maxZ){return false}})}},1);a(document).bind("keydown.dialog-overlay",function(c){if(b.options.closeOnEscape&&c.keyCode&&c.keyCode===a.ui.keyCode.ESCAPE){b.close(c);c.preventDefault()}});a(window).bind("resize.dialog-overlay",a.ui.dialog.overlay.resize)}var c=(this.oldInstances.pop()||a("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});if(a.fn.bgiframe){c.bgiframe()}this.instances.push(c);return c},destroy:function(b){var c=a.inArray(b,this.instances);if(c!=-1){this.oldInstances.push(this.instances.splice(c,1)[0])}if(this.instances.length===0){a([document,window]).unbind(".dialog-overlay")}b.remove();var d=0;a.each(this.instances,function(){d=Math.max(d,this.css("z-index"))});this.maxZ=d},height:function(){var b,c;if(a.browser.msie&&a.browser.version<7){b=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);c=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(b<c){return a(window).height()+"px"}else{return b+"px"}}else{return a(document).height()+"px"}},width:function(){var b,c;if(a.browser.msie){b=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);c=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(b<c){return a(window).width()+"px"}else{return b+"px"}}else{return a(document).width()+"px"}},resize:function(){var b=a([]);a.each(a.ui.dialog.overlay.instances,function(){b=b.add(this)});b.css({width:0,height:0}).css({width:a.ui.dialog.overlay.width(),height:a.ui.dialog.overlay.height()})}});a.extend(a.ui.dialog.overlay.prototype,{destroy:function(){a.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);(function(a,b){var c=5;a.widget("ui.slider",a.ui.mouse,{widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var b=this,d=this.options,e=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),f="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",g=d.values&&d.values.length||1,h=[];this._keySliding=false;this._mouseSliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider"+" ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"+(d.disabled?" ui-slider-disabled ui-disabled":""));this.range=a([]);if(d.range){if(d.range===true){if(!d.values){d.values=[this._valueMin(),this._valueMin()]}if(d.values.length&&d.values.length!==2){d.values=[d.values[0],d.values[0]]}}this.range=a("<div></div>").appendTo(this.element).addClass("ui-slider-range"+" ui-widget-header"+(d.range==="min"||d.range==="max"?" ui-slider-range-"+d.range:""))}for(var i=e.length;i<g;i+=1){h.push(f)}this.handles=e.add(a(h.join("")).appendTo(b.element));this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(a){a.preventDefault()}).hover(function(){if(!d.disabled){a(this).addClass("ui-state-hover")}},function(){a(this).removeClass("ui-state-hover")}).focus(function(){if(!d.disabled){a(".ui-slider .ui-state-focus").removeClass("ui-state-focus");a(this).addClass("ui-state-focus")}else{a(this).blur()}}).blur(function(){a(this).removeClass("ui-state-focus")});this.handles.each(function(b){a(this).data("index.ui-slider-handle",b)});this.handles.keydown(function(d){var e=true,f=a(this).data("index.ui-slider-handle"),g,h,i,j;if(b.options.disabled){return}switch(d.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.PAGE_UP:case a.ui.keyCode.PAGE_DOWN:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:e=false;if(!b._keySliding){b._keySliding=true;a(this).addClass("ui-state-active");g=b._start(d,f);if(g===false){return}}break}j=b.options.step;if(b.options.values&&b.options.values.length){h=i=b.values(f)}else{h=i=b.value()}switch(d.keyCode){case a.ui.keyCode.HOME:i=b._valueMin();break;case a.ui.keyCode.END:i=b._valueMax();break;case a.ui.keyCode.PAGE_UP:i=b._trimAlignValue(h+(b._valueMax()-b._valueMin())/c);break;case a.ui.keyCode.PAGE_DOWN:i=b._trimAlignValue(h-(b._valueMax()-b._valueMin())/c);break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(h===b._valueMax()){return}i=b._trimAlignValue(h+j);break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(h===b._valueMin()){return}i=b._trimAlignValue(h-j);break}b._slide(d,f,i);return e}).keyup(function(c){var d=a(this).data("index.ui-slider-handle");if(b._keySliding){b._keySliding=false;b._stop(c,d);b._change(c,d);a(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider"+" ui-slider-horizontal"+" ui-slider-vertical"+" ui-slider-disabled"+" ui-widget"+" ui-widget-content"+" ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy();return this},_mouseCapture:function(b){var c=this.options,d,e,f,g,h,i,j,k,l;if(c.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();d={x:b.pageX,y:b.pageY};e=this._normValueFromMouse(d);f=this._valueMax()-this._valueMin()+1;h=this;this.handles.each(function(b){var c=Math.abs(e-h.values(b));if(f>c){f=c;g=a(this);i=b}});if(c.range===true&&this.values(1)===c.min){i+=1;g=a(this.handles[i])}j=this._start(b,i);if(j===false){return false}this._mouseSliding=true;h._handleIndex=i;g.addClass("ui-state-active").focus();k=g.offset();l=!a(b.target).parents().andSelf().is(".ui-slider-handle");this._clickOffset=l?{left:0,top:0}:{left:b.pageX-k.left-g.width()/2,top:b.pageY-k.top-g.height()/2-(parseInt(g.css("borderTopWidth"),10)||0)-(parseInt(g.css("borderBottomWidth"),10)||0)+(parseInt(g.css("marginTop"),10)||0)};if(!this.handles.hasClass("ui-state-hover")){this._slide(b,i,e)}this._animateOff=true;return true},_mouseStart:function(a){return true},_mouseDrag:function(a){var b={x:a.pageX,y:a.pageY},c=this._normValueFromMouse(b);this._slide(a,this._handleIndex,c);return false},_mouseStop:function(a){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(a,this._handleIndex);this._change(a,this._handleIndex);this._handleIndex=null;this._clickOffset=null;this._animateOff=false;return false},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(a){var b,c,d,e,f;if(this.orientation==="horizontal"){b=this.elementSize.width;c=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{b=this.elementSize.height;c=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}d=c/b;if(d>1){d=1}if(d<0){d=0}if(this.orientation==="vertical"){d=1-d}e=this._valueMax()-this._valueMin();f=this._valueMin()+d*e;return this._trimAlignValue(f)},_start:function(a,b){var c={handle:this.handles[b],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(b);c.values=this.values()}return this._trigger("start",a,c)},_slide:function(a,b,c){var d,e,f;if(this.options.values&&this.options.values.length){d=this.values(b?0:1);if(this.options.values.length===2&&this.options.range===true&&(b===0&&c>d||b===1&&c<d)){c=d}if(c!==this.values(b)){e=this.values();e[b]=c;f=this._trigger("slide",a,{handle:this.handles[b],value:c,values:e});d=this.values(b?0:1);if(f!==false){this.values(b,c,true)}}}else{if(c!==this.value()){f=this._trigger("slide",a,{handle:this.handles[b],value:c});if(f!==false){this.value(c)}}}},_stop:function(a,b){var c={handle:this.handles[b],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(b);c.values=this.values()}this._trigger("stop",a,c)},_change:function(a,b){if(!this._keySliding&&!this._mouseSliding){var c={handle:this.handles[b],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(b);c.values=this.values()}this._trigger("change",a,c)}},value:function(a){if(arguments.length){this.options.value=this._trimAlignValue(a);this._refreshValue();this._change(null,0);return}return this._value()},values:function(b,c){var d,e,f;if(arguments.length>1){this.options.values[b]=this._trimAlignValue(c);this._refreshValue();this._change(null,b);return}if(arguments.length){if(a.isArray(arguments[0])){d=this.options.values;e=arguments[0];for(f=0;f<d.length;f+=1){d[f]=this._trimAlignValue(e[f]);this._change(null,f)}this._refreshValue()}else{if(this.options.values&&this.options.values.length){return this._values(b)}else{return this.value()}}}else{return this._values()}},_setOption:function(b,c){var d,e=0;if(a.isArray(this.options.values)){e=this.options.values.length}a.Widget.prototype._setOption.apply(this,arguments);switch(b){case"disabled":if(c){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled");this.element.addClass("ui-disabled")}else{this.handles.removeAttr("disabled");this.element.removeClass("ui-disabled")}break;case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();break;case"value":this._animateOff=true;this._refreshValue();this._change(null,0);this._animateOff=false;break;case"values":this._animateOff=true;this._refreshValue();for(d=0;d<e;d+=1){this._change(null,d)}this._animateOff=false;break}},_value:function(){var a=this.options.value;a=this._trimAlignValue(a);return a},_values:function(a){var b,c,d;if(arguments.length){b=this.options.values[a];b=this._trimAlignValue(b);return b}else{c=this.options.values.slice();for(d=0;d<c.length;d+=1){c[d]=this._trimAlignValue(c[d])}return c}},_trimAlignValue:function(a){if(a<=this._valueMin()){return this._valueMin()}if(a>=this._valueMax()){return this._valueMax()}var b=this.options.step>0?this.options.step:1,c=(a-this._valueMin())%b;alignValue=a-c;if(Math.abs(c)*2>=b){alignValue+=c>0?b:-b}return parseFloat(alignValue.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var b=this.options.range,c=this.options,d=this,e=!this._animateOff?c.animate:false,f,g={},h,i,j,k;if(this.options.values&&this.options.values.length){this.handles.each(function(b,i){f=(d.values(b)-d._valueMin())/(d._valueMax()-d._valueMin())*100;g[d.orientation==="horizontal"?"left":"bottom"]=f+"%";a(this).stop(1,1)[e?"animate":"css"](g,c.animate);if(d.options.range===true){if(d.orientation==="horizontal"){if(b===0){d.range.stop(1,1)[e?"animate":"css"]({left:f+"%"},c.animate)}if(b===1){d.range[e?"animate":"css"]({width:f-h+"%"},{queue:false,duration:c.animate})}}else{if(b===0){d.range.stop(1,1)[e?"animate":"css"]({bottom:f+"%"},c.animate)}if(b===1){d.range[e?"animate":"css"]({height:f-h+"%"},{queue:false,duration:c.animate})}}}h=f})}else{i=this.value();j=this._valueMin();k=this._valueMax();f=k!==j?(i-j)/(k-j)*100:0;g[d.orientation==="horizontal"?"left":"bottom"]=f+"%";this.handle.stop(1,1)[e?"animate":"css"](g,c.animate);if(b==="min"&&this.orientation==="horizontal"){this.range.stop(1,1)[e?"animate":"css"]({width:f+"%"},c.animate)}if(b==="max"&&this.orientation==="horizontal"){this.range[e?"animate":"css"]({width:100-f+"%"},{queue:false,duration:c.animate})}if(b==="min"&&this.orientation==="vertical"){this.range.stop(1,1)[e?"animate":"css"]({height:f+"%"},c.animate)}if(b==="max"&&this.orientation==="vertical"){this.range[e?"animate":"css"]({height:100-f+"%"},{queue:false,duration:c.animate})}}}});a.extend(a.ui.slider,{version:"1.8.14"})})(jQuery);(function(a,b){function e(){return++c}function f(){return++d}var c=0,d=0;a.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:false,cookie:null,collapsible:false,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"<div></div>",remove:null,select:null,show:null,spinner:"<em>Loading&#8230;</em>",tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"},_create:function(){this._tabify(true)},_setOption:function(a,b){if(a=="selected"){if(this.options.collapsible&&b==this.options.selected){return}this.select(b)}else{this.options[a]=b;this._tabify()}},_tabId:function(a){return a.title&&a.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+e()},_sanitizeSelector:function(a){return a.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+f());return a.cookie.apply(null,[b].concat(a.makeArray(arguments)))},_ui:function(a,b){return{tab:a,panel:b,index:this.anchors.index(a)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=a(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(c){function m(b,c){b.css("display","");if(!a.support.opacity&&c.opacity){b[0].style.removeAttribute("filter")}}var d=this,e=this.options,f=/^#.+/;this.list=this.element.find("ol:not(.ui-tabs-skip),ul:not(.ui-tabs-skip)").eq(0);this.lis=a(" > li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return a("a",this)[0]});this.panels=a([]);this.anchors.each(function(b,c){var g=a(c).attr("href");var h=g.split("#")[0],i;if(h&&(h===location.toString().split("#")[0]||(i=a("base")[0])&&h===i.href)){g=c.hash;c.href=g}if(f.test(g)){d.panels=d.panels.add(d.element.find(d._sanitizeSelector(g)))}else if(g&&g!=="#"){a.data(c,"href.tabs",g);a.data(c,"load.tabs",g.replace(/#.*$/,""));var j=d._tabId(c);c.href="#"+j;var k=d.element.find("#"+j);if(!k.length){k=a(e.panelTemplate).attr("id",j).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(d.panels[b-1]||d.list);k.data("destroy.tabs",true)}d.panels=d.panels.add(k)}else{e.disabled.push(b)}});if(c){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(e.selected===b){if(location.hash){this.anchors.each(function(a,b){if(b.hash==location.hash){e.selected=a;return false}})}if(typeof e.selected!=="number"&&e.cookie){e.selected=parseInt(d._cookie(),10)}if(typeof e.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length){e.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}e.selected=e.selected||(this.lis.length?0:-1)}else if(e.selected===null){e.selected=-1}e.selected=e.selected>=0&&this.anchors[e.selected]||e.selected<0?e.selected:0;e.disabled=a.unique(e.disabled.concat(a.map(this.lis.filter(".ui-state-disabled"),function(a,b){return d.lis.index(a)}))).sort();if(a.inArray(e.selected,e.disabled)!=-1){e.disabled.splice(a.inArray(e.selected,e.disabled),1)}this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(e.selected>=0&&this.anchors.length){d.element.find(d._sanitizeSelector(d.anchors[e.selected].hash)).removeClass("ui-tabs-hide");this.lis.eq(e.selected).addClass("ui-tabs-selected ui-state-active");d.element.queue("tabs",function(){d._trigger("show",null,d._ui(d.anchors[e.selected],d.element.find(d._sanitizeSelector(d.anchors[e.selected].hash))[0]))});this.load(e.selected)}a(window).bind("unload",function(){d.lis.add(d.anchors).unbind(".tabs");d.lis=d.anchors=d.panels=null})}else{e.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}this.element[e.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");if(e.cookie){this._cookie(e.selected,e.cookie)}for(var g=0,h;h=this.lis[g];g++){a(h)[a.inArray(g,e.disabled)!=-1&&!a(h).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")}if(e.cache===false){this.anchors.removeData("cache.tabs")}this.lis.add(this.anchors).unbind(".tabs");if(e.event!=="mouseover"){var i=function(a,b){if(b.is(":not(.ui-state-disabled)")){b.addClass("ui-state-"+a)}};var j=function(a,b){b.removeClass("ui-state-"+a)};this.lis.bind("mouseover.tabs",function(){i("hover",a(this))});this.lis.bind("mouseout.tabs",function(){j("hover",a(this))});this.anchors.bind("focus.tabs",function(){i("focus",a(this).closest("li"))});this.anchors.bind("blur.tabs",function(){j("focus",a(this).closest("li"))})}var k,l;if(e.fx){if(a.isArray(e.fx)){k=e.fx[0];l=e.fx[1]}else{k=l=e.fx}}var n=l?function(b,c){a(b).closest("li").addClass("ui-tabs-selected ui-state-active");c.hide().removeClass("ui-tabs-hide").animate(l,l.duration||"normal",function(){m(c,l);d._trigger("show",null,d._ui(b,c[0]))})}:function(b,c){a(b).closest("li").addClass("ui-tabs-selected ui-state-active");c.removeClass("ui-tabs-hide");d._trigger("show",null,d._ui(b,c[0]))};var o=k?function(a,b){b.animate(k,k.duration||"normal",function(){d.lis.removeClass("ui-tabs-selected ui-state-active");b.addClass("ui-tabs-hide");m(b,k);d.element.dequeue("tabs")})}:function(a,b,c){d.lis.removeClass("ui-tabs-selected ui-state-active");b.addClass("ui-tabs-hide");d.element.dequeue("tabs")};this.anchors.bind(e.event+".tabs",function(){var b=this,c=a(b).closest("li"),f=d.panels.filter(":not(.ui-tabs-hide)"),g=d.element.find(d._sanitizeSelector(b.hash));if(c.hasClass("ui-tabs-selected")&&!e.collapsible||c.hasClass("ui-state-disabled")||c.hasClass("ui-state-processing")||d.panels.filter(":animated").length||d._trigger("select",null,d._ui(this,g[0]))===false){this.blur();return false}e.selected=d.anchors.index(this);d.abort();if(e.collapsible){if(c.hasClass("ui-tabs-selected")){e.selected=-1;if(e.cookie){d._cookie(e.selected,e.cookie)}d.element.queue("tabs",function(){o(b,f)}).dequeue("tabs");this.blur();return false}else if(!f.length){if(e.cookie){d._cookie(e.selected,e.cookie)}d.element.queue("tabs",function(){n(b,g)});d.load(d.anchors.index(this));this.blur();return false}}if(e.cookie){d._cookie(e.selected,e.cookie)}if(g.length){if(f.length){d.element.queue("tabs",function(){o(b,f)})}d.element.queue("tabs",function(){n(b,g)});d.load(d.anchors.index(this))}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}if(a.browser.msie){this.blur()}});this.anchors.bind("click.tabs",function(){return false})},_getIndex:function(a){if(typeof a=="string"){a=this.anchors.index(this.anchors.filter("[href$="+a+"]"))}return a},destroy:function(){var b=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var b=a.data(this,"href.tabs");if(b){this.href=b}var c=a(this).unbind(".tabs");a.each(["href","load","cache"],function(a,b){c.removeData(b+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){if(a.data(this,"destroy.tabs")){a(this).remove()}else{a(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))}});if(b.cookie){this._cookie(null,b.cookie)}return this},add:function(c,d,e){if(e===b){e=this.anchors.length}var f=this,g=this.options,h=a(g.tabTemplate.replace(/#\{href\}/g,c).replace(/#\{label\}/g,d)),i=!c.indexOf("#")?c.replace("#",""):this._tabId(a("a",h)[0]);h.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var j=f.element.find("#"+i);if(!j.length){j=a(g.panelTemplate).attr("id",i).data("destroy.tabs",true)}j.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(e>=this.lis.length){h.appendTo(this.list);j.appendTo(this.list[0].parentNode)}else{h.insertBefore(this.lis[e]);j.insertBefore(this.panels[e])}g.disabled=a.map(g.disabled,function(a,b){return a>=e?++a:a});this._tabify();if(this.anchors.length==1){g.selected=0;h.addClass("ui-tabs-selected ui-state-active");j.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){f._trigger("show",null,f._ui(f.anchors[0],f.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[e],this.panels[e]));return this},remove:function(b){b=this._getIndex(b);var c=this.options,d=this.lis.eq(b).remove(),e=this.panels.eq(b).remove();if(d.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(b+(b+1<this.anchors.length?1:-1))}c.disabled=a.map(a.grep(c.disabled,function(a,c){return a!=b}),function(a,c){return a>=b?--a:a});this._tabify();this._trigger("remove",null,this._ui(d.find("a")[0],e[0]));return this},enable:function(b){b=this._getIndex(b);var c=this.options;if(a.inArray(b,c.disabled)==-1){return}this.lis.eq(b).removeClass("ui-state-disabled");c.disabled=a.grep(c.disabled,function(a,c){return a!=b});this._trigger("enable",null,this._ui(this.anchors[b],this.panels[b]));return this},disable:function(a){a=this._getIndex(a);var b=this,c=this.options;if(a!=c.selected){this.lis.eq(a).addClass("ui-state-disabled");c.disabled.push(a);c.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[a],this.panels[a]))}return this},select:function(a){a=this._getIndex(a);if(a==-1){if(this.options.collapsible&&this.options.selected!=-1){a=this.options.selected}else{return this}}this.anchors.eq(a).trigger(this.options.event+".tabs");return this},load:function(b){b=this._getIndex(b);var c=this,d=this.options,e=this.anchors.eq(b)[0],f=a.data(e,"load.tabs");this.abort();if(!f||this.element.queue("tabs").length!==0&&a.data(e,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(b).addClass("ui-state-processing");if(d.spinner){var g=a("span",e);g.data("label.tabs",g.html()).html(d.spinner)}this.xhr=a.ajax(a.extend({},d.ajaxOptions,{url:f,success:function(f,g){c.element.find(c._sanitizeSelector(e.hash)).html(f);c._cleanup();if(d.cache){a.data(e,"cache.tabs",true)}c._trigger("load",null,c._ui(c.anchors[b],c.panels[b]));try{d.ajaxOptions.success(f,g)}catch(h){}},error:function(a,f,g){c._cleanup();c._trigger("load",null,c._ui(c.anchors[b],c.panels[b]));try{d.ajaxOptions.error(a,f,b,e)}catch(g){}}}));c.element.dequeue("tabs");return this},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},url:function(a,b){this.anchors.eq(a).removeData("cache.tabs").data("load.tabs",b);return this},length:function(){return this.anchors.length}});a.extend(a.ui.tabs,{version:"1.8.14"});a.extend(a.ui.tabs.prototype,{rotation:null,rotate:function(a,b){var c=this,d=this.options;var e=c._rotate||(c._rotate=function(b){clearTimeout(c.rotation);c.rotation=setTimeout(function(){var a=d.selected;c.select(++a<c.anchors.length?a:0)},a);if(b){b.stopPropagation()}});var f=c._unrotate||(c._unrotate=!b?function(a){if(a.clientX){c.rotate(null)}}:function(a){t=d.selected;e()});if(a){this.element.bind("tabsshow",e);this.anchors.bind(d.event+".tabs",f);e()}else{clearTimeout(c.rotation);this.element.unbind("tabsshow",e);this.anchors.unbind(d.event+".tabs",f);delete this._rotate;delete this._unrotate}return this}})})(jQuery);(function($,undefined){function Datepicker(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass="ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:false,showMonthAfterYear:false,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,yearRange:"c-10:c+10",showOtherMonths:false,selectOtherMonths:false,showWeek:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false,autoSize:false};$.extend(this._defaults,this.regional[""]);this.dpDiv=bindHover($('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}function bindHover(a){var b="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return a.bind("mouseout",function(a){var c=$(a.target).closest(b);if(!c.length){return}c.removeClass("ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover")}).bind("mouseover",function(c){var d=$(c.target).closest(b);if($.datepicker._isDisabledDatepicker(instActive.inline?a.parent()[0]:instActive.input[0])||!d.length){return}d.parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");d.addClass("ui-state-hover");if(d.hasClass("ui-datepicker-prev"))d.addClass("ui-datepicker-prev-hover");if(d.hasClass("ui-datepicker-next"))d.addClass("ui-datepicker-next-hover")})}function extendRemove(a,b){$.extend(a,b);for(var c in b)if(b[c]==null||b[c]==undefined)a[c]=b[c];return a}function isArray(a){return a&&($.browser.safari&&typeof a=="object"&&a.length||a.constructor&&a.constructor.toString().match(/\Array\(\)/))}$.extend($.ui,{datepicker:{version:"1.8.14"}});var PROP_NAME="datepicker";var dpuuid=(new Date).getTime();var instActive;$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){if(this.debug)console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){extendRemove(this._defaults,a||{});return this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase();var inline=nodeName=="div"||nodeName=="span";if(!target.id){this.uuid+=1;target.id="dp"+this.uuid}var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{});if(nodeName=="input"){this._connectDatepicker(target,inst)}else if(inline){this._inlineDatepicker(target,inst)}},_newInst:function(a,b){var c=a[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1");return{id:c,input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:b,dpDiv:!b?this.dpDiv:bindHover($('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}},_connectDatepicker:function(a,b){var c=$(a);b.append=$([]);b.trigger=$([]);if(c.hasClass(this.markerClassName))return;this._attachments(c,b);c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(a,c,d){b.settings[c]=d}).bind("getData.datepicker",function(a,c){return this._get(b,c)});this._autoSize(b);$.data(a,PROP_NAME,b)},_attachments:function(a,b){var c=this._get(b,"appendText");var d=this._get(b,"isRTL");if(b.append)b.append.remove();if(c){b.append=$('<span class="'+this._appendClass+'">'+c+"</span>");a[d?"before":"after"](b.append)}a.unbind("focus",this._showDatepicker);if(b.trigger)b.trigger.remove();var e=this._get(b,"showOn");if(e=="focus"||e=="both")a.focus(this._showDatepicker);if(e=="button"||e=="both"){var f=this._get(b,"buttonText");var g=this._get(b,"buttonImage");b.trigger=$(this._get(b,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:g,alt:f,title:f}):$('<button type="button"></button>').addClass(this._triggerClass).html(g==""?f:$("<img/>").attr({src:g,alt:f,title:f})));a[d?"before":"after"](b.trigger);b.trigger.click(function(){if($.datepicker._datepickerShowing&&$.datepicker._lastInput==a[0])$.datepicker._hideDatepicker();else $.datepicker._showDatepicker(a[0]);return false})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b=new Date(2009,12-1,20);var c=this._get(a,"dateFormat");if(c.match(/[DM]/)){var d=function(a){var b=0;var c=0;for(var d=0;d<a.length;d++){if(a[d].length>b){b=a[d].length;c=d}}return c};b.setMonth(d(this._get(a,c.match(/MM/)?"monthNames":"monthNamesShort")));b.setDate(d(this._get(a,c.match(/DD/)?"dayNames":"dayNamesShort"))+20-b.getDay())}a.input.attr("size",this._formatDate(a,b).length)}},_inlineDatepicker:function(a,b){var c=$(a);if(c.hasClass(this.markerClassName))return;c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",function(a,c,d){b.settings[c]=d}).bind("getData.datepicker",function(a,c){return this._get(b,c)});$.data(a,PROP_NAME,b);this._setDate(b,this._getDefaultDate(b),true);this._updateDatepicker(b);this._updateAlternate(b);b.dpDiv.show()},_dialogDatepicker:function(a,b,c,d,e){var f=this._dialogInst;if(!f){this.uuid+=1;var g="dp"+this.uuid;this._dialogInput=$('<input type="text" id="'+g+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');this._dialogInput.keydown(this._doKeyDown);$("body").append(this._dialogInput);f=this._dialogInst=this._newInst(this._dialogInput,false);f.settings={};$.data(this._dialogInput[0],PROP_NAME,f)}extendRemove(f.settings,d||{});b=b&&b.constructor==Date?this._formatDate(f,b):b;this._dialogInput.val(b);this._pos=e?e.length?e:[e.pageX,e.pageY]:null;if(!this._pos){var h=document.documentElement.clientWidth;var i=document.documentElement.clientHeight;var j=document.documentElement.scrollLeft||document.body.scrollLeft;var k=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[h/2-100+j,i/2-150+k]}this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px");f.settings.onSelect=c;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if($.blockUI)$.blockUI(this.dpDiv);$.data(this._dialogInput[0],PROP_NAME,f);return this},_destroyDatepicker:function(a){var b=$(a);var c=$.data(a,PROP_NAME);if(!b.hasClass(this.markerClassName)){return}var d=a.nodeName.toLowerCase();$.removeData(a,PROP_NAME);if(d=="input"){c.append.remove();c.trigger.remove();b.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)}else if(d=="div"||d=="span")b.removeClass(this.markerClassName).empty()},_enableDatepicker:function(a){var b=$(a);var c=$.data(a,PROP_NAME);if(!b.hasClass(this.markerClassName)){return}var d=a.nodeName.toLowerCase();if(d=="input"){a.disabled=false;c.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else if(d=="div"||d=="span"){var e=b.children("."+this._inlineClass);e.children().removeClass("ui-state-disabled");e.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled")}this._disabledInputs=$.map(this._disabledInputs,function(b){return b==a?null:b})},_disableDatepicker:function(a){var b=$(a);var c=$.data(a,PROP_NAME);if(!b.hasClass(this.markerClassName)){return}var d=a.nodeName.toLowerCase();if(d=="input"){a.disabled=true;c.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else if(d=="div"||d=="span"){var e=b.children("."+this._inlineClass);e.children().addClass("ui-state-disabled");e.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled","disabled")}this._disabledInputs=$.map(this._disabledInputs,function(b){return b==a?null:b});this._disabledInputs[this._disabledInputs.length]=a},_isDisabledDatepicker:function(a){if(!a){return false}for(var b=0;b<this._disabledInputs.length;b++){if(this._disabledInputs[b]==a)return true}return false},_getInst:function(a){try{return $.data(a,PROP_NAME)}catch(b){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(a,b,c){var d=this._getInst(a);if(arguments.length==2&&typeof b=="string"){return b=="defaults"?$.extend({},$.datepicker._defaults):d?b=="all"?$.extend({},d.settings):this._get(d,b):null}var e=b||{};if(typeof b=="string"){e={};e[b]=c}if(d){if(this._curInst==d){this._hideDatepicker()}var f=this._getDateDatepicker(a,true);var g=this._getMinMaxDate(d,"min");var h=this._getMinMaxDate(d,"max");extendRemove(d.settings,e);if(g!==null&&e["dateFormat"]!==undefined&&e["minDate"]===undefined)d.settings.minDate=this._formatDate(d,g);if(h!==null&&e["dateFormat"]!==undefined&&e["maxDate"]===undefined)d.settings.maxDate=this._formatDate(d,h);this._attachments($(a),d);this._autoSize(d);this._setDate(d,f);this._updateAlternate(d);this._updateDatepicker(d)}},_changeDatepicker:function(a,b,c){this._optionDatepicker(a,b,c)},_refreshDatepicker:function(a){var b=this._getInst(a);if(b){this._updateDatepicker(b)}},_setDateDatepicker:function(a,b){var c=this._getInst(a);if(c){this._setDate(c,b);this._updateDatepicker(c);this._updateAlternate(c)}},_getDateDatepicker:function(a,b){var c=this._getInst(a);if(c&&!c.inline)this._setDateFromField(c,b);return c?this._getDate(c):null},_doKeyDown:function(a){var b=$.datepicker._getInst(a.target);var c=true;var d=b.dpDiv.is(".ui-datepicker-rtl");b._keyEvent=true;if($.datepicker._datepickerShowing)switch(a.keyCode){case 9:$.datepicker._hideDatepicker();c=false;break;case 13:var e=$("td."+$.datepicker._dayOverClass+":not(."+$.datepicker._currentClass+")",b.dpDiv);if(e[0])$.datepicker._selectDay(a.target,b.selectedMonth,b.selectedYear,e[0]);else $.datepicker._hideDatepicker();return false;break;case 27:$.datepicker._hideDatepicker();break;case 33:$.datepicker._adjustDate(a.target,a.ctrlKey?-$.datepicker._get(b,"stepBigMonths"):-$.datepicker._get(b,"stepMonths"),"M");break;case 34:$.datepicker._adjustDate(a.target,a.ctrlKey?+$.datepicker._get(b,"stepBigMonths"):+$.datepicker._get(b,"stepMonths"),"M");break;case 35:if(a.ctrlKey||a.metaKey)$.datepicker._clearDate(a.target);c=a.ctrlKey||a.metaKey;break;case 36:if(a.ctrlKey||a.metaKey)$.datepicker._gotoToday(a.target);c=a.ctrlKey||a.metaKey;break;case 37:if(a.ctrlKey||a.metaKey)$.datepicker._adjustDate(a.target,d?+1:-1,"D");c=a.ctrlKey||a.metaKey;if(a.originalEvent.altKey)$.datepicker._adjustDate(a.target,a.ctrlKey?-$.datepicker._get(b,"stepBigMonths"):-$.datepicker._get(b,"stepMonths"),"M");break;case 38:if(a.ctrlKey||a.metaKey)$.datepicker._adjustDate(a.target,-7,"D");c=a.ctrlKey||a.metaKey;break;case 39:if(a.ctrlKey||a.metaKey)$.datepicker._adjustDate(a.target,d?-1:+1,"D");c=a.ctrlKey||a.metaKey;if(a.originalEvent.altKey)$.datepicker._adjustDate(a.target,a.ctrlKey?+$.datepicker._get(b,"stepBigMonths"):+$.datepicker._get(b,"stepMonths"),"M");break;case 40:if(a.ctrlKey||a.metaKey)$.datepicker._adjustDate(a.target,+7,"D");c=a.ctrlKey||a.metaKey;break;default:c=false}else if(a.keyCode==36&&a.ctrlKey)$.datepicker._showDatepicker(this);else{c=false}if(c){a.preventDefault();a.stopPropagation()}},_doKeyPress:function(a){var b=$.datepicker._getInst(a.target);if($.datepicker._get(b,"constrainInput")){var c=$.datepicker._possibleChars($.datepicker._get(b,"dateFormat"));var d=String.fromCharCode(a.charCode==undefined?a.keyCode:a.charCode);return a.ctrlKey||a.metaKey||d<" "||!c||c.indexOf(d)>-1}},_doKeyUp:function(a){var b=$.datepicker._getInst(a.target);if(b.input.val()!=b.lastVal){try{var c=$.datepicker.parseDate($.datepicker._get(b,"dateFormat"),b.input?b.input.val():null,$.datepicker._getFormatConfig(b));if(c){$.datepicker._setDateFromField(b);$.datepicker._updateAlternate(b);$.datepicker._updateDatepicker(b)}}catch(a){$.datepicker.log(a)}}return true},_showDatepicker:function(a){a=a.target||a;if(a.nodeName.toLowerCase()!="input")a=$("input",a.parentNode)[0];if($.datepicker._isDisabledDatepicker(a)||$.datepicker._lastInput==a)return;var b=$.datepicker._getInst(a);if($.datepicker._curInst&&$.datepicker._curInst!=b){if($.datepicker._datepickerShowing){$.datepicker._triggerOnClose($.datepicker._curInst)}$.datepicker._curInst.dpDiv.stop(true,true)}var c=$.datepicker._get(b,"beforeShow");extendRemove(b.settings,c?c.apply(a,[a,b]):{});b.lastVal=null;$.datepicker._lastInput=a;$.datepicker._setDateFromField(b);if($.datepicker._inDialog)a.value="";if(!$.datepicker._pos){$.datepicker._pos=$.datepicker._findPos(a);$.datepicker._pos[1]+=a.offsetHeight}var d=false;$(a).parents().each(function(){d|=$(this).css("position")=="fixed";return!d});if(d&&$.browser.opera){$.datepicker._pos[0]-=document.documentElement.scrollLeft;$.datepicker._pos[1]-=document.documentElement.scrollTop}var e={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null;b.dpDiv.empty();b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});$.datepicker._updateDatepicker(b);e=$.datepicker._checkOffset(b,e,d);b.dpDiv.css({position:$.datepicker._inDialog&&$.blockUI?"static":d?"fixed":"absolute",display:"none",left:e.left+"px",top:e.top+"px"});if(!b.inline){var f=$.datepicker._get(b,"showAnim");var g=$.datepicker._get(b,"duration");var h=function(){var a=b.dpDiv.find("iframe.ui-datepicker-cover");if(!!a.length){var c=$.datepicker._getBorders(b.dpDiv);a.css({left:-c[0],top:-c[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})}};b.dpDiv.zIndex($(a).zIndex()+1);$.datepicker._datepickerShowing=true;if($.effects&&$.effects[f])b.dpDiv.show(f,$.datepicker._get(b,"showOptions"),g,h);else b.dpDiv[f||"show"](f?g:null,h);if(!f||!g)h();if(b.input.is(":visible")&&!b.input.is(":disabled"))b.input.focus();$.datepicker._curInst=b}},_updateDatepicker:function(a){var b=this;b.maxRows=4;var c=$.datepicker._getBorders(a.dpDiv);instActive=a;a.dpDiv.empty().append(this._generateHTML(a));var d=a.dpDiv.find("iframe.ui-datepicker-cover");if(!!d.length){d.css({left:-c[0],top:-c[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()})}a.dpDiv.find("."+this._dayOverClass+" a").mouseover();var e=this._getNumberOfMonths(a);var f=e[1];var g=17;a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");if(f>1)a.dpDiv.addClass("ui-datepicker-multi-"+f).css("width",g*f+"em");a.dpDiv[(e[0]!=1||e[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");if(a==$.datepicker._curInst&&$.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&a.input[0]!=document.activeElement)a.input.focus();if(a.yearshtml){var h=a.yearshtml;setTimeout(function(){if(h===a.yearshtml&&a.yearshtml){a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml)}h=a.yearshtml=null},0)}},_getBorders:function(a){var b=function(a){return{thin:1,medium:2,thick:3}[a]||a};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(a,b,c){var d=a.dpDiv.outerWidth();var e=a.dpDiv.outerHeight();var f=a.input?a.input.outerWidth():0;var g=a.input?a.input.outerHeight():0;var h=document.documentElement.clientWidth+$(document).scrollLeft();var i=document.documentElement.clientHeight+$(document).scrollTop();b.left-=this._get(a,"isRTL")?d-f:0;b.left-=c&&b.left==a.input.offset().left?$(document).scrollLeft():0;b.top-=c&&b.top==a.input.offset().top+g?$(document).scrollTop():0;b.left-=Math.min(b.left,b.left+d>h&&h>d?Math.abs(b.left+d-h):0);b.top-=Math.min(b.top,b.top+e>i&&i>e?Math.abs(e+g):0);return b},_findPos:function(a){var b=this._getInst(a);var c=this._get(b,"isRTL");while(a&&(a.type=="hidden"||a.nodeType!=1||$.expr.filters.hidden(a))){a=a[c?"previousSibling":"nextSibling"]}var d=$(a).offset();return[d.left,d.top]},_triggerOnClose:function(a){var b=this._get(a,"onClose");if(b)b.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a])},_hideDatepicker:function(a){var b=this._curInst;if(!b||a&&b!=$.data(a,PROP_NAME))return;if(this._datepickerShowing){var c=this._get(b,"showAnim");var d=this._get(b,"duration");var e=function(){$.datepicker._tidyDialog(b);this._curInst=null};if($.effects&&$.effects[c])b.dpDiv.hide(c,$.datepicker._get(b,"showOptions"),d,e);else b.dpDiv[c=="slideDown"?"slideUp":c=="fadeIn"?"fadeOut":"hide"](c?d:null,e);if(!c)e();$.datepicker._triggerOnClose(b);this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if($.blockUI){$.unblockUI();$("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(a){if(!$.datepicker._curInst)return;var b=$(a.target);if(b[0].id!=$.datepicker._mainDivId&&b.parents("#"+$.datepicker._mainDivId).length==0&&!b.hasClass($.datepicker.markerClassName)&&!b.hasClass($.datepicker._triggerClass)&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI))$.datepicker._hideDatepicker()},_adjustDate:function(a,b,c){var d=$(a);var e=this._getInst(d[0]);if(this._isDisabledDatepicker(d[0])){return}this._adjustInstDate(e,b+(c=="M"?this._get(e,"showCurrentAtPos"):0),c);this._updateDatepicker(e)},_gotoToday:function(a){var b=$(a);var c=this._getInst(b[0]);if(this._get(c,"gotoCurrent")&&c.currentDay){c.selectedDay=c.currentDay;c.drawMonth=c.selectedMonth=c.currentMonth;c.drawYear=c.selectedYear=c.currentYear}else{var d=new Date;c.selectedDay=d.getDate();c.drawMonth=c.selectedMonth=d.getMonth();c.drawYear=c.selectedYear=d.getFullYear()}this._notifyChange(c);this._adjustDate(b)},_selectMonthYear:function(a,b,c){var d=$(a);var e=this._getInst(d[0]);e._selectingMonthYear=false;e["selected"+(c=="M"?"Month":"Year")]=e["draw"+(c=="M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10);this._notifyChange(e);this._adjustDate(d)},_clickMonthYear:function(a){var b=$(a);var c=this._getInst(b[0]);if(c.input&&c._selectingMonthYear){setTimeout(function(){c.input.focus()},0)}c._selectingMonthYear=!c._selectingMonthYear},_selectDay:function(a,b,c,d){var e=$(a);if($(d).hasClass(this._unselectableClass)||this._isDisabledDatepicker(e[0])){return}var f=this._getInst(e[0]);f.selectedDay=f.currentDay=$("a",d).html();f.selectedMonth=f.currentMonth=b;f.selectedYear=f.currentYear=c;this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear))},_clearDate:function(a){var b=$(a);var c=this._getInst(b[0]);this._selectDate(b,"")},_selectDate:function(a,b){var c=$(a);var d=this._getInst(c[0]);b=b!=null?b:this._formatDate(d);if(d.input)d.input.val(b);this._updateAlternate(d);var e=this._get(d,"onSelect");if(e)e.apply(d.input?d.input[0]:null,[b,d]);else if(d.input)d.input.trigger("change");if(d.inline)this._updateDatepicker(d);else{this._hideDatepicker();this._lastInput=d.input[0];if(typeof d.input[0]!="object")d.input.focus();this._lastInput=null}},_updateAlternate:function(a){var b=this._get(a,"altField");if(b){var c=this._get(a,"altFormat")||this._get(a,"dateFormat");var d=this._getDate(a);var e=this.formatDate(c,d,this._getFormatConfig(a));$(b).each(function(){$(this).val(e)})}},noWeekends:function(a){var b=a.getDay();return[b>0&&b<6,""]},iso8601Week:function(a){var b=new Date(a.getTime());b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();b.setMonth(0);b.setDate(1);return Math.floor(Math.round((c-b)/864e5)/7)+1},parseDate:function(a,b,c){if(a==null||b==null)throw"Invalid arguments";b=typeof b=="object"?b.toString():b+"";if(b=="")return null;var d=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff;d=typeof d!="string"?d:(new Date).getFullYear()%100+parseInt(d,10);var e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort;var f=(c?c.dayNames:null)||this._defaults.dayNames;var g=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort;var h=(c?c.monthNames:null)||this._defaults.monthNames;var i=-1;var j=-1;var k=-1;var l=-1;var m=false;var n=function(b){var c=s+1<a.length&&a.charAt(s+1)==b;if(c)s++;return c};var o=function(a){var c=n(a);var d=a=="@"?14:a=="!"?20:a=="y"&&c?4:a=="o"?3:2;var e=new RegExp("^\\d{1,"+d+"}");var f=b.substring(r).match(e);if(!f)throw"Missing number at position "+r;r+=f[0].length;return parseInt(f[0],10)};var p=function(a,c,d){var e=$.map(n(a)?d:c,function(a,b){return[[b,a]]}).sort(function(a,b){return-(a[1].length-b[1].length)});var f=-1;$.each(e,function(a,c){var d=c[1];if(b.substr(r,d.length).toLowerCase()==d.toLowerCase()){f=c[0];r+=d.length;return false}});if(f!=-1)return f+1;else throw"Unknown name at position "+r};var q=function(){if(b.charAt(r)!=a.charAt(s))throw"Unexpected literal at position "+r;r++};var r=0;for(var s=0;s<a.length;s++){if(m)if(a.charAt(s)=="'"&&!n("'"))m=false;else q();else switch(a.charAt(s)){case"d":k=o("d");break;case"D":p("D",e,f);break;case"o":l=o("o");break;case"m":j=o("m");break;case"M":j=p("M",g,h);break;case"y":i=o("y");break;case"@":var t=new Date(o("@"));i=t.getFullYear();j=t.getMonth()+1;k=t.getDate();break;case"!":var t=new Date((o("!")-this._ticksTo1970)/1e4);i=t.getFullYear();j=t.getMonth()+1;k=t.getDate();break;case"'":if(n("'"))q();else m=true;break;default:q()}}if(r<b.length){throw"Extra/unparsed characters found in date: "+b.substring(r)}if(i==-1)i=(new Date).getFullYear();else if(i<100)i+=(new Date).getFullYear()-(new Date).getFullYear()%100+(i<=d?0:-100);if(l>-1){j=1;k=l;do{var u=this._getDaysInMonth(i,j-1);if(k<=u)break;j++;k-=u}while(true)}var t=this._daylightSavingAdjust(new Date(i,j-1,k));if(t.getFullYear()!=i||t.getMonth()+1!=j||t.getDate()!=k)throw"Invalid date";return t},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:((1970-1)*365+Math.floor(1970/4)-Math.floor(1970/100)+Math.floor(1970/400))*24*60*60*1e7,formatDate:function(a,b,c){if(!b)return"";var d=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort;var e=(c?c.dayNames:null)||this._defaults.dayNames;var f=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort;var g=(c?c.monthNames:null)||this._defaults.monthNames;var h=function(b){var c=m+1<a.length&&a.charAt(m+1)==b;if(c)m++;return c};var i=function(a,b,c){var d=""+b;if(h(a))while(d.length<c)d="0"+d;return d};var j=function(a,b,c,d){return h(a)?d[b]:c[b]};var k="";var l=false;if(b)for(var m=0;m<a.length;m++){if(l)if(a.charAt(m)=="'"&&!h("'"))l=false;else k+=a.charAt(m);else switch(a.charAt(m)){case"d":k+=i("d",b.getDate(),2);break;case"D":k+=j("D",b.getDay(),d,e);break;case"o":k+=i("o",Math.round(((new Date(b.getFullYear(),b.getMonth(),b.getDate())).getTime()-(new Date(b.getFullYear(),0,0)).getTime())/864e5),3);break;case"m":k+=i("m",b.getMonth()+1,2);break;case"M":k+=j("M",b.getMonth(),f,g);break;case"y":k+=h("y")?b.getFullYear():(b.getYear()%100<10?"0":"")+b.getYear()%100;break;case"@":k+=b.getTime();break;case"!":k+=b.getTime()*1e4+this._ticksTo1970;break;case"'":if(h("'"))k+="'";else l=true;break;default:k+=a.charAt(m)}}return k},_possibleChars:function(a){var b="";var c=false;var d=function(b){var c=e+1<a.length&&a.charAt(e+1)==b;if(c)e++;return c};for(var e=0;e<a.length;e++)if(c)if(a.charAt(e)=="'"&&!d("'"))c=false;else b+=a.charAt(e);else switch(a.charAt(e)){case"d":case"m":case"y":case"@":b+="0123456789";break;case"D":case"M":return null;case"'":if(d("'"))b+="'";else c=true;break;default:b+=a.charAt(e)}return b},_get:function(a,b){return a.settings[b]!==undefined?a.settings[b]:this._defaults[b]},_setDateFromField:function(a,b){if(a.input.val()==a.lastVal){return}var c=this._get(a,"dateFormat");var d=a.lastVal=a.input?a.input.val():null;var e,f;e=f=this._getDefaultDate(a);var g=this._getFormatConfig(a);try{e=this.parseDate(c,d,g)||f}catch(h){this.log(h);d=b?"":d}a.selectedDay=e.getDate();a.drawMonth=a.selectedMonth=e.getMonth();a.drawYear=a.selectedYear=e.getFullYear();a.currentDay=d?e.getDate():0;a.currentMonth=d?e.getMonth():0;a.currentYear=d?e.getFullYear():0;this._adjustInstDate(a)},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,this._get(a,"defaultDate"),new Date))},_determineDate:function(a,b,c){var d=function(a){var b=new Date;b.setDate(b.getDate()+a);return b};var e=function(b){try{return $.datepicker.parseDate($.datepicker._get(a,"dateFormat"),b,$.datepicker._getFormatConfig(a))}catch(c){}var d=(b.toLowerCase().match(/^c/)?$.datepicker._getDate(a):null)||new Date;var e=d.getFullYear();var f=d.getMonth();var g=d.getDate();var h=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;var i=h.exec(b);while(i){switch(i[2]||"d"){case"d":case"D":g+=parseInt(i[1],10);break;case"w":case"W":g+=parseInt(i[1],10)*7;break;case"m":case"M":f+=parseInt(i[1],10);g=Math.min(g,$.datepicker._getDaysInMonth(e,f));break;case"y":case"Y":e+=parseInt(i[1],10);g=Math.min(g,$.datepicker._getDaysInMonth(e,f));break}i=h.exec(b)}return new Date(e,f,g)};var f=b==null||b===""?c:typeof b=="string"?e(b):typeof b=="number"?isNaN(b)?c:d(b):new Date(b.getTime());f=f&&f.toString()=="Invalid Date"?c:f;if(f){f.setHours(0);f.setMinutes(0);f.setSeconds(0);f.setMilliseconds(0)}return this._daylightSavingAdjust(f)},_daylightSavingAdjust:function(a){if(!a)return null;a.setHours(a.getHours()>12?a.getHours()+2:0);return a},_setDate:function(a,b,c){var d=!b;var e=a.selectedMonth;var f=a.selectedYear;var g=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=a.currentDay=g.getDate();a.drawMonth=a.selectedMonth=a.currentMonth=g.getMonth();a.drawYear=a.selectedYear=a.currentYear=g.getFullYear();if((e!=a.selectedMonth||f!=a.selectedYear)&&!c)this._notifyChange(a);this._adjustInstDate(a);if(a.input){a.input.val(d?"":this._formatDate(a))}},_getDate:function(a){var b=!a.currentYear||a.input&&a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return b},_generateHTML:function(a){var b=new Date;b=this._daylightSavingAdjust(new Date(b.getFullYear(),b.getMonth(),b.getDate()));var c=this._get(a,"isRTL");var d=this._get(a,"showButtonPanel");var e=this._get(a,"hideIfNoPrevNext");var f=this._get(a,"navigationAsDateFormat");var g=this._getNumberOfMonths(a);var h=this._get(a,"showCurrentAtPos");var i=this._get(a,"stepMonths");var j=g[0]!=1||g[1]!=1;var k=this._daylightSavingAdjust(!a.currentDay?new Date(9999,9,9):new Date(a.currentYear,a.currentMonth,a.currentDay));var l=this._getMinMaxDate(a,"min");var m=this._getMinMaxDate(a,"max");var n=a.drawMonth-h;var o=a.drawYear;if(n<0){n+=12;o--}if(m){var p=this._daylightSavingAdjust(new Date(m.getFullYear(),m.getMonth()-g[0]*g[1]+1,m.getDate()));p=l&&p<l?l:p;while(this._daylightSavingAdjust(new Date(o,n,1))>p){n--;if(n<0){n=11;o--}}}a.drawMonth=n;a.drawYear=o;var q=this._get(a,"prevText");q=!f?q:this.formatDate(q,this._daylightSavingAdjust(new Date(o,n-i,1)),this._getFormatConfig(a));var r=this._canAdjustMonth(a,-1,o,n)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._adjustDate('#"+a.id+"', -"+i+", 'M');\""+' title="'+q+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+q+"</span></a>":e?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+q+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+q+"</span></a>";var s=this._get(a,"nextText");s=!f?s:this.formatDate(s,this._daylightSavingAdjust(new Date(o,n+i,1)),this._getFormatConfig(a));var t=this._canAdjustMonth(a,+1,o,n)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._adjustDate('#"+a.id+"', +"+i+", 'M');\""+' title="'+s+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+s+"</span></a>":e?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+s+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+s+"</span></a>";var u=this._get(a,"currentText");var v=this._get(a,"gotoCurrent")&&a.currentDay?k:b;u=!f?u:this.formatDate(u,v,this._getFormatConfig(a));var w=!a.inline?'<a class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+dpuuid+'.datepicker._hideDatepicker();">'+this._get(a,"closeText")+"</a>":"";var x=d?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(c?w:"")+(this._isInRange(a,v)?'<a class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._gotoToday('#"+a.id+"');\""+">"+u+"</a>":"")+(c?"":w)+"</div>":"";var y=parseInt(this._get(a,"firstDay"),10);y=isNaN(y)?0:y;var z=this._get(a,"showWeek");var A=this._get(a,"dayNames");var B=this._get(a,"dayNamesShort");var C=this._get(a,"dayNamesMin");var D=this._get(a,"monthNames");var E=this._get(a,"monthNamesShort");var F=this._get(a,"beforeShowDay");var G=this._get(a,"showOtherMonths");var H=this._get(a,"selectOtherMonths");var I=this._get(a,"calculateWeek")||this.iso8601Week;var J=this._getDefaultDate(a);var K="";for(var L=0;L<g[0];L++){var M="";this.maxRows=4;for(var N=0;N<g[1];N++){var O=this._daylightSavingAdjust(new Date(o,n,a.selectedDay));var P=" ui-corner-all";var Q="";if(j){Q+='<div class="ui-datepicker-group';if(g[1]>1)switch(N){case 0:Q+=" ui-datepicker-group-first";P=" ui-corner-"+(c?"right":"left");break;case g[1]-1:Q+=" ui-datepicker-group-last";P=" ui-corner-"+(c?"left":"right");break;default:Q+=" ui-datepicker-group-middle";P="";break}Q+='">'}Q+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+P+'">'+(/all|left/.test(P)&&L==0?c?t:r:"")+(/all|right/.test(P)&&L==0?c?r:t:"")+this._generateMonthYearHeader(a,n,o,l,m,L>0||N>0,D,E)+'</div><table class="ui-datepicker-calendar"><thead>'+"<tr>";var R=z?'<th class="ui-datepicker-week-col">'+this._get(a,"weekHeader")+"</th>":"";for(var S=0;S<7;S++){var T=(S+y)%7;R+="<th"+((S+y+6)%7>=5?' class="ui-datepicker-week-end"':"")+">"+'<span title="'+A[T]+'">'+C[T]+"</span></th>"}Q+=R+"</tr></thead><tbody>";var U=this._getDaysInMonth(o,n);if(o==a.selectedYear&&n==a.selectedMonth)a.selectedDay=Math.min(a.selectedDay,U);var V=(this._getFirstDayOfMonth(o,n)-y+7)%7;var W=Math.ceil((V+U)/7);var X=j?this.maxRows>W?this.maxRows:W:W;this.maxRows=X;var Y=this._daylightSavingAdjust(new Date(o,n,1-V));for(var Z=0;Z<X;Z++){Q+="<tr>";var _=!z?"":'<td class="ui-datepicker-week-col">'+this._get(a,"calculateWeek")(Y)+"</td>";for(var S=0;S<7;S++){var ab=F?F.apply(a.input?a.input[0]:null,[Y]):[true,""];var bb=Y.getMonth()!=n;var cb=bb&&!H||!ab[0]||l&&Y<l||m&&Y>m;_+='<td class="'+((S+y+6)%7>=5?" ui-datepicker-week-end":"")+(bb?" ui-datepicker-other-month":"")+(Y.getTime()==O.getTime()&&n==a.selectedMonth&&a._keyEvent||J.getTime()==Y.getTime()&&J.getTime()==O.getTime()?" "+this._dayOverClass:"")+(cb?" "+this._unselectableClass+" ui-state-disabled":"")+(bb&&!G?"":" "+ab[1]+(Y.getTime()==k.getTime()?" "+this._currentClass:"")+(Y.getTime()==b.getTime()?" ui-datepicker-today":""))+'"'+((!bb||G)&&ab[2]?' title="'+ab[2]+'"':"")+(cb?"":' onclick="DP_jQuery_'+dpuuid+".datepicker._selectDay('#"+a.id+"',"+Y.getMonth()+","+Y.getFullYear()+', this);return false;"')+">"+(bb&&!G?"&#xa0;":cb?'<span class="ui-state-default">'+Y.getDate()+"</span>":'<a class="ui-state-default'+(Y.getTime()==b.getTime()?" ui-state-highlight":"")+(Y.getTime()==k.getTime()?" ui-state-active":"")+(bb?" ui-priority-secondary":"")+'" href="#">'+Y.getDate()+"</a>")+"</td>";Y.setDate(Y.getDate()+1);Y=this._daylightSavingAdjust(Y)}Q+=_+"</tr>"}n++;if(n>11){n=0;o++}Q+="</tbody></table>"+(j?"</div>"+(g[0]>0&&N==g[1]-1?'<div class="ui-datepicker-row-break"></div>':""):"");M+=Q}K+=M}K+=x+($.browser.msie&&parseInt($.browser.version,10)<7&&!a.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"");a._keyEvent=false;return K},_generateMonthYearHeader:function(a,b,c,d,e,f,g,h){var i=this._get(a,"changeMonth");var j=this._get(a,"changeYear");var k=this._get(a,"showMonthAfterYear");var l='<div class="ui-datepicker-title">';var m="";if(f||!i)m+='<span class="ui-datepicker-month">'+g[b]+"</span>";else{var n=d&&d.getFullYear()==c;var o=e&&e.getFullYear()==c;m+='<select class="ui-datepicker-month" '+'onchange="DP_jQuery_'+dpuuid+".datepicker._selectMonthYear('#"+a.id+"', this, 'M');\" "+'onclick="DP_jQuery_'+dpuuid+".datepicker._clickMonthYear('#"+a.id+"');\""+">";for(var p=0;p<12;p++){if((!n||p>=d.getMonth())&&(!o||p<=e.getMonth()))m+='<option value="'+p+'"'+(p==b?' selected="selected"':"")+">"+h[p]+"</option>"}m+="</select>"}if(!k)l+=m+(f||!(i&&j)?"&#xa0;":"");if(!a.yearshtml){a.yearshtml="";if(f||!j)l+='<span class="ui-datepicker-year">'+c+"</span>";else{var q=this._get(a,"yearRange").split(":");var r=(new Date).getFullYear();var s=function(a){var b=a.match(/c[+-].*/)?c+parseInt(a.substring(1),10):a.match(/[+-].*/)?r+parseInt(a,10):parseInt(a,10);return isNaN(b)?r:b};var t=s(q[0]);var u=Math.max(t,s(q[1]||""));t=d?Math.max(t,d.getFullYear()):t;u=e?Math.min(u,e.getFullYear()):u;a.yearshtml+='<select class="ui-datepicker-year" '+'onchange="DP_jQuery_'+dpuuid+".datepicker._selectMonthYear('#"+a.id+"', this, 'Y');\" "+'onclick="DP_jQuery_'+dpuuid+".datepicker._clickMonthYear('#"+a.id+"');\""+">";for(;t<=u;t++){a.yearshtml+='<option value="'+t+'"'+(t==c?' selected="selected"':"")+">"+t+"</option>"}a.yearshtml+="</select>";l+=a.yearshtml;a.yearshtml=null}}l+=this._get(a,"yearSuffix");if(k)l+=(f||!(i&&j)?"&#xa0;":"")+m;l+="</div>";return l},_adjustInstDate:function(a,b,c){var d=a.drawYear+(c=="Y"?b:0);var e=a.drawMonth+(c=="M"?b:0);var f=Math.min(a.selectedDay,this._getDaysInMonth(d,e))+(c=="D"?b:0);var g=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(d,e,f)));a.selectedDay=g.getDate();a.drawMonth=a.selectedMonth=g.getMonth();a.drawYear=a.selectedYear=g.getFullYear();if(c=="M"||c=="Y")this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min");var d=this._getMinMaxDate(a,"max");var e=c&&b<c?c:b;e=d&&e>d?d:e;return e},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");if(b)b.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){var b=this._get(a,"numberOfMonths");return b==null?[1,1]:typeof b=="number"?[1,b]:b},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,d){var e=this._getNumberOfMonths(a);var f=this._daylightSavingAdjust(new Date(c,d+(b<0?b:e[0]*e[1]),1));if(b<0)f.setDate(this._getDaysInMonth(f.getFullYear(),f.getMonth()));return this._isInRange(a,f)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min");var d=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!d||b.getTime()<=d.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10);return{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,d){if(!b){a.currentDay=a.selectedDay;a.currentMonth=a.selectedMonth;a.currentYear=a.selectedYear}var e=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(d,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),e,this._getFormatConfig(a))}});$.fn.datepicker=function(a){if(!this.length){return this}if(!$.datepicker.initialized){$(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv);$.datepicker.initialized=true}var b=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget"))return $.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this[0]].concat(b));if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string")return $.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this[0]].concat(b));return this.each(function(){typeof a=="string"?$.datepicker["_"+a+"Datepicker"].apply($.datepicker,[this].concat(b)):$.datepicker._attachDatepicker(this,a)})};$.datepicker=new Datepicker;$.datepicker.initialized=false;$.datepicker.uuid=(new Date).getTime();$.datepicker.version="1.8.14";window["DP_jQuery_"+dpuuid]=$})(jQuery);(function(a,b){a.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()});this.valueDiv=a("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element);this.oldValue=this._value();this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");this.valueDiv.remove();a.Widget.prototype.destroy.apply(this,arguments)},value:function(a){if(a===b){return this._value()}this._setOption("value",a);return this},_setOption:function(b,c){if(b==="value"){this.options.value=c;this._refreshValue();if(this._value()===this.options.max){this._trigger("complete")}}a.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;if(typeof a!=="number"){a=0}return Math.min(this.options.max,Math.max(this.min,a))},_percentage:function(){return 100*this._value()/this.options.max},_refreshValue:function(){var a=this.value();var b=this._percentage();if(this.oldValue!==a){this.oldValue=a;this._trigger("change")}this.valueDiv.toggle(a>this.min).toggleClass("ui-corner-right",a===this.options.max).width(b.toFixed(0)+"%");this.element.attr("aria-valuenow",a)}});a.extend(a.ui.progressbar,{version:"1.8.14"})})(jQuery);jQuery.effects||function(a,b){function c(b){var c;if(b&&b.constructor==Array&&b.length==3)return b;if(c=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(b))return[parseInt(c[1],10),parseInt(c[2],10),parseInt(c[3],10)];if(c=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(b))return[parseFloat(c[1])*2.55,parseFloat(c[2])*2.55,parseFloat(c[3])*2.55];if(c=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(b))return[parseInt(c[1],16),parseInt(c[2],16),parseInt(c[3],16)];if(c=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(b))return[parseInt(c[1]+c[1],16),parseInt(c[2]+c[2],16),parseInt(c[3]+c[3],16)];if(c=/rgba\(0, 0, 0, 0\)/.exec(b))return e["transparent"];return e[a.trim(b).toLowerCase()]}function d(b,d){var e;do{e=a.curCSS(b,d);if(e!=""&&e!="transparent"||a.nodeName(b,"body"))break;d="backgroundColor"}while(b=b.parentNode);return c(e)}function h(){var a=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,b={},c,d;if(a&&a.length&&a[0]&&a[a[0]]){var e=a.length;while(e--){c=a[e];if(typeof a[c]=="string"){d=c.replace(/\-(\w)/g,function(a,b){return b.toUpperCase()});b[d]=a[c]}}}else{for(c in a){if(typeof a[c]==="string"){b[c]=a[c]}}}return b}function i(b){var c,d;for(c in b){d=b[c];if(d==null||a.isFunction(d)||c in g||/scrollbar/.test(c)||!/color/i.test(c)&&isNaN(parseFloat(d))){delete b[c]}}return b}function j(a,b){var c={_:0},d;for(d in b){if(a[d]!=b[d]){c[d]=b[d]}}return c}function k(b,c,d,e){if(typeof b=="object"){e=c;d=null;c=b;b=c.effect}if(a.isFunction(c)){e=c;d=null;c={}}if(typeof c=="number"||a.fx.speeds[c]){e=d;d=c;c={}}if(a.isFunction(d)){e=d;d=null}c=c||{};d=d||c.duration;d=a.fx.off?0:typeof d=="number"?d:d in a.fx.speeds?a.fx.speeds[d]:a.fx.speeds._default;e=e||c.complete;return[b,c,d,e]}function l(b){if(!b||typeof b==="number"||a.fx.speeds[b]){return true}if(typeof b==="string"&&!a.effects[b]){return true}return false}a.effects={};a.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","borderColor","color","outlineColor"],function(b,e){a.fx.step[e]=function(a){if(!a.colorInit){a.start=d(a.elem,e);a.end=c(a.end);a.colorInit=true}a.elem.style[e]="rgb("+Math.max(Math.min(parseInt(a.pos*(a.end[0]-a.start[0])+a.start[0],10),255),0)+","+Math.max(Math.min(parseInt(a.pos*(a.end[1]-a.start[1])+a.start[1],10),255),0)+","+Math.max(Math.min(parseInt(a.pos*(a.end[2]-a.start[2])+a.start[2],10),255),0)+")"}});var e={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]};var f=["add","remove","toggle"],g={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};a.effects.animateClass=function(b,c,d,e){if(a.isFunction(d)){e=d;d=null}return this.queue(function(){var g=a(this),k=g.attr("style")||" ",l=i(h.call(this)),m,n=g.attr("class");a.each(f,function(a,c){if(b[c]){g[c+"Class"](b[c])}});m=i(h.call(this));g.attr("class",n);g.animate(j(l,m),{queue:false,duration:c,easing:d,complete:function(){a.each(f,function(a,c){if(b[c]){g[c+"Class"](b[c])}});if(typeof g.attr("style")=="object"){g.attr("style").cssText="";g.attr("style").cssText=k}else{g.attr("style",k)}if(e){e.apply(this,arguments)}a.dequeue(this)}})})};a.fn.extend({_addClass:a.fn.addClass,addClass:function(b,c,d,e){return c?a.effects.animateClass.apply(this,[{add:b},c,d,e]):this._addClass(b)},_removeClass:a.fn.removeClass,removeClass:function(b,c,d,e){return c?a.effects.animateClass.apply(this,[{remove:b},c,d,e]):this._removeClass(b)},_toggleClass:a.fn.toggleClass,toggleClass:function(c,d,e,f,g){if(typeof d=="boolean"||d===b){if(!e){return this._toggleClass(c,d)}else{return a.effects.animateClass.apply(this,[d?{add:c}:{remove:c},e,f,g])}}else{return a.effects.animateClass.apply(this,[{toggle:c},d,e,f])}},switchClass:function(b,c,d,e,f){return a.effects.animateClass.apply(this,[{add:c,remove:b},d,e,f])}});a.extend(a.effects,{version:"1.8.14",save:function(a,b){for(var c=0;c<b.length;c++){if(b[c]!==null)a.data("ec.storage."+b[c],a[0].style[b[c]])}},restore:function(a,b){for(var c=0;c<b.length;c++){if(b[c]!==null)a.css(b[c],a.data("ec.storage."+b[c]))}},setMode:function(a,b){if(b=="toggle")b=a.is(":hidden")?"show":"hide";return b},getBaseline:function(a,b){var c,d;switch(a[0]){case"top":c=0;break;case"middle":c=.5;break;case"bottom":c=1;break;default:c=a[0]/b.height}switch(a[1]){case"left":d=0;break;case"center":d=.5;break;case"right":d=1;break;default:d=a[1]/b.width}return{x:d,y:c}},createWrapper:function(b){if(b.parent().is(".ui-effects-wrapper")){return b.parent()}var c={width:b.outerWidth(true),height:b.outerHeight(true),"float":b.css("float")},d=a("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0});b.wrap(d);d=b.parent();if(b.css("position")=="static"){d.css({position:"relative"});b.css({position:"relative"})}else{a.extend(c,{position:b.css("position"),zIndex:b.css("z-index")});a.each(["top","left","bottom","right"],function(a,d){c[d]=b.css(d);if(isNaN(parseInt(c[d],10))){c[d]="auto"}});b.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}return d.css(c).show()},removeWrapper:function(a){if(a.parent().is(".ui-effects-wrapper"))return a.parent().replaceWith(a);return a},setTransition:function(b,c,d,e){e=e||{};a.each(c,function(a,c){unit=b.cssUnit(c);if(unit[0]>0)e[c]=unit[0]*d+unit[1]});return e}});a.fn.extend({effect:function(b,c,d,e){var f=k.apply(this,arguments),g={options:f[1],duration:f[2],callback:f[3]},h=g.options.mode,i=a.effects[b];if(a.fx.off||!i){if(h){return this[h](g.duration,g.callback)}else{return this.each(function(){if(g.callback){g.callback.call(this)}})}}return i.call(this,g)},_show:a.fn.show,show:function(a){if(l(a)){return this._show.apply(this,arguments)}else{var b=k.apply(this,arguments);b[1].mode="show";return this.effect.apply(this,b)}},_hide:a.fn.hide,hide:function(a){if(l(a)){return this._hide.apply(this,arguments)}else{var b=k.apply(this,arguments);b[1].mode="hide";return this.effect.apply(this,b)}},__toggle:a.fn.toggle,toggle:function(b){if(l(b)||typeof b==="boolean"||a.isFunction(b)){return this.__toggle.apply(this,arguments)}else{var c=k.apply(this,arguments);c[1].mode="toggle";return this.effect.apply(this,c)}},cssUnit:function(b){var c=this.css(b),d=[];a.each(["em","px","%","pt"],function(a,b){if(c.indexOf(b)>0)d=[parseFloat(c),b]});return d}});a.easing.jswing=a.easing.swing;a.extend(a.easing,{def:"easeOutQuad",swing:function(b,c,d,e,f){return a.easing[a.easing.def](b,c,d,e,f)},easeInQuad:function(a,b,c,d,e){return d*(b/=e)*b+c},easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c},easeInOutQuad:function(a,b,c,d,e){if((b/=e/2)<1)return d/2*b*b+c;return-d/2*(--b*(b-2)-1)+c},easeInCubic:function(a,b,c,d,e){return d*(b/=e)*b*b+c},easeOutCubic:function(a,b,c,d,e){return d*((b=b/e-1)*b*b+1)+c},easeInOutCubic:function(a,b,c,d,e){if((b/=e/2)<1)return d/2*b*b*b+c;return d/2*((b-=2)*b*b+2)+c},easeInQuart:function(a,b,c,d,e){return d*(b/=e)*b*b*b+c},easeOutQuart:function(a,b,c,d,e){return-d*((b=b/e-1)*b*b*b-1)+c},easeInOutQuart:function(a,b,c,d,e){if((b/=e/2)<1)return d/2*b*b*b*b+c;return-d/2*((b-=2)*b*b*b-2)+c},easeInQuint:function(a,b,c,d,e){return d*(b/=e)*b*b*b*b+c},easeOutQuint:function(a,b,c,d,e){return d*((b=b/e-1)*b*b*b*b+1)+c},easeInOutQuint:function(a,b,c,d,e){if((b/=e/2)<1)return d/2*b*b*b*b*b+c;return d/2*((b-=2)*b*b*b*b+2)+c},easeInSine:function(a,b,c,d,e){return-d*Math.cos(b/e*(Math.PI/2))+d+c},easeOutSine:function(a,b,c,d,e){return d*Math.sin(b/e*(Math.PI/2))+c},easeInOutSine:function(a,b,c,d,e){return-d/2*(Math.cos(Math.PI*b/e)-1)+c},easeInExpo:function(a,b,c,d,e){return b==0?c:d*Math.pow(2,10*(b/e-1))+c},easeOutExpo:function(a,b,c,d,e){return b==e?c+d:d*(-Math.pow(2,-10*b/e)+1)+c},easeInOutExpo:function(a,b,c,d,e){if(b==0)return c;if(b==e)return c+d;if((b/=e/2)<1)return d/2*Math.pow(2,10*(b-1))+c;return d/2*(-Math.pow(2,-10*--b)+2)+c},easeInCirc:function(a,b,c,d,e){return-d*(Math.sqrt(1-(b/=e)*b)-1)+c},easeOutCirc:function(a,b,c,d,e){return d*Math.sqrt(1-(b=b/e-1)*b)+c},easeInOutCirc:function(a,b,c,d,e){if((b/=e/2)<1)return-d/2*(Math.sqrt(1-b*b)-1)+c;return d/2*(Math.sqrt(1-(b-=2)*b)+1)+c},easeInElastic:function(a,b,c,d,e){var f=1.70158;var g=0;var h=d;if(b==0)return c;if((b/=e)==1)return c+d;if(!g)g=e*.3;if(h<Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);return-(h*Math.pow(2,10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g))+c},easeOutElastic:function(a,b,c,d,e){var f=1.70158;var g=0;var h=d;if(b==0)return c;if((b/=e)==1)return c+d;if(!g)g=e*.3;if(h<Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);return h*Math.pow(2,-10*b)*Math.sin((b*e-f)*2*Math.PI/g)+d+c},easeInOutElastic:function(a,b,c,d,e){var f=1.70158;var g=0;var h=d;if(b==0)return c;if((b/=e/2)==2)return c+d;if(!g)g=e*.3*1.5;if(h<Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);if(b<1)return-.5*h*Math.pow(2,10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g)+c;return h*Math.pow(2,-10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g)*.5+d+c},easeInBack:function(a,c,d,e,f,g){if(g==b)g=1.70158;return e*(c/=f)*c*((g+1)*c-g)+d},easeOutBack:function(a,c,d,e,f,g){if(g==b)g=1.70158;return e*((c=c/f-1)*c*((g+1)*c+g)+1)+d},easeInOutBack:function(a,c,d,e,f,g){if(g==b)g=1.70158;if((c/=f/2)<1)return e/2*c*c*(((g*=1.525)+1)*c-g)+d;return e/2*((c-=2)*c*(((g*=1.525)+1)*c+g)+2)+d},easeInBounce:function(b,c,d,e,f){return e-a.easing.easeOutBounce(b,f-c,0,e,f)+d},easeOutBounce:function(a,b,c,d,e){if((b/=e)<1/2.75){return d*7.5625*b*b+c}else if(b<2/2.75){return d*(7.5625*(b-=1.5/2.75)*b+.75)+c}else if(b<2.5/2.75){return d*(7.5625*(b-=2.25/2.75)*b+.9375)+c}else{return d*(7.5625*(b-=2.625/2.75)*b+.984375)+c}},easeInOutBounce:function(b,c,d,e,f){if(c<f/2)return a.easing.easeInBounce(b,c*2,0,e,f)*.5+d;return a.easing.easeOutBounce(b,c*2-f,0,e,f)*.5+e*.5+d}})}(jQuery);(function(a,b){a.effects.blind=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right"];var e=a.effects.setMode(c,b.options.mode||"hide");var f=b.options.direction||"vertical";a.effects.save(c,d);c.show();var g=a.effects.createWrapper(c).css({overflow:"hidden"});var h=f=="vertical"?"height":"width";var i=f=="vertical"?g.height():g.width();if(e=="show")g.css(h,0);var j={};j[h]=e=="show"?i:0;g.animate(j,b.duration,b.options.easing,function(){if(e=="hide")c.hide();a.effects.restore(c,d);a.effects.removeWrapper(c);if(b.callback)b.callback.apply(c[0],arguments);c.dequeue()})})}})(jQuery);(function(a,b){a.effects.bounce=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right"];var e=a.effects.setMode(c,b.options.mode||"effect");var f=b.options.direction||"up";var g=b.options.distance||20;var h=b.options.times||5;var i=b.duration||250;if(/show|hide/.test(e))d.push("opacity");a.effects.save(c,d);c.show();a.effects.createWrapper(c);var j=f=="up"||f=="down"?"top":"left";var k=f=="up"||f=="left"?"pos":"neg";var g=b.options.distance||(j=="top"?c.outerHeight({margin:true})/3:c.outerWidth({margin:true})/3);if(e=="show")c.css("opacity",0).css(j,k=="pos"?-g:g);if(e=="hide")g=g/(h*2);if(e!="hide")h--;if(e=="show"){var l={opacity:1};l[j]=(k=="pos"?"+=":"-=")+g;c.animate(l,i/2,b.options.easing);g=g/2;h--}for(var m=0;m<h;m++){var n={},p={};n[j]=(k=="pos"?"-=":"+=")+g;p[j]=(k=="pos"?"+=":"-=")+g;c.animate(n,i/2,b.options.easing).animate(p,i/2,b.options.easing);g=e=="hide"?g*2:g/2}if(e=="hide"){var l={opacity:0};l[j]=(k=="pos"?"-=":"+=")+g;c.animate(l,i/2,b.options.easing,function(){c.hide();a.effects.restore(c,d);a.effects.removeWrapper(c);if(b.callback)b.callback.apply(this,arguments)})}else{var n={},p={};n[j]=(k=="pos"?"-=":"+=")+g;p[j]=(k=="pos"?"+=":"-=")+g;c.animate(n,i/2,b.options.easing).animate(p,i/2,b.options.easing,function(){a.effects.restore(c,d);a.effects.removeWrapper(c);if(b.callback)b.callback.apply(this,arguments)})}c.queue("fx",function(){c.dequeue()});c.dequeue()})}})(jQuery);(function(a,b){a.effects.clip=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right","height","width"];var e=a.effects.setMode(c,b.options.mode||"hide");var f=b.options.direction||"vertical";a.effects.save(c,d);c.show();var g=a.effects.createWrapper(c).css({overflow:"hidden"});var h=c[0].tagName=="IMG"?g:c;var i={size:f=="vertical"?"height":"width",position:f=="vertical"?"top":"left"};var j=f=="vertical"?h.height():h.width();if(e=="show"){h.css(i.size,0);h.css(i.position,j/2)}var k={};k[i.size]=e=="show"?j:0;k[i.position]=e=="show"?0:j/2;h.animate(k,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(e=="hide")c.hide();a.effects.restore(c,d);a.effects.removeWrapper(c);if(b.callback)b.callback.apply(c[0],arguments);c.dequeue()}})})}})(jQuery);(function(a,b){a.effects.drop=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right","opacity"];var e=a.effects.setMode(c,b.options.mode||"hide");var f=b.options.direction||"left";a.effects.save(c,d);c.show();a.effects.createWrapper(c);var g=f=="up"||f=="down"?"top":"left";var h=f=="up"||f=="left"?"pos":"neg";var i=b.options.distance||(g=="top"?c.outerHeight({margin:true})/2:c.outerWidth({margin:true})/2);if(e=="show")c.css("opacity",0).css(g,h=="pos"?-i:i);var j={opacity:e=="show"?1:0};j[g]=(e=="show"?h=="pos"?"+=":"-=":h=="pos"?"-=":"+=")+i;c.animate(j,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(e=="hide")c.hide();a.effects.restore(c,d);a.effects.removeWrapper(c);if(b.callback)b.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery);(function(a,b){a.effects.explode=function(b){return this.queue(function(){var c=b.options.pieces?Math.round(Math.sqrt(b.options.pieces)):3;var d=b.options.pieces?Math.round(Math.sqrt(b.options.pieces)):3;b.options.mode=b.options.mode=="toggle"?a(this).is(":visible")?"hide":"show":b.options.mode;var e=a(this).show().css("visibility","hidden");var f=e.offset();f.top-=parseInt(e.css("marginTop"),10)||0;f.left-=parseInt(e.css("marginLeft"),10)||0;var g=e.outerWidth(true);var h=e.outerHeight(true);for(var i=0;i<c;i++){for(var j=0;j<d;j++){e.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-j*(g/d),top:-i*(h/c)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:g/d,height:h/c,left:f.left+j*(g/d)+(b.options.mode=="show"?(j-Math.floor(d/2))*(g/d):0),top:f.top+i*(h/c)+(b.options.mode=="show"?(i-Math.floor(c/2))*(h/c):0),opacity:b.options.mode=="show"?0:1}).animate({left:f.left+j*(g/d)+(b.options.mode=="show"?0:(j-Math.floor(d/2))*(g/d)),top:f.top+i*(h/c)+(b.options.mode=="show"?0:(i-Math.floor(c/2))*(h/c)),opacity:b.options.mode=="show"?1:0},b.duration||500)}}setTimeout(function(){b.options.mode=="show"?e.css({visibility:"visible"}):e.css({visibility:"visible"}).hide();if(b.callback)b.callback.apply(e[0]);e.dequeue();a("div.ui-effects-explode").remove()},b.duration||500)})}})(jQuery);(function(a,b){a.effects.fade=function(b){return this.queue(function(){var c=a(this),d=a.effects.setMode(c,b.options.mode||"hide");c.animate({opacity:d},{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){b.callback&&b.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery);(function(a,b){a.effects.fold=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right"];var e=a.effects.setMode(c,b.options.mode||"hide");var f=b.options.size||15;var g=!!b.options.horizFirst;var h=b.duration?b.duration/2:a.fx.speeds._default/2;a.effects.save(c,d);c.show();var i=a.effects.createWrapper(c).css({overflow:"hidden"});var j=e=="show"!=g;var k=j?["width","height"]:["height","width"];var l=j?[i.width(),i.height()]:[i.height(),i.width()];var m=/([0-9]+)%/.exec(f);if(m)f=parseInt(m[1],10)/100*l[e=="hide"?0:1];if(e=="show")i.css(g?{height:0,width:f}:{height:f,width:0});var n={},p={};n[k[0]]=e=="show"?l[0]:f;p[k[1]]=e=="show"?l[1]:0;i.animate(n,h,b.options.easing).animate(p,h,b.options.easing,function(){if(e=="hide")c.hide();a.effects.restore(c,d);a.effects.removeWrapper(c);if(b.callback)b.callback.apply(c[0],arguments);c.dequeue()})})}})(jQuery);(function(a,b){a.effects.highlight=function(b){return this.queue(function(){var c=a(this),d=["backgroundImage","backgroundColor","opacity"],e=a.effects.setMode(c,b.options.mode||"show"),f={backgroundColor:c.css("backgroundColor")};if(e=="hide"){f.opacity=0}a.effects.save(c,d);c.show().css({backgroundImage:"none",backgroundColor:b.options.color||"#ffff99"}).animate(f,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){e=="hide"&&c.hide();a.effects.restore(c,d);e=="show"&&!a.support.opacity&&this.style.removeAttribute("filter");b.callback&&b.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery);(function(a,b){a.effects.pulsate=function(b){return this.queue(function(){var c=a(this),d=a.effects.setMode(c,b.options.mode||"show");times=(b.options.times||5)*2-1;duration=b.duration?b.duration/2:a.fx.speeds._default/2,isVisible=c.is(":visible"),animateTo=0;if(!isVisible){c.css("opacity",0).show();animateTo=1}if(d=="hide"&&isVisible||d=="show"&&!isVisible){times--}for(var e=0;e<times;e++){c.animate({opacity:animateTo},duration,b.options.easing);animateTo=(animateTo+1)%2}c.animate({opacity:animateTo},duration,b.options.easing,function(){if(animateTo==0){c.hide()}b.callback&&b.callback.apply(this,arguments)});c.queue("fx",function(){c.dequeue()}).dequeue()})}})(jQuery);(function(a,b){a.effects.puff=function(b){return this.queue(function(){var c=a(this),d=a.effects.setMode(c,b.options.mode||"hide"),e=parseInt(b.options.percent,10)||150,f=e/100,g={height:c.height(),width:c.width()};a.extend(b.options,{fade:true,mode:d,percent:d=="hide"?e:100,from:d=="hide"?g:{height:g.height*f,width:g.width*f}});c.effect("scale",b.options,b.duration,b.callback);c.dequeue()})};a.effects.scale=function(b){return this.queue(function(){var c=a(this);var d=a.extend(true,{},b.options);var e=a.effects.setMode(c,b.options.mode||"effect");var f=parseInt(b.options.percent,10)||(parseInt(b.options.percent,10)==0?0:e=="hide"?0:100);var g=b.options.direction||"both";var h=b.options.origin;if(e!="effect"){d.origin=h||["middle","center"];d.restore=true}var i={height:c.height(),width:c.width()};c.from=b.options.from||(e=="show"?{height:0,width:0}:i);var j={y:g!="horizontal"?f/100:1,x:g!="vertical"?f/100:1};c.to={height:i.height*j.y,width:i.width*j.x};if(b.options.fade){if(e=="show"){c.from.opacity=0;c.to.opacity=1}if(e=="hide"){c.from.opacity=1;c.to.opacity=0}}d.from=c.from;d.to=c.to;d.mode=e;c.effect("size",d,b.duration,b.callback);c.dequeue()})};a.effects.size=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right","width","height","overflow","opacity"];var e=["position","top","bottom","left","right","overflow","opacity"];var f=["width","height","overflow"];var g=["fontSize"];var h=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"];var i=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"];var j=a.effects.setMode(c,b.options.mode||"effect");var k=b.options.restore||false;var l=b.options.scale||"both";var m=b.options.origin;var n={height:c.height(),width:c.width()};c.from=b.options.from||n;c.to=b.options.to||n;if(m){var p=a.effects.getBaseline(m,n);c.from.top=(n.height-c.from.height)*p.y;c.from.left=(n.width-c.from.width)*p.x;c.to.top=(n.height-c.to.height)*p.y;c.to.left=(n.width-c.to.width)*p.x}var q={from:{y:c.from.height/n.height,x:c.from.width/n.width},to:{y:c.to.height/n.height,x:c.to.width/n.width}};if(l=="box"||l=="both"){if(q.from.y!=q.to.y){d=d.concat(h);c.from=a.effects.setTransition(c,h,q.from.y,c.from);c.to=a.effects.setTransition(c,h,q.to.y,c.to)}if(q.from.x!=q.to.x){d=d.concat(i);c.from=a.effects.setTransition(c,i,q.from.x,c.from);c.to=a.effects.setTransition(c,i,q.to.x,c.to)}}if(l=="content"||l=="both"){if(q.from.y!=q.to.y){d=d.concat(g);c.from=a.effects.setTransition(c,g,q.from.y,c.from);c.to=a.effects.setTransition(c,g,q.to.y,c.to)}}a.effects.save(c,k?d:e);c.show();a.effects.createWrapper(c);c.css("overflow","hidden").css(c.from);if(l=="content"||l=="both"){h=h.concat(["marginTop","marginBottom"]).concat(g);i=i.concat(["marginLeft","marginRight"]);f=d.concat(h).concat(i);c.find("*[width]").each(function(){child=a(this);if(k)a.effects.save(child,f);var c={height:child.height(),width:child.width()};child.from={height:c.height*q.from.y,width:c.width*q.from.x};child.to={height:c.height*q.to.y,width:c.width*q.to.x};if(q.from.y!=q.to.y){child.from=a.effects.setTransition(child,h,q.from.y,child.from);child.to=a.effects.setTransition(child,h,q.to.y,child.to)}if(q.from.x!=q.to.x){child.from=a.effects.setTransition(child,i,q.from.x,child.from);child.to=a.effects.setTransition(child,i,q.to.x,child.to)}child.css(child.from);child.animate(child.to,b.duration,b.options.easing,function(){if(k)a.effects.restore(child,f)})})}c.animate(c.to,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(c.to.opacity===0){c.css("opacity",c.from.opacity)}if(j=="hide")c.hide();a.effects.restore(c,k?d:e);a.effects.removeWrapper(c);if(b.callback)b.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery);(function(a,b){a.effects.shake=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right"];var e=a.effects.setMode(c,b.options.mode||"effect");var f=b.options.direction||"left";var g=b.options.distance||20;var h=b.options.times||3;var i=b.duration||b.options.duration||140;a.effects.save(c,d);c.show();a.effects.createWrapper(c);var j=f=="up"||f=="down"?"top":"left";var k=f=="up"||f=="left"?"pos":"neg";var l={},m={},n={};l[j]=(k=="pos"?"-=":"+=")+g;m[j]=(k=="pos"?"+=":"-=")+g*2;n[j]=(k=="pos"?"-=":"+=")+g*2;c.animate(l,i,b.options.easing);for(var p=1;p<h;p++){c.animate(m,i,b.options.easing).animate(n,i,b.options.easing)}c.animate(m,i,b.options.easing).animate(l,i/2,b.options.easing,function(){a.effects.restore(c,d);a.effects.removeWrapper(c);if(b.callback)b.callback.apply(this,arguments)});c.queue("fx",function(){c.dequeue()});c.dequeue()})}})(jQuery);(function(a,b){a.effects.slide=function(b){return this.queue(function(){var c=a(this),d=["position","top","bottom","left","right"];var e=a.effects.setMode(c,b.options.mode||"show");var f=b.options.direction||"left";a.effects.save(c,d);c.show();a.effects.createWrapper(c).css({overflow:"hidden"});var g=f=="up"||f=="down"?"top":"left";var h=f=="up"||f=="left"?"pos":"neg";var i=b.options.distance||(g=="top"?c.outerHeight({margin:true}):c.outerWidth({margin:true}));if(e=="show")c.css(g,h=="pos"?isNaN(i)?"-"+i:-i:i);var j={};j[g]=(e=="show"?h=="pos"?"+=":"-=":h=="pos"?"-=":"+=")+i;c.animate(j,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(e=="hide")c.hide();a.effects.restore(c,d);a.effects.removeWrapper(c);if(b.callback)b.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery);(function(a,b){a.effects.transfer=function(b){return this.queue(function(){var c=a(this),d=a(b.options.to),e=d.offset(),f={top:e.top,left:e.left,height:d.innerHeight(),width:d.innerWidth()},g=c.offset(),h=a('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(b.options.className).css({top:g.top,left:g.left,height:c.innerHeight(),width:c.innerWidth(),position:"absolute"}).animate(f,b.duration,b.options.easing,function(){h.remove();b.callback&&b.callback.apply(c[0],arguments);c.dequeue()})})}})(jQuery);

// ***************************
// js.compressed/jquery/jquery.cookie.min.js
// ***************************
/*jshint eqnull:true */
/*!
 * jQuery Cookie Plugin v1.2
 * https://github.com/carhartl/jquery-cookie
 *
 * Copyright 2011, Klaus Hartl
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.opensource.org/licenses/GPL-2.0
 */
(function(a,b,c){function e(a){return a}function f(a){return decodeURIComponent(a.replace(d," "))}var d=/\+/g;var g=a.cookie=function(d,h,i){if(h!==c){i=a.extend({},g.defaults,i);if(h===null){i.expires=-1}if(typeof i.expires==="number"){var j=i.expires,k=i.expires=new Date;k.setDate(k.getDate()+j)}h=g.json?JSON.stringify(h):String(h);return b.cookie=[encodeURIComponent(d),"=",g.raw?h:encodeURIComponent(h),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}var l=g.raw?e:f;var m=b.cookie.split("; ");for(var n=0,o;o=m[n]&&m[n].split("=");n++){if(l(o.shift())===d){var p=l(o.join("="));return g.json?JSON.parse(p):p}}return null};g.defaults={};a.removeCookie=function(b,c){if(a.cookie(b)!==null){a.cookie(b,null,c);return true}return false}})(jQuery,document);

// ***************************
// js.compressed/responsive.js
// ***************************
/*=======================================================================*\
|| ###################################################################### ||
|| # vBulletin 5.1.9 Patch Level 4
|| # ------------------------------------------------------------------ # ||
|| # Copyright 2000-2016 vBulletin Solutions Inc. All Rights Reserved.  # ||
|| # This file may not be redistributed in whole or significant part.   # ||
|| # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html   # ||
|| ###################################################################### ||
\*========================================================================*/
window.vBulletin=window.vBulletin||{};window.vBulletin.phrase=window.vBulletin.phrase||{};window.vBulletin.phrase.precache=window.vBulletin.phrase.precache||[];window.vBulletin.phrase.precache=$.merge(window.vBulletin.phrase.precache,["go_to_ellipsis"]);window.vBulletin=window.vBulletin||{};window.vBulletin.Responsive=window.vBulletin.Responsive||{};window.vBulletin.Responsive={bodyWidth:0,scrollToFixedBreakPoint:480};vBulletin.Responsive.DocReady={load:function(){$(".blogAdminActive").click(function(A){$(this).parent().toggleClass("expanded")});Modernizr.addTest("firefox",function(){return !!navigator.userAgent.match(/firefox/i)});Modernizr.addTest("opera",function(){return !!navigator.userAgent.match(/opera/i)});$("#searchForm").addClass("desktopSearch");vBulletin.Responsive.ChannelTabBar.initMainMenu();vBulletin.Responsive.MediaQueries.setResizeEvent();vBulletin.Responsive.MediaQueries.handleResizeEvent();vBulletin.Responsive.ListToSelect.registerChangeEvents();vBulletin.Responsive.Footer.init();vBulletin.Responsive.Profile.clonePrivateMessageButton();vBulletin.Responsive.ChannelContent.cloneNewTopicButton();vBulletin.Responsive.SocialGroups.cloneButtons();vBulletin.Responsive.Profile.cloneButtons();vBulletin.Responsive.SearchResultsToolbar.createMobileView();vBulletin.Responsive.Debug.wrap();vBulletin.Responsive.ConversationContent.checkForSignature();vBulletin.Responsive.Touch.override();setTimeout(vBulletin.Responsive.ListToSelect.registerSyncMenuEvents,100)}};vBulletin.Responsive.Touch={override:function(){var B="touch";if($("html").hasClass(B)){var F="no-touch";var E=navigator.userAgent.toLowerCase();var A="Firefox".toLowerCase();var D=E.indexOf(A);var G="Windows NT 6.1".toLowerCase();var C=E.indexOf(G);if(D!==-1&&C!==-1){$("html").removeClass(B).addClass(F)}}}};vBulletin.Responsive.Modal={init:function(){if($(".sgIconUploader").length){var B=["ui-dialog","ui-widget","ui-widget-content","ui-corner-all","ui-draggable","ui-resizable"];var A="body div."+B.join(".");if(!$(A).hasClass("rx-modal")){$(A).addClass("rx-modal")}}setTimeout(this.setRadioState,100)},setRadioState:function(){$("input:radio[name=sgIconToggle]:visible:first").click()}};vBulletin.Responsive.Debug={wrap:function(){var B="debug-information";var A="debug-information-wrapper";if($("#"+B).length&&!$("#"+A).length){$("#"+B).wrap('<div id="'+A+'" />')}}};vBulletin.Responsive.ListToSelect={handleSelectChangeHome:function(){var C=$("div.activity-stream-widget > .widget-header > .module-title.h-left > select").get(0);var B=C.selectedIndex;var A="div.activity-stream-widget > .widget-header > .module-title.h-left > ul [href="+C.options[B].value+"]";vBulletin.Responsive.ListToSelect.selectTab(A)},handleSelectChangeProfileSubscriptions:function(){var C=$(".subscriptionsContainer > .subscribeTabs > div.widget-tabs-nav > select").get(0);var B=C.selectedIndex;var A=".subscriptionsContainer > .subscribeTabs > ul.widget-tabs-nav [href="+C.options[B].value+"]";vBulletin.Responsive.ListToSelect.selectTab(A)},handleSelectChangeForum:function(){var C=$("div.channel-content-widget > .widget-content > .channel-conversation-list-wrapper > .widget-tabs-nav > select").get(0);var B=C.selectedIndex;var A="div.channel-content-widget > .widget-content > .channel-conversation-list-wrapper > .widget-tabs-nav > ul.ui-tabs-nav [href="+C.options[B].value+"]";vBulletin.Responsive.ListToSelect.selectTab(A)},handleSelectChangeForumElse:function(){var C=$("div.channel-content-widget > .widget-header > .module-title.h-left > select").get(0);var B=C.selectedIndex;var A="div.channel-content-widget > .widget-header > .module-title.h-left > ul [href="+C.options[B].value+"]";vBulletin.Responsive.ListToSelect.selectTab(A)},handleSelectChangeBlog:function(){var C=$("div.blog-channel-content-widget > .widget-content > .channel-conversation-list-wrapper > select").get(0);var B=C.selectedIndex;var A="div.blog-channel-content-widget > .widget-content > .channel-conversation-list-wrapper > .widget-tabs-nav > ul.ui-tabs-nav [href="+C.options[B].value+"]";vBulletin.Responsive.ListToSelect.selectTab(A)},handleSelectChangeBlogElse:function(){var C=$("div.blog-channel-content-widget > .widget-header > .module-title.h-left > select").get(0);var B=C.selectedIndex;var A="div.blog-channel-content-widget > .widget-header > .module-title.h-left > ul [href="+C.options[B].value+"]";vBulletin.Responsive.ListToSelect.selectTab(A)},handleSelectChangeBlogNewEntry:function(){var C=$("div.blog-channel-content-widget > .channel-conversation-list-wrapper > .widget-tabs-nav > select").get(0);var B=C.selectedIndex;var A="div.blog-channel-content-widget > .channel-conversation-list-wrapper > .widget-tabs-nav > ul [href="+C.options[B].value+"]";vBulletin.Responsive.ListToSelect.selectTab(A)},handleSelectChangeProfile:function(){var C=$("div.profile-widget > .widget-content > .profile-container > .widget-tabs > .widget-tabs-nav > select").get(0);var B=C.selectedIndex;var A="div.profile-widget > .widget-content > .profile-container > .widget-tabs > ul [href="+C.options[B].value+"]";vBulletin.Responsive.ListToSelect.selectTab(A)},selectTab:function(A){$(A).click()},registerChangeEvents:function(){this.registerSelectChangeHome();this.registerSelectChangeForum();this.registerSelectChangeForumElse();this.registerSelectChangeBlog();this.registerSelectChangeBlogElse();this.registerSelectChangeBlogNewEntry();this.registerSelectChangeProfile();this.registerSelectChangeProfileSubscriptions()},registerSelectChangeHome:function(){$("div.activity-stream-widget > .widget-header > .module-title.h-left > select").on("change",this.handleSelectChangeHome)},registerSelectChangeForum:function(){$("div.channel-content-widget > .widget-content > .channel-conversation-list-wrapper > .widget-tabs-nav > select").on("change",this.handleSelectChangeForum)},registerSelectChangeForumElse:function(){$("div.channel-content-widget > .widget-header > .module-title.h-left > select").on("change",this.handleSelectChangeForumElse)},registerSelectChangeBlog:function(){$("div.blog-channel-content-widget > .widget-content > .channel-conversation-list-wrapper > select").on("change",this.handleSelectChangeBlog)},registerSelectChangeBlogElse:function(){$("div.blog-channel-content-widget > .widget-header > .module-title.h-left > select").on("change",this.handleSelectChangeBlogElse)},registerSelectChangeBlogNewEntry:function(){$("div.blog-channel-content-widget > .channel-conversation-list-wrapper > .widget-tabs-nav > select").on("change",this.handleSelectChangeBlogNewEntry)},registerSelectChangeProfile:function(){$("div.profile-widget> .widget-content > .profile-container > .widget-tabs > .widget-tabs-nav > select").on("change",this.handleSelectChangeProfile)},registerSelectChangeProfileSubscriptions:function(){$(".subscriptionsContainer > .subscribeTabs > div.widget-tabs-nav > select").on("change",this.handleSelectChangeProfileSubscriptions)},tabSelected:function(B){if(B.length){var A=B.closest(".ui-tabs-nav").parent().find("select");A.find('option[value="'+B[0].hash+'"]').prop("selected",true)}},registerSyncMenuEvents:function(){$(".ui-tabs").on("tabsshow",function(A,B){vBulletin.Responsive.ListToSelect.tabSelected($(B.tab))});$(".ui-tabs .ui-tabs-nav li.ui-tabs-selected a").each(function(){vBulletin.Responsive.ListToSelect.tabSelected($(this))})}};vBulletin.Responsive.Facade={addFacadeControlToToolbar:function(I,F,D,J){var C=$(I);var A=$(F);var B=$(D);if(C.length&&!A.length&&B.length){var G=B[0];var H=$(G).clone();if(J){for(var E=0;E<J;E++){this.addClickEvent(H,existingButtonSet,J[E])}}else{this.addClickEvent(H,G)}C.append(H)}},addClickEvent:function(C,B,A){if(A){C.find(A).on("click",function(){B.find(A).click()})}else{C.on("click",function(){B.click()})}},addNewConversationToolbarToDOM:function(A,C){var D=A+" .conversation-toolbar-wrapper .conversation-toolbar."+C;if(!$($(D)).length){var B='<div class="conversation-toolbar '+C+'"><ul class="toolset-left"><li></li></ul></div>';$(A+" .conversation-toolbar-wrapper").prepend(B)}}};vBulletin.Responsive.Profile={styleSidebarContent:function(){$(".profile-info-item").removeClass()},clonePrivateMessageButton:function(){var C=".conversation-toolbar > ul > li > a.pm_button";var B=".profile_sidebar_content > .profileContainer";var A=".profile_sidebar_content > .profileContainer > div.pm-button-container > a.pm-button";if($(C).length){if($(B).length){if(!$(A).length){var E=$(C).clone();var D=$("<div class='pm-button-container'></div>").append(E);$(B).append(D)}}}},cloneButtons:function(){this.cloneTabButtons("subscription");this.cloneTabButtons("subscriber")},cloneTabButtons:function(D){var F="#"+D+"sTab";var E=D+"s-totalcount";var A=$(F+" .conversation-toolbar .toolset-left .back-button");var C=$(F+" .conversation-toolbar");var B=$(F+" .conversation-toolbar.rx-facade-back-to-profile");if(A.length&&!B.length){C.addClass("rx-desktop");vBulletin.Responsive.Facade.addNewConversationToolbarToDOM(F,"rx-facade-"+D+"-count");vBulletin.Responsive.Facade.addFacadeControlToToolbar(F+" .conversation-toolbar.rx-facade-"+D+"-count ul.toolset-left li",F+" .conversation-toolbar.rx-facade-"+D+"-count ul.toolset-left li ."+E,F+" .conversation-toolbar .toolset-left ."+E);vBulletin.Responsive.Facade.addNewConversationToolbarToDOM(F,"rx-facade-back-to-profile");vBulletin.Responsive.Facade.addFacadeControlToToolbar(F+" .conversation-toolbar.rx-facade-back-to-profile ul.toolset-left li",F+" .conversation-toolbar.rx-facade-back-to-profile ul.toolset-left li .back-button",F+" .conversation-toolbar .toolset-left .back-button");vBulletin.Responsive.Facade.addFacadeControlToToolbar(F+" .conversation-toolbar.rx-facade-"+D+"-count ul.toolset-left li",F+" .conversation-toolbar.rx-facade-back-to-profile ul.toolset-left li .rx-ignore",F+" .conversation-toolbar .toolset-left .rx-ignore")}}};vBulletin.Responsive.ChannelContent={cloneNewTopicButton:function(){var C="#activity-stream-tab .conversation-toolbar .toolset-left button.new-conversation-btn";var B=".channel-content-widget .channel-controls";var A=".channel-content-widget .channel-controls > button.new-conversation-btn";if($(C).length==0){C="#article-tab .conversation-toolbar .toolset-left button.new-conversation-btn"}if($(C).length){if($(B).length){if(!$(A).length){var D=$(C).clone();D.attr("id","rx-facade-new-conversation-btn");D.on("click",function(){$(C).click()});$(B).append(D)}}}}};vBulletin.Responsive.SocialGroups={cloneButtons:function(){if($(".groups-tab .conversation-toolbar .toolset-left div.button-set").length){vBulletin.Responsive.Facade.addNewConversationToolbarToDOM(".groups-tab","rx-facade-show-groups");vBulletin.Responsive.Facade.addFacadeControlToToolbar(".groups-tab .conversation-toolbar.rx-facade-show-groups ul.toolset-left li",".groups-tab .conversation-toolbar.rx-facade-show-groups ul.toolset-left li div.button-set",".groups-tab .conversation-toolbar .toolset-left div.button-set",["button.showAll","button.showMy"]);vBulletin.Responsive.Facade.addNewConversationToolbarToDOM(".groups-tab","rx-facade-create-groups");vBulletin.Responsive.Facade.addFacadeControlToToolbar(".groups-tab .conversation-toolbar.rx-facade-create-groups ul.toolset-left li",".groups-tab .conversation-toolbar.rx-facade-create-groups ul.toolset-left li button.add-sg",".groups-tab .conversation-toolbar .toolset-left button.add-sg")}}};vBulletin.Responsive.SearchResultsToolbar={selector:".search-results-widget .conversation-toolbar",createMobileView:function(){var A=vBulletin.Responsive.SearchResultsToolbar.selector;var C=A+".desktop";var B=$(A);B.addClass("desktop");if($(C).find(".toolbar-pagenav").length){$("<div>").addClass("conversation-toolbar mobile-search-results").insertAfter(B);this.copyElementsToMobileSearchResultsToolbar()}},copyElementsToMobileSearchResultsToolbar:function(){var B=vBulletin.Responsive.SearchResultsToolbar.selector;var E=B+".desktop";var F=B+".mobile-search-results";var D=$(E);var C=$(F);var A=D.find(".toolset-right").clone(true,true);C.append(A)}};vBulletin.Responsive.Search={cloneTagsLink:function(){if(!$("#rx-tags-column").length){var C=$(".form-row-tags");var A=$(".form-row-tags > .field_column");var D=$(".tag-editor-wrapper > span.add-tag-link");var B=D.clone();B.on("click",function(){$(".tag-editor-wrapper > span.add-tag-link").click()});A.css("display","block");D.addClass("h-hide-on-small");C.append("<div id='rx-tags-column' class='field_column'></div>");B.appendTo($("#rx-tags-column"))}}};vBulletin.Responsive.Footer=(function(){var C=0;var F=5;function A(){var I=this;var H=I.selectedIndex;var G=I.options[H].value;if(G!==""){var J=$(I.options[H]);if(J.data("is-go-to-top-link")){$(".js-footer-go-to-top").click()}else{window.location.href=G}}}function B(){if(C>F){$("#footer-tabbar > ul.h-right").addClass("rx-menu-limit-exceeded");$("#footer-tabbar > ul.h-left > li.rx-list-to-select").addClass("rx-menu-limit-exceeded")}else{$("#footer-tabbar > ul.h-right").addClass("rx-menu-limit-ok");$("#footer-tabbar > ul.h-left > li.rx-list-to-select").addClass("rx-menu-limit-ok")}}function D(){var G=$("<select />");$("<option />").val("").text(vBulletin.phrase.get("go_to_ellipsis")).appendTo(G);$(".js-footer-nav-list li").each(function(){var L=$(this);var J=L.find("a");if(L.is(".rx-hide")){return true}var K=$("<option />").val(J.prop("href")).text(J.text());if(L.is(".current")){K.prop("selected","selected")}if(J.is(".js-footer-go-to-top")){K.data("is-go-to-top-link",1)}K.appendTo(G)});var I=$("<div />").addClass("h-margin-bottom-l").append(G);var H=$("<li />").addClass("rx-list-to-select").append(I).appendTo(".js-footer-chooser-list");H.css("display","block");G.selectBox();H.css("display","")}function E(){D();C=$("#footer-tabbar > ul.h-right > li").length;B();$("li.rx-list-to-select select").on("change",A)}return{init:E}})();vBulletin.Responsive.MediaQueries={init:function(){vBulletin.Responsive.bodyWidth=$("#vb-page-body").width()},setResizeEvent:function(){var A=this.handleResizeEvent;$(window).resize(function(){A()});$(window).on("orientationchange",A)},handleResizeEvent:function(){if($("#vb-page-body").width()!=vBulletin.Responsive.bodyWidth){vBulletin.Responsive.bodyWidth=$("#vb-page-body").width();if(Modernizr.mq("only screen and (max-width: 599px)")){$("#pmFloatingBarContent .toolset.h-left").detach().prependTo("#privateMessageContainer").addClass("h-clearfix")}if(Modernizr.mq("only screen and (min-width: 600px)")){$("#privateMessageContainer .toolset.h-left").detach().prependTo("#pmFloatingBarContent").removeClass("h-clearfix")}if(Modernizr.mq("only screen and (max-width: 990px)")){var A=vBulletin.Responsive.ConversationToolbar.selector;if($(A).length&&$(A+".mobile-search").length===0){vBulletin.Responsive.ConversationToolbar.createMobileView()}}if(Modernizr.mq("only screen and (max-width: 767px)")){if(!vBulletin.Responsive.ChannelTabBar.isMobileMenu){vBulletin.Responsive.ChannelTabBar.showMobileSearchForm()}vBulletin.Responsive.ChannelTabBar.create();$("#mobile-main-menu").css("display","block");vBulletin.Responsive.Search.cloneTagsLink();vBulletin.Responsive.Profile.styleSidebarContent()}if(Modernizr.mq("only screen and (min-width: 768px)")){if(vBulletin.Responsive.ChannelTabBar.isMobileMenu){vBulletin.Responsive.ChannelTabBar.showDesktopSearchForm()}$("#mobile-main-menu").css("display","none")}if(Modernizr.mq("only screen and (max-width: 479px)")){vBulletin.Responsive.Debug.wrap()}if(vBulletin.contentslider&&typeof vBulletin.contentslider.handleWindowResize=="function"){vBulletin.contentslider.handleWindowResize()}}}};vBulletin.Responsive.ChannelTabBar={sectionItemsSelector:"#channel-tabbar ul li.section-item",initMainMenu:function(){$("#mobile-main-menu").each(function(){$(this).find(".main-menu-control-sections").on("click",function(){vBulletin.Responsive.ChannelTabBar.toggle("sections")});$(this).find(".mobile-search span").on("click",function(){vBulletin.Responsive.ChannelTabBar.toggle("search")})})},isMobileMenu:false,getMobileSearchForm:function(){var B=$("form.desktopSearch").attr("action");var A='<form method="get" class="h-right mobile mobileSearch" action="'+B+'" id="searchForm"><fieldset><div class="search-inputs"><input type="text" autocomplete="off" class="textbox search-term" placeholder="Search..." id="q" name="q"></div></fieldset></form>';return A},showMobileSearchForm:function(){var C=$("form.mobileSearch");var B=$("form.desktopSearch");var A=$("form.mobileSearch input.search-term");var D=$("form.desktopSearch input.search-term");if(C.length){C.attr("id","searchForm");A.attr("id","q")}if(B.length){B.attr("id","searchFormDesktop");D.attr("id","qDesktop")}this.showCollapsed();vBulletin.Responsive.ChannelTabBar.isMobileMenu=true},showDesktopSearchForm:function(){var C=$("form.mobileSearch");var B=$("form.desktopSearch");var A=$("form.mobileSearch input.search-term");var D=$("form.desktopSearch input.search-term");if(C.length){C.attr("id","searchFormMobile");A.attr("id","qMobile")}if(B.length){B.attr("id","searchForm");D.attr("id","q")}this.showExpanded();vBulletin.Responsive.ChannelTabBar.isMobileMenu=false},create:function(){if(!$("form.mobileSearch").length){var A=this.getMobileSearchForm();$("#mobile-main-menu-search").append(A);this.showMobileSearchForm();$(vBulletin.Responsive.ChannelTabBar.sectionItemsSelector).each(function(){var B=$(this).find("a").attr("href");$(this).click(function(){window.location=B})})}},toggle:function(F){if(F==="search"){var D=$("#mobile-main-menu-search");var E=$("#mobile-main-menu-sections");if(D.css("display")==="none"){E.css("display","none");D.css("display","inline-block")}else{var G=$("#mobile-main-menu-search input");var C=$(G[0]).val();if(C!==""){var A=$("#mobile-main-menu-search form");A[0].submit()}else{D.css("display","none");E.css("display","inline-block")}}}else{if(F==="sections"){var B=$(vBulletin.Responsive.ChannelTabBar.sectionItemsSelector);if(B.length){if(B.eq(0).css("display")==="none"){this.showExpanded()}else{this.showCollapsed()}}}}},showExpanded:function(){$(vBulletin.Responsive.ChannelTabBar.sectionItemsSelector).css("display","block");this.removeCollapsedClass()},showCollapsed:function(){$(vBulletin.Responsive.ChannelTabBar.sectionItemsSelector).css("display","none");this.addCollapsedClass()},removeCollapsedClass:function(){$("#mobile-main-menu-sections div.main-menu-control-sections").removeClass("collapsed");$("#mobile-main-menu-sections div.main-menu-control-sections .sections-menu-icon span.icon").removeClass("collapsed");$("#mobile-main-menu-sections div.main-menu-control-sections .sections-icon .icon").removeClass("collapsed");$("#mobile-main-menu-sections div.main-menu-control-sections .sections-title").removeClass("collapsed")},addCollapsedClass:function(){$("#mobile-main-menu-sections div.main-menu-control-sections").addClass("collapsed");$("#mobile-main-menu-sections div.main-menu-control-sections .sections-menu-icon .icon").addClass("collapsed");$("#mobile-main-menu-sections div.main-menu-control-sections .sections-icon .icon").addClass("collapsed");$("#mobile-main-menu-sections div.main-menu-control-sections .sections-title").addClass("collapsed")}};vBulletin.Responsive.ConversationContent={checkForSignature:function(){$(".conversation-content .videoscontainer").each(function(){if(!$(this).siblings("div.post-signature").length){$(this).addClass("no-signature")}})}};vBulletin.Responsive.ConversationToolbar={selector:".conversation-view > .conversation-toolbar-wrapper > .conversation-toolbar",createMobileView:function(){var A=vBulletin.Responsive.ConversationToolbar.selector;var B=A+".desktop";var C=$(A);C.addClass("desktop");if($(B).find("button.post-reply-btn").length){$("<div>").addClass("conversation-toolbar mobile-search").insertAfter(C);this.copyElementsToMobileSearchToolbar()}},copyElementsToMobileSearchToolbar:function(){var D=vBulletin.Responsive.ConversationToolbar.selector;var B=D+".desktop";var J=D+".mobile-search";var F=$(B);var A=$(J);A.css("display","none");var E=F.find("button.post-reply-btn").clone(true,true).removeAttr("id");var I=$("<ul>").addClass("toolset-left");var H=$("<li>");H.append(E);I.append(H);A.append(I);var C=$("<ul>").addClass("toolset-right");var G=F.find("li.toolbar-search").clone(true,true);G.find("button").removeAttr("id");C.append(G);A.append(C)}};
/*
 * jQuery throttle / debounce - v1.1 - 3/7/2010
 * http://benalman.com/projects/jquery-throttle-debounce-plugin/
 *
 * Copyright (c) 2010 "Cowboy" Ben Alman
 * Dual licensed under the MIT and GPL licenses.
 * http://benalman.com/about/license/
 */
(function(B,C){var $=B.jQuery||B.Cowboy||(B.Cowboy={}),A;$.throttle=A=function(E,F,J,I){var H,D=0;if(typeof F!=="boolean"){I=J;J=F;F=C}function G(){var O=this,M=+new Date()-D,N=arguments;function L(){D=+new Date();J.apply(O,N)}function K(){H=C}if(I&&!H){L()}H&&clearTimeout(H);if(I===C&&M>E){L()}else{if(F!==true){H=setTimeout(I?K:L,I===C?E-M:E)}}}if($.guid){G.guid=J.guid=J.guid||$.guid++}return G};$.debounce=function(D,E,F){return F===C?A(D,E,false):A(D,F,E!==false)}})(this);vBulletin.Responsive.Debounce={init:function(){var C=0;var A=function(){var E=new Date();var F=E.getTime();if(C>0){console.log(F-C)}C=F};var B=function(){var E=$(window).width();if(E<480){$("body").addClass("l-xsmall")}else{$("body").removeClass("l-xsmall")}if(E<768){$("body").addClass("l-small")}else{$("body").removeClass("l-small")}if(E>=768){$("body").addClass("l-desktop")}else{$("body").removeClass("l-desktop")}D()};var D=function(){var E=$(".l-row");if(E.length<1){return }E.reverse().each(function(){var H=$(this);if(H.width()>=768){H.removeClass("l-small");return true}var F=H.find("> .l-col__flex-1, > .l-col__flex-2, > .l-col__flex-3, > .l-col__flex-4, > .l-col__flex-5, > .l-col__flex-6"),G=false;H.removeClass("l-small");F.reverse().each(function(){if(this.offsetWidth<this.scrollWidth){G=true;return false}});if(G){H.addClass("l-small")}})};$(window).on("resize",$.debounce(300,B));B()}};$(document).ready(function(){vBulletin.Responsive.DocReady.load();vBulletin.Responsive.Debounce.init()});;

// ***************************
// js.compressed/vbcache.js
// ***************************
window.vBulletin=window.vBulletin||{};window.vBulletin.cache=function(){var H="vbcache-";var M="-timestamp";var B;var I;var D="global";var E;var N={global:{bucketProvider:function(){},latestChange:0,preCache:[]}};function G(){var P="__vbcachetest__";var Q=P;if(B!==undefined){return B}try{F(P,Q);K(P);B=true}catch(O){B=false}return B}function A(){if(I===undefined){I=(window.JSON!=null)}return I}function C(){if(!G()){return }var S=N[D];var O=[];for(var T in E){storedVal=E[T];if(storedVal&&T.indexOf(D)===0&&T.indexOf(M)<0){var V=T.substr(D.length);var Q=J(V);var U=L(Q);U=parseInt(U);if(U<N[D].latestChange){K(V);N[D].preCache.push(V)}else{O.push(V)}}}for(var P=N[D].preCache.length-1;P>=0;--P){for(var R=0;R<O.length;R++){if(N[D].preCache[P]==O[R]){N[D].preCache.splice(P,1);break}}}}function J(O){return O+M}function L(O){return E[D+O]}function F(P,Q){if(JSON.stringify(E)=="{}"){var O=localStorage.getItem(H);E=O?JSON.parse(O):{}}E[D+P]=Q;localStorage.removeItem(H);localStorage.setItem(H,JSON.stringify(E))}function K(O){if(!A()){return null}delete E[D+O];localStorage.setItem(H,JSON.stringify(E))}return{set:function(U,T){if(!G()){return }if(typeof T!=="string"){if(!A()){return }try{T=JSON.stringify(T)}catch(S){return }}try{F(U,T)}catch(S){if(S.name==="QUOTA_EXCEEDED_ERR"||S.name==="NS_ERROR_DOM_QUOTA_REACHED"){var V=[];var P;for(var W in E){storedVal=E[W];if(storedVal&&W.indexOf(D)===0&&W.indexOf(M)<0){var X=W.substr(D.length);var O=J(X);var R=L(O);R=parseInt(R);V.push({key:X,size:(L(X)||"").length,timestamp:R})}}V.sort(function(Z,Y){return(Y.timestamp-Z.timestamp)});var Q=(T||"").length;while(V.length&&Q>0){P=V.pop();K(P.key);K(J(P.key));Q-=P.size}try{F(U,T)}catch(S){return }}else{return }}F(J(U),window.pageData.current_server_datetime)},get:function(P){if(!G()){return null}C();var Q=N[D];var O=J(P);var T=L(O);var R=L(P);if(R==null){R=Q.bucketProvider(P,N[D].preCache)}if(!R||!A()){return R}try{return JSON.parse(R)}catch(S){return R}},remove:function(O){if(!G()){return null}K(O);K(J(O))},supported:function(){return G()},flush:function(){if(!G()){return }for(var P=localStorage.length-1;P>=0;--P){var O=localStorage.key(P);if(O.indexOf(H+D)===0){localStorage.removeItem(O)}}},initBucket:function(S,O,Q,R){N[S]={latestChange:O,bucketProvider:R,preCache:Q};D=S;var P=localStorage.getItem(H);if(P!==null){E=JSON.parse(P)}else{E={}}C()},setBucket:function(O){D=O}}}();;

// ***************************
// js.compressed/jquery/jquery.elastic-1.6.11.custom.min.js
// ***************************
/**
*	@name							Elastic
*	@descripton						Elastic is jQuery plugin that grow and shrink your textareas automatically
*	@version						1.6.11
*	@requires						jQuery 1.2.6+
*
*	@author							Jan Jarfalk
*	@author-email					jan.jarfalk@unwrongest.com
*	@author-website					http://www.unwrongest.com
*
*	@licence						MIT License - http://www.opensource.org/licenses/mit-license.php
*/
/*
*  Modified for vBulletin:
*  - Replace twin DOM node instead of adding a new one for every elastic textarea
*  - Added namespace to events bound by the plugin to the textarea to allow us to programmatically trigger events specific to this plugin
*  - Added checking for CSS box-sizing in determining the actual height and width of the textarea
*/
(function(e){jQuery.fn.extend({elastic:function(){var t=["paddingTop","paddingRight","paddingBottom","paddingLeft","fontSize","lineHeight","fontFamily","width","fontWeight","border-top-width","border-right-width","border-bottom-width","border-left-width","borderTopStyle","borderTopColor","borderRightStyle","borderRightColor","borderBottomStyle","borderBottomColor","borderLeftStyle","borderLeftColor"];return this.each(function(){function a(){var e=n().width;if(i.width()!==e){i.css({width:e+"px"});l(true)}}function f(e,t){var i=parseInt(e,10);if(n().height!==i){r.css({height:i+"px",overflow:t})}}function l(e){var t=r.val().replace(/&/g,"&").replace(/ {2}/g," ").replace(/<|>/g,">").replace(/\n/g,"<br />");var s=i.html().replace(/<br>/ig,"<br />");if(e||t+" "!==s){i.html(t+" ");if(Math.abs(i.height()+lineHeight-n().height)>3){var o=i.height()+lineHeight;if(o>=maxheight){f(maxheight,"auto")}else if(o<=minheight){f(minheight,"hidden")}else{f(o,"hidden")}}}}if(this.type!=="textarea"){return false}var n=function(){return s=="border-box"?{height:r.outerHeight(),width:r.outerWidth()}:s=="padding-box"?{height:r.innerHeight(),width:r.innerWidth()}:{height:r.height(),width:r.width()}};var r=jQuery(this),i=jQuery("<div />").css({position:"absolute",display:"none","word-wrap":"break-word","white-space":"pre-wrap"}).addClass("elastic-twin-div"),s=r.css("box-sizing")||r.css("-moz-box-sizing")||r.css("-webkit-box-sizing")||"content-box";lineHeight=parseInt(r.css("line-height"),10)||parseInt(r.css("font-size"),"10"),minheight=n().height||lineHeight*3,maxheight=parseInt(r.css("max-height"),10)||Number.MAX_VALUE,goalheight=0;if(maxheight<0){maxheight=Number.MAX_VALUE}var o=e("> .elastic-twin-div",r.parent());if(o.length==1){o.replaceWith(i)}else{i.appendTo(r.parent())}var u=t.length;while(u--){i.css(t[u].toString(),r.css(t[u].toString()))}r.css({overflow:"hidden"});r.bind("keyup.elastic change.elastic cut.elastic paste.elastic",function(){l()});e(window).bind("resize.elastic",a);r.bind("resize.elastic focus.elastic",a);r.bind("update.elastic",l);r.bind("blur.elastic",function(){if(i.height()<maxheight){if(i.height()>minheight){r.height(i.height())}else{r.height(minheight)}}});r.bind("input.elastic paste.elastic",function(e){setTimeout(l,250)});l()})}})})(jQuery);

// ***************************
// js.compressed/jquery/jquery.form.min.js
// ***************************
/*!
 * jQuery Form Plugin
 * version: 2.85 (23-SEP-2011)
 * @requires jQuery v1.3.2 or later
 *
 * Examples and documentation at: http://malsup.com/jquery/form/
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */
(function(a){function b(){if(!a.fn.ajaxSubmit.debug)return;var b="[jquery.form] "+Array.prototype.join.call(arguments,"");if(window.console&&window.console.log){window.console.log(b)}else if(window.opera&&window.opera.postError){window.opera.postError(b)}}a.fn.ajaxSubmit=function(c){function t(e){function w(a){var b=a.contentWindow?a.contentWindow.document:a.contentDocument?a.contentDocument:a.document;return b}function x(){function h(){try{var a=w(n).readyState;b("state = "+a);if(a.toLowerCase()=="uninitialized")setTimeout(h,50)}catch(c){b("Server abort: ",c," (",c.name,")");C(v);s&&clearTimeout(s);s=undefined}}var c=g.attr("target"),e=g.attr("action");f.setAttribute("target",l);if(!d){f.setAttribute("method","POST")}if(e!=j.url){f.setAttribute("action",j.url)}if(!j.skipEncodingOverride&&(!d||/post/i.test(d))){g.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"})}if(j.timeout){s=setTimeout(function(){r=true;C(u)},j.timeout)}var i=[];try{if(j.extraData){for(var k in j.extraData){i.push(a('<input type="hidden" name="'+k+'" />').attr("value",j.extraData[k]).appendTo(f)[0])}}if(!j.iframeTarget){m.appendTo("body");n.attachEvent?n.attachEvent("onload",C):n.addEventListener("load",C,false)}setTimeout(h,15);f.submit()}finally{f.setAttribute("action",e);if(c){f.setAttribute("target",c)}else{g.removeAttr("target")}a(i).remove()}}function C(c){if(o.aborted||B){return}try{z=w(n)}catch(d){b("cannot access response document: ",d);c=v}if(c===u&&o){o.abort("timeout");return}else if(c==v&&o){o.abort("server abort");return}if(!z||z.location.href==j.iframeSrc){if(!r)return}n.detachEvent?n.detachEvent("onload",C):n.removeEventListener("load",C,false);var e="success",f;try{if(r){throw"timeout"}var g=j.dataType=="xml"||z.XMLDocument||a.isXMLDoc(z);b("isXml="+g);if(!g&&window.opera&&(z.body==null||z.body.innerHTML=="")){if(--A){b("requeing onLoad callback, DOM not available");setTimeout(C,250);return}}var h=z.body?z.body:z.documentElement;o.responseText=h?h.innerHTML:null;o.responseXML=z.XMLDocument?z.XMLDocument:z;if(g)j.dataType="xml";o.getResponseHeader=function(a){var b={"content-type":j.dataType};return b[a]};if(h){o.status=Number(h.getAttribute("status"))||o.status;o.statusText=h.getAttribute("statusText")||o.statusText}var i=(j.dataType||"").toLowerCase();var l=/(json|script|text)/.test(i);if(l||j.textarea){var p=z.getElementsByTagName("textarea")[0];if(p){o.responseText=p.value;o.status=Number(p.getAttribute("status"))||o.status;o.statusText=p.getAttribute("statusText")||o.statusText}else if(l){var q=z.getElementsByTagName("pre")[0];var t=z.getElementsByTagName("body")[0];if(q){o.responseText=q.textContent?q.textContent:q.innerText}else if(t){o.responseText=t.textContent?t.textContent:t.innerText}}}else if(i=="xml"&&!o.responseXML&&o.responseText!=null){o.responseXML=D(o.responseText)}try{y=F(o,i,j)}catch(c){e="parsererror";o.error=f=c||e}}catch(c){b("error caught: ",c);e="error";o.error=f=c||e}if(o.aborted){b("upload aborted");e=null}if(o.status){e=o.status>=200&&o.status<300||o.status===304?"success":"error"}if(e==="success"){j.success&&j.success.call(j.context,y,"success",o);k&&a.event.trigger("ajaxSuccess",[o,j])}else if(e){if(f==undefined)f=o.statusText;j.error&&j.error.call(j.context,o,e,f);k&&a.event.trigger("ajaxError",[o,j,f])}k&&a.event.trigger("ajaxComplete",[o,j]);if(k&&!--a.active){a.event.trigger("ajaxStop")}j.complete&&j.complete.call(j.context,o,e);B=true;if(j.timeout)clearTimeout(s);setTimeout(function(){if(!j.iframeTarget)m.remove();o.responseXML=null},100)}var f=g[0],h,i,j,k,l,m,n,o,p,q,r,s;var t=!!a.fn.prop;if(e){if(t){for(i=0;i<e.length;i++){h=a(f[e[i].name]);h.prop("disabled",false)}}else{for(i=0;i<e.length;i++){h=a(f[e[i].name]);h.removeAttr("disabled")}}}if(a(":input[name=submit],:input[id=submit]",f).length){alert('Error: Form elements must not have name or id of "submit".');return}j=a.extend(true,{},a.ajaxSettings,c);j.context=j.context||j;l="jqFormIO"+(new Date).getTime();if(j.iframeTarget){m=a(j.iframeTarget);q=m.attr("name");if(q==null)m.attr("name",l);else l=q}else{m=a('<iframe name="'+l+'" src="'+j.iframeSrc+'" />');m.css({position:"absolute",top:"-1000px",left:"-1000px"})}n=m[0];o={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(c){var d=c==="timeout"?"timeout":"aborted";b("aborting upload... "+d);this.aborted=1;m.attr("src",j.iframeSrc);o.error=d;j.error&&j.error.call(j.context,o,d,c);k&&a.event.trigger("ajaxError",[o,j,d]);j.complete&&j.complete.call(j.context,o,d)}};k=j.global;if(k&&!(a.active++)){a.event.trigger("ajaxStart")}if(k){a.event.trigger("ajaxSend",[o,j])}if(j.beforeSend&&j.beforeSend.call(j.context,o,j)===false){if(j.global){a.active--}return}if(o.aborted){return}p=f.clk;if(p){q=p.name;if(q&&!p.disabled){j.extraData=j.extraData||{};j.extraData[q]=p.value;if(p.type=="image"){j.extraData[q+".x"]=f.clk_x;j.extraData[q+".y"]=f.clk_y}}}var u=1;var v=2;if(j.forceSync){x()}else{setTimeout(x,10)}var y,z,A=50,B;var D=a.parseXML||function(a,b){if(window.ActiveXObject){b=new ActiveXObject("Microsoft.XMLDOM");b.async="false";b.loadXML(a)}else{b=(new DOMParser).parseFromString(a,"text/xml")}return b&&b.documentElement&&b.documentElement.nodeName!="parsererror"?b:null};var E=a.parseJSON||function(a){return window["eval"]("("+a+")")};var F=function(b,c,d){var e=b.getResponseHeader("content-type")||"",f=c==="xml"||!c&&e.indexOf("xml")>=0,g=f?b.responseXML:b.responseText;if(f&&g.documentElement.nodeName==="parsererror"){a.error&&a.error("parsererror")}if(d&&d.dataFilter){g=d.dataFilter(g,c)}if(typeof g==="string"){if(c==="json"||!c&&e.indexOf("json")>=0){g=E(g)}else if(c==="script"||!c&&e.indexOf("javascript")>=0){a.globalEval(g)}}return g}}if(!this.length){b("ajaxSubmit: skipping submit process - no element selected");return this}var d,e,f,g=this;if(typeof c=="function"){c={success:c}}d=this.attr("method");e=this.attr("action");f=typeof e==="string"?a.trim(e):"";f=f||window.location.href||"";if(f){f=(f.match(/^([^#]+)/)||[])[1]}c=a.extend(true,{url:f,success:a.ajaxSettings.success,type:d||"GET",iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},c);var h={};this.trigger("form-pre-serialize",[this,c,h]);if(h.veto){b("ajaxSubmit: submit vetoed via form-pre-serialize trigger");return this}if(c.beforeSerialize&&c.beforeSerialize(this,c)===false){b("ajaxSubmit: submit aborted via beforeSerialize callback");return this}var i,j,k=this.formToArray(c.semantic);if(c.data){c.extraData=c.data;for(i in c.data){if(a.isArray(c.data[i])){for(var l in c.data[i]){k.push({name:i,value:c.data[i][l]})}}else{j=c.data[i];j=a.isFunction(j)?j():j;k.push({name:i,value:j})}}}if(c.beforeSubmit&&c.beforeSubmit(k,this,c)===false){b("ajaxSubmit: submit aborted via beforeSubmit callback");return this}this.trigger("form-submit-validate",[k,this,c,h]);if(h.veto){b("ajaxSubmit: submit vetoed via form-submit-validate trigger");return this}var m=a.param(k);if(c.type.toUpperCase()=="GET"){c.url+=(c.url.indexOf("?")>=0?"&":"?")+m;c.data=null}else{c.data=m}var n=[];if(c.resetForm){n.push(function(){g.resetForm()})}if(c.clearForm){n.push(function(){g.clearForm()})}if(!c.dataType&&c.target){var o=c.success||function(){};n.push(function(b){var d=c.replaceTarget?"replaceWith":"html";a(c.target)[d](b).each(o,arguments)})}else if(c.success){n.push(c.success)}c.success=function(a,b,d){var e=c.context||c;for(var f=0,h=n.length;f<h;f++){n[f].apply(e,[a,b,d||g,g])}};var p=a("input:file",this).length>0;var q="multipart/form-data";var r=g.attr("enctype")==q||g.attr("encoding")==q;if(c.iframe!==false&&(p||c.iframe||r)){if(c.closeKeepAlive){a.get(c.closeKeepAlive,function(){t(k)})}else{t(k)}}else{if(a.browser.msie&&d=="get"&&typeof c.type==="undefined"){var s=g[0].getAttribute("method");if(typeof s==="string")c.type=s}a.ajax(c)}this.trigger("form-submit-notify",[this,c]);return this};a.fn.ajaxForm=function(c){if(this.length===0){var d={s:this.selector,c:this.context};if(!a.isReady&&d.s){b("DOM not ready, queuing ajaxForm");a(function(){a(d.s,d.c).ajaxForm(c)});return this}b("terminating; zero elements found by selector"+(a.isReady?"":" (DOM not ready)"));return this}return this.ajaxFormUnbind().bind("submit.form-plugin",function(b){if(!b.isDefaultPrevented()){b.preventDefault();a(this).ajaxSubmit(c)}}).bind("click.form-plugin",function(b){var c=b.target;var d=a(c);if(!d.is(":submit,input:image")){var e=d.closest(":submit");if(e.length==0){return}c=e[0]}var f=this;f.clk=c;if(c.type=="image"){if(b.offsetX!=undefined){f.clk_x=b.offsetX;f.clk_y=b.offsetY}else if(typeof a.fn.offset=="function"){var g=d.offset();f.clk_x=b.pageX-g.left;f.clk_y=b.pageY-g.top}else{f.clk_x=b.pageX-c.offsetLeft;f.clk_y=b.pageY-c.offsetTop}}setTimeout(function(){f.clk=f.clk_x=f.clk_y=null},100)})};a.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")};a.fn.formToArray=function(b){var c=[];if(this.length===0){return c}var d=this[0];var e=b?d.getElementsByTagName("*"):d.elements;if(!e){return c}var f,g,h,i,j,k,l;for(f=0,k=e.length;f<k;f++){j=e[f];h=j.name;if(!h){continue}if(b&&d.clk&&j.type=="image"){if(!j.disabled&&d.clk==j){c.push({name:h,value:a(j).val()});c.push({name:h+".x",value:d.clk_x},{name:h+".y",value:d.clk_y})}continue}i=a.fieldValue(j,true);if(i&&i.constructor==Array){for(g=0,l=i.length;g<l;g++){c.push({name:h,value:i[g]})}}else if(i!==null&&typeof i!="undefined"){c.push({name:h,value:i})}}if(!b&&d.clk){var m=a(d.clk),n=m[0];h=n.name;if(h&&!n.disabled&&n.type=="image"){c.push({name:h,value:m.val()});c.push({name:h+".x",value:d.clk_x},{name:h+".y",value:d.clk_y})}}return c};a.fn.formSerialize=function(b){return a.param(this.formToArray(b))};a.fn.fieldSerialize=function(b){var c=[];this.each(function(){var d=this.name;if(!d){return}var e=a.fieldValue(this,b);if(e&&e.constructor==Array){for(var f=0,g=e.length;f<g;f++){c.push({name:d,value:e[f]})}}else if(e!==null&&typeof e!="undefined"){c.push({name:this.name,value:e})}});return a.param(c)};a.fn.fieldValue=function(b){for(var c=[],d=0,e=this.length;d<e;d++){var f=this[d];var g=a.fieldValue(f,b);if(g===null||typeof g=="undefined"||g.constructor==Array&&!g.length){continue}g.constructor==Array?a.merge(c,g):c.push(g)}return c};a.fieldValue=function(b,c){var d=b.name,e=b.type,f=b.tagName.toLowerCase();if(c===undefined){c=true}if(c&&(!d||b.disabled||e=="reset"||e=="button"||(e=="checkbox"||e=="radio")&&!b.checked||(e=="submit"||e=="image")&&b.form&&b.form.clk!=b||f=="select"&&b.selectedIndex==-1)){return null}if(f=="select"){var g=b.selectedIndex;if(g<0){return null}var h=[],i=b.options;var j=e=="select-one";var k=j?g+1:i.length;for(var l=j?g:0;l<k;l++){var m=i[l];if(m.selected){var n=m.value;if(!n){n=m.attributes&&m.attributes["value"]&&!m.attributes["value"].specified?m.text:m.value}if(j){return n}h.push(n)}}return h}return a(b).val()};a.fn.clearForm=function(){return this.each(function(){a("input,select,textarea",this).clearFields()})};a.fn.clearFields=a.fn.clearInputs=function(){var a=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var b=this.type,c=this.tagName.toLowerCase();if(a.test(b)||c=="textarea"){this.value=""}else if(b=="checkbox"||b=="radio"){this.checked=false}else if(c=="select"){this.selectedIndex=-1}})};a.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=="function"||typeof this.reset=="object"&&!this.reset.nodeType){this.reset()}})};a.fn.enable=function(a){if(a===undefined){a=true}return this.each(function(){this.disabled=!a})};a.fn.selected=function(b){if(b===undefined){b=true}return this.each(function(){var c=this.type;if(c=="checkbox"||c=="radio"){this.checked=b}else if(this.tagName.toLowerCase()=="option"){var d=a(this).parent("select");if(b&&d[0]&&d[0].type=="select-one"){d.find("option").selected(false)}this.selected=b}})};a.fn.ajaxSubmit.debug=false;})(jQuery);

// ***************************
// js.compressed/global.js
// ***************************
/*=======================================================================*\
|| ###################################################################### ||
|| # vBulletin 5.1.9 Patch Level 4
|| # ------------------------------------------------------------------ # ||
|| # Copyright 2000-2016 vBulletin Solutions Inc. All Rights Reserved.  # ||
|| # This file may not be redistributed in whole or significant part.   # ||
|| # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html   # ||
|| ###################################################################### ||
\*========================================================================*/
(function(C){if(typeof window.console!="object"){window.console={}}var D=["log","debug","info","warn","error","assert","dir","dirxml","group","groupEnd","time","timeEnd","count","trace","profile","profileEnd"];for(var B=0;B<D.length;B++){if(typeof window.console[D[B]]!="function"&&typeof window.console[D[B]]!="object"){window.console[D[B]]=function(){}}}if(!Object.keys){Object.keys=(function(){var G=Object.prototype.hasOwnProperty,H=!({toString:null}).propertyIsEnumerable("toString"),F=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],E=F.length;return function(K){if(typeof K!=="object"&&typeof K!=="function"||K===null){throw new TypeError("Object.keys called on non-object")}var I=[];for(var L in K){if(G.call(K,L)){I.push(L)}}if(H){for(var J=0;J<E;J++){if(G.call(K,F[J])){I.push(F[J])}}}return I}})()}C.ajaxPrefilter("script",function(E){E.cache=true});C.ajaxPrefilter(function(E,I,G){if(typeof (E.data)=="undefined"){E.data="securitytoken="+pageData.securitytoken;if(typeof E.formData!=="undefined"){if(Array.isArray(E.formData)){E.formData.push({name:"securitytoken",value:pageData.securitytoken})}}}else{if(typeof FormData!=="undefined"&&E.data instanceof FormData){E.data.append("securitytoken",pageData.securitytoken)}else{var F=true;var H=E.data.split("&");C.each(H,function(J,K){if(K.match(/^securitytoken=/)){F=false;return false}});if(F){E.data+="&securitytoken="+pageData.securitytoken}}}});C.ajaxPrefilter(function(E,G,F){(function(){var I=vBulletin.getAjaxBaseurl();if((G.url.indexOf(I)==0&&G.url.substr(I.length).indexOf("/ajax/render/")==0)||(G&&G.data&&G.data.isAjaxTemplateRender)){var H=E.success;E.success=function(){console.log("Intercept AJAX template render calls: Start (URL: {0})".format(E.url));var O=arguments[0];if(!O||typeof O!="object"||C.isEmptyObject(O)){if(typeof H=="function"){return H.apply(this,arguments)}return false}if(G.data&&G.data.isAjaxTemplateRenderWithData){arguments[0]=O}else{arguments[0]=O.template}var T=O.css_links;if(!T||T.length==0){console.log("Intercept AJAX template render calls: No CSS");if(typeof H=="function"){console.log("Intercept AJAX template render calls: Calling original success handler");return H.apply(this,arguments)}}else{console.log("Intercept AJAX template render calls: Has CSS");var N=/sheet=([^&]+)&/,V=T.pop(),Q=(V.match(N)!=null);T.push(V);var J=function(X){var Y=X.match(N);var W={};if(Y&&Y[1]){C.each(Y[1].split(","),function(Z,a){W[a]=X})}else{W[X.replace(/^.*\//g,"")]=X}return W};var P={};C("head link[rel=stylesheet]").each(function(){C.extend(P,J(C(this).attr("href")))});var S={};C.each(T,function(W,X){C.extend(S,J(X))});var U=[];C.each(S,function(W,X){if(W&&typeof P[W]=="undefined"){if(Q){U.push(W)}else{U.push(X)}}});if(U.length==0){console.log("Intercept AJAX template render calls: Needed CSS is already on the page");if(typeof H=="function"){console.log("Intercept AJAX template render calls: Calling original success handler");return H.apply(this,arguments)}}else{var L=[];if(Q){console.log("Intercept AJAX template render calls: found DB CSS");L.push(V.replace(/sheet=[^&]+&/,"sheet="+U.join(",")+"&"))}else{console.log("Intercept AJAX template render calls: found FS CSS");L=U}var K=this,R=arguments;console.log("Intercept AJAX template render calls: Fetching CSS: {0}".format(L.join(", ")));var M=function(X){if(X.length==0){console.log("Intercept AJAX template render calls: Done. Calling original callback.");window.setTimeout(function(){if(typeof H=="function"){return H.apply(K,R)}},50);return }var W=C("<div />").append(X.shift()).text();console.log("Intercept AJAX template render calls: Fetching CSS file: {0}".format(W));C.get(W,{cache:true},function(Z){var Y=C("<link />",{rel:"stylesheet",type:"text/css",href:W}),a=C(".js-additional-css");if(a.length==1){a.before(Y)}else{C("head").append(Y)}}).then(function(){console.log("Intercept AJAX template render calls: Fetched CSS file: {0}".format(W));if(C(".js-debug-css-template-list").length>0){var Z=J(W),Y=C("<ol />");C.each(Z,function(c,d){if(Q){Y.append(C("<li />").append(c))}else{Y.append(C("<li />").append(d))}});var a=C(".js-debug-css-template-list").append(C("<li />").append(vBulletin.phrase.get("added_via_ajax_call")+":").append(Y));var b=a.prev("b");b.text(parseInt(b.text(),10)+1)}M(X)},function(){console.warn("Intercept AJAX template render calls: Failed to fetch CSS file: {0}".format(W));M(X)})};M(L)}}}}})()});String.prototype.format=function(){var F=this,E=arguments.length;while(E--){F=F.replace(new RegExp("\\{"+E+"\\}","gm"),arguments[E])}return F};jQuery.fn.reverse=[].reverse;window.vBulletin=window.vBulletin||{};vBulletin.getStackTrace=function(){var E=new Error();return E.stack};vBulletin.cookie=vBulletin.cookie||{};vBulletin.cookie.convertBbarrayCookie=function(F,E){F=F||"";E=E||"get";if(E=="set"){F=F.replace(/"/g,".");F=F.replace(/:/g,"-");F=F.replace(/;/g,"_")}else{F=F.replace(/\./g,'"');F=F.replace(/-/g,":");F=F.replace(/_/g,";")}return F};vBulletin.cookie.fetchBbarrayCookie=function(E,H){if(typeof vBulletin.cookie.bbarraycookiecache=="undefined"){vBulletin.cookie.bbarraycookiecache={}}var F=C.cookie(pageData.cookie_prefix+E);if(F!=""&&!vBulletin.cookie.bbarraycookiecache[E]){try{vBulletin.cookie.bbarraycookiecache[E]=C.parseJSON(vBulletin.cookie.convertBbarrayCookie(F))}catch(G){vBulletin.cookie.bbarraycookiecache[E]=null}}if(vBulletin.cookie.bbarraycookiecache[E]){return vBulletin.cookie.bbarraycookiecache[E][H]?vBulletin.cookie.bbarraycookiecache[E][H]:null}else{return null}};vBulletin.cookie.setBbarrayCookie=function(E,K,G,I){if(typeof vBulletin.cookie.bbarraycookiecache=="undefined"){vBulletin.cookie.bbarraycookiecache={}}var F=C.cookie(pageData.cookie_prefix+E);if(F!=""&&!vBulletin.cookie.bbarraycookiecache[E]){try{vBulletin.cookie.bbarraycookiecache[E]=C.parseJSON(vBulletin.cookie.convertBbarrayCookie(F))}catch(H){vBulletin.cookie.bbarraycookiecache[E]=null}}if(!vBulletin.cookie.bbarraycookiecache[E]){vBulletin.cookie.bbarraycookiecache[E]={}}vBulletin.cookie.bbarraycookiecache[E][K]=G;var J={path:pageData.cookie_path,domain:pageData.cookie_domain};if(I){J.expires=365}C.cookie(pageData.cookie_prefix+E,vBulletin.cookie.convertBbarrayCookie(JSON.stringify(vBulletin.cookie.bbarraycookiecache[E]),"set"),J)};vBulletin.cookie.unsetBbarrayCookie=function(E,I){if(typeof vBulletin.cookie.bbarraycookiecache=="undefined"){vBulletin.cookie.bbarraycookiecache={}}var F=C.cookie(pageData.cookie_prefix+E);if(F!=""&&!vBulletin.cookie.bbarraycookiecache[E]){try{vBulletin.cookie.bbarraycookiecache[E]=C.parseJSON(vBulletin.cookie.convertBbarrayCookie(F))}catch(G){vBulletin.cookie.bbarraycookiecache[E]=null}}if(!vBulletin.cookie.bbarraycookiecache[E]||!vBulletin.cookie.bbarraycookiecache[E][I]){return }delete vBulletin.cookie.bbarraycookiecache[E][I];var H={path:pageData.cookie_path,domain:pageData.cookie_domain};C.cookie(pageData.cookie_prefix+E,vBulletin.cookie.convertBbarrayCookie(JSON.stringify(vBulletin.cookie.bbarraycookiecache[E]),"set"),H)};(function A(){(function(){var F="b_menu__dropdown--active",I=".js-menu__username-iconcontainer",H=".js-menu__dropdown-submenu",E=function(J){C(H,J).slideUp("fast");C(I,J).addClass("expand").removeClass("collapse");J.removeClass(F)},G=function(K){var J=C(".js-menu__login-iframe");J.closest("ul").show();J.trigger("load");J.closest("ul").hide();$subList=C("> ul",K);C(I,K).addClass("collapse").removeClass("expand");K.addClass(F);C(H,K).css("top",K.outerHeight()).slideDown("fast")};C("#main-navbar .secondary-nav").removeClass("h-disabled");C(".js-menu__login-iframe").on("load",function(N){try{var M=C(this),L=M.contents().find("html")[0],J=L.scrollHeight;if(J>0){M.height(J);M.parent().height(J)}}catch(K){}});C("#main-navbar .js-menu__dropdown").on("click",function(L){var M=C(this),K=C("> ul",M);if(M.hasClass("h-disabled")||M.closest(".secondary-nav").hasClass("h-disabled")){return false}if(M.hasClass(F)){L.stopPropagation();try{L.target.parentNode.click()}catch(J){}E(M);return true}G(M);return false});C("body").on("click",function(J){if(C(J.target).closest(".js-menu__dropdown").size()==0){E(C(".js-menu__dropdown"))}})})();C(".ui-tabs .ui-tabs-nav > li").addClass("ui-state-disabled");C(".announcement-tabs .ui-tabs-nav > li").removeClass("ui-state-disabled")})();window.vBulletin.getAjaxBaseurl=function(){if(pageData.baseurl.indexOf("http://")==0){return pageData.baseurl.substring(5)}else{if(pageData.baseurl.indexOf("https://")==0){return pageData.baseurl.substring(6)}else{return pageData.baseurl}}};window.vBulletin.normalizeAjaxUrl=function(E){if(E.indexOf("http://")==0){return E.substring(5)}else{if(E.indexOf("https://")==0){return E.substring(6)}else{return E}}};window.vBulletin.runBeforeCallback=function(G,F){if(C.isArray(G)){G.unshift(F)}else{var E=G;G=function(){F.apply(this,arguments);if(typeof E=="function"){E.apply(this,arguments)}}}return G};window.vBulletin.pageHasSelectors=function(E){if(C.isArray(E)&&E.length>0&&C.trim(E.toString())!=""){var F=false;C.each(E,function(G,H){if(C(H).length>0){F=true;return false}});return F}return true};window.vBulletin.areJsonObjectsEqual=function(G,E){var F=function(J,I){for(var H in J){if(J.hasOwnProperty(H)&&I.hasOwnProperty(H)){var L=J[H],K=I[H];if(L!=K){if(L instanceof Array&&K instanceof Array){if(C(L).not(K).length>0||C(K).not(L).length>0){return false}else{continue}}else{return false}switch(L.constructor){case Object:if(!window.vBulletin.areJsonObjectsEqual(L,K)){return false}break;case Function:if(L.toString()!=K.toString()){return false}break;default:return false}}}else{return false}}return true};return(Object.keys(G).length==Object.keys(E).length)?F(G,E):false};window.vBulletin.ajaxSetup=(function(){var E=false;return{init:function(){if(E){return }E=true;C.ajaxSetup({contentType:"application/x-www-form-urlencoded; charset=UTF-8"})}}})();window.vBulletin.ajaxSetup.init();window.vBulletin.ajaxProfile=(function(){var G=[],H=false,F=true,E=false;return{init:function(){if(H){return }H=true;C(function(){if(C("#debug-information").length==0){F=false}C("<ol />").attr("id","debug-ajax-request-list").hide().css({height:"150px",overflow:"auto",padding:"4px",border:"1px solid #CCC",background:"#EEE","margin-top":"2px","margin-bottom":"4px"}).appendTo(C("#debug-information #debug-ajax-request-count").closest("li"));C("#debug-information #debug-ajax-request-count").css("cursor","pointer").on("click",function(){C("#debug-ajax-request-list").toggle()});E=true});function I(){if(E){C("#debug-information #debug-ajax-request-count").text(G.length);C.each(G,function(){if(!this.displayed){this.displayed=true;this.relUrl=this.url.indexOf(pageData.baseurl)==0?this.url.substring(pageData.baseurl.length):this.url;C("<li />").addClass("js-request-counter-"+this.requestCounter).text(this.relUrl).appendTo(C("#debug-ajax-request-list"))}var J=this.totalTimeTaken-this.networkTimeTaken;var K='{0} <span style="font-size:x-small;">({1}, <span title="Request Time: {2}ms, Processing Time: {3}ms, Total Time: {4}ms" style="text-decoration:underline;">{2}ms, {3}ms</span>){5}</span>'.format(this.relUrl,this.status,this.networkTimeTaken,J,this.totalTimeTaken,(this.errorThrown?" Error: "+this.errorThrown:""));C("#debug-ajax-request-list .js-request-counter-"+this.requestCounter).html(K)})}}C.ajaxPrefilter(function(J,M,K){if(!F){return }var L=G.length;console.log("vBulletin AJAX profile: Before request #"+L);G.push({displayed:false,url:J.url,relUrl:"",startTimeStamp:(new Date()).getTime(),endTimeStamp:0,finalTimeStamp:0,textStatus:"UNKNOWN",errorThrown:"",requestCounter:L,networkTimeTaken:0,totalTimeTaken:0});J.success=vBulletin.runBeforeCallback(J.success,function(O,P,N){G[L].endTimeStamp=(new Date()).getTime()});J.error=vBulletin.runBeforeCallback(J.error,function(N,P,O){G[L].endTimeStamp=(new Date()).getTime();G[L].errorThrown=O});J.complete=vBulletin.runBeforeCallback(J.complete,function(N,O){G[L].finalTimeStamp=(new Date()).getTime();G[L].status=O;G[L].networkTimeTaken=G[L].endTimeStamp-G[L].startTimeStamp;G[L].totalTimeTaken=G[L].finalTimeStamp-G[L].startTimeStamp;I()})})}}})();window.vBulletin.ajaxProfile.init();window.vBulletin.loadingIndicator=(function(){var J=0,I=false,H=false,F=0,E=0;function G(L){if(L){var N=C(".js-loading-indicator"),M=N.outerWidth(),K=C(window).outerWidth();if(K>0&&M>0){N.css("left",((K-M)/2))}N.show();C("body").css("cursor","wait")}else{C(".js-loading-indicator").hide();C("body").css("cursor","auto")}}return{init:function(){if(I){return }C(".js-loading-indicator").ajaxStart(function(){window.vBulletin.loadingIndicator.show("ajaxStart")});C(".js-loading-indicator").ajaxStop(function(){window.vBulletin.loadingIndicator.hide("ajaxStop")});I=true},show:function(K){if(F>0&&K=="ajaxStart"){--F;++E;console.log("vBulletin.loadingIndicator.show ajax indicator suppressed");return }++J;console.log("vBulletin.loadingIndicator.show Counter: "+J+" Source: "+(K||"Unspecified"));if(J>0){H=window.setTimeout(function(){if(H){G(true);H=false}},1000)}},hide:function(K){if(E>0&&K=="ajaxStop"){--E;console.log("vBulletin.loadingIndicator.hide ajax indicator suppressed");return }--J;J=J<0?0:J;if(!K){J=0}console.log("vBulletin.loadingIndicator.hide Counter: "+J+" Source: "+(K||"Unspecified"));if(J<1){if(H){window.clearTimeout(H);H=false}G(false)}},suppressNextAjaxIndicator:function(){++F}}})();window.vBulletin.phrase=window.vBulletin.phrase||{};window.vBulletin.phrase.precache=window.vBulletin.phrase.precache||[];window.vBulletin.phrase.cache=window.vBulletin.phrase.cache||{};window.vBulletin.phrase.uncachable=window.vBulletin.phrase.uncachable||[];window.vBulletin.phrase.render=function(E){var G=E[0];for(var F=1;F<E.length;++F){G=G.replace(new RegExp("%"+F+"\\$s","gm"),E[F])}return G};window.vBulletin.phrase.remoteGet=function(F,H){H.push(F);var G=[];var E=F;C.each(H,function(J,I){if(C.inArray(I,G)===-1&&I!=""){G.push(I)}});if(G.length>0){vBulletin.loadingIndicator.suppressNextAjaxIndicator();C.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/api/phrase/fetch",async:false,data:({phrases:G}),type:"POST",dataType:"json",success:function(I){if(I){if(typeof (I[F])!="undefined"){E=I[F]}window.vBulletin.cache.setBucket("phrases"+pageData.languageid);C.each(I,function(K,J){window.vBulletin.cache.set(K,J)});H.length=0}else{console.warn("Unexpected result when fetching phrases")}},error:function(K,J,I){console.warn("Error when fetching phrases: {0}".format(I))}})}return E};window.vBulletin=window.vBulletin||{};window.vBulletin.phrase=window.vBulletin.phrase||{};window.vBulletin.phrase.precache=window.vBulletin.phrase.precache||[];window.vBulletin.phrase.precache=C.merge(window.vBulletin.phrase.precache,["admin","admin_auth","all_changes_made_will_be_lost_would_you_like_to_continue","april","attach_link","attach_video","august","cancel","cancel_edit","close","compare_versions","conversation","december","done","edit_conversation","email_addresses_must_match","error","error_fetching_online_users_x","error_loading_ckeditor_script","error_loading_editor","error_loading_post","error_posting_comment_code_x","error_saving_vote","error_x","existing_reply_will_be_deleted","february","flag_a_post","follow","follow_error","following","following_pending","following_remove","friday_min","go_to_first_new_post","hour","inlinemod_auth_login_failed","inlinemod_auth_login_first","inlinemod_auth_password_empty","invalid_data","invalid_data_requested","invalid_email_address","invalid_request","invalid_server_response_please_try_again","invalid_special_channel_subscribe_request","invalid_user_permissions","invalid_username_specified","invalid_username_specified_maxlength_x","invalid_username_specified_minlength_x","invalid_query_definition_x","january","join","joined","join_error","july","june","leave","loading","logged_out_while_editing_post","login","login_success_admin_auth","march","may","minute","moderator","monday_min","new_posts","no","no_create_permissions","no_icon","no_leave_channel_permission","no_one_voted","no_permission","no_update_permissions","no_valid_tags_found","not_logged_no_permission","november","now","october","onbeforeunload_message_while_editing_post","password_must_be_at_least_four_chars","passwords_must_match","people_who_liked","physically_remove_blog","physically_remove_comment","physically_remove_media","physically_remove_reply","physically_remove_topic","physically_remove_visitorMessage","please_enter_a_username","please_enter_a_valid_url_and_click_attach","please_enter_link_url","please_enter_video_url","please_enter_your_comment","please_enter_your_email_address","please_enter_your_reason_why_you_want_to_flag_this_post","please_provide_search_string","please_select_a_day","please_select_a_month","please_select_a_year","post_comment","post_history","posttype_blog","posttype_comment","posttype_media","posttype_reply","posttype_topic","posttype_visitorMessage","preview","saturday_min","search","see_less","see_more","select_option_and_click_delete_button_blog","select_option_and_click_delete_button_comment","select_option_and_click_delete_button_media","select_option_and_click_delete_button_reply","select_option_and_click_delete_button_topic","select_option_and_click_delete_button_visitorMessage","send_report","september","share_post_link_help","soft_delete_blog","soft_delete_comment","soft_delete_media","soft_delete_notes_blog","soft_delete_notes_comment","soft_delete_notes_media","soft_delete_notes_reply","soft_delete_notes_topic","soft_delete_notes_visitorMessage","soft_delete_reply","soft_delete_topic","soft_delete_visitorMessage","sunday_min","thanks_for_signing_up_log_in","the_report_has_been_sent","time","tuesday_min","thursday_min","unable_to_check_admin_permissions","unexpected_error","unfollow_error","unsubscribe","unsubscribe_overlay_error","unvote_cap","user_name_x_already_in_use_choose_different_name","vote_a_post","vote_cap","wednesday_min","xs_avatar","yes","you_have_a_pending_edit_unsaved"]);window.vBulletin.cache.initBucket("phrases"+pageData.languageid,pageData.phrasedate,window.vBulletin.phrase.precache,window.vBulletin.phrase.remoteGet);window.vBulletin.phrase.get=function(){if(arguments.length<1){console.log("vBulletin.phrase.get() called with no parameters");return""}if(typeof arguments[0]=="object"){arguments=arguments[0]}window.vBulletin.cache.setBucket("phrases"+pageData.languageid);var E=window.vBulletin.cache.get(arguments[0]);arguments[0]=E;return window.vBulletin.phrase.render(arguments)};window.vBulletin.getScrollbarWidth=function(){if(C("body").data("scrollbar-width")){return C("body").data("scrollbar-width")}var E=C('<div style="width:50px;height:50px;overflow:auto;position:absolute;top:-99999px;"><div /></div>').appendTo("body"),G=E.children(),F=G.innerWidth()-G.height(99).innerWidth();E.remove();C("body").data("scrollbar-width",F);return F};window.vBulletin.options=window.vBulletin.options||{};window.vBulletin.options.precache=window.vBulletin.options.precache||[];window.vBulletin.options.remoteGet=function(F,H){var G=[F];C.each(H,function(J,I){if(C.inArray(I,G)===-1){G.push(I)}});var E=null;C.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/api/options/fetchValues",async:false,data:({options:G}),type:"POST",dataType:"json",success:function(I){if(I){vBulletin.cache.setBucket("options");C.each(I,function(J,K){if(J==F){E=K}vBulletin.cache.set(J,K)});H.length=0}else{console.warn("Unexpected result when fetching options")}},error:function(K,J,I){console.warn("Error when fetching options: {0}".format(I))}});return E};window.vBulletin=window.vBulletin||{};window.vBulletin.options=window.vBulletin.options||{};window.vBulletin.options.precache=window.vBulletin.options.precache||[];window.vBulletin.options.precache=C.merge(window.vBulletin.options.precache,["crontab","bbtitle","markinglimit","threadpreview"]);vBulletin.cache.initBucket("options",window.pageData.optionsdate,window.vBulletin.options.precache,window.vBulletin.options.remoteGet);window.vBulletin.options.get=function(E){window.vBulletin.cache.setBucket("options");return window.vBulletin.cache.get(E)};window.vBulletin.openAuthDialog=function(I,H,E,F){H=H||"inlinemod_auth";E=E||function(){};var G=openConfirmDialog({title:vBulletin.phrase.get(H),message:vBulletin.phrase.get("loading")+"...",width:500,dialogClass:"inlinemod-auth-dialog loading",buttonLabel:{yesLabel:vBulletin.phrase.get("login"),noLabel:vBulletin.phrase.get("cancel")},primaryButton:"yes",onClickYesWithAjax:true,onClickYes:function(){var K=G.find(".inlinemod-auth-form"),L=C(".js-inlineauth_password").val(),M=C(".js-inlineauth_username").val(),J=C(".error-msg-box");J.text("").addClass("h-hide");C.ajax({url:vBulletin.normalizeAjaxUrl(K.attr("action")),data:{password:L,username:M},type:"POST",dataType:"json",success:function(N){if(N.error){J.text(vBulletin.phrase.get(N.error)).removeClass("h-hide")}else{G.dialog("close");G.dialog("close");if(typeof (F)=="function"){F()}return I()}},error:function(P,O,N){console.log("/auth/inlinemodLogin failed, error: "+N);openAlertDialog({title:vBulletin.phrase.get(H),message:P.status,iconType:"error"})}})},onClickNo:E});C.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/render/inlinemod_auth",type:"POST",dataType:"json",success:function(J){console.log("/ajax/render/inlinemod_auth");if(J&&!J.errors){C(".inlinemod-auth-dialog").removeClass("loading");C(".dialog-content .message",G).html(J);G.dialog("option","position","center");C('[name="password"]',G).on("keydown",function(K){if(K.which==13){K.preventDefault();C("#btnConfirmDialogYes",G).click()}});C("input",G).first().focus()}else{console.log("/ajax/render/inlinemod_auth successful, but response was not valid");openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("invalid_server_response_please_try_again"),iconType:"error",onAfterClose:function(){G.dialog("close")}})}},error:function(L,K,J){console.log("/ajax/render/inlinemod_auth failed, error: "+J);openAlertDialog({title:vBulletin.phrase.get(H),message:vBulletin.phrase.get("error_loading_delete_form_x",L.status),iconType:"error",onAfterClose:function(){G.dialog("close")}})}})};window.vBulletin.assertUserHasAdminPermission=function(I,H,E,F){if(C(H).data("in-progress")){return false}C("body").css("cursor","wait");var G=arguments.callee.caller;C(H).data("in-progress",true);C.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/api/user/currentUserHasAdminPermission",data:({adminPermission:I}),type:"POST",dataType:"json",complete:function(){C("body").css("cursor","auto");C(H).data("in-progress",null)},success:function(J){console.log("ajax/api/user/currentUserHasAdminPermission result:"+JSON.stringify(J));if(J===true){E()}else{if(J&&J.errors&&J.errors.length>0){if(J.errors[0]=="auth_required"){window.vBulletin.openAuthDialog(function(){G.apply(H)},"admin_auth",function(){},F);return }openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("nopermission_loggedout"),iconType:"error",onAfterClose:function(){C("#config-dialog").dialog("close");window.location.reload()}});C("#config-dialog .loader").hide()}else{openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("unable_to_check_admin_permissions"),iconType:"error",onAfterClose:function(){C("#config-dialog").dialog("close");window.location.reload()}});C("#config-dialog .loader").hide()}}},error:function(L,K,J){console.log("ajax/api/user/currentUserHasAdminPermission error: "+J);openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("unable_to_check_admin_permissions"),iconType:"error",onAfterClose:function(){C("#config-dialog").dialog("close");window.location.reload()}});C("#config-dialog .loader").hide()}})};vBulletin.selectTabByIndex=function(E){var F=this instanceof C?this:C(this);if(F.length&&E>-1&&F.hasClass("ui-tabs")){F.data("noPushState",true).tabs("select",E).data("noPushState",null).find(".ui-tabs-nav li").removeClass("ui-state-focus").eq(E).addClass("ui-state-focus").find("a").focus()}};vBulletin.tabify=function(F){var G=this instanceof C?this:C(this);if(G.length){var E={tabOptions:{},tabHistory:null,allowHistory:false,tabParamAsQueryString:true,hash:"",getTabIndexByHash:function(){return -1}};F=C.extend({},E,F);if(F.tabHistory instanceof vBulletin.history.instance&&F.tabHistory.isEnabled()){G.on("tabscreate",function(K,M){var H=vBulletin.parseQueryString(location.search,["_"]),N=Object.keys(H).length,J=vBulletin.getSelectedTabHashOrPath(G,F.tabParamAsQueryString),L=F.tabHistory.getState();if(((F.tabParamAsQueryString&&N>1&&typeof H.tab!="undefined")||(!F.tabParamAsQueryString&&N>0))&&(!L||C.isEmptyObject(L.data))){var I={from:"tabs",tab:J};F.tabHistory.setDefaultState(I,document.title,location.href)}F.tabHistory.setStateChange(function(T){var S=F.tabHistory.getState();if(S.data.from=="tabs"){F.tabHistory.log(S.data,S.title,S.url);var Q=F.getTabIndexByHash(S.data.tab),O=vBulletin.parseQueryString(S.url,["tab","_"]);if(G.tabs("option","selected")!=Q){vBulletin.selectTabByIndex.call(G,Q);if(!C.isEmptyObject(O)){C(window).trigger("statechange.filter",["tabs",O])}}else{if(!C.isEmptyObject(O)){C(window).trigger("statechange.filter",["tabs",O])}else{var P,R,U;if(S.data.tab){R=F.tabParamAsQueryString?C(S.data.tab):C('.ui-tabs .ui-tabs-panel[data-url-path="'+S.data.tab+'"]')}P=(R&&R.length&&R)||C(G.closest(".canvas-widget").data("widget-default-tab"));U=C(".toolbar-filter-overlay .filter-options .js-default-checked",P);if(U.length){U.prop("checked",true).first().data("bypass-filter-display",true).trigger("change",[true]).data("bypass-filter-display",null);C(".filtered-by",P).addClass("h-hide").find(".filter-text-wrapper").empty()}else{C(".conversation-toolbar .js-default-checked",P).first().trigger("click",[true])}}}}},"tabs");if(typeof F.tabOptions.create=="function"){F.tabOptions.create.call(G[0],K,M)}})}if(F.allowHistory&&F.tabHistory instanceof vBulletin.history.instance){G.on("tabsselect",function(L,M){if(typeof F.tabOptions.select=="function"&&F.tabOptions.select.call(this,L,M)===false){return false}var I,J=F.tabParamAsQueryString?M.tab.hash:C(M.tab).data("url-path"),K=F.tabParamAsQueryString?undefined:G.find(".ui-tabs-nav > li > a").map(function(){return C(this).data("url-path")}).get();if(!F.tabHistory.isEnabled()){I=vBulletin.makeFilterUrlFromSelectedFilters(M.panel,J.replace("#",""),F.tabParamAsQueryString,K,F.hash);location.href=I;return false}if(!G.data("noPushState")){var H={from:"tabs",tab:J};I=vBulletin.makeFilterUrlFromSelectedFilters(M.panel,J.replace("#",""),F.tabParamAsQueryString,K);F.tabHistory.pushState(H,document.title,I)}else{G.data("noPushState",null)}})}G.tabs(F.tabOptions)}return G};vBulletin.getSelectedTabHashOrPath=function(F,G){var E;if(G){E=F.find(".ui-tabs-nav > .ui-tabs-selected > a").prop("hash")}else{E=F.find(".ui-tabs-nav > .ui-tabs-selected > a").data("url-path")}return E||""};vBulletin.parseUrl=function(F){var E=document.createElement("a"),G;E.href=F||"/";G=E.pathname;if(G.indexOf("/")!=0){G="/"+G}return{protocol:E.protocol,hostname:E.hostname,port:E.port,pathname:G,search:E.search,hash:E.hash}};vBulletin.makeHistoryUrl=function(J,E,H,F,I){var G=vBulletin.makePaginatedUrl(J,E);G=vBulletin.makeTabUrl(G,H.tab,H.tabParamAsQueryString);G=vBulletin.makeFilterUrl(G,F.filterName,F.filterValue,F.context,I);return G};vBulletin.makeTabUrl=function(F,H,L,J,I){if(F){var K=vBulletin.parseUrl(F),M;if(L){I=I||"tab";M=new RegExp("([?+|&+])"+I+"=\\w+[-\\w]*","i");if(K.search.match(M)){F=K.pathname+K.search.replace(M,"$1{0}={1}".format(I,H))}else{if(K.search){F="{0}{1}&{2}={3}".format(K.pathname,K.search,I,H)}else{F="{0}?{1}={2}".format(K.pathname,I,H)}}}else{var G=K.pathname.replace(/\/$/,""),E=G.split("/");M="\\/"+E[E.length-(G.match(/\/page([0-9]+)/)?2:1)]+"$";F=K.pathname.replace(new RegExp(M),"/"+H)+K.search}}else{F="/"}if(J){F+="#"+J}return F};vBulletin.makePaginatedUrl=function(G,F){if(G){var E=G.match(/\/page[0-9]+/);if(E){if(F>1){G=G.replace(E[0],"/page"+F)}else{G=G.replace(E[0],"")}}else{if(F>1){if(G.match(/\?/)){G=G.replace(/\?/,"/page"+F+"?")}else{if(G.match(/\#/)){G=G.replace(/\#.*/,"/page"+F)}else{G+="/page"+F}}}}}return G};vBulletin.makeFilterUrl=function(E,J,N,F,I,G){G=G||false;E=E||location.href;var O=C(".filtered-by",F),L=vBulletin.parseUrl(E),P=L.search;var K=C(".js-button-filter.js-default-checked.js-checked",F);if(K.data("filter-name")==J&&K.data("filter-value")==N){G=true}if(!G&&((O.data("clicked")&&C('.toolbar-filter-overlay input[name="{0}"][value="{1}"]'.format(J,N),F).hasClass("js-default-checked"))||(C('.toolbar-search-form input[name="{0}"]'.format(J),F).length&&!N))){G=true;O.data("clicked",null)}E=L.pathname;if(P&&P.length>1){if(P.match(new RegExp(J+"=","i"))){var H=vBulletin.parseQueryString(P);if(!C.isEmptyObject(H)){var M="";C.each(H,function(Q,R){if(!G||Q!=J){M+="{0}={1}&".format(Q,(Q==J?N:R))}});if(M){E+="?"+M.substring(0,M.length-1)}}}else{if(!G){E+=P+"&{0}={1}".format(J,encodeURIComponent(N))}else{E+=P}}}else{if(!G){E+="?{0}={1}".format(J,encodeURIComponent(N))}}if(I){E+="#"+I}return E};vBulletin.getSelectedFilters=function(E,F){var G={};if(!F){var H=E.serializeArray();C.each(H,function(K,L){if(L.name!="securitytoken"){if(L.name.slice(-2)=="[]"){var J=L.name.split("[]");G[J[0]]=G[J[0]]||[];G[J[0]].push(L.value)}else{G[L.name]=L.value}}})}else{var I=E.parent().find(".filtered-by .filter-text").filter(":visible");E.find(":input:radio:checked").each(function(K,M){var L=C(M);if((L.hasClass("js-default-checked")||L.data("bypass-filter-display")==1)&&(I.length==0||I.filter('[data-filter-name={0}][data-filter-value="{1}"]').length==0)){return true}if(M.name.slice(-2)=="[]"){var J=M.name.split("[]");G[J[0]]=G[J[0]]||[];G[J[0]].push(M.value)}else{G[M.name]=M.value}})}return G};vBulletin.makeFilterUrlFromSelectedFilters=function(I,J,S,O,L){var Q,H=location.pathname.replace(/\/$/,"").replace(/\/page[0-9]+/,""),G=C(".toolbar-filter-overlay",I),N=vBulletin.getSelectedFilters(G,true),P=C(".pagenav-form .js-pagenum",I).val()||1,K=C(".toolbar-search-form .js-filter-search",I).val()||"",U=C(I).closest(".canvas-widget"),R=C(".conversation-toolbar-wrapper",I).length?(C(".conversation-toolbar-wrapper",I).data("allow-history")=="1"):(C(I).data("allow-history")=="1"),F=new vBulletin.history.instance(R),E=U.data("widget-default-tab")||U.find(".ui-tabs-nav > li:first-child a").attr("href");if(C.isEmptyObject(N)){C(".conversation-toolbar .js-button-filters",I).each(function(){var V=C(".js-button-filter.js-checked:not(.js-default-checked)",this);if(V.length){N[V.data("filter-name")]=V.data("filter-name")}})}if(!S){var T=new RegExp("\\/("+O.join("|")+")/?$"),M=H.match(T);if(M){H=H.replace(new RegExp(M[0]),"/"+J)}else{H+="/"+J}}if(P>1&&F.isEnabled()){H+="/page"+P}if(S&&J&&E!=("#"+J)){N.tab=J;if(!F.isEnabled()){H+="?tab="+J}}if(!F.isEnabled()){return H+(L?"#"+L:"")}if(K){N.q=K}Q=C.param(N);return H+(Q?"?"+Q:"")+(L?"#"+L:"")};vBulletin.parseQueryString=function(H,F){var E={},I;if(H&&H.length>1){I=H.indexOf("?");F=(F instanceof Array)?F:[];if(I!=-1){var G=H.substring(I+1).split("&");C.each(G,function(J,L){var K=L.split("=");if(F.length==0||(C.inArray(K[0],F)==-1)){E[K[0]]=decodeURIComponent((K[1]||"")).replace(/\+/g," ")}})}}return E};vBulletin.pagination=function(K){var S={context:document,onPageChanged:null,tabParamAsQueryString:true,allowHistory:false};if(K&&typeof K=="object"){C.extend(S,K)}var G,H=C(".pagenav-controls .pagenav-form",S.context),R=Number(C(".defaultpage",H).val())||Number(C(".js-pagenum",H).val())||1,M=new vBulletin.history.instance(S.allowHistory);H.data("object-instance",this);if(M.isEnabled()){var N=vBulletin.parseQueryString(location.search,["_"]),I=location.pathname.match(/\/page([0-9]+)/),F=M.getState();if(I&&Number(I[1])>1&&C.isEmptyObject(N)&&(!F||C.isEmptyObject(F.data))){G=vBulletin.makePaginatedUrl(location.href,R);var O={from:"pagination",page:R,tab:S.tabParamAsQueryString?"#"+H.closest(".ui-tabs-panel").attr("id"):vBulletin.getSelectedTabHashOrPath(H.closest(".ui-tabs"),false)};M.setDefaultState(O,document.title,G)}M.setStateChange(function(a){var T=M.getState();if(T.data.from=="pagination"){M.log(T.data,T.title,T.url);if(location.search){var c=vBulletin.parseQueryString(location.search,["_"]);if(!C.isEmptyObject(c)||c.tab=="groups-tab"){delete c.tab;C(window).trigger("statechange.filter",["pagination",c]);return }}var X,V,d,b,Z;if(T.data.tab){X=S.tabParamAsQueryString?C(T.data.tab):C('.ui-tabs .ui-tabs-panel[data-url-path="'+T.data.tab+'"]')}V=(X&&X.length&&X)||S.context;d=C(".conversation-toolbar .filter-wrapper",V).data("object-instance");if(d){d.resetFilters(true)}if(T.data.tab){b=X.closest(".ui-tabs");$tabAnchor=S.tabParamAsQueryString?b.find('.ui-tabs-nav > li > a[href*="{0}"]'.format(T.data.tab)):b.find('.ui-tabs-nav > li > a[data-url-path="'+T.data.tab+'"]');if(!$tabAnchor.parent().hasClass("ui-tabs-selected")){var Y=$tabAnchor.parent().index();vBulletin.selectTabByIndex.call(b,Y);return }}var f=C(".pagenav-controls .pagenav-form",V);var W=f.data("object-instance");if(W&&typeof W.getOption=="function"&&typeof W.getOption("onPageChanged")=="function"){var U=T.data.page||R;W.getOption("onPageChanged").apply(f.get(0),[U,false,!location.search,location.search])}}},"pagination")}function E(){return parseInt((C(".pagetotal",this).html()||"").replace(/[^\d]+/g,""),10)||1}function L(U,Y){var X=E.apply(this),T=C(".arrow[rel=next]",this),W=C(".arrow[rel=prev]",this);if(U<1){U=1}else{if(U>X){U=X}}C(".js-pagenum",this).val(U);if(U==X){T.addClass("h-disabled").removeAttr("href")}else{T.removeClass("h-disabled").attr("href",vBulletin.makePaginatedUrl(location.href,U+1))}if(U==1){W.addClass("h-disabled").removeAttr("href")}else{W.removeClass("h-disabled").attr("href",vBulletin.makePaginatedUrl(location.href,U-1))}if(typeof S.onPageChanged=="function"){S.onPageChanged.apply(this,[U,Y])}if(X>1&&M.isEnabled()&&!Y){var Z=M.getState();if(!Z||!Z.data||!Z.data.from||C.inArray(Z.data.from,["filter_blogs","filter_groups"]==-1)){if(U==1){G=C(".arrow[rel=next]",this).attr("href")}else{G=C(".arrow[rel=prev]",this).attr("href")}if(G){G=vBulletin.makePaginatedUrl(G,U);var V={from:"pagination",page:U,tab:S.tabParamAsQueryString?"#"+C(this).closest(".ui-tabs-panel").attr("id"):vBulletin.getSelectedTabHashOrPath(C(this).closest(".ui-tabs"),false)};M.pushState(V,document.title,G)}}}}function Q(T){var U=parseInt(T);if(U&&typeof U==="number"){C("input[name=result-id]",H).val(U)}}function J(T){C("a.see-all-btn",this).closest(".pagenav-controls")[T?"addClass":"removeClass"]("h-hide")}C(".arrow",H).off("click").on("click",function(V){var U=C(this),W=this.form||U.closest("form").get(0);if(!U.hasClass("h-disabled")){var T=parseInt(C(".js-pagenum",W).val())+((U.attr("rel")=="next")?1:-1);if(!M.isEnabled()&&S.allowHistory){if(!this.href||this.hash==this.href){this.href=vBulletin.makePaginatedUrl(location.href,T)}return true}L.apply(W,[T,false])}return false});function P(){C(S.context).off("click",".pagenav .button").on("click",".pagenav .button",function(V){if(M.isEnabled()){var W=C(this),T=W.data("page"),U=C(".pagenav-form",S.context).get(0);L.apply(U,[T,false]);return false}return true}).on("mouseover",".pagenav .button",function(U){var T=C(this);if(!T.prop("href")){T.prop("href",vBulletin.makePaginatedUrl(location.href,parseInt(T.data("page"),10)))}});C(".pagenav .button",S.context).each(function(){this.href=vBulletin.makePaginatedUrl(location.href,parseInt(C(this).data("page")))})}P();C(".js-pagenum",H).off("keypress").on("keypress",function(V){if(V.keyCode==13){V.preventDefault();var T=parseInt(C(this).val(),10);var U=E.apply(this.form);if(T>U){T=U}if(T<1){T=1}if(M.isEnabled()){L.apply(this.form,[T,false])}else{if(S.allowHistory){location.href=vBulletin.makePaginatedUrl(location.href,T)}else{L.apply(this.form,[T,false])}}}});C(".js-pagenum",H).off("click").on("click",function(T){C(this).select()});this.updatePageInfo=function(U,T){if(U&&typeof U=="object"){var V=U.totalpages||1,W=C(".pagenav-controls .pagenav-form",S.context);C(".pagetotal",W).text(V);if(typeof U.showseemore!="undefined"){if(U.showseemore){J.apply(W,[false])}else{J.apply(W,[true])}}U.perpage=vBulletin.conversation.POSTS_PER_PAGE;if(T&&C(".pagenav-container",S.context).length>0){C.post(pageData.baseurl+"/ajax/render/pagenav",{pagenav:U},function(X){if(X){C(".pagenav-container",S.context).replaceWith(X.template);P()}},"json")}L.apply(W.get(0),[U.pagenumber,T])}};this.updateResultId=function(T){Q(T)};this.setOption=function(T,U){S[T]=U};this.getOption=function(T){return S[T]};this.updatePageNavigation=function(U,T,V){L.apply(U.get(0),[T,V])}};vBulletin.conversation=vBulletin.conversation||{};vBulletin.conversation.toggleCommentBox=function(){var E=C(this).closest(".js-comment-entry__parent").find(".js-comment-entry");E.slideToggle("fast",function(){var F=C(this).find(".js-comment-entry__textbox");if(F.is(":visible")){F.focus()}});E.find(".js-comment-entry__cancel").off("click").on("click",function(F){E.slideToggle();return false});return false};vBulletin.conversation.postComment=function(L,I){var G=this;var F=C(G).closest(".js-comment-entry").find(".js-comment-entry__textbox");var K=C.trim(F.val());console.log(K);if(!K||(F.hasClass("placeholder")&&K==F.attr("placeholder"))){openAlertDialog({title:vBulletin.phrase.get("post_comment"),message:vBulletin.phrase.get("please_enter_your_comment"),iconType:"warning",onAfterClose:function(){F.focus()}});return false}C("body").css("cursor","wait");C(G).blur();var E=C(G).closest(".js-comment-entry__parent"),J=C(G).closest(".js-comment-entry--blog").length==1?1:0,H=C(G).closest(".js-comment-entry--article").length==1?1:0;C.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/post-comment",data:({text:K,parentid:E.attr("data-node-id"),postindex:E.find(".js-post__content .b-post__count").text().replace("#",""),view:E.parent().hasClass("stream-view")?"stream":"thread",redirecturl:F.hasClass(".reload-on-post")?1:0,isblogcomment:J,isarticlecomment:H,humanverify:{input:C(G).closest(".js-comment-entry").find('[name="humanverify[input]"]').val(),hash:C(G).closest(".js-comment-entry").find('[name="humanverify[hash]"]').val()},recaptcha_challenge_field:C(G).closest(".js-comment-entry").find('[name="recaptcha_challenge_field"]').val(),recaptcha_response_field:C(G).closest(".js-comment-entry").find('[name="recaptcha_response_field"]').val()}),type:"POST",dataType:"json",complete:function(N,M){console.log("post-comment complete.");C("body").css("cursor","auto");vBulletin.hv.reset()},success:function(M,O,P){console.log("post-comment successful! result:"+JSON.stringify(M));if(M){if(!M.error){if(typeof I=="function"){I.apply(G,[M])}if(!J&&!H){C(G).closest(".js-comment-entry").slideToggle()}vBulletin.subscribe.updateSubscribeButton(M.topic_subscribed);var N=E.attr("data-node-id");if(pageData.threadmarking=="0"||pageData.userid=="0"){vBulletin.cookie.setBbarrayCookie("discussion_view",N,Math.round(new Date().getTime()/1000))}else{C.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/api/node/markRead",data:{nodeid:N},type:"POST",dataType:"json",complete:function(){},success:function(Q){if(Q&&!Q.error){console.log("Topic "+N+" is marked read successfully!")}else{console.log("Topic "+N+" is marked read failed: "+Q.error)}},error:function(S,R,Q){console.log("Topic "+N+" is marked read failed:"+Q)}})}}else{openAlertDialog({title:vBulletin.phrase.get("conversation"),message:vBulletin.phrase.get("error_x",M.error),iconType:"warning"})}}else{openAlertDialog({title:vBulletin.phrase.get("conversation"),message:vBulletin.phrase.get("invalid_server_response_please_try_again"),iconType:"error"})}},error:function(O,N,M){console.log("post-comment failed! error:"+M);openAlertDialog({title:vBulletin.phrase.get("conversation"),message:vBulletin.phrase.get("error_posting_comment_code_x",O.status),iconType:"error"})}})};vBulletin.conversation.showIp=function(F){var H=C(this),G=C(this).data("post-ip"),E=C(this).data("post-host");openAlertDialog({title:vBulletin.phrase.get("ip_info"),message:vBulletin.phrase.get("ip_address_is")+": "+G+"<br />"+vBulletin.phrase.get("host_name_is")+': <span class="ip-host-name loading">...</span>',iconType:"none"});vBulletin.AJAX({url:vBulletin.getAjaxBaseurl()+"/ajax/api/node/getHostName",data:{ip:G},success:function(I,J,K){C(".ip-host-name").removeClass("loading").html(I)}});return false};vBulletin.conversation.showPostHistory=function(H){var I=C(this);var G=C(this).closest(".js-post").attr("data-node-id");var F=openConfirmDialog({title:vBulletin.phrase.get("post_history"),message:vBulletin.phrase.get("loading")+"...",width:800,dialogClass:"post-history-dialog dialog-container dialog-box loading",buttonLabel:{yesLabel:vBulletin.phrase.get("compare_versions"),noLabel:vBulletin.phrase.get("cancel")},onAfterClose:function(){if(this.id=="btnConfirmDialogYes"){var K=F.find(".post-history-form");var J={oldpost:K.find("input:radio[name=old]:checked").val()||1,newpost:K.find("input:radio[name=new]:checked").val()||1,nodeid:G};C("#btnConfirmDialogYes").hide();var L=openConfirmDialog({title:vBulletin.phrase.get("post_history"),message:vBulletin.phrase.get("loading")+"...",width:800,dialogClass:"post-history-comparison-dialog dialog-container dialog-box loading",buttonLabel:{yesLabel:vBulletin.phrase.get("compare_versions"),noLabel:vBulletin.phrase.get("close")},onAfterClose:function(){C("#btnConfirmDialogYes").show()}});E(L,"post_history_form",J)}}});E(F,"post_history_form",{nodeid:G});function E(J,K,L){C.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/render/"+K,data:L,type:"POST",dataType:"json",success:function(M){console.log("/ajax/render/"+K);if(M&&!M.errors){J.removeClass("loading").find(".dialog-content .message").html(M).find("[placeholder]").placeholder().end().end().dialog("option","position","center")}else{console.log("/ajax/render/"+K+" successful, but response was not valid: "+JSON.stringify(M));openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("invalid_server_response_please_try_again"),iconType:"error",onAfterClose:function(){J.dialog("close")}})}},error:function(O,N,M){console.log("/ajax/render/"+K+" failed, error: "+M);openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("error_loading_delete_form_x",O.status),iconType:"error",onAfterClose:function(){J.dialog("close")}})}})}};vBulletin.conversation.flagPost=function(F){var G=C(this),E=C(this).closest(".js-post").attr("data-node-id");openPromptDialog({title:vBulletin.phrase.get("flag_a_post"),message:vBulletin.phrase.get("please_enter_your_reason_why_you_want_to_flag_this_post"),buttonLabel:{okLabel:vBulletin.phrase.get("send_report"),cancelLabel:vBulletin.phrase.get("cancel")},multiline:true,validation:{type:"string"},onClickOK:function(H){C("body").css("cursor","wait");C.ajax({url:vBulletin.getAjaxBaseurl()+"/report/report",type:"POST",data:{reason:H,reportnodeid:E},dataType:"json",success:function(I){if(I){if(I.error){console.log("/report/report failed, error: "+JSON.stringify(I.error));var J;if(I.error.length>1){J=vBulletin.phrase.get(I.error)}else{J=vBulletin.phrase.get(I.error[0])}openAlertDialog({title:vBulletin.phrase.get("flag_a_post"),message:J,iconType:"error"})}else{openAlertDialog({title:vBulletin.phrase.get("flag_a_post"),message:vBulletin.phrase.get("the_report_has_been_sent"),iconType:"",onAfterClose:function(){C("#prompt-dialog").dialog("close")}})}}},error:function(K,J,I){console.log("/report/report failed, error: "+I);openAlertDialog({title:vBulletin.phrase.get("flag_a_post"),message:vBulletin.phrase.get("unable_to_contact_server_please_try_again"),iconType:"error",onAfterClose:function(){C("#prompt-dialog").dialog("close")}})},complete:function(){C("body").css("cursor","default")}})}});return false};vBulletin.conversation.editPost=function(K,N){var P=C(this),G,O,L=P.closest(".conversation-list");if(P.closest(".js-comments").length>0){G="comment"}var H=C(".edit-conversation-container form",L);if(H.length>0){openAlertDialog({title:vBulletin.phrase.get("edit_conversation"),message:vBulletin.phrase.get("you_have_a_pending_edit_unsaved"),iconType:"warning",onAfterClose:function(){vBulletin.animateScrollTop(H.closest(".js-post").offset().top,{duration:"slow"})}});return }if(N&&N.isFilterSelected("conversations_on")){N.toggleNewConversations(false)}window.vBulletin.loadingIndicator.show();K.preventDefault();var F=P.parent().attr("data-node-id"),E=(G=="comment")?P.closest(".js-comment"):P.closest(".js-post__content-wrapper");if(L.hasClass("thread-view")){O="thread"}else{if(L.hasClass("full-activity-view")){O="full-activity-stream"}else{if(L.hasClass("activity-view")){O="activity-stream"}else{O="stream"}}}G=G||E.attr("data-node-type")||"";var J,M=C(".b-post__count",E).text()||"1";if(G=="comment"&&(O=="thread"||L.closest(".blog-conversation-content-widget").length==1)){J=Number(M.replace("#",""))}else{J=Number(M.replace("#",""))-1}var I=function(R,U,W,Q){if(R&&R.error){window.vBulletin.loadingIndicator.hide();Q.find(".action-buttons .button").prop("disabled",false);if(C.isArray(R.error)){switch(R.error[0]){case"toomanyimages":var V=vBulletin.phrase.get("toomanyimages",R.error[1],R.error[2]);break;default:C.each(R.error,function(Y,Z){R.error[Y]=vBulletin.phrase.get(Z)});var V=R.error.join("<br />")}}else{var V=vBulletin.phrase.get(R.error)}openAlertDialog({title:vBulletin.phrase.get("edit_conversation"),message:V,iconType:"error"});return }var X=C(".edit-conversation-container form",E).data("content-type");var S=vBulletin.triggerHandler.apply(Q.get(0),["afterSave",C(document),R]);if(S===false){C("body").trigger(X+"_editform_onunload",[E]);window.vBulletin.loadingIndicator.hide();return }Q.closest(".conversation-reply-slideout").addClass("h-hide");var T=pageData;T["posts-perpage"]=vBulletin.conversation.POSTS_PER_PAGE;if(O=="thread"){T["comments-perpage"]=vBulletin.conversation.COMMENTS_PER_PAGE}var W=C.post(vBulletin.getAjaxBaseurl()+"/create-content/loadnode",{nodeid:F,view:O,index:J,page:T,type:G,isAjaxTemplateRender:true},function(c){if(c.error){openAlertDialog({title:vBulletin.phrase.get("conversation"),message:vBulletin.phrase.get(c.error),iconType:"error"})}else{var Y=Q.closest(".js-content-entry").data("current-channelid"),a=Q.find('input[name="parentid"]:checked').val(),Z=C(c);if(Y>0&&a>0&&(Y!=a)){window.location.reload(true);return }C("body").trigger(X+"_editform_onunload",[E]);if(N&&N.isFilterSelected("conversations_on")){N.toggleNewConversations(true)}P.closest(".js-post").replaceWith(Z);C("body").trigger(X+"_newcontent_onload",[Z]);var d=Z.attr("data-node-id");if(Z.hasClass("js-conversation-starter")){var b=C(".js-post-title",Z).first().text();document.title=b+" - "+vBulletin.options.get("bbtitle");C(".page-title-widget .js-main-title").text(b)}C(".js-select-box",Z).selectBox();vBulletin.animateScrollTop(Z.offset().top,{duration:"slow"})}},"json").error(function(){openAlertDialog({title:vBulletin.phrase.get("conversation"),message:vBulletin.phrase.get("error_loading_post"),iconType:"error"})}).complete(function(){window.vBulletin.loadingIndicator.hide()})};C.post(vBulletin.getAjaxBaseurl()+"/create-content/loadeditor",{nodeid:F,type:G,view:O,isAjaxTemplateRender:true},function(Q){if(Q.error){openAlertDialog({title:vBulletin.phrase.get("edit_conversation"),message:vBulletin.phrase.get(Q.error),iconType:"error"})}else{var R=function(){if(typeof vBulletin.upload=="undefined"||typeof vBulletin.tagEditor=="undefined"||typeof vBulletin.contentEntryBox.init=="undefined"){vBulletin.ckeditor.loadScripts("",{},R);return }E.addClass("b-post--edit");E.find(".js-post__content").first().addClass("b-post__content--edit");E.find(".b-post__footer").first().addClass("b-post__footer--edit");$container=E.find(".edit-conversation-container").first();E.closest(".js-album-detail").find(".list-item-header").addClass("h-hide").end().find(".conversation-body").addClass("h-hide").end().find(".profile-media-uploadphotos").addClass("h-hide-imp").end().find(".photo-preview").addClass("h-hide").end();vBulletin.contentEntryBox.init();vBulletin.contentEntryBox.setDefaultTab($container.find(".js-content-entry").first());$container.show();console.log($container);window.vBulletin.loadingIndicator.hide();var U=$container.find(".js-attach-list");vBulletin.upload.initializePhotoUpload(E);var T=C(".js-post[data-node-id={0}] .tag-editor-container .tag-input".format(F));if(T.length>0&&typeof vBulletin.tagEditor!="undefined"){var V=new vBulletin.tagEditor.instance(T.selector)}if(U.data("attach-count")>0){$container.find(".b-toolbar__item").filter(function(){return C(this).data("panel")=="b-content-entry-panel__content--attachment"}).click()}vBulletin.contentEntryBox.afterPanelChange(E);C(".js-datepicker",$container).not(".hasDatePicker").datetimepicker({showOn:"both",buttonImage:pageData.baseurl+"/images/calendar-blue.png",buttonImageOnly:true,ampm:true})};console.log("Edit mode: Adding Content Entry UI to DOM (contains parsed post text in the .js-editor-parsed-text element)");C(".edit-conversation-container",E).first().hide().html(Q);var S=C(".edit-conversation-container form",E).data("content-type");C(window).off("beforeunload.editPost").on("beforeunload.editPost",function(){return vBulletin.phrase.get("onbeforeunload_message_while_editing_post")});C("body").trigger(S+"_editform_onload",[E,R]);C(".edit-conversation-container input[placeholder], .edit-conversation-container textarea[placeholder]",E).placeholder();C("form",E).ajaxForm({dataType:"json",success:I,beforeSerialize:function(T){console.log("ajaxForm beforeSerialize (vBulletin.conversation.editPost)");T.trigger("beforeSave");var U=C("body").triggerHandler(S+"_editform_onbeforeserialize",[T]);return(U===false)?false:true},beforeSubmit:function(W,V,U){var T=vBulletin.contentEntryBox.validateForm.apply(V,[U]);if(T===false){return false}C(window).off("beforeunload.editPost");window.vBulletin.loadingIndicator.show();return true},complete:function(){console.log("ajaxForm complete (vBulletin.conversation.editPost)")}})}},"json").error(function(R,S,Q){openAlertDialog({title:vBulletin.phrase.get("edit_conversation"),message:"HTTP {0} - {1}".format(R.status,Q),iconType:"error"})}).complete(function(R,S,Q){window.vBulletin.loadingIndicator.hide()})};vBulletin.conversation.votePost=function(F){var E=C(this).closest(".js-post").attr("data-node-id");C(".js-post[data-node-id="+E+"] .js-post-control__vote").addClass("h-disabled");C("body").css("cursor","wait");if(!C(this).hasClass("voted")){C.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/api/reputation/vote",type:"POST",data:{nodeid:E},dataType:"json",success:function(G){if(G){if(G.errors){openAlertDialog({title:vBulletin.phrase.get("error_saving_vote"),message:vBulletin.phrase.get(G.errors[0]),iconType:"error"});C(".list-item[data-node-id="+E+"] .js-post-control__vote").removeClass("h-disabled")}else{C(".js-post[data-node-id="+G.nodeid+"] .votecount").html(G.votes);C(".js-post[data-node-id="+E+"] .js-post-control__vote").addClass("voted").removeClass("h-disabled").find(".b-post-control__label").text(vBulletin.phrase.get("unvote_cap")).end()}}},complete:function(){C("body").css("cursor","default")}})}else{C.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/api/reputation/unvote",type:"POST",data:{nodeid:E},dataType:"json",success:function(G){if(G){if(G.errors){openAlertDialog({title:vBulletin.phrase.get("error_saving_vote"),message:vBulletin.phrase.get(G.errors[0]),iconType:"error"});C(".js-post[data-node-id="+E+"] .js-post-control__vote").removeClass("h-disabled")}else{C(".js-post[data-node-id="+G.nodeid+"] .votecount").html(G.votes);C(".js-post[data-node-id="+E+"] .js-post-control__vote").removeClass("voted").removeClass("h-disabled").find(".b-post-control__label").text(vBulletin.phrase.get("vote_cap")).end()}}},complete:function(){C("body").css("cursor","default")}})}};vBulletin.conversation.showWhoVoted=function(G){var E=C(this);if(C(this).hasClass("novotepopup")){return }var F=E.closest(".js-post").attr("data-node-id");E.qtip({content:{title:{text:vBulletin.phrase.get("people_who_liked"),button:true},text:vBulletin.phrase.get("loading")+"...",ajax:{url:vBulletin.getAjaxBaseurl()+"/ajax/api/reputation/fetchWhovoted",type:"POST",data:{nodeid:F},dataType:"json",once:false,success:function(K,I){if(K.errors){this.set("content.text",K.errors[0][0])}else{if(K.length<1){this.set("content.text",vBulletin.phrase.get("no_one_voted"))}else{var M="<ul>";for(x in K){var H=pageData.baseurl+K[x].profileurl,P;if(!K[x].avatarurl){P=pageData.baseurl_core+"/image.php?u="+K[x].userid+"&type=profile"}else{P=pageData.baseurl_core+"/"+K[x].avatarurl}var L=C("<img>").attr("src",P).attr("alt",K[x].username),O=C("<a>").attr("href",H).addClass("avatar"),J=C("<a>").attr("href",H).addClass("username").html(K[x].musername),Q=C("<li>"),N=C("<div>").addClass("usertitle").html(K[x].usertitle);O.append(L);Q.append(O);Q.append(J);Q.append(N);M+=C("<div>").append(Q).html()}M+="</ul>";this.set("content.text",M)}}},error:function(H,J,I){this.set("content.text","failed to load.")}}},position:{my:"left top",at:"right top",viewport:C(window)},show:{event:"click"},hide:{event:"unfocus",fixed:true},style:{classes:"ui-tooltip-shadow ui-tooltip-light ui-tooltip-whovoted"}});E.qtip("api").show()};vBulletin.conversation.processPostContent=function(E){E.css("border-bottom","").filter(".stream-view.activity-view").find(".list-item-poll form.poll").each(function(F,G){if(C(this).is(":visible")&&C(".view-less-ctrl",this).hasClass("h-hide")){vBulletin.conversation.limitVisiblePollOptionsInAPost(this,3)}})};vBulletin.conversation.limitVisiblePollOptionsInAPost=function(I,H){if(typeof H=="undefined"){H=3}var F=0,G=C("ul.poll li",I),E=parseInt(G.css("line-height"),10);G.each(function(J){C(this).removeClass("h-hide");var K=C(this).height();F+=K/E;if(F>H){C(this).addClass("h-hide")}else{C(this).css("display","")}});if(F>3){C(".view-more-ctrl",I).removeClass("h-hide").next(".action-buttons").addClass("h-hide").next(".view-less-ctrl").addClass("h-hide")}else{C(".view-more-ctrl",I).addClass("h-hide").next(".action-buttons").removeClass("h-hide").next(".view-less-ctrl").addClass("h-hide")}};vBulletin.conversation.bindEditFormEventHandlers=function(L){L=(L)?L.toLowerCase():"";if(C.inArray(L,["text","gallery","video","poll","link","comment"])!=-1||L=="all"){var G=function(Q,P){if(typeof P=="function"){console.log("Edit mode: initializeEditor");var O=Q.find(".js-editor");if(O.length>0){vBulletin.ckeditor.initEditor(O,{success:function(R){if(typeof P=="function"){P();vBulletin.contentEntryBox.afterPanelChange(Q);vBulletin.ckeditor.initEditorComponents(Q);var S=this;window.setTimeout(function(){console.log("Edit mode: Adding post data to CKEditor (vBulletin.conversation.bindEditFormEventHandlers)");S.setData(O.prev(".js-editor-parsed-text").html(),function(){var T=vBulletin.ckeditor.getEditor(R);vBulletin.ckeditor.fixTableFunctionality.call(vBulletin.ckeditor,{},T);T.focus()})},0)}},error:function(S){if(typeof P=="function"){P()}O.prop("disabled",false).removeClass("ckeditor-load-on-focus").closest(".js-content-entry").addClass("b-content-entry--no-ckeditor");var R=O.prev(".js-editor-parsed-text").html();if(R!=""){vBulletin.AJAX({url:vBulletin.getAjaxBaseurl()+"/ajax/api/editor/convertHtmlToBbcode",data:{nodeid:pageData.nodeid,data:R,allowsmilie:1,securitytoken:pageData.securitytoken},success:function(T){if(T&&T.data){O.html(T.data)}else{openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("invalid_server_response_please_try_again"),iconType:"error"})}},error_phrase:"error_converting_message"})}},hideLoadingDialog:false})}else{if(typeof P=="function"){P();O.focus()}}}};var M=function(Q){var P=Q.find(".js-editor");if(P.length>0){var O=P.attr("id");if(vBulletin.ckeditor.editorExists(O)){vBulletin.ckeditor.destroyEditor(O)}}P.closest("form").remove()};var F=function(){C("body").off("comment_editform_onload").on("comment_editform_onload",function(P,Q,O){if(typeof O=="function"){O();C(".js-editor",Q).focus().filter(".autogrow").elastic().off("blur.elastic")}}).off("comment_editform_onunload").on("comment_editform_onunload",function(O,P){})};var I=function(){C("body").off("text_editform_onload").on("text_editform_onload",function(P,Q,O){G(Q,O)}).off("text_editform_onunload").on("text_editform_onunload",function(O,P){M(P)}).off("text_newcontent_onload").on("text_newcontent_onload",function(O,P){if(P.closest(".conversation-list.stream-view.activity-view").length>0){vBulletin.truncatePostContent(P)}})};var J=function(){C("body").off("poll_editform_onload").on("poll_editform_onload",function(P,Q,O){G(Q,O)}).off("poll_editform_onunload").on("poll_editform_onunload",function(O,P){M(P)}).off("poll_newcontent_onload").on("poll_newcontent_onload",function(O,P){if(P.closest(".conversation-list.stream-view.activity-view").length>0){vBulletin.truncatePostContent(P);vBulletin.conversation.limitVisiblePollOptionsInAPost(C("form.poll",P),3)}})};var H=function(){C("body").off("gallery_editform_onload").on("gallery_editform_onload",function(P,Q,O){C('.b-toolbar__item[data-panel="b-content-entry-panel__content--gallery"]',Q).trigger("click");G(Q,function(){if(typeof O=="function"){O()}vBulletin.upload.initializePhotoUpload(Q)})}).off("gallery_editform_onunload").on("gallery_editform_onunload",function(O,P){M(P)}).off("gallery_editform_onbeforeserialize").on("gallery_editform_onbeforeserialize",function(P,O){O.find(".caption-box").each(function(){var Q=C(this);if(Q.hasClass("placeholder")&&Q.val()==Q.attr("placeholder")){Q.val("")}});return true}).off("gallery_newcontent_onload").on("gallery_newcontent_onload",function(O,P){if(P.closest(".conversation-list.stream-view.activity-view").length>0){vBulletin.truncatePostContent(P)}})};var K=function(){C("body").off("video_editform_onload").on("video_editform_onload",function(P,Q,O){C('.b-toolbar__item[data-panel="b-content-entry-panel__content--video"]',Q).trigger("click");G(Q,function(){if(typeof O=="function"){O()}N(C(".b-content-entry-panel__content--video",Q),"video")});C(".js-attach-button",Q).on("click",function(U){U.preventDefault();var R=C(this),V=R.closest(".b-content-entry-panel__content--video"),T=C(".b-link-input__url",V),S=C.trim(T.val());if(!S){openAlertDialog({title:vBulletin.phrase.get("attach_video"),message:vBulletin.phrase.get("please_enter_video_url"),iconType:"warning",onAfterClose:function(){T.focus()}});return false}R.prop("disabled",true);C(".js-button-group .b-button",V).prop("disabled",true);C("body").css("cursor","wait");C.post(vBulletin.getAjaxBaseurl()+"/link/getlinkdata",{url:S,isAjaxTemplateRender:true},function(X){if(X.error){openAlertDialog({title:vBulletin.phrase.get("attach_video"),message:vBulletin.phrase.get(X.error),iconType:"warning",onAfterClose:function(){T.focus()}})}else{$template=C(X);V.find(".js-panel-content").append($template);N(V,"video");$template.fadeIn("slow",function(){T.val("");C(".b-link-input",V).addClass("h-hide")});var W=Q.closest("form");if($template.find("js-video-url")){W.data("content-type","video")}else{W.data("content-type","link")}}},"json").error(function(Y,X,W){openAlertDialog({title:vBulletin.phrase.get("attach_video"),message:"HTTP {0} - {1}".format(Y.status,W),iconType:"error"})}).complete(function(){C("body").css("cursor","default");R.prop("disabled",false);C(".js-button-group .b-button",V).prop("disabled",false)})})}).off("video_editform_onunload").on("video_editform_onunload",function(O,P){M(P)}).off("video_newcontent_onload").on("video_newcontent_onload",function(O,P){if(P.closest(".conversation-list.stream-view.activity-view").length>0){vBulletin.truncatePostContent(P)}})};var E=function(){C("body").off("link_editform_onload").on("link_editform_onload",function(P,Q,O){C('.b-toolbar__item[data-panel="b-content-entry-panel__content--link"]',Q).trigger("click");G(Q,function(){if(typeof O=="function"){O()}N(C(".b-content-entry-panel__content--link",Q),"link")});C(".js-attach-button",Q).on("click",function(U){U.preventDefault();var R=C(this),V=R.closest(".b-content-entry-panel__content--link"),T=C(".b-link-input__url",V),S=C.trim(T.val());if(!S){openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("please_enter_a_valid_url_and_click_attach"),iconType:"warning",onAfterClose:function(){T.focus()}});return false}if(!S.match(/^https?:\/\//)){S="http://"+S;T.val(S)}R.prop("disabled",true);C(".js-button-group .b-button",V).prop("disabled",true);C("body").css("cursor","wait");C.post(vBulletin.getAjaxBaseurl()+"/link/getlinkdata",{url:S,isAjaxTemplateRender:true},function(Y){if(Y.error){openAlertDialog({title:vBulletin.phrase.get("attach_link"),message:vBulletin.phrase.get(Y.error),iconType:"warning",onAfterClose:function(){T.focus()}})}else{var X=C(Y);X.find("img").error(function(){C(this).closest("li").remove()});V.find(".js-panel-content").append(X);N(V,"link");X.fadeIn("slow",function(){T.val("");C(".b-link-input",V).addClass("h-hide")});var W=Q.closest("form");if(X.find("js-video-url")){W.data("content-type","video")}else{W.data("content-type","link")}}},"json").error(function(Y,X,W){openAlertDialog({title:vBulletin.phrase.get("attach_link"),message:"HTTP {0} - {1}".format(Y.status,W),iconType:"error"})}).complete(function(){C("body").css("cursor","default");R.prop("disabled",false);C(".js-button-group .b-button",V).prop("disabled",false)})})}).off("link_editform_onunload").on("link_editform_onunload",function(O,P){M(P)}).off("link_newcontent_onload").on("link_newcontent_onload",function(O,P){if(P.closest(".conversation-list.stream-view.activity-view").length>0){vBulletin.truncatePostContent(P)}}).off("link_savepost_success").on("link_savepost_success",function(O,P){C(".b-link-input",P).removeClass("h-hide-imp")})};var N=function(P,Q){C(".b-link-content__urlinfo .js-link-edit",P).on("click",function(S){S.preventDefault();var R=C(this).parent().parent();R.addClass("b-link-content__urlinfo-meta--edit-mode");C(".js-link-textbox",R).val(C.trim(C(".b-link-content__urlinfo-text",R).text())).trigger("focus");C(".js-link-save",R).on("click",function(T){T.preventDefault();C(".b-link-content__urlinfo-text",R).text(C(".js-link-textbox",R).val());R.removeClass("b-link-content__urlinfo-meta--edit-mode")})});C(".js-link-remove",P).on("click",function(R){R.preventDefault();C(this).closest(".b-content-entry-panel__content").find(".b-link-input").removeClass("h-hide");C(this).closest(".js-panel-content").empty();C(".b-link-input",P).removeClass("h-hide")});if(Q=="link"){C(".js-link-preview-checkbox",P).off("click").on("click",function(){C(".b-link-content__thumbnail",P)[this.checked?"addClass":"removeClass"]("h-hide")});var O=C(".b-link-thumbnail-list__item",P).length;C(".b-link-thumbnail-list",P).jcarousel({scroll:1,wrap:null,size:O,rtl:C("html").attr("dir")=="rtl",buttonNextCallback:function(T,S,R){if(R){C(".b-thumbnail-nav .b-thumbnail-nav__next-arrow",P).removeClass("b-icon__arrow-right-m--disabled").addClass("b-icon__arrow-right-m--default")}else{C(".b-thumbnail-nav .b-thumbnail-nav__next-arrow",P).addClass("b-icon__arrow-right-m--disabled").removeClass("b-icon__arrow-right-m--default")}},buttonPrevCallback:function(T,S,R){if(R){C(".b-thumbnail-nav .b-thumbnail-nav__prev-arrow",P).removeClass("b-icon__arrow-left-m--disabled").addClass("b-icon__arrow-left-m--default")}else{C(".b-thumbnail-nav .b-thumbnail-nav__prev-arrow",P).addClass("b-icon__arrow-left-m--disabled").removeClass("b-icon__arrow-left-m--default")}},initCallback:function(S,R){if(R=="init"&&O>0){C(".b-thumbnail-nav .b-thumbnail-nav__counter",P).html("1/"+O);C(".b-thumbnail-nav .b-thumbnail-nav__prev-arrow",P).off("click").on("click",function(){if(!C(this).hasClass("b-icon__arrow-left-m--disabled")){C(".jcarousel-container .jcarousel-prev",P).trigger("click")}});C(".b-thumbnail-nav .b-thumbnail-nav__next-arrow",P).off("click").on("click",function(){if(!C(this).hasClass("b-icon__arrow-right-m--disabled")){C(".jcarousel-container .jcarousel-next",P).trigger("click")}})}},itemVisibleInCallback:function(U,S,R,T){if(T=="init"){return false}C(".b-thumbnail-nav .b-thumbnail-nav__counter",P).html(R+"/"+O);C('input[type="radio"]',S).prop("checked",true)},itemFallbackDimension:90})}};switch(L){case"text":I();break;case"comment":F();break;case"poll":J();break;case"gallery":H();break;case"video":K();break;case"link":E();break;case"all":I();F();J();H();K();E();break}}};vBulletin.isScrolledIntoView=function(G,L){var M=false;if(C.isPlainObject(L)&&(L).toString()=="[object Object]"){M=true;L.top=0;L.bottom=0}G=(G instanceof C)?G:C(G);if(G.length==0){return false}var E=C(window).scrollTop(),F=E+C(window).height(),J=G.offset().top,H=J+G.outerHeight(),K=J-E,I=F-H;if(M){L.top=K;L.bottom=I}return(K>=0&&I>=0)};vBulletin.scrollToFixed=function(I){var E=this,F={element:C(),fixedAt:"top",limit:0,triggerOnload:true,zIndex:99},G=("scrollToFixed"+Math.random()).replace(".","");function H(P){F=C.extend({},F,P);if(F.element){F.element=(F.element instanceof C)?F.element:C(F.element);if(F.element.length>0){if(C.inArray(F.fixedAt,["top","bottom"])){F.fixedAt="top"}var M=F.element,J="scrolltofixed",L={width:M.width(),offset:M.offset(),"margin-top":parseInt(M.css("margin-top"),10),"margin-bottom":parseInt(M.css("margin-bottom"),10),cssPosition:M.css("position"),coordinates:{left:M.css("left"),top:M.css("top"),right:M.css("right"),bottom:M.css("bottom")}};if(typeof vBulletin.Responsive!=="undefined"){var K=(vBulletin.Responsive&&vBulletin.Responsive.scrollToFixedBreakPoint)?vBulletin.Responsive.scrollToFixedBreakPoint:0;var O=C("<div />");if(C("#vb-page-body").width()>K){O.addClass("scrolltofixed-filler").hide().insertAfter(M)}}M.data("origOffsetTop",L.offset.top);M.css("z-index",F.zIndex);M.data("object-instance",E);var N=C(window).off("scroll."+G).on("scroll."+G,function(){if(M.is(":hidden")){return }var S=C(this).scrollTop();if(F.limit>0&&S>F.limit&&M.hasClass(J)){M.removeClass(J).css({position:"absolute",left:"auto",right:"auto",top:"auto",bottom:"auto",width:L.width})}else{if((F.limit>0&&S<F.limit&&S>L.offset.top&&!M.hasClass(J))||(F.limit<=0&&S>L.offset.top&&!M.hasClass(J))){O.css({display:M.css("display"),width:M.outerWidth(true),height:M.outerHeight(true),"float":M.css("float")});if(C("#vb-page-body").width()>K){M.addClass(J).width(L.width).css({left:L.offset.left,right:"auto",width:L.width,top:(F.fixedAt=="top")?0:"auto",bottom:(F.fixedAt=="bottom")?0:"auto",position:""})}var R=L["margin-"+F.fixedAt];if(R){var Q={};Q[F.fixedAt]=-R+"px";M.animate(Q,"fast")}}else{if(S<=L.offset.top&&M.hasClass(J)){O.hide();M.removeClass(J).css({position:"",width:"",left:"",top:"",right:"",bottom:""})}}}}).off("resize."+G).on("resize."+G,function(){M.removeClass(J).width("auto").css({position:"",left:""});L.width=M.width();L.offset=M.offset();C(this).trigger("scroll."+G)});if(F.triggerOnload){N.trigger("scroll."+G)}}}}this.updateLimit=function(J){if(!isNaN(Number(J))){F.limit=J;C(window).trigger("scroll."+G)}};this.addLimit=function(J){if(!isNaN(Number(J))){F.limit+=J;C(window).trigger("scroll."+G)}};this.reset=function(J){H(J)};H(I)};vBulletin.scrollToAnchor=function(I){var G=C(I);console.log("vBulletin.scrollToAnchor() hash: {0}, found: {1}".format(I,G.length));if(G.length>0){var F=G.show().offset().top-2;G.hide();var H=C("html,body"),E=C(".scrolltofixed-floating.scrolltofixed-top"),J=false;if(E.length>0){if(C(".list-container .list-item:first a.anchor"+I).length==1){if(E.hasClass("scrolltofixed")){E.removeClass("scrolltofixed")}F=E.offset().top;J=true}else{if(E.hasClass("scrolltofixed")){F-=E.outerHeight()}}}H.animate({scrollTop:F},1000,function(){if(!J){var L=G.show().offset().top;G.hide();var K=C(".scrolltofixed-floating.scrolltofixed-top.scrolltofixed");L-=(K.length>0)?K.outerHeight():0;H.animate({scrollTop:L},"slow")}C("a.anchor").show()});return false}C("a.anchor").show();return true};if(location.hash){vBulletin.scrollToAnchor(location.hash)}vBulletin.animateScrollTop=function(F,G){console.log("vBulletin.animateScrollTop({0})".format(F));var E=C(".scrolltofixed-floating.scrolltofixed-top");if(E.length>0){var H=E.data("origOffsetTop")||E.offset().top;if(!E.hasClass("scrolltofixed")&&H<F){F-=E.outerHeight(true)}if(H<F){F-=E.outerHeight()}}C("html, body").animate({scrollTop:F},G)};vBulletin.truncatePostContent=function(E){E=(E instanceof C)?E:C(E);if(E.selector==""){E=C("body")}C(".poll-desc.ellipsis, .message-body.ellipsis",E).each(function(){var F=C(this);truncatedHeight=F.height();F.removeClass("ellipsis");var G=F.height();F.addClass("ellipsis");if(G>truncatedHeight){F.closest(".list-item-body").find(".post-links").removeClass("hide-see-link").find(".see-link").off("click").on("click",function(){var I=C(this);if(I.hasClass("more")){F.removeClass("ellipsis")}else{F.addClass("ellipsis")}I.toggleClass("more less");var H=I.text();I.text(I.data("toggle-text")).data("toggle-text",H);return false})}});C(".list-item .see-link.more").each(function(F){var G=C(this).closest(".list-item"),I=C(G).find(".post-content.restore");if(I.length>0){var L=false,J=false,N=C(this).text(),H="",M=C(I).html(),K=this;C(this).on("click",function(){nodeid=C(G).attr("data-node-id");if(L){C(K).text(N);C(I).html(M);L=false}else{if(J){C(K).text(vBulletin.phrase.get("see_less"));L=true;C(I).html(H)}else{if(!J&&nodeid){C.ajax({url:vBulletin.getAjaxBaseurl()+"/activity/fetchText",type:"POST",data:{nodeid:nodeid},dataType:"json",complete:function(){},success:function(O){if(O&&!O.error&&O.nodeText){H=O.nodeText;if(H.length<=M.length){C(K).addClass("ui-helper-hidden");postLink=C(K).closest(".post-links").html().replace("<span>|</span>","");C(K).closest(".post-links").html(postLink)}else{C(I).html(O.nodeText);C(K).text(vBulletin.phrase.get("see_less"));console.log("loaded content for node "+nodeid);L=true;J=true;return false}}},error:function(Q,P,O){console.log("Attempt to load text for node "+nodeid+" failed:"+O)}})}}}return false})}})};vBulletin.markreadcheck=function(){if((parseInt(pageData.threadmarking)>0)&&(parseInt(pageData.userid)>0)){return }var E=C.cookie(pageData.cookie_prefix+"lastvisit");if(parseInt(pageData.userid)>0&&(!E||pageData.lastvisit>E)){E=pageData.lastvisit}var F=Math.round(new Date().getTime()/1000),G=F-vBulletin.options.get("markinglimit")*86400;C(".forum-item").each(function(){var I=parseInt(C(this).attr("data-lastcontent")),H=0;if(I<=E){C(this).removeClass("new");return }H=vBulletin.cookie.fetchBbarrayCookie("channel_view",C(this).attr("data-channel-id"));H=H?parseInt(H):0;C(this).toggleClass("new",(I>H))});C(".subforum-item").each(function(){var I=parseInt(C(this).attr("data-lastcontent")),H=0;if(I<=E){C(this).removeClass("new").find(".icon").removeClass("new");return }H=vBulletin.cookie.fetchBbarrayCookie("channel_view",C(this).attr("data-channel-id"));H=H?parseInt(H):0;C(this).toggleClass("new",(I>H)).find(".icon").toggleClass("new",(I>H))});C(".topic-item").each(function(){var I=parseInt(C(this).attr("data-lastcontent")),J=0,H=0,L=0;if(pageData.userid=="0"){if(I<=E){C(this).addClass("read");return }H=vBulletin.cookie.fetchBbarrayCookie("channel_view",C(this).attr("data-channel-id"));H=H?parseInt(H):0;J=vBulletin.cookie.fetchBbarrayCookie("discussion_view",C(this).attr("data-node-id"));J=J?parseInt(J):0;L=Math.max(H,J)}else{L=C(this).attr("data-readtime")?parseInt(C(this).attr("data-readtime")):0;H=C(this).attr("data-channelreadtime")?parseInt(C(this).attr("data-channelreadtime")):0;L=Math.max(L,H,G)}if(I<=L||C(this).hasClass("redirect")){C(this).addClass("read")}else{if(C(this).find(".topic-wrapper .go-to-first-unread").length==0){var K=C(this).find(".topic-wrapper .topic-title").attr("href");if(typeof (K)!="undefined"){K+=(K.indexOf("?")==-1?"?":"&amp;")+"goto=newpost";C("<a />").addClass("go-to-first-unread").attr("href",K).attr("title",vBulletin.phrase.get("go_to_first_new_post")).html("&nbsp;").prependTo(C(this).find(".topic-wrapper"));C(this).find(".vb-icon-topic-status").attr("title",vBulletin.phrase.get("new_posts"))}}}})};vBulletin.markchannelsread=function(G,H,E){channelids=[];if(parseInt(G)){vBulletin.setChannelRead(G,H)}else{if(pageData.channelid&&parseInt(pageData.channelid)&&parseInt(pageData.threadmarking)>0&&parseInt(pageData.userid)>0){vBulletin.setChannelRead(pageData.channelid,H)}else{channels=C(E).closest(".widget-content").find(".forum-list-container .forum-item");subchannels=C(E).closest(".widget-content").find(".forum-list-container .subforum-item");result=false;var F=function(I,K){var J=parseInt(C(K).attr("data-channel-id"),10);if(J){channelids.push(J)}};C.each(channels,F);C.each(subchannels,F)}}C.each(channelids,function(I,J){if(I>=channelids.length-1){vBulletin.setChannelRead(J,H)}else{vBulletin.setChannelRead(J,[])}})};vBulletin.setChannelRead=function(F,G){var H=Math.round(new Date().getTime()/1000);if(pageData.threadmarking=="0"||!parseInt(pageData.userid)){if(F==0){C.cookie(pageData.cookie_prefix+"lastvisit",H)}else{var E;try{E=C.parseJSON(vBulletin.cookie.convertBbarrayCookie(C.cookie(pageData.cookie_prefix+"channel_view")))||{}}catch(I){E={}}E[F]=H;var J={path:pageData.cookie_path,domain:pageData.cookie_domain};J.expires=365;C.cookie(pageData.cookie_prefix+"channel_view",vBulletin.cookie.convertBbarrayCookie(JSON.stringify(E),"set"),J)}if(G.success&&typeof G.success=="function"){G.success()}}else{C.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/api/node/markChannelsRead",data:{nodeid:F},type:"POST",dataType:"json",complete:function(){},success:function(K){if(K&&!K.error){console.log("Channel "+F+" is marked read successfully!")}if(G.success&&typeof G.success=="function"){G.success(K)}else{console.log("Channel "+F+" is marked read failed: "+K.error)}},error:function(M,L,K){console.log("Channel "+F+" is marked read failed:"+error);openAlertDialog({title:vBulletin.phrase.get("forum"),message:"HTTP {0} - {1}".format(M.status,K),iconType:"error"})}})}return true};vBulletin.ckeditor=vBulletin.ckeditor||{};window.CKEDITOR_BASEPATH=pageData.baseurl+"/js/ckeditor/";vBulletin.ckeditor.requiredScriptsLoaded=false;vBulletin.ckeditor.requiredScriptsLoadFailed=false;vBulletin.ckeditor.requiredScriptLoadingStarted=false;vBulletin.ckeditor.checkEnvironment=function(){var H=navigator.userAgent.toLowerCase();var F=window.opera;var G={ie:(H.indexOf("trident/")>-1),opera:(!!F&&F.version),webkit:(H.indexOf(" applewebkit/")>-1),air:(H.indexOf(" adobeair/")>-1),mac:(H.indexOf("macintosh")>-1),quirks:(document.compatMode=="BackCompat"&&(!document.documentMode||document.documentMode<10)),mobile:(H.indexOf("mobile")>-1),iOS:/(ipad|iphone|ipod)/.test(H)};G.gecko=(navigator.product=="Gecko"&&!G.webkit&&!G.opera&&!G.ie);if(G.webkit){if(H.indexOf("chrome")>-1){G.chrome=true}else{G.safari=true}}var E=0;if(G.ie){if(G.quirks||!document.documentMode){E=parseFloat(H.match(/msie (\d+)/)[1])}else{E=document.documentMode}G.ie9Compat=E==9;G.ie8Compat=E==8;G.ie7Compat=E==7;G.ie6Compat=E<7||G.quirks}if(G.gecko){var I=H.match(/rv:([\d\.]+)/);if(I){I=I[1].split(".");E=I[0]*10000+(I[1]||0)*100+(I[2]||0)*1}}if(G.opera){E=parseFloat(F.version())}if(G.air){E=parseFloat(H.match(/ adobeair\/(\d+)/)[1])}if(G.webkit){E=parseFloat(H.match(/ applewebkit\/(\d+)/)[1])}var J=!G.mobile&&((G.ie&&E>6)||(G.gecko&&E>=10801)||(G.opera&&E>=9.5)||(G.air&&E>=1)||(G.webkit&&E>=522)||false);return J};vBulletin.ckeditor.fireCallbacks=function(H,F,E,G){if(E=="error"&&typeof F.error=="function"){F.error(H)}if(E=="success"&&typeof F.success=="function"){F.success.apply(G,[H,G])}if(typeof F.complete=="function"){F.complete(H)}};vBulletin.ckeditor.initEditor=function(G,F){F=F||{};G=vBulletin.ckeditor.verifyEditorId(G);console.log("Ckeditor: initEditor({0})".format(G));if(!vBulletin.ckeditor.checkEnvironment()){var E=C("#"+G).closest(".js-content-entry");E.find("li[data-panel=b-content-entry-panel__content--toggle-editor]").addClass("h-hide");E.find("li[data-panel=b-content-entry-panel__content--smiley]").addClass("h-hide");E.find("form").append(C('<input type="hidden" name="nl2br" value="1" />'));vBulletin.ckeditor.fireCallbacks(G,F,"error");return }if(vBulletin.ckeditor.requiredScriptsLoaded){vBulletin.ckeditor.doInitEditor(G,F)}else{vBulletin.ckeditor.loadScripts(G,F)}};vBulletin.ckeditor.loadScripts=function(G,F,E){if(vBulletin.ckeditor.requiredScriptLoadingStarted){console.warn("Ckeditor: Trying to load required scripts more than once.");return }vBulletin.ckeditor.requiredScriptLoadingStarted=true;F=F||{};G=G||"";if(typeof (F.hideLoadingDialog)!=="undefined"&&!F.hideLoadingDialog){vBulletin.ckeditor.showLoadingDialog(G)}var I=function(){if(F.showError||!vBulletin.ckeditor.requiredScriptsLoadFailed){openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("error_loading_ckeditor_script"),iconType:"warning"})}vBulletin.loadingIndicator.hide();vBulletin.ckeditor.requiredScriptsLoadFailed=true;vBulletin.ckeditor.fireCallbacks(G,F,"error")};var H=function(){if(!vBulletin.ckeditor.requiredScriptsLoadFailed){if(typeof E=="function"){E()}if(typeof vBulletin.ckeditor.doInitEditor=="function"&&window.CKEDITOR){vBulletin.ckeditor.requiredScriptsLoaded=true;vBulletin.ckeditor.doInitEditor(G,F)}else{setTimeout(H,10)}}else{vBulletin.ckeditor.fireCallbacks(G,F,"error");if(!F.hideLoadingDialog){vBulletin.ckeditor.hideLoadingDialog(G)}}};if(typeof vBulletin.ckeditor.doInitEditor!="function"&&!window.CKEDITOR){vBulletin.AJAX({url:vBulletin.getAjaxBaseurl()+"/ajax/render/ckeditor_javascript",success:function(K){var J=[];var L=/src="([^"]+)"/g;while(match=L.exec(K)){J.push(match[1])}var M=function(){if(J.length>0){console.log("Ckeditor: Calling getScript for: {0}".format(J[0]));C.getScript(J[0],function(N,P,O){if(P!="success"){console.warn("Ckeditor: Error loading "+J[0]);I();return false}console.log("Ckeditor: Script loaded: "+J[0]);J.splice(0,1);M()}).fail(function(O,P,N){console.warn("Ckeditor: Error loading script: "+P+" Exception: "+N);I()})}else{H()}};M()},error_phrase:"error_fetching_dialog"})}else{H()}};vBulletin.ckeditor.editorExists=function(E){return false};vBulletin.ckeditor.isEditorEmpty=function(E){return true};vBulletin.ckeditor.resetEditor=function(E){return false};vBulletin.ckeditor.getEditorContent=function(F){F=vBulletin.ckeditor.verifyEditorId(F);if(!F){return false}if(vBulletin.ckeditor.editorExists(F)){var E=vBulletin.ckeditor.getEditor(F);if(E&&E.getData){return C.trim(E.getData())}else{return false}}else{return C.trim(C("#"+F).val())}};vBulletin.ckeditor.focusEditor=function(F){F=vBulletin.ckeditor.verifyEditorId(F);if(!F){return }if(vBulletin.ckeditor.editorExists(F)){var E=vBulletin.ckeditor.getEditor(F);if(E){E.focus()}}else{C("#"+F).focus()}};vBulletin.ckeditor.loadingDialogStack={};vBulletin.ckeditor.showLoadingDialog=function(E){if((typeof vBulletin.ckeditor.loadingDialogStack[E]!="undefined")&&vBulletin.ckeditor.loadingDialogStack[E]){return }vBulletin.ckeditor.loadingDialogStack[E]=true;var F=C("#"+E);if(F.length>0&&F.is(":visible")){F.prop("disabled",true)}window.vBulletin.loadingIndicator.show("vBulletin.ckeditor.showLoadingDialog editorId: "+E)};vBulletin.ckeditor.hideLoadingDialog=function(E){if((typeof vBulletin.ckeditor.loadingDialogStack[E]=="undefined")||!vBulletin.ckeditor.loadingDialogStack[E]){return }vBulletin.ckeditor.loadingDialogStack[E]=false;C("#"+E).prop("disabled",false);window.vBulletin.loadingIndicator.hide("vBulletin.ckeditor.hideLoadingDialog editorId: "+E)};vBulletin.ckeditor.generatedIdCounter=0;vBulletin.ckeditor.verifyEditorId=function(F){F=F||"";if(typeof F=="string"){return F}else{if(typeof F=="object"&&typeof F.checkDirty!="undefined"&&typeof F.name!="undefined"){return F.name}else{var E=F instanceof C?F:C(F);if(!E.attr("id")){++vBulletin.ckeditor.generatedIdCounter;E.attr("id",("vb-cke-instance-"+vBulletin.ckeditor.generatedIdCounter))}return E.attr("id")}}};vBulletin.ckeditor.initEditorComponents=function(F,E){F=F||document;C(function(){C(".js-ckeditor-init-on-focus",F).off("focus").on("focus",function(){vBulletin.ckeditor.initEditor(C(this))});C(".js-ckeditor-init-on-page-load",F).each(function(){vBulletin.ckeditor.initEditor(C(this))});if(E){return }(function(){var I=function(J){return C(".js-content-entry-post-icons option",F).filter(function(){return(C(this).val()==J)}).data("icon-url")};var H=function(J){if(J==0){return C("<span />").html(vBulletin.phrase.get("no_icon")).get(0)}var K=I(J);if(K){return C("<img />").attr("src",K).attr("alt","").get(0)}else{return""}};C(".js-content-entry-post-icons",F).selectBox().change(function(){var J=C(this).val();C(".js-content-entry-post-icons.selectBox-dropdown .selectBox-label",F).html(H(J))});C(".js-content-entry-post-icons-selectBox-dropdown-menu li a",F).each(function(){var J=C(this).attr("rel");C(this).html(H(J))});C(".js-content-entry-post-icons",F).trigger("change")})();C(".js-content-entry-prefixes",F).selectBox();var G=[];C(".js-select-box",F).each(function(){var H=C(this),I;while(H.is(":hidden")){I=H.closest(".h-hide");if(I.length<1){break}G.push(I);I.removeClass("h-hide")}H.selectBox()});C.each(G,function(H,I){I.addClass("h-hide")})})};vBulletin.ckeditor.initEditorComponents(document);C(".js-focus-on-page-load").first().focus();vBulletin.errorAlert=function(F,E){console.log(F,E);openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get(vBulletin.phrase.get(E)),iconType:"error"})};vBulletin.makeErrorAlertCallback=function(F,E){return(function(){vBulletin.errorAlert(F,E)})};vBulletin.AJAX=function(F){var E={type:"POST",dataType:"json",title_phrase:"error",error_phrase:"error",api_error:{},element:null};C.extend(true,E,F);if(!E.url){E.url=vBulletin.getAjaxBaseurl()+E.call;E.call=""}if(!E.error){E.error=vBulletin.makeErrorAlertCallback(E.title_phrase,E.error_phrase)}E.success=function(G){if(!G){vBulletin.errorAlert(E.title_phrase,"invalid_server_response_please_try_again")}else{if(G&&(G.errors||G.error)){var H=G.errors;if(!H){H=G.error}if(C.isArray(H)&&H.length>0){var I=(C("#debug-information").length==1);if(I){console.log("ERROR:");console.dir(H);if(H[0]&&H[0][0]&&H[0][0]=="exception_trace"&&H[1]&&H[1][0]&&H[1][0]=="errormsg"&&H[0][1]&&H[1][1]){vBulletin.errorAlert(E.title_phrase,H[1][1]+'\n<textarea style="border:1px solid #999;margin-top:10px;height:120px;width:100%;">'+H[0][1]+"</textarea>");return false}}H=H[0]}if(H=="inlinemodauth_required"){return vBulletin.inlinemod.openAuthDialog(E.element)}if(E.api_error[H[0]]){return E.api_error[H[0]](E,G)}vBulletin.errorAlert(E.title_phrase,["error_x",vBulletin.phrase.get(H)]);if(G.wasNotArray){arguments[0]=arguments[0][0]}return false}else{if(F.success){F.success.apply(this,arguments)}}}};C.ajax(E)};vBulletin.ajaxForm=function(F){var E={dataType:"json",title_phrase:"error",error_phrase:"error",element:null,complete:function(){C(".button[type=submit]",this).prop("disabled",false)},beforeSerialize:function(G){C(".placeholder",G).each(function(){var H=C(this);if(H.val()==H.attr("placeholder")){H.val("")}})},beforeSubmit:function(I,H,G){C(".button[type=submit]",this).prop("disabled",true);return true}};C.extend(E,F);if(!E.error){E.error=vBulletin.makeErrorAlertCallback(E.title_phrase,E.error_phrase)}E.success=function(G){if(G&&G.errors){var H=G.errors;if(C.isArray(H)&&H.length>0){H=H[0]}if(H=="inlinemodauth_required"){return vBulletin.inlinemod.openAuthDialog(E.element)}vBulletin.errorAlert(E.title_phrase,["error_x",vBulletin.phrase.get(H)]);if(G.wasNotArray){arguments[0]=arguments[0][0]}return false}else{if(F.success){F.success.apply(this,arguments)}}};this.ajaxForm(E)};window.openAlertDialog=function(J){var I=C("#alert-dialog");J=J||{};if(!I.data("created")){I.dialog({autoOpen:false,zIndex:10100,modal:true,resizable:false,closeOnEscape:false,showCloseButton:false,dialogClass:"dialog-container alert-dialog-container dialog-box",create:function(){I.data("created",true)}})}I.dialog("option","width",J.width||500);I.dialog("option","title",J.title||"Alert");var F=I.find(".dialog-content");var G=F.find(".message");var E=F.find(".icon");var H=C("#btnAlertDialogOK");if(J.maxHeight){F.css({"max-height":J.maxHeight,overflow:"auto"})}else{F.css({"max-height":"",overflow:""})}if(J.message){G.html(J.message)}E.removeClass(function(K,L){return(L.match(/\S+-icon\b/g)||[]).join(" ")});J.buttonLabel=J.buttonLabel||"OK";H.html(J.buttonLabel);I.off("dialogopen").on("dialogopen",function(){H.off("click").on("click",function(){if(typeof J.onBeforeClose=="function"){J.onBeforeClose.apply(this)}I.dialog("close")}).focus()});I.off("dialogclose").on("dialogclose",function(){if(typeof J.onAfterClose=="function"){J.onAfterClose.apply(H)}});switch(J.iconType){case"warning":E.addClass("warning-icon vb-icon vb-icon-warning");E.show();break;case"error":E.addClass("error-icon vb-icon vb-icon-error");E.show();break;default:E.addClass("no-icon").hide()}I.dialog("open");return I};window.openConfirmDialog=function(L){L=L||{};var H=C("#confirm-dialog");if(!H.data("created")){H.dialog({autoOpen:false,modal:true,resizable:false,closeOnEscape:false,showCloseButton:false,create:function(){H.data("created",true)}})}H.dialog("option","title",L.title||"Confirmation");var G=H.find(".dialog-content");var I=G.find(".message");var F=G.find(".icon");if(L.message){I.html(L.message.replace("\n","<br />"))}H.dialog("option","width",(L.width?L.width:500));H.dialog("option","dialogClass","dialog-container confirm-dialog-container dialog-box "+(L.dialogClass||""));F.removeClass(function(M,N){return(N.match(/\S+-icon\b/g)||[]).join(" ")});L.buttonLabel=L.buttonLabel||{};L.buttonLabel.yesLabel=L.buttonLabel.yesLabel||vBulletin.phrase.get("yes");L.buttonLabel.noLabel=L.buttonLabel.noLabel||vBulletin.phrase.get("no");var K=C("#btnConfirmDialogYes").html(L.buttonLabel.yesLabel);var E=C("#btnConfirmDialogNo").html(L.buttonLabel.noLabel);if(L.primaryButton=="yes"){K.addClass("primary").removeClass("secondary");E.addClass("secondary").removeClass("primary")}else{E.addClass("primary").removeClass("secondary");K.addClass("secondary").removeClass("primary")}var J;H.off("dialogopen").on("dialogopen",function(){var N=C("#btnConfirmDialogYes").off("click").on("click",function(){J=this;var P,O;if(typeof L.onClickYes=="function"){P=L.onClickYes.apply(this);if(typeof L.onClickYesWithAjax!="undefined"&&L.onClickYesWithAjax){return false}}if(P===false){return false}if(typeof L.onBeforeClose=="function"){O=L.onBeforeClose.apply(this);if(typeof L.onBeforeCloseWithAjax!="undefined"&&L.onBeforeCloseWithAjax){return false}}if(O===false){return false}H.dialog("close")});if(L.defaultFocus=="yes"){N.focus()}var M=C("#btnConfirmDialogNo").off("click").on("click",function(){J=this;if(typeof L.onClickNo=="function"){L.onClickNo.apply(this)}if(typeof L.onBeforeClose=="function"){L.onBeforeClose.apply(this)}H.dialog("close")});if(L.defaultFocus!="yes"){M.focus()}});H.off("dialogclose").on("dialogclose",function(N,M){if(typeof L.onAfterClose=="function"){L.onAfterClose.apply(J)}});switch(L.iconType){case"warning":F.addClass("warning-icon vb-icon vb-icon-warning");F.show();break;case"question":F.addClass("question-icon");F.show();break;default:F.addClass("no-icon").hide()}H.dialog("open");return H};window.openPromptDialog=function(H){var J=C("#prompt-dialog");if(!J.data("created")){J.dialog({autoOpen:false,modal:true,resizable:false,closeOnEscape:false,showCloseButton:false,width:500,dialogClass:"dialog-container prompt-dialog-container dialog-box",create:function(){J.data("created",true)}})}H=H||{};J.dialog("option","title",H.title||"Prompt");var M=J.find(".dialog-content"),I=M.find(".message"),K;if(H.message){I.html(H.message)}var E=H.initialValue||"";if(!H.multiline){K=J.find("input.input-box").val(E).removeClass("h-hide");K.next().addClass("h-hide");if(Number(H.maxlength)){K.attr("maxlength",Number(H.maxlength))}else{K.removeAttr("maxlength")}M.addClass("table");M.find("> div").addClass("td")}else{K=J.find("textarea.input-box").val(E).removeClass("h-hide");K.prev().addClass("h-hide");M.removeClass("table");M.find("> .td").removeClass("td")}H.buttonLabel=H.buttonLabel||{};H.buttonLabel.okLabel=H.buttonLabel.okLabel||"OK";H.buttonLabel.cancelLabel=H.buttonLabel.cancelLabel||"Cancel";var L=C("#btnPromptDialogOK").html(H.buttonLabel.okLabel),G=C("#btnPromptDialogCancel").html(H.buttonLabel.cancelLabel),F;J.off("dialogopen").on("dialogopen",function(){var O=C("#btnPromptDialogOK").off("click").on("click",function(){F=this;var Q=C.trim(K.val()),P,R;if(H.validation&&typeof H.validation=="object"){if(H.validation.override&&typeof H.validation.custom=="function"){if(!H.validation.custom.apply(this,[K])){return false}}else{switch(H.validation.type){case"number":Q=Number(Q);if(isNaN(Q)){if(H.validation.showError){openAlertDialog({title:J.dialog("option","title"),message:"Input must be a number.",iconType:"warning",onAfterClose:function(){K.trigger("select").trigger("focus")}})}else{K.trigger("select").trigger("focus")}return false}if(H.validation.range&&typeof H.validation.range=="object"){if(Q<H.validation.range.min||Q>H.validation.range.max){if(H.validation.showError){openAlertDialog({title:J.dialog("option","title"),message:"Input must be within "+H.validation.range.min+" - "+H.validation.range.max+" only.",iconType:"warning",onAfterClose:function(){K.trigger("select").trigger("focus")}})}else{K.trigger("select").trigger("focus")}return false}}break;case"string":default:if(!Q){if(H.validation.showError){openAlertDialog({title:J.dialog("option","title"),message:"Input required.",iconType:"warning",onAfterClose:function(){K.trigger("select").trigger("focus")}})}else{K.trigger("select").trigger("focus")}return false}else{if(H.multiline&&Q.length>H.maxlength){if(H.validation.showError){openAlertDialog({title:J.dialog("option","title"),message:"Input too long. Maximum allowed is "+H.maxlength+" characters.",iconType:"warning",onAfterClose:function(){K.trigger("select").trigger("focus")}})}else{K.trigger("select").trigger("focus")}return false}}}if(H.validation.set&&C.isArray(H.validation.set)&&H.validation.set.length>0){if(C.inArray(Q,H.validation.set)==-1){if(H.validation.showError){openAlertDialog({title:J.dialog("option","title"),message:"Input must be one of these: "+H.validation.set.join(", ")+".",iconType:"warning",onAfterClose:function(){K.trigger("select").trigger("focus")}})}else{K.trigger("select").trigger("focus")}return false}}if(typeof H.validation.custom=="function"){if(!H.validation.custom.apply(this,[K])){return false}}}}if(typeof H.onClickOK=="function"){R=H.onClickOK.apply(this,[Q]);if(typeof H.onClickOKWithAjax!="undefined"&&H.onClickOKWithAjax){return false}}if(R===false){return false}if(typeof H.onBeforeClose=="function"){P=H.onBeforeClose.apply(this);if(typeof H.onBeforeCloseWithAjax!="undefined"&&H.onBeforeCloseWithAjax){return false}}if(P===false){return false}J.dialog("close")}).trigger("focus");var N=C("#btnPromptDialogCancel").off("click").on("click",function(){F=this;if(typeof H.onClickCancel=="function"){H.onClickCancel.apply(this)}if(typeof H.onBeforeClose=="function"){H.onBeforeClose.apply(this)}J.dialog("close")})});J.off("dialogclose").on("dialogclose",function(){if(typeof H.onAfterClose=="function"){H.onAfterClose.apply(F);K.val("")}});J.dialog("open");K.trigger("focus");return J};window.openLoadingDialog=function(){console.warn("Function openLoadingDialog is deprecated.");window.vBulletin.loadingIndicator.show("openLoadingDialog")};window.closeLoadingDialog=function(){console.warn("Function closeLoadingDialog is deprecated.");window.vBulletin.loadingIndicator.hide("closeLoadingDialog")};window.bindFormReset=function(E){return C(E).on("reset",function(F,G){if(typeof G=="function"){G()}})};window.vBulletin=window.vBulletin||{};vBulletin.sitebuilder=vBulletin.sitebuilder||{};vBulletin.sitebuilder.toggleSitebuilder=function(E){var F=C(this);if(F.closest("li").hasClass("h-disabled")||F.closest("ul").hasClass("h-disabled")){return true}if(F.hasClass("on")){C.removeCookie(pageData.sb_state_cookie,{path:pageData.cookie_path,domain:pageData.cookie_domain});C("#main-navbar .main-nav").hide();F.removeClass("on");return true}if(C("#main-navbar .main-nav li").length>0){C("#main-navbar .main-nav").show();F.addClass("on");C.cookie(pageData.sb_state_cookie,"1",{path:pageData.cookie_path,domain:pageData.cookie_domain});return true}vBulletin.sitebuilder.loadSitebuilderMarkup(true);return true};vBulletin.sitebuilder.loadSitebuilderMarkup=function(E,G){E=E||false;function F(){if(typeof G=="function"){return G()}}if(C("#sitebuilder-wrapper").is(".js-sb-loaded")){return F()}vBulletin.AJAX({url:vBulletin.getAjaxBaseurl()+"/ajax/activate-sitebuilder",data:{pageid:pageData.pageid,nodeid:pageData.nodeid,userid:pageData.userid,loadMenu:E},cache:false,isAjaxTemplateRender:true,isAjaxTemplateRenderWithData:true,success:function(H){if(H&&H.templates){if(E){C("head").append(H.templates.css);C("#main-navbar .main-nav").hide().html(H.templates.menu)}C("#sitebuilder-wrapper").prepend(H.templates.main);C("#main-navbar .main-nav").show();C(".edit-switch-container .switch-control").addClass("on");C("#sitebuilder-wrapper").addClass("js-sb-loaded");C.cookie(pageData.sb_state_cookie,"1",{path:pageData.cookie_path,domain:pageData.cookie_domain});return F()}else{console.log("activating sitebuilder failed!");openAlertDialog({title:"Error",message:"Error activating SiteBuilder.<br /><br />Please try again.",iconType:"error"})}}})};vBulletin.sitebuilder.menuClickProxy=function(){var E=this;vBulletin.sitebuilder.loadSitebuilderMarkup(false,function(){C("#main-navbar .sb-menu").off("click",vBulletin.sitebuilder.menuClickProxy);C(E).find("a").click()});return false};setTimeout(function(){if(!C.support.selectstart){C.fn.extend({disableSelection:function(){return this.each(function(){C(this).css({"-moz-user-select":"-moz-none","-webkit-user-select":"none","-khtml-user-select":"none","-o-user-select":"none","user-select":"none"})})},enableSelection:function(){return this.each(function(){C(this).css({"-moz-user-select":"","-webkit-user-select":"","-khtml-user-select":"","-o-user-select":"","user-select":""})})}})}function F(){window.vBulletin.loadingIndicator.init();C(document).off("click","a.animate-scroll").on("click","a.animate-scroll",function(){var R=vBulletin.scrollToAnchor(this.hash);if(R){window.location.href=this.href}return false});var Q=function(R){C(this).closest(".split-button").toggleClass("open").find(".submenu").toggleClass("h-hide");C("body").off("click.buttonset").on("click.buttonset",function(S){if(C(S.target).closest(".split-button").length==0){C(".split-button").removeClass("open").find(".submenu").addClass("h-hide");C("body").off("click.buttonset")}})};C(".split-button .button-text").button().closest(".button-set").find(".button-icon").button({text:false,icons:{primary:"vb-icon vb-icon-triangle-down-wide"}}).on("click",Q).closest(".button-set").buttonset().filter(".one-click").find(".button-text").on("click",Q);C(document).off("click",".canvas-widget .toggle-button").on("click",".canvas-widget .toggle-button",function(U,R){var T=C(this),V=T.closest(".canvas-widget");if(T.hasClass("expand")){if(R){C(".widget-content",V).show()}else{C(".widget-content",V).slideDown("slow")}V.removeClass("collapsed")}else{if(R){C(".widget-content",V).hide()}else{C(".widget-content",V).slideUp("slow")}V.addClass("collapsed")}T.toggleClass("collapse expand");var S=T.attr("title");T.attr("title",T.data("toggle-title")).data("toggle-title",S);return false});C(".conversation-toolbar-wrapper form.toolbar-filter-overlay").trigger("reset");var O=!!("placeholder" in document.createElement("input"));if(!O){var N=C("input[placeholder], textarea[placeholder]");N.filter(":focus").addClass("js-temp-focus").blur();N.placeholder();var P=function(S){var R=N.filter(".js-temp-focus").focus();if(S){R.removeClass("js-temp-focus")}};C(window).on("load.placeholder_temp",function(){P(true);C(window).off("load.placeholder_temp")});P()}if(C("textarea.autogrow").length>0){C("textarea.autogrow").elastic().off("blur.elastic")}C(".edit-switch-container .switch-control").on("mousedown",vBulletin.sitebuilder.toggleSitebuilder);C("#main-navbar .lnkAdminCP").removeClass("h-disabled");C("#main-navbar .sb-menu").removeClass("h-disabled").on("click",vBulletin.sitebuilder.menuClickProxy);C("select.custom-dropdown").selectBox();C(document).off("keypress",".js-button").on("keypress",".js-button",function(R){if(R.which==32||R.which==13){if(R.target&&R.target.nodeName&&(R.target.nodeName+"").toLowerCase()=="label"&&C(R.target).find("input").length==1){C(R.target).find("input").trigger("click")}else{C(this).trigger("click")}R.preventDefault()}});C(document).off("keypress",".js-link").on("keypress",".js-link",function(R){if(R.which==13){C(this).trigger("click");R.preventDefault()}});C(".js-debug-collapse-list").next("ol, ul").hide();C(document).off("click",".js-debug-collapse-list").on("click",".js-debug-collapse-list",function(R){C(this).next("ol, ul").toggle()});C(document).off("click",".js-toggle-slider").on("click",".js-toggle-slider",function(){var U=C(this);if(U.is(".b-toggle-slider--yes")){U.removeClass("b-toggle-slider--yes").addClass("b-toggle-slider--no");U.find(".b-toggle-slider__radio--no").prop("checked",true);U.data("value","0")}else{U.removeClass("b-toggle-slider--no").addClass("b-toggle-slider--yes");U.find(".b-toggle-slider__radio--yes").prop("checked",true);U.data("value","1")}var T=C(".js-toggle-slider, .js-toggle-slider__dependent"),R=T.index(U),S=false;T.each(function(V,W){if(V==R){S=true}else{if(S==true){var X=C(this);if(X.is(".js-toggle-slider__dependent")){X.toggleClass("h-hide")}else{S=false;return false}}}});U.trigger("change",U.data("value"));return false});C(".js-select-box").selectBox();C(".mainmenu li:has(.submenu)").on("click",function(R){C(".submenu",this).show();return false}).hover(function(){},function(R){C(".submenu",this).hide()});C(".mainmenu.textControls li").on("click",function(R){if(C(".tagCtrl",this).length==0){C("#tag-dialog").hide()}});C(".mainmenu .submenu li a").on("click",function(R){C(this).closest(".submenu").hide()});C(".channel-content-widget .new-conversation-btn").off("click").on("click",function(){window.location.href=pageData.baseurl+"/new-content/"+pageData.channelid});C(".pagenav-form").submit(function(){if(Number(this.page.value)>0){location.href=this.action+"&p="+this.page.value}return false}).trigger("reset");C(".toolbar-pagenav").off("keydown",".toolbar-pagenav input").on("keydown",".toolbar-pagenav input",function(S){var R=S.which;if(!S.shiftKey&&!S.altKey&&!S.ctrlKey&&((R>=48&&R<=57)||(R>=96&&R<=105)||R==8||R==9||R==13||R==35||R==36||R==37||R==39||R==46||R==45)){return true}return false});C(document).off("click",".js-post__manage").on("click",".js-post__manage",function(){if(typeof vBulletin.inlinemod=="undefined"){var S=vBulletin.getAjaxBaseurl()+"/js/inlinemod.js?v="+pageData.simpleversion,R=this;C.getScript(S,function(){vBulletin.inlinemod.manage_deleted_form.apply(R)}).error(function(){openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("error_loading_inlinemod_script"),iconType:"warning"})})}else{vBulletin.inlinemod.manage_deleted_form.apply(this)}});C(document).off("click",".js-post__show-hide").on("click",".js-post__show-hide",function(){var T=C(this),S=T.text(),R=T.data("toggle-text");if(T.hasClass("js-post__show-hide--show")){T.closest(".js-post").addClass("b-post--show-deleted-content");T.html(R).data("toggle-text",S).removeClass("js-post__show-hide--show")}else{T.closest(".js-post").removeClass("b-post--show-deleted-content");T.html(R).data("toggle-text",S).addClass("js-post__show-hide--show")}});C(document).off("click","a.video-frame").on("click","a.video-frame",function(T){T.preventDefault();var S={code:this.getAttribute("data-vcode"),provider:this.getAttribute("data-vprovider")};if(this.getAttribute("data-height")){S.height=this.getAttribute("data-height")}if(this.getAttribute("data-width")){S.width=this.getAttribute("data-width")}var R=C(this);C.post(vBulletin.getAjaxBaseurl()+"/ajax/render/bbcode_video",S,function(U){if(U){R.replaceWith(U)}},"json")});vBulletin.markreadcheck();C(document).off("click","a.markchannelsread, a.navbar_mark_channels_read").on("click","a.markchannelsread, a.navbar_mark_channels_read",function(){vBulletin.markchannelsread(0,{success:function(){location.reload()},failed:function(){openAlertDialog({title:vBulletin.phrase.get("forum"),message:"Mark Channels Read failed: {0}".format(result),iconType:"error"})}},C(this));return false});C(".js-footer-go-to-top").off("click").on("click",function(R){R.preventDefault();C("body,html").animate({scrollTop:0},800)})}function G(){window.clearTimeout(N);if(pageData.securitytoken!="guest"){var N=window.setTimeout(G,3600000);C.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/replace-securitytoken",data:{securitytoken:pageData.securitytoken},type:"POST",dataType:"json",success:function(P){if(P&&!P.error){var O=0;L(P.newtoken)}else{console.log("/ajax/replace-securitytoken, error: "+error);if(++O==3){L("guest")}}},error:function(Q,P,O){console.log("/ajax/replace-securitytoken, error: "+O);if(++J==3){L("guest")}}})}}function L(N){if(N==""){return }C("form").each(function(){var O=C(this);if(typeof (this.method)!="undefined"&&this.method.toLowerCase()=="post"){if(O.find('input[name="securitytoken"]').length){O.find('input[name="securitytoken"]').val(N)}else{O.append('<input type="hidden" name="securitytoken" value="'+N+'" />')}}});pageData.securitytoken=N;console.log("Securitytoken updated")}function M(){if(typeof (pageData.adminAction)!="undefined"){vBulletin.assertUserHasAdminPermission("canusesitebuilder",self,function(){},function(){window.location.reload()})}if(vBulletin.options.get("crontab")){if(pageData.nextcron<=pageData.current_server_datetime){vBulletin.loadingIndicator.suppressNextAjaxIndicator();C.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/apidetach/cron/run",type:"POST",dataType:"json",success:function(N){if(N&&N.errors){console.warn("Cron error: "+vBulletin.phrase.get(N.errors[0][0]))}console.log("Cron run successfully.")},error:function(P,O,N){console.warn("Error when running cron: {0}".format(N))}})}else{}}}F();C("#searchPopupControl").on("click",function(N){if(C(this).hasClass("open")){C(this).removeClass("open");C("#searchPopupContent").hide()}else{C(this).addClass("open");C("#searchPopupContent").show()}});C("html").on("click",function(N){if(C(N.target).closest("#searchForm").size()==0&&C("#searchPopupControl").hasClass("open")){C("#searchPopupControl").removeClass("open");C("#searchPopupContent").hide()}});C("#btnAdvSearch").off("click").on("click",function(O){O.preventDefault();C(this).data("clicked2submit",1);var N=C("#searchForm");C('<input type="hidden" name="AdvSearch" value="1" />').appendTo(N);N.submit()});C("#searchForm").off("submit.searchform").on("submit.searchform",function(R){var T={},P=C("#q");if(C.trim(P.val()).length>0){T.keywords=C.trim(P.val())}else{if(!C("#btnAdvSearch").data("clicked2submit")){openAlertDialog({title:vBulletin.phrase.get("search"),message:vBulletin.phrase.get("please_provide_search_string"),iconType:"warning",onAfterClose:function(){C("#searchForm #q").focus()}});R.stopPropagation();return false}}var O=C(this).find("#searchPopupContent"),S=O.find(".searchFields_title_only");if(S.size()>0&&S.prop("checked")){T.title_only=1}var N=O.find(".searchFields_author");if(N.size()>0&&N.prop("checked")){T.author=[N.val()]}var Q=O.find(".searchFields_channel");if(Q.size()>0&&Q.prop("checked")){T.channel=[Q.val()]}O.find("input[name=searchJSON]").val(JSON.stringify(T));return true});C(".history-backbutton").off("click").on("click",function(N){history.back()});C(".popupControl[popup-body]").off("click").on("click",function(O){var P=C(this).attr("popup-body");if(!P){return false}var N=C(this).parent().find("."+P);if(!N){return false}C(N).toggleClass("h-hide")});var I;if(!(I=C.cookie(pageData.cookie_prefix+"np_notices_displayed"))){I=new Array()}if(!(I instanceof Array)){I=new Array(I)}C('ul.notices li[data-notice-persistent="0"]').each(function(N){I.push(C(this).attr("data-notice-id"))});if(I.length>0){C.cookie(pageData.cookie_prefix+"np_notices_displayed",I,{path:pageData.cookie_path,domain:pageData.cookie_domain})}else{C.cookie(pageData.cookie_prefix+"np_notices_displayed",null,{path:pageData.cookie_path,domain:pageData.cookie_domain})}C("ul.notices > li > .close").off("click").on("click",function(N){var P=C(this).closest("li"),O=P.attr("data-notice-id");C("body").css("cursor","wait");C.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/api/notice/dismiss",data:{noticeid:O},type:"POST",dataType:"json",complete:function(){C("body").css("cursor","auto")},success:function(Q){if(Q&&!Q.error){console.log("Notice dismissed successfully!");P.hide("slow",function(){if(C(this).parent().find(">li:visible").length==0){C(this).parent().addClass("h-hide")}})}},error:function(S,R,Q){console.log("Notice dismissed failed! error:"+Q);openAlertDialog({title:"Error",message:"Error dismissing the notice.",iconType:"error"})}})});C("#frmActivateuser").ajaxForm({dataType:"json",beforeSubmit:function(Q,P,O){var N="",R="";if(C.trim(C(".username",P).val())==""){N=vBulletin.phrase.get("please_enter_a_username");R=".username"}else{if(C.trim(C(".activateid",P).val())==""){N=vBulletin.phrase.get("requiredfieldmissing",vBulletin.phrase.get("activation_code"));R=".activateid"}}if(N){openAlertDialog({title:vBulletin.phrase.get("error"),message:N,iconType:"warning",onAfterClose:function(){C(R,P).focus()}});return false}return true},success:function(P,R,S,O){if(P&&P.response&&P.response.errors){var T=[];for(var N in P.response.errors){if(P.response.errors[N][0]!="exception_trace"&&P.response.errors[N][0]!="errormsg"){T.push(vBulletin.phrase.get(P.response.errors[N]))}}openAlertDialog({title:vBulletin.phrase.get("error"),message:T.join("<br />"),iconType:"warning",onAfterClose:function(){vBulletin.hv.reset(true)}})}else{var Q=P.response.msg_params;Q.unshift(P.response.msg);openAlertDialog({title:vBulletin.phrase.get("activate_your_account"),message:vBulletin.phrase.get.apply(vBulletin.phrase,Q),onAfterClose:function(){window.location.href=pageData.baseurl}})}}});C("#frmActivateemail").ajaxForm({dataType:"json",beforeSubmit:function(Q,P,O){var N="",R="";if(C.trim(C(".email",P).val())==""){N=vBulletin.phrase.get("please_enter_your_email_address")}else{if(!isValidEmailAddress(C(".email",P).val())){N=vBulletin.phrase.get("invalid_email_address")}}if(N){openAlertDialog({title:vBulletin.phrase.get("error"),message:N,iconType:"warning",onAfterClose:function(){C(R,P).focus()}});return false}return true},success:function(P,R,S,O){if(P&&P.response&&P.response.errors){var T=[];for(var N in P.response.errors){if(P.response.errors[N][0]!="exception_trace"&&P.response.errors[N][0]!="errormsg"){T.push(vBulletin.phrase.get(P.response.errors[N]))}}openAlertDialog({title:vBulletin.phrase.get("error"),message:T.join("<br />"),iconType:"warning",onAfterClose:function(){vBulletin.hv.reset(true)}})}else{var Q=P.response.msg_params;Q.unshift(P.response.msg);openAlertDialog({title:vBulletin.phrase.get("email_activation_codes"),message:vBulletin.phrase.get.apply(vBulletin.phrase,Q),onAfterClose:function(){window.location.href=pageData.baseurl}})}}});var K=C.cookie(pageData.cookie_prefix+"userstyleid");if(K){C(".stylechooser").val(K)}C(".stylechooser").change(function(){var N=C("option:selected",C(this)).val(),O=new Date();O.setDate(O.getDate()+365);C.cookie(pageData.cookie_prefix+"userstyleid",N,{path:pageData.cookie_path,domain:pageData.cookie_domain,expires:O});window.location.reload()});var E=C.cookie(pageData.cookie_prefix+"languageid");if(E){C(".languagechooser").val(E)}C(".languagechooser").change(function(){var N=C("option:selected",C(this)).val(),O=new Date();O.setDate(O.getDate()+365);C.cookie(pageData.cookie_prefix+"languageid",N,{path:pageData.cookie_path,domain:pageData.cookie_domain,expires:O});window.location.reload()});C("a.navbar_profile").on("click",function(){if(pageData.userid=="0"){C("#lnkLoginSignupMenu").click();return false}});L(pageData.securitytoken);var H=window.setTimeout(G,3600000),J=0;setTimeout(M,5)},1);vBulletin.getQueryString=function(F){if(F==""){return{}}var E={};for(var G=0;G<F.length;++G){var H=F[G].split("=");if(H.length!=2){continue}E[H[0]]=decodeURIComponent(H[1].replace(/\+/g," "))}return E};vBulletin.triggerHandler=function(E,G,H){if(!G||G.length==0){G=C(document)}else{if(!(G instanceof C)){G=C(G)}}H=H||[];var F=C.Event(E);F.target=this instanceof C?this.get(0):this;return G.triggerHandler(F,H)}})(jQuery);function JShtmlEncode(B){var A="";if(B&&typeof B!=="undefined"&&B.length>0){A=$("<div/>").text(B).html()}A=String(A).replace(/"/g,"&quot;");return A}function 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=$("<div />").html('<h3><label class="h-left">'+E.title+'</label><label class="h-right btnClose">x</label><div class="h-clear"></div></h3><div class="content"></div><div class="arrow"><div class="arrowOver"></div></div>').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('<span class="text">Loading...</span><span class="loading-icon"><img width="16" height="16" alt="" src="'+pageData.baseurl+'/images/ajax-loader.gif"></span>');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(B<A.left){var G=parseInt(M.css("right"));M.css("left",G);C=G+H;B=N.left+(K/2)-C+(H/2)-2}var J=N.top+I+L;E.dialog.css({left:B,top:J});if(typeof E.ready=="function"){E.ready(E)}}function closePhotoDialog(A){$("#gallery_dialog"+A).close()}function isValidEmailAddress(B){var A=new RegExp(/(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/i);return A.test(B)}function str_repeat(D,C){var B="";for(var A=0;A<C;A++){B=B.concat(D)}return B}function showStatusMessage(A,F){var C=$(".conversation-status-message.notice"),E;if(C.length>0){var B=C.filter("."+F);if(B.length==1){C=B}else{if((E=C.filter(".h-hide")).length==1){C=E}else{C=C.first().clone().removeClass().addClass("conversation-status-message notice").appendTo(".conversation-status-messages")}}C=(B.length==1?B:C).show();if(!vBulletin.isScrolledIntoView(C)){var D=C.offset().top-10;C.hide();$("html,body").animate({scrollTop:D},"slow",function(){C.find("span").html(A).end().addClass(F+" show-x").fadeIn("slow","linear")})}else{if(C.hasClass("h-hide")){C.hide().removeClass("h-hide").addClass(F+" show-x").find("span").html(A).end().fadeIn(800,"linear")}else{C.fadeOut("slow","linear",function(){C.find("span").html(A).end().addClass(F+" show-x").fadeIn("slow","linear")})}}}}window.vBulletin.htmlEntities=function(A){return String(A).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'"'/g,"&quot;")};window.vBulletin.htmlEntities_decode=function(A){return String(A).replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"')};window.vBulletin.loadedIds=window.vBulletin.loadedIds||[];window.vBulletin.isAlreadyLoaded=function(A){if($.inArray(A,window.vBulletin.loadedIds)!=-1){return true}window.vBulletin.loadedIds.push(A)};;

// ***************************
// js.compressed/jquery/jquery.history.min.js
// ***************************
/**
 * History.js jQuery Adapter and History.js Core
 * @author Benjamin Arthur Lupton <contact@balupton.com>
 * @copyright 2010-2011 Benjamin Arthur Lupton <contact@balupton.com>
 * @license New BSD License <http://creativecommons.org/licenses/BSD/>
 *
 * ============ 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<q.length;r++){n(q[r])}b.intervalList=null}};b.debug=function(){if((b.options.debug||false)){b.log.apply(b,arguments)}};b.log=function(){var w=!(typeof d==="undefined"||typeof d.log==="undefined"||typeof d.log.apply==="undefined"),r=i.getElementById("log"),v,u,x,s,q;if(w){s=Array.prototype.slice.call(arguments);v=s.shift();if(typeof d.debug!=="undefined"){d.debug.apply(d,[v,s])}else{d.log.apply(d,[v,s])}}else{v=("\n"+arguments[0]+"\n")}for(u=1,x=arguments.length;u<x;++u){q=arguments[u];if(typeof q==="object"&&typeof m!=="undefined"){try{q=m.stringify(q)}catch(t){}}v+="\n"+q+"\n"}if(r){r.value+=v+"\n-----\n";r.scrollTop=r.scrollHeight-r.clientHeight}else{if(!w){h(v)}}return true};b.getInternetExplorerMajorVersion=function(){var q=b.getInternetExplorerMajorVersion.cached=(typeof b.getInternetExplorerMajorVersion.cached!=="undefined")?b.getInternetExplorerMajorVersion.cached:(function(){var r=3,t=i.createElement("div"),s=t.getElementsByTagName("i");while((t.innerHTML="<!--[if gt IE "+(++r)+"]><i></i><![endif]-->")&&s[0]){}return(r>4)?r:false})();return q};b.isInternetExplorer=function(){var q=b.isInternetExplorer.cached=(typeof b.isInternetExplorer.cached!=="undefined")?b.isInternetExplorer.cached:Boolean(b.getInternetExplorerMajorVersion());return q};b.emulated={pushState:!Boolean(g.history&&g.history.pushState&&g.history.replaceState&&!((/ Mobile\/([1-7][a-z]|(8([abcde]|f(1[0-8]))))/i).test(l.userAgent)||(/AppleWebKit\/5([0-2]|3[0-2])/i).test(l.userAgent))),hashChange:Boolean(!(("onhashchange" in g)||("onhashchange" in i))||(b.isInternetExplorer()&&b.getInternetExplorerMajorVersion()<8))};b.enabled=!b.emulated.pushState;b.bugs={setHash:Boolean(!b.emulated.pushState&&l.vendor==="Apple Computer, Inc."&&/AppleWebKit\/5([0-2]|3[0-3])/.test(l.userAgent)),safariPoll:Boolean(!b.emulated.pushState&&l.vendor==="Apple Computer, Inc."&&/AppleWebKit\/5([0-2]|3[0-3])/.test(l.userAgent)),ieDoubleCheck:Boolean(b.isInternetExplorer()&&b.getInternetExplorerMajorVersion()<8),hashEscape:Boolean(b.isInternetExplorer()&&b.getInternetExplorerMajorVersion()<7)};b.isEmptyObject=function(r){for(var q in r){return false}return true};b.cloneObject=function(s){var r,q;if(s){r=m.stringify(s);q=m.parse(r)}else{q={}}return q};b.getRootUrl=function(){var q=i.location.protocol+"//"+(i.location.hostname||i.location.host);if(i.location.port||false){q+=":"+i.location.port}q+="/";return q};b.getBaseHref=function(){var q=i.getElementsByTagName("base"),s=null,r="";if(q.length===1){s=q[0];r=s.href.replace(/[^\/]+$/,"")}r=r.replace(/\/+$/,"");if(r){r+="/"}return r};b.getBaseUrl=function(){var q=b.getBaseHref()||b.getBasePageUrl()||b.getRootUrl();return q};b.getPageUrl=function(){var q=b.getState(false,false),s=(q||{}).url||i.location.href,r;r=s.replace(/\/+$/,"").replace(/[^\/]+$/,function(v,u,t){return(/\./).test(v)?v:v+"/"});return r};b.getBasePageUrl=function(){var q=i.location.href.replace(/[#\?].*/,"").replace(/[^\/]+$/,function(t,s,r){return(/[^\/]$/).test(t)?"":t}).replace(/\/+$/,"")+"/";return q};b.getFullUrl=function(r,t){var q=r,s=r.substring(0,1);t=(typeof t==="undefined")?true:t;if(/[a-z]+\:\/\//.test(r)){}else{if(s==="/"){q=b.getRootUrl()+r.replace(/^\/+/,"")}else{if(s==="#"){q=b.getPageUrl().replace(/#.*/,"")+r}else{if(s==="?"){q=b.getPageUrl().replace(/[\?#].*/,"")+r}else{if(t){q=b.getBaseUrl()+r.replace(/^(\.\/)+/,"")}else{q=b.getBasePageUrl()+r.replace(/^(\.\/)+/,"")}}}}}return q.replace(/\#$/,"")};b.getShortUrl=function(s){var r=s,t=b.getBaseUrl(),q=b.getRootUrl();if(b.emulated.pushState){r=r.replace(t,"")}r=r.replace(q,"/");if(b.isTraditionalAnchor(r)){r="./"+r}r=r.replace(/^(\.\/)+/g,"./").replace(/\#$/,"");return r};b.store={};b.idToState=b.idToState||{};b.stateToId=b.stateToId||{};b.urlToId=b.urlToId||{};b.storedStates=b.storedStates||[];b.savedStates=b.savedStates||[];b.normalizeStore=function(){b.store.idToState=b.store.idToState||{};b.store.urlToId=b.store.urlToId||{};b.store.stateToId=b.store.stateToId||{}};b.getState=function(s,r){if(typeof s==="undefined"){s=true}if(typeof r==="undefined"){r=true}var q=b.getLastSavedState();if(!q&&r){q=b.createStateObject()}if(s){q=b.cloneObject(q);q.url=q.cleanUrl||q.url}return q};b.getIdByState=function(q){var s=b.extractId(q.url),r;if(!s){r=b.getStateString(q);if(typeof b.stateToId[r]!=="undefined"){s=b.stateToId[r]}else{if(typeof b.store.stateToId[r]!=="undefined"){s=b.store.stateToId[r]}else{while(true){s=(new Date()).getTime()+String(Math.random()).replace(/\D/g,"");if(typeof b.idToState[s]==="undefined"&&typeof b.store.idToState[s]==="undefined"){break}}b.stateToId[r]=s;b.idToState[s]=q}}}return s};b.normalizeState=function(r){var s,q;if(!r||(typeof r!=="object")){r={}}if(typeof r.normalized!=="undefined"){return r}if(!r.data||(typeof r.data!=="object")){r.data={}}s={};s.normalized=true;s.title=r.title||"";s.url=b.getFullUrl(b.unescapeString(r.url||i.location.href));s.hash=b.getShortUrl(s.url);s.data=b.cloneObject(r.data);s.id=b.getIdByState(s);s.cleanUrl=s.url.replace(/\??\&_suid.*/,"");s.url=s.cleanUrl;q=!b.isEmptyObject(s.data);if(s.title||q){s.hash=b.getShortUrl(s.url).replace(/\??\&_suid.*/,"");if(!/\?/.test(s.hash)){s.hash+="?"}s.hash+="&_suid="+s.id}s.hashedUrl=b.getFullUrl(s.hash);if((b.emulated.pushState||b.bugs.safariPoll)&&b.hasUrlDuplicate(s)){s.url=s.hashedUrl}return s};b.createStateObject=function(s,t,r){var q={data:s,title:t,url:r};q=b.normalizeState(q);return q};b.getStateById=function(r){r=String(r);var q=b.idToState[r]||b.store.idToState[r]||a;return q};b.getStateString=function(r){var q,s,t;q=b.normalizeState(r);s={data:q.data,title:r.title,url:r.url};t=m.stringify(s);return t};b.getStateId=function(r){var q,s;q=b.normalizeState(r);s=q.id;return s};b.getHashByState=function(r){var q,s;q=b.normalizeState(r);s=q.hash;return s};b.extractId=function(s){var t,r,q;r=/(.*)\&_suid=([0-9]+)$/.exec(s);q=r?(r[1]||s):s;t=r?String(r[2]||""):"";return t||false};b.isTraditionalAnchor=function(r){var q=!(/[\/\?\.]/.test(r));return q};b.extractState=function(t,s){var q=null,u,r;s=s||false;u=b.extractId(t);if(u){q=b.getStateById(u)}if(!q){r=b.getFullUrl(t);u=b.getIdByUrl(r)||false;if(u){q=b.getStateById(u)}if(!q&&s&&!b.isTraditionalAnchor(t)){q=b.createStateObject(null,null,r)}}return q};b.getIdByUrl=function(q){var r=b.urlToId[q]||b.store.urlToId[q]||a;return r};b.getLastSavedState=function(){return b.savedStates[b.savedStates.length-1]||a};b.getLastStoredState=function(){return b.storedStates[b.storedStates.length-1]||a};b.hasUrlDuplicate=function(s){var r=false,q;q=b.extractState(s.url);r=q&&q.id!==s.id;return r};b.storeState=function(q){b.urlToId[q.url]=q.id;b.storedStates.push(b.cloneObject(q));return q};b.isLastSavedState=function(t){var s=false,r,q,u;if(b.savedStates.length){r=t.id;q=b.getLastSavedState();u=q.id;s=(r===u)}return s};b.saveState=function(q){if(b.isLastSavedState(q)){return false}b.savedStates.push(b.cloneObject(q));return true};b.getStateByIndex=function(r){var q=null;if(typeof r==="undefined"){q=b.savedStates[b.savedStates.length-1]}else{if(r<0){q=b.savedStates[b.savedStates.length+r]}else{q=b.savedStates[r]}}return q};b.getHash=function(){var q=b.unescapeHash(i.location.hash);return q};b.unescapeString=function(s){var q=s,r;while(true){r=g.unescape(q);if(r===q){break}q=r}return q};b.unescapeHash=function(r){var q=b.normalizeHash(r);q=b.unescapeString(q);return q};b.normalizeHash=function(r){var q=r.replace(/[^#]*#/,"").replace(/#.*/,"");return q};b.setHash=function(u,r){var q,s,t;if(r!==false&&b.busy()){b.pushQueue({scope:b,callback:b.setHash,args:arguments,queue:r});return false}q=b.escapeHash(u);b.busy(true);s=b.extractState(u,true);if(s&&!b.emulated.pushState){b.pushState(s.data,s.title,s.url,false)}else{if(i.location.hash!==q){if(b.bugs.setHash){t=b.getPageUrl();b.pushState(null,null,t+"#"+q,false)}else{i.location.hash=q}}}return b};b.escapeHash=function(r){var q=b.normalizeHash(r);q=g.escape(q);if(!b.bugs.hashEscape){q=q.replace(/\%21/g,"!").replace(/\%26/g,"&").replace(/\%3D/g,"=").replace(/\%3F/g,"?")}return q};b.getHashByUrl=function(q){var r=String(q).replace(/([^#]*)#?([^#]*)#?(.*)/,"$2");r=b.unescapeHash(r);return r};b.setTitle=function(s){var t=s.title,r;if(!t){r=b.getStateByIndex(0);if(r&&r.url===s.url){t=r.title||b.options.initialTitle}}try{i.getElementsByTagName("title")[0].innerHTML=t.replace("<","&lt;").replace(">","&gt;").replace(" & "," &amp; ")}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('<a class="selectBox" />'),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("<li><a>\u00A0</a></li>");var n=parseInt(f.find(".selectBox-options A:first").html("&nbsp;").outerHeight());f.remove();d.height(n*p)}I(d)}else{var j=A('<span class="selectBox-label" />'),m=A('<span class="selectBox-arrow" />');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("<li>\u00A0</li>")}}else{var k=A('<li class="selectBox-optgroup" />');k.text(A(this).attr("label"));j.append(k);j=d(A(this),j)}});return j};switch(h){case"inline":e=A('<ul class="selectBox-options" />');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('<ul class="selectBox-dropdown-menu selectBox-options" />');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<f.length;h++){if(A(this).attr("rel")==f[h]){A(this).parent().addClass("selectBox-selected")}}}else{if(A(this).attr("rel")==f){A(this).parent().addClass("selectBox-selected")}}});if(e.change){e.change.call(c)}};var V=function(l,m){l=A(l);var f=l.data("selectBox-control")||A(),d=l.data("selectBox-settings")||{};switch(typeof (b)){case"string":l.html(b);break;case"object":l.html("");for(var g in b){if(b[g]===null){continue}if(typeof (b[g])==="object"){var c=A('<optgroup label="'+g+'" />');for(var e in b[g]){c.append('<option value="'+e+'">'+b[g][e]+"</option>")}l.append(c)}else{var h=A('<option value="'+g+'">'+b[g]+"</option>");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("<li />"),d=A("<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:"<div></div>",buttonPrevHTML:"<div></div>",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<n.length;k++){if(n[k].indexOf("jcarousel-skin")!=-1){c(l).removeClass(n[k]);q=n[k];break}}if(l.nodeName.toUpperCase()=="UL"||l.nodeName.toUpperCase()=="OL"){this.list=c(l);this.clip=this.list.parents(".jcarousel-clip");this.container=this.list.parents(".jcarousel-container")}else{this.container=c(l);this.list=this.container.find("ul,ol").eq(0);this.clip=this.container.find(".jcarousel-clip")}if(this.clip.size()===0){this.clip=this.list.wrap("<div></div>").parent()}if(this.container.size()===0){this.container=this.clip.wrap("<div></div>").parent()}if(q!==""&&this.container.parent()[0].className.indexOf("jcarousel-skin")==-1){this.container.wrap('<div class=" '+q+'"></div>')}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<g.first){e=f}});this.list.css(this.wh,f+"px");this.list.css(this.lt,-e+"px")}this.scroll(this.first,false)},lock:function(){this.locked=true;this.buttons()},unlock:function(){this.locked=false;this.buttons()},size:function(e){if(e!==undefined){this.options.size=e;if(!this.locked){this.buttons()}}return this.options.size},has:function(g,h){if(h===undefined||!h){h=g}if(this.options.size!==null&&h>this.options.size){h=this.options.size}for(var f=g;f<=h;f++){var k=this.get(f);if(!k.length||k.hasClass("jcarousel-item-placeholder")){return false}}return true},get:function(e){return c(">.jcarousel-item-"+e,this.list)},add:function(l,q){var m=this.get(l),h=0,g=c(q);if(m.length===0){var p,k=a.intval(l);m=this.create(l);while(true){p=this.get(--k);if(k<=0||p.length){if(k<=0){this.list.prepend(m)}else{p.after(m)}break}}}else{h=this.dimension(m)}if(g.get(0).nodeName.toUpperCase()=="LI"){m.replaceWith(g);m=g}else{m.empty().append(q)}this.format(m.removeClass(this.className("jcarousel-item-placeholder")),l);var o=this.options.visible!==null?Math.ceil(this.clipping()/this.options.visible):null;var f=this.dimension(m,o)-h;if(l>0&&l<this.first){this.list.css(this.lt,a.intval(this.list.css(this.lt))-f+"px")}this.list.css(this.wh,a.intval(this.list.css(this.wh))+f+"px");return m},remove:function(f){var g=this.get(f);if(!g.length||(f>=this.first&&f<=this.last)){return}var h=this.dimension(g);if(f<this.first){this.list.css(this.lt,a.intval(this.list.css(this.lt))+h+"px")}g.remove();this.list.css(this.wh,a.intval(this.list.css(this.wh))-h+"px")},next:function(){if(this.tail!==null&&!this.inTail){this.scrollTail(false)}else{this.scroll(((this.options.wrap=="both"||this.options.wrap=="last")&&this.options.size!==null&&this.last==this.options.size)?1:this.first+this.options.scroll)}},prev:function(){if(this.tail!==null&&this.inTail){this.scrollTail(true)}else{this.scroll(((this.options.wrap=="both"||this.options.wrap=="first")&&this.options.size!==null&&this.first==1)?this.options.size:this.first-this.options.scroll)}},scrollTail:function(e){if(this.locked||this.animating||!this.tail){return}this.pauseAuto();var f=a.intval(this.list.css(this.lt));f=!e?f-this.tail:f+this.tail;this.inTail=!e;this.prevFirst=this.first;this.prevLast=this.last;this.animate(f)},scroll:function(f,e){if(this.locked||this.animating){return}this.pauseAuto();this.animate(this.pos(f),e)},pos:function(C,k){var n=a.intval(this.list[0].style[this.lt]);if(this.locked||this.animating){return n}if(this.options.wrap!="circular"){C=C<1?1:(this.options.size&&C>this.options.size?this.options.size:C)}var z=this.first>C;var E=this.options.wrap!="circular"&&this.first<=1?1:this.first;var H=z?this.get(E):this.get(this.last);var B=z?E:E-1;var F=null,A=0,w=false,G=0,D;while(z?--B>=C:++B<C){F=this.get(B);w=!F.length;if(F.length===0){F=this.create(B).addClass(this.className("jcarousel-item-placeholder"));H[z?"before":"after"](F);if(this.first!==null&&this.options.wrap=="circular"&&this.options.size!==null&&(B<=0||B>this.options.size)){D=this.get(this.index(B));if(D.length){F=this.add(B,D.clone(true))}}}H=F;G=this.dimension(F);if(w){A+=G}if(this.first!==null&&(this.options.wrap=="circular"||(B>=1&&(this.options.size===null||B<=this.options.size)))){n=z?n+G:n-G}}var s=this.clipping(),u=[],h=0,t=0;H=this.get(C-1);B=C;while(++h){F=this.get(B);w=!F.length;if(F.length===0){F=this.create(B).addClass(this.className("jcarousel-item-placeholder"));if(H.length===0){this.list.prepend(F)}else{H[z?"before":"after"](F)}if(this.first!==null&&this.options.wrap=="circular"&&this.options.size!==null&&(B<=0||B>this.options.size)){D=this.get(this.index(B));if(D.length){F=this.add(B,D.clone(true))}}}H=F;G=this.dimension(F);if(G===0){throw new Error("jCarousel: No width/height set for items. This will cause an infinite loop. Aborting...")}if(this.options.wrap!="circular"&&this.options.size!==null&&B>this.options.size){u.push(F)}else{if(w){A+=G}}t+=G;if(t>=s){break}B++}for(var r=0;r<u.length;r++){u[r].remove()}if(A>0){this.list.css(this.wh,this.dimension(this.list)+A+"px");if(z){n-=A;this.list.css(this.lt,a.intval(this.list.css(this.lt))-A+"px")}}var q=C+h-1;if(this.options.wrap!="circular"&&this.options.size&&q>this.options.size){q=this.options.size}if(B>q){h=0;B=q;t=0;while(++h){F=this.get(B--);if(!F.length){break}t+=this.dimension(F);if(t>=s){break}}}var o=q-h+1;if(this.options.wrap!="circular"&&o<1){o=1}if(this.inTail&&z){n+=this.tail;this.inTail=false}this.tail=null;if(this.options.wrap!="circular"&&q==this.options.size&&(q-h+1)>=1){var y=a.intval(this.get(q).css(!this.options.vertical?"marginRight":"marginBottom"));if((t-y)>s){this.tail=t-s-y}}if(k&&C===this.options.size&&this.tail){n-=this.tail;this.inTail=true}while(C-->o){n+=this.dimension(this.get(C))}this.prevFirst=this.first;this.prevLast=this.last;this.first=o;this.last=q;return n},animate:function(i,e){if(this.locked||this.animating){return}this.animating=true;var f=this;var g=function(){f.animating=false;if(i===0){f.list.css(f.lt,0)}if(!f.autoStopped&&(f.options.wrap=="circular"||f.options.wrap=="both"||f.options.wrap=="last"||f.options.size===null||f.last<f.options.size||(f.last==f.options.size&&f.tail!==null&&!f.inTail))){f.startAuto()}f.buttons();f.notify("onAfterAnimation");if(f.options.wrap=="circular"&&f.options.size!==null){for(var k=f.prevFirst;k<=f.prevLast;k++){if(k!==null&&!(k>=f.first&&k<=f.last)&&(k<1||k>f.options.size)){f.remove(k)}}}};this.notify("onBeforeAnimation");if(!this.options.animation||e===false){this.list.css(this.lt,i+"px");g()}else{var j=!this.options.vertical?(this.options.rtl?{right:i}:{left:i}):{top:i};var h={duration:this.options.animation,easing:this.options.easing,complete:g};if(c.isFunction(this.options.animationStepCallback)){h.step=this.options.animationStepCallback}this.list.animate(j,h)}},startAuto:function(f){if(f!==undefined){this.options.auto=f}if(this.options.auto===0){return this.stopAuto()}if(this.timer!==null){return}this.autoStopped=false;var e=this;this.timer=window.setTimeout(function(){e.next()},this.options.auto*1000)},stopAuto:function(){this.pauseAuto();this.autoStopped=true},pauseAuto:function(){if(this.timer===null){return}window.clearTimeout(this.timer);this.timer=null},buttons:function(g,f){if(g==null){g=!this.locked&&this.options.size!==0&&((this.options.wrap&&this.options.wrap!="first")||this.options.size===null||this.last<this.options.size);if(!this.locked&&(!this.options.wrap||this.options.wrap=="first")&&this.options.size!==null&&this.last>=this.options.size){g=this.tail!==null&&!this.inTail}}if(f==null){f=!this.locked&&this.options.size!==0&&((this.options.wrap&&this.options.wrap!="last")||this.first>1);if(!this.locked&&(!this.options.wrap||this.options.wrap=="last")&&this.options.size!==null&&this.first==1){f=this.tail!==null&&this.inTail}}var e=this;if(this.buttonNext.size()>0){this.buttonNext.unbind(this.options.buttonNextEvent+".jcarousel",this.funcNext);if(g){this.buttonNext.bind(this.options.buttonNextEvent+".jcarousel",this.funcNext)}this.buttonNext[g?"removeClass":"addClass"](this.className("jcarousel-next-disabled")).attr("disabled",g?false:true);if(this.options.buttonNextCallback!==null&&this.buttonNext.data("jcarouselstate")!=g){this.buttonNext.each(function(){e.options.buttonNextCallback(e,this,g)}).data("jcarouselstate",g)}}else{if(this.options.buttonNextCallback!==null&&this.buttonNextState!=g){this.options.buttonNextCallback(e,null,g)}}if(this.buttonPrev.size()>0){this.buttonPrev.unbind(this.options.buttonPrevEvent+".jcarousel",this.funcPrev);if(f){this.buttonPrev.bind(this.options.buttonPrevEvent+".jcarousel",this.funcPrev)}this.buttonPrev[f?"removeClass":"addClass"](this.className("jcarousel-prev-disabled")).attr("disabled",f?false:true);if(this.options.buttonPrevCallback!==null&&this.buttonPrev.data("jcarouselstate")!=f){this.buttonPrev.each(function(){e.options.buttonPrevCallback(e,this,f)}).data("jcarouselstate",f)}}else{if(this.options.buttonPrevCallback!==null&&this.buttonPrevState!=f){this.options.buttonPrevCallback(e,null,f)}}this.buttonNextState=g;this.buttonPrevState=f},notify:function(e){var f=this.prevFirst===null?"init":(this.prevFirst<this.first?"next":"prev");this.callback("itemLoadCallback",e,f);if(this.prevFirst!==this.first){this.callback("itemFirstInCallback",e,f,this.first);this.callback("itemFirstOutCallback",e,f,this.prevFirst)}if(this.prevLast!==this.last){this.callback("itemLastInCallback",e,f,this.last);this.callback("itemLastOutCallback",e,f,this.prevLast)}this.callback("itemVisibleInCallback",e,f,this.first,this.last,this.prevFirst,this.prevLast);this.callback("itemVisibleOutCallback",e,f,this.prevFirst,this.prevLast,this.first,this.last)},callback:function(j,m,e,k,h,g,f){if(this.options[j]==null||(typeof this.options[j]!="object"&&m!="onAfterAnimation")){return}var n=typeof this.options[j]=="object"?this.options[j][m]:this.options[j];if(!c.isFunction(n)){return}var o=this;if(k===undefined){n(o,e,m)}else{if(h===undefined){this.get(k).each(function(){n(o,this,k,e,m)})}else{var p=function(q){o.get(q).each(function(){n(o,this,q,e,m)})};for(var l=k;l<=h;l++){if(l!==null&&!(l>=g&&l<=f)){p(l)}}}}},create:function(e){return this.format("<li></li>",e)},destroy:function(){this.reset();c(window).unbind(".jcarousel");this.list.removeData("jcarousel");this.container.removeData("jcarousel");this.buttonNext.removeData("jcarouselstate").remove();this.buttonPrev.removeData("jcarouselstate").remove();return this},format:function(k,h){k=c(k);var g=k.get(0).className.split(" ");for(var f=0;f<g.length;f++){if(g[f].indexOf("jcarousel-")!=-1){k.removeClass(g[f])}}k.addClass(this.className("jcarousel-item")).addClass(this.className("jcarousel-item-"+h)).css({"float":(this.options.rtl?"right":"left"),"list-style":"none"}).attr("jcarouselindex",h);return k},className:function(e){return e+" "+e+(!this.options.vertical?"-horizontal":"-vertical")},dimension:function(h,i){var g=c(h);if(i==null){return !this.options.vertical?(g.outerWidth(true)||a.intval(this.options.itemFallbackDimension)):(g.outerHeight(true)||a.intval(this.options.itemFallbackDimension))}else{var f=!this.options.vertical?i-a.intval(g.css("marginLeft"))-a.intval(g.css("marginRight")):i-a.intval(g.css("marginTop"))-a.intval(g.css("marginBottom"));c(g).css(this.wh,f+"px");return this.dimension(g)}},clipping:function(){return !this.options.vertical?this.clip[0].offsetWidth-a.intval(this.clip.css("borderLeftWidth"))-a.intval(this.clip.css("borderRightWidth")):this.clip[0].offsetHeight-a.intval(this.clip.css("borderTopWidth"))-a.intval(this.clip.css("borderBottomWidth"))},index:function(e,f){if(f==null){f=this.options.size}return Math.round((((e-1)/f)-Math.floor((e-1)/f))*f)+1}});a.extend({defaults:function(e){return c.extend(d,e||{})},intval:function(e){e=parseInt(e,10);return isNaN(e)?0:e},windowLoaded:function(){b=true}});c.fn.jcarousel=function(g){if(typeof g=="string"){var e=c(this).data("jcarousel"),f=Array.prototype.slice.call(arguments,1);if(typeof e!="undefined"){return e[g].apply(e,f)}return this}else{return this.each(function(){var h=c(this).data("jcarousel");if(h){if(g){c.extend(h.options,g)}h.reload()}else{c(this).data("jcarousel",new a(this,g))}})}}})(jQuery);
;

// ***************************
// js.compressed/history.js
// ***************************
/*=======================================================================*\
|| ###################################################################### ||
|| # vBulletin 5.1.9 Patch Level 4
|| # ------------------------------------------------------------------ # ||
|| # Copyright 2000-2016 vBulletin Solutions Inc. All Rights Reserved.  # ||
|| # This file may not be redistributed in whole or significant part.   # ||
|| # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html   # ||
|| ###################################################################### ||
\*========================================================================*/
(function(C){var B=window.History,A=B&&!!B.enabled;window.vBulletin=window.vBulletin||{};window.vBulletin.history=window.vBulletin.history||{};B.options.transformHash=false;vBulletin.history.instance=function(F){var E=true,D=!!F&&A;this.isEnabled=function(){return D};this.setDefaultState=function(I,J,G){if(D){E=false;var H=vBulletin.parseUrl(G);G=decodeURI(H.pathname)+decodeURIComponent(H.search);B.replaceState(I,J,G);E=true}};this.setStateChange=function(I,G){if(D){var H="statechange"+(G?"."+G:"");B.Adapter.bind(window,H,function(J){if(E){I.apply(this,C.makeArray(arguments))}})}};this.pushState=function(I,J,G){if(D){E=false;var H=vBulletin.parseUrl(G);G=decodeURI(H.pathname)+decodeURIComponent(H.search);B.pushState(I,J,G);E=true}};this.getState=function(){if(D){return B.getState()}};this.log=function(){if(D){B.log.call(window,arguments)}};if(D){if(!C(window).data("hashchange.history")){B.Adapter.bind(window,"hashchange.history",function(L){var H=location.hash,I,K;if(E&&H){K=H.match(/#post(\d+)/);if(K&&(Number(K[1])+"")===K[1]&&Number(K[1])>1&&C(H).length==0&&C(".conversation-content-widget").length){var J=vBulletin.parseUrl(location.href),G=[J.pathname,J.search,(J.search?"&":"?"),"p=",K[1],K[0]];location.replace(G.join(""))}else{setTimeout(function(){history.back()},0);I=vBulletin.scrollToAnchor(H);if(I){window.scrollTo(0,0)}}}})}C(window).data("hashchange.history",true)}return this}})(jQuery);;

// ***************************
// js.compressed/autocomplete.js
// ***************************
/*=======================================================================*\
|| ###################################################################### ||
|| # vBulletin 5.1.9 Patch Level 4
|| # ------------------------------------------------------------------ # ||
|| # Copyright 2000-2016 vBulletin Solutions Inc. All Rights Reserved.  # ||
|| # This file may not be redistributed in whole or significant part.   # ||
|| # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html   # ||
|| ###################################################################### ||
\*========================================================================*/
window.vBulletin=window.vBulletin||{};window.vBulletin.phrase=window.vBulletin.phrase||{};window.vBulletin.phrase.precache=window.vBulletin.phrase.precache||[];window.vBulletin.phrase.precache=$.merge(window.vBulletin.phrase.precache,[]);var vBulletin_Autocomplete=function(V,c){var B=$(V),a=c.apiClass||null,L=c.apiFunction||"getAutocomplete",e=c.delay||500,d=c.minLength||3,Z=c.maxItems||false,F=B.attr("name")||"autocompleteElements",J=c.containerClass||"entry-field",K=c.placeholderText,P=((typeof c.autoFocus!="undefined")?c.autoFocus:false),G=((typeof c.appendTo!="undefined")?c.appendTo:"body"),N=[],A=B.parent(".autocomplete-container"),g=A.find(".autocompleteHelper"),b=false,T=false,R=B.siblings(".autocomplete-box"),I=c.beforeAdd||false,H=c.afterAdd||false,E=c.beforeDelete||false,C=c.afterDelete||false,O=this,Y=c.editorContext||null,X=function(){if(A.length==0){B.wrap('<div class="autocomplete-container" />');A=B.parent(".autocomplete-container");A.addClass(J).on("mousedown",function(m){var i=this;setTimeout(function(){var n=$(".autocompleteHelper:visible",i);if(n.length>0){n[0].focus()}},10);return false})}if(R.length==0){R=$("<div />").addClass("autocomplete-box").insertBefore(B)}if(g.length==0){g=$('<input type="text" name="autocompleteHelper" />').addClass("autocompleteHelper b-form-input__input--hide-clear-button").attr("placeholder",function(){return K?K:null}).attr("maxlength",function(){return B.attr("maxlength")?B.attr("maxlength"):null}).insertAfter(R)}g.attr("tabindex",B.attr("tabindex")||0);g.off("keydown").on("keydown",function(m){if(m.which==13){var i=$(m.target).val();if(i.length>=d){S(i,true,m)}}});g.off("blur").on("blur",function(i){b=window.setTimeout(function(){if(!T){var m=g.val();if(m.length>=d){S(m,true,i)}}T=false;b=false},200)});g.off("focus").on("focus",function(i){T=b?true:false;return false});var j=["font-family","font-size","font-weight","font-style","color","line-height","height"];var k;for(k=0;k<j.length;++k){A.css(j[k],B.css(j[k]))}var h='<input type="hidden" name="'+F+'"';if(B.attr("id")){h+=' id="'+B.attr("id")+'"'}if(B.attr("class")){h+=' class="'+B.attr("class")+'"'}if(B.attr("data-value")){var l=B.attr("data-value").split(",")}h+=" />";B.replaceWith(h);B=A.find('[name="'+F+'"]');g.autocomplete({autoFocus:P,appendTo:G,delay:e,minLength:d,search:function(i,m){console.log("searching for "+this.value)},source:function(i,m){console.log("getting source for "+i.term);vBulletin.AJAX({url:vBulletin.getAjaxBaseurl()+"/ajax/api/"+a+"/"+L,data:({searchStr:i.term}),success:function(o){console.log("got source for "+i.term+":");if(o&&$.isArray(o.suggestions)){var n=[];$.each(o.suggestions,function(p,q){if(Y&&Y.type=="tags"){n.push({label:q.title,value:pageData.userid})}else{n.push({label:q.title,value:q.value})}});m(n)}else{console.log("/ajax/api/"+a+"/"+L+" successful, but response was not an array");openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("invalid_server_response_please_try_again"),iconType:"error"})}},error_phrase:"error_getting_suggestions"})},select:function(m,i){O.addElement(i.item.label,i.item.value);g.val("");m.preventDefault()},focus:function(m,i){g.val(i.item.label);m.preventDefault()}});R.delegate(".element-x","click",function(p){var n=$(this).closest(".autocomplete");var m=n.find(".element-text").text().toLowerCase();var i=[];var o=false;$(N).each(function(q,r){if(r.label.toLowerCase()==m){o=r}else{i.push(r)}});if(typeof E=="function"){if(!E.call(this,o.label,o.data)){return false}}N=i;n.remove();f();if(typeof C=="function"){C.call(this,o.label,o.data)}});A.off("click").on("click",function(i){if(!$(i.target).hasClass("ui-autocomplete-input")){$(".ui-autocomplete-input",$(this)).focus()}return false});if(l){W.call(this,l)}},M=function(l,k){if(l==""){return false}if(typeof I=="function"){if(!I.call(this,l,k)){return false}}var j=true;$(N).each(function(n,o){if(o.label==l){j=false}});if(!j){return false}if(Z){if(N.length>=Z){return false}}var m=$("<div />").addClass("element-x vb-icon vb-icon-x-blue").text("X");var h=$("<div />").addClass("element-text").text(l);var i=$("<div />").addClass("autocomplete").append(h).append(m).appendTo(R);N.push({label:l,value:k});f();if(typeof H=="function"){H.call(this,l,k)}R.show();return true},W=function(k){var h=k.length,j;for(j=0;j<h;++j){M(k[j])}},U=function(h){Q();W(h)},Q=function(){R.html("");g.val("");N=[];f()},f=function(){var h=[];$(N).each(function(i,j){h.push(j.label)});B.val(h.join(","))},D=function(){return d},S=function(j,h,i){if(Y){switch(Y.type){case"tags":Y.context.addTag(j);break;default:break}}else{O.addElement(j,j);g.val("")}if(typeof h!=="undefined"&&typeof i!=="undefined"){i.preventDefault();return false}};X.call(this);this.addElement=function(i,h){return M.call(this,i,h)};this.addElements=function(h){W.call(this,h)};this.setElements=function(h){U.call(this,h)};this.getElements=function(){return N};this.getLabels=function(){var h=[];$(N).each(function(i,j){h.push(j.label)});return h};this.getValues=function(){var h=[];$(N).each(function(i,j){h.push(j.value)});return h};this.getInputField=function(){return g};this.clearElements=function(){return Q.call(this)};this.countElements=function(){return $(N).length};this.getMinLength=function(){return D()}};;

// ***************************
// js.compressed/poll.js
// ***************************
/*=======================================================================*\
|| ###################################################################### ||
|| # vBulletin 5.1.9 Patch Level 4
|| # ------------------------------------------------------------------ # ||
|| # Copyright 2000-2016 vBulletin Solutions Inc. All Rights Reserved.  # ||
|| # This file may not be redistributed in whole or significant part.   # ||
|| # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html   # ||
|| ###################################################################### ||
\*========================================================================*/
window.vBulletin=window.vBulletin||{};window.vBulletin.phrase=window.vBulletin.phrase||{};window.vBulletin.phrase.precache=window.vBulletin.phrase.precache||[];window.vBulletin.phrase.precache=$.merge(window.vBulletin.phrase.precache,["vote_failed","vote_now","vote_first","vote_error_retrieving","votes","vote"]);window.vBulletin.options=window.vBulletin.options||{};window.vBulletin.options.precache=window.vBulletin.options.precache||[];window.vBulletin.options.precache=$.merge(window.vBulletin.options.precache,["maxpolloptions"]);(function(A){A(document).ready(function(){function E(I){var H=window.vBulletin.options.get("maxpolloptions"),G=(H>3)?3:H;I.off("click",".js-poll__view-results").on("click",".js-poll__view-results",function(L){L.preventDefault();var K=A(this).attr("data-nodeid"),J=A(this).closest("form");A.post(vBulletin.getAjaxBaseurl()+"/poll/get",{nodeid:K},function(M){B(J,M)},"json")});I.off("click",".js-poll__back-to-poll").on("click",".js-poll__back-to-poll",function(K){K.preventDefault();var J=A(this).closest(".js-poll__parent");J.find("div.pollresults").addClass("h-hide");J.find("form.poll").show()});I.off("click",".b-poll-fieldset__add-more").on("click",".b-poll-fieldset__add-more",function(L){var M=A(this),K=M.prev(".b-poll-fieldset__poll-answers"),J=K.find("li").first().clone(true);J.find(".b-form-input__input").val("").attr("name","polloptions[new][]");J.find(".js-remove-button").prop("disabled",false);J.appendTo(K).find(".b-form-input__input").focus();if(K.find("li").length==H){M.addClass("h-hide")}K.find(".js-remove-button").prop("disabled",false);return false});I.off("click",".b-poll-fieldset__poll-answers .js-remove-button").on("click",".b-poll-fieldset__poll-answers .js-remove-button",function(){var K=A(this),J=K.closest(".b-poll-fieldset__poll-answers");K.closest("li").remove();J.next(".b-poll-fieldset__add-more").removeClass("h-hide");if(J.find("li").length==1){J.find(".js-remove-button").prop("disabled",true)}return false});I.off("click",".js-poll-timeout").on("click",".js-poll-timeout",function(K){var J=A(this).closest(".b-poll-fieldset__poll-options").next(".b-poll-fieldset__datepicker-container");if(this.checked){J.removeClass("h-hide")}else{J.addClass("h-hide").find(".b-datepicker__input").val("")}});I.off("submit.formpoll","form.poll").on("submit.formpoll","form.poll",function(M){M.preventDefault();var J=A(this);var L=J.find('[name="polloptionid"]:checked').val();var K=[];J.find('[name="polloptionids[]"]:checked').each(function(){K.push(A(this).val())});A.post(vBulletin.normalizeAjaxUrl(J.attr("action")),{polloptionid:L,"polloptionids[]":K},function(O){if(O==false){openAlertDialog({title:vBulletin.phrase.get("vote_now"),message:vBulletin.phrase.get("vote_failed"),iconType:"warning"})}else{B(J,O);var N=J.parent();A("div.pollresults",N).find(".js-poll__back-to-poll").remove()}},"json")});A(document).off("click",".pollresults-data .voter-icon").on("click",".pollresults-data .voter-icon",function(){var J=A(this);if(J.find(".voters").is(":visible")){return false}A(".pollresults-data tr td.pollvoter-cell .voter-icon .voters").hide();var M=J.attr("data-node-id");var L=J.attr("data-polloption-id");var K=J.closest("form");A.post(vBulletin.getAjaxBaseurl()+"/poll/get-voters",{nodeid:M,polloptionid:L},function(N){if(N){if(!N.error){C(K,N,L,J)}else{D({message:N.error,type:"error"},J)}}else{D({message:vBulletin.phrase.get("vote_error_retrieving"),type:"error"},J)}},"json")});A(document).off("click",".pollresults-data .voter-icon .voters").on("click",".pollresults-data .voter-icon .voters",function(){e.stopPropagation();return true});if(A(".polloptioncontainer.new",I).length>0){for(var F=0;F<G-1;F++){A("a#addanswer",I).click()}if(G==H){A("a#addanswer",I).hide()}}}vBulletin.conversation.bindEditFormEventHandlers("poll");function D(H,G){var I=G.find(".voters");if(H.message){var F=A("<span />").addClass(H.type).text(H.message);I.html(F)}else{I.html(H.voters)}I.fadeIn("slow");A("body").on("click.voterpopup",function(J){if(A(J.target).closest(".voter-icon").length==0){I.hide();A("body").off("click.voterpopup")}})}function C(F,H,K,I){var M=false;if(H.options){B(F,H);var J=H.options[K];if(J){M=true;if(!A.isEmptyObject(J.votersinfo)){var L=[];for(var G in J.votersinfo){L.push('<a href="{0}">{1}</a>'.format(pageData.baseurl+J.votersinfo[G].profileUrl,J.votersinfo[G].username))}D({voters:L.join(", ")},I)}else{D({message:vBulletin.phrase.get("vote_first"),type:"note"},I)}}}if(!M){D({message:vBulletin.phrase.get("vote_error_retrieving"),type:"error"},I)}}function B(G,L){var F=G.parent(),H=L.options,K="";for(var I in H){var J=A(".pollresults-option-"+H[I].polloptionid);J.find(".title").html(JShtmlEncode(H[I].title));J.find(".bar-container .bar").css("width",H[I].percentage+"%");J.find(".percentage").html(H[I].percentage+"%");J.find(".votes span").html(H[I].votes);if(H[I].votes==1){K="vote"}else{K="votes"}J.find(".votes label").html(vBulletin.phrase.get(K))}A(".pollresults .pollvote-count span",F).html(L.poll_votes);if(L.poll_votes==1){K="vote"}else{K="votes"}A(".pollresults .pollvote-count label",F).html(vBulletin.phrase.get(K));G.hide();A("div.pollresults",F).removeClass("h-hide")}E(A(document))})})(jQuery);;

// ***************************
// js.compressed/vbSlideshow.js
// ***************************
/*=======================================================================*\
|| ###################################################################### ||
|| # vBulletin 5.1.9 Patch Level 4
|| # ------------------------------------------------------------------ # ||
|| # Copyright 2000-2016 vBulletin Solutions Inc. All Rights Reserved.  # ||
|| # This file may not be redistributed in whole or significant part.   # ||
|| # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html   # ||
|| ###################################################################### ||
\*========================================================================*/
window.vBulletin=window.vBulletin||{};window.vBulletin.phrase=window.vBulletin.phrase||{};window.vBulletin.phrase.precache=window.vBulletin.phrase.precache||[];window.vBulletin.phrase.precache=$.merge(window.vBulletin.phrase.precache,["gallery_slideshow","no_photos_found_or_post_deleted"]);(function(G){window.vBulletin=window.vBulletin||{};vBulletin.gallery=vBulletin.gallery||{};var H=5,N=G("#slideshow-dialog"),L=false,M=false,E=0,F={};function K(R,S,V,Q){var X=R.find(".caption"),U;X.html("").hide();if(S.links){X.append(G("<div />").addClass("links ellipsis").html(S.links))}if(S.title){X.append(G("<div />").addClass("title ellipsis").html(S.title))}if(S.links&&S.title){U=15}else{if(S.links||S.title){U=35}else{U=50}}var T=R.find(".slideshow-wrapper .jcarousel-item-"+V+" img");var W=T.outerWidth();X.css({marginBottom:U+"px",width:W+"px",marginLeft:"auto",marginRight:"auto"});T.one("load",function(){var Y=G(this).outerWidth();X.css("width",Y+"px")});if(Q){X.fadeIn("slow",function(){R.click()})}else{X.show()}}function D(Q){if(Q.which==37){N.find(".jcarousel-prev").click()}else{if(Q.which==39){N.find(".jcarousel-next").click()}}if(Q.which>=33&&Q.which<=40){return false}}function C(Q){return false}function A(){var g=G(this);M=this;if(g.closest("#preview-overlay").length==1){return false}var U=g.attr("data-channelid"),c=g.closest(".photoPreviewBox"),h=g.attr("src");if(typeof (h)==="undefined"){h=g.attr("href")}if(L===false){L=(c.length>0)?c.index():g.index()}G(document).off("click","#slideshow-dialog .close-btn").on("click","#slideshow-dialog .close-btn",function(){N.dialog("close")});G(document).off("click",".thumbnails .image-wrapper").on("click",".thumbnails .image-wrapper",function(n,m){if(typeof m=="undefined"){m=true}G(".thumbnails .image-wrapper",N).addClass("dimmed");G(this).removeClass("dimmed");var l=Number(G(this).parent().attr("jcarouselindex"));N.data("thumbclick",true);vBulletin.gallery.slideshow.jcarousel("scroll",l,m);N.removeData("thumbclick")});G("body").css("overflow","hidden");var k=G(window).innerWidth(),X=G(window).innerHeight(),e=(k>768);var R=e?20:0,i=10,d=parseInt(k-(R*2),10),S=parseInt(X-(R*2),10);if(!e){N.css({borderRadius:0,borderWidth:0})}else{N.css({borderRadius:"",borderWidth:""})}var W=parseInt(d-(i*2),10),f=parseInt(S-(i*2),10),T=60,V=90,b=50,j=W-10,Z=parseInt(f-T-b-(i*3),10),a=parseInt(((Z/2)-21),10);E=j;H=Math.max(1,Math.floor(E/V));N.dialog({autoOpen:false,resizable:false,closeOnEscape:true,showTitleBar:false,modal:true,width:d,height:S,dialogClass:"slideshow-dialog",open:function(){G(".ui-widget-overlay").bind("click",function(){N.dialog("close")});G(document).off("keydown",D).on("keydown",D);G(document).off("mousewheel",C).on("mousewheel",C)},close:function(m,l){if(vBulletin.gallery.thumbnails){vBulletin.gallery.thumbnails.jcarousel("destroy")}if(vBulletin.gallery.slideshow){vBulletin.gallery.slideshow.jcarousel("destroy")}G("body").css("overflow","auto");G(document).off("keydown",D);G(document).off("mousewheel",C);M=false;L=false}});var Q=N.find(".slideshow-wrapper .slideshow-list");if(Q.length==0){Q=N.find(".slideshow-wrapper").append(G("<ul />").addClass("slideshow-list"))}N.dialog("open");window.vBulletin.loadingIndicator.show();var Y=g.closest(".js-slideshow__gallery-node").attr("data-node-id")||g.closest(".js-slideshow__gallery-node").attr("data-nodeid")||g.closest(".js-post-sm").attr("data-nodeid");G('<style type="text/css">			.slideshow .slideshow-wrapper > .jcarousel-clip-horizontal {				width: '+j+"px;				height: "+Z+"px;			}			.slideshow .thumbnails > .jcarousel-clip-horizontal {				width: "+E+"px;			}			.slideshow .slideshow-wrapper > .jcarousel-clip .jcarousel-item {				width: "+j+"px;				height: "+Z+"px;			}			.slideshow .jcarousel-item .image {				max-width: "+j+"px;				max-height: "+Z+"px;			}			.slideshow .slideshow-wrapper > .jcarousel-prev-horizontal,			.slideshow .slideshow-wrapper > .jcarousel-next-horizontal {				top: "+a+"px;			}		</style>").appendTo("head");vBulletin.gallery.slideshow=Q.jcarousel({wrap:null,animation:"slow",easing:"swing",scroll:1,rtl:G("html").attr("dir")=="rtl",initCallback:function(u,o){if(o=="init"){var m=g.closest(".b-content-entry-panel__content--gallery").find(".js-photo-postdata input");if(m.length>0){var l={photos:[]};m.filter('[name="filedataid[]"]').each(function(){var v={title:JShtmlEncode(m.filter('[name="title_'+this.value+'"]').val()),url:pageData.baseurl+"/filedata/fetch?filedataid="+this.value,thumb:pageData.baseurl+"/filedata/fetch?thumb=1&filedataid="+this.value};l.photos.push(v)});setTimeout(function(){I(l,u)},10)}else{var q={nodeid:Y};if(vBulletin.media&&vBulletin.media.MEDIA_USERID){q.userid=vBulletin.media.MEDIA_USERID}if(U){q.channelid=U}var n=parseInt(G(".albumSlideShowPageNo").val());if(!isNaN(n)){q.pageno=n}var r=parseInt(G(".albumSlideShowPerPage").val());if(!isNaN(r)){q.perpage=r}var p=G(".media-tab .media-filter-overlay .filter-options input:checked").val();if(p){q.dateFilter=p}if(!isNaN(L)){q.startIndex=L}var t=q;if(Y>0){t.startIndex=""}var s=JSON.stringify(t);if(F[s]){I(F[s],u)}else{G.post(vBulletin.getAjaxBaseurl()+"/filedata/gallery",q,function(v){if(!v&&h){v={photos:[{title:"",url:h,thumb:""}]}}F[s]=v;I(v,u)},"json").complete(function(){window.vBulletin.loadingIndicator.hide()})}}}},itemVisibleInCallback:{onBeforeAnimation:function(q,o,n,p){if(p=="init"){return false}var s=N.data("image-data");if(s){var l=s.photos.length;if(n>0){while(n>l){n-=l}}else{while(n<=0){n+=l}}K(N,s.photos[n-1],n,true);var r=Math.floor(H/2);var m=n-r;m=Math.max(m,1);vBulletin.gallery.thumbnails.jcarousel("scroll",m,true);if(!N.data("thumbclick")){G("#slideshow-dialog .thumbnails .image-wrapper").addClass("dimmed");vBulletin.gallery.thumbnails.jcarousel("get",n).find(".image-wrapper").removeClass("dimmed")}L=n-1}}}});return false}function I(U,T){if(!U||!U.photos){openAlertDialog({title:vBulletin.phrase.get("gallery_slideshow"),message:vBulletin.phrase.get("no_photos_found_or_post_deleted"),iconType:"warning"});return }N.data("image-data",U);P(T,U,N);K(N,U.photos[0],1);if(U.photos.length>1){vBulletin.gallery.thumbnails.jcarousel("get",1).find(".image-wrapper").removeClass("dimmed")}var R=L;var Q=parseInt(G(".albumSlideShowPerPage").val());if(!isNaN(Q)){R=L%Q}if(R>0){var S=vBulletin.gallery.slideshow.jcarousel("scroll",R+1,false);if(typeof S!="undefined"){N.find(".slideshow-wrapper").css("visibility","hidden");window.setTimeout(function(){G(".thumbnails .image-wrapper",N).eq(R).trigger("click",[false]);N.find(".slideshow-wrapper").css("visibility","")},0)}}window.vBulletin.loadingIndicator.hide()}function P(R,T,Q){R.size(T.photos.length);if(T.photos.length>1){G("#slideshow-dialog .thumbnails").show();J(T)}else{G("#slideshow-dialog .thumbnails").hide();Q.dialog("option","height","auto")}var S=R.first||1;G.each(T.photos,function(V,U){R.add(S+V,'<div class="image-wrapper"><a href="{0}"><img src="{0}" alt="{1}" class="image" /></a></div>'.format(U.url,U.htmltitle))})}function J(R){var Q=G("#slideshow-dialog .thumbnails .thumbnail-list");if(Q.length==0){Q=G("#slideshow-dialog .thumbnails").append(G("<ul />").addClass("thumbnail-list"))}vBulletin.gallery.thumbnails=Q.jcarousel({wrap:null,animation:"fast",easing:"swing",scroll:H,rtl:G("html").attr("dir")=="rtl",size:R.photos.length,initCallback:function(W,U){if(U=="init"){W.size(R.photos.length);G.each(R.photos,function(Z,Y){var X=(W.first||1)+Z;if(W.has(X)){return true}if(X>R.photos.length){return false}var a=G("<img />").addClass("thumbnail").on("load",function(){}).attr({src:Y.thumb,alt:""}).appendTo(G("<div />").addClass("image-wrapper dimmed"));W.add(X,a.parent().get(0))});var S=G("#slideshow-dialog .thumbnails .jcarousel-clip");var V=Math.min(W.size(),H)*90;var T=Math.min(E,V);S.css("width",T+"px");if(W.size()<=H){W.buttonNext.hide();W.buttonPrev.hide()}}},itemVisibleInCallback:{onBeforeAnimation:function(V,T,S,U){G("#slideshow-dialog .thumbnails").data("visible-range",{first:V.first,last:V.last})}}}).disableSelection()}function O(){if(M){var R=M;var Q=L;N.dialog("close");L=Q;A.call(R)}}function B(){G(document).off("click",".b-gallery-thumbnail-list__item").on("click",".b-gallery-thumbnail-list__item",A);G(window).on("resize",G.debounce(300,O))}G(document).ready(B)})(jQuery);;

// ***************************
// js.compressed/conversation_filter.js
// ***************************
/*=======================================================================*\
|| ###################################################################### ||
|| # vBulletin 5.1.9 Patch Level 4
|| # ------------------------------------------------------------------ # ||
|| # Copyright 2000-2016 vBulletin Solutions Inc. All Rights Reserved.  # ||
|| # This file may not be redistributed in whole or significant part.   # ||
|| # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html   # ||
|| ###################################################################### ||
\*========================================================================*/
window.vBulletin=window.vBulletin||{};window.vBulletin.phrase=window.vBulletin.phrase||{};window.vBulletin.phrase.precache=window.vBulletin.phrase.precache||[];window.vBulletin.phrase.precache=$.merge(window.vBulletin.phrase.precache,["invalid_request","invalid_search_syntax","invalid_server_response_please_try_again","unknown_error"]);(function(A){vBulletin.conversation=vBulletin.conversation||{};vBulletin.conversation.filter=function(K){var N=this;var E=null;var F=0;var J=false;var C=false;var I="conversation_filter";var O={context:document,autoCheck:false,checkInterval:15000,scrollToTop:null,customFilter:null,onContentLoad:null,closeOverlayOnScroll:true,pagination:null,allowHistory:false,tabParamAsQueryString:true,hash:""};if(K&&typeof K=="object"){A.extend(O,K)}var B=new vBulletin.history.instance(O.allowHistory);function H(){A(".toolbar-filter-overlay input[type=radio]",O.context).off("change."+I).on("change."+I,function(X,W,b){var R,U,S=A(this),d=A(this.form);if(!B.isEnabled()&&O.allowHistory){R=vBulletin.makePaginatedUrl(location.href,1);location.href=vBulletin.makeFilterUrl(R,this.name,this.value,O.context,O.hash);return true}J=true;O.customFilter=null;if(!S.data("bypass-filter-display")){M(this)}U=S.closest(".conversation-toolbar-wrapper");if(A(".conversation-toolbar-wrapper",O.context).length>1){$toolbarWrappers.filter("."+(U.hasClass("top")?"bottom":"top")).find("input[name={0}][value={1}]".format(this.name,this.value)).prop("checked",true)}if(this.value=="conversations_on"){O.autoCheck=true;C=true;F=1}else{clearTimeout(F);C=(this.name=="filter_show")}A(".new-conversations-strip",O.context).hide();N.updatePageNumber(b||1);var T=A('.filtered-by .filter-text[data-filter-name="q"]',O.context);if(T.length){var Q=N.getSelectedFilters(d);Q.q=T.data("filter-value");N.setOption("customFilter",Q);N.forceApplyFilters()}else{N.applyFilters(false)}if(B.isEnabled()&&!W){var V=N.getSelectedFilters(d),c=this.name,P=this.value,a=A(".filtered-by",U),Z={from:"filter",page:1,tab:O.tabParamAsQueryString?"#"+U.closest(".ui-tabs-panel").attr("id"):vBulletin.getSelectedTabHashOrPath(U.closest(".ui-tabs"),false),filters:V,filtervalue:P,filtername:c};if(!a.data("reset")){R=vBulletin.makePaginatedUrl(location.href,1);R=vBulletin.makeFilterUrl(R,c,P,O.context)}else{R=location.pathname.replace(/\/page[0-9]+/,"");if(O.tabParamAsQueryString){var Y=vBulletin.parseQueryString(location.search);if(Y.tab){R+="?tab="+Y.tab}else{if(Y.view){R+="?view="+Y.view}}}}B.pushState(Z,document.title,R);a.data("reset",null)}});A(".new-conversations-strip",O.context).off("click."+I).on("click."+I,function(){A(this).hide();C=true;N.updatePageNumber(1);N.applyFilters(false,true)});A(".toolbar-filter",O.context).off("click."+I).on("click."+I,function(U,T,R){var S=A(this).closest(".conversation-toolbar-wrapper");var Q=(S.hasClass("bottom"))?"bottom":"top";if(typeof T=="undefined"){T="slow"}var V=A(".filter-wrapper",this).toggleClass("selected");A(".arrow .vb-icon",this).toggleClass("vb-icon-triangle-down-wide vb-icon-triangle-up-wide");A(".toolbar-filter-overlay",S).slideToggle(T,function(){var W=I+Q;if(A(this).is(":visible")){A("body").off("click."+W).on("click."+W,function(c){var a=".conversation-toolbar-wrapper."+Q;if(A(c.target).closest(".toolbar-filter-overlay").length==0&&A(c.target).closest(".toolbar-filter").length==0){A("body").off("click."+W);A(window).off("scroll."+W);var b=(A(c.target).closest(".toolbar-filter").length>0)?"fast":"slow";A(".conversation-toolbar-wrapper.{0} .conversation-toolbar .toolbar-filter".format(Q),O.context).triggerHandler("click."+I,[b])}});var Y=true;if(R!="scroll"){var X=A(".filtered-by",O.context);if(X.length==0||X.is(":hidden")){X=this}var Z={};Y=vBulletin.isScrolledIntoView(X,Z);if(!Y){A("html,body").animate({scrollTop:"+="+Math.abs(Z.bottom)},"fast",function(){setTimeout(function(){if(O.closeOverlayOnScroll){A(window).off("scroll."+W).on("scroll."+W,function(){A(".conversation-toolbar-wrapper.{0} .conversation-toolbar .toolbar-filter".format(Q),O.context).triggerHandler("click."+I,[0,"scroll"])})}},50)})}}if(Y){if(O.closeOverlayOnScroll){A(window).off("scroll."+W).on("scroll."+W,function(){A(".conversation-toolbar-wrapper.{0} .conversation-toolbar .toolbar-filter".format(Q),O.context).triggerHandler("click."+I,[0,"scroll"])})}}}else{A("body").off("click."+W);A(window).off("scroll."+W)}});if(S.hasClass("bottom")&&A(".arrow .vb-icon",this).hasClass("vb-icon-triangle-up-wide")){var P=A(".conversation-toolbar-wrapper.bottom .toolbar-filter-overlay",O.context);A("html, body").animate({scrollTop:P.offset().top+P.innerHeight()},500)}});A(".filtered-by",O.context).off("click."+I,".x").on("click."+I,".x",function(){var T=A(this),Q=T.closest(".filtered-by"),W=T.closest(".filter-text"),S=W.data("filter-name"),V=A(),R;Q.data("clicked",true);if(!B.isEnabled()&&O.allowHistory){var P;if(W.data("filter-type")=="text"&&W.data("filter-js-selector")){P=vBulletin.makePaginatedUrl(location.href,1);location.href=vBulletin.makeFilterUrl(P,"q","",O.context,O.hash,true)}else{P=vBulletin.makePaginatedUrl(location.href,1);location.href=vBulletin.makeFilterUrl(P,S,W.data("filter-value"),O.context,O.hash,true)}return false}V=A(".toolbar-filter-overlay .filter-options input[name={0}]".format(S),O.context).prop("checked",false).filter(".js-default-checked");N.updatePageNumber(1);if(W.data("filter-type")=="text"&&W.data("filter-js-selector")){A(W.data("filter-js-selector")).val("");R=N.getSelectedFilters(A("form.toolbar-filter-overlay",O.context));delete R[S];N.setOption("customFilter",R)}W.remove();var U=Q.find(".filter-text").length;if(U==0){Q.addClass("h-hide");Q.data("reset",true)}else{if(U==1){Q.find(".clear-all").addClass("h-hide")}}if(V.length==1){V.data("bypass-filter-display",true);V.trigger("click."+I);V.data("bypass-filter-display",null)}else{if(R){var P=vBulletin.makePaginatedUrl(location.href,1);P=vBulletin.makeFilterUrl(P,"q","",O.context);B.pushState({from:"filter",page:1,tab:O.tabParamAsQueryString?"#"+T.closest(".ui-tabs-panel").attr("id"):vBulletin.getSelectedTabHashOrPath(T.closest(".ui-tabs"),false),filters:R},document.title,P)}N.forceApplyFilters();if(R){N.setOption("customFilter",null)}}});A(".filtered-by",O.context).off("click."+I,".clear-all").on("click."+I,".clear-all",function(){var P=A(this).closest(".conversation-toolbar-wrapper");A(this).data("clicked",true);N.setOption("customFilter",null);N.resetFilters(false,false,P);return false});A(".conversation-toolbar .filter-wrapper",O.context).data("object-instance",N);A(".conversation-showmore",O.context).click(function(){var P=parseInt(A('form.toolbar-filter-overlay input[name="pagenum"]',O.context).val());C=false;N.updatePageNumber(P+1);N.applyFilters(false,true,true)});A(".conversation-toolbar .toolbar-search-form",O.context).off("submit.filtersearch").on("submit.filtersearch",function(){var P="q";$searchBox=A(this.elements[P]),searchKeyword=A.trim($searchBox.val()),$conversationToolbar=A(this).closest(".conversation-toolbar-wrapper"),Q;$searchBox.val(searchKeyword);if(!B.isEnabled()&&O.allowHistory){Q=vBulletin.makePaginatedUrl(location.href,1);location.href=vBulletin.makeFilterUrl(Q,P,searchKeyword,$conversationToolbar);return false}var T=O.tabParamAsQueryString?"#"+A(this).closest(".ui-tabs-panel").attr("id"):vBulletin.getSelectedTabHashOrPath(A(this).closest(".ui-tabs"),false);if(searchKeyword){var S=N.getSelectedFilters($conversationToolbar.find(".toolbar-filter-overlay")),U={};U[P]=searchKeyword;A.extend(S,U);N.setOption("customFilter",S);N.forceApplyFilters();N.displayCustomFilterText(this.elements[P]);if(B.isEnabled()){Q=vBulletin.makePaginatedUrl(location.href,1);Q=vBulletin.makeFilterUrl(Q,P,searchKeyword,$conversationToolbar);B.pushState({from:"filter",page:1,tab:T,filters:S},document.title,Q)}}else{var R=$conversationToolbar.find('.filter-text[data-filter-name="{0}"]'.format(P));if(R.length){var S=N.getSelectedFilters($conversationToolbar.find(".toolbar-filter-overlay"));N.setOption("customFilter",S);A(".x",R).trigger("click");if(B.isEnabled()){var Q=vBulletin.makePaginatedUrl(location.href,1);Q=vBulletin.makeFilterUrl(Q,P,searchKeyword,$conversationToolbar);B.pushState({from:"filter",page:1,tab:T,filters:S},document.title,Q)}}}return false})}function M(P,Q){vBulletin.conversation.displaySelectedFilterText(P,Q,O.context)}H();this.isFilterSelected=function(P){return A('.toolbar-filter-overlay input[value="'+P+'"]',O.context).is(":checked")};this.getSelectedFilters=function(P){return vBulletin.getSelectedFilters(P,false)};this.resetFilterForms=function(P){if(!P||(P instanceof A&&!P.length)){P=O.context}A(".toolbar-filter-overlay .js-default-checked",P).prop("checked",true);A(".toolbar-search-form .js-filter-search",P).val("").filter(".placeholder").focus().blur()};A(".toolbar-filter-overlay, .toolbar-search-form",O.context).trigger("reset");if(B.isEnabled()){var D=B.getState();if(!D||A.isEmptyObject(D.data)){var G=A(O.context).hasClass("ui-tabs-panel")?A(O.context).attr("id"):A(".conversation-toolbar-wrapper",O.context).closest(".ui-tabs-panel").attr("id"),L={from:"filter",page:Number(A(".pagenav-form .defaultpage",O.context).val())||1,tab:vBulletin.getSelectedTabHashOrPath(A(O.context).closest(".ui-tabs"),O.tabParamAsQueryString),filters:N.getSelectedFilters(A("form.toolbar-filter-overlay",O.context))};B.setDefaultState(L,document.title,location.href)}B.setStateChange(function(X,c,Y){var P=B.getState();if(P.data.from=="filter"||c=="pagination"||c=="tabs"){B.log(P.data,P.title,P.url);var S,Q;if(P.data.tab){S=O.tabParamAsQueryString?A(P.data.tab):A('.ui-tabs .ui-tabs-panel[data-url-path="'+P.data.tab+'"]')}Q=(S&&S.length&&S)||O.context;if(c=="pagination"){if(Y){var a=A(".filtered-by",Q),R=A(".toolbar-filter-overlay .filter-options-list",Q),b=false;A(".filter-text",a).filter('[data-filter-name!="q"]').remove();A(".clear-all",a).addClass("h-hide");R.find(".js-default-checked").prop("checked",true);A.each(Y,function(e,f){var d=A('input[name="{0}"][value="{1}"]'.format(e,f),R);if(d.length){d.prop("checked",true).trigger("change",[true,P.data.page]);b=true}});if(!b){R.first().data("bypass-filter-display",true).trigger("change",[true,P.data.page]).data("bypass-filter-display",null);a.addClass("h-hide")}}}else{var W=A(Q).closest(".ui-tabs"),T=O.tabParamAsQueryString?W.find('.ui-tabs-nav > li > a[href*="{0}"]'.format(P.data.tab)):W.find('.ui-tabs-nav > li > a[data-url-path="'+P.data.tab+'"]');if(!T.parent().hasClass("ui-tabs-selected")){var V=T.parent().index();vBulletin.selectTabByIndex.call(W,V)}else{var U=N.getSelectedFilters(A(".toolbar-filter-overlay",Q)),Z=A(".conversation-toolbar .filter-wrapper",Q).data("object-instance")||N;if(!vBulletin.areJsonObjectsEqual(U,P.data.filters)){Z.setOption("context",Q);Z.updatePageNumber(P.data.page);Z.applyHistoryFilters(P.data)}}}}},"filter")}this.displayCustomFilterText=function(P,Q){M(P,(Q||A(P).val()))};this.isHistoryEnabled=function(){return B.isEnabled()};this.resetFilters=function(U,Q,T){if(!T||(T instanceof A&&!T.length)){T=O.context}var S=A(".filtered-by",T).addClass("h-hide"),R=location.pathname.replace(/\/page[0-9]+/,"");if(O.tabParamAsQueryString){var P=vBulletin.parseQueryString(location.search);if(P.tab){R+="?tab="+P.tab}else{if(P.view){R+="?view="+P.view}}}A(".clear-all",S).addClass("h-hide");A(".filter-text",S).remove();N.resetFilterForms(T);if(!U){if(B.isEnabled()){S.data("reset",true);N.updatePageNumber(1);var V=N.getSelectedFilters(A("form.toolbar-filter-overlay",T));if(Q){var W=A(".toolbar-search-form .js-filter-search",T).val("");delete V[W.attr("name")];N.setOption("customFilter",V)}N.forceApplyFilters();L={from:"filter",page:1,tab:O.tabParamAsQueryString?"#"+S.closest(".ui-tabs-panel").attr("id"):vBulletin.getSelectedTabHashOrPath(S.closest(".ui-tabs"),false),filters:V};B.pushState(L,document.title,R)}else{if(O.allowHistory){location.href=R}}}return N};this.applyHistoryFilters=function(R){if(R&&R.filters&&!A.isEmptyObject(R.filters)){var S=O.tabParamAsQueryString?A(R.tab):A('.ui-tabs .ui-tabs-panel[data-url-path="'+R.tab+'"]'),U=A(".toolbar-filter-overlay",S);if(typeof (N.lastFilters)!="undefined"){delete N.lastFilters}N.resetFilters(true,false,S);A.each(R.filters,function(V,X){var W=A('[name="'+V+'"]',U);if(W.attr("type")=="hidden"){W.val(X)}else{if(W.attr("type")=="radio"&&X!=R.filtervalue){W.filter('[value="'+X+'"]').prop("checked",true)}}});var Q=vBulletin.parseQueryString(location.href),T=true,P=function(){A(".toolbar-search-form .js-filter-search",S).val("").filter(".placeholder").focus().blur()};if(!A.isEmptyObject(Q)){A.each(Q,function(W,X){var V=A('.filter-options-list input[name="{0}"][value="{1}"]'.format(W,X),U);if(V.length){if(R.filtername==W&&R.filtervalue==X){T=false;V.prop("checked",true).trigger("change",[true])}else{M(V.get(0))}}else{V=A('.toolbar-search-form .search-container input[name="{0}"]'.format(W),S);if(V.length&&X){M(V.get(0),X);V.val(X)}else{P()}}})}else{P()}if(T){N.setOption("customFilter",R.filters);N.forceApplyFilters();N.setOption("customFilter",null)}}return N};this.forceApplyFilters=function(){if(typeof (N.lastFilters)!="undefined"){delete N.lastFilters}C=true;N.applyFilters(false,true);return N};this.applyFilters=function(S,U,P,T){var W=A(".toolbar-filter-overlay",O.context);if(U){clearTimeout(F)}var Q={filters:(!O.customFilter)?N.getSelectedFilters(W):O.customFilter,isAjaxTemplateRender:true,isAjaxTemplateRenderWithData:true};if(A.isEmptyObject(Q.filters)){return N}if(S){Q.filters["checkSince"]=E;Q.filters["pagenum"]=1}if(!T){var R=W.find('input[name="result-id"]').val(0);if(R.length){Q.filters["result-id"]=0}}else{C=true}if(typeof (this.lastFilters)!="undefined"&&vBulletin.areJsonObjectsEqual(this.lastFilters.filters,Q.filters)&&!S){return N}this.lastFilters=Q;A(".conversation-toolbar-wrapper",O.context).addClass("h-disabled");A(".conversation-empty",O.context).addClass("h-invisible");if(S){window.vBulletin.loadingIndicator.suppressNextAjaxIndicator()}var X=vBulletin.normalizeAjaxUrl(W.attr("action"))||(vBulletin.getAjaxBaseurl()+"/activity/get");var V=W.closest(".conversation-toolbar-wrapper").find('form.pagenav-form input[name="article_display_columns"]');if(V.length==1){Q.article_display_columns=V.val()}A.ajax({type:"POST",url:X,data:(Q),dataType:"json",success:function(Y){A(".conversation-empty",O.context).addClass("h-hide");if(!Y||Y.error||Y.errors){console.log(X+" failed. result:"+JSON.stringify(Y));A(".conversation-list",O.context).addClass("h-hide");var a="unknown_error";if(!Y){a="invalid_server_response_please_try_again"}else{if(Y.error){a=Y.error}else{if(Y.errors){a=Y.errors[0][0]}}}a=vBulletin.phrase.get(a);A(".conversation-empty",O.context).html((a||"").replace(/<br\s*\/*>/g," ")).removeClass("h-hide h-invisible");return }if(S){if(!J&&Y.total>0&&!A("body").hasClass("edit-mode")){A(".new-conversations-strip span",O.context).html(Y.total);A(".new-conversations-strip",O.context).fadeIn("slow")}if(A(".conversation-list li.list-item",O.context).length==0){A(".conversation-empty",O.context).removeClass("h-hide")}}else{A(".new-conversations-strip",O.context).hide();if(((Y.total_with_sticky>0)||(Y.total>0))&&Y.template){if(Y.resultId){var b=A('input[name="result-id"]',W).val(Y.resultId);if(b.length&&this.lastFilters){this.lastFilters.filters["result-id"]=Y.resultId}if(O.pagination){O.pagination.updateResultId(Y.resultId)}}if(P){A(".conversation-list",O.context).append(Y.template)}else{A(".conversation-empty",O.context).addClass("h-hide");A(".conversation-list",O.context).html(Y.template).removeClass("h-hide")}if((Q.filters["maxpages"]&&Q.filters["pagenum"]>=Q.filters["maxpages"])||(Y.pageinfo&&(Q.filters["pagenum"]>=Y.pageinfo.totalpages||Y.pageinfo.showseemore===false))){A(".conversation-showmore",O.context).addClass("h-hide")}else{A(".conversation-showmore",O.context).removeClass("h-hide")}}else{if(!P){A(".conversation-empty",O.context).removeClass("h-hide");A(".conversation-list",O.context).addClass("h-hide").empty()}}if(Y.total_with_sticky==0){A(".conversation-showmore",O.context).addClass("h-hide")}if(C&&O.scrollToTop){var Z=(O.scrollToTop instanceof A)?O.scrollToTop:A(O.scrollToTop);if(Z.length>0){A("body,html").animate({scrollTop:Z.offset().top},"slow")}}E=Y.lastDate;if(typeof O.onContentLoad=="function"){O.onContentLoad.apply(A(".conversation-list",O.context).get(0),[Y])}if(Y.pageinfo){N.updatePageNumber(Y.pageinfo.pagenumber||1);if(O.pagination&&typeof O.pagination.updatePageInfo=="function"){O.pagination.setOption("context",O.context);O.pagination.updatePageInfo(Y.pageinfo,true)}}if(vBulletin.inlinemod&&typeof vBulletin.inlinemod.init=="function"&&A(".moderationmenu_container",O.context).length>0){vBulletin.inlinemod.init(O.context)}}if(J){J=false}},error:function(a,Z,Y){console.log(X+" failed. error:"+Y);if(Y!=""){openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("unable_to_contact_server_please_try_again"),iconType:"error"})}},complete:function(){A(".conversation-toolbar-wrapper",O.context).removeClass("h-disabled");A(".conversation-empty",O.context).removeClass("h-invisible");if(!J&&O.autoCheck&&F){F=setTimeout(N.checkNewConversations,O.checkInterval)}}});return N};this.updatePageNumber=function(P){P=Number(P);if(P>0){A('form.toolbar-filter-overlay input[name="pagenum"]',O.context).val(P)}return N};this.checkNewConversations=function(){if(!A("body").hasClass("edit-mode")){console.log("Checking for new activity since "+E);N.applyFilters(true)}return N};this.toggleNewConversations=function(P){if(P){O.autoCheck=true;F=setTimeout(N.checkNewConversations,O.checkInterval)}else{O.autoCheck=false;clearTimeout(F)}return N};this.hideFilterOverlay=function(){A(".conversation-toolbar-wrapper .toolbar-filter-overlay",O.context).filter(":visible").each(function(){A(this).prev(".conversation-toolbar").find(".toolbar-filter").triggerHandler("click."+I,[0])});return N};this.getOption=function(P){return O[P]};this.setOption=function(P,Q){O[P]=Q;return N};if(O.autoCheck){E=pageData.current_server_datetime;F=setTimeout(N.checkNewConversations,O.checkInterval)}};vBulletin.conversation.displaySelectedFilterText=function(J,K,C){var L=A(J);if(L.data("bypass-filter-display")==1){return }C=C||L.closest(".conversation-toolbar-wrapper");var G=A(".filtered-by",C).removeClass("h-hide").find(".filter-text-wrapper").show(),B=A(".filter-text[data-filter-name={0}]".format(J.name),G),M='<div class="filter-text" data-filter-name="{0}" data-filter-value="{1}"><span title="{2}">{3}</span><span class="x vb-icon vb-icon-x-blue"></span></div>',E,F,I;if(J.type=="radio"){F=L.next("span").text();E=A(M.format(J.name,vBulletin.htmlEntities(J.value),L.closest(".filter-options").prev(".filter-header").html()+" - "+F,((J.name=="filter_new_topics"||J.name=="filter_depth"||(J.value.indexOf("_all")!=-1&&J.value!="time_all"))?(L.closest("li").find(".filter-header").html()||"")+" - ":"")+F))}else{if(J.type=="text"){K="&quot;"+JShtmlEncode(K)+"&quot;";E=A(M.format(J.name,vBulletin.htmlEntities(J.value),L.data("filter-name")+": "+K,K)).data("filter-type","text");I=L.attr("class").match(/js-.*/);if(I){E.data("filter-js-selector","."+I[0])}}}if(B.length>0){B.replaceWith(E)}else{var D=[],H=false;A(".toolbar-filter-overlay > ul > li",C).each(function(){D.push(A("input:first",this).attr("name"))});A(".filter-text",G).each(function(){var N=A(this);if(A.inArray(J.name,D)<A.inArray(N.attr("data-filter-name"),D)){N.before(E);H=true;return false}});if(!H){G.append(E)}if(A(".filter-text",G).length>1){G.next(".clear-all").removeClass("h-hide")}}}})(jQuery);;

// ***************************
// js.compressed/channel_conversation.js
// ***************************
/*=======================================================================*\
|| ###################################################################### ||
|| # vBulletin 5.1.9 Patch Level 4
|| # ------------------------------------------------------------------ # ||
|| # Copyright 2000-2016 vBulletin Solutions Inc. All Rights Reserved.  # ||
|| # This file may not be redistributed in whole or significant part.   # ||
|| # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html   # ||
|| ###################################################################### ||
\*========================================================================*/
window.vBulletin=window.vBulletin||{};window.vBulletin.phrase=window.vBulletin.phrase||{};window.vBulletin.phrase.precache=window.vBulletin.phrase.precache||[];window.vBulletin.phrase.precache=$.merge(window.vBulletin.phrase.precache,[]);window.vBulletin.options=window.vBulletin.options||{};window.vBulletin.options.precache=window.vBulletin.options.precache||[];window.vBulletin.options.precache=$.merge(window.vBulletin.options.precache,[]);(function(A){var C=[".forum-channel-content-widget",".blog-channel-content-widget",".sg-channel-content-widget",".search-results-widget .topic-list-container"];if(!vBulletin.pageHasSelectors(C)){return false}var B={};vBulletin.conversation.editTopicTitle=function(G){var F=A(G.target),D=F.closest(".js-topic-item"),E=D.find(".js-topic-wrapper"),I=D.data("node-id"),H=D.data("can-edit-title");if(!H){return }if(B[I]){return }B[I]="edit";if(E.find(".js-loading-icon").length==0){A('<img class="loading-icon js-loading-icon" src="'+pageData.baseurl+'/images/misc/progress.gif" />').appendTo(E)}E.find(".js-loading-icon").show();vBulletin.AJAX({call:"/create-content/loadtitleedit",data:{nodeid:I,isAjaxTemplateRender:true},success:function(J){E.find(".js-topic-title").hide();E.find(".js-loading-icon").hide();E.find(".js-topic-title").after(J);var L=E.find(".js-topic-title-edit");L.data("original-title",L.val());var K=30;E.find(".js-prefix, .js-post-icon, .js-topic-prefix, .js-go-to-first-unread").each(function(){K+=A(this).outerWidth(true)});L.outerWidth(L.outerWidth()-K);E.find(".js-topic-title-edit-form").on("submit",vBulletin.conversation.saveTopicTitle);L.on("blur",vBulletin.conversation.saveTopicTitle);L.select().focus()}})};vBulletin.conversation.saveTopicTitle=function(G){G.preventDefault();var F=A(G.target).closest(".js-topic-wrapper"),D=F.find(".js-topic-title-edit-form"),I=D.find(".js-node-id").val(),H=D.find(".js-topic-title-edit").val();if(B[I]=="save"){return }B[I]="save";var J=F.find(".js-topic-title-edit"),E=J.data("original-title");if(E==H){F.find(".js-loading-icon").remove();F.find(".js-topic-title-edit-form").remove();F.find(".js-topic-title").show();B[I]=false}else{F.find(".js-loading-icon").appendTo(D).show();vBulletin.AJAX({call:"/create-content/savetitleedit",data:{nodeid:I,title:H},success:function(K){F.find(".js-loading-icon").remove();F.find(".js-topic-title-edit-form").remove();F.find(".js-topic-title").html(K.title).show();B[I]=false}})}};A(document).ready(function(){vBulletin.conversation=vBulletin.conversation||{};var G=A(".channel-content-widget .channel-conversation-list-wrapper");var J=A("#activity-stream-tab",G);if(J.length==0){J=A("#article-tab",G)}var O=A("#recommended-tab",G);var P=A("#subscribed-tab",G);var g=A("#topic-tab",G);var K=A("#media-tab",G);var Q=A(".conversation-list",J);var j=A(".conversation-list",O);var b=A(".conversation-list",P);var h=A(".conversation-list",g);var Y=A(".conversation-list",G);var M,i,V,c,D;var f,d,W,F;var N,a,X,Z;var e,H,S=true;var L=G.find(".widget-tabs-nav .ui-tabs-nav > li"),U=L.filter(".ui-tabs-selected"),T=U.index(),l,E=L.parent().data("allow-history")=="1",I=new vBulletin.history.instance(E);if(T==-1){T=0;U=L.first()}l=U.find("> a").attr("href");var R=function(m){var n=(G.offset().top+(G.outerHeight()-parseFloat(G.css("border-bottom-width")))-m.height());console.log(n);return n};var k=function(m){m=m||l;return L.filter('li:has(a[href*="'+m+'"])').first().index()};L.removeClass("ui-state-disabled");vBulletin.tabify.call(G,{tabHistory:I,getTabIndexByHash:k,allowHistory:E,tabParamAsQueryString:true,hash:G.find(".js-module-top-anchor").attr("id"),tabOptions:{selected:T,select:function(o,p){if(X){X.hideFilterOverlay()}if(V){V.hideFilterOverlay()}if(W){W.hideFilterOverlay()}var n=G.find(".widget-tabs-panel .ui-tabs-panel:visible");var m=n.find(".list-item-body-wrapper.edit-post .edit-conversation-container");if(m.length>0){openAlertDialog({title:vBulletin.phrase.get("edit_conversation"),message:vBulletin.phrase.get("you_have_a_pending_edit_unsaved"),iconType:"warning",onAfterClose:function(){vBulletin.animateScrollTop(m.closest(".list-item").offset().top,{duration:"slow"})}});return false}},show:function(o,q){if(q.tab.hash=="#activity-stream-tab"||q.tab.hash=="#article-tab"){if(V){V.toggleNewConversations(false)}if(!X){N=A(".conversation-toolbar-wrapper.scrolltofixed-floating",J);a=new vBulletin.scrollToFixed({element:N,limit:R(N)});H=new vBulletin.pagination({context:J,allowHistory:E,onPageChanged:function(r,s){X.updatePageNumber(r);if(!s){X.applyFilters(false,true,false,true)}}});X=new vBulletin.conversation.filter({context:J,autoCheck:A(".toolbar-filter-overlay input[type=radio][value=conversations_on]",J).is(":checked"),scrollToTop:G,pagination:H,allowHistory:E,onContentLoad:function(){a.updateLimit(R(N));vBulletin.truncatePostContent(Q);vBulletin.conversation.processPostContent(Q)}});if(l==q.tab.hash){vBulletin.truncatePostContent(Q);vBulletin.conversation.processPostContent(Q);X.lastFilters={filters:X.getSelectedFilters(A(".toolbar-filter-overlay",J))}}}else{X.setOption("context",J);H.setOption("context",J);if(typeof X.lastFilters!="undefined"&&A(".conversation-empty:not(.h-hide)",q.panel).length>0){delete X.lastFilters}}X.applyFilters(false,true)}else{if(q.tab.hash=="#subscribed-tab"){if(X){X.toggleNewConversations(false)}if(V){V.toggleNewConversations(false)}if(!W){f=A(".conversation-toolbar-wrapper.scrolltofixed-floating",P);d=new vBulletin.scrollToFixed({element:f,limit:R(f)});W=new vBulletin.conversation.filter({context:P,scrollToTop:G,allowHistory:E,onContentLoad:function(){d.updateLimit(R(f));vBulletin.truncatePostContent(b);vBulletin.conversation.processPostContent(b)}});if(l==q.tab.hash){vBulletin.truncatePostContent(b);vBulletin.conversation.processPostContent(b);W.lastFilters={filters:W.getSelectedFilters(A(".toolbar-filter-overlay",P))}}}else{W.setOption("context",P);if(typeof W.lastFilters!="undefined"&&A(".conversation-empty:not(.h-hide)",q.panel).length>0){delete W.lastFilters}}W.applyFilters(false)}else{if(q.tab.hash=="#topic-tab"){if(X){X.toggleNewConversations(false)}if(!V){M=A(".conversation-toolbar-wrapper.scrolltofixed-floating",g);i=new vBulletin.scrollToFixed({element:M,limit:R(M)});e=new vBulletin.pagination({context:g,allowHistory:E,onPageChanged:function(r,s){V.updatePageNumber(r);if(!s){V.applyFilters(false,true,false,true)}}});V=new vBulletin.conversation.filter({context:g,autoCheck:A(".toolbar-filter-overlay input[type=radio][value=conversations_on]",g).is(":checked"),scrollToTop:G,pagination:e,allowHistory:E,onContentLoad:function(){i.updateLimit(R(M));vBulletin.markreadcheck()}});if(l==q.tab.hash){V.lastFilters={filters:V.getSelectedFilters(A(".toolbar-filter-overlay",g))}}}else{V.setOption("context",g);e.setOption("context",g);if(typeof V.lastFilters!="undefined"&&A(".conversation-empty:not(.h-hide)",q.panel).length>0){delete V.lastFilters}}V.applyFilters(false,true)}else{if(q.tab.hash=="#media-tab"){if(X){X.toggleNewConversations(false)}if(V){V.toggleNewConversations(false)}if(!c){c=A(".conversation-toolbar-wrapper.scrolltofixed-floating",K);D=new vBulletin.scrollToFixed({element:c,limit:R(c)});var n=new vBulletin.history.instance(E);if(n.isEnabled()){var p=n.getState();if(!p||A.isEmptyObject(p.data)){var m={from:"filter",page:1,tab:q.tab.hash,filters:vBulletin.getSelectedFilters(A("form.toolbar-filter-overlay",q.panel))};n.setDefaultState(m,document.title,location.href)}n.setStateChange(function(u,v,s){var t=n.getState();if(t.data.from=="filter"){n.log(t.data,t.title,t.url);if(q.tab.hash!=t.data.tab){vBulletin.selectTabByIndex.call(A(q.tab).closest(".ui-tabs-nav"),q.index)}else{var r=A('.media-filter-overlay input[name="filter_time"][value="{0}"]'.format(t.data.filters.filter_time),q.panel).prop("checked",true);if(r.hasClass("js-default-checked")&&r.prop("defaultChecked")){A(".filtered-by .x",q.panel).trigger("click")}else{r.trigger("change",[true])}}}},"filter")}if(l==q.tab.hash){S=false}}else{S=true}if(S&&A("#profileMediaDetailContainer .album-detail",q.panel).length==0){if(!F){F=vBulletin.media.calculatePhotosPerPage(vBulletin.media.TARGET_PHOTOS_PERPAGE)}loadGalleryById({nodeid:-2,channelid:pageData.channelid,pageno:1,dateFilter:A(".filter-options input[name=filter_time]:checked",q.panel).val()||"time_lastweek",perpage:F},true,0,{complete:function(){A(".profile-toolbar .media-toolbar-filter",K).removeClass("h-hide");D.updateLimit(R(c))}})}}}}}}}});Y.off("click",".list-item-poll .view-more-ctrl").on("click",".view-more-ctrl",function(n){var m=A(this).closest("form.poll");var o=m.find("ul.poll");A(this).addClass("h-hide");o.css("max-height","none").find("li.h-hide").slideDown(100,function(){m.find(".action-buttons").removeClass("h-hide").next(".view-less-ctrl").removeClass("h-hide");vBulletin.animateScrollTop(m.offset().top,{duration:"fast"})});return false});Y.off("click",".list-item-poll .view-less-ctrl").on("click",".view-less-ctrl",function(n){var m=A(this).closest("form.poll");vBulletin.conversation.limitVisiblePollOptionsInAPost(m,3);m.find("ul.poll").css("max-height","").find("li.h-hide").slideUp(100);return false});Y.off("click",".js-post__history").on("click",".js-post__history",vBulletin.conversation.showPostHistory);Y.off("click",".js-post-control__ip-address").on("click",".js-post-control__ip-address",vBulletin.conversation.showIp);Y.off("click",".js-post-control__edit").on("click",".js-post-control__edit",function(m){vBulletin.conversation.editPost.apply(this,[m,X])});Y.off("click",".js-post-control__vote").on("click",".js-post-control__vote",function(m){if(A(m.target).closest(".bubble-flyout").length==1){vBulletin.conversation.showWhoVoted.apply(m.target,[m])}else{vBulletin.conversation.votePost.apply(this,[m])}return false});Y.off("click",".js-post-control__flag").on("click",".js-post-control__flag",vBulletin.conversation.flagPost);Y.off("click",".js-post-control__comment").on("click",".js-post-control__comment",vBulletin.conversation.toggleCommentBox);Y.off("click",".js-comment-entry__post").on("click",".js-comment-entry__post",function(m){vBulletin.conversation.postComment.apply(this,[m,function(){X.updatePageNumber(1).applyFilters(false,true)}])});vBulletin.conversation.bindEditFormEventHandlers("all");A(document).off("dblclick",".js-cell-topic").on("dblclick",".js-cell-topic",vBulletin.conversation.editTopicTitle)})})(jQuery);;

// ***************************
// js.compressed/link.js
// ***************************
/*=======================================================================*\
|| ###################################################################### ||
|| # vBulletin 5.1.9 Patch Level 4
|| # ------------------------------------------------------------------ # ||
|| # Copyright 2000-2016 vBulletin Solutions Inc. All Rights Reserved.  # ||
|| # This file may not be redistributed in whole or significant part.   # ||
|| # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html   # ||
|| ###################################################################### ||
\*========================================================================*/
window.vBulletin=window.vBulletin||{};window.vBulletin.phrase=window.vBulletin.phrase||{};window.vBulletin.phrase.precache=window.vBulletin.phrase.precache||[];window.vBulletin.phrase.precache=$.merge(window.vBulletin.phrase.precache,["attach_link","please_enter_link_url"]);(function(A){A(document).ready(function(){vBulletin.conversation.bindEditFormEventHandlers("link");A(".b-content-entry .b-content-entry-panel__content--link").each(function(){A("body").trigger("link_editform_onload",[A(this)])})})})(jQuery);;

// ***************************
// js.compressed/media.js
// ***************************
/*=======================================================================*\
|| ###################################################################### ||
|| # vBulletin 5.1.9 Patch Level 4
|| # ------------------------------------------------------------------ # ||
|| # Copyright 2000-2016 vBulletin Solutions Inc. All Rights Reserved.  # ||
|| # This file may not be redistributed in whole or significant part.   # ||
|| # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html   # ||
|| ###################################################################### ||
\*========================================================================*/
window.vBulletin=window.vBulletin||{};window.vBulletin.phrase=window.vBulletin.phrase||{};window.vBulletin.phrase.precache=window.vBulletin.phrase.precache||[];window.vBulletin.phrase.precache=$.merge(window.vBulletin.phrase.precache,["saving"]);window.vBulletin.options=window.vBulletin.options||{};window.vBulletin.options.precache=window.vBulletin.options.precache||[];window.vBulletin.options.precache=$.merge(window.vBulletin.options.precache,["postminchars","commentminchars"]);var galleryData={mediaTypeFilter:false,currentMediaPage:Number($("#mediaCurrentPage").val())||1,currentGalleryPage:1,currentNodeId:0,currentUserId:0,profileMediaDetailContainer:false,currentDateFilter:"time_lastmonth"};var $mediaTab=$("#media-tab"),allowHistory,filterHistory,hash;window.vBulletin.media=window.vBulletin.media||{};(function(A){var B=["#media-tab"];if(!vBulletin.pageHasSelectors(B)){return false}window.vBulletin.media.calculatePhotosPerPage=function(D){D=D||50;var C=A("#profileMediaDetailContainer").is(":visible");if(!C){A("#profileMediaDetailContainer").removeClass("h-hide")}var E=Math.floor(A("#profileMediaDetailContainer").width()/128);if(!C){A("#profileMediaDetailContainer").addClass("h-hide")}return(D%E==0||D<=E)?D:D-(D%E)};A(document).ready(function(){A(document).off("click","#mediaList .albumLink").on("click","#mediaList .albumLink",loadGallery);var C=false;$mediaTab.off("click",".profile-media-createvideo, .profile-media-upload").on("click",".profile-media-createvideo, .profile-media-upload",function(E){var D=A(this).hasClass("profile-media-upload")?"gallery":"video";if(!C){C=A(E.target).closest(".ui-widget-content").find(".profileMediaEditContainer").dialog({modal:true,autoOpen:false,width:800,title:vBulletin.phrase.get("profile_media"),resizable:false,closeOnEscape:false,showCloseButton:false,dialogClass:"l-small dialog-container dialog-box edit-media-upload-dialog js-profile-media",close:function(){A(document).data("gallery-container",null)}});vBulletin.upload.initializePhotoUpload(C)}C.off("dialogopen").on("dialogopen",function(F,G){C.find('.b-toolbar__item[data-panel="b-content-entry-panel__content--{0}"]:not(.b-toolbar__item--active)'.format(D)).trigger("click");vBulletin.ckeditor.initEditorComponents(C);A(document).data("gallery-container",A(this).find(".b-content-entry-panel__content--"+D))}).dialog("open")});$mediaTab.off("click","#profileMediaDetailContainer .more-gallery").on("click","#profileMediaDetailContainer .more-gallery",getMorePhotos);$mediaTab.off("click",".profile-media-backbtn").on("click",".profile-media-backbtn",function(E){A("#profileMediaDetailContainer").addClass("h-hide");A("#mediaPreviousPage").closest(".pagenav-controls-container").removeClass("h-hide");A("#profileMediaContainer").removeClass("h-hide");A(".media-tab .profile-toolbar .toolset-left > li").addClass("h-hide").has(".profile-media-upload, .profile-media-createvideo").removeClass("h-hide");galleryData.currentDateFilter=A(this).closest(".conversation-toolbar-wrapper").find(".toolbar-filter-overlay input[name=filter_time]:checked").val();A(".profile-toolbar .media-toolbar-filter").addClass("h-hide");A(this).closest(".conversation-toolbar-wrapper").find(".filtered-by").addClass("h-hide").find(".filter-text-wrapper").empty();var D={totalpages:Number(A("#mediaList").data("totalpages")),totalcount:Number(A("#mediaList").data("totalcount")),currentpage:galleryData.currentMediaPage};setPagination(D)});$mediaTab.off("change","#mediaCurrentPage").on("change","#mediaCurrentPage",goMediaPage);$mediaTab.off("click","#mediaPreviousPage, #mediaNextPage").on("click","#mediaPreviousPage, #mediaNextPage",goMediaPage);galleryData.profileMediaDetailContainer=A("#profileMediaDetailContainer").clone();A(document).off("afterSave",".js-album-detail .js-post__content-wrapper .js-content-entry form").on("afterSave",".js-album-detail .js-post__content-wrapper .js-content-entry form",function(E,D){loadGalleryById(galleryData.currentFilter);return false});A(document).off("afterCancel",".js-album-detail .js-post__content-wrapper .js-content-entry form").on("afterCancel",".js-album-detail .js-post__content-wrapper .js-content-entry form",function(D){loadMediaPage(galleryData.currentMediaPage);return true});A(document).off("afterSave",".js-profile-media .js-content-entry form").on("afterSave",".js-profile-media  .js-content-entry form",function(G,F){var I=A(".b-toolbar__item--active",this).data("panel");if(I=="b-content-entry-panel__content--gallery"){var D=A("#mediaList"),H=Number(D.data("totalpages")),J=Number(D.data("totalcount")),E=(J%vBulletin.media.ALBUMS_PERPAGE)==0?H+1:H;if(F.alert){openAlertDialog({title:vBulletin.phrase.get("media"),message:vBulletin.phrase.get(F.alert),iconType:"alert"})}loadMediaPage(E)}else{loadMediaPage(1)}return false});if($mediaTab.length){allowHistory=$mediaTab.find(".conversation-toolbar-wrapper").data("allow-history")=="1";filterHistory=new vBulletin.history.instance(allowHistory);hash=$mediaTab.closest(".canvas-widget").find(".js-module-top-anchor").attr("id");$mediaTab.off("click",".media-toolbar-filter").on("click",".media-toolbar-filter",function(D){A(".filter-wrapper",this).toggleClass("selected");A(".arrow .vb-icon",this).toggleClass("vb-icon-triangle-down-wide vb-icon-triangle-up-wide");A(D.target).closest(".conversation-toolbar-wrapper").find(".toolbar-filter-overlay").slideToggle("slow",function(){var E="media_filter";if(A(this).is(":visible")){A("body").off("click."+E).on("click."+E,function(H){if(A(H.target).closest(".toolbar-filter-overlay").length==0&&A(H.target).closest(".toolbar-filter").length==0){A("body").off("click."+E);A(".media-toolbar-filter").trigger("click")}});var G={};var F=vBulletin.isScrolledIntoView(this,G);if(!F){A("html,body").animate({scrollTop:"+="+Math.abs(G.bottom)},"fast")}}else{A("body").off("click."+E)}})});A("form.media-filter-overlay",$mediaTab).trigger("reset");$mediaTab.off("change",".media-filter-overlay input[type=radio]").on("change",".media-filter-overlay input[type=radio]",function(K,I){var E;if(!filterHistory.isEnabled()&&allowHistory){E=vBulletin.makePaginatedUrl(location.href,1);location.href=vBulletin.makeFilterUrl(E,this.name,this.value,H,hash);return true}galleryData.currentDateFilter=this.value;var F=fetchMediaFilter(A(K.target));var H=A(".media-tab");if(H.data("perpage")){F.perpage=H.data("perpage")}loadGalleryById(F,true,0,H.data("callbacks"));if(!A(this).data("bypass-filter-display")){vBulletin.conversation.displaySelectedFilterText(this,this.value)}if(filterHistory.isEnabled()&&!I){var J=vBulletin.getSelectedFilters(A("form.toolbar-filter-overlay",H)),N=this.name,D=this.value,M=A(".conversation-toolbar-wrapper .filtered-by",H),G=H.data("url-path")?H.data("url-path"):"#"+H.attr("id"),L={from:"filter",page:1,tab:G,filters:J,filtervalue:D,filtername:N};if(!M.data("reset")){E=vBulletin.makePaginatedUrl(location.href,1);E=vBulletin.makeFilterUrl(E,N,D,H)}else{E=location.pathname.replace(/\/page[0-9]+/,"")}filterHistory.pushState(L,document.title,E);M.data("reset",null)}});$mediaTab.off("click",".filtered-by .x").on("click",".filtered-by .x",function(F){var D=A(this).closest(".filtered-by"),H=A(this).closest(".filter-text"),E=H.data("filter-name");if(!filterHistory.isEnabled()&&allowHistory){location.href=vBulletin.makeFilterUrl(location.href,E,H.data("filter-value"),$mediaTab,hash);return false}$defaultSelectedFilter=A(".toolbar-filter-overlay .filter-options input[name={0}]".format(E),$mediaTab).prop("checked",false).filter(".js-default-checked");H.remove();var G=D.find(".filter-text").length;if(G==0){D.addClass("h-hide");D.data("reset",true)}else{if(G==1){D.find(".clear-all").addClass("h-hide")}}if($defaultSelectedFilter.length==1){$defaultSelectedFilter.data("bypass-filter-display",true);$defaultSelectedFilter.trigger("click");$defaultSelectedFilter.data("bypass-filter-display",null)}})}})})(jQuery);doMediaFilters=function(A){$(".profMediaFilterRow").removeClass("filterSelected");$(A.target).addClass("filterSelected");if($(A.target).hasClass("profMediaFilterAllTypes")){galleryData.mediaTypeFilter=false}else{if($(A.target).hasClass("profMediaFilterGallery")){galleryData.mediaTypeFilter="gallery"}else{if($(A.target).hasClass("profMediaFilterVideo")){galleryData.mediaTypeFilter="video"}}}loadMediaPage(1)};loadMediaPage=function(A){$("body").css("cursor","wait");var B=$(".js-profile-media-container",$mediaTab);$.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/render/profile_media_content",data:({userid:B.data("user-id"),pageno:A,perpage:B.data("perpage")}),type:"POST",dataType:"json",success:function(C){if(C.errors){openAlertDialog({title:vBulletin.phrase.get("profile_media"),message:vBulletin.phrase.get(C.errors[0][0]),iconType:"error"});console.log("/ajax/render/profile_media_content failed, error: "+JSON.stringify(C))}else{console.log("/ajax/render/profile_media_content successful");$("#mediacontent").html(C);$("#profileMediaDetailContainer").empty();$("#mediacontent").removeClass("h-hide");$("#profileMediaContainer").removeClass("h-hide");$(".media-tab .profile-toolbar .toolset-left > li").addClass("h-hide").has(".profile-media-upload, .profile-media-createvideo").removeClass("h-hide");$("#mediaPreviousPage").closest("pagenav-controls").removeClass("h-hide");$("#profileMediaDetailContainer").addClass("h-hide");$("#profileMediaContainer").removeClass("h-hide");galleryData.currentMediaPage=A;var D={totalpages:Number($("#mediaList").data("totalpages")),totalcount:Number($("#mediaList").data("totalcount")),currentpage:A};setPagination(D);if(!vBulletin.isScrolledIntoView($("#profileTabs .profile-tabs-nav"))){$("html,body").animate({scrollTop:$("#profileTabs .profile-tabs-nav").offset().top},"slow")}}},error:function(E,D,C){console.log("/ajax/render/profile_media_content failed, error: "+C);console.log("response:"+E.responseText);console.log("status:"+D);console.log("code:"+E.status);openAlertDialog({title:vBulletin.phrase.get("profile_media"),message:vBulletin.phrase.get("unable_to_contact_server_please_try_again"),iconType:"error"})},complete:function(){$("body").css("cursor","auto")}})};goMediaPage=function(C){var B=this.id;if($("#profileMediaDetailContainer").is(":visible")){gotoGalleryPage(C);return false}if(B=="mediaCurrentPage"){var D=parseInt($("#mediaCurrentPage").val());if(D>0&&D<=parseInt($("#mediaPageCount").html())){loadMediaPage(D);pushHistoryState(D)}else{$("#mediaCurrentPage").val(galleryData.currentMediaPage)}}else{if(B=="mediaPreviousPage"){if(galleryData.currentMediaPage>1){var A=galleryData.currentMediaPage-1;loadMediaPage(A);pushHistoryState(A)}else{$("#mediaPreviousPage").addClass("h-disabled")}}else{if(B=="mediaNextPage"){if(galleryData.currentMediaPage<parseInt($("#mediaPageCount").html())){var A=galleryData.currentMediaPage+1;loadMediaPage(A);pushHistoryState(A)}else{$("#mediaNextPage").addClass("h-disabled")}}}}return false};var pushHistoryState=function(A){var C=vBulletin.makePaginatedUrl(location.href,A);if(filterHistory.isEnabled()){var B={from:"media_filter",page:A||1,tab:$mediaTab.data("url-path")?$mediaTab.data("url-path"):"#"+$mediaTab.attr("id")};filterHistory.pushState(B,document.title,C)}else{if(allowHistory){location.href=C}}};vBulletin.media.setHistoryStateChange=function(A){if(A){allowHistory=$mediaTab.find(".conversation-toolbar-wrapper").data("allow-history")=="1";filterHistory=new vBulletin.history.instance(allowHistory)}if(filterHistory.isEnabled()){filterHistory.setStateChange(function(F){var E=filterHistory.getState();if(E.data.from=="media_filter"){filterHistory.log(E.data,E.title,E.url);var B=$mediaTab.closest(".ui-tabs"),C=B.find(".ui-tabs-nav > li").filter('li:has(a[href*="#{0}"])'.format($mediaTab.attr("id")));if(C.hasClass("ui-tabs-selected")){loadMediaPage(E.data.page)}else{var D=C.index();vBulletin.selectTabByIndex.call(B,D)}}},"media_filter")}};gotoGalleryPage=function(C){if(!galleryData.currentNodeId&&!galleryData.currentUserId){return false}var A=C.target.id;if(A=="mediaCurrentPage"){targetPage=parseInt($("#mediaCurrentPage").val());if(targetPage>0&&targetPage<=parseInt($("#mediaPageCount").html())){var B={nodeid:galleryData.currentNodeId,userid:galleryData.currentUserId,pageno:targetPage,perpage:vBulletin.media.calculatePhotosPerPage(vBulletin.media.TARGET_PHOTOS_PERPAGE),datefilter:galleryData.currentDateFilter};loadGalleryById(B)}else{$("#mediaCurrentPage").val(galleryData.currentGalleryPage)}}else{if(A=="mediaPreviousPage"){if(galleryData.currentGalleryPage>1){var B={nodeid:galleryData.currentNodeId,userid:galleryData.currentUserId,pageno:galleryData.currentGalleryPage-1,perpage:vBulletin.media.calculatePhotosPerPage(vBulletin.media.TARGET_PHOTOS_PERPAGE),datefilter:galleryData.currentDateFilter};loadGalleryById(B)}else{$("#mediaPreviousPage ").addClass("h-disabled")}}else{if(A=="mediaNextPage"){if(galleryData.currentGalleryPage<parseInt($("#mediaPageCount").html())){var B={nodeid:galleryData.currentNodeId,userid:galleryData.currentUserId,pageno:galleryData.currentGalleryPage+1,perpage:vBulletin.media.calculatePhotosPerPage(vBulletin.media.TARGET_PHOTOS_PERPAGE),datefilter:galleryData.currentDateFilter};loadGalleryById(B)}else{$("#mediaNextPage").addClass("h-disabled")}}}}return false};setPagination=function(A){var B=$(".media-tab .pagenav-controls-container")[(A.totalpages>1)?"removeClass":"addClass"]("h-hide");if(B.is(":visible")){$("#mediaPreviousPage")[(A.currentpage<=1)?"addClass":"removeClass"]("h-disabled");$("#mediaNextPage")[(A.currentpage>=A.totalpages)?"addClass":"removeClass"]("h-disabled");$("#mediaCurrentPage").val(A.currentpage);$("#mediaPageCount").text(A.totalpages)}};loadGalleryById=function(B,E,F,H){var C=$("#profileMediaDetailContainer"),D={nodeid:galleryData.currentNodeId,userid:galleryData.currentUserId,channelid:0,pageno:1,dateFilter:galleryData.currentDateFilter,albumid:0};B=$.extend({},D,B);if(!isNaN(B.nodeid)){$("body").css("cursor","wait");var I;if(B.nodeid==-1){I="profile_media_videolist"}else{I="profile_textphotodetail"}if(C.closest(".media-tab").length==0){$(".media-tab").append(galleryData.profileMediaDetailContainer)}$("#profileMediaContainer").closest(".tab").find("li.list-item-gallery").remove();var A=vBulletin.getAjaxBaseurl()+"/ajax/render/"+I;var G={nodeid:B.nodeid,userid:B.userid,channelid:B.channelid,pageno:B.pageno,albumid:B.albumid,viewMore:F};if(B.dateFilter){G.dateFilter=B.dateFilter}if(B.perpage){G.perpage=B.perpage}$.ajax({url:A,type:"POST",data:G,dataType:"json",success:function(J){if(J.errors){openAlertDialog({title:vBulletin.phrase.get("profile_media"),message:vBulletin.phrase.get(J.errors[0][0]),iconType:"error"});if(H&&typeof H.error=="function"){H.error()}}else{galleryData.currentNodeId=B.nodeid;galleryData.currentUserId=B.userid;galleryData.currentGalleryPage=B.pageno;if(F){$(".album-detail .photo-preview").append(J);$(".more-gallery",C)[(galleryData.currentGalleryPage<$(".album-detail").data("totalpages"))?"removeClass":"addClass"]("h-hide-imp")}else{C.html(J);C.addClass("list-item").attr("data-nodeid",B.nodeid);$("#profileMediaContainer").addClass("h-hide");$(".media-tab .profile-toolbar .toolset-left > li").removeClass("h-hide").has(".profile-media-upload, .profile-media-createvideo").addClass("h-hide");C.removeClass("h-hide");$("#mediaPreviousPage").closest(".pagenav-controls-container").addClass("h-hide");$(".profile-media-uploadphotos",C).click(loadPhotoUploader);if(B.perpage){$(".media-tab").data("perpage",B.perpage).data("callbacks",H)}}}if(B.nodeid==-1){var K={totalpages:Number($(".media-video-list",C).data("totalpages")),totalcount:Number($(".media-video-list",C).data("totalcount")),currentpage:galleryData.currentGalleryPage};setPagination(K)}if(!E){}$(".profile-toolbar .media-toolbar-filter").removeClass("h-hide");if(H&&typeof H.success=="function"){H.success()}},error:function(L,K,J){console.log("/ajax/render/{0} failed, error: {1}".format(I,J));openAlertDialog({title:vBulletin.phrase.get("profile_media"),message:vBulletin.phrase.get("unable_to_contact_server_please_try_again"),iconType:"error"});if(H&&typeof H.error=="function"){H.error()}},complete:function(){$("body").css("cursor","auto");if(H&&typeof H.complete=="function"){H.complete()}}})}};loadPhotoUploader=function(C){$(document).data("gallery-container",$(this).closest(".album-detail"));var A=vBulletin.upload.getUploadedPhotosDlg(false);var B=A.data("nodeid");if(!B||isNaN(parseInt(B))){return }$.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/render/media_addphotos",data:{nodeid:B},type:"POST",dataType:"json",success:function(D){if(D.errors){openAlertDialog({title:vBulletin.phrase.get("profile_media"),message:vBulletin.phrase.get(D.errors[0][0]),iconType:"warning",onAfterClose:function(){A.dialog("close")}})}else{A.html(D);vBulletin.upload.initializePhotoUpload(A.parent());A.find(".js-save-button").off("click").on("click",saveGalleryPhotos);A.find(".js-cancel-button").off("click").on("click",function(E){A.dialog("close")});vBulletin.upload.relocateLastInRowClass(A.find(".photo-item-wrapper"));if($(".photo-display .photo-item-wrapper:not(.h-hide)",A).length>0){vBulletin.upload.changeButtonText($(".b-button--upload .js-upload-label",A),vBulletin.phrase.get("upload_more"));$(".js-save-button",A).show()}else{$(".js-save-button",A).hide()}A.dialog("open");vBulletin.upload.adjustPhotoDialogForScrollbar(A)}},error:function(F,E,D){console.log("/ajax/render/media_addphotos failed, error: "+D);openAlertDialog({title:vBulletin.phrase.get("profile_media"),message:vBulletin.phrase.get("unable_to_contact_server_please_try_again"),iconType:"error",onAfterClose:function(){A.dialog("close")}})}})};loadGallery=function(B){var A=fetchMediaFilter($(this));A.pageno=1;A.perpage=vBulletin.media.calculatePhotosPerPage(vBulletin.media.TARGET_PHOTOS_PERPAGE);galleryData.currentDateFilter=$(this).closest(".js-profile-media-container").find(".toolbar-filter-overlay input[name=filter_time]:checked").val();galleryData.currentFilter=A;loadGalleryById(A)};getMorePhotos=function(D){var C=$(".media-tab").data("perpage");var B=$(".media-tab").data("callbacks");var A=fetchMediaFilter($(this));A.pageno=galleryData.currentGalleryPage+1;if(C){A.perpage=C}loadGalleryById(A,false,1,B)};saveGalleryPhotos=function(D){var C=$(D.target).closest(".profile-media-photoupload-dialog"),A=$(D.target).closest("form");if(A.length>0){$(D.target).closest(".photo-display-container").find(".photo-item-wrapper:not(.h-hide)").each(function(E,G){var F=parseInt($(G).find(".filedataid").val());if(!isNaN(F)){A.append('<input type="hidden" name="filedataid[]" value="'+F+'"/>');$('<input type="hidden" name="title_'+F+'" />').val($(G).find("textarea").val()).appendTo(A)}});var B=$("button",A).prop("disabled",true);$.ajax({url:A.attr("action"),data:A.serializeArray(),type:"POST",success:function(E){if(E.errors){if(typeof (E.errors[0])=="undefined"){openAlertDialog({title:vBulletin.phrase.get("media"),message:vBulletin.phrase.get(E.errors),iconType:"error"})}else{openAlertDialog({title:vBulletin.phrase.get("media"),message:vBulletin.phrase.get(E.errors[0]),iconType:"error"})}}else{C.dialog("close");loadMediaPage(galleryData.currentMediaPage)}},error:function(G,F,E){console.log(A.attr("action")+" failed, error: "+E);openAlertDialog({title:vBulletin.phrase.get("profile_media"),message:vBulletin.phrase.get("invalid_server_response_please_try_again"),iconType:"error"})},complete:function(){B.prop("disabled",false)}})}else{C.dialog("close")}};fetchMediaFilter=function(A){var C;if($("#profileMediaContainer").is(":visible")){C=$("#profileMediaContainer")}else{if($("#profileMediaDetailContainer").is(":visible")){C=$("#profileMediaDetailContainer")}}var B={nodeid:parseInt(A.data("nodeid"),10)||parseInt(C.attr("data-nodeid"),10),userid:parseInt(C.data("userid"),10),channelid:parseInt(C.data("channelid"),10),dateFilter:galleryData.currentDateFilter,albumid:parseInt(A.data("albumid"),10)};if(isNaN(B.channelid)){B.channelid=0}if(isNaN(B.nodeid)){B.nodeid=0}if(B.nodeid>0){B.userid=0}else{if(isNaN(B.userid)){B.userid=0}}if(isNaN(B.albumid)){B.albumid=0}return B};;

// ***************************
// js.compressed/sb_activity.js
// ***************************
/*=======================================================================*\
|| ###################################################################### ||
|| # vBulletin 5.1.9 Patch Level 4
|| # ------------------------------------------------------------------ # ||
|| # Copyright 2000-2016 vBulletin Solutions Inc. All Rights Reserved.  # ||
|| # This file may not be redistributed in whole or significant part.   # ||
|| # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html   # ||
|| ###################################################################### ||
\*========================================================================*/
window.vBulletin=window.vBulletin||{};window.vBulletin.phrase=window.vBulletin.phrase||{};window.vBulletin.phrase.precache=window.vBulletin.phrase.precache||[];window.vBulletin.phrase.precache=$.merge(window.vBulletin.phrase.precache,["blog_memberblogLabel","edit_conversation","forum","you_have_a_pending_edit_unsaved"]);(function(A){var B=[".forum-activity-stream-widget",".bloghome-widget",".search-widget"];if(!vBulletin.pageHasSelectors(B)){return false}A(document).ready(function(){vBulletin.conversation=vBulletin.conversation||{};var O=vBulletin.conversation.$activityStreamWidget=A(".activity-stream-widget"),D=vBulletin.conversation.$activityStreamTab=A("#activity-stream-tab");if(D.length==0){D=vBulletin.conversation.$activityStreamTab=A("#article-tab")}var J=vBulletin.conversation.$subscribedTab=A("#subscribed-tab"),K=vBulletin.conversation.$activityStreamList=A(".conversation-list",D),V=vBulletin.conversation.$subscribedList=A(".conversation-list",J),Y,Z,S,F,I,e,H,c,U,T=A(".conversation-list",O),R,a;if(O.hasClass("forum-activity-stream-widget")||O.hasClass("bloghome-widget")){var G=O.find(".widget-tabs-nav .ui-tabs-nav > li"),Q=G.filter(".ui-tabs-selected"),P=Q.index(),d,X={},M=G.parent().data("allow-history")=="1",C=new vBulletin.history.instance(M),L=O.find(".js-module-top-anchor").attr("id");if(P==-1){P=0;Q=G.first()}d=Q.find("> a").attr("href");var N=function(f){var g=(O.offset().top+(O.outerHeight()-parseFloat(O.css("border-bottom-width")))-f.height());return g};var b=function(f){f=f||d;return G.filter('li:has(a[href*="'+f+'"])').first().index()};G.removeClass("ui-state-disabled");vBulletin.tabify.call(O,{tabHistory:C,getTabIndexByHash:b,allowHistory:M,tabParamAsQueryString:true,hash:L,tabOptions:{selected:P,select:function(h,i){if(U){U.hideFilterOverlay()}if(S){S.hideFilterOverlay()}var g=O.find(".widget-tabs-panel .ui-tabs-panel:visible");var f=g.find(".list-item-body-wrapper.edit-post .edit-conversation-container");if(f.length>0){openAlertDialog({title:vBulletin.phrase.get("edit_conversation"),message:vBulletin.phrase.get("you_have_a_pending_edit_unsaved"),iconType:"warning",onAfterClose:function(){vBulletin.animateScrollTop(f.closest(".list-item").offset().top,{duration:"slow"})}});return false}},show:function(j,l){var i=l.panel.id,f=A(this);if(typeof X[i]=="undefined"){X[i]=A(".conversation-toolbar-wrapper",l.panel).data("allow-history")=="1"}if(l.tab.hash=="#memberblog-tab"){if(!I){I=function(){var n=A(".toolbar-pagenav",l.panel);if(n.length>0){new vBulletin.pagination({context:l.panel,allowHistory:X[i],onPageChanged:function(p,o){if(!o){var q=A(".js-button-filter.js-checked",l.panel).data("filter-value");F(p,q,false,true)}}})}}}if(!F){F=function(s,u,o,r){s=s||1;u=u||"show_all";A(".js-button-filters .js-button-filter",l.panel).removeClass("js-checked").filter('[data-filter-value="{0}"]'.format(u)).addClass("js-checked");var n=vBulletin.makePaginatedUrl(location.href,s);if(!o){if(e.isEnabled()){n=vBulletin.makeFilterUrl(n,"filter_blogs",u,l.panel);var q=e.getState(),t={from:"filter_blogs",page:s,tab:l.tab.hash,filters:{filter_blogs:u}};e[(q&&q.data&&q.data.from&&q.data.from!="filter_blogs")?"setDefaultState":"pushState"](t,document.title,n)}else{if(X[i]){n=vBulletin.makeFilterUrl(n,"filter_blogs",u,l.panel,L);location.href=n;return false}}}var p={tab:l.tab.hash.replace("#",""),filter_blogs:u=="show_all"?undefined:u};vBulletin.AJAX({url:vBulletin.getAjaxBaseurl()+"/ajax/render/blogmember_tab",data:{from:s,my:u,noToolbar:r,page:p,blogChannelId:f.data("blog-channel-id")},error_phrase:"unable_to_contact_server_please_try_again",success:function(y){var w=A(y);if(w.filter(".conversation-toolbar-wrapper").length){A(l.panel).html(y);I()}else{A(".blogmember-list",l.panel).hide().replaceWith(w).show();var v=w.data("pagination");if(v&&typeof v=="object"&&!A.isEmptyObject(v)){A(".pagenav-form .js-pagenum",l.panel).val(v.currentpage);A(".pagenav-form .pagetotal",l.panel).text(v.totalpages);var x=A(".pagenav-form .arrow",l.panel);if(v.prevurl){x.filter("[rel=prev]").removeClass("h-disabled").attr("href",v.prevurl.replace(/&amp;/g,"&"))}else{x.filter("[rel=prev]").addClass("h-disabled").removeAttr("href")}if(v.nexturl){x.filter("[rel=next]").removeClass("h-disabled").attr("href",v.nexturl.replace(/&amp;/g,"&"))}else{x.filter("[rel=next]").addClass("h-disabled").removeAttr("href")}}A(".conversation-toolbar-wrapper",l.panel).removeClass("h-hide")}}})};A(l.panel).on("click",".js-button-filter",function(p,n){var o=A(this).data("filter-value");F(1,o,n,true)})}if(!e){e=vBulletin.history.instance(X[i]);if(e.isEnabled()){var k=e.getState();if(!k||A.isEmptyObject(k.data)){var g={from:"filter_blogs",page:Number(A(".pagenav-form .defaultpage",l.panel).val())||1,tab:l.tab.hash,filters:{filter_blogs:A(".js-button-filter.js-checked",l.panel).data("filter-value")}};e.setDefaultState(g,document.title,location.href)}e.setStateChange(function(r){var q=e.getState();if(q.data.from=="filter_blogs"){e.log(q.data,q.title,q.url);var n=f.tabs("option","selected"),o=f.find(".ui-tabs-nav > li").eq(n).find("a").attr("href");if(o!=q.data.tab){var p=A(l.tab).closest(".ui-tabs-nav").find("> li").filter('li:has(a[href*="{0}"])'.format(q.data.tab)).index();vBulletin.selectTabByIndex.call(f,p)}else{F(q.data.page,q.data.filters.filter_blogs,true,true)}}},"filter")}}if(d==l.tab.hash){I()}if(U){U.toggleNewConversations(false)}if(S){S.toggleNewConversations(false)}var h=A(".conversation-list",l.panel);if(!h.hasClass("dataLoaded")){if(d==l.tab.hash&&!a){a=true;return false}A(".conversation-empty",l.panel).addClass("h-hide");F()}return }else{if(l.tab.hash=="#activity-stream-tab"||l.tab.hash=="#article-tab"){if(S){S.toggleNewConversations(false)}if(!U){H=A(".conversation-toolbar-wrapper.scrolltofixed-floating",D);c=false;U=vBulletin.conversation.activityStreamFilter=new vBulletin.conversation.filter({context:D,autoCheck:A(".toolbar-filter-overlay input[type=radio][value=conversations_on]",O).is(":checked"),scrollToTop:O,allowHistory:X[i],onContentLoad:function(){if(!c){c=new vBulletin.scrollToFixed({element:H,limit:N(H)})}c.updateLimit(N(H));vBulletin.truncatePostContent(K);vBulletin.conversation.processPostContent(K)}});if(d==l.tab.hash){vBulletin.truncatePostContent(K);vBulletin.conversation.processPostContent(K);U.lastFilters={filters:U.getSelectedFilters(A(".toolbar-filter-overlay",D))}}}else{U.setOption("context",D);if(typeof U.lastFilters!="undefined"&&A(".conversation-empty:not(.h-hide)",l.panel).length>0){delete U.lastFilters}}U.applyFilters(false,true)}else{if(l.tab.hash=="#subscribed-tab"){if(U){U.toggleNewConversations(false)}if(!S){Y=A(".conversation-toolbar-wrapper.scrolltofixed-floating",J);Z=new vBulletin.scrollToFixed({element:Y,limit:N(Y)});S=vBulletin.conversation.subscribedFilter=new vBulletin.conversation.filter({context:J,scrollToTop:O,allowHistory:X[i],onContentLoad:function(){Z.updateLimit(N(Y));vBulletin.truncatePostContent(V);vBulletin.conversation.processPostContent(V)}});if(d==l.tab.hash){vBulletin.truncatePostContent(V);vBulletin.conversation.processPostContent(V);S.lastFilters={filters:S.getSelectedFilters(A(".toolbar-filter-overlay",J))}}}else{S.setOption("context",J);if(typeof S.lastFilters!="undefined"&&A(".conversation-empty:not(.h-hide)",l.panel).length>0){delete S.lastFilters}}S.applyFilters(false,true)}else{if(l.tab.hash=="#forum-tab"){if(U){U.toggleNewConversations(false)}if(S){S.toggleNewConversations(false)}var m=A(l.panel);if(m.hasClass("dataLoaded")){if(d==l.tab.hash){vBulletin.markreadcheck()}return false}else{if(d==l.tab.hash&&!R){R=true;return false}}A(".conversation-empty",l.panel).addClass("h-hide");A.post(vBulletin.getAjaxBaseurl()+"/ajax/render/display_Forums_tab",function(n){m.html(n).addClass(function(){var o=A(".conversation-empty",this);if(o.length==0){return"dataLoaded"}else{o.removeClass("h-hide");return""}})},"json").error(function(p,o,n){console.log("/ajax/render/display_Forums_tab failed. Error: "+n);openAlertDialog({title:vBulletin.phrase.get("forum"),message:vBulletin.phrase.get("unable_to_contact_server_please_try_again"),iconType:"error"})}).complete(function(){vBulletin.markreadcheck()})}}}}}}});var E=0;O.find(".ui-tabs-nav li").each(function(){E+=A(this).width()});var W=O.find(".ui-tabs-nav").width();if(E>W){O.find(".widget-tabs-nav, .module-title").height(O.find(".ui-tabs-nav").height())}}vBulletin.truncatePostContent(".search-widget");O.off("click",".list-item-poll .view-more-ctrl").on("click",".list-item-poll .view-more-ctrl",function(g){var f=A(this).closest("form.poll");var h=f.find("ul.poll");A(this).addClass("h-hide");h.css("max-height","none").find("li.h-hide").slideDown(100,function(){f.find(".action-buttons").removeClass("h-hide").next(".view-less-ctrl").removeClass("h-hide");vBulletin.animateScrollTop(f.offset().top,{duration:"fast"})});return false});O.off("click",".list-item-poll .view-less-ctrl").on("click",".list-item-poll .view-less-ctrl",function(g){var f=A(this).closest("form.poll");vBulletin.conversation.limitVisiblePollOptionsInAPost(f,3);f.find("ul.poll").css("max-height","").find("li.h-hide").slideUp(100);return false});T.off("click",".js-post-control__edit").on("click",".js-post-control__edit",function(f){vBulletin.conversation.editPost.apply(this,[f,U])});T.off("click",".js-post__history").on("click",".js-post__history",vBulletin.conversation.showPostHistory);T.off("click",".js-post-control__ip-address").on("click",".js-post-control__ip-address",vBulletin.conversation.showIp);T.off("click",".js-post-control__vote").on("click",".js-post-control__vote",function(f){if(A(f.target).closest(".bubble-flyout").length==1){vBulletin.conversation.showWhoVoted.apply(f.target,[f])}else{vBulletin.conversation.votePost.apply(this,[f])}return false});T.off("click",".js-post-control__flag").on("click",".js-post-control__flag",vBulletin.conversation.flagPost);T.off("click",".js-post-control__comment").on("click",".js-post-control__comment",vBulletin.conversation.toggleCommentBox);T.off("click",".js-comment-entry__post").on("click",".js-comment-entry__post",function(f){vBulletin.conversation.postComment.apply(this,[f,function(){U.updatePageNumber(1).applyFilters(false,true)}])});vBulletin.conversation.bindEditFormEventHandlers("all")})})(jQuery);;

// ***************************
// js.compressed/hv.js
// ***************************
/*=======================================================================*\
|| ###################################################################### ||
|| # vBulletin 5.1.9 Patch Level 4
|| # ------------------------------------------------------------------ # ||
|| # Copyright 2000-2016 vBulletin Solutions Inc. All Rights Reserved.  # ||
|| # This file may not be redistributed in whole or significant part.   # ||
|| # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html   # ||
|| ###################################################################### ||
\*========================================================================*/
(function(A){window.vBulletin=window.vBulletin||{};vBulletin.hv=vBulletin.hv||{};vBulletin.hv.reset=function(B){var C;if($(".humanverify.humanverify_image").length>0){$(".humanverify.humanverify_image .refresh_imagereg").click();C=$(".humanverify.humanverify_image .imageregt")}else{if($(".humanverify.humanverify_recaptcha").length>0&&Recaptcha&&typeof Recaptcha.reload=="function"){Recaptcha.reload()}else{if($(".humanverify.humanverify_question").length>0){$.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/render/humanverify",data:{action:"register"},type:"POST",dataType:"json",success:function(D){$(".humanverify.humanverify_question").replaceWith(D);if(B){$(".humanverify.humanverify_question .answer").focus()}}});C=$(".humanverify.humanverify_question .answer")}}}if(B&&C&&C.length>0){C.focus()}};vBulletin.hv.imagereg=vBulletin.hv.imagereg||{};vBulletin.hv.imagereg.init=function(B){if(typeof B=="undefined"||B.length==0){B=$(document)}$(".humanverify_image",B).each(function(){var C=$(this);$(".refresh_imagereg",C).off("click").on("click",C,vBulletin.hv.imagereg.fetch_image);$(".imagereg",C).off("click").on("click",C,vBulletin.hv.imagereg.fetch_image);$(".refresh_imagereg",C).removeClass("h-hide")})};vBulletin.hv.imagereg.fetch_image=function(C){var B=C.data;$(".progress_imagereg",B).removeClass("h-hide");$.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/api/hv/generateToken",type:"POST",dataType:"json",success:function(D){if(!D.errors){var E=D.hash;$("input.hash",B).val(E);$(".imagereg",B).attr("src",pageData.baseurl+"/hv/image?hash="+E);$(".imageregt",B).val("")}},complete:function(){$(".progress_imagereg",B).addClass("h-hide")}});return false};vBulletin.hv.initHvForPostAction=function(B){if(!pageData.showhv_post||B.closest(".edit-post").length>0){return }$(".content-entry-box .humanverify").remove();$.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/render/humanverify",type:"POST",data:({action:"post"}),dataType:"json",success:function(C){console.log("/ajax/render/humanverify");if(C&&!C.errors){$(".content_entry_box_buttons",B).before(C);if($(".humanverify.humanverify_image",B).length>0){vBulletin.hv.imagereg.init(B)}}else{console.log("/ajax/render/humanverify successful, but response was not valid: "+JSON.stringify(C));openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("invalid_server_response_please_try_again"),iconType:"error"})}},error:function(E,D,C){console.log("/ajax/render/humanverify failed, error: "+C);openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("error_loading_delete_form_x",E.status),iconType:"error"})}})};$(document).ready(function(){vBulletin.hv.imagereg.init();if(typeof (window.vBulletin.hv_script)!="undefined"&&typeof (window.vBulletin.delayedInit)!="undefined"&&window.vBulletin.delayedInit){$.getScript(window.vBulletin.hv_script,function(){reloadRecaptcha()})}})})(jQuery);;

