/*!
 * jQuery UI 1.8.18
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI
 */
!function(e,t){function i(t,i){var s=t.nodeName.toLowerCase();if("area"===s){var o,r=t.parentNode,a=r.name;return t.href&&a&&"map"===r.nodeName.toLowerCase()?(o=e("img[usemap=#"+a+"]")[0],!!o&&n(o)):!1}return(/input|select|textarea|button|object/.test(s)?!t.disabled:"a"==s?t.href||i:i)&&n(t)}function n(t){return!e(t).parents().andSelf().filter(function(){return"hidden"===e.curCSS(this,"visibility")||e.expr.filters.hidden(this)}).length}e.ui=e.ui||{},e.ui.version||(e.extend(e.ui,{version:"1.8.18",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}}),e.fn.extend({propAttr:e.fn.prop||e.fn.attr,_focus:e.fn.focus,focus:function(t,i){return"number"==typeof t?this.each(function(){var n=this;setTimeout(function(){e(n).focus(),i&&i.call(n)},t)}):this._focus.apply(this,arguments)},scrollParent:function(){var t;return t=e.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.curCSS(this,"position",1))&&/(auto|scroll)/.test(e.curCSS(this,"overflow",1)+e.curCSS(this,"overflow-y",1)+e.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.curCSS(this,"overflow",1)+e.curCSS(this,"overflow-y",1)+e.curCSS(this,"overflow-x",1))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(i){if(i!==t)return this.css("zIndex",i);if(this.length)for(var n,s,o=e(this[0]);o.length&&o[0]!==document;){if(n=o.css("position"),("absolute"===n||"relative"===n||"fixed"===n)&&(s=parseInt(o.css("zIndex"),10),!isNaN(s)&&0!==s))return s;o=o.parent()}return 0},disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.each(["Width","Height"],function(i,n){function s(t,i,n,s){return e.each(o,function(){i-=parseFloat(e.curCSS(t,"padding"+this,!0))||0,n&&(i-=parseFloat(e.curCSS(t,"border"+this+"Width",!0))||0),s&&(i-=parseFloat(e.curCSS(t,"margin"+this,!0))||0)}),i}var o="Width"===n?["Left","Right"]:["Top","Bottom"],r=n.toLowerCase(),a={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+n]=function(i){return i===t?a["inner"+n].call(this):this.each(function(){e(this).css(r,s(this,i)+"px")})},e.fn["outer"+n]=function(t,i){return"number"!=typeof t?a["outer"+n].call(this,t):this.each(function(){e(this).css(r,s(this,t,!0,i)+"px")})}}),e.extend(e.expr[":"],{data:function(t,i,n){return!!e.data(t,n[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var n=e.attr(t,"tabindex"),s=isNaN(n);return(s||n>=0)&&i(t,!s)}}),e(function(){var t=document.body,i=t.appendChild(i=document.createElement("div"));i.offsetHeight,e.extend(i.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}),e.support.minHeight=100===i.offsetHeight,e.support.selectstart="onselectstart"in i,t.removeChild(i).style.display="none"}),e.extend(e.ui,{plugin:{add:function(t,i,n){var s=e.ui[t].prototype;for(var o in n)s.plugins[o]=s.plugins[o]||[],s.plugins[o].push([i,n[o]])},call:function(e,t,i){var n=e.plugins[t];if(n&&e.element[0].parentNode)for(var s=0;s<n.length;s++)e.options[n[s][0]]&&n[s][1].apply(e.element,i)}},contains:function(e,t){return document.compareDocumentPosition?16&e.compareDocumentPosition(t):e!==t&&e.contains(t)},hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var n=i&&"left"===i?"scrollLeft":"scrollTop",s=!1;return t[n]>0?!0:(t[n]=1,s=t[n]>0,t[n]=0,s)},isOverAxis:function(e,t,i){return e>t&&t+i>e},isOver:function(t,i,n,s,o,r){return e.ui.isOverAxis(t,n,o)&&e.ui.isOverAxis(i,s,r)}}))}(jQuery),/*!
 * jQuery UI Widget 1.8.18
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Widget
 */
function(e,t){if(e.cleanData){var i=e.cleanData;e.cleanData=function(t){for(var n,s=0;null!=(n=t[s]);s++)try{e(n).triggerHandler("remove")}catch(o){}i(t)}}else{var n=e.fn.remove;e.fn.remove=function(t,i){return this.each(function(){return i||(!t||e.filter(t,[this]).length)&&e("*",this).add([this]).each(function(){try{e(this).triggerHandler("remove")}catch(t){}}),n.call(e(this),t,i)})}}e.widget=function(t,i,n){var s,o=t.split(".")[0];t=t.split(".")[1],s=o+"-"+t,n||(n=i,i=e.Widget),e.expr[":"][s]=function(i){return!!e.data(i,t)},e[o]=e[o]||{},e[o][t]=function(e,t){arguments.length&&this._createWidget(e,t)};var r=new i;r.options=e.extend(!0,{},r.options),e[o][t].prototype=e.extend(!0,r,{namespace:o,widgetName:t,widgetEventPrefix:e[o][t].prototype.widgetEventPrefix||t,widgetBaseClass:s},n),e.widget.bridge(t,e[o][t])},e.widget.bridge=function(i,n){e.fn[i]=function(s){var o="string"==typeof s,r=Array.prototype.slice.call(arguments,1),a=this;return s=!o&&r.length?e.extend.apply(null,[!0,s].concat(r)):s,o&&"_"===s.charAt(0)?a:(o?this.each(function(){var n=e.data(this,i),o=n&&e.isFunction(n[s])?n[s].apply(n,r):n;return o!==n&&o!==t?(a=o,!1):void 0}):this.each(function(){var t=e.data(this,i);t?t.option(s||{})._init():e.data(this,i,new n(s,this))}),a)}},e.Widget=function(e,t){arguments.length&&this._createWidget(e,t)},e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:!1},_createWidget:function(t,i){e.data(i,this.widgetName,this),this.element=e(i),this.options=e.extend(!0,{},this.options,this._getCreateOptions(),t);var n=this;this.element.bind("remove."+this.widgetName,function(){n.destroy()}),this._create(),this._trigger("create"),this._init()},_getCreateOptions:function(){return e.metadata&&e.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName),this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled "+"ui-state-disabled")},widget:function(){return this.element},option:function(i,n){var s=i;if(0===arguments.length)return e.extend({},this.options);if("string"==typeof i){if(n===t)return this.options[i];s={},s[i]=n}return this._setOptions(s),this},_setOptions:function(t){var i=this;return e.each(t,function(e,t){i._setOption(e,t)}),this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&this.widget()[t?"addClass":"removeClass"](this.widgetBaseClass+"-disabled"+" "+"ui-state-disabled").attr("aria-disabled",t),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_trigger:function(t,i,n){var s,o,r=this.options[t];if(n=n||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(s in o)s in i||(i[s]=o[s]);return this.element.trigger(i,n),!(e.isFunction(r)&&r.call(this.element[0],i,n)===!1||i.isDefaultPrevented())}}}(jQuery),/*!
 * jQuery UI Mouse 1.8.18
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Mouse
 *
 * Depends:
 *	jquery.ui.widget.js
 */
function(e){var t=!1;e(document).mouseup(function(){t=!1}),e.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(i){return!0===e.data(i.target,t.widgetName+".preventClickEvent")?(e.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(i){if(!t){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var n=this,s=1==i.which,o="string"==typeof this.options.cancel&&i.target.nodeName?e(i.target).closest(this.options.cancel).length:!1;return s&&!o&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){n.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===e.data(i.target,this.widgetName+".preventClickEvent")&&e.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return n._mouseMove(e)},this._mouseUpDelegate=function(e){return n._mouseUp(e)},e(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),t=!0,!0)):!0}},_mouseMove:function(t){return!e.browser.msie||document.documentMode>=9||t.button?this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted):this._mouseUp(t)},_mouseUp:function(t){return e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target==this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}(jQuery),/*
 * jQuery UI Draggable 1.8.18
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Draggables
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.mouse.js
 *	jquery.ui.widget.js
 */
