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