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