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

