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