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