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