function(e){e.widget("ui.draggable",e.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(){return this.element.data("draggable")?(this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy(),this):void 0},_mouseCapture:function(t){var i=this.options;return this.helper||i.disabled||e(t.target).is(".ui-resizable-handle")?!1:(this.handle=this._getHandle(t),this.handle?(i.iframeFix&&e(i.iframeFix===!0?"iframe":i.iframeFix).each(function(){e('<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(e(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(t){var i=this.options;return this.helper=this._createHelper(t),this._cacheHelperProportions(),e.ui.ddmanager&&(e.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},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),i.containment&&this._setContainment(),this._trigger("start",t)===!1?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.helper.addClass("ui-draggable-dragging"),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_mouseDrag:function(t,i){if(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),!i){var n=this._uiHash();if(this._trigger("drag",t,n)===!1)return this._mouseUp({}),!1;this.position=n.position}return this.options.axis&&"y"==this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"==this.options.axis||(this.helper[0].style.top=this.position.top+"px"),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var i=!1;if(e.ui.ddmanager&&!this.options.dropBehaviour&&(i=e.ui.ddmanager.drop(this,t)),this.dropped&&(i=this.dropped,this.dropped=!1),!(this.element[0]&&this.element[0].parentNode||"original"!=this.options.helper))return!1;if("invalid"==this.options.revert&&!i||"valid"==this.options.revert&&i||this.options.revert===!0||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,i)){var n=this;e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){n._trigger("stop",t)!==!1&&n._clear()})}else this._trigger("stop",t)!==!1&&this._clear();return!1},_mouseUp:function(t){return this.options.iframeFix===!0&&e("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){var i=this.options.handle&&e(this.options.handle,this.element).length?!1:!0;return e(this.options.handle,this.element).find("*").andSelf().each(function(){this==t.target&&(i=!0)}),i},_createHelper:function(t){var i=this.options,n=e.isFunction(i.helper)?e(i.helper.apply(this.element[0],[t])):"clone"==i.helper?this.element.clone().removeAttr("id"):this.element;return n.parents("body").length||n.appendTo("parent"==i.appendTo?this.element[0].parentNode:i.appendTo),n[0]==this.element[0]||/(fixed|absolute)/.test(n.css("position"))||n.css("position","absolute"),n},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"==this.cssPosition&&this.scrollParent[0]!=document&&e.ui.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&"html"==this.offsetParent[0].tagName.toLowerCase()&&e.browser.msie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"==this.cssPosition){var e=this.element.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.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,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t=this.options;if("parent"==t.containment&&(t.containment=this.helper[0].parentNode),("document"==t.containment||"window"==t.containment)&&(this.containment=["document"==t.containment?0:e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,"document"==t.containment?0:e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,("document"==t.containment?0:e(window).scrollLeft())+e("document"==t.containment?document:window).width()-this.helperProportions.width-this.margins.left,("document"==t.containment?0:e(window).scrollTop())+(e("document"==t.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(t.containment)||t.containment.constructor==Array)t.containment.constructor==Array&&(this.containment=t.containment);else{var i=e(t.containment),n=i[0];if(!n)return;i.offset();var s="hidden"!=e(n).css("overflow");this.containment=[(parseInt(e(n).css("borderLeftWidth"),10)||0)+(parseInt(e(n).css("paddingLeft"),10)||0),(parseInt(e(n).css("borderTopWidth"),10)||0)+(parseInt(e(n).css("paddingTop"),10)||0),(s?Math.max(n.scrollWidth,n.offsetWidth):n.offsetWidth)-(parseInt(e(n).css("borderLeftWidth"),10)||0)-(parseInt(e(n).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(s?Math.max(n.scrollHeight,n.offsetHeight):n.offsetHeight)-(parseInt(e(n).css("borderTopWidth"),10)||0)-(parseInt(e(n).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=i}},_convertPositionTo:function(t,i){i||(i=this.position);var n="absolute"==t?1:-1,s=(this.options,"absolute"!=this.cssPosition||this.scrollParent[0]!=document&&e.ui.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent),o=/(html|body)/i.test(s[0].tagName);return{top:i.top+this.offset.relative.top*n+this.offset.parent.top*n-(e.browser.safari&&e.browser.version<526&&"fixed"==this.cssPosition?0:("fixed"==this.cssPosition?-this.scrollParent.scrollTop():o?0:s.scrollTop())*n),left:i.left+this.offset.relative.left*n+this.offset.parent.left*n-(e.browser.safari&&e.browser.version<526&&"fixed"==this.cssPosition?0:("fixed"==this.cssPosition?-this.scrollParent.scrollLeft():o?0:s.scrollLeft())*n)}},_generatePosition:function(t){var i=this.options,n="absolute"!=this.cssPosition||this.scrollParent[0]!=document&&e.ui.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,s=/(html|body)/i.test(n[0].tagName),o=t.pageX,r=t.pageY;if(this.originalPosition){var a;if(this.containment){if(this.relative_container){var l=this.relative_container.offset();a=[this.containment[0]+l.left,this.containment[1]+l.top,this.containment[2]+l.left,this.containment[3]+l.top]}else a=this.containment;t.pageX-this.offset.click.left<a[0]&&(o=a[0]+this.offset.click.left),t.pageY-this.offset.click.top<a[1]&&(r=a[1]+this.offset.click.top),t.pageX-this.offset.click.left>a[2]&&(o=a[2]+this.offset.click.left),t.pageY-this.offset.click.top>a[3]&&(r=a[3]+this.offset.click.top)}if(i.grid){var c=i.grid[1]?this.originalPageY+Math.round((r-this.originalPageY)/i.grid[1])*i.grid[1]:this.originalPageY;r=a?c-this.offset.click.top<a[1]||c-this.offset.click.top>a[3]?c-this.offset.click.top<a[1]?c+i.grid[1]:c-i.grid[1]:c:c;var u=i.grid[0]?this.originalPageX+Math.round((o-this.originalPageX)/i.grid[0])*i.grid[0]:this.originalPageX;o=a?u-this.offset.click.left<a[0]||u-this.offset.click.left>a[2]?u-this.offset.click.left<a[0]?u+i.grid[0]:u-i.grid[0]:u:u}}return{top:r-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(e.browser.safari&&e.browser.version<526&&"fixed"==this.cssPosition?0:"fixed"==this.cssPosition?-this.scrollParent.scrollTop():s?0:n.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(e.browser.safari&&e.browser.version<526&&"fixed"==this.cssPosition?0:"fixed"==this.cssPosition?-this.scrollParent.scrollLeft():s?0:n.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(t,i,n){return n=n||this._uiHash(),e.ui.plugin.call(this,t,[i,n]),"drag"==t&&(this.positionAbs=this._convertPositionTo("absolute")),e.Widget.prototype._trigger.call(this,t,i,n)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),e.extend(e.ui.draggable,{version:"1.8.18"}),e.ui.plugin.add("draggable","connectToSortable",{start:function(t,i){var n=e(this).data("draggable"),s=n.options,o=e.extend({},i,{item:n.element});n.sortables=[],e(s.connectToSortable).each(function(){var i=e.data(this,"sortable");i&&!i.options.disabled&&(n.sortables.push({instance:i,shouldRevert:i.options.revert}),i.refreshPositions(),i._trigger("activate",t,o))})},stop:function(t,i){var n=e(this).data("draggable"),s=e.extend({},i,{item:n.element});e.each(n.sortables,function(){this.instance.isOver?(this.instance.isOver=0,n.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=!0),this.instance._mouseStop(t),this.instance.options.helper=this.instance.options._helper,"original"==n.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",t,s))})},drag:function(t,i){var n=e(this).data("draggable"),s=this;e.each(n.sortables,function(){this.instance.positionAbs=n.positionAbs,this.instance.helperProportions=n.helperProportions,this.instance.offset.click=n.offset.click,this.instance._intersectsWith(this.instance.containerCache)?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=e(s).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return i.helper[0]},t.target=this.instance.currentItem[0],this.instance._mouseCapture(t,!0),this.instance._mouseStart(t,!0,!0),this.instance.offset.click.top=n.offset.click.top,this.instance.offset.click.left=n.offset.click.left,this.instance.offset.parent.left-=n.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=n.offset.parent.top-this.instance.offset.parent.top,n._trigger("toSortable",t),n.dropped=this.instance.element,n.currentItem=n.element,this.instance.fromOutside=n),this.instance.currentItem&&this.instance._mouseDrag(t)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",t,this.instance._uiHash(this.instance)),this.instance._mouseStop(t,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),n._trigger("fromSortable",t),n.dropped=!1)})}}),e.ui.plugin.add("draggable","cursor",{start:function(){var t=e("body"),i=e(this).data("draggable").options;t.css("cursor")&&(i._cursor=t.css("cursor")),t.css("cursor",i.cursor)},stop:function(){var t=e(this).data("draggable").options;t._cursor&&e("body").css("cursor",t._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,i){var n=e(i.helper),s=e(this).data("draggable").options;n.css("opacity")&&(s._opacity=n.css("opacity")),n.css("opacity",s.opacity)},stop:function(t,i){var n=e(this).data("draggable").options;n._opacity&&e(i.helper).css("opacity",n._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(){var t=e(this).data("draggable");t.scrollParent[0]!=document&&"HTML"!=t.scrollParent[0].tagName&&(t.overflowOffset=t.scrollParent.offset())},drag:function(t){var i=e(this).data("draggable"),n=i.options,s=!1;i.scrollParent[0]!=document&&"HTML"!=i.scrollParent[0].tagName?(n.axis&&"x"==n.axis||(i.overflowOffset.top+i.scrollParent[0].offsetHeight-t.pageY<n.scrollSensitivity?i.scrollParent[0].scrollTop=s=i.scrollParent[0].scrollTop+n.scrollSpeed:t.pageY-i.overflowOffset.top<n.scrollSensitivity&&(i.scrollParent[0].scrollTop=s=i.scrollParent[0].scrollTop-n.scrollSpeed)),n.axis&&"y"==n.axis||(i.overflowOffset.left+i.scrollParent[0].offsetWidth-t.pageX<n.scrollSensitivity?i.scrollParent[0].scrollLeft=s=i.scrollParent[0].scrollLeft+n.scrollSpeed:t.pageX-i.overflowOffset.left<n.scrollSensitivity&&(i.scrollParent[0].scrollLeft=s=i.scrollParent[0].scrollLeft-n.scrollSpeed))):(n.axis&&"x"==n.axis||(t.pageY-e(document).scrollTop()<n.scrollSensitivity?s=e(document).scrollTop(e(document).scrollTop()-n.scrollSpeed):e(window).height()-(t.pageY-e(document).scrollTop())<n.scrollSensitivity&&(s=e(document).scrollTop(e(document).scrollTop()+n.scrollSpeed))),n.axis&&"y"==n.axis||(t.pageX-e(document).scrollLeft()<n.scrollSensitivity?s=e(document).scrollLeft(e(document).scrollLeft()-n.scrollSpeed):e(window).width()-(t.pageX-e(document).scrollLeft())<n.scrollSensitivity&&(s=e(document).scrollLeft(e(document).scrollLeft()+n.scrollSpeed)))),s!==!1&&e.ui.ddmanager&&!n.dropBehaviour&&e.ui.ddmanager.prepareOffsets(i,t)}}),e.ui.plugin.add("draggable","snap",{start:function(){var t=e(this).data("draggable"),i=t.options;t.snapElements=[],e(i.snap.constructor!=String?i.snap.items||":data(draggable)":i.snap).each(function(){var i=e(this),n=i.offset();this!=t.element[0]&&t.snapElements.push({item:this,width:i.outerWidth(),height:i.outerHeight(),top:n.top,left:n.left})})},drag:function(t,i){for(var n=e(this).data("draggable"),s=n.options,o=s.snapTolerance,r=i.offset.left,a=r+n.helperProportions.width,l=i.offset.top,c=l+n.helperProportions.height,u=n.snapElements.length-1;u>=0;u--){var h=n.snapElements[u].left,d=h+n.snapElements[u].width,p=n.snapElements[u].top,f=p+n.snapElements[u].height;if(r>h-o&&d+o>r&&l>p-o&&f+o>l||r>h-o&&d+o>r&&c>p-o&&f+o>c||a>h-o&&d+o>a&&l>p-o&&f+o>l||a>h-o&&d+o>a&&c>p-o&&f+o>c){if("inner"!=s.snapMode){var m=Math.abs(p-c)<=o,g=Math.abs(f-l)<=o,v=Math.abs(h-a)<=o,b=Math.abs(d-r)<=o;m&&(i.position.top=n._convertPositionTo("relative",{top:p-n.helperProportions.height,left:0}).top-n.margins.top),g&&(i.position.top=n._convertPositionTo("relative",{top:f,left:0}).top-n.margins.top),v&&(i.position.left=n._convertPositionTo("relative",{top:0,left:h-n.helperProportions.width}).left-n.margins.left),b&&(i.position.left=n._convertPositionTo("relative",{top:0,left:d}).left-n.margins.left)}var y=m||g||v||b;if("outer"!=s.snapMode){var m=Math.abs(p-l)<=o,g=Math.abs(f-c)<=o,v=Math.abs(h-r)<=o,b=Math.abs(d-a)<=o;m&&(i.position.top=n._convertPositionTo("relative",{top:p,left:0}).top-n.margins.top),g&&(i.position.top=n._convertPositionTo("relative",{top:f-n.helperProportions.height,left:0}).top-n.margins.top),v&&(i.position.left=n._convertPositionTo("relative",{top:0,left:h}).left-n.margins.left),b&&(i.position.left=n._convertPositionTo("relative",{top:0,left:d-n.helperProportions.width}).left-n.margins.left)}!n.snapElements[u].snapping&&(m||g||v||b||y)&&n.options.snap.snap&&n.options.snap.snap.call(n.element,t,e.extend(n._uiHash(),{snapItem:n.snapElements[u].item})),n.snapElements[u].snapping=m||g||v||b||y}else n.snapElements[u].snapping&&n.options.snap.release&&n.options.snap.release.call(n.element,t,e.extend(n._uiHash(),{snapItem:n.snapElements[u].item})),n.snapElements[u].snapping=!1}}}),e.ui.plugin.add("draggable","stack",{start:function(){var t=e(this).data("draggable").options,i=e.makeArray(e(t.stack)).sort(function(t,i){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(i).css("zIndex"),10)||0)});if(i.length){var n=parseInt(i[0].style.zIndex)||0;e(i).each(function(e){this.style.zIndex=n+e}),this[0].style.zIndex=n+i.length}}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,i){var n=e(i.helper),s=e(this).data("draggable").options;n.css("zIndex")&&(s._zIndex=n.css("zIndex")),n.css("zIndex",s.zIndex)},stop:function(t,i){var n=e(this).data("draggable").options;n._zIndex&&e(i.helper).css("zIndex",n._zIndex)}})}(jQuery),/*
 * jQuery UI Droppable 1.8.18
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Droppables
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.widget.js
 *	jquery.ui.mouse.js
 *	jquery.ui.draggable.js
 */
function(e){e.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect"},_create:function(){var t=this.options,i=t.accept;this.isover=0,this.isout=1,this.accept=e.isFunction(i)?i:function(e){return e.is(i)},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},e.ui.ddmanager.droppables[t.scope]=e.ui.ddmanager.droppables[t.scope]||[],e.ui.ddmanager.droppables[t.scope].push(this),t.addClasses&&this.element.addClass("ui-droppable")},destroy:function(){for(var t=e.ui.ddmanager.droppables[this.options.scope],i=0;i<t.length;i++)t[i]==this&&t.splice(i,1);return this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable"),this},_setOption:function(t,i){"accept"==t&&(this.accept=e.isFunction(i)?i:function(e){return e.is(i)}),e.Widget.prototype._setOption.apply(this,arguments)},_activate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",t,this.ui(i))},_deactivate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",t,this.ui(i))},_over:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!=this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",t,this.ui(i)))},_out:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!=this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",t,this.ui(i)))},_drop:function(t,i){var n=i||e.ui.ddmanager.current;if(!n||(n.currentItem||n.element)[0]==this.element[0])return!1;var s=!1;return this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var t=e.data(this,"droppable");return t.options.greedy&&!t.options.disabled&&t.options.scope==n.options.scope&&t.accept.call(t.element[0],n.currentItem||n.element)&&e.ui.intersect(n,e.extend(t,{offset:t.element.offset()}),t.options.tolerance)?(s=!0,!1):void 0}),s?!1:this.accept.call(this.element[0],n.currentItem||n.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",t,this.ui(n)),this.element):!1},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}}}),e.extend(e.ui.droppable,{version:"1.8.18"}),e.ui.intersect=function(t,i,n){if(!i.offset)return!1;var s=(t.positionAbs||t.position.absolute).left,o=s+t.helperProportions.width,r=(t.positionAbs||t.position.absolute).top,a=r+t.helperProportions.height,l=i.offset.left,c=l+i.proportions.width,u=i.offset.top,h=u+i.proportions.height;switch(n){case"fit":return s>=l&&c>=o&&r>=u&&h>=a;case"intersect":return l<s+t.helperProportions.width/2&&o-t.helperProportions.width/2<c&&u<r+t.helperProportions.height/2&&a-t.helperProportions.height/2<h;case"pointer":var d=(t.positionAbs||t.position.absolute).left+(t.clickOffset||t.offset.click).left,p=(t.positionAbs||t.position.absolute).top+(t.clickOffset||t.offset.click).top,f=e.ui.isOver(p,d,u,l,i.proportions.height,i.proportions.width);return f;case"touch":return(r>=u&&h>=r||a>=u&&h>=a||u>r&&a>h)&&(s>=l&&c>=s||o>=l&&c>=o||l>s&&o>c);default:return!1}},e.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,i){var n=e.ui.ddmanager.droppables[t.options.scope]||[],s=i?i.type:null,o=(t.currentItem||t.element).find(":data(droppable)").andSelf();e:for(var r=0;r<n.length;r++)if(!(n[r].options.disabled||t&&!n[r].accept.call(n[r].element[0],t.currentItem||t.element))){for(var a=0;a<o.length;a++)if(o[a]==n[r].element[0]){n[r].proportions.height=0;continue e}n[r].visible="none"!=n[r].element.css("display"),n[r].visible&&("mousedown"==s&&n[r]._activate.call(n[r],i),n[r].offset=n[r].element.offset(),n[r].proportions={width:n[r].element[0].offsetWidth,height:n[r].element[0].offsetHeight})}},drop:function(t,i){var n=!1;return e.each(e.ui.ddmanager.droppables[t.options.scope]||[],function(){this.options&&(!this.options.disabled&&this.visible&&e.ui.intersect(t,this,this.options.tolerance)&&(n=this._drop.call(this,i)||n),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=1,this.isover=0,this._deactivate.call(this,i)))}),n},dragStart:function(t,i){t.element.parents(":not(body,html)").bind("scroll.droppable",function(){t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)})},drag:function(t,i){t.options.refreshPositions&&e.ui.ddmanager.prepareOffsets(t,i),e.each(e.ui.ddmanager.droppables[t.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var n=e.ui.intersect(t,this,this.options.tolerance),s=n||1!=this.isover?n&&0==this.isover?"isover":null:"isout";if(s){var o;if(this.options.greedy){var r=this.element.parents(":data(droppable):eq(0)");r.length&&(o=e.data(r[0],"droppable"),o.greedyChild="isover"==s?1:0)}o&&"isover"==s&&(o.isover=0,o.isout=1,o._out.call(o,i)),this[s]=1,this["isout"==s?"isover":"isout"]=0,this["isover"==s?"_over":"_out"].call(this,i),o&&"isout"==s&&(o.isout=0,o.isover=1,o._over.call(o,i))}}})},dragStop:function(t,i){t.element.parents(":not(body,html)").unbind("scroll.droppable"),t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)}}}(jQuery),/*
 * jQuery UI Resizable 1.8.18
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Resizables
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.mouse.js
 *	jquery.ui.widget.js
 */
function(e){e.widget("ui.resizable",e.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 t=this,i=this.options;if(this.element.addClass("ui-resizable"),e.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(e('<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=i.handles||(e(".ui-resizable-handle",this.element).length?{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"}:"e,s,se"),this.handles.constructor==String){"all"==this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw");var n=this.handles.split(",");this.handles={};for(var s=0;s<n.length;s++){var o=e.trim(n[s]),r="ui-resizable-"+o,a=e('<div class="ui-resizable-handle '+r+'"></div>');/sw|se|ne|nw/.test(o)&&a.css({zIndex:++i.zIndex}),"se"==o&&a.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[o]=".ui-resizable-"+o,this.element.append(a)}}this._renderAxis=function(t){t=t||this.element;for(var i in this.handles){if(this.handles[i].constructor==String&&(this.handles[i]=e(this.handles[i],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var n=e(this.handles[i],this.element),s=0;s=/sw|ne|nw|se|n|s/.test(i)?n.outerHeight():n.outerWidth();var o=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join("");t.css(o,s),this._proportionallyResize()}e(this.handles[i]).length}},this._renderAxis(this.element),this._handles=e(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){if(!t.resizing){if(this.className)var e=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);t.axis=e&&e[1]?e[1]:"se"}}),i.autoHide&&(this._handles.hide(),e(this.element).addClass("ui-resizable-autohide").hover(function(){i.disabled||(e(this).removeClass("ui-resizable-autohide"),t._handles.show())},function(){i.disabled||t.resizing||(e(this).addClass("ui-resizable-autohide"),t._handles.hide())})),this._mouseInit()},destroy:function(){this._mouseDestroy();var t=function(t){e(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){t(this.element);var i=this.element;i.after(this.originalElement.css({position:i.css("position"),width:i.outerWidth(),height:i.outerHeight(),top:i.css("top"),left:i.css("left")})).remove()}return this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_mouseCapture:function(t){var i=!1;for(var n in this.handles)e(this.handles[n])[0]==t.target&&(i=!0);return!this.options.disabled&&i},_mouseStart:function(i){var n=this.options,s=this.element.position(),o=this.element;this.resizing=!0,this.documentScroll={top:e(document).scrollTop(),left:e(document).scrollLeft()},(o.is(".ui-draggable")||/absolute/.test(o.css("position")))&&o.css({position:"absolute",top:s.top,left:s.left}),this._renderProxy();var r=t(this.helper.css("left")),a=t(this.helper.css("top"));n.containment&&(r+=e(n.containment).scrollLeft()||0,a+=e(n.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:r,top:a},this.size=this._helper?{width:o.outerWidth(),height:o.outerHeight()}:{width:o.width(),height:o.height()},this.originalSize=this._helper?{width:o.outerWidth(),height:o.outerHeight()}:{width:o.width(),height:o.height()},this.originalPosition={left:r,top:a},this.sizeDiff={width:o.outerWidth()-o.width(),height:o.outerHeight()-o.height()},this.originalMousePosition={left:i.pageX,top:i.pageY},this.aspectRatio="number"==typeof n.aspectRatio?n.aspectRatio:this.originalSize.width/this.originalSize.height||1;var l=e(".ui-resizable-"+this.axis).css("cursor");return e("body").css("cursor","auto"==l?this.axis+"-resize":l),o.addClass("ui-resizable-resizing"),this._propagate("start",i),!0},_mouseDrag:function(t){var i=this.helper,n=(this.options,this.originalMousePosition),s=this.axis,o=t.pageX-n.left||0,r=t.pageY-n.top||0,a=this._change[s];if(!a)return!1;var l=a.apply(this,[t,o,r]);return e.browser.msie&&e.browser.version<7,this.sizeDiff,this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(l=this._updateRatio(l,t)),l=this._respectSize(l,t),this._propagate("resize",t),i.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(l),this._trigger("resize",t,this.ui()),!1},_mouseStop:function(t){this.resizing=!1;var i=this.options,n=this;if(this._helper){var s=this._proportionallyResizeElements,o=s.length&&/textarea/i.test(s[0].nodeName),r=o&&e.ui.hasScroll(s[0],"left")?0:n.sizeDiff.height,a=o?0:n.sizeDiff.width,l={width:n.helper.width()-a,height:n.helper.height()-r},c=parseInt(n.element.css("left"),10)+(n.position.left-n.originalPosition.left)||null,u=parseInt(n.element.css("top"),10)+(n.position.top-n.originalPosition.top)||null;i.animate||this.element.css(e.extend(l,{top:u,left:c})),n.helper.height(n.size.height),n.helper.width(n.size.width),this._helper&&!i.animate&&this._proportionallyResize()}return e("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(e){var t,n,s,o,r,a=this.options;r={minWidth:i(a.minWidth)?a.minWidth:0,maxWidth:i(a.maxWidth)?a.maxWidth:1/0,minHeight:i(a.minHeight)?a.minHeight:0,maxHeight:i(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||e)&&(t=r.minHeight*this.aspectRatio,s=r.minWidth/this.aspectRatio,n=r.maxHeight*this.aspectRatio,o=r.maxWidth/this.aspectRatio,t>r.minWidth&&(r.minWidth=t),s>r.minHeight&&(r.minHeight=s),n<r.maxWidth&&(r.maxWidth=n),o<r.maxHeight&&(r.maxHeight=o)),this._vBoundaries=r},_updateCache:function(e){this.options,this.offset=this.helper.offset(),i(e.left)&&(this.position.left=e.left),i(e.top)&&(this.position.top=e.top),i(e.height)&&(this.size.height=e.height),i(e.width)&&(this.size.width=e.width)},_updateRatio:function(e){var t=(this.options,this.position),n=this.size,s=this.axis;return i(e.height)?e.width=e.height*this.aspectRatio:i(e.width)&&(e.height=e.width/this.aspectRatio),"sw"==s&&(e.left=t.left+(n.width-e.width),e.top=null),"nw"==s&&(e.top=t.top+(n.height-e.height),e.left=t.left+(n.width-e.width)),e},_respectSize:function(e,t){var n=(this.helper,this._vBoundaries),s=(this._aspectRatio||t.shiftKey,this.axis),o=i(e.width)&&n.maxWidth&&n.maxWidth<e.width,r=i(e.height)&&n.maxHeight&&n.maxHeight<e.height,a=i(e.width)&&n.minWidth&&n.minWidth>e.width,l=i(e.height)&&n.minHeight&&n.minHeight>e.height;a&&(e.width=n.minWidth),l&&(e.height=n.minHeight),o&&(e.width=n.maxWidth),r&&(e.height=n.maxHeight);var c=this.originalPosition.left+this.originalSize.width,u=this.position.top+this.size.height,h=/sw|nw|w/.test(s),d=/nw|ne|n/.test(s);a&&h&&(e.left=c-n.minWidth),o&&h&&(e.left=c-n.maxWidth),l&&d&&(e.top=u-n.minHeight),r&&d&&(e.top=u-n.maxHeight);var p=!e.width&&!e.height;return p&&!e.left&&e.top?e.top=null:p&&!e.top&&e.left&&(e.left=null),e},_proportionallyResize:function(){if(this.options,this._proportionallyResizeElements.length)for(var t=this.helper||this.element,i=0;i<this._proportionallyResizeElements.length;i++){var n=this._proportionallyResizeElements[i];if(!this.borderDif){var s=[n.css("borderTopWidth"),n.css("borderRightWidth"),n.css("borderBottomWidth"),n.css("borderLeftWidth")],o=[n.css("paddingTop"),n.css("paddingRight"),n.css("paddingBottom"),n.css("paddingLeft")];this.borderDif=e.map(s,function(e,t){var i=parseInt(e,10)||0,n=parseInt(o[t],10)||0;return i+n})}e.browser.msie&&(e(t).is(":hidden")||e(t).parents(":hidden").length)||n.css({height:t.height()-this.borderDif[0]-this.borderDif[2]||0,width:t.width()-this.borderDif[1]-this.borderDif[3]||0})}},_renderProxy:function(){var t=this.element,i=this.options;if(this.elementOffset=t.offset(),this._helper){this.helper=this.helper||e('<div style="overflow:hidden;"></div>');var n=e.browser.msie&&e.browser.version<7,s=n?1:0,o=n?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+o,height:this.element.outerHeight()+o,position:"absolute",left:this.elementOffset.left-s+"px",top:this.elementOffset.top-s+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(e,t){return{width:this.originalSize.width+t}},w:function(e,t){var i=(this.options,this.originalSize),n=this.originalPosition;return{left:n.left+t,width:i.width-t}},n:function(e,t,i){var n=(this.options,this.originalSize),s=this.originalPosition;return{top:s.top+i,height:n.height-i}},s:function(e,t,i){return{height:this.originalSize.height+i}},se:function(t,i,n){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,i,n]))},sw:function(t,i,n){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,i,n]))},ne:function(t,i,n){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,i,n]))},nw:function(t,i,n){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,i,n]))}},_propagate:function(t,i){e.ui.plugin.call(this,t,[i,this.ui()]),"resize"!=t&&this._trigger(t,i,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}}}),e.extend(e.ui.resizable,{version:"1.8.18"}),e.ui.plugin.add("resizable","alsoResize",{start:function(){var t=e(this).data("resizable"),i=t.options,n=function(t){e(t).each(function(){var t=e(this);t.data("resizable-alsoresize",{width:parseInt(t.width(),10),height:parseInt(t.height(),10),left:parseInt(t.css("left"),10),top:parseInt(t.css("top"),10)})})};"object"!=typeof i.alsoResize||i.alsoResize.parentNode?n(i.alsoResize):i.alsoResize.length?(i.alsoResize=i.alsoResize[0],n(i.alsoResize)):e.each(i.alsoResize,function(e){n(e)})},resize:function(t,i){var n=e(this).data("resizable"),s=n.options,o=n.originalSize,r=n.originalPosition,a={height:n.size.height-o.height||0,width:n.size.width-o.width||0,top:n.position.top-r.top||0,left:n.position.left-r.left||0},l=function(t,n){e(t).each(function(){var t=e(this),s=e(this).data("resizable-alsoresize"),o={},r=n&&n.length?n:t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(r,function(e,t){var i=(s[t]||0)+(a[t]||0);i&&i>=0&&(o[t]=i||null)}),t.css(o)})};"object"!=typeof s.alsoResize||s.alsoResize.nodeType?l(s.alsoResize):e.each(s.alsoResize,function(e,t){l(e,t)})},stop:function(){e(this).removeData("resizable-alsoresize")}}),e.ui.plugin.add("resizable","animate",{stop:function(t){var i=e(this).data("resizable"),n=i.options,s=i._proportionallyResizeElements,o=s.length&&/textarea/i.test(s[0].nodeName),r=o&&e.ui.hasScroll(s[0],"left")?0:i.sizeDiff.height,a=o?0:i.sizeDiff.width,l={width:i.size.width-a,height:i.size.height-r},c=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,u=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(e.extend(l,u&&c?{top:u,left:c}:{}),{duration:n.animateDuration,easing:n.animateEasing,step:function(){var n={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};s&&s.length&&e(s[0]).css({width:n.width,height:n.height}),i._updateCache(n),i._propagate("resize",t)}})}}),e.ui.plugin.add("resizable","containment",{start:function(){var i=e(this).data("resizable"),n=i.options,s=i.element,o=n.containment,r=o instanceof e?o.get(0):/parent/.test(o)?s.parent().get(0):o;if(r)if(i.containerElement=e(r),/document/.test(o)||o==document)i.containerOffset={left:0,top:0},i.containerPosition={left:0,top:0},i.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight};else{var a=e(r),l=[];e(["Top","Right","Left","Bottom"]).each(function(e,i){l[e]=t(a.css("padding"+i))}),i.containerOffset=a.offset(),i.containerPosition=a.position(),i.containerSize={height:a.innerHeight()-l[3],width:a.innerWidth()-l[1]};var c=i.containerOffset,u=i.containerSize.height,h=i.containerSize.width,d=e.ui.hasScroll(r,"left")?r.scrollWidth:h,p=e.ui.hasScroll(r)?r.scrollHeight:u;i.parentData={element:r,left:c.left,top:c.top,width:d,height:p}}},resize:function(t){var i=e(this).data("resizable"),n=i.options,s=(i.containerSize,i.containerOffset),o=(i.size,i.position),r=i._aspectRatio||t.shiftKey,a={top:0,left:0},l=i.containerElement;l[0]!=document&&/static/.test(l.css("position"))&&(a=s),o.left<(i._helper?s.left:0)&&(i.size.width=i.size.width+(i._helper?i.position.left-s.left:i.position.left-a.left),r&&(i.size.height=i.size.width/n.aspectRatio),i.position.left=n.helper?s.left:0),o.top<(i._helper?s.top:0)&&(i.size.height=i.size.height+(i._helper?i.position.top-s.top:i.position.top),r&&(i.size.width=i.size.height*n.aspectRatio),i.position.top=i._helper?s.top:0),i.offset.left=i.parentData.left+i.position.left,i.offset.top=i.parentData.top+i.position.top;var c=Math.abs((i._helper?i.offset.left-a.left:i.offset.left-a.left)+i.sizeDiff.width),u=Math.abs((i._helper?i.offset.top-a.top:i.offset.top-s.top)+i.sizeDiff.height),h=i.containerElement.get(0)==i.element.parent().get(0),d=/relative|absolute/.test(i.containerElement.css("position"));h&&d&&(c-=i.parentData.left),c+i.size.width>=i.parentData.width&&(i.size.width=i.parentData.width-c,r&&(i.size.height=i.size.width/i.aspectRatio)),u+i.size.height>=i.parentData.height&&(i.size.height=i.parentData.height-u,r&&(i.size.width=i.size.height*i.aspectRatio))},stop:function(){var t=e(this).data("resizable"),i=t.options,n=(t.position,t.containerOffset),s=t.containerPosition,o=t.containerElement,r=e(t.helper),a=r.offset(),l=r.outerWidth()-t.sizeDiff.width,c=r.outerHeight()-t.sizeDiff.height;t._helper&&!i.animate&&/relative/.test(o.css("position"))&&e(this).css({left:a.left-s.left-n.left,width:l,height:c}),t._helper&&!i.animate&&/static/.test(o.css("position"))&&e(this).css({left:a.left-s.left-n.left,width:l,height:c})}}),e.ui.plugin.add("resizable","ghost",{start:function(){var t=e(this).data("resizable"),i=t.options,n=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:n.height,width:n.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),t.ghost.appendTo(t.helper)},resize:function(){var t=e(this).data("resizable");t.options,t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=e(this).data("resizable");t.options,t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),e.ui.plugin.add("resizable","grid",{resize:function(t){var i=e(this).data("resizable"),n=i.options,s=i.size,o=i.originalSize,r=i.originalPosition,a=i.axis;n._aspectRatio||t.shiftKey,n.grid="number"==typeof n.grid?[n.grid,n.grid]:n.grid;var l=Math.round((s.width-o.width)/(n.grid[0]||1))*(n.grid[0]||1),c=Math.round((s.height-o.height)/(n.grid[1]||1))*(n.grid[1]||1);/^(se|s|e)$/.test(a)?(i.size.width=o.width+l,i.size.height=o.height+c):/^(ne)$/.test(a)?(i.size.width=o.width+l,i.size.height=o.height+c,i.position.top=r.top-c):/^(sw)$/.test(a)?(i.size.width=o.width+l,i.size.height=o.height+c,i.position.left=r.left-l):(i.size.width=o.width+l,i.size.height=o.height+c,i.position.top=r.top-c,i.position.left=r.left-l)}});var t=function(e){return parseInt(e,10)||0},i=function(e){return!isNaN(parseInt(e,10))}}(jQuery),/*
 * jQuery UI Selectable 1.8.18
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Selectables
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.mouse.js
 *	jquery.ui.widget.js
 */
function(e){e.widget("ui.selectable",e.ui.mouse,{options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch"},_create:function(){var t=this;this.element.addClass("ui-selectable"),this.dragged=!1;var i;this.refresh=function(){i=e(t.options.filter,t.element[0]),i.addClass("ui-selectee"),i.each(function(){var t=e(this),i=t.offset();e.data(this,"selectable-item",{element:this,$element:t,left:i.left,top:i.top,right:i.left+t.outerWidth(),bottom:i.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=i.addClass("ui-selectee"),this._mouseInit(),this.helper=e("<div class='ui-selectable-helper'></div>")},destroy:function(){return this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable"),this._mouseDestroy(),this},_mouseStart:function(t){var i=this;if(this.opos=[t.pageX,t.pageY],!this.options.disabled){var n=this.options;this.selectees=e(n.filter,this.element[0]),this._trigger("start",t),e(n.appendTo).append(this.helper),this.helper.css({left:t.clientX,top:t.clientY,width:0,height:0}),n.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var n=e.data(this,"selectable-item");n.startselected=!0,t.metaKey||t.ctrlKey||(n.$element.removeClass("ui-selected"),n.selected=!1,n.$element.addClass("ui-unselecting"),n.unselecting=!0,i._trigger("unselecting",t,{unselecting:n.element}))}),e(t.target).parents().andSelf().each(function(){var n=e.data(this,"selectable-item");if(n){var s=!t.metaKey&&!t.ctrlKey||!n.$element.hasClass("ui-selected");return n.$element.removeClass(s?"ui-unselecting":"ui-selected").addClass(s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",t,{selecting:n.element}):i._trigger("unselecting",t,{unselecting:n.element}),!1}})}},_mouseDrag:function(t){var i=this;if(this.dragged=!0,!this.options.disabled){var n=this.options,s=this.opos[0],o=this.opos[1],r=t.pageX,a=t.pageY;if(s>r){var l=r;r=s,s=l}if(o>a){var l=a;a=o,o=l}return this.helper.css({left:s,top:o,width:r-s,height:a-o}),this.selectees.each(function(){var l=e.data(this,"selectable-item");if(l&&l.element!=i.element[0]){var c=!1;"touch"==n.tolerance?c=!(l.left>r||l.right<s||l.top>a||l.bottom<o):"fit"==n.tolerance&&(c=l.left>s&&l.right<r&&l.top>o&&l.bottom<a),c?(l.selected&&(l.$element.removeClass("ui-selected"),l.selected=!1),l.unselecting&&(l.$element.removeClass("ui-unselecting"),l.unselecting=!1),l.selecting||(l.$element.addClass("ui-selecting"),l.selecting=!0,i._trigger("selecting",t,{selecting:l.element}))):(l.selecting&&((t.metaKey||t.ctrlKey)&&l.startselected?(l.$element.removeClass("ui-selecting"),l.selecting=!1,l.$element.addClass("ui-selected"),l.selected=!0):(l.$element.removeClass("ui-selecting"),l.selecting=!1,l.startselected&&(l.$element.addClass("ui-unselecting"),l.unselecting=!0),i._trigger("unselecting",t,{unselecting:l.element}))),l.selected&&(t.metaKey||t.ctrlKey||l.startselected||(l.$element.removeClass("ui-selected"),l.selected=!1,l.$element.addClass("ui-unselecting"),l.unselecting=!0,i._trigger("unselecting",t,{unselecting:l.element}))))}}),!1}},_mouseStop:function(t){var i=this;return this.dragged=!1,this.options,e(".ui-unselecting",this.element[0]).each(function(){var n=e.data(this,"selectable-item");n.$element.removeClass("ui-unselecting"),n.unselecting=!1,n.startselected=!1,i._trigger("unselected",t,{unselected:n.element})}),e(".ui-selecting",this.element[0]).each(function(){var n=e.data(this,"selectable-item");n.$element.removeClass("ui-selecting").addClass("ui-selected"),n.selecting=!1,n.selected=!0,n.startselected=!0,i._trigger("selected",t,{selected:n.element})}),this._trigger("stop",t),this.helper.remove(),!1}}),e.extend(e.ui.selectable,{version:"1.8.18"})}(jQuery),/*
 * jQuery UI Sortable 1.8.18
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Sortables
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.mouse.js
 *	jquery.ui.widget.js
 */
function(e){e.widget("ui.sortable",e.ui.mouse,{widgetEventPrefix:"sort",ready:!1,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(){var e=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===e.axis||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},destroy:function(){e.Widget.prototype.destroy.call(this),this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_setOption:function(t,i){"disabled"===t?(this.options[t]=i,this.widget()[i?"addClass":"removeClass"]("ui-sortable-disabled")):e.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(t,i){var n=this;if(this.reverting)return!1;if(this.options.disabled||"static"==this.options.type)return!1;this._refreshItems(t);var s=null,o=this;if(e(t.target).parents().each(function(){return e.data(this,n.widgetName+"-item")==o?(s=e(this),!1):void 0}),e.data(t.target,n.widgetName+"-item")==o&&(s=e(t.target)),!s)return!1;if(this.options.handle&&!i){var r=!1;if(e(this.options.handle,s).find("*").andSelf().each(function(){this==t.target&&(r=!0)}),!r)return!1}return this.currentItem=s,this._removeCurrentsFromItems(),!0},_mouseStart:function(t,i,n){var s=this.options,o=this;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(t),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"),e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,s.cursorAt&&this._adjustOffsetFromHelper(s.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!=this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),s.containment&&this._setContainment(),s.cursor&&(e("body").css("cursor")&&(this._storedCursor=e("body").css("cursor")),e("body").css("cursor",s.cursor)),s.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",s.opacity)),s.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",s.zIndex)),this.scrollParent[0]!=document&&"HTML"!=this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!n)for(var r=this.containers.length-1;r>=0;r--)this.containers[r]._trigger("activate",t,o._uiHash(this));return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!s.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){if(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll){var i=this.options,n=!1;this.scrollParent[0]!=document&&"HTML"!=this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<i.scrollSensitivity?this.scrollParent[0].scrollTop=n=this.scrollParent[0].scrollTop+i.scrollSpeed:t.pageY-this.overflowOffset.top<i.scrollSensitivity&&(this.scrollParent[0].scrollTop=n=this.scrollParent[0].scrollTop-i.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<i.scrollSensitivity?this.scrollParent[0].scrollLeft=n=this.scrollParent[0].scrollLeft+i.scrollSpeed:t.pageX-this.overflowOffset.left<i.scrollSensitivity&&(this.scrollParent[0].scrollLeft=n=this.scrollParent[0].scrollLeft-i.scrollSpeed)):(t.pageY-e(document).scrollTop()<i.scrollSensitivity?n=e(document).scrollTop(e(document).scrollTop()-i.scrollSpeed):e(window).height()-(t.pageY-e(document).scrollTop())<i.scrollSensitivity&&(n=e(document).scrollTop(e(document).scrollTop()+i.scrollSpeed)),t.pageX-e(document).scrollLeft()<i.scrollSensitivity?n=e(document).scrollLeft(e(document).scrollLeft()-i.scrollSpeed):e(window).width()-(t.pageX-e(document).scrollLeft())<i.scrollSensitivity&&(n=e(document).scrollLeft(e(document).scrollLeft()+i.scrollSpeed))),n!==!1&&e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t)}this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"==this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"==this.options.axis||(this.helper[0].style.top=this.position.top+"px");for(var s=this.items.length-1;s>=0;s--){var o=this.items[s],r=o.item[0],a=this._intersectsWithPointer(o);if(a&&r!=this.currentItem[0]&&this.placeholder[1==a?"next":"prev"]()[0]!=r&&!e.ui.contains(this.placeholder[0],r)&&("semi-dynamic"==this.options.type?!e.ui.contains(this.element[0],r):!0)){if(this.direction=1==a?"down":"up","pointer"!=this.options.tolerance&&!this._intersectsWithSides(o))break;this._rearrange(t,o),this._trigger("change",t,this._uiHash());break}}return this._contactContainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,i){if(t){if(e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t),this.options.revert){var n=this,s=n.placeholder.offset();n.reverting=!0,e(this.helper).animate({left:s.left-this.offset.parent.left-n.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:s.top-this.offset.parent.top-n.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){n._clear(t)})}else this._clear(t,i);return!1}},cancel:function(){var t=this;if(this.dragging){this._mouseUp({target:null}),"original"==this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var i=this.containers.length-1;i>=0;i--)this.containers[i]._trigger("deactivate",null,t._uiHash(this)),this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",null,t._uiHash(this)),this.containers[i].containerCache.over=0)}return this.placeholder&&(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(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var i=this._getItemsAsjQuery(t&&t.connected),n=[];return t=t||{},e(i).each(function(){var i=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[-=_](.+)/);i&&n.push((t.key||i[1]+"[]")+"="+(t.key&&t.expression?i[1]:i[2]))}),!n.length&&t.key&&n.push(t.key+"="),n.join("&")},toArray:function(t){var i=this._getItemsAsjQuery(t&&t.connected),n=[];return t=t||{},i.each(function(){n.push(e(t.item||this).attr(t.attribute||"id")||"")}),n},_intersectsWith:function(e){var t=this.positionAbs.left,i=t+this.helperProportions.width,n=this.positionAbs.top,s=n+this.helperProportions.height,o=e.left,r=o+e.width,a=e.top,l=a+e.height,c=this.offset.click.top,u=this.offset.click.left,h=n+c>a&&l>n+c&&t+u>o&&r>t+u;return"pointer"==this.options.tolerance||this.options.forcePointerForContainers||"pointer"!=this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]?h:o<t+this.helperProportions.width/2&&i-this.helperProportions.width/2<r&&a<n+this.helperProportions.height/2&&s-this.helperProportions.height/2<l},_intersectsWithPointer:function(t){var i=e.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),n=e.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width),s=i&&n,o=this._getDragVerticalDirection(),r=this._getDragHorizontalDirection();return s?this.floating?r&&"right"==r||"down"==o?2:1:o&&("down"==o?2:1):!1},_intersectsWithSides:function(t){var i=e.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),n=e.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),s=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return this.floating&&o?"right"==o&&n||"left"==o&&!n:s&&("down"==s&&i||"up"==s&&!i)},_getDragVerticalDirection:function(){var e=this.positionAbs.top-this.lastPositionAbs.top;return 0!=e&&(e>0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return 0!=e&&(e>0?"right":"left")},refresh:function(e){return this._refreshItems(e),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor==String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){var i=[],n=[],s=this._connectWith();if(s&&t)for(var o=s.length-1;o>=0;o--)for(var r=e(s[o]),a=r.length-1;a>=0;a--){var l=e.data(r[a],this.widgetName);l&&l!=this&&!l.options.disabled&&n.push([e.isFunction(l.options.items)?l.options.items.call(l.element):e(l.options.items,l.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),l])}n.push([e.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(var o=n.length-1;o>=0;o--)n[o][0].each(function(){i.push(this)});return e(i)},_removeCurrentsFromItems:function(){for(var e=this.currentItem.find(":data("+this.widgetName+"-item)"),t=0;t<this.items.length;t++)for(var i=0;i<e.length;i++)e[i]==this.items[t].item[0]&&this.items.splice(t,1)},_refreshItems:function(t){this.items=[],this.containers=[this];var i=this.items,n=[[e.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):e(this.options.items,this.element),this]],s=this._connectWith();if(s&&this.ready)for(var o=s.length-1;o>=0;o--)for(var r=e(s[o]),a=r.length-1;a>=0;a--){var l=e.data(r[a],this.widgetName);l&&l!=this&&!l.options.disabled&&(n.push([e.isFunction(l.options.items)?l.options.items.call(l.element[0],t,{item:this.currentItem}):e(l.options.items,l.element),l]),this.containers.push(l))}for(var o=n.length-1;o>=0;o--)for(var c=n[o][1],u=n[o][0],a=0,h=u.length;h>a;a++){var d=e(u[a]);d.data(this.widgetName+"-item",c),i.push({item:d,instance:c,width:0,height:0,left:0,top:0})}},refreshPositions:function(t){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());for(var i=this.items.length-1;i>=0;i--){var n=this.items[i];if(n.instance==this.currentContainer||!this.currentContainer||n.item[0]==this.currentItem[0]){var s=this.options.toleranceElement?e(this.options.toleranceElement,n.item):n.item;t||(n.width=s.outerWidth(),n.height=s.outerHeight());var o=s.offset();n.left=o.left,n.top=o.top}}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(var i=this.containers.length-1;i>=0;i--){var o=this.containers[i].element.offset();this.containers[i].containerCache.left=o.left,this.containers[i].containerCache.top=o.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight()}return this},_createPlaceholder:function(t){var i=t||this,n=i.options;if(!n.placeholder||n.placeholder.constructor==String){var s=n.placeholder;n.placeholder={element:function(){var t=e(document.createElement(i.currentItem[0].nodeName)).addClass(s||i.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];return s||(t.style.visibility="hidden"),t},update:function(e,t){(!s||n.forcePlaceholderSize)&&(t.height()||t.height(i.currentItem.innerHeight()-parseInt(i.currentItem.css("paddingTop")||0,10)-parseInt(i.currentItem.css("paddingBottom")||0,10)),t.width()||t.width(i.currentItem.innerWidth()-parseInt(i.currentItem.css("paddingLeft")||0,10)-parseInt(i.currentItem.css("paddingRight")||0,10)))}}}i.placeholder=e(n.placeholder.element.call(i.element,i.currentItem)),i.currentItem.after(i.placeholder),n.placeholder.update(i,i.placeholder)},_contactContainers:function(t){for(var i=null,n=null,s=this.containers.length-1;s>=0;s--)if(!e.ui.contains(this.currentItem[0],this.containers[s].element[0]))if(this._intersectsWith(this.containers[s].containerCache)){if(i&&e.ui.contains(this.containers[s].element[0],i.element[0]))continue;i=this.containers[s],n=s}else this.containers[s].containerCache.over&&(this.containers[s]._trigger("out",t,this._uiHash(this)),this.containers[s].containerCache.over=0);if(i)if(1===this.containers.length)this.containers[n]._trigger("over",t,this._uiHash(this)),this.containers[n].containerCache.over=1;else if(this.currentContainer!=this.containers[n]){for(var o=1e4,r=null,a=this.positionAbs[this.containers[n].floating?"left":"top"],l=this.items.length-1;l>=0;l--)if(e.ui.contains(this.containers[n].element[0],this.items[l].item[0])){var c=this.items[l][this.containers[n].floating?"left":"top"];Math.abs(c-a)<o&&(o=Math.abs(c-a),r=this.items[l])}if(!r&&!this.options.dropOnEmpty)return;this.currentContainer=this.containers[n],r?this._rearrange(t,r,null,!0):this._rearrange(t,null,this.containers[n].element,!0),this._trigger("change",t,this._uiHash()),this.containers[n]._trigger("change",t,this._uiHash(this)),this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[n]._trigger("over",t,this._uiHash(this)),this.containers[n].containerCache.over=1}},_createHelper:function(t){var i=this.options,n=e.isFunction(i.helper)?e(i.helper.apply(this.element[0],[t,this.currentItem])):"clone"==i.helper?this.currentItem.clone():this.currentItem;return n.parents("body").length||e("parent"!=i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(n[0]),n[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")}),(""==n[0].style.width||i.forceHelperSize)&&n.width(this.currentItem.width()),(""==n[0].style.height||i.forceHelperSize)&&n.height(this.currentItem.height()),n},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"==this.cssPosition&&this.scrollParent[0]!=document&&e.ui.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&"html"==this.offsetParent[0].tagName.toLowerCase()&&e.browser.msie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"==this.cssPosition){var e=this.currentItem.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.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 t=this.options;if("parent"==t.containment&&(t.containment=this.helper[0].parentNode),("document"==t.containment||"window"==t.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,e("document"==t.containment?document:window).width()-this.helperProportions.width-this.margins.left,(e("document"==t.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),!/^(document|window|parent)$/.test(t.containment)){var i=e(t.containment)[0],n=e(t.containment).offset(),s="hidden"!=e(i).css("overflow");this.containment=[n.left+(parseInt(e(i).css("borderLeftWidth"),10)||0)+(parseInt(e(i).css("paddingLeft"),10)||0)-this.margins.left,n.top+(parseInt(e(i).css("borderTopWidth"),10)||0)+(parseInt(e(i).css("paddingTop"),10)||0)-this.margins.top,n.left+(s?Math.max(i.scrollWidth,i.offsetWidth):i.offsetWidth)-(parseInt(e(i).css("borderLeftWidth"),10)||0)-(parseInt(e(i).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,n.top+(s?Math.max(i.scrollHeight,i.offsetHeight):i.offsetHeight)-(parseInt(e(i).css("borderTopWidth"),10)||0)-(parseInt(e(i).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(t,i){i||(i=this.position);var n="absolute"==t?1:-1,s=(this.options,"absolute"!=this.cssPosition||this.scrollParent[0]!=document&&e.ui.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent),o=/(html|body)/i.test(s[0].tagName);return{top:i.top+this.offset.relative.top*n+this.offset.parent.top*n-(e.browser.safari&&"fixed"==this.cssPosition?0:("fixed"==this.cssPosition?-this.scrollParent.scrollTop():o?0:s.scrollTop())*n),left:i.left+this.offset.relative.left*n+this.offset.parent.left*n-(e.browser.safari&&"fixed"==this.cssPosition?0:("fixed"==this.cssPosition?-this.scrollParent.scrollLeft():o?0:s.scrollLeft())*n)}},_generatePosition:function(t){var i=this.options,n="absolute"!=this.cssPosition||this.scrollParent[0]!=document&&e.ui.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,s=/(html|body)/i.test(n[0].tagName);"relative"!=this.cssPosition||this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset());var o=t.pageX,r=t.pageY;if(this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(r=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(r=this.containment[3]+this.offset.click.top)),i.grid)){var a=this.originalPageY+Math.round((r-this.originalPageY)/i.grid[1])*i.grid[1];r=this.containment?a-this.offset.click.top<this.containment[1]||a-this.offset.click.top>this.containment[3]?a-this.offset.click.top<this.containment[1]?a+i.grid[1]:a-i.grid[1]:a:a;var l=this.originalPageX+Math.round((o-this.originalPageX)/i.grid[0])*i.grid[0];o=this.containment?l-this.offset.click.left<this.containment[0]||l-this.offset.click.left>this.containment[2]?l-this.offset.click.left<this.containment[0]?l+i.grid[0]:l-i.grid[0]:l:l}return{top:r-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(e.browser.safari&&"fixed"==this.cssPosition?0:"fixed"==this.cssPosition?-this.scrollParent.scrollTop():s?0:n.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(e.browser.safari&&"fixed"==this.cssPosition?0:"fixed"==this.cssPosition?-this.scrollParent.scrollLeft():s?0:n.scrollLeft())}},_rearrange:function(e,t,i,n){i?i[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"==this.direction?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var s=this,o=this.counter;window.setTimeout(function(){o==s.counter&&s.refreshPositions(!n)},0)},_clear:function(t,i){this.reverting=!1;var n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]==this.currentItem[0]){for(var s in this._storedCSS)("auto"==this._storedCSS[s]||"static"==this._storedCSS[s])&&(this._storedCSS[s]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();if(this.fromOutside&&!i&&n.push(function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev==this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent==this.currentItem.parent()[0]||i||n.push(function(e){this._trigger("update",e,this._uiHash())}),!e.ui.contains(this.element[0],this.currentItem[0])){i||n.push(function(e){this._trigger("remove",e,this._uiHash())});for(var s=this.containers.length-1;s>=0;s--)e.ui.contains(this.containers[s].element[0],this.currentItem[0])&&!i&&(n.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.containers[s])),n.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.containers[s])))}for(var s=this.containers.length-1;s>=0;s--)i||n.push(function(e){return function(t){e._trigger("deactivate",t,this._uiHash(this))}}.call(this,this.containers[s])),this.containers[s].containerCache.over&&(n.push(function(e){return function(t){e._trigger("out",t,this._uiHash(this))}}.call(this,this.containers[s])),this.containers[s].containerCache.over=0);if(this._storedCursor&&e("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,this.cancelHelperRemoval){if(!i){this._trigger("beforeStop",t,this._uiHash());for(var s=0;s<n.length;s++)n[s].call(this,t);this._trigger("stop",t,this._uiHash())}return!1}if(i||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!=this.currentItem[0]&&this.helper.remove(),this.helper=null,!i){for(var s=0;s<n.length;s++)n[s].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){e.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(t){var i=t||this;return{helper:i.helper,placeholder:i.placeholder||e([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:t?t.element:null}}}),e.extend(e.ui.sortable,{version:"1.8.18"})}(jQuery),jQuery.effects||function(e,t){function i(t){var i;return t&&t.constructor==Array&&3==t.length?t:(i=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(t))?[parseInt(i[1],10),parseInt(i[2],10),parseInt(i[3],10)]:(i=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(t))?[2.55*parseFloat(i[1]),2.55*parseFloat(i[2]),2.55*parseFloat(i[3])]:(i=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(t))?[parseInt(i[1],16),parseInt(i[2],16),parseInt(i[3],16)]:(i=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(t))?[parseInt(i[1]+i[1],16),parseInt(i[2]+i[2],16),parseInt(i[3]+i[3],16)]:(i=/rgba\(0, 0, 0, 0\)/.exec(t))?c.transparent:c[e.trim(t).toLowerCase()]}function n(t,n){var s;do{if(s=e.curCSS(t,n),""!=s&&"transparent"!=s||e.nodeName(t,"body"))break;n="backgroundColor"}while(t=t.parentNode);return i(s)}function s(){var e,t,i=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,n={};if(i&&i.length&&i[0]&&i[i[0]])for(var s=i.length;s--;)e=i[s],"string"==typeof i[e]&&(t=e.replace(/\-(\w)/g,function(e,t){return t.toUpperCase()}),n[t]=i[e]);else for(e in i)"string"==typeof i[e]&&(n[e]=i[e]);return n}function o(t){var i,n;for(i in t)n=t[i],(null==n||e.isFunction(n)||i in h||/scrollbar/.test(i)||!/color/i.test(i)&&isNaN(parseFloat(n)))&&delete t[i];return t}function r(e,t){var i,n={_:0};for(i in t)e[i]!=t[i]&&(n[i]=t[i]);return n}function a(t,i,n,s){return"object"==typeof t&&(s=i,n=null,i=t,t=i.effect),e.isFunction(i)&&(s=i,n=null,i={}),("number"==typeof i||e.fx.speeds[i])&&(s=n,n=i,i={}),e.isFunction(n)&&(s=n,n=null),i=i||{},n=n||i.duration,n=e.fx.off?0:"number"==typeof n?n:n in e.fx.speeds?e.fx.speeds[n]:e.fx.speeds._default,s=s||i.complete,[t,i,n,s]}function l(t){return!t||"number"==typeof t||e.fx.speeds[t]?!0:"string"!=typeof t||e.effects[t]?!1:!0}e.effects={},e.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","borderColor","color","outlineColor"],function(t,s){e.fx.step[s]=function(e){e.colorInit||(e.start=n(e.elem,s),e.end=i(e.end),e.colorInit=!0),e.elem.style[s]="rgb("+Math.max(Math.min(parseInt(e.pos*(e.end[0]-e.start[0])+e.start[0],10),255),0)+","+Math.max(Math.min(parseInt(e.pos*(e.end[1]-e.start[1])+e.start[1],10),255),0)+","+Math.max(Math.min(parseInt(e.pos*(e.end[2]-e.start[2])+e.start[2],10),255),0)+")"}});var c={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]},u=["add","remove","toggle"],h={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};e.effects.animateClass=function(t,i,n,a){return e.isFunction(n)&&(a=n,n=null),this.queue(function(){var l,c=e(this),h=c.attr("style")||" ",d=o(s.call(this)),p=c.attr("class");e.each(u,function(e,i){t[i]&&c[i+"Class"](t[i])}),l=o(s.call(this)),c.attr("class",p),c.animate(r(d,l),{queue:!1,duration:i,easing:n,complete:function(){e.each(u,function(e,i){t[i]&&c[i+"Class"](t[i])}),"object"==typeof c.attr("style")?(c.attr("style").cssText="",c.attr("style").cssText=h):c.attr("style",h),a&&a.apply(this,arguments),e.dequeue(this)}})})},e.fn.extend({_addClass:e.fn.addClass,addClass:function(t,i,n,s){return i?e.effects.animateClass.apply(this,[{add:t},i,n,s]):this._addClass(t)},_removeClass:e.fn.removeClass,removeClass:function(t,i,n,s){return i?e.effects.animateClass.apply(this,[{remove:t},i,n,s]):this._removeClass(t)},_toggleClass:e.fn.toggleClass,toggleClass:function(i,n,s,o,r){return"boolean"==typeof n||n===t?s?e.effects.animateClass.apply(this,[n?{add:i}:{remove:i},s,o,r]):this._toggleClass(i,n):e.effects.animateClass.apply(this,[{toggle:i},n,s,o])},switchClass:function(t,i,n,s,o){return e.effects.animateClass.apply(this,[{add:i,remove:t},n,s,o])}}),e.extend(e.effects,{version:"1.8.18",save:function(e,t){for(var i=0;i<t.length;i++)null!==t[i]&&e.data("ec.storage."+t[i],e[0].style[t[i]])},restore:function(e,t){for(var i=0;i<t.length;i++)null!==t[i]&&e.css(t[i],e.data("ec.storage."+t[i]))},setMode:function(e,t){return"toggle"==t&&(t=e.is(":hidden")?"show":"hide"),t},getBaseline:function(e,t){var i,n;switch(e[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=e[0]/t.height}switch(e[1]){case"left":n=0;break;case"center":n=.5;break;case"right":n=1;break;default:n=e[1]/t.width}return{x:n,y:i}},createWrapper:function(t){if(t.parent().is(".ui-effects-wrapper"))return t.parent();var i={width:t.outerWidth(!0),height:t.outerHeight(!0),"float":t.css("float")},n=e("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),s=document.activeElement;return t.wrap(n),(t[0]===s||e.contains(t[0],s))&&e(s).focus(),n=t.parent(),"static"==t.css("position")?(n.css({position:"relative"}),t.css({position:"relative"})):(e.extend(i,{position:t.css("position"),zIndex:t.css("z-index")}),e.each(["top","left","bottom","right"],function(e,n){i[n]=t.css(n),isNaN(parseInt(i[n],10))&&(i[n]="auto")}),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),n.css(i).show()},removeWrapper:function(t){var i,n=document.activeElement;return t.parent().is(".ui-effects-wrapper")?(i=t.parent().replaceWith(t),(t[0]===n||e.contains(t[0],n))&&e(n).focus(),i):t},setTransition:function(t,i,n,s){return s=s||{},e.each(i,function(e,i){unit=t.cssUnit(i),unit[0]>0&&(s[i]=unit[0]*n+unit[1])}),s}}),e.fn.extend({effect:function(t){var i=a.apply(this,arguments),n={options:i[1],duration:i[2],callback:i[3]},s=n.options.mode,o=e.effects[t];return e.fx.off||!o?s?this[s](n.duration,n.callback):this.each(function(){n.callback&&n.callback.call(this)}):o.call(this,n)},_show:e.fn.show,show:function(e){if(l(e))return this._show.apply(this,arguments);var t=a.apply(this,arguments);return t[1].mode="show",this.effect.apply(this,t)},_hide:e.fn.hide,hide:function(e){if(l(e))return this._hide.apply(this,arguments);var t=a.apply(this,arguments);return t[1].mode="hide",this.effect.apply(this,t)},__toggle:e.fn.toggle,toggle:function(t){if(l(t)||"boolean"==typeof t||e.isFunction(t))return this.__toggle.apply(this,arguments);var i=a.apply(this,arguments);return i[1].mode="toggle",this.effect.apply(this,i)},cssUnit:function(t){var i=this.css(t),n=[];return e.each(["em","px","%","pt"],function(e,t){i.indexOf(t)>0&&(n=[parseFloat(i),t])}),n}}),/*
 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
 *
 * Uses the built in easing capabilities added In jQuery 1.1
 * to offer multiple easing options
 *
 * TERMS OF USE - jQuery Easing
 *
 * Open source under the BSD License.
 *
 * Copyright 2008 George McGinley Smith
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without modification,
 * are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice, this list of
 * conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list
 * of conditions and the following disclaimer in the documentation and/or other materials
 * provided with the distribution.
 *
 * Neither the name of the author nor the names of contributors may be used to endorse
 * or promote products derived from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
 * OF THE POSSIBILITY OF SUCH DAMAGE.
 *
*/
e.easing.jswing=e.easing.swing,e.extend(e.easing,{def:"easeOutQuad",swing:function(t,i,n,s,o){return e.easing[e.easing.def](t,i,n,s,o)},easeInQuad:function(e,t,i,n,s){return n*(t/=s)*t+i},easeOutQuad:function(e,t,i,n,s){return-n*(t/=s)*(t-2)+i},easeInOutQuad:function(e,t,i,n,s){return(t/=s/2)<1?n/2*t*t+i:-n/2*(--t*(t-2)-1)+i},easeInCubic:function(e,t,i,n,s){return n*(t/=s)*t*t+i},easeOutCubic:function(e,t,i,n,s){return n*((t=t/s-1)*t*t+1)+i},easeInOutCubic:function(e,t,i,n,s){return(t/=s/2)<1?n/2*t*t*t+i:n/2*((t-=2)*t*t+2)+i},easeInQuart:function(e,t,i,n,s){return n*(t/=s)*t*t*t+i},easeOutQuart:function(e,t,i,n,s){return-n*((t=t/s-1)*t*t*t-1)+i},easeInOutQuart:function(e,t,i,n,s){return(t/=s/2)<1?n/2*t*t*t*t+i:-n/2*((t-=2)*t*t*t-2)+i},easeInQuint:function(e,t,i,n,s){return n*(t/=s)*t*t*t*t+i},easeOutQuint:function(e,t,i,n,s){return n*((t=t/s-1)*t*t*t*t+1)+i},easeInOutQuint:function(e,t,i,n,s){return(t/=s/2)<1?n/2*t*t*t*t*t+i:n/2*((t-=2)*t*t*t*t+2)+i},easeInSine:function(e,t,i,n,s){return-n*Math.cos(t/s*(Math.PI/2))+n+i},easeOutSine:function(e,t,i,n,s){return n*Math.sin(t/s*(Math.PI/2))+i},easeInOutSine:function(e,t,i,n,s){return-n/2*(Math.cos(Math.PI*t/s)-1)+i},easeInExpo:function(e,t,i,n,s){return 0==t?i:n*Math.pow(2,10*(t/s-1))+i},easeOutExpo:function(e,t,i,n,s){return t==s?i+n:n*(-Math.pow(2,-10*t/s)+1)+i},easeInOutExpo:function(e,t,i,n,s){return 0==t?i:t==s?i+n:(t/=s/2)<1?n/2*Math.pow(2,10*(t-1))+i:n/2*(-Math.pow(2,-10*--t)+2)+i},easeInCirc:function(e,t,i,n,s){return-n*(Math.sqrt(1-(t/=s)*t)-1)+i},easeOutCirc:function(e,t,i,n,s){return n*Math.sqrt(1-(t=t/s-1)*t)+i},easeInOutCirc:function(e,t,i,n,s){return(t/=s/2)<1?-n/2*(Math.sqrt(1-t*t)-1)+i:n/2*(Math.sqrt(1-(t-=2)*t)+1)+i},easeInElastic:function(e,t,i,n,s){var o=1.70158,r=0,a=n;if(0==t)return i;if(1==(t/=s))return i+n;if(r||(r=.3*s),a<Math.abs(n)){a=n;var o=r/4}else var o=r/(2*Math.PI)*Math.asin(n/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*s-o)*2*Math.PI/r))+i},easeOutElastic:function(e,t,i,n,s){var o=1.70158,r=0,a=n;if(0==t)return i;if(1==(t/=s))return i+n;if(r||(r=.3*s),a<Math.abs(n)){a=n;var o=r/4}else var o=r/(2*Math.PI)*Math.asin(n/a);return a*Math.pow(2,-10*t)*Math.sin((t*s-o)*2*Math.PI/r)+n+i},easeInOutElastic:function(e,t,i,n,s){var o=1.70158,r=0,a=n;if(0==t)return i;if(2==(t/=s/2))return i+n;if(r||(r=s*.3*1.5),a<Math.abs(n)){a=n;var o=r/4}else var o=r/(2*Math.PI)*Math.asin(n/a);return 1>t?-.5*a*Math.pow(2,10*(t-=1))*Math.sin((t*s-o)*2*Math.PI/r)+i:.5*a*Math.pow(2,-10*(t-=1))*Math.sin((t*s-o)*2*Math.PI/r)+n+i},easeInBack:function(e,i,n,s,o,r){return r==t&&(r=1.70158),s*(i/=o)*i*((r+1)*i-r)+n},easeOutBack:function(e,i,n,s,o,r){return r==t&&(r=1.70158),s*((i=i/o-1)*i*((r+1)*i+r)+1)+n},easeInOutBack:function(e,i,n,s,o,r){return r==t&&(r=1.70158),(i/=o/2)<1?s/2*i*i*(((r*=1.525)+1)*i-r)+n:s/2*((i-=2)*i*(((r*=1.525)+1)*i+r)+2)+n},easeInBounce:function(t,i,n,s,o){return s-e.easing.easeOutBounce(t,o-i,0,s,o)+n},easeOutBounce:function(e,t,i,n,s){return(t/=s)<1/2.75?n*7.5625*t*t+i:2/2.75>t?n*(7.5625*(t-=1.5/2.75)*t+.75)+i:2.5/2.75>t?n*(7.5625*(t-=2.25/2.75)*t+.9375)+i:n*(7.5625*(t-=2.625/2.75)*t+.984375)+i},easeInOutBounce:function(t,i,n,s,o){return o/2>i?.5*e.easing.easeInBounce(t,2*i,0,s,o)+n:.5*e.easing.easeOutBounce(t,2*i-o,0,s,o)+.5*s+n}})}(jQuery),/*
 * jQuery UI Effects Blind 1.8.18
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Blind
 *
 * Depends:
 *	jquery.effects.core.js
 */
function(e){e.effects.blind=function(t){return this.queue(function(){var i=e(this),n=["position","top","bottom","left","right"],s=e.effects.setMode(i,t.options.mode||"hide"),o=t.options.direction||"vertical";e.effects.save(i,n),i.show();var r=e.effects.createWrapper(i).css({overflow:"hidden"}),a="vertical"==o?"height":"width",l="vertical"==o?r.height():r.width();"show"==s&&r.css(a,0);var c={};c[a]="show"==s?l:0,r.animate(c,t.duration,t.options.easing,function(){"hide"==s&&i.hide(),e.effects.restore(i,n),e.effects.removeWrapper(i),t.callback&&t.callback.apply(i[0],arguments),i.dequeue()})})}}(jQuery),/*
 * jQuery UI Effects Bounce 1.8.18
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Bounce
 *
 * Depends:
 *	jquery.effects.core.js
 */
function(e){e.effects.bounce=function(t){return this.queue(function(){var i=e(this),n=["position","top","bottom","left","right"],s=e.effects.setMode(i,t.options.mode||"effect"),o=t.options.direction||"up",r=t.options.distance||20,a=t.options.times||5,l=t.duration||250;/show|hide/.test(s)&&n.push("opacity"),e.effects.save(i,n),i.show(),e.effects.createWrapper(i);var c="up"==o||"down"==o?"top":"left",u="up"==o||"left"==o?"pos":"neg",r=t.options.distance||("top"==c?i.outerHeight({margin:!0})/3:i.outerWidth({margin:!0})/3);if("show"==s&&i.css("opacity",0).css(c,"pos"==u?-r:r),"hide"==s&&(r/=2*a),"hide"!=s&&a--,"show"==s){var h={opacity:1};h[c]=("pos"==u?"+=":"-=")+r,i.animate(h,l/2,t.options.easing),r/=2,a--}for(var d=0;a>d;d++){var p={},f={};p[c]=("pos"==u?"-=":"+=")+r,f[c]=("pos"==u?"+=":"-=")+r,i.animate(p,l/2,t.options.easing).animate(f,l/2,t.options.easing),r="hide"==s?2*r:r/2}if("hide"==s){var h={opacity:0};h[c]=("pos"==u?"-=":"+=")+r,i.animate(h,l/2,t.options.easing,function(){i.hide(),e.effects.restore(i,n),e.effects.removeWrapper(i),t.callback&&t.callback.apply(this,arguments)})}else{var p={},f={};p[c]=("pos"==u?"-=":"+=")+r,f[c]=("pos"==u?"+=":"-=")+r,i.animate(p,l/2,t.options.easing).animate(f,l/2,t.options.easing,function(){e.effects.restore(i,n),e.effects.removeWrapper(i),t.callback&&t.callback.apply(this,arguments)})}i.queue("fx",function(){i.dequeue()}),i.dequeue()})}}(jQuery),/*
 * jQuery UI Effects Clip 1.8.18
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Clip
 *
 * Depends:
 *	jquery.effects.core.js
 */
function(e){e.effects.clip=function(t){return this.queue(function(){var i=e(this),n=["position","top","bottom","left","right","height","width"],s=e.effects.setMode(i,t.options.mode||"hide"),o=t.options.direction||"vertical";e.effects.save(i,n),i.show();var r=e.effects.createWrapper(i).css({overflow:"hidden"}),a="IMG"==i[0].tagName?r:i,l={size:"vertical"==o?"height":"width",position:"vertical"==o?"top":"left"},c="vertical"==o?a.height():a.width();"show"==s&&(a.css(l.size,0),a.css(l.position,c/2));var u={};u[l.size]="show"==s?c:0,u[l.position]="show"==s?0:c/2,a.animate(u,{queue:!1,duration:t.duration,easing:t.options.easing,complete:function(){"hide"==s&&i.hide(),e.effects.restore(i,n),e.effects.removeWrapper(i),t.callback&&t.callback.apply(i[0],arguments),i.dequeue()}})})}}(jQuery),/*
 * jQuery UI Effects Drop 1.8.18
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Drop
 *
 * Depends:
 *	jquery.effects.core.js
 */
function(e){e.effects.drop=function(t){return this.queue(function(){var i=e(this),n=["position","top","bottom","left","right","opacity"],s=e.effects.setMode(i,t.options.mode||"hide"),o=t.options.direction||"left";e.effects.save(i,n),i.show(),e.effects.createWrapper(i);var r="up"==o||"down"==o?"top":"left",a="up"==o||"left"==o?"pos":"neg",l=t.options.distance||("top"==r?i.outerHeight({margin:!0})/2:i.outerWidth({margin:!0})/2);"show"==s&&i.css("opacity",0).css(r,"pos"==a?-l:l);var c={opacity:"show"==s?1:0};c[r]=("show"==s?"pos"==a?"+=":"-=":"pos"==a?"-=":"+=")+l,i.animate(c,{queue:!1,duration:t.duration,easing:t.options.easing,complete:function(){"hide"==s&&i.hide(),e.effects.restore(i,n),e.effects.removeWrapper(i),t.callback&&t.callback.apply(this,arguments),i.dequeue()}})})}}(jQuery),/*
 * jQuery UI Effects Explode 1.8.18
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Explode
 *
 * Depends:
 *	jquery.effects.core.js
 */
function(e){e.effects.explode=function(t){return this.queue(function(){var i=t.options.pieces?Math.round(Math.sqrt(t.options.pieces)):3,n=t.options.pieces?Math.round(Math.sqrt(t.options.pieces)):3;t.options.mode="toggle"==t.options.mode?e(this).is(":visible")?"hide":"show":t.options.mode;var s=e(this).show().css("visibility","hidden"),o=s.offset();o.top-=parseInt(s.css("marginTop"),10)||0,o.left-=parseInt(s.css("marginLeft"),10)||0;for(var r=s.outerWidth(!0),a=s.outerHeight(!0),l=0;i>l;l++)for(var c=0;n>c;c++)s.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-c*(r/n),top:-l*(a/i)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:r/n,height:a/i,left:o.left+c*(r/n)+("show"==t.options.mode?(c-Math.floor(n/2))*(r/n):0),top:o.top+l*(a/i)+("show"==t.options.mode?(l-Math.floor(i/2))*(a/i):0),opacity:"show"==t.options.mode?0:1}).animate({left:o.left+c*(r/n)+("show"==t.options.mode?0:(c-Math.floor(n/2))*(r/n)),top:o.top+l*(a/i)+("show"==t.options.mode?0:(l-Math.floor(i/2))*(a/i)),opacity:"show"==t.options.mode?1:0},t.duration||500);setTimeout(function(){"show"==t.options.mode?s.css({visibility:"visible"}):s.css({visibility:"visible"}).hide(),t.callback&&t.callback.apply(s[0]),s.dequeue(),e("div.ui-effects-explode").remove()},t.duration||500)})}}(jQuery),/*
 * jQuery UI Effects Fade 1.8.18
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Fade
 *
 * Depends:
 *	jquery.effects.core.js
 */
function(e){e.effects.fade=function(t){return this.queue(function(){var i=e(this),n=e.effects.setMode(i,t.options.mode||"hide");i.animate({opacity:n},{queue:!1,duration:t.duration,easing:t.options.easing,complete:function(){t.callback&&t.callback.apply(this,arguments),i.dequeue()}})})}}(jQuery),/*
 * jQuery UI Effects Fold 1.8.18
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Fold
 *
 * Depends:
 *	jquery.effects.core.js
 */
function(e){e.effects.fold=function(t){return this.queue(function(){var i=e(this),n=["position","top","bottom","left","right"],s=e.effects.setMode(i,t.options.mode||"hide"),o=t.options.size||15,r=!!t.options.horizFirst,a=t.duration?t.duration/2:e.fx.speeds._default/2;e.effects.save(i,n),i.show();var l=e.effects.createWrapper(i).css({overflow:"hidden"}),c="show"==s!=r,u=c?["width","height"]:["height","width"],h=c?[l.width(),l.height()]:[l.height(),l.width()],d=/([0-9]+)%/.exec(o);d&&(o=parseInt(d[1],10)/100*h["hide"==s?0:1]),"show"==s&&l.css(r?{height:0,width:o}:{height:o,width:0});var p={},f={};p[u[0]]="show"==s?h[0]:o,f[u[1]]="show"==s?h[1]:0,l.animate(p,a,t.options.easing).animate(f,a,t.options.easing,function(){"hide"==s&&i.hide(),e.effects.restore(i,n),e.effects.removeWrapper(i),t.callback&&t.callback.apply(i[0],arguments),i.dequeue()})})}}(jQuery),/*
 * jQuery UI Effects Highlight 1.8.18
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Highlight
 *
 * Depends:
 *	jquery.effects.core.js
 */
function(e){e.effects.highlight=function(t){return this.queue(function(){var i=e(this),n=["backgroundImage","backgroundColor","opacity"],s=e.effects.setMode(i,t.options.mode||"show"),o={backgroundColor:i.css("backgroundColor")};"hide"==s&&(o.opacity=0),e.effects.save(i,n),i.show().css({backgroundImage:"none",backgroundColor:t.options.color||"#ffff99"}).animate(o,{queue:!1,duration:t.duration,easing:t.options.easing,complete:function(){"hide"==s&&i.hide(),e.effects.restore(i,n),"show"==s&&!e.support.opacity&&this.style.removeAttribute("filter"),t.callback&&t.callback.apply(this,arguments),i.dequeue()}})})}}(jQuery),/*
 * jQuery UI Effects Pulsate 1.8.18
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Pulsate
 *
 * Depends:
 *	jquery.effects.core.js
 */
function(e){e.effects.pulsate=function(t){return this.queue(function(){var i=e(this),n=e.effects.setMode(i,t.options.mode||"show");times=2*(t.options.times||5)-1,duration=t.duration?t.duration/2:e.fx.speeds._default/2,isVisible=i.is(":visible"),animateTo=0,isVisible||(i.css("opacity",0).show(),animateTo=1),("hide"==n&&isVisible||"show"==n&&!isVisible)&&times--;for(var s=0;times>s;s++)i.animate({opacity:animateTo},duration,t.options.easing),animateTo=(animateTo+1)%2;i.animate({opacity:animateTo},duration,t.options.easing,function(){0==animateTo&&i.hide(),t.callback&&t.callback.apply(this,arguments)}),i.queue("fx",function(){i.dequeue()}).dequeue()})}}(jQuery),/*
 * jQuery UI Effects Scale 1.8.18
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Scale
 *
 * Depends:
 *	jquery.effects.core.js
 */
function(e){e.effects.puff=function(t){return this.queue(function(){var i=e(this),n=e.effects.setMode(i,t.options.mode||"hide"),s=parseInt(t.options.percent,10)||150,o=s/100,r={height:i.height(),width:i.width()};e.extend(t.options,{fade:!0,mode:n,percent:"hide"==n?s:100,from:"hide"==n?r:{height:r.height*o,width:r.width*o}}),i.effect("scale",t.options,t.duration,t.callback),i.dequeue()})},e.effects.scale=function(t){return this.queue(function(){var i=e(this),n=e.extend(!0,{},t.options),s=e.effects.setMode(i,t.options.mode||"effect"),o=parseInt(t.options.percent,10)||(0==parseInt(t.options.percent,10)?0:"hide"==s?0:100),r=t.options.direction||"both",a=t.options.origin;"effect"!=s&&(n.origin=a||["middle","center"],n.restore=!0);var l={height:i.height(),width:i.width()};i.from=t.options.from||("show"==s?{height:0,width:0}:l);var c={y:"horizontal"!=r?o/100:1,x:"vertical"!=r?o/100:1};i.to={height:l.height*c.y,width:l.width*c.x},t.options.fade&&("show"==s&&(i.from.opacity=0,i.to.opacity=1),"hide"==s&&(i.from.opacity=1,i.to.opacity=0)),n.from=i.from,n.to=i.to,n.mode=s,i.effect("size",n,t.duration,t.callback),i.dequeue()})},e.effects.size=function(t){return this.queue(function(){var i=e(this),n=["position","top","bottom","left","right","width","height","overflow","opacity"],s=["position","top","bottom","left","right","overflow","opacity"],o=["width","height","overflow"],r=["fontSize"],a=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],l=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],c=e.effects.setMode(i,t.options.mode||"effect"),u=t.options.restore||!1,h=t.options.scale||"both",d=t.options.origin,p={height:i.height(),width:i.width()};if(i.from=t.options.from||p,i.to=t.options.to||p,d){var f=e.effects.getBaseline(d,p);i.from.top=(p.height-i.from.height)*f.y,i.from.left=(p.width-i.from.width)*f.x,i.to.top=(p.height-i.to.height)*f.y,i.to.left=(p.width-i.to.width)*f.x}var m={from:{y:i.from.height/p.height,x:i.from.width/p.width},to:{y:i.to.height/p.height,x:i.to.width/p.width}};("box"==h||"both"==h)&&(m.from.y!=m.to.y&&(n=n.concat(a),i.from=e.effects.setTransition(i,a,m.from.y,i.from),i.to=e.effects.setTransition(i,a,m.to.y,i.to)),m.from.x!=m.to.x&&(n=n.concat(l),i.from=e.effects.setTransition(i,l,m.from.x,i.from),i.to=e.effects.setTransition(i,l,m.to.x,i.to))),("content"==h||"both"==h)&&m.from.y!=m.to.y&&(n=n.concat(r),i.from=e.effects.setTransition(i,r,m.from.y,i.from),i.to=e.effects.setTransition(i,r,m.to.y,i.to)),e.effects.save(i,u?n:s),i.show(),e.effects.createWrapper(i),i.css("overflow","hidden").css(i.from),("content"==h||"both"==h)&&(a=a.concat(["marginTop","marginBottom"]).concat(r),l=l.concat(["marginLeft","marginRight"]),o=n.concat(a).concat(l),i.find("*[width]").each(function(){child=e(this),u&&e.effects.save(child,o);var i={height:child.height(),width:child.width()};child.from={height:i.height*m.from.y,width:i.width*m.from.x},child.to={height:i.height*m.to.y,width:i.width*m.to.x},m.from.y!=m.to.y&&(child.from=e.effects.setTransition(child,a,m.from.y,child.from),child.to=e.effects.setTransition(child,a,m.to.y,child.to)),m.from.x!=m.to.x&&(child.from=e.effects.setTransition(child,l,m.from.x,child.from),child.to=e.effects.setTransition(child,l,m.to.x,child.to)),child.css(child.from),child.animate(child.to,t.duration,t.options.easing,function(){u&&e.effects.restore(child,o)})})),i.animate(i.to,{queue:!1,duration:t.duration,easing:t.options.easing,complete:function(){0===i.to.opacity&&i.css("opacity",i.from.opacity),"hide"==c&&i.hide(),e.effects.restore(i,u?n:s),e.effects.removeWrapper(i),t.callback&&t.callback.apply(this,arguments),i.dequeue()}})})}}(jQuery),/*
 * jQuery UI Effects Shake 1.8.18
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Shake
 *
 * Depends:
 *	jquery.effects.core.js
 */
function(e){e.effects.shake=function(t){return this.queue(function(){var i=e(this),n=["position","top","bottom","left","right"];e.effects.setMode(i,t.options.mode||"effect");var s=t.options.direction||"left",o=t.options.distance||20,r=t.options.times||3,a=t.duration||t.options.duration||140;e.effects.save(i,n),i.show(),e.effects.createWrapper(i);var l="up"==s||"down"==s?"top":"left",c="up"==s||"left"==s?"pos":"neg",u={},h={},d={};u[l]=("pos"==c?"-=":"+=")+o,h[l]=("pos"==c?"+=":"-=")+2*o,d[l]=("pos"==c?"-=":"+=")+2*o,i.animate(u,a,t.options.easing);for(var p=1;r>p;p++)i.animate(h,a,t.options.easing).animate(d,a,t.options.easing);i.animate(h,a,t.options.easing).animate(u,a/2,t.options.easing,function(){e.effects.restore(i,n),e.effects.removeWrapper(i),t.callback&&t.callback.apply(this,arguments)}),i.queue("fx",function(){i.dequeue()}),i.dequeue()})}}(jQuery),/*
 * jQuery UI Effects Slide 1.8.18
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Slide
 *
 * Depends:
 *	jquery.effects.core.js
 */
function(e){e.effects.slide=function(t){return this.queue(function(){var i=e(this),n=["position","top","bottom","left","right"],s=e.effects.setMode(i,t.options.mode||"show"),o=t.options.direction||"left";e.effects.save(i,n),i.show(),e.effects.createWrapper(i).css({overflow:"hidden"});var r="up"==o||"down"==o?"top":"left",a="up"==o||"left"==o?"pos":"neg",l=t.options.distance||("top"==r?i.outerHeight({margin:!0}):i.outerWidth({margin:!0}));"show"==s&&i.css(r,"pos"==a?isNaN(l)?"-"+l:-l:l);var c={};c[r]=("show"==s?"pos"==a?"+=":"-=":"pos"==a?"-=":"+=")+l,i.animate(c,{queue:!1,duration:t.duration,easing:t.options.easing,complete:function(){"hide"==s&&i.hide(),e.effects.restore(i,n),e.effects.removeWrapper(i),t.callback&&t.callback.apply(this,arguments),i.dequeue()}})})}}(jQuery),/*
 * jQuery UI Effects Transfer 1.8.18
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Effects/Transfer
 *
 * Depends:
 *	jquery.effects.core.js
 */
function(e){e.effects.transfer=function(t){return this.queue(function(){var i=e(this),n=e(t.options.to),s=n.offset(),o={top:s.top,left:s.left,height:n.innerHeight(),width:n.innerWidth()},r=i.offset(),a=e('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(t.options.className).css({top:r.top,left:r.left,height:i.innerHeight(),width:i.innerWidth(),position:"absolute"}).animate(o,t.duration,t.options.easing,function(){a.remove(),t.callback&&t.callback.apply(i[0],arguments),i.dequeue()})})}}(jQuery),/*
 * jQuery UI Accordion 1.8.18
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Accordion
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.widget.js
 */
function(e){e.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 t=this,i=t.options;if(t.running=0,t.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix"),t.headers=t.element.find(i.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){i.disabled||e(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){i.disabled||e(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){i.disabled||e(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){i.disabled||e(this).removeClass("ui-state-focus")}),t.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom"),i.navigation){var n=t.element.find("a").filter(i.navigationFilter).eq(0);if(n.length){var s=n.closest(".ui-accordion-header");t.active=s.length?s:n.closest(".ui-accordion-content").prev()}}t.active=t._findActive(t.active||i.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top"),t.active.next().addClass("ui-accordion-content-active"),t._createIcons(),t.resize(),t.element.attr("role","tablist"),t.headers.attr("role","tab").bind("keydown.accordion",function(e){return t._keydown(e)}).next().attr("role","tabpanel"),t.headers.not(t.active||"").attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).next().hide(),t.active.length?t.active.attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}):t.headers.eq(0).attr("tabIndex",0),e.browser.safari||t.headers.find("a").attr("tabIndex",-1),i.event&&t.headers.bind(i.event.split(" ").join(".accordion ")+".accordion",function(e){t._clickHandler.call(t,e,this),e.preventDefault()})},_createIcons:function(){var t=this.options;t.icons&&(e("<span></span>").addClass("ui-icon "+t.icons.header).prependTo(this.headers),this.active.children(".ui-icon").toggleClass(t.icons.header).toggleClass(t.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 t=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("tabIndex"),this.headers.find("a").removeAttr("tabIndex"),this._destroyIcons();var i=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");return(t.autoHeight||t.fillHeight)&&i.css("height",""),e.Widget.prototype.destroy.call(this)},_setOption:function(t,i){e.Widget.prototype._setOption.apply(this,arguments),"active"==t&&this.activate(i),"icons"==t&&(this._destroyIcons(),i&&this._createIcons()),"disabled"==t&&this.headers.add(this.headers.next())[i?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")},_keydown:function(t){if(!(this.options.disabled||t.altKey||t.ctrlKey)){var i=e.ui.keyCode,n=this.headers.length,s=this.headers.index(t.target),o=!1;switch(t.keyCode){case i.RIGHT:case i.DOWN:o=this.headers[(s+1)%n];break;case i.LEFT:case i.UP:o=this.headers[(s-1+n)%n];break;case i.SPACE:case i.ENTER:this._clickHandler({target:t.target},t.target),t.preventDefault()}return o?(e(t.target).attr("tabIndex",-1),e(o).attr("tabIndex",0),o.focus(),!1):!0}},resize:function(){var t,i=this.options;if(i.fillSpace){if(e.browser.msie){var n=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}t=this.element.parent().height(),e.browser.msie&&this.element.parent().css("overflow",n),this.headers.each(function(){t-=e(this).outerHeight(!0)}),this.headers.next().each(function(){e(this).height(Math.max(0,t-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")}else i.autoHeight&&(t=0,this.headers.next().each(function(){t=Math.max(t,e(this).height("").height())}).height(t));return this},activate:function(e){this.options.active=e;var t=this._findActive(e)[0];return this._clickHandler({target:t},t),this},_findActive:function(t){return t?"number"==typeof t?this.headers.filter(":eq("+t+")"):this.headers.not(this.headers.not(t)):t===!1?e([]):this.headers.filter(":eq(0)")},_clickHandler:function(t,i){var n=this.options;if(!n.disabled){if(!t.target){if(!n.collapsible)return;this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(n.icons.headerSelected).addClass(n.icons.header),this.active.next().addClass("ui-accordion-content-active");var s=this.active.next(),o={options:n,newHeader:e([]),oldHeader:n.active,newContent:e([]),oldContent:s},r=this.active=e([]);return this._toggle(r,s,o),void 0}var a=e(t.currentTarget||i),l=a[0]===this.active[0];if(n.active=n.collapsible&&l?!1:this.headers.index(a),!(this.running||!n.collapsible&&l)){var c=this.active,r=a.next(),s=this.active.next(),o={options:n,newHeader:l&&n.collapsible?e([]):a,oldHeader:this.active,newContent:l&&n.collapsible?e([]):r,oldContent:s},u=this.headers.index(this.active[0])>this.headers.index(a[0]);this.active=l?e([]):a,this._toggle(r,s,o,l,u),c.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(n.icons.headerSelected).addClass(n.icons.header),l||(a.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(n.icons.header).addClass(n.icons.headerSelected),a.next().addClass("ui-accordion-content-active"))}}},_toggle:function(t,i,n,s,o){var r=this,a=r.options;r.toShow=t,r.toHide=i,r.data=n;var l=function(){return r?r._completed.apply(r,arguments):void 0};if(r._trigger("changestart",null,r.data),r.running=0===i.size()?t.size():i.size(),a.animated){var c={};c=a.collapsible&&s?{toShow:e([]),toHide:i,complete:l,down:o,autoHeight:a.autoHeight||a.fillSpace}:{toShow:t,toHide:i,complete:l,down:o,autoHeight:a.autoHeight||a.fillSpace},a.proxied||(a.proxied=a.animated),a.proxiedDuration||(a.proxiedDuration=a.duration),a.animated=e.isFunction(a.proxied)?a.proxied(c):a.proxied,a.duration=e.isFunction(a.proxiedDuration)?a.proxiedDuration(c):a.proxiedDuration;var u=e.ui.accordion.animations,h=a.duration,d=a.animated;!d||u[d]||e.easing[d]||(d="slide"),u[d]||(u[d]=function(e){this.slide(e,{easing:d,duration:h||700})}),u[d](c)}else a.collapsible&&s?t.toggle():(i.hide(),t.show()),l(!0);i.prev().attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).blur(),t.prev().attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}).focus()},_completed:function(e){this.running=e?0:--this.running,this.running||(this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""}),this.toHide.removeClass("ui-accordion-content-active"),this.toHide.length&&(this.toHide.parent()[0].className=this.toHide.parent()[0].className),this._trigger("change",null,this.data))}}),e.extend(e.ui.accordion,{version:"1.8.18",animations:{slide:function(t,i){if(t=e.extend({easing:"swing",duration:300},t,i),!t.toHide.size())return t.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},t),void 0;if(!t.toShow.size())return t.toHide.animate({height:"hide",paddingTop:"hide",paddingBottom:"hide"},t),void 0;var n,s=t.toShow.css("overflow"),o=0,r={},a={},l=["height","paddingTop","paddingBottom"],c=t.toShow;n=c[0].style.width,c.width(c.parent().width()-parseFloat(c.css("paddingLeft"))-parseFloat(c.css("paddingRight"))-(parseFloat(c.css("borderLeftWidth"))||0)-(parseFloat(c.css("borderRightWidth"))||0)),e.each(l,function(i,n){a[n]="hide";var s=(""+e.css(t.toShow[0],n)).match(/^([\d+-.]+)(.*)$/);r[n]={value:s[1],unit:s[2]||"px"}}),t.toShow.css({height:0,overflow:"hidden"}).show(),t.toHide.filter(":hidden").each(t.complete).end().filter(":visible").animate(a,{step:function(e,i){"height"==i.prop&&(o=0===i.end-i.start?0:(i.now-i.start)/(i.end-i.start)),t.toShow[0].style[i.prop]=o*r[i.prop].value+r[i.prop].unit},duration:t.duration,easing:t.easing,complete:function(){t.autoHeight||t.toShow.css("height",""),t.toShow.css({width:n,overflow:s}),t.complete()}})},bounceslide:function(e){this.slide(e,{easing:e.down?"easeOutBounce":"swing",duration:e.down?1e3:200})}}})}(jQuery),/*
 * jQuery UI Autocomplete 1.8.18
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Autocomplete
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.widget.js
 *	jquery.ui.position.js
 */
function(e){var t=0;e.widget("ui.autocomplete",{options:{appendTo:"body",autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var t,i=this,n=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(n){if(!i.options.disabled&&!i.element.propAttr("readOnly")){t=!1;var s=e.ui.keyCode;switch(n.keyCode){case s.PAGE_UP:i._move("previousPage",n);break;case s.PAGE_DOWN:i._move("nextPage",n);break;case s.UP:i._move("previous",n),n.preventDefault();break;case s.DOWN:i._move("next",n),n.preventDefault();break;case s.ENTER:case s.NUMPAD_ENTER:i.menu.active&&(t=!0,n.preventDefault());case s.TAB:if(!i.menu.active)return;i.menu.select(n);break;case s.ESCAPE:i.element.val(i.term),i.close(n);break;default:clearTimeout(i.searching),i.searching=setTimeout(function(){i.term!=i.element.val()&&(i.selectedItem=null,i.search(null,n))},i.options.delay)}}}).bind("keypress.autocomplete",function(e){t&&(t=!1,e.preventDefault())}).bind("focus.autocomplete",function(){i.options.disabled||(i.selectedItem=null,i.previous=i.element.val())}).bind("blur.autocomplete",function(e){i.options.disabled||(clearTimeout(i.searching),i.closing=setTimeout(function(){i.close(e),i._change(e)},150))}),this._initSource(),this.response=function(){return i._response.apply(i,arguments)},this.menu=e("<ul></ul>").addClass("ui-autocomplete").appendTo(e(this.options.appendTo||"body",n)[0]).mousedown(function(t){var n=i.menu.element[0];e(t.target).closest(".ui-menu-item").length||setTimeout(function(){e(document).one("mousedown",function(t){t.target===i.element[0]||t.target===n||e.ui.contains(n,t.target)||i.close()})},1),setTimeout(function(){clearTimeout(i.closing)},13)}).menu({focus:function(e,t){var n=t.item.data("item.autocomplete");!1!==i._trigger("focus",e,{item:n})&&/^key/.test(e.originalEvent.type)&&i.element.val(n.value)},selected:function(e,t){var s=t.item.data("item.autocomplete"),o=i.previous;i.element[0]!==n.activeElement&&(i.element.focus(),i.previous=o,setTimeout(function(){i.previous=o,i.selectedItem=s},1)),!1!==i._trigger("select",e,{item:s})&&i.element.val(s.value),i.term=i.element.val(),i.close(e),i.selectedItem=s},blur:function(){i.menu.element.is(":visible")&&i.element.val()!==i.term&&i.element.val(i.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu"),e.fn.bgiframe&&this.menu.element.bgiframe(),i.beforeunloadHandler=function(){i.element.removeAttr("autocomplete")},e(window).bind("beforeunload",i.beforeunloadHandler)},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup"),this.menu.element.remove(),e(window).unbind("beforeunload",this.beforeunloadHandler),e.Widget.prototype.destroy.call(this)},_setOption:function(t,i){e.Widget.prototype._setOption.apply(this,arguments),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(e(i||"body",this.element[0].ownerDocument)[0]),"disabled"===t&&i&&this.xhr&&this.xhr.abort()},_initSource:function(){var i,n,s=this;e.isArray(this.options.source)?(i=this.options.source,this.source=function(t,n){n(e.ui.autocomplete.filter(i,t.term))}):"string"==typeof this.options.source?(n=this.options.source,this.source=function(i,o){s.xhr&&s.xhr.abort(),s.xhr=e.ajax({url:n,data:i,dataType:"json",context:{autocompleteRequest:++t},success:function(e){this.autocompleteRequest===t&&o(e)},error:function(){this.autocompleteRequest===t&&o([])}})}):this.source=this.options.source},search:function(e,t){return e=null!=e?e:this.element.val(),this.term=this.element.val(),e.length<this.options.minLength?this.close(t):(clearTimeout(this.closing),this._trigger("search",t)!==!1?this._search(e):void 0)},_search:function(e){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.source({term:e},this.response)},_response:function(e){!this.options.disabled&&e&&e.length?(e=this._normalize(e),this._suggest(e),this._trigger("open")):this.close(),this.pending--,this.pending||this.element.removeClass("ui-autocomplete-loading")},close:function(e){clearTimeout(this.closing),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.deactivate(),this._trigger("close",e))},_change:function(e){this.previous!==this.element.val()&&this._trigger("change",e,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:e.map(t,function(t){return"string"==typeof t?{label:t,value:t}:e.extend({label:t.label||t.value,value:t.value||t.label},t)})},_suggest:function(t){var i=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(i,t),this.menu.deactivate(),this.menu.refresh(),i.show(),this._resizeMenu(),i.position(e.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(new e.Event("mouseover"))},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(t,i){var n=this;e.each(i,function(e,i){n._renderItem(t,i)})},_renderItem:function(t,i){return e("<li></li>").data("item.autocomplete",i).append(e("<a></a>").text(i.label)).appendTo(t)},_move:function(e,t){return this.menu.element.is(":visible")?this.menu.first()&&/^previous/.test(e)||this.menu.last()&&/^next/.test(e)?(this.element.val(this.term),this.menu.deactivate(),void 0):(this.menu[e](t),void 0):(this.search(null,t),void 0)},widget:function(){return this.menu.element}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},filter:function(t,i){var n=new RegExp(e.ui.autocomplete.escapeRegex(i),"i");return e.grep(t,function(e){return n.test(e.label||e.value||e)})}})}(jQuery),/*
 * jQuery UI Menu (not officially released)
 * 
 * This widget isn't yet finished and the API is subject to change. We plan to finish
 * it for the next release. You're welcome to give it a try anyway and give us feedback,
 * as long as you're okay with migrating your code later on. We can help with that, too.
 *
 * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Menu
 *
 * Depends:
 *	jquery.ui.core.js
 *  jquery.ui.widget.js
 */
function(e){e.widget("ui.menu",{_create:function(){var t=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(i){e(i.target).closest(".ui-menu-item a").length&&(i.preventDefault(),t.select(i))}),this.refresh()},refresh:function(){var t=this,i=this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem");i.children("a").addClass("ui-corner-all").attr("tabindex",-1).mouseenter(function(i){t.activate(i,e(this).parent())}).mouseleave(function(){t.deactivate()})},activate:function(e,t){if(this.deactivate(),this.hasScroll()){var i=t.offset().top-this.element.offset().top,n=this.element.scrollTop(),s=this.element.height();0>i?this.element.scrollTop(n+i):i>=s&&this.element.scrollTop(n+i-s+t.height())}this.active=t.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end(),this._trigger("focus",e,{item:t})},deactivate:function(){this.active&&(this.active.children("a").removeClass("ui-state-hover").removeAttr("id"),this._trigger("blur"),this.active=null)},next:function(e){this.move("next",".ui-menu-item:first",e)},previous:function(e){this.move("prev",".ui-menu-item:last",e)},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(e,t,i){if(!this.active)return this.activate(i,this.element.children(t)),void 0;var n=this.active[e+"All"](".ui-menu-item").eq(0);n.length?this.activate(i,n):this.activate(i,this.element.children(t))},nextPage:function(t){if(this.hasScroll()){if(!this.active||this.last())return this.activate(t,this.element.children(".ui-menu-item:first")),void 0;var i=this.active.offset().top,n=this.element.height(),s=this.element.children(".ui-menu-item").filter(function(){var t=e(this).offset().top-i-n+e(this).height();return 10>t&&t>-10});s.length||(s=this.element.children(".ui-menu-item:last")),this.activate(t,s)}else this.activate(t,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))},previousPage:function(t){if(this.hasScroll()){if(!this.active||this.first())return this.activate(t,this.element.children(".ui-menu-item:last")),void 0;var i=this.active.offset().top,n=this.element.height();result=this.element.children(".ui-menu-item").filter(function(){var t=e(this).offset().top-i+n-e(this).height();return 10>t&&t>-10}),result.length||(result=this.element.children(".ui-menu-item:first")),this.activate(t,result)}else this.activate(t,this.element.children(".ui-menu-item").filter(!this.active||this.first()?":last":":first"))},hasScroll:function(){return this.element.height()<this.element[e.fn.prop?"prop":"attr"]("scrollHeight")},select:function(e){this._trigger("selected",e,{item:this.active})}})}(jQuery),/*
 * jQuery UI Button 1.8.18
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Button
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.widget.js
 */
function(e){var t,i,n,s,o="ui-button ui-widget ui-state-default ui-corner-all",r="ui-state-hover ui-state-active ",a="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",l=function(){var t=e(this).find(":ui-button");setTimeout(function(){t.button("refresh")},1)},c=function(t){var i=t.name,n=t.form,s=e([]);return i&&(s=n?e(n).find("[name='"+i+"']"):e("[name='"+i+"']",t.ownerDocument).filter(function(){return!this.form})),s};e.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",l),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.propAttr("disabled"):this.element.propAttr("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var r=this,a=this.options,u="checkbox"===this.type||"radio"===this.type,h="ui-state-hover"+(u?"":" ui-state-active"),d="ui-state-focus";null===a.label&&(a.label=this.buttonElement.html()),this.buttonElement.addClass(o).attr("role","button").bind("mouseenter.button",function(){a.disabled||(e(this).addClass("ui-state-hover"),this===t&&e(this).addClass("ui-state-active"))}).bind("mouseleave.button",function(){a.disabled||e(this).removeClass(h)}).bind("click.button",function(e){a.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}),this.element.bind("focus.button",function(){r.buttonElement.addClass(d)}).bind("blur.button",function(){r.buttonElement.removeClass(d)}),u&&(this.element.bind("change.button",function(){s||r.refresh()}),this.buttonElement.bind("mousedown.button",function(e){a.disabled||(s=!1,i=e.pageX,n=e.pageY)}).bind("mouseup.button",function(e){a.disabled||(i!==e.pageX||n!==e.pageY)&&(s=!0)})),"checkbox"===this.type?this.buttonElement.bind("click.button",function(){return a.disabled||s?!1:(e(this).toggleClass("ui-state-active"),r.buttonElement.attr("aria-pressed",r.element[0].checked),void 0)}):"radio"===this.type?this.buttonElement.bind("click.button",function(){if(a.disabled||s)return!1;e(this).addClass("ui-state-active"),r.buttonElement.attr("aria-pressed","true");var t=r.element[0];c(t).not(t).map(function(){return e(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown.button",function(){return a.disabled?!1:(e(this).addClass("ui-state-active"),t=this,e(document).one("mouseup",function(){t=null}),void 0)}).bind("mouseup.button",function(){return a.disabled?!1:(e(this).removeClass("ui-state-active"),void 0)}).bind("keydown.button",function(t){return a.disabled?!1:((t.keyCode==e.ui.keyCode.SPACE||t.keyCode==e.ui.keyCode.ENTER)&&e(this).addClass("ui-state-active"),void 0)}).bind("keyup.button",function(){e(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(t){t.keyCode===e.ui.keyCode.SPACE&&e(this).click()})),this._setOption("disabled",a.disabled),this._resetButton()},_determineButtonType:function(){if(this.type=this.element.is(":checkbox")?"checkbox":this.element.is(":radio")?"radio":this.element.is("input")?"input":"button","checkbox"===this.type||"radio"===this.type){var e=this.element.parents().filter(":last"),t="label[for='"+this.element.attr("id")+"']";this.buttonElement=e.find(t),this.buttonElement.length||(e=e.length?e.siblings():this.element.siblings(),this.buttonElement=e.filter(t),this.buttonElement.length||(this.buttonElement=e.find(t))),this.element.addClass("ui-helper-hidden-accessible");var i=this.element.is(":checked");i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.attr("aria-pressed",i)}else this.buttonElement=this.element},widget:function(){return this.buttonElement},destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(o+" "+r+" "+a).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title"),e.Widget.prototype.destroy.call(this)},_setOption:function(t,i){return e.Widget.prototype._setOption.apply(this,arguments),"disabled"===t?(i?this.element.propAttr("disabled",!0):this.element.propAttr("disabled",!1),void 0):(this._resetButton(),void 0)},refresh:function(){var t=this.element.is(":disabled");t!==this.options.disabled&&this._setOption("disabled",t),"radio"===this.type?c(this.element[0]).each(function(){e(this).is(":checked")?e(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):e(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return this.options.label&&this.element.val(this.options.label),void 0;var t=this.buttonElement.removeClass(a),i=e("<span></span>",this.element[0].ownerDocument).addClass("ui-button-text").html(this.options.label).appendTo(t.empty()).text(),n=this.options.icons,s=n.primary&&n.secondary,o=[];n.primary||n.secondary?(this.options.text&&o.push("ui-button-text-icon"+(s?"s":n.primary?"-primary":"-secondary")),n.primary&&t.prepend("<span class='ui-button-icon-primary ui-icon "+n.primary+"'></span>"),n.secondary&&t.append("<span class='ui-button-icon-secondary ui-icon "+n.secondary+"'></span>"),this.options.text||(o.push(s?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||t.attr("title",i))):o.push("ui-button-text-only"),t.addClass(o.join(" "))}}),e.widget("ui.buttonset",{options:{items:":button, :submit, :reset, :checkbox, :radio, a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(t,i){"disabled"===t&&this.buttons.button("option",t,i),e.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){var t="rtl"===this.element.css("direction");this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(t?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(t?"ui-corner-left":"ui-corner-right").end().end()},destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy"),e.Widget.prototype.destroy.call(this)}})}(jQuery),/*
 * jQuery UI Datepicker 1.8.18
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Datepicker
 *
 * Depends:
 *	jquery.ui.core.js
 */
function($,undefined){function Datepicker(){this.debug=!1,this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!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"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!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,disabled:!1},$.extend(this._defaults,this.regional[""]),this.dpDiv=bindHover($('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}function bindHover(e){var t="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.bind("mouseout",function(e){var i=$(e.target).closest(t);i.length&&i.removeClass("ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover")}).bind("mouseover",function(i){var n=$(i.target).closest(t);!$.datepicker._isDisabledDatepicker(instActive.inline?e.parent()[0]:instActive.input[0])&&n.length&&(n.parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),n.addClass("ui-state-hover"),n.hasClass("ui-datepicker-prev")&&n.addClass("ui-datepicker-prev-hover"),n.hasClass("ui-datepicker-next")&&n.addClass("ui-datepicker-next-hover"))})}function extendRemove(e,t){$.extend(e,t);for(var i in t)(null==t[i]||t[i]==undefined)&&(e[i]=t[i]);return e}function isArray(e){return e&&($.browser.safari&&"object"==typeof e&&e.length||e.constructor&&e.constructor.toString().match(/\Array\(\)/))}$.extend($.ui,{datepicker:{version:"1.8.18"}});var PROP_NAME="datepicker",dpuuid=(new Date).getTime(),instActive;$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return extendRemove(this._defaults,e||{}),this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase(),inline="div"==nodeName||"span"==nodeName;target.id||(this.uuid+=1,target.id="dp"+this.uuid);var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{}),"input"==nodeName?this._connectDatepicker(target,inst):inline&&this._inlineDatepicker(target,inst)},_newInst:function(e,t){var i=e[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1");return{id:i,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:t,dpDiv:t?bindHover($('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')):this.dpDiv}},_connectDatepicker:function(e,t){var i=$(e);t.append=$([]),t.trigger=$([]),i.hasClass(this.markerClassName)||(this._attachments(i,t),i.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(e,i,n){t.settings[i]=n}).bind("getData.datepicker",function(e,i){return this._get(t,i)}),this._autoSize(t),$.data(e,PROP_NAME,t),t.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,t){var i=this._get(t,"appendText"),n=this._get(t,"isRTL");t.append&&t.append.remove(),i&&(t.append=$('<span class="'+this._appendClass+'">'+i+"</span>"),e[n?"before":"after"](t.append)),e.unbind("focus",this._showDatepicker),t.trigger&&t.trigger.remove();var s=this._get(t,"showOn");if(("focus"==s||"both"==s)&&e.focus(this._showDatepicker),"button"==s||"both"==s){var o=this._get(t,"buttonText"),r=this._get(t,"buttonImage");t.trigger=$(this._get(t,"buttonImageOnly")?$("<img/>").addClass(this._triggerClass).attr({src:r,alt:o,title:o}):$('<button type="button"></button>').addClass(this._triggerClass).html(""==r?o:$("<img/>").attr({src:r,alt:o,title:o}))),e[n?"before":"after"](t.trigger),t.trigger.click(function(){return $.datepicker._datepickerShowing&&$.datepicker._lastInput==e[0]?$.datepicker._hideDatepicker():$.datepicker._datepickerShowing&&$.datepicker._lastInput!=e[0]?($.datepicker._hideDatepicker(),$.datepicker._showDatepicker(e[0])):$.datepicker._showDatepicker(e[0]),!1})}},_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t=new Date(2009,11,20),i=this._get(e,"dateFormat");if(i.match(/[DM]/)){var n=function(e){for(var t=0,i=0,n=0;n<e.length;n++)e[n].length>t&&(t=e[n].length,i=n);return i};t.setMonth(n(this._get(e,i.match(/MM/)?"monthNames":"monthNamesShort"))),t.setDate(n(this._get(e,i.match(/DD/)?"dayNames":"dayNamesShort"))+20-t.getDay())}e.input.attr("size",this._formatDate(e,t).length)}},_inlineDatepicker:function(e,t){var i=$(e);i.hasClass(this.markerClassName)||(i.addClass(this.markerClassName).append(t.dpDiv).bind("setData.datepicker",function(e,i,n){t.settings[i]=n}).bind("getData.datepicker",function(e,i){return this._get(t,i)}),$.data(e,PROP_NAME,t),this._setDate(t,this._getDefaultDate(t),!0),this._updateDatepicker(t),this._updateAlternate(t),t.settings.disabled&&this._disableDatepicker(e),t.dpDiv.css("display","block"))},_dialogDatepicker:function(e,t,i,n,s){var o=this._dialogInst;if(!o){this.uuid+=1;var r="dp"+this.uuid;this._dialogInput=$('<input type="text" id="'+r+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>'),this._dialogInput.keydown(this._doKeyDown),$("body").append(this._dialogInput),o=this._dialogInst=this._newInst(this._dialogInput,!1),o.settings={},$.data(this._dialogInput[0],PROP_NAME,o)}if(extendRemove(o.settings,n||{}),t=t&&t.constructor==Date?this._formatDate(o,t):t,this._dialogInput.val(t),this._pos=s?s.length?s:[s.pageX,s.pageY]:null,!this._pos){var a=document.documentElement.clientWidth,l=document.documentElement.clientHeight,c=document.documentElement.scrollLeft||document.body.scrollLeft,u=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[a/2-100+c,l/2-150+u]}return this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),o.settings.onSelect=i,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),$.blockUI&&$.blockUI(this.dpDiv),$.data(this._dialogInput[0],PROP_NAME,o),this},_destroyDatepicker:function(e){var t=$(e),i=$.data(e,PROP_NAME);if(t.hasClass(this.markerClassName)){var n=e.nodeName.toLowerCase();$.removeData(e,PROP_NAME),"input"==n?(i.append.remove(),i.trigger.remove(),t.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"==n||"span"==n)&&t.removeClass(this.markerClassName).empty()}},_enableDatepicker:function(e){var t=$(e),i=$.data(e,PROP_NAME);if(t.hasClass(this.markerClassName)){var n=e.nodeName.toLowerCase();if("input"==n)e.disabled=!1,i.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""});else if("div"==n||"span"==n){var s=t.children("."+this._inlineClass);s.children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled")}this._disabledInputs=$.map(this._disabledInputs,function(t){return t==e?null:t})}},_disableDatepicker:function(e){var t=$(e),i=$.data(e,PROP_NAME);if(t.hasClass(this.markerClassName)){var n=e.nodeName.toLowerCase();if("input"==n)e.disabled=!0,i.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"});else if("div"==n||"span"==n){var s=t.children("."+this._inlineClass);s.children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled","disabled")}this._disabledInputs=$.map(this._disabledInputs,function(t){return t==e?null:t}),this._disabledInputs[this._disabledInputs.length]=e}},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;t<this._disabledInputs.length;t++)if(this._disabledInputs[t]==e)return!0;return!1},_getInst:function(e){try{return $.data(e,PROP_NAME)}catch(t){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,t,i){var n=this._getInst(e);if(2==arguments.length&&"string"==typeof t)return"defaults"==t?$.extend({},$.datepicker._defaults):n?"all"==t?$.extend({},n.settings):this._get(n,t):null;var s=t||{};if("string"==typeof t&&(s={},s[t]=i),n){this._curInst==n&&this._hideDatepicker();var o=this._getDateDatepicker(e,!0),r=this._getMinMaxDate(n,"min"),a=this._getMinMaxDate(n,"max");extendRemove(n.settings,s),null!==r&&s.dateFormat!==undefined&&s.minDate===undefined&&(n.settings.minDate=this._formatDate(n,r)),null!==a&&s.dateFormat!==undefined&&s.maxDate===undefined&&(n.settings.maxDate=this._formatDate(n,a)),this._attachments($(e),n),this._autoSize(n),this._setDate(n,o),this._updateAlternate(n),this._updateDatepicker(n)}},_changeDatepicker:function(e,t,i){this._optionDatepicker(e,t,i)},_refreshDatepicker:function(e){var t=this._getInst(e);t&&this._updateDatepicker(t)},_setDateDatepicker:function(e,t){var i=this._getInst(e);i&&(this._setDate(i,t),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(e,t){var i=this._getInst(e);return i&&!i.inline&&this._setDateFromField(i,t),i?this._getDate(i):null},_doKeyDown:function(e){var t=$.datepicker._getInst(e.target),i=!0,n=t.dpDiv.is(".ui-datepicker-rtl");if(t._keyEvent=!0,$.datepicker._datepickerShowing)switch(e.keyCode){case 9:$.datepicker._hideDatepicker(),i=!1;break;case 13:var s=$("td."+$.datepicker._dayOverClass+":not(."+$.datepicker._currentClass+")",t.dpDiv);s[0]&&$.datepicker._selectDay(e.target,t.selectedMonth,t.selectedYear,s[0]);var o=$.datepicker._get(t,"onSelect");if(o){var r=$.datepicker._formatDate(t);o.apply(t.input?t.input[0]:null,[r,t])}else $.datepicker._hideDatepicker();return!1;case 27:$.datepicker._hideDatepicker();break;case 33:$.datepicker._adjustDate(e.target,e.ctrlKey?-$.datepicker._get(t,"stepBigMonths"):-$.datepicker._get(t,"stepMonths"),"M");break;case 34:$.datepicker._adjustDate(e.target,e.ctrlKey?+$.datepicker._get(t,"stepBigMonths"):+$.datepicker._get(t,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&$.datepicker._clearDate(e.target),i=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&$.datepicker._gotoToday(e.target),i=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&$.datepicker._adjustDate(e.target,n?1:-1,"D"),i=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&$.datepicker._adjustDate(e.target,e.ctrlKey?-$.datepicker._get(t,"stepBigMonths"):-$.datepicker._get(t,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&$.datepicker._adjustDate(e.target,-7,"D"),i=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&$.datepicker._adjustDate(e.target,n?-1:1,"D"),i=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&$.datepicker._adjustDate(e.target,e.ctrlKey?+$.datepicker._get(t,"stepBigMonths"):+$.datepicker._get(t,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&$.datepicker._adjustDate(e.target,7,"D"),i=e.ctrlKey||e.metaKey;break;default:i=!1}else 36==e.keyCode&&e.ctrlKey?$.datepicker._showDatepicker(this):i=!1;i&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var t=$.datepicker._getInst(e.target);if($.datepicker._get(t,"constrainInput")){var i=$.datepicker._possibleChars($.datepicker._get(t,"dateFormat")),n=String.fromCharCode(e.charCode==undefined?e.keyCode:e.charCode);return e.ctrlKey||e.metaKey||" ">n||!i||i.indexOf(n)>-1}},_doKeyUp:function(e){var t=$.datepicker._getInst(e.target);if(t.input.val()!=t.lastVal)try{var i=$.datepicker.parseDate($.datepicker._get(t,"dateFormat"),t.input?t.input.val():null,$.datepicker._getFormatConfig(t));i&&($.datepicker._setDateFromField(t),$.datepicker._updateAlternate(t),$.datepicker._updateDatepicker(t))}catch(e){$.datepicker.log(e)}return!0},_showDatepicker:function(e){if(e=e.target||e,"input"!=e.nodeName.toLowerCase()&&(e=$("input",e.parentNode)[0]),!$.datepicker._isDisabledDatepicker(e)&&$.datepicker._lastInput!=e){var t=$.datepicker._getInst(e);$.datepicker._curInst&&$.datepicker._curInst!=t&&($.datepicker._curInst.dpDiv.stop(!0,!0),t&&$.datepicker._datepickerShowing&&$.datepicker._hideDatepicker($.datepicker._curInst.input[0]));var i=$.datepicker._get(t,"beforeShow"),n=i?i.apply(e,[e,t]):{};if(n!==!1){extendRemove(t.settings,n),t.lastVal=null,$.datepicker._lastInput=e,$.datepicker._setDateFromField(t),$.datepicker._inDialog&&(e.value=""),$.datepicker._pos||($.datepicker._pos=$.datepicker._findPos(e),$.datepicker._pos[1]+=e.offsetHeight);var s=!1;$(e).parents().each(function(){return s|="fixed"==$(this).css("position"),!s}),s&&$.browser.opera&&($.datepicker._pos[0]-=document.documentElement.scrollLeft,$.datepicker._pos[1]-=document.documentElement.scrollTop);var o={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};if($.datepicker._pos=null,t.dpDiv.empty(),t.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),$.datepicker._updateDatepicker(t),o=$.datepicker._checkOffset(t,o,s),t.dpDiv.css({position:$.datepicker._inDialog&&$.blockUI?"static":s?"fixed":"absolute",display:"none",left:o.left+"px",top:o.top+"px"}),!t.inline){var r=$.datepicker._get(t,"showAnim"),a=$.datepicker._get(t,"duration"),l=function(){var e=t.dpDiv.find("iframe.ui-datepicker-cover");if(e.length){var i=$.datepicker._getBorders(t.dpDiv);e.css({left:-i[0],top:-i[1],width:t.dpDiv.outerWidth(),height:t.dpDiv.outerHeight()})}};t.dpDiv.zIndex($(e).zIndex()+1),$.datepicker._datepickerShowing=!0,$.effects&&$.effects[r]?t.dpDiv.show(r,$.datepicker._get(t,"showOptions"),a,l):t.dpDiv[r||"show"](r?a:null,l),r&&a||l(),t.input.is(":visible")&&!t.input.is(":disabled")&&t.input.focus(),$.datepicker._curInst=t}}}},_updateDatepicker:function(e){var t=this;t.maxRows=4;var i=$.datepicker._getBorders(e.dpDiv);instActive=e,e.dpDiv.empty().append(this._generateHTML(e));var n=e.dpDiv.find("iframe.ui-datepicker-cover");n.length&&n.css({left:-i[0],top:-i[1],width:e.dpDiv.outerWidth(),height:e.dpDiv.outerHeight()}),e.dpDiv.find("."+this._dayOverClass+" a").mouseover();var s=this._getNumberOfMonths(e),o=s[1],r=17;if(e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),o>1&&e.dpDiv.addClass("ui-datepicker-multi-"+o).css("width",r*o+"em"),e.dpDiv[(1!=s[0]||1!=s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e==$.datepicker._curInst&&$.datepicker._datepickerShowing&&e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&e.input[0]!=document.activeElement&&e.input.focus(),e.yearshtml){var a=e.yearshtml;setTimeout(function(){a===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),a=e.yearshtml=null},0)}},_getBorders:function(e){var t=function(e){return{thin:1,medium:2,thick:3}[e]||e};return[parseFloat(t(e.css("border-left-width"))),parseFloat(t(e.css("border-top-width")))]},_checkOffset:function(e,t,i){var n=e.dpDiv.outerWidth(),s=e.dpDiv.outerHeight(),o=e.input?e.input.outerWidth():0,r=e.input?e.input.outerHeight():0,a=document.documentElement.clientWidth+$(document).scrollLeft(),l=document.documentElement.clientHeight+$(document).scrollTop();return t.left-=this._get(e,"isRTL")?n-o:0,t.left-=i&&t.left==e.input.offset().left?$(document).scrollLeft():0,t.top-=i&&t.top==e.input.offset().top+r?$(document).scrollTop():0,t.left-=Math.min(t.left,t.left+n>a&&a>n?Math.abs(t.left+n-a):0),t.top-=Math.min(t.top,t.top+s>l&&l>s?Math.abs(s+r):0),t},_findPos:function(e){for(var t=this._getInst(e),i=this._get(t,"isRTL");e&&("hidden"==e.type||1!=e.nodeType||$.expr.filters.hidden(e));)e=e[i?"previousSibling":"nextSibling"];var n=$(e).offset();return[n.left,n.top]},_hideDatepicker:function(e){var t=this._curInst;if(t&&(!e||t==$.data(e,PROP_NAME))&&this._datepickerShowing){var i=this._get(t,"showAnim"),n=this._get(t,"duration"),s=this,o=function(){$.datepicker._tidyDialog(t),s._curInst=null};$.effects&&$.effects[i]?t.dpDiv.hide(i,$.datepicker._get(t,"showOptions"),n,o):t.dpDiv["slideDown"==i?"slideUp":"fadeIn"==i?"fadeOut":"hide"](i?n:null,o),i||o(),this._datepickerShowing=!1;var r=this._get(t,"onClose");r&&r.apply(t.input?t.input[0]:null,[t.input?t.input.val():"",t]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),$.blockUI&&($.unblockUI(),$("body").append(this.dpDiv))),this._inDialog=!1}},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(e){if($.datepicker._curInst){var t=$(e.target),i=$.datepicker._getInst(t[0]);(t[0].id!=$.datepicker._mainDivId&&0==t.parents("#"+$.datepicker._mainDivId).length&&!t.hasClass($.datepicker.markerClassName)&&!t.closest("."+$.datepicker._triggerClass).length&&$.datepicker._datepickerShowing&&(!$.datepicker._inDialog||!$.blockUI)||t.hasClass($.datepicker.markerClassName)&&$.datepicker._curInst!=i)&&$.datepicker._hideDatepicker()}},_adjustDate:function(e,t,i){var n=$(e),s=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(s,t+("M"==i?this._get(s,"showCurrentAtPos"):0),i),this._updateDatepicker(s))},_gotoToday:function(e){var t=$(e),i=this._getInst(t[0]);if(this._get(i,"gotoCurrent")&&i.currentDay)i.selectedDay=i.currentDay,i.drawMonth=i.selectedMonth=i.currentMonth,i.drawYear=i.selectedYear=i.currentYear;else{var n=new Date;i.selectedDay=n.getDate(),i.drawMonth=i.selectedMonth=n.getMonth(),i.drawYear=i.selectedYear=n.getFullYear()}this._notifyChange(i),this._adjustDate(t)},_selectMonthYear:function(e,t,i){var n=$(e),s=this._getInst(n[0]);s["selected"+("M"==i?"Month":"Year")]=s["draw"+("M"==i?"Month":"Year")]=parseInt(t.options[t.selectedIndex].value,10),this._notifyChange(s),this._adjustDate(n)},_selectDay:function(e,t,i,n){var s=$(e);if(!$(n).hasClass(this._unselectableClass)&&!this._isDisabledDatepicker(s[0])){var o=this._getInst(s[0]);o.selectedDay=o.currentDay=$("a",n).html(),o.selectedMonth=o.currentMonth=t,o.selectedYear=o.currentYear=i,this._selectDate(e,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear))}},_clearDate:function(e){var t=$(e);this._getInst(t[0]),this._selectDate(t,"")},_selectDate:function(e,t){var i=$(e),n=this._getInst(i[0]);t=null!=t?t:this._formatDate(n),n.input&&n.input.val(t),this._updateAlternate(n);var s=this._get(n,"onSelect");s?s.apply(n.input?n.input[0]:null,[t,n]):n.input&&n.input.trigger("change"),n.inline?this._updateDatepicker(n):(this._hideDatepicker(),this._lastInput=n.input[0],"object"!=typeof n.input[0]&&n.input.focus(),this._lastInput=null)},_updateAlternate:function(e){var t=this._get(e,"altField");if(t){var i=this._get(e,"altFormat")||this._get(e,"dateFormat"),n=this._getDate(e),s=this.formatDate(i,n,this._getFormatConfig(e));$(t).each(function(){$(this).val(s)})}},noWeekends:function(e){var t=e.getDay();return[t>0&&6>t,""]},iso8601Week:function(e){var t=new Date(e.getTime());t.setDate(t.getDate()+4-(t.getDay()||7));var i=t.getTime();return t.setMonth(0),t.setDate(1),Math.floor(Math.round((i-t)/864e5)/7)+1},parseDate:function(e,t,i){if(null==e||null==t)throw"Invalid arguments";if(t="object"==typeof t?t.toString():t+"",""==t)return null;var n=(i?i.shortYearCutoff:null)||this._defaults.shortYearCutoff;n="string"!=typeof n?n:(new Date).getFullYear()%100+parseInt(n,10);for(var s=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,o=(i?i.dayNames:null)||this._defaults.dayNames,r=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,a=(i?i.monthNames:null)||this._defaults.monthNames,l=-1,c=-1,u=-1,h=-1,d=!1,p=function(t){var i=b+1<e.length&&e.charAt(b+1)==t;return i&&b++,i},f=function(e){var i=p(e),n="@"==e?14:"!"==e?20:"y"==e&&i?4:"o"==e?3:2,s=new RegExp("^\\d{1,"+n+"}"),o=t.substring(v).match(s);if(!o)throw"Missing number at position "+v;return v+=o[0].length,parseInt(o[0],10)},m=function(e,i,n){var s=$.map(p(e)?n:i,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)}),o=-1;if($.each(s,function(e,i){var n=i[1];return t.substr(v,n.length).toLowerCase()==n.toLowerCase()?(o=i[0],v+=n.length,!1):void 0}),-1!=o)return o+1;throw"Unknown name at position "+v},g=function(){if(t.charAt(v)!=e.charAt(b))throw"Unexpected literal at position "+v;v++},v=0,b=0;b<e.length;b++)if(d)"'"!=e.charAt(b)||p("'")?g():d=!1;else switch(e.charAt(b)){case"d":u=f("d");break;case"D":m("D",s,o);break;case"o":h=f("o");break;case"m":c=f("m");break;case"M":c=m("M",r,a);break;case"y":l=f("y");break;case"@":var y=new Date(f("@"));l=y.getFullYear(),c=y.getMonth()+1,u=y.getDate();break;case"!":var y=new Date((f("!")-this._ticksTo1970)/1e4);l=y.getFullYear(),c=y.getMonth()+1,u=y.getDate();break;case"'":p("'")?g():d=!0;break;default:g()}if(v<t.length)throw"Extra/unparsed characters found in date: "+t.substring(v);if(-1==l?l=(new Date).getFullYear():100>l&&(l+=(new Date).getFullYear()-(new Date).getFullYear()%100+(n>=l?0:-100)),h>-1)for(c=1,u=h;;){var _=this._getDaysInMonth(l,c-1);if(_>=u)break;c++,u-=_}var y=this._daylightSavingAdjust(new Date(l,c-1,u));if(y.getFullYear()!=l||y.getMonth()+1!=c||y.getDate()!=u)throw"Invalid date";return y},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:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(e,t,i){if(!t)return"";var n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,s=(i?i.dayNames:null)||this._defaults.dayNames,o=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,r=(i?i.monthNames:null)||this._defaults.monthNames,a=function(t){var i=d+1<e.length&&e.charAt(d+1)==t;return i&&d++,i},l=function(e,t,i){var n=""+t;if(a(e))for(;n.length<i;)n="0"+n;return n},c=function(e,t,i,n){return a(e)?n[t]:i[t]},u="",h=!1;if(t)for(var d=0;d<e.length;d++)if(h)"'"!=e.charAt(d)||a("'")?u+=e.charAt(d):h=!1;else switch(e.charAt(d)){case"d":u+=l("d",t.getDate(),2);break;case"D":u+=c("D",t.getDay(),n,s);break;case"o":u+=l("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=l("m",t.getMonth()+1,2);break;case"M":u+=c("M",t.getMonth(),o,r);break;case"y":u+=a("y")?t.getFullYear():(t.getYear()%100<10?"0":"")+t.getYear()%100;break;case"@":u+=t.getTime();break;case"!":u+=1e4*t.getTime()+this._ticksTo1970;break;case"'":a("'")?u+="'":h=!0;break;default:u+=e.charAt(d)}return u},_possibleChars:function(e){for(var t="",i=!1,n=function(t){var i=s+1<e.length&&e.charAt(s+1)==t;return i&&s++,i},s=0;s<e.length;s++)if(i)"'"!=e.charAt(s)||n("'")?t+=e.charAt(s):i=!1;else switch(e.charAt(s)){case"d":case"m":case"y":case"@":t+="0123456789";break;case"D":case"M":return null;case"'":n("'")?t+="'":i=!0;break;default:t+=e.charAt(s)}return t},_get:function(e,t){return e.settings[t]!==undefined?e.settings[t]:this._defaults[t]},_setDateFromField:function(e,t){if(e.input.val()!=e.lastVal){var i,n,s=this._get(e,"dateFormat"),o=e.lastVal=e.input?e.input.val():null;i=n=this._getDefaultDate(e);var r=this._getFormatConfig(e);try{i=this.parseDate(s,o,r)||n}catch(a){this.log(a),o=t?"":o}e.selectedDay=i.getDate(),e.drawMonth=e.selectedMonth=i.getMonth(),e.drawYear=e.selectedYear=i.getFullYear(),e.currentDay=o?i.getDate():0,e.currentMonth=o?i.getMonth():0,e.currentYear=o?i.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(e,t,i){var n=function(e){var t=new Date;return t.setDate(t.getDate()+e),t},s=function(t){try{return $.datepicker.parseDate($.datepicker._get(e,"dateFormat"),t,$.datepicker._getFormatConfig(e))}catch(i){}for(var n=(t.toLowerCase().match(/^c/)?$.datepicker._getDate(e):null)||new Date,s=n.getFullYear(),o=n.getMonth(),r=n.getDate(),a=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=a.exec(t);l;){switch(l[2]||"d"){case"d":case"D":r+=parseInt(l[1],10);break;case"w":case"W":r+=7*parseInt(l[1],10);break;case"m":case"M":o+=parseInt(l[1],10),r=Math.min(r,$.datepicker._getDaysInMonth(s,o));break;case"y":case"Y":s+=parseInt(l[1],10),r=Math.min(r,$.datepicker._getDaysInMonth(s,o))}l=a.exec(t)}return new Date(s,o,r)},o=null==t||""===t?i:"string"==typeof t?s(t):"number"==typeof t?isNaN(t)?i:n(t):new Date(t.getTime());return o=o&&"Invalid Date"==o.toString()?i:o,o&&(o.setHours(0),o.setMinutes(0),o.setSeconds(0),o.setMilliseconds(0)),this._daylightSavingAdjust(o)},_daylightSavingAdjust:function(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null},_setDate:function(e,t,i){var n=!t,s=e.selectedMonth,o=e.selectedYear,r=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=r.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=r.getMonth(),e.drawYear=e.selectedYear=e.currentYear=r.getFullYear(),s==e.selectedMonth&&o==e.selectedYear||i||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(n?"":this._formatDate(e))},_getDate:function(e){var t=!e.currentYear||e.input&&""==e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return t},_generateHTML:function(e){var t=new Date;t=this._daylightSavingAdjust(new Date(t.getFullYear(),t.getMonth(),t.getDate()));var i=this._get(e,"isRTL"),n=this._get(e,"showButtonPanel"),s=this._get(e,"hideIfNoPrevNext"),o=this._get(e,"navigationAsDateFormat"),r=this._getNumberOfMonths(e),a=this._get(e,"showCurrentAtPos"),l=this._get(e,"stepMonths"),c=1!=r[0]||1!=r[1],u=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),h=this._getMinMaxDate(e,"min"),d=this._getMinMaxDate(e,"max"),p=e.drawMonth-a,f=e.drawYear;if(0>p&&(p+=12,f--),d){var m=this._daylightSavingAdjust(new Date(d.getFullYear(),d.getMonth()-r[0]*r[1]+1,d.getDate()));for(m=h&&h>m?h:m;this._daylightSavingAdjust(new Date(f,p,1))>m;)p--,0>p&&(p=11,f--)}e.drawMonth=p,e.drawYear=f;var g=this._get(e,"prevText");g=o?this.formatDate(g,this._daylightSavingAdjust(new Date(f,p-l,1)),this._getFormatConfig(e)):g;var v=this._canAdjustMonth(e,-1,f,p)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._adjustDate('#"+e.id+"', -"+l+", 'M');\""+' title="'+g+'"><span class="ui-icon ui-icon-circle-triangle-'+(i?"e":"w")+'">'+g+"</span></a>":s?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+g+'"><span class="ui-icon ui-icon-circle-triangle-'+(i?"e":"w")+'">'+g+"</span></a>",b=this._get(e,"nextText");b=o?this.formatDate(b,this._daylightSavingAdjust(new Date(f,p+l,1)),this._getFormatConfig(e)):b;var y=this._canAdjustMonth(e,1,f,p)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._adjustDate('#"+e.id+"', +"+l+", 'M');\""+' title="'+b+'"><span class="ui-icon ui-icon-circle-triangle-'+(i?"w":"e")+'">'+b+"</span></a>":s?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+b+'"><span class="ui-icon ui-icon-circle-triangle-'+(i?"w":"e")+'">'+b+"</span></a>",_=this._get(e,"currentText"),w=this._get(e,"gotoCurrent")&&e.currentDay?u:t;_=o?this.formatDate(_,w,this._getFormatConfig(e)):_;var x=e.inline?"":'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+dpuuid+'.datepicker._hideDatepicker();">'+this._get(e,"closeText")+"</button>",k=n?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(i?x:"")+(this._isInRange(e,w)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+dpuuid+".datepicker._gotoToday('#"+e.id+"');\""+">"+_+"</button>":"")+(i?"":x)+"</div>":"",T=parseInt(this._get(e,"firstDay"),10);T=isNaN(T)?0:T;var C=this._get(e,"showWeek"),E=this._get(e,"dayNames");this._get(e,"dayNamesShort");var S=this._get(e,"dayNamesMin"),D=this._get(e,"monthNames"),j=this._get(e,"monthNamesShort"),O=this._get(e,"beforeShowDay"),P=this._get(e,"showOtherMonths"),I=this._get(e,"selectOtherMonths");this._get(e,"calculateWeek")||this.iso8601Week;for(var M=this._getDefaultDate(e),A="",F=0;F<r[0];F++){var N="";this.maxRows=4;for(var z=0;z<r[1];z++){var H=this._daylightSavingAdjust(new Date(f,p,e.selectedDay)),B=" ui-corner-all",R="";if(c){if(R+='<div class="ui-datepicker-group',r[1]>1)switch(z){case 0:R+=" ui-datepicker-group-first",B=" ui-corner-"+(i?"right":"left");break;case r[1]-1:R+=" ui-datepicker-group-last",B=" ui-corner-"+(i?"left":"right");break;default:R+=" ui-datepicker-group-middle",B=""}R+='">'}R+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+B+'">'+(/all|left/.test(B)&&0==F?i?y:v:"")+(/all|right/.test(B)&&0==F?i?v:y:"")+this._generateMonthYearHeader(e,p,f,h,d,F>0||z>0,D,j)+'</div><table class="ui-datepicker-calendar"><thead>'+"<tr>";for(var L=C?'<th class="ui-datepicker-week-col">'+this._get(e,"weekHeader")+"</th>":"",W=0;7>W;W++){var U=(W+T)%7;L+="<th"+((W+T+6)%7>=5?' class="ui-datepicker-week-end"':"")+">"+'<span title="'+E[U]+'">'+S[U]+"</span></th>"}R+=L+"</tr></thead><tbody>";var Q=this._getDaysInMonth(f,p);f==e.selectedYear&&p==e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,Q));var q=(this._getFirstDayOfMonth(f,p)-T+7)%7,Y=Math.ceil((q+Q)/7),V=c?this.maxRows>Y?this.maxRows:Y:Y;this.maxRows=V;for(var K=this._daylightSavingAdjust(new Date(f,p,1-q)),X=0;V>X;X++){R+="<tr>";for(var G=C?'<td class="ui-datepicker-week-col">'+this._get(e,"calculateWeek")(K)+"</td>":"",W=0;7>W;W++){var Z=O?O.apply(e.input?e.input[0]:null,[K]):[!0,""],J=K.getMonth()!=p,et=J&&!I||!Z[0]||h&&h>K||d&&K>d;G+='<td class="'+((W+T+6)%7>=5?" ui-datepicker-week-end":"")+(J?" ui-datepicker-other-month":"")+(K.getTime()==H.getTime()&&p==e.selectedMonth&&e._keyEvent||M.getTime()==K.getTime()&&M.getTime()==H.getTime()?" "+this._dayOverClass:"")+(et?" "+this._unselectableClass+" ui-state-disabled":"")+(J&&!P?"":" "+Z[1]+(K.getTime()==u.getTime()?" "+this._currentClass:"")+(K.getTime()==t.getTime()?" ui-datepicker-today":""))+'"'+(J&&!P||!Z[2]?"":' title="'+Z[2]+'"')+(et?"":' onclick="DP_jQuery_'+dpuuid+".datepicker._selectDay('#"+e.id+"',"+K.getMonth()+","+K.getFullYear()+', this);return false;"')+">"+(J&&!P?"&#xa0;":et?'<span class="ui-state-default">'+K.getDate()+"</span>":'<a class="ui-state-default'+(K.getTime()==t.getTime()?" ui-state-highlight":"")+(K.getTime()==u.getTime()?" ui-state-active":"")+(J?" ui-priority-secondary":"")+'" href="#">'+K.getDate()+"</a>")+"</td>",K.setDate(K.getDate()+1),K=this._daylightSavingAdjust(K)}R+=G+"</tr>"}p++,p>11&&(p=0,f++),R+="</tbody></table>"+(c?"</div>"+(r[0]>0&&z==r[1]-1?'<div class="ui-datepicker-row-break"></div>':""):""),N+=R}A+=N}return A+=k+($.browser.msie&&parseInt($.browser.version,10)<7&&!e.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':""),e._keyEvent=!1,A},_generateMonthYearHeader:function(e,t,i,n,s,o,r,a){var l=this._get(e,"changeMonth"),c=this._get(e,"changeYear"),u=this._get(e,"showMonthAfterYear"),h='<div class="ui-datepicker-title">',d="";if(o||!l)d+='<span class="ui-datepicker-month">'+r[t]+"</span>";else{var p=n&&n.getFullYear()==i,f=s&&s.getFullYear()==i;d+='<select class="ui-datepicker-month" onchange="DP_jQuery_'+dpuuid+".datepicker._selectMonthYear('#"+e.id+"', this, 'M');\" "+">";
for(var m=0;12>m;m++)(!p||m>=n.getMonth())&&(!f||m<=s.getMonth())&&(d+='<option value="'+m+'"'+(m==t?' selected="selected"':"")+">"+a[m]+"</option>");d+="</select>"}if(u||(h+=d+(!o&&l&&c?"":"&#xa0;")),!e.yearshtml)if(e.yearshtml="",o||!c)h+='<span class="ui-datepicker-year">'+i+"</span>";else{var g=this._get(e,"yearRange").split(":"),v=(new Date).getFullYear(),b=function(e){var t=e.match(/c[+-].*/)?i+parseInt(e.substring(1),10):e.match(/[+-].*/)?v+parseInt(e,10):parseInt(e,10);return isNaN(t)?v:t},y=b(g[0]),_=Math.max(y,b(g[1]||""));for(y=n?Math.max(y,n.getFullYear()):y,_=s?Math.min(_,s.getFullYear()):_,e.yearshtml+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+dpuuid+".datepicker._selectMonthYear('#"+e.id+"', this, 'Y');\" "+">";_>=y;y++)e.yearshtml+='<option value="'+y+'"'+(y==i?' selected="selected"':"")+">"+y+"</option>";e.yearshtml+="</select>",h+=e.yearshtml,e.yearshtml=null}return h+=this._get(e,"yearSuffix"),u&&(h+=(!o&&l&&c?"":"&#xa0;")+d),h+="</div>"},_adjustInstDate:function(e,t,i){var n=e.drawYear+("Y"==i?t:0),s=e.drawMonth+("M"==i?t:0),o=Math.min(e.selectedDay,this._getDaysInMonth(n,s))+("D"==i?t:0),r=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(n,s,o)));e.selectedDay=r.getDate(),e.drawMonth=e.selectedMonth=r.getMonth(),e.drawYear=e.selectedYear=r.getFullYear(),("M"==i||"Y"==i)&&this._notifyChange(e)},_restrictMinMax:function(e,t){var i=this._getMinMaxDate(e,"min"),n=this._getMinMaxDate(e,"max"),s=i&&i>t?i:t;return s=n&&s>n?n:s},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,i,n){var s=this._getNumberOfMonths(e),o=this._daylightSavingAdjust(new Date(i,n+(0>t?t:s[0]*s[1]),1));return 0>t&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(e,o)},_isInRange:function(e,t){var i=this._getMinMaxDate(e,"min"),n=this._getMinMaxDate(e,"max");return(!i||t.getTime()>=i.getTime())&&(!n||t.getTime()<=n.getTime())},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,i,n){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var s=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(n,i,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),s,this._getFormatConfig(e))}}),$.fn.datepicker=function(e){if(!this.length)return this;$.datepicker.initialized||($(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv),$.datepicker.initialized=!0);var t=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!=e&&"getDate"!=e&&"widget"!=e?"option"==e&&2==arguments.length&&"string"==typeof arguments[1]?$.datepicker["_"+e+"Datepicker"].apply($.datepicker,[this[0]].concat(t)):this.each(function(){"string"==typeof e?$.datepicker["_"+e+"Datepicker"].apply($.datepicker,[this].concat(t)):$.datepicker._attachDatepicker(this,e)}):$.datepicker["_"+e+"Datepicker"].apply($.datepicker,[this[0]].concat(t))},$.datepicker=new Datepicker,$.datepicker.initialized=!1,$.datepicker.uuid=(new Date).getTime(),$.datepicker.version="1.8.18",window["DP_jQuery_"+dpuuid]=$}(jQuery),/*
 * jQuery UI Dialog 1.8.18
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Dialog
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.widget.js
 *  jquery.ui.button.js
 *	jquery.ui.draggable.js
 *	jquery.ui.mouse.js
 *	jquery.ui.position.js
 *	jquery.ui.resizable.js
 */
function(e,t){var i="ui-dialog ui-widget ui-widget-content ui-corner-all ",n={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},s={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},o=e.attrFn||{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0,click:!0};e.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",collision:"fit",using:function(t){var i=e(this).css(t).offset().top;0>i&&e(this).css("top",t.top-i)}},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 t=this,n=t.options,s=n.title||"&#160;",o=e.ui.dialog.getTitleId(t.element),r=(t.uiDialog=e("<div></div>")).appendTo(document.body).hide().addClass(i+n.dialogClass).css({zIndex:n.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(i){n.closeOnEscape&&!i.isDefaultPrevented()&&i.keyCode&&i.keyCode===e.ui.keyCode.ESCAPE&&(t.close(i),i.preventDefault())}).attr({role:"dialog","aria-labelledby":o}).mousedown(function(e){t.moveToTop(!1,e)}),a=(t.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(r),(t.uiDialogTitlebar=e("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(r)),l=e('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){l.addClass("ui-state-hover")},function(){l.removeClass("ui-state-hover")}).focus(function(){l.addClass("ui-state-focus")}).blur(function(){l.removeClass("ui-state-focus")}).click(function(e){return t.close(e),!1}).appendTo(a);(t.uiDialogTitlebarCloseText=e("<span></span>")).addClass("ui-icon ui-icon-closethick").text(n.closeText).appendTo(l),e("<span></span>").addClass("ui-dialog-title").attr("id",o).html(s).prependTo(a),e.isFunction(n.beforeclose)&&!e.isFunction(n.beforeClose)&&(n.beforeClose=n.beforeclose),a.find("*").add(a).disableSelection(),n.draggable&&e.fn.draggable&&t._makeDraggable(),n.resizable&&e.fn.resizable&&t._makeResizable(),t._createButtons(n.buttons),t._isOpen=!1,e.fn.bgiframe&&r.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var e=this;return e.overlay&&e.overlay.destroy(),e.uiDialog.hide(),e.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"),e.uiDialog.remove(),e.originalTitle&&e.element.attr("title",e.originalTitle),e},widget:function(){return this.uiDialog},close:function(t){var i,n,s=this;if(!1!==s._trigger("beforeClose",t))return s.overlay&&s.overlay.destroy(),s.uiDialog.unbind("keypress.ui-dialog"),s._isOpen=!1,s.options.hide?s.uiDialog.hide(s.options.hide,function(){s._trigger("close",t)}):(s.uiDialog.hide(),s._trigger("close",t)),e.ui.dialog.overlay.resize(),s.options.modal&&(i=0,e(".ui-dialog").each(function(){this!==s.uiDialog[0]&&(n=e(this).css("z-index"),isNaN(n)||(i=Math.max(i,n)))}),e.ui.dialog.maxZ=i),s},isOpen:function(){return this._isOpen},moveToTop:function(t,i){var n,s=this,o=s.options;return o.modal&&!t||!o.stack&&!o.modal?s._trigger("focus",i):(o.zIndex>e.ui.dialog.maxZ&&(e.ui.dialog.maxZ=o.zIndex),s.overlay&&(e.ui.dialog.maxZ+=1,s.overlay.$el.css("z-index",e.ui.dialog.overlay.maxZ=e.ui.dialog.maxZ)),n={scrollTop:s.element.scrollTop(),scrollLeft:s.element.scrollLeft()},e.ui.dialog.maxZ+=1,s.uiDialog.css("z-index",e.ui.dialog.maxZ),s.element.attr(n),s._trigger("focus",i),s)},open:function(){if(!this._isOpen){var t=this,i=t.options,n=t.uiDialog;return t.overlay=i.modal?new e.ui.dialog.overlay(t):null,t._size(),t._position(i.position),n.show(i.show),t.moveToTop(!0),i.modal&&n.bind("keydown.ui-dialog",function(t){if(t.keyCode===e.ui.keyCode.TAB){var i=e(":tabbable",this),n=i.filter(":first"),s=i.filter(":last");return t.target!==s[0]||t.shiftKey?t.target===n[0]&&t.shiftKey?(s.focus(1),!1):void 0:(n.focus(1),!1)}}),e(t.element.find(":tabbable").get().concat(n.find(".ui-dialog-buttonpane :tabbable").get().concat(n.get()))).eq(0).focus(),t._isOpen=!0,t._trigger("open"),t}},_createButtons:function(t){var i=this,n=!1,s=e("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),r=e("<div></div>").addClass("ui-dialog-buttonset").appendTo(s);i.uiDialog.find(".ui-dialog-buttonpane").remove(),"object"==typeof t&&null!==t&&e.each(t,function(){return!(n=!0)}),n&&(e.each(t,function(t,n){n=e.isFunction(n)?{click:n,text:t}:n;var s=e('<button type="button"></button>').click(function(){n.click.apply(i.element[0],arguments)}).appendTo(r);e.each(n,function(e,t){"click"!==e&&(e in o?s[e](t):s.attr(e,t))}),e.fn.button&&s.button()}),s.appendTo(i.uiDialog))},_makeDraggable:function(){function t(e){return{position:e.position,offset:e.offset}}var i,n=this,s=n.options,o=e(document);n.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(o,r){i="auto"===s.height?"auto":e(this).height(),e(this).height(e(this).height()).addClass("ui-dialog-dragging"),n._trigger("dragStart",o,t(r))},drag:function(e,i){n._trigger("drag",e,t(i))},stop:function(r,a){s.position=[a.position.left-o.scrollLeft(),a.position.top-o.scrollTop()],e(this).removeClass("ui-dialog-dragging").height(i),n._trigger("dragStop",r,t(a)),e.ui.dialog.overlay.resize()}})},_makeResizable:function(i){function n(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}i=i===t?this.options.resizable:i;var s=this,o=s.options,r=s.uiDialog.css("position"),a="string"==typeof i?i:"n,e,s,w,se,sw,ne,nw";s.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:s.element,maxWidth:o.maxWidth,maxHeight:o.maxHeight,minWidth:o.minWidth,minHeight:s._minHeight(),handles:a,start:function(t,i){e(this).addClass("ui-dialog-resizing"),s._trigger("resizeStart",t,n(i))},resize:function(e,t){s._trigger("resize",e,n(t))},stop:function(t,i){e(this).removeClass("ui-dialog-resizing"),o.height=e(this).height(),o.width=e(this).width(),s._trigger("resizeStop",t,n(i)),e.ui.dialog.overlay.resize()}}).css("position",r).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var e=this.options;return"auto"===e.height?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(t){var i,n=[],s=[0,0];t?(("string"==typeof t||"object"==typeof t&&"0"in t)&&(n=t.split?t.split(" "):[t[0],t[1]],1===n.length&&(n[1]=n[0]),e.each(["left","top"],function(e,t){+n[e]===n[e]&&(s[e]=n[e],n[e]=t)}),t={my:n.join(" "),at:n.join(" "),offset:s.join(" ")}),t=e.extend({},e.ui.dialog.prototype.options.position,t)):t=e.ui.dialog.prototype.options.position,i=this.uiDialog.is(":visible"),i||this.uiDialog.show(),this.uiDialog.css({top:0,left:0}).position(e.extend({of:window},t)),i||this.uiDialog.hide()},_setOptions:function(t){var i=this,o={},r=!1;e.each(t,function(e,t){i._setOption(e,t),e in n&&(r=!0),e in s&&(o[e]=t)}),r&&this._size(),this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",o)},_setOption:function(t,n){var s=this,o=s.uiDialog;switch(t){case"beforeclose":t="beforeClose";break;case"buttons":s._createButtons(n);break;case"closeText":s.uiDialogTitlebarCloseText.text(""+n);break;case"dialogClass":o.removeClass(s.options.dialogClass).addClass(i+n);break;case"disabled":n?o.addClass("ui-dialog-disabled"):o.removeClass("ui-dialog-disabled");break;case"draggable":var r=o.is(":data(draggable)");r&&!n&&o.draggable("destroy"),!r&&n&&s._makeDraggable();break;case"position":s._position(n);break;case"resizable":var a=o.is(":data(resizable)");a&&!n&&o.resizable("destroy"),a&&"string"==typeof n&&o.resizable("option","handles",n),a||n===!1||s._makeResizable(n);break;case"title":e(".ui-dialog-title",s.uiDialogTitlebar).html(""+(n||"&#160;"))}e.Widget.prototype._setOption.apply(s,arguments)},_size:function(){var t,i,n=this.options,s=this.uiDialog.is(":visible");if(this.element.show().css({width:"auto",minHeight:0,height:0}),n.minWidth>n.width&&(n.width=n.minWidth),t=this.uiDialog.css({height:"auto",width:n.width}).height(),i=Math.max(0,n.minHeight-t),"auto"===n.height)if(e.support.minHeight)this.element.css({minHeight:i,height:"auto"});else{this.uiDialog.show();var o=this.element.css("height","auto").height();s||this.uiDialog.hide(),this.element.height(Math.max(o,i))}else this.element.height(Math.max(n.height-t,0));this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}}),e.extend(e.ui.dialog,{version:"1.8.18",uuid:0,maxZ:0,getTitleId:function(e){var t=e.attr("id");return t||(this.uuid+=1,t=this.uuid),"ui-dialog-title-"+t},overlay:function(t){this.$el=e.ui.dialog.overlay.create(t)}}),e.extend(e.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:e.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(e){return e+".dialog-overlay"}).join(" "),create:function(t){0===this.instances.length&&(setTimeout(function(){e.ui.dialog.overlay.instances.length&&e(document).bind(e.ui.dialog.overlay.events,function(t){return e(t.target).zIndex()<e.ui.dialog.overlay.maxZ?!1:void 0})},1),e(document).bind("keydown.dialog-overlay",function(i){t.options.closeOnEscape&&!i.isDefaultPrevented()&&i.keyCode&&i.keyCode===e.ui.keyCode.ESCAPE&&(t.close(i),i.preventDefault())}),e(window).bind("resize.dialog-overlay",e.ui.dialog.overlay.resize));var i=(this.oldInstances.pop()||e("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});return e.fn.bgiframe&&i.bgiframe(),this.instances.push(i),i},destroy:function(t){var i=e.inArray(t,this.instances);-1!=i&&this.oldInstances.push(this.instances.splice(i,1)[0]),0===this.instances.length&&e([document,window]).unbind(".dialog-overlay"),t.remove();var n=0;e.each(this.instances,function(){n=Math.max(n,this.css("z-index"))}),this.maxZ=n},height:function(){var t,i;return e.browser.msie&&e.browser.version<7?(t=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),i=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight),i>t?e(window).height()+"px":t+"px"):e(document).height()+"px"},width:function(){var t,i;return e.browser.msie?(t=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),i=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth),i>t?e(window).width()+"px":t+"px"):e(document).width()+"px"},resize:function(){var t=e([]);e.each(e.ui.dialog.overlay.instances,function(){t=t.add(this)}),t.css({width:0,height:0}).css({width:e.ui.dialog.overlay.width(),height:e.ui.dialog.overlay.height()})}}),e.extend(e.ui.dialog.overlay.prototype,{destroy:function(){e.ui.dialog.overlay.destroy(this.$el)}})}(jQuery),/*
 * jQuery UI Position 1.8.18
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Position
 */
function(e){e.ui=e.ui||{};var t=/left|center|right/,i=/top|center|bottom/,n="center",s={},o=e.fn.position,r=e.fn.offset;e.fn.position=function(r){if(!r||!r.of)return o.apply(this,arguments);r=e.extend({},r);var a,l,c,u=e(r.of),h=u[0],d=(r.collision||"flip").split(" "),p=r.offset?r.offset.split(" "):[0,0];return 9===h.nodeType?(a=u.width(),l=u.height(),c={top:0,left:0}):h.setTimeout?(a=u.width(),l=u.height(),c={top:u.scrollTop(),left:u.scrollLeft()}):h.preventDefault?(r.at="left top",a=l=0,c={top:r.of.pageY,left:r.of.pageX}):(a=u.outerWidth(),l=u.outerHeight(),c=u.offset()),e.each(["my","at"],function(){var e=(r[this]||"").split(" ");1===e.length&&(e=t.test(e[0])?e.concat([n]):i.test(e[0])?[n].concat(e):[n,n]),e[0]=t.test(e[0])?e[0]:n,e[1]=i.test(e[1])?e[1]:n,r[this]=e}),1===d.length&&(d[1]=d[0]),p[0]=parseInt(p[0],10)||0,1===p.length&&(p[1]=p[0]),p[1]=parseInt(p[1],10)||0,"right"===r.at[0]?c.left+=a:r.at[0]===n&&(c.left+=a/2),"bottom"===r.at[1]?c.top+=l:r.at[1]===n&&(c.top+=l/2),c.left+=p[0],c.top+=p[1],this.each(function(){var t,i=e(this),o=i.outerWidth(),u=i.outerHeight(),h=parseInt(e.curCSS(this,"marginLeft",!0))||0,f=parseInt(e.curCSS(this,"marginTop",!0))||0,m=o+h+(parseInt(e.curCSS(this,"marginRight",!0))||0),g=u+f+(parseInt(e.curCSS(this,"marginBottom",!0))||0),v=e.extend({},c);"right"===r.my[0]?v.left-=o:r.my[0]===n&&(v.left-=o/2),"bottom"===r.my[1]?v.top-=u:r.my[1]===n&&(v.top-=u/2),s.fractions||(v.left=Math.round(v.left),v.top=Math.round(v.top)),t={left:v.left-h,top:v.top-f},e.each(["left","top"],function(i,n){e.ui.position[d[i]]&&e.ui.position[d[i]][n](v,{targetWidth:a,targetHeight:l,elemWidth:o,elemHeight:u,collisionPosition:t,collisionWidth:m,collisionHeight:g,offset:p,my:r.my,at:r.at})}),e.fn.bgiframe&&i.bgiframe(),i.offset(e.extend(v,{using:r.using}))})},e.ui.position={fit:{left:function(t,i){var n=e(window),s=i.collisionPosition.left+i.collisionWidth-n.width()-n.scrollLeft();t.left=s>0?t.left-s:Math.max(t.left-i.collisionPosition.left,t.left)},top:function(t,i){var n=e(window),s=i.collisionPosition.top+i.collisionHeight-n.height()-n.scrollTop();t.top=s>0?t.top-s:Math.max(t.top-i.collisionPosition.top,t.top)}},flip:{left:function(t,i){if(i.at[0]!==n){var s=e(window),o=i.collisionPosition.left+i.collisionWidth-s.width()-s.scrollLeft(),r="left"===i.my[0]?-i.elemWidth:"right"===i.my[0]?i.elemWidth:0,a="left"===i.at[0]?i.targetWidth:-i.targetWidth,l=-2*i.offset[0];t.left+=i.collisionPosition.left<0?r+a+l:o>0?r+a+l:0}},top:function(t,i){if(i.at[1]!==n){var s=e(window),o=i.collisionPosition.top+i.collisionHeight-s.height()-s.scrollTop(),r="top"===i.my[1]?-i.elemHeight:"bottom"===i.my[1]?i.elemHeight:0,a="top"===i.at[1]?i.targetHeight:-i.targetHeight,l=-2*i.offset[1];t.top+=i.collisionPosition.top<0?r+a+l:o>0?r+a+l:0}}}},e.offset.setOffset||(e.offset.setOffset=function(t,i){/static/.test(e.curCSS(t,"position"))&&(t.style.position="relative");var n=e(t),s=n.offset(),o=parseInt(e.curCSS(t,"top",!0),10)||0,r=parseInt(e.curCSS(t,"left",!0),10)||0,a={top:i.top-s.top+o,left:i.left-s.left+r};"using"in i?i.using.call(t,a):n.css(a)},e.fn.offset=function(t){var i=this[0];return i&&i.ownerDocument?t?this.each(function(){e.offset.setOffset(this,t)}):r.call(this):null}),function(){var t,i,n,o,r,a=document.getElementsByTagName("body")[0],l=document.createElement("div");t=document.createElement(a?"div":"body"),n={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},a&&e.extend(n,{position:"absolute",left:"-1000px",top:"-1000px"});for(var c in n)t.style[c]=n[c];t.appendChild(l),i=a||document.documentElement,i.insertBefore(t,i.firstChild),l.style.cssText="position: absolute; left: 10.7432222px; top: 10.432325px; height: 30px; width: 201px;",o=e(l).offset(function(e,t){return t}).offset(),t.innerHTML="",i.removeChild(t),r=o.top+o.left+(a?2e3:0),s.fractions=r>21&&22>r}()}(jQuery),/*
 * jQuery UI Progressbar 1.8.18
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Progressbar
 *
 * Depends:
 *   jquery.ui.core.js
 *   jquery.ui.widget.js
 */
function(e,t){e.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()}),this.valueDiv=e("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this.oldValue=this._value(),this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove(),e.Widget.prototype.destroy.apply(this,arguments)},value:function(e){return e===t?this._value():(this._setOption("value",e),this)},_setOption:function(t,i){"value"===t&&(this.options.value=i,this._refreshValue(),this._value()===this.options.max&&this._trigger("complete")),e.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var e=this.options.value;return"number"!=typeof e&&(e=0),Math.min(this.options.max,Math.max(this.min,e))},_percentage:function(){return 100*this._value()/this.options.max},_refreshValue:function(){var e=this.value(),t=this._percentage();this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),this.valueDiv.toggle(e>this.min).toggleClass("ui-corner-right",e===this.options.max).width(t.toFixed(0)+"%"),this.element.attr("aria-valuenow",e)}}),e.extend(e.ui.progressbar,{version:"1.8.18"})}(jQuery),/*
 * jQuery UI Slider 1.8.18
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Slider
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.mouse.js
 *	jquery.ui.widget.js
 */
function(e){var t=5;e.widget("ui.slider",e.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 i=this,n=this.options,s=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),o="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",r=n.values&&n.values.length||1,a=[];this._keySliding=!1,this._mouseSliding=!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"+(n.disabled?" ui-slider-disabled ui-disabled":"")),this.range=e([]),n.range&&(n.range===!0&&(n.values||(n.values=[this._valueMin(),this._valueMin()]),n.values.length&&2!==n.values.length&&(n.values=[n.values[0],n.values[0]])),this.range=e("<div></div>").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+("min"===n.range||"max"===n.range?" ui-slider-range-"+n.range:"")));for(var l=s.length;r>l;l+=1)a.push(o);this.handles=s.add(e(a.join("")).appendTo(i.element)),this.handle=this.handles.eq(0),this.handles.add(this.range).filter("a").click(function(e){e.preventDefault()}).hover(function(){n.disabled||e(this).addClass("ui-state-hover")},function(){e(this).removeClass("ui-state-hover")}).focus(function(){n.disabled?e(this).blur():(e(".ui-slider .ui-state-focus").removeClass("ui-state-focus"),e(this).addClass("ui-state-focus"))}).blur(function(){e(this).removeClass("ui-state-focus")}),this.handles.each(function(t){e(this).data("index.ui-slider-handle",t)}),this.handles.keydown(function(n){var s,o,r,a,l=e(this).data("index.ui-slider-handle");if(!i.options.disabled){switch(n.keyCode){case e.ui.keyCode.HOME:case e.ui.keyCode.END:case e.ui.keyCode.PAGE_UP:case e.ui.keyCode.PAGE_DOWN:case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(n.preventDefault(),!i._keySliding&&(i._keySliding=!0,e(this).addClass("ui-state-active"),s=i._start(n,l),s===!1))return}switch(a=i.options.step,o=r=i.options.values&&i.options.values.length?i.values(l):i.value(),n.keyCode){case e.ui.keyCode.HOME:r=i._valueMin();break;case e.ui.keyCode.END:r=i._valueMax();break;case e.ui.keyCode.PAGE_UP:r=i._trimAlignValue(o+(i._valueMax()-i._valueMin())/t);break;case e.ui.keyCode.PAGE_DOWN:r=i._trimAlignValue(o-(i._valueMax()-i._valueMin())/t);break;case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:if(o===i._valueMax())return;r=i._trimAlignValue(o+a);break;case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(o===i._valueMin())return;r=i._trimAlignValue(o-a)}i._slide(n,l,r)}}).keyup(function(t){var n=e(this).data("index.ui-slider-handle");i._keySliding&&(i._keySliding=!1,i._stop(t,n),i._change(t,n),e(this).removeClass("ui-state-active"))}),this._refreshValue(),this._animateOff=!1},destroy:function(){return 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(),this},_mouseCapture:function(t){var i,n,s,o,r,a,l,c,u,h=this.options;return h.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:t.pageX,y:t.pageY},n=this._normValueFromMouse(i),s=this._valueMax()-this._valueMin()+1,r=this,this.handles.each(function(t){var i=Math.abs(n-r.values(t));s>i&&(s=i,o=e(this),a=t)}),h.range===!0&&this.values(1)===h.min&&(a+=1,o=e(this.handles[a])),l=this._start(t,a),l===!1?!1:(this._mouseSliding=!0,r._handleIndex=a,o.addClass("ui-state-active").focus(),c=o.offset(),u=!e(t.target).parents().andSelf().is(".ui-slider-handle"),this._clickOffset=u?{left:0,top:0}:{left:t.pageX-c.left-o.width()/2,top:t.pageY-c.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,a,n),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(e){var t={x:e.pageX,y:e.pageY},i=this._normValueFromMouse(t);return this._slide(e,this._handleIndex,i),!1},_mouseStop:function(e){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(e){var t,i,n,s,o;return"horizontal"===this.orientation?(t=this.elementSize.width,i=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,i=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),n=i/t,n>1&&(n=1),0>n&&(n=0),"vertical"===this.orientation&&(n=1-n),s=this._valueMax()-this._valueMin(),o=this._valueMin()+n*s,this._trimAlignValue(o)},_start:function(e,t){var i={handle:this.handles[t],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("start",e,i)},_slide:function(e,t,i){var n,s,o;this.options.values&&this.options.values.length?(n=this.values(t?0:1),2===this.options.values.length&&this.options.range===!0&&(0===t&&i>n||1===t&&n>i)&&(i=n),i!==this.values(t)&&(s=this.values(),s[t]=i,o=this._trigger("slide",e,{handle:this.handles[t],value:i,values:s}),n=this.values(t?0:1),o!==!1&&this.values(t,i,!0))):i!==this.value()&&(o=this._trigger("slide",e,{handle:this.handles[t],value:i}),o!==!1&&this.value(i))},_stop:function(e,t){var i={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("stop",e,i)},_change:function(e,t){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("change",e,i)}},value:function(e){return arguments.length?(this.options.value=this._trimAlignValue(e),this._refreshValue(),this._change(null,0),void 0):this._value()},values:function(t,i){var n,s,o;if(arguments.length>1)return this.options.values[t]=this._trimAlignValue(i),this._refreshValue(),this._change(null,t),void 0;if(!arguments.length)return this._values();if(!e.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(t):this.value();for(n=this.options.values,s=arguments[0],o=0;o<n.length;o+=1)n[o]=this._trimAlignValue(s[o]),this._change(null,o);this._refreshValue()},_setOption:function(t,i){var n,s=0;switch(e.isArray(this.options.values)&&(s=this.options.values.length),e.Widget.prototype._setOption.apply(this,arguments),t){case"disabled":i?(this.handles.filter(".ui-state-focus").blur(),this.handles.removeClass("ui-state-hover"),this.handles.propAttr("disabled",!0),this.element.addClass("ui-disabled")):(this.handles.propAttr("disabled",!1),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":for(this._animateOff=!0,this._refreshValue(),n=0;s>n;n+=1)this._change(null,n);this._animateOff=!1}},_value:function(){var e=this.options.value;return e=this._trimAlignValue(e)},_values:function(e){var t,i,n;if(arguments.length)return t=this.options.values[e],t=this._trimAlignValue(t);for(i=this.options.values.slice(),n=0;n<i.length;n+=1)i[n]=this._trimAlignValue(i[n]);return i},_trimAlignValue:function(e){if(e<=this._valueMin())return this._valueMin();if(e>=this._valueMax())return this._valueMax();var t=this.options.step>0?this.options.step:1,i=(e-this._valueMin())%t,n=e-i;return 2*Math.abs(i)>=t&&(n+=i>0?t:-t),parseFloat(n.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var t,i,n,s,o,r=this.options.range,a=this.options,l=this,c=this._animateOff?!1:a.animate,u={};this.options.values&&this.options.values.length?this.handles.each(function(n){t=100*((l.values(n)-l._valueMin())/(l._valueMax()-l._valueMin())),u["horizontal"===l.orientation?"left":"bottom"]=t+"%",e(this).stop(1,1)[c?"animate":"css"](u,a.animate),l.options.range===!0&&("horizontal"===l.orientation?(0===n&&l.range.stop(1,1)[c?"animate":"css"]({left:t+"%"},a.animate),1===n&&l.range[c?"animate":"css"]({width:t-i+"%"},{queue:!1,duration:a.animate})):(0===n&&l.range.stop(1,1)[c?"animate":"css"]({bottom:t+"%"},a.animate),1===n&&l.range[c?"animate":"css"]({height:t-i+"%"},{queue:!1,duration:a.animate}))),i=t}):(n=this.value(),s=this._valueMin(),o=this._valueMax(),t=o!==s?100*((n-s)/(o-s)):0,u["horizontal"===l.orientation?"left":"bottom"]=t+"%",this.handle.stop(1,1)[c?"animate":"css"](u,a.animate),"min"===r&&"horizontal"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({width:t+"%"},a.animate),"max"===r&&"horizontal"===this.orientation&&this.range[c?"animate":"css"]({width:100-t+"%"},{queue:!1,duration:a.animate}),"min"===r&&"vertical"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({height:t+"%"},a.animate),"max"===r&&"vertical"===this.orientation&&this.range[c?"animate":"css"]({height:100-t+"%"},{queue:!1,duration:a.animate}))}}),e.extend(e.ui.slider,{version:"1.8.18"})}(jQuery),/*
 * jQuery UI Tabs 1.8.18
 *
 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Tabs
 *
 * Depends:
 *	jquery.ui.core.js
 *	jquery.ui.widget.js
 */
function(e,i){function n(){return++o}function s(){return++r}var o=0,r=0;e.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(e,t){if("selected"==e){if(this.options.collapsible&&t==this.options.selected)return;this.select(t)}else this.options[e]=t,this._tabify()},_tabId:function(e){return e.title&&e.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+n()},_sanitizeSelector:function(e){return e.replace(/:/g,"\\:")},_cookie:function(){var t=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+s());return e.cookie.apply(null,[t].concat(e.makeArray(arguments)))},_ui:function(e,t){return{tab:e,panel:t,index:this.anchors.index(e)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var t=e(this);t.html(t.data("label.tabs")).removeData("label.tabs")})},_tabify:function(t){function n(t,i){t.css("display",""),!e.support.opacity&&i.opacity&&t[0].style.removeAttribute("filter")}var s=this,o=this.options,r=/^#.+/;this.list=this.element.find("ol,ul").eq(0),this.lis=e(" > li:has(a[href])",this.list),this.anchors=this.lis.map(function(){return e("a",this)[0]}),this.panels=e([]),this.anchors.each(function(t,i){var n,a=e(i).attr("href"),l=a.split("#")[0];if(l&&(l===location.toString().split("#")[0]||(n=e("base")[0])&&l===n.href)&&(a=i.hash,i.href=a),r.test(a))s.panels=s.panels.add(s.element.find(s._sanitizeSelector(a)));else if(a&&"#"!==a){e.data(i,"href.tabs",a),e.data(i,"load.tabs",a.replace(/#.*$/,""));var c=s._tabId(i);i.href="#"+c;var u=s.element.find("#"+c);u.length||(u=e(o.panelTemplate).attr("id",c).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(s.panels[t-1]||s.list),u.data("destroy.tabs",!0)),s.panels=s.panels.add(u)}else o.disabled.push(t)}),t?(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"),o.selected===i?(location.hash&&this.anchors.each(function(e,t){return t.hash==location.hash?(o.selected=e,!1):void 0}),"number"!=typeof o.selected&&o.cookie&&(o.selected=parseInt(s._cookie(),10)),"number"!=typeof o.selected&&this.lis.filter(".ui-tabs-selected").length&&(o.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))),o.selected=o.selected||(this.lis.length?0:-1)):null===o.selected&&(o.selected=-1),o.selected=o.selected>=0&&this.anchors[o.selected]||o.selected<0?o.selected:0,o.disabled=e.unique(o.disabled.concat(e.map(this.lis.filter(".ui-state-disabled"),function(e){return s.lis.index(e)}))).sort(),-1!=e.inArray(o.selected,o.disabled)&&o.disabled.splice(e.inArray(o.selected,o.disabled),1),this.panels.addClass("ui-tabs-hide"),this.lis.removeClass("ui-tabs-selected ui-state-active"),o.selected>=0&&this.anchors.length&&(s.element.find(s._sanitizeSelector(s.anchors[o.selected].hash)).removeClass("ui-tabs-hide"),this.lis.eq(o.selected).addClass("ui-tabs-selected ui-state-active"),s.element.queue("tabs",function(){s._trigger("show",null,s._ui(s.anchors[o.selected],s.element.find(s._sanitizeSelector(s.anchors[o.selected].hash))[0]))}),this.load(o.selected)),e(window).bind("unload",function(){s.lis.add(s.anchors).unbind(".tabs"),s.lis=s.anchors=s.panels=null})):o.selected=this.lis.index(this.lis.filter(".ui-tabs-selected")),this.element[o.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible"),o.cookie&&this._cookie(o.selected,o.cookie);for(var a,l=0;a=this.lis[l];l++)e(a)[-1==e.inArray(l,o.disabled)||e(a).hasClass("ui-tabs-selected")?"removeClass":"addClass"]("ui-state-disabled");if(o.cache===!1&&this.anchors.removeData("cache.tabs"),this.lis.add(this.anchors).unbind(".tabs"),"mouseover"!==o.event){var c=function(e,t){t.is(":not(.ui-state-disabled)")&&t.addClass("ui-state-"+e)},u=function(e,t){t.removeClass("ui-state-"+e)};this.lis.bind("mouseover.tabs",function(){c("hover",e(this))}),this.lis.bind("mouseout.tabs",function(){u("hover",e(this))}),this.anchors.bind("focus.tabs",function(){c("focus",e(this).closest("li"))}),this.anchors.bind("blur.tabs",function(){u("focus",e(this).closest("li"))})}var h,d;o.fx&&(e.isArray(o.fx)?(h=o.fx[0],d=o.fx[1]):h=d=o.fx);var p=d?function(t,i){e(t).closest("li").addClass("ui-tabs-selected ui-state-active"),i.hide().removeClass("ui-tabs-hide").animate(d,d.duration||"normal",function(){n(i,d),s._trigger("show",null,s._ui(t,i[0]))})}:function(t,i){e(t).closest("li").addClass("ui-tabs-selected ui-state-active"),i.removeClass("ui-tabs-hide"),s._trigger("show",null,s._ui(t,i[0]))},f=h?function(e,t){t.animate(h,h.duration||"normal",function(){s.lis.removeClass("ui-tabs-selected ui-state-active"),t.addClass("ui-tabs-hide"),n(t,h),s.element.dequeue("tabs")})}:function(e,t){s.lis.removeClass("ui-tabs-selected ui-state-active"),t.addClass("ui-tabs-hide"),s.element.dequeue("tabs")};this.anchors.bind(o.event+".tabs",function(){var t=this,i=e(t).closest("li"),n=s.panels.filter(":not(.ui-tabs-hide)"),r=s.element.find(s._sanitizeSelector(t.hash));if(i.hasClass("ui-tabs-selected")&&!o.collapsible||i.hasClass("ui-state-disabled")||i.hasClass("ui-state-processing")||s.panels.filter(":animated").length||s._trigger("select",null,s._ui(this,r[0]))===!1)return this.blur(),!1;if(o.selected=s.anchors.index(this),s.abort(),o.collapsible){if(i.hasClass("ui-tabs-selected"))return o.selected=-1,o.cookie&&s._cookie(o.selected,o.cookie),s.element.queue("tabs",function(){f(t,n)}).dequeue("tabs"),this.blur(),!1;if(!n.length)return o.cookie&&s._cookie(o.selected,o.cookie),s.element.queue("tabs",function(){p(t,r)}),s.load(s.anchors.index(this)),this.blur(),!1}if(o.cookie&&s._cookie(o.selected,o.cookie),!r.length)throw"jQuery UI Tabs: Mismatching fragment identifier.";n.length&&s.element.queue("tabs",function(){f(t,n)}),s.element.queue("tabs",function(){p(t,r)}),s.load(s.anchors.index(this)),e.browser.msie&&this.blur()}),this.anchors.bind("click.tabs",function(){return!1})},_getIndex:function(e){return"string"==typeof e&&(e=this.anchors.index(this.anchors.filter("[href$="+e+"]"))),e},destroy:function(){var t=this.options;return 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 t=e.data(this,"href.tabs");t&&(this.href=t);var i=e(this).unbind(".tabs");e.each(["href","load","cache"],function(e,t){i.removeData(t+".tabs")})}),this.lis.unbind(".tabs").add(this.panels).each(function(){e.data(this,"destroy.tabs")?e(this).remove():e(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))}),t.cookie&&this._cookie(null,t.cookie),this},add:function(t,n,s){s===i&&(s=this.anchors.length);var o=this,r=this.options,a=e(r.tabTemplate.replace(/#\{href\}/g,t).replace(/#\{label\}/g,n)),l=t.indexOf("#")?this._tabId(e("a",a)[0]):t.replace("#","");a.addClass("ui-state-default ui-corner-top").data("destroy.tabs",!0);var c=o.element.find("#"+l);return c.length||(c=e(r.panelTemplate).attr("id",l).data("destroy.tabs",!0)),c.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide"),s>=this.lis.length?(a.appendTo(this.list),c.appendTo(this.list[0].parentNode)):(a.insertBefore(this.lis[s]),c.insertBefore(this.panels[s])),r.disabled=e.map(r.disabled,function(e){return e>=s?++e:e}),this._tabify(),1==this.anchors.length&&(r.selected=0,a.addClass("ui-tabs-selected ui-state-active"),c.removeClass("ui-tabs-hide"),this.element.queue("tabs",function(){o._trigger("show",null,o._ui(o.anchors[0],o.panels[0]))}),this.load(0)),this._trigger("add",null,this._ui(this.anchors[s],this.panels[s])),this},remove:function(t){t=this._getIndex(t);var i=this.options,n=this.lis.eq(t).remove(),s=this.panels.eq(t).remove();return n.hasClass("ui-tabs-selected")&&this.anchors.length>1&&this.select(t+(t+1<this.anchors.length?1:-1)),i.disabled=e.map(e.grep(i.disabled,function(e){return e!=t}),function(e){return e>=t?--e:e}),this._tabify(),this._trigger("remove",null,this._ui(n.find("a")[0],s[0])),this},enable:function(t){t=this._getIndex(t);var i=this.options;if(-1!=e.inArray(t,i.disabled))return this.lis.eq(t).removeClass("ui-state-disabled"),i.disabled=e.grep(i.disabled,function(e){return e!=t}),this._trigger("enable",null,this._ui(this.anchors[t],this.panels[t])),this},disable:function(e){e=this._getIndex(e);var t=this.options;return e!=t.selected&&(this.lis.eq(e).addClass("ui-state-disabled"),t.disabled.push(e),t.disabled.sort(),this._trigger("disable",null,this._ui(this.anchors[e],this.panels[e]))),this},select:function(e){if(e=this._getIndex(e),-1==e){if(!this.options.collapsible||-1==this.options.selected)return this;e=this.options.selected}return this.anchors.eq(e).trigger(this.options.event+".tabs"),this},load:function(t){t=this._getIndex(t);var i=this,n=this.options,s=this.anchors.eq(t)[0],o=e.data(s,"load.tabs");if(this.abort(),!o||0!==this.element.queue("tabs").length&&e.data(s,"cache.tabs"))return this.element.dequeue("tabs"),void 0;if(this.lis.eq(t).addClass("ui-state-processing"),n.spinner){var r=e("span",s);r.data("label.tabs",r.html()).html(n.spinner)}return this.xhr=e.ajax(e.extend({},n.ajaxOptions,{url:o,success:function(o,r){i.element.find(i._sanitizeSelector(s.hash)).html(o),i._cleanup(),n.cache&&e.data(s,"cache.tabs",!0),i._trigger("load",null,i._ui(i.anchors[t],i.panels[t]));try{n.ajaxOptions.success(o,r)}catch(a){}},error:function(e,o){i._cleanup(),i._trigger("load",null,i._ui(i.anchors[t],i.panels[t]));try{n.ajaxOptions.error(e,o,t,s)}catch(r){}}})),i.element.dequeue("tabs"),this},abort:function(){return 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(),this},url:function(e,t){return this.anchors.eq(e).removeData("cache.tabs").data("load.tabs",t),this},length:function(){return this.anchors.length}}),e.extend(e.ui.tabs,{version:"1.8.18"}),e.extend(e.ui.tabs.prototype,{rotation:null,rotate:function(e,i){var n=this,s=this.options,o=n._rotate||(n._rotate=function(t){clearTimeout(n.rotation),n.rotation=setTimeout(function(){var e=s.selected;n.select(++e<n.anchors.length?e:0)},e),t&&t.stopPropagation()}),r=n._unrotate||(n._unrotate=i?function(){t=s.selected,o()}:function(e){e.clientX&&n.rotate(null)});return e?(this.element.bind("tabsshow",o),this.anchors.bind(s.event+".tabs",r),o()):(clearTimeout(n.rotation),this.element.unbind("tabsshow",o),this.anchors.unbind(s.event+".tabs",r),delete this._rotate,delete this._unrotate),this}})}(jQuery);