jQuery.ui||(function(C){var I=C.fn.remove,D=C.browser.mozilla&&(parseFloat(C.browser.version)<1.9);C.ui={version:"1.7.2",plugin:{add:function(K,L,N){var M=C.ui[K].prototype;for(var J in N){M.plugins[J]=M.plugins[J]||[];M.plugins[J].push([L,N[J]])}},call:function(J,L,K){var N=J.plugins[L];if(!N||!J.element[0].parentNode){return }for(var M=0;M<N.length;M++){if(J.options[N[M][0]]){N[M][1].apply(J.element,K)}}}},contains:function(K,J){return document.compareDocumentPosition?K.compareDocumentPosition(J)&16:K!==J&&K.contains(J)},hasScroll:function(M,K){if(C(M).css("overflow")=="hidden"){return false}var J=(K&&K=="left")?"scrollLeft":"scrollTop",L=false;if(M[J]>0){return true}M[J]=1;L=(M[J]>0);M[J]=0;return L},isOverAxis:function(K,J,L){return(K>J)&&(K<(J+L))},isOver:function(O,K,N,M,J,L){return C.ui.isOverAxis(O,N,J)&&C.ui.isOverAxis(K,M,L)},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(D){var F=C.attr,E=C.fn.removeAttr,H="http://www.w3.org/2005/07/aaa",A=/^aria-/,B=/^wairole:/;C.attr=function(K,J,L){var M=L!==undefined;return(J=="role"?(M?F.call(this,K,J,"wairole:"+L):(F.apply(this,arguments)||"").replace(B,"")):(A.test(J)?(M?K.setAttributeNS(H,J.replace(A,"aaa:"),L):F.call(this,K,J.replace(A,"aaa:"))):F.apply(this,arguments)))};C.fn.removeAttr=function(J){return(A.test(J)?this.each(function(){this.removeAttributeNS(H,J.replace(A,""))}):E.call(this,J))}}C.fn.extend({remove:function(){C("*",this).add(this).each(function(){C(this).triggerHandler("remove")});return I.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((C.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){J=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(C.curCSS(this,"position",1))&&(/(auto|scroll)/).test(C.curCSS(this,"overflow",1)+C.curCSS(this,"overflow-y",1)+C.curCSS(this,"overflow-x",1))}).eq(0)}else{J=this.parents().filter(function(){return(/(auto|scroll)/).test(C.curCSS(this,"overflow",1)+C.curCSS(this,"overflow-y",1)+C.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!J.length?C(document):J}});C.extend(C.expr[":"],{data:function(L,K,J){return !!C.data(L,J[3])},focusable:function(K){var L=K.nodeName.toLowerCase(),J=C.attr(K,"tabindex");return(/input|select|textarea|button|object/.test(L)?!K.disabled:"a"==L||"area"==L?K.href||!isNaN(J):!isNaN(J))&&!C(K)["area"==L?"parents":"closest"](":hidden").length},tabbable:function(K){var J=C.attr(K,"tabindex");return(isNaN(J)||J>=0)&&C(K).is(":focusable")}});function G(M,N,O,L){function K(Q){var P=C[M][N][Q]||[];return(typeof P=="string"?P.split(/,?\s+/):P)}var J=K("getter");if(L.length==1&&typeof L[0]=="string"){J=J.concat(K("getterSetter"))}return(C.inArray(O,J)!=-1)}C.widget=function(K,J){var L=K.split(".")[0];K=K.split(".")[1];C.fn[K]=function(P){var N=(typeof P=="string"),O=Array.prototype.slice.call(arguments,1);if(N&&P.substring(0,1)=="_"){return this}if(N&&G(L,K,P,O)){var M=C.data(this[0],K);return(M?M[P].apply(M,O):undefined)}return this.each(function(){var Q=C.data(this,K);(!Q&&!N&&C.data(this,K,new C[L][K](this,P))._init());(Q&&N&&C.isFunction(Q[P])&&Q[P].apply(Q,O))})};C[L]=C[L]||{};C[L][K]=function(O,N){var M=this;this.namespace=L;this.widgetName=K;this.widgetEventPrefix=C[L][K].eventPrefix||K;this.widgetBaseClass=L+"-"+K;this.options=C.extend({},C.widget.defaults,C[L][K].defaults,C.metadata&&C.metadata.get(O)[K],N);this.element=C(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()})};C[L][K].prototype=C.extend({},C.widget.prototype,J);C[L][K].getterSetter="option"};C.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(L,M){var K=L,J=this;if(typeof L=="string"){if(M===undefined){return this._getData(L)}K={};K[L]=M}C.each(K,function(N,O){J._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(L,M,N){var P=this.options[L],J=(L==this.widgetEventPrefix?L:this.widgetEventPrefix+L);M=C.Event(M);M.type=J;if(M.originalEvent){for(var K=C.event.props.length,O;K;){O=C.event.props[--K];M[O]=M.originalEvent[O]}}this.element.trigger(M,N);return !(C.isFunction(P)&&P.call(this.element[0],M,N)===false||M.isDefaultPrevented())}};C.widget.defaults={disabled:false};C.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(C.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);(C.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 K=this,M=(L.which==1),J=(typeof this.options.cancel=="string"?C(L.target).parents().add(L.target).filter(this.options.cancel).length:false);if(!M||J||!this._mouseCapture(L)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){K.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 K._mouseMove(N)};this._mouseUpDelegate=function(N){return K._mouseUp(N)};C(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);(C.browser.safari||L.preventDefault());L.originalEvent.mouseHandled=true;return true},_mouseMove:function(J){if(C.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){C(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}};C.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(B){var C=this.options;if(this.helper||C.disabled||A(B.target).is(".ui-resizable-handle")){return false}this.handle=this._getHandle(B);if(!this.handle){return false}return true},_mouseStart:function(B){var C=this.options;this.helper=this._createHelper(B);this._cacheHelperProportions();if(A.ui.ddmanager){A.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};A.extend(this.offset,{click:{left:B.pageX-this.offset.left,top:B.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(B);this.originalPageX=B.pageX;this.originalPageY=B.pageY;if(C.cursorAt){this._adjustOffsetFromHelper(C.cursorAt)}if(C.containment){this._setContainment()}this._trigger("start",B);this._cacheHelperProportions();if(A.ui.ddmanager&&!C.dropBehaviour){A.ui.ddmanager.prepareOffsets(this,B)}this.helper.addClass("ui-draggable-dragging");this._mouseDrag(B,true);return true},_mouseDrag:function(B,D){this.position=this._generatePosition(B);this.positionAbs=this._convertPositionTo("absolute");if(!D){var C=this._uiHash();this._trigger("drag",B,C);this.position=C.position}if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}if(A.ui.ddmanager){A.ui.ddmanager.drag(this,B)}return false},_mouseStop:function(C){var D=false;if(A.ui.ddmanager&&!this.options.dropBehaviour){D=A.ui.ddmanager.drop(this,C)}if(this.dropped){D=this.dropped;this.dropped=false}if((this.options.revert=="invalid"&&!D)||(this.options.revert=="valid"&&D)||this.options.revert===true||(A.isFunction(this.options.revert)&&this.options.revert.call(this.element,D))){var B=this;A(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){B._trigger("stop",C);B._clear()})}else{this._trigger("stop",C);this._clear()}return false},_getHandle:function(B){var C=!this.options.handle||!A(this.options.handle,this.element).length?true:false;A(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==B.target){C=true}});return C},_createHelper:function(C){var D=this.options;var B=A.isFunction(D.helper)?A(D.helper.apply(this.element[0],[C])):(D.helper=="clone"?this.element.clone():this.element);if(!B.parents("body").length){B.appendTo((D.appendTo=="parent"?this.element[0].parentNode:D.appendTo))}if(B[0]!=this.element[0]&&!(/(fixed|absolute)/).test(B.css("position"))){B.css("position","absolute")}return B},_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 E=this.options;if(E.containment=="parent"){E.containment=this.helper[0].parentNode}if(E.containment=="document"||E.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,A(E.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(A(E.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(E.containment)&&E.containment.constructor!=Array){var C=A(E.containment)[0];if(!C){return }var D=A(E.containment).offset();var B=(A(C).css("overflow")!="hidden");this.containment=[D.left+(parseInt(A(C).css("borderLeftWidth"),10)||0)+(parseInt(A(C).css("paddingLeft"),10)||0)-this.margins.left,D.top+(parseInt(A(C).css("borderTopWidth"),10)||0)+(parseInt(A(C).css("paddingTop"),10)||0)-this.margins.top,D.left+(B?Math.max(C.scrollWidth,C.offsetWidth):C.offsetWidth)-(parseInt(A(C).css("borderLeftWidth"),10)||0)-(parseInt(A(C).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,D.top+(B?Math.max(C.scrollHeight,C.offsetHeight):C.offsetHeight)-(parseInt(A(C).css("borderTopWidth"),10)||0)-(parseInt(A(C).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}else{if(E.containment.constructor==Array){this.containment=E.containment}}},_convertPositionTo:function(E,G){if(!G){G=this.position}var C=E=="absolute"?1:-1;var D=this.options,B=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&A.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,F=(/(html|body)/i).test(B[0].tagName);return{top:(G.top+this.offset.relative.top*C+this.offset.parent.top*C-(A.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(F?0:B.scrollTop()))*C)),left:(G.left+this.offset.relative.left*C+this.offset.parent.left*C-(A.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():F?0:B.scrollLeft())*C))}},_generatePosition:function(E){var H=this.options,B=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&A.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,I=(/(html|body)/i).test(B[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var D=E.pageX;var C=E.pageY;if(this.originalPosition){if(this.containment){if(E.pageX-this.offset.click.left<this.containment[0]){D=this.containment[0]+this.offset.click.left}if(E.pageY-this.offset.click.top<this.containment[1]){C=this.containment[1]+this.offset.click.top}if(E.pageX-this.offset.click.left>this.containment[2]){D=this.containment[2]+this.offset.click.left}if(E.pageY-this.offset.click.top>this.containment[3]){C=this.containment[3]+this.offset.click.top}}if(H.grid){var G=this.originalPageY+Math.round((C-this.originalPageY)/H.grid[1])*H.grid[1];C=this.containment?(!(G-this.offset.click.top<this.containment[1]||G-this.offset.click.top>this.containment[3])?G:(!(G-this.offset.click.top<this.containment[1])?G-H.grid[1]:G+H.grid[1])):G;var F=this.originalPageX+Math.round((D-this.originalPageX)/H.grid[0])*H.grid[0];D=this.containment?(!(F-this.offset.click.left<this.containment[0]||F-this.offset.click.left>this.containment[2])?F:(!(F-this.offset.click.left<this.containment[0])?F-H.grid[0]:F+H.grid[0])):F}}return{top:(C-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(A.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(I?0:B.scrollTop())))),left:(D-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(A.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():I?0:B.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,C,D){D=D||this._uiHash();A.ui.plugin.call(this,B,[C,D]);if(B=="drag"){this.positionAbs=this._convertPositionTo("absolute")}return A.widget.prototype._trigger.call(this,B,C,D)},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(C,E){var D=A(this).data("draggable"),F=D.options,B=A.extend({},E,{item:D.element});D.sortables=[];A(F.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",C,B)}})},stop:function(C,E){var D=A(this).data("draggable"),B=A.extend({},E,{item:D.element});A.each(D.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;D.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance._mouseStop(C);this.instance.options.helper=this.instance.options._helper;if(D.options.helper=="original"){this.instance.currentItem.css({top:"auto",left:"auto"})}}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",C,B)}})},drag:function(C,F){var E=A(this).data("draggable"),B=this;var D=function(I){var N=this.offset.click.top,M=this.offset.click.left;var G=this.positionAbs.top,K=this.positionAbs.left;var J=I.height,L=I.width;var O=I.top,H=I.left;return A.ui.isOver(G+N,K+M,O,H,J,L)};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(B).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return F.helper[0]};C.target=this.instance.currentItem[0];this.instance._mouseCapture(C,true);this.instance._mouseStart(C,true,true);this.instance.offset.click.top=E.offset.click.top;this.instance.offset.click.left=E.offset.click.left;this.instance.offset.parent.left-=E.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=E.offset.parent.top-this.instance.offset.parent.top;E._trigger("toSortable",C);E.dropped=this.instance.element;E.currentItem=E.element;this.instance.fromOutside=E}if(this.instance.currentItem){this.instance._mouseDrag(C)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",C,this.instance._uiHash(this.instance));this.instance._mouseStop(C,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}E._trigger("fromSortable",C);E.dropped=false}}})}});A.ui.plugin.add("draggable","cursor",{start:function(C,D){var B=A("body"),E=A(this).data("draggable").options;if(B.css("cursor")){E._cursor=B.css("cursor")}B.css("cursor",E.cursor)},stop:function(B,C){var D=A(this).data("draggable").options;if(D._cursor){A("body").css("cursor",D._cursor)}}});A.ui.plugin.add("draggable","iframeFix",{start:function(B,C){var D=A(this).data("draggable").options;A(D.iframeFix===true?"iframe":D.iframeFix).each(function(){A('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(A(this).offset()).appendTo("body")})},stop:function(B,C){A("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});A.ui.plugin.add("draggable","opacity",{start:function(C,D){var B=A(D.helper),E=A(this).data("draggable").options;if(B.css("opacity")){E._opacity=B.css("opacity")}B.css("opacity",E.opacity)},stop:function(B,C){var D=A(this).data("draggable").options;if(D._opacity){A(C.helper).css("opacity",D._opacity)}}});A.ui.plugin.add("draggable","scroll",{start:function(C,D){var B=A(this).data("draggable");if(B.scrollParent[0]!=document&&B.scrollParent[0].tagName!="HTML"){B.overflowOffset=B.scrollParent.offset()}},drag:function(D,E){var C=A(this).data("draggable"),F=C.options,B=false;if(C.scrollParent[0]!=document&&C.scrollParent[0].tagName!="HTML"){if(!F.axis||F.axis!="x"){if((C.overflowOffset.top+C.scrollParent[0].offsetHeight)-D.pageY<F.scrollSensitivity){C.scrollParent[0].scrollTop=B=C.scrollParent[0].scrollTop+F.scrollSpeed}else{if(D.pageY-C.overflowOffset.top<F.scrollSensitivity){C.scrollParent[0].scrollTop=B=C.scrollParent[0].scrollTop-F.scrollSpeed}}}if(!F.axis||F.axis!="y"){if((C.overflowOffset.left+C.scrollParent[0].offsetWidth)-D.pageX<F.scrollSensitivity){C.scrollParent[0].scrollLeft=B=C.scrollParent[0].scrollLeft+F.scrollSpeed}else{if(D.pageX-C.overflowOffset.left<F.scrollSensitivity){C.scrollParent[0].scrollLeft=B=C.scrollParent[0].scrollLeft-F.scrollSpeed}}}}else{if(!F.axis||F.axis!="x"){if(D.pageY-A(document).scrollTop()<F.scrollSensitivity){B=A(document).scrollTop(A(document).scrollTop()-F.scrollSpeed)}else{if(A(window).height()-(D.pageY-A(document).scrollTop())<F.scrollSensitivity){B=A(document).scrollTop(A(document).scrollTop()+F.scrollSpeed)}}}if(!F.axis||F.axis!="y"){if(D.pageX-A(document).scrollLeft()<F.scrollSensitivity){B=A(document).scrollLeft(A(document).scrollLeft()-F.scrollSpeed)}else{if(A(window).width()-(D.pageX-A(document).scrollLeft())<F.scrollSensitivity){B=A(document).scrollLeft(A(document).scrollLeft()+F.scrollSpeed)}}}}if(B!==false&&A.ui.ddmanager&&!F.dropBehaviour){A.ui.ddmanager.prepareOffsets(C,D)}}});A.ui.plugin.add("draggable","snap",{start:function(C,D){var B=A(this).data("draggable"),E=B.options;B.snapElements=[];A(E.snap.constructor!=String?(E.snap.items||":data(draggable)"):E.snap).each(function(){var G=A(this);var F=G.offset();if(this!=B.element[0]){B.snapElements.push({item:this,width:G.outerWidth(),height:G.outerHeight(),top:F.top,left:F.left})}})},drag:function(N,K){var E=A(this).data("draggable"),L=E.options;var R=L.snapTolerance;var Q=K.offset.left,P=Q+E.helperProportions.width,D=K.offset.top,C=D+E.helperProportions.height;for(var O=E.snapElements.length-1;O>=0;O--){var M=E.snapElements[O].left,J=M+E.snapElements[O].width,I=E.snapElements[O].top,T=I+E.snapElements[O].height;if(!((M-R<Q&&Q<J+R&&I-R<D&&D<T+R)||(M-R<Q&&Q<J+R&&I-R<C&&C<T+R)||(M-R<P&&P<J+R&&I-R<D&&D<T+R)||(M-R<P&&P<J+R&&I-R<C&&C<T+R))){if(E.snapElements[O].snapping){(E.options.snap.release&&E.options.snap.release.call(E.element,N,A.extend(E._uiHash(),{snapItem:E.snapElements[O].item})))}E.snapElements[O].snapping=false;continue}if(L.snapMode!="inner"){var B=Math.abs(I-C)<=R;var S=Math.abs(T-D)<=R;var G=Math.abs(M-P)<=R;var H=Math.abs(J-Q)<=R;if(B){K.position.top=E._convertPositionTo("relative",{top:I-E.helperProportions.height,left:0}).top-E.margins.top}if(S){K.position.top=E._convertPositionTo("relative",{top:T,left:0}).top-E.margins.top}if(G){K.position.left=E._convertPositionTo("relative",{top:0,left:M-E.helperProportions.width}).left-E.margins.left}if(H){K.position.left=E._convertPositionTo("relative",{top:0,left:J}).left-E.margins.left}}var F=(B||S||G||H);if(L.snapMode!="outer"){var B=Math.abs(I-D)<=R;var S=Math.abs(T-C)<=R;var G=Math.abs(M-Q)<=R;var H=Math.abs(J-P)<=R;if(B){K.position.top=E._convertPositionTo("relative",{top:I,left:0}).top-E.margins.top}if(S){K.position.top=E._convertPositionTo("relative",{top:T-E.helperProportions.height,left:0}).top-E.margins.top}if(G){K.position.left=E._convertPositionTo("relative",{top:0,left:M}).left-E.margins.left}if(H){K.position.left=E._convertPositionTo("relative",{top:0,left:J-E.helperProportions.width}).left-E.margins.left}}if(!E.snapElements[O].snapping&&(B||S||G||H||F)){(E.options.snap.snap&&E.options.snap.snap.call(E.element,N,A.extend(E._uiHash(),{snapItem:E.snapElements[O].item})))}E.snapElements[O].snapping=(B||S||G||H||F)}}});A.ui.plugin.add("draggable","stack",{start:function(B,C){var E=A(this).data("draggable").options;var D=A.makeArray(A(E.stack.group)).sort(function(G,F){return(parseInt(A(G).css("zIndex"),10)||E.stack.min)-(parseInt(A(F).css("zIndex"),10)||E.stack.min)});A(D).each(function(F){this.style.zIndex=E.stack.min+F});this[0].style.zIndex=E.stack.min+D.length}});A.ui.plugin.add("draggable","zIndex",{start:function(C,D){var B=A(D.helper),E=A(this).data("draggable").options;if(B.css("zIndex")){E._zIndex=B.css("zIndex")}B.css("zIndex",E.zIndex)},stop:function(B,C){var D=A(this).data("draggable").options;if(D._zIndex){A(C.helper).css("zIndex",D._zIndex)}}})})(jQuery);(function(A){A.widget("ui.droppable",{_init:function(){var C=this.options,B=C.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(B)};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 B=A.ui.ddmanager.droppables[this.options.scope];for(var C=0;C<B.length;C++){if(B[C]==this){B.splice(C,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(C,D){var B=D||A.ui.ddmanager.current;if(!B||(B.currentItem||B.element)[0]==this.element[0]){return false}var E=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(B,A.extend(F,{offset:F.element.offset()}),F.options.tolerance)){E=true;return false}});if(E){return false}if(this.options.accept.call(this.element[0],(B.currentItem||B.element))){if(this.options.activeClass){this.element.removeClass(this.options.activeClass)}if(this.options.hoverClass){this.element.removeClass(this.options.hoverClass)}this._trigger("drop",C,this.ui(B));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(O,I,M){if(!I.offset){return false}var D=(O.positionAbs||O.position.absolute).left,C=D+O.helperProportions.width,L=(O.positionAbs||O.position.absolute).top,K=L+O.helperProportions.height;var F=I.offset.left,B=F+I.proportions.width,N=I.offset.top,J=N+I.proportions.height;switch(M){case"fit":return(F<D&&C<B&&N<L&&K<J);break;case"intersect":return(F<D+(O.helperProportions.width/2)&&C-(O.helperProportions.width/2)<B&&N<L+(O.helperProportions.height/2)&&K-(O.helperProportions.height/2)<J);break;case"pointer":var G=((O.positionAbs||O.position.absolute).left+(O.clickOffset||O.offset.click).left),H=((O.positionAbs||O.position.absolute).top+(O.clickOffset||O.offset.click).top),E=A.ui.isOver(H,G,N,F,I.proportions.height,I.proportions.width);return E;break;case"touch":return((L>=N&&L<=J)||(K>=N&&K<=J)||(L<N&&K>J))&&((D>=F&&D<=B)||(C>=F&&C<=B)||(D<F&&C>B));break;default:return false;break}};A.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(E,G){var B=A.ui.ddmanager.droppables[E.options.scope];var F=G?G.type:null;var H=(E.currentItem||E.element).find(":data(droppable)").andSelf();droppablesLoop:for(var D=0;D<B.length;D++){if(B[D].options.disabled||(E&&!B[D].options.accept.call(B[D].element[0],(E.currentItem||E.element)))){continue}for(var C=0;C<H.length;C++){if(H[C]==B[D].element[0]){B[D].proportions.height=0;continue droppablesLoop}}B[D].visible=B[D].element.css("display")!="none";if(!B[D].visible){continue}B[D].offset=B[D].element.offset();B[D].proportions={width:B[D].element[0].offsetWidth,height:B[D].element[0].offsetHeight};if(F=="mousedown"){B[D]._activate.call(B[D],G)}}},drop:function(B,C){var D=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)){D=this._drop.call(this,C)}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,C)}});return D},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 E=A.ui.intersect(B,this,this.options.tolerance);var G=!E&&this.isover==1?"isout":(E&&this.isover==0?"isover":null);if(!G){return }var F;if(this.options.greedy){var D=this.element.parents(":data(droppable):eq(0)");if(D.length){F=A.data(D[0],"droppable");F.greedyChild=(G=="isover"?1:0)}}if(F&&G=="isover"){F.isover=0;F.isout=1;F._out.call(F,C)}this[G]=1;this[G=="isout"?"isover":"isout"]=0;this[G=="isover"?"_over":"_out"].call(this,C);if(F&&G=="isout"){F.isout=0;F.isover=1;F._over.call(F,C)}})}}})(jQuery);(function(C){C.widget("ui.resizable",C.extend({},C.ui.mouse,{_init:function(){var E=this,I=this.options;this.element.addClass("ui-resizable");C.extend(this,{_aspectRatio:!!(I.aspectRatio),aspectRatio:I.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:I.helper||I.ghost||I.animate?I.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=I.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 J=this.handles.split(",");this.handles={};for(var F=0;F<J.length;F++){var H=C.trim(J[F]),D="ui-resizable-"+H;var G=C('<div class="ui-resizable-handle '+D+'"></div>');if(/sw|se|ne|nw/.test(H)){G.css({zIndex:++I.zIndex})}if("se"==H){G.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[H]=".ui-resizable-"+H;this.element.append(G)}}this._renderAxis=function(O){O=O||this.element;for(var L in this.handles){if(this.handles[L].constructor==String){this.handles[L]=C(this.handles[L],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var M=C(this.handles[L],this.element),N=0;N=/sw|ne|nw|se|n|s/.test(L)?M.outerHeight():M.outerWidth();var K=["padding",/ne|nw|n/.test(L)?"Top":/se|sw|s/.test(L)?"Bottom":/^e$/.test(L)?"Right":"Left"].join("");O.css(K,N);this._proportionallyResize()}if(!C(this.handles[L]).length){continue}}};this._renderAxis(this.element);this._handles=C(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!E.resizing){if(this.className){var K=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}E.axis=K&&K[1]?K[1]:"se"}});if(I.autoHide){this._handles.hide();C(this.element).addClass("ui-resizable-autohide").hover(function(){C(this).removeClass("ui-resizable-autohide");E._handles.show()},function(){if(!E.resizing){C(this).addClass("ui-resizable-autohide");E._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var D=function(F){C(F).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){D(this.element);var E=this.element;E.parent().append(this.originalElement.css({position:E.css("position"),width:E.outerWidth(),height:E.outerHeight(),top:E.css("top"),left:E.css("left")})).end().remove()}this.originalElement.css("resize",this.originalResizeStyle);D(this.originalElement)},_mouseCapture:function(E){var F=false;for(var D in this.handles){if(C(this.handles[D])[0]==E.target){F=true}}return this.options.disabled||!!F},_mouseStart:function(F){var I=this.options,E=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:E.top,left:E.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")),G=B(this.helper.css("top"));if(I.containment){J+=C(I.containment).scrollLeft()||0;G+=C(I.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:J,top:G};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:G};this.sizeDiff={width:D.outerWidth()-D.width(),height:D.outerHeight()-D.height()};this.originalMousePosition={left:F.pageX,top:F.pageY};this.aspectRatio=(typeof I.aspectRatio=="number")?I.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var H=C(".ui-resizable-"+this.axis).css("cursor");C("body").css("cursor",H=="auto"?this.axis+"-resize":H);D.addClass("ui-resizable-resizing");this._propagate("start",F);return true},_mouseDrag:function(D){var G=this.helper,F=this.options,L={},O=this,I=this.originalMousePosition,M=this.axis;var P=(D.pageX-I.left)||0,N=(D.pageY-I.top)||0;var H=this._change[M];if(!H){return false}var K=H.apply(this,[D,P,N]),J=C.browser.msie&&C.browser.version<7,E=this.sizeDiff;if(this._aspectRatio||D.shiftKey){K=this._updateRatio(K,D)}K=this._respectSize(K,D);this._propagate("resize",D);G.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(K);this._trigger("resize",D,this.ui());return false},_mouseStop:function(G){this.resizing=false;var H=this.options,L=this;if(this._helper){var F=this._proportionallyResizeElements,D=F.length&&(/textarea/i).test(F[0].nodeName),E=D&&C.ui.hasScroll(F[0],"left")?0:L.sizeDiff.height,J=D?0:L.sizeDiff.width;var M={width:(L.size.width-J),height:(L.size.height-E)},I=(parseInt(L.element.css("left"),10)+(L.position.left-L.originalPosition.left))||null,K=(parseInt(L.element.css("top"),10)+(L.position.top-L.originalPosition.top))||null;if(!H.animate){this.element.css(C.extend(M,{top:K,left:I}))}L.helper.height(L.size.height);L.helper.width(L.size.width);if(this._helper&&!H.animate){this._proportionallyResize()}}C("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",G);if(this._helper){this.helper.remove()}return false},_updateCache:function(D){var E=this.options;this.offset=this.helper.offset();if(A(D.left)){this.position.left=D.left}if(A(D.top)){this.position.top=D.top}if(A(D.height)){this.size.height=D.height}if(A(D.width)){this.size.width=D.width}},_updateRatio:function(G,F){var H=this.options,I=this.position,E=this.size,D=this.axis;if(G.height){G.width=(E.height*this.aspectRatio)}else{if(G.width){G.height=(E.width/this.aspectRatio)}}if(D=="sw"){G.left=I.left+(E.width-G.width);G.top=null}if(D=="nw"){G.top=I.top+(E.height-G.height);G.left=I.left+(E.width-G.width)}return G},_respectSize:function(K,F){var I=this.helper,H=this.options,P=this._aspectRatio||F.shiftKey,O=this.axis,R=A(K.width)&&H.maxWidth&&(H.maxWidth<K.width),L=A(K.height)&&H.maxHeight&&(H.maxHeight<K.height),G=A(K.width)&&H.minWidth&&(H.minWidth>K.width),Q=A(K.height)&&H.minHeight&&(H.minHeight>K.height);if(G){K.width=H.minWidth}if(Q){K.height=H.minHeight}if(R){K.width=H.maxWidth}if(L){K.height=H.maxHeight}var E=this.originalPosition.left+this.originalSize.width,N=this.position.top+this.size.height;var J=/sw|nw|w/.test(O),D=/nw|ne|n/.test(O);if(G&&J){K.left=E-H.minWidth}if(R&&J){K.left=E-H.maxWidth}if(Q&&D){K.top=N-H.minHeight}if(L&&D){K.top=N-H.maxHeight}var M=!K.width&&!K.height;if(M&&!K.left&&K.top){K.top=null}else{if(M&&!K.top&&K.left){K.left=null}}return K},_proportionallyResize:function(){var I=this.options;if(!this._proportionallyResizeElements.length){return }var F=this.helper||this.element;for(var E=0;E<this._proportionallyResizeElements.length;E++){var G=this._proportionallyResizeElements[E];if(!this.borderDif){var D=[G.css("borderTopWidth"),G.css("borderRightWidth"),G.css("borderBottomWidth"),G.css("borderLeftWidth")],H=[G.css("paddingTop"),G.css("paddingRight"),G.css("paddingBottom"),G.css("paddingLeft")];this.borderDif=C.map(D,function(J,L){var K=parseInt(J,10)||0,M=parseInt(H[L],10)||0;return K+M})}if(C.browser.msie&&!(!(C(F).is(":hidden")||C(F).parents(":hidden").length))){continue}G.css({height:(F.height()-this.borderDif[0]-this.borderDif[2])||0,width:(F.width()-this.borderDif[1]-this.borderDif[3])||0})}},_renderProxy:function(){var E=this.element,H=this.options;this.elementOffset=E.offset();if(this._helper){this.helper=this.helper||C('<div style="overflow:hidden;"></div>');var D=C.browser.msie&&C.browser.version<7,F=(D?1:0),G=(D?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+G,height:this.element.outerHeight()+G,position:"absolute",left:this.elementOffset.left-F+"px",top:this.elementOffset.top-F+"px",zIndex:++H.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(G,E,D){var I=this.options,F=this.originalSize,H=this.originalPosition;return{left:H.left+E,width:F.width-E}},n:function(G,E,D){var I=this.options,F=this.originalSize,H=this.originalPosition;return{top:H.top+D,height:F.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(E,D){C.ui.plugin.call(this,E,[D,this.ui()]);(E!="resize"&&this._trigger(E,D,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(E,F){var D=C(this).data("resizable"),G=D.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 (G.alsoResize)=="object"&&!G.alsoResize.parentNode){if(G.alsoResize.length){G.alsoResize=G.alsoResize[0];_store(G.alsoResize)}else{C.each(G.alsoResize,function(H,I){_store(H)})}}else{_store(G.alsoResize)}},resize:function(F,H){var E=C(this).data("resizable"),I=E.options,G=E.originalSize,K=E.originalPosition;var J={height:(E.size.height-G.height)||0,width:(E.size.width-G.width)||0,top:(E.position.top-K.top)||0,left:(E.position.left-K.left)||0},D=function(L,M){C(L).each(function(){var P=C(this),Q=C(this).data("resizable-alsoresize"),O={},N=M&&M.length?M:["width","height","top","left"];C.each(N||["width","height","top","left"],function(R,T){var S=(Q[T]||0)+(J[T]||0);if(S&&S>=0){O[T]=S||null}});if(/relative/.test(P.css("position"))&&C.browser.opera){E._revertToRelativePosition=true;P.css({position:"absolute",top:"auto",left:"auto"})}P.css(O)})};if(typeof (I.alsoResize)=="object"&&!I.alsoResize.nodeType){C.each(I.alsoResize,function(L,M){D(L,M)})}else{D(I.alsoResize)}},stop:function(E,F){var D=C(this).data("resizable");if(D._revertToRelativePosition&&C.browser.opera){D._revertToRelativePosition=false;el.css({position:"relative"})}C(this).removeData("resizable-alsoresize-start")}});C.ui.plugin.add("resizable","animate",{stop:function(H,M){var N=C(this).data("resizable"),I=N.options;var G=N._proportionallyResizeElements,D=G.length&&(/textarea/i).test(G[0].nodeName),E=D&&C.ui.hasScroll(G[0],"left")?0:N.sizeDiff.height,K=D?0:N.sizeDiff.width;var F={width:(N.size.width-K),height:(N.size.height-E)},J=(parseInt(N.element.css("left"),10)+(N.position.left-N.originalPosition.left))||null,L=(parseInt(N.element.css("top"),10)+(N.position.top-N.originalPosition.top))||null;N.element.animate(C.extend(F,L&&J?{top:L,left:J}:{}),{duration:I.animateDuration,easing:I.animateEasing,step:function(){var O={width:parseInt(N.element.css("width"),10),height:parseInt(N.element.css("height"),10),top:parseInt(N.element.css("top"),10),left:parseInt(N.element.css("left"),10)};if(G&&G.length){C(G[0]).css({width:O.width,height:O.height})}N._updateCache(O);N._propagate("resize",H)}})}});C.ui.plugin.add("resizable","containment",{start:function(E,O){var Q=C(this).data("resizable"),I=Q.options,K=Q.element;var F=I.containment,J=(F instanceof C)?F.get(0):(/parent/.test(F))?K.parent().get(0):F;if(!J){return }Q.containerElement=C(J);if(/document/.test(F)||F==document){Q.containerOffset={left:0,top:0};Q.containerPosition={left:0,top:0};Q.parentData={element:C(document),left:0,top:0,width:C(document).width(),height:C(document).height()||document.body.parentNode.scrollHeight}}else{var M=C(J),H=[];C(["Top","Right","Left","Bottom"]).each(function(S,R){H[S]=B(M.css("padding"+R))});Q.containerOffset=M.offset();Q.containerPosition=M.position();Q.containerSize={height:(M.innerHeight()-H[3]),width:(M.innerWidth()-H[1])};var N=Q.containerOffset,D=Q.containerSize.height,L=Q.containerSize.width,G=(C.ui.hasScroll(J,"left")?J.scrollWidth:L),P=(C.ui.hasScroll(J)?J.scrollHeight:D);Q.parentData={element:J,left:N.left,top:N.top,width:G,height:P}}},resize:function(F,O){var R=C(this).data("resizable"),H=R.options,E=R.containerSize,N=R.containerOffset,L=R.size,M=R.position,P=R._aspectRatio||F.shiftKey,D={top:0,left:0},G=R.containerElement;if(G[0]!=document&&(/static/).test(G.css("position"))){D=N}if(M.left<(R._helper?N.left:0)){R.size.width=R.size.width+(R._helper?(R.position.left-N.left):(R.position.left-D.left));if(P){R.size.height=R.size.width/H.aspectRatio}R.position.left=H.helper?N.left:0}if(M.top<(R._helper?N.top:0)){R.size.height=R.size.height+(R._helper?(R.position.top-N.top):R.position.top);if(P){R.size.width=R.size.height*H.aspectRatio}R.position.top=R._helper?N.top:0}R.offset.left=R.parentData.left+R.position.left;R.offset.top=R.parentData.top+R.position.top;var K=Math.abs((R._helper?R.offset.left-D.left:(R.offset.left-D.left))+R.sizeDiff.width),Q=Math.abs((R._helper?R.offset.top-D.top:(R.offset.top-N.top))+R.sizeDiff.height);var J=R.containerElement.get(0)==R.element.parent().get(0),I=/relative|absolute/.test(R.containerElement.css("position"));if(J&&I){K-=R.parentData.left}if(K+R.size.width>=R.parentData.width){R.size.width=R.parentData.width-K;if(P){R.size.height=R.size.width/R.aspectRatio}}if(Q+R.size.height>=R.parentData.height){R.size.height=R.parentData.height-Q;if(P){R.size.width=R.size.height*R.aspectRatio}}},stop:function(E,L){var N=C(this).data("resizable"),F=N.options,J=N.position,K=N.containerOffset,D=N.containerPosition,G=N.containerElement;var H=C(N.helper),O=H.offset(),M=H.outerWidth()-N.sizeDiff.width,I=H.outerHeight()-N.sizeDiff.height;if(N._helper&&!F.animate&&(/relative/).test(G.css("position"))){C(this).css({left:O.left-D.left-K.left,width:M,height:I})}if(N._helper&&!F.animate&&(/static/).test(G.css("position"))){C(this).css({left:O.left-D.left-K.left,width:M,height:I})}}});C.ui.plugin.add("resizable","ghost",{start:function(F,G){var D=C(this).data("resizable"),H=D.options,E=D.size;D.ghost=D.originalElement.clone();D.ghost.css({opacity:0.25,display:"block",position:"relative",height:E.height,width:E.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof H.ghost=="string"?H.ghost:"");D.ghost.appendTo(D.helper)},resize:function(E,F){var D=C(this).data("resizable"),G=D.options;if(D.ghost){D.ghost.css({position:"relative",height:D.size.height,width:D.size.width})}},stop:function(E,F){var D=C(this).data("resizable"),G=D.options;if(D.ghost&&D.helper){D.helper.get(0).removeChild(D.ghost.get(0))}}});C.ui.plugin.add("resizable","grid",{resize:function(D,L){var N=C(this).data("resizable"),G=N.options,J=N.size,H=N.originalSize,I=N.originalPosition,M=N.axis,K=G._aspectRatio||D.shiftKey;G.grid=typeof G.grid=="number"?[G.grid,G.grid]:G.grid;var F=Math.round((J.width-H.width)/(G.grid[0]||1))*(G.grid[0]||1),E=Math.round((J.height-H.height)/(G.grid[1]||1))*(G.grid[1]||1);if(/^(se|s|e)$/.test(M)){N.size.width=H.width+F;N.size.height=H.height+E}else{if(/^(ne)$/.test(M)){N.size.width=H.width+F;N.size.height=H.height+E;N.position.top=I.top-E}else{if(/^(sw)$/.test(M)){N.size.width=H.width+F;N.size.height=H.height+E;N.position.left=I.left-F}else{N.size.width=H.width+F;N.size.height=H.height+E;N.position.top=I.top-E;N.position.left=I.left-F}}}}});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(I){var C=this;this.dragged=true;if(this.options.disabled){return }var E=this.options;var D=this.opos[0],H=this.opos[1],B=I.pageX,G=I.pageY;if(D>B){var F=B;B=D;D=F}if(H>G){var F=G;G=H;H=F}this.helper.css({left:D,top:H,width:B-D,height:G-H});this.selectees.each(function(){var J=A.data(this,"selectable-item");if(!J||J.element==C.element[0]){return }var K=false;if(E.tolerance=="touch"){K=(!(J.left>B||J.right<D||J.top>G||J.bottom<H))}else{if(E.tolerance=="fit"){K=(J.left>D&&J.right<B&&J.top>H&&J.bottom<G)}}if(K){if(J.selected){J.$element.removeClass("ui-selected");J.selected=false}if(J.unselecting){J.$element.removeClass("ui-unselecting");J.unselecting=false}if(!J.selecting){J.$element.addClass("ui-selecting");J.selecting=true;C._trigger("selecting",I,{selecting:J.element})}}else{if(J.selecting){if(I.metaKey&&J.startselected){J.$element.removeClass("ui-selecting");J.selecting=false;J.$element.addClass("ui-selected");J.selected=true}else{J.$element.removeClass("ui-selecting");J.selecting=false;if(J.startselected){J.$element.addClass("ui-unselecting");J.unselecting=true}C._trigger("unselecting",I,{unselecting:J.element})}}if(J.selected){if(!I.metaKey&&!J.startselected){J.$element.removeClass("ui-selected");J.selected=false;J.$element.addClass("ui-unselecting");J.unselecting=true;C._trigger("unselecting",I,{unselecting:J.element})}}}});return false},_mouseStop:function(D){var B=this;this.dragged=false;var C=this.options;A(".ui-unselecting",this.element[0]).each(function(){var E=A.data(this,"selectable-item");E.$element.removeClass("ui-unselecting");E.unselecting=false;E.startselected=false;B._trigger("unselected",D,{unselected:E.element})});A(".ui-selecting",this.element[0]).each(function(){var E=A.data(this,"selectable-item");E.$element.removeClass("ui-selecting").addClass("ui-selected");E.selecting=false;E.selected=true;E.startselected=true;B._trigger("selected",D,{selected:E.element})});this._trigger("stop",D);this.helper.remove();return false}}));A.extend(A.ui.selectable,{version:"1.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,F){if(this.reverting){return false}if(this.options.disabled||this.options.type=="static"){return false}this._refreshItems(E);var D=null,C=this,B=A(E.target).parents().each(function(){if(A.data(this,"sortable-item")==C){D=A(this);return false}});if(A.data(E.target,"sortable-item")==C){D=A(E.target)}if(!D){return false}if(this.options.handle&&!F){var G=false;A(this.options.handle,D).find("*").andSelf().each(function(){if(this==E.target){G=true}});if(!G){return false}}this.currentItem=D;this._removeCurrentsFromItems();return true},_mouseStart:function(E,F,B){var G=this.options,C=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(G.cursorAt){this._adjustOffsetFromHelper(G.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(G.containment){this._setContainment()}if(G.cursor){if(A("body").css("cursor")){this._storedCursor=A("body").css("cursor")}A("body").css("cursor",G.cursor)}if(G.opacity){if(this.helper.css("opacity")){this._storedOpacity=this.helper.css("opacity")}this.helper.css("opacity",G.opacity)}if(G.zIndex){if(this.helper.css("zIndex")){this._storedZIndex=this.helper.css("zIndex")}this.helper.css("zIndex",G.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(!B){for(var D=this.containers.length-1;D>=0;D--){this.containers[D]._trigger("activate",E,C._uiHash(this))}}if(A.ui.ddmanager){A.ui.ddmanager.current=this}if(A.ui.ddmanager&&!G.dropBehaviour){A.ui.ddmanager.prepareOffsets(this,E)}this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(E);return true},_mouseDrag:function(F){this.position=this._generatePosition(F);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}if(this.options.scroll){var G=this.options,B=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if((this.overflowOffset.top+this.scrollParent[0].offsetHeight)-F.pageY<G.scrollSensitivity){this.scrollParent[0].scrollTop=B=this.scrollParent[0].scrollTop+G.scrollSpeed}else{if(F.pageY-this.overflowOffset.top<G.scrollSensitivity){this.scrollParent[0].scrollTop=B=this.scrollParent[0].scrollTop-G.scrollSpeed}}if((this.overflowOffset.left+this.scrollParent[0].offsetWidth)-F.pageX<G.scrollSensitivity){this.scrollParent[0].scrollLeft=B=this.scrollParent[0].scrollLeft+G.scrollSpeed}else{if(F.pageX-this.overflowOffset.left<G.scrollSensitivity){this.scrollParent[0].scrollLeft=B=this.scrollParent[0].scrollLeft-G.scrollSpeed}}}else{if(F.pageY-A(document).scrollTop()<G.scrollSensitivity){B=A(document).scrollTop(A(document).scrollTop()-G.scrollSpeed)}else{if(A(window).height()-(F.pageY-A(document).scrollTop())<G.scrollSensitivity){B=A(document).scrollTop(A(document).scrollTop()+G.scrollSpeed)}}if(F.pageX-A(document).scrollLeft()<G.scrollSensitivity){B=A(document).scrollLeft(A(document).scrollLeft()-G.scrollSpeed)}else{if(A(window).width()-(F.pageX-A(document).scrollLeft())<G.scrollSensitivity){B=A(document).scrollLeft(A(document).scrollLeft()+G.scrollSpeed)}}}if(B!==false&&A.ui.ddmanager&&!G.dropBehaviour){A.ui.ddmanager.prepareOffsets(this,F)}}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 D=this.items.length-1;D>=0;D--){var E=this.items[D],C=E.item[0],H=this._intersectsWithPointer(E);if(!H){continue}if(C!=this.currentItem[0]&&this.placeholder[H==1?"next":"prev"]()[0]!=C&&!A.ui.contains(this.placeholder[0],C)&&(this.options.type=="semi-dynamic"?!A.ui.contains(this.element[0],C):true)){this.direction=H==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(E)){this._rearrange(F,E)}else{break}this._trigger("change",F,this._uiHash());break}}this._contactContainers(F);if(A.ui.ddmanager){A.ui.ddmanager.drag(this,F)}this._trigger("sort",F,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(C,D){if(!C){return }if(A.ui.ddmanager&&!this.options.dropBehaviour){A.ui.ddmanager.drop(this,C)}if(this.options.revert){var B=this;var E=B.placeholder.offset();B.reverting=true;A(this.helper).animate({left:E.left-this.offset.parent.left-B.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:E.top-this.offset.parent.top-B.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){B._clear(C)})}else{this._clear(C,D)}return false},cancel:function(){var B=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 C=this.containers.length-1;C>=0;C--){this.containers[C]._trigger("deactivate",null,B._uiHash(this));if(this.containers[C].containerCache.over){this.containers[C]._trigger("out",null,B._uiHash(this));this.containers[C].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(D){var B=this._getItemsAsjQuery(D&&D.connected);var C=[];D=D||{};A(B).each(function(){var E=(A(D.item||this).attr(D.attribute||"id")||"").match(D.expression||(/(.+)[-=_](.+)/));if(E){C.push((D.key||E[1]+"[]")+"="+(D.key&&D.expression?E[1]:E[2]))}});return C.join("&")},toArray:function(D){var B=this._getItemsAsjQuery(D&&D.connected);var C=[];D=D||{};B.each(function(){C.push(A(D.item||this).attr(D.attribute||"id")||"")});return C},_intersectsWith:function(K){var D=this.positionAbs.left,C=D+this.helperProportions.width,J=this.positionAbs.top,I=J+this.helperProportions.height;var E=K.left,B=E+K.width,L=K.top,H=L+K.height;var M=this.offset.click.top,G=this.offset.click.left;var F=(J+M)>L&&(J+M)<H&&(D+G)>E&&(D+G)<B;if(this.options.tolerance=="pointer"||this.options.forcePointerForContainers||(this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>K[this.floating?"width":"height"])){return F}else{return(E<D+(this.helperProportions.width/2)&&C-(this.helperProportions.width/2)<B&&L<J+(this.helperProportions.height/2)&&I-(this.helperProportions.height/2)<H)}},_intersectsWithPointer:function(D){var E=A.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,D.top,D.height),C=A.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,D.left,D.width),G=E&&C,B=this._getDragVerticalDirection(),F=this._getDragHorizontalDirection();if(!G){return false}return this.floating?(((F&&F=="right")||B=="down")?2:1):(B&&(B=="down"?2:1))},_intersectsWithSides:function(E){var C=A.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,E.top+(E.height/2),E.height),D=A.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,E.left+(E.width/2),E.width),B=this._getDragVerticalDirection(),F=this._getDragHorizontalDirection();if(this.floating&&F){return((F=="right"&&D)||(F=="left"&&!D))}else{return B&&((B=="down"&&C)||(B=="up"&&!C))}},_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(B){var J=this;var G=[];var E=[];var H=this._connectWith();if(H&&B){for(var D=H.length-1;D>=0;D--){var I=A(H[D]);for(var C=I.length-1;C>=0;C--){var F=A.data(I[C],"sortable");if(F&&F!=this&&!F.options.disabled){E.push([A.isFunction(F.options.items)?F.options.items.call(F.element):A(F.options.items,F.element).not(".ui-sortable-helper"),F])}}}}E.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 D=E.length-1;D>=0;D--){E[D][0].each(function(){G.push(this)})}return A(G)},_removeCurrentsFromItems:function(){var D=this.currentItem.find(":data(sortable-item)");for(var C=0;C<this.items.length;C++){for(var B=0;B<D.length;B++){if(D[B]==this.items[C].item[0]){this.items.splice(C,1)}}}},_refreshItems:function(B){this.items=[];this.containers=[this];var H=this.items;var N=this;var F=[[A.isFunction(this.options.items)?this.options.items.call(this.element[0],B,{item:this.currentItem}):A(this.options.items,this.element),this]];var J=this._connectWith();if(J){for(var E=J.length-1;E>=0;E--){var K=A(J[E]);for(var D=K.length-1;D>=0;D--){var G=A.data(K[D],"sortable");if(G&&G!=this&&!G.options.disabled){F.push([A.isFunction(G.options.items)?G.options.items.call(G.element[0],B,{item:this.currentItem}):A(G.options.items,G.element),G]);this.containers.push(G)}}}}for(var E=F.length-1;E>=0;E--){var I=F[E][1];var C=F[E][0];for(var D=0,L=C.length;D<L;D++){var M=A(C[D]);M.data("sortable-item",I);H.push({item:M,instance:I,width:0,height:0,left:0,top:0})}}},refreshPositions:function(B){if(this.offsetParent&&this.helper){this.offset.parent=this._getParentOffset()}for(var D=this.items.length-1;D>=0;D--){var E=this.items[D];if(E.instance!=this.currentContainer&&this.currentContainer&&E.item[0]!=this.currentItem[0]){continue}var C=this.options.toleranceElement?A(this.options.toleranceElement,E.item):E.item;if(!B){E.width=C.outerWidth();E.height=C.outerHeight()}var F=C.offset();E.left=F.left;E.top=F.top}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(var D=this.containers.length-1;D>=0;D--){var F=this.containers[D].element.offset();this.containers[D].containerCache.left=F.left;this.containers[D].containerCache.top=F.top;this.containers[D].containerCache.width=this.containers[D].element.outerWidth();this.containers[D].containerCache.height=this.containers[D].element.outerHeight()}}},_createPlaceholder:function(D){var B=D||this,E=B.options;if(!E.placeholder||E.placeholder.constructor==String){var C=E.placeholder;E.placeholder={element:function(){var F=A(document.createElement(B.currentItem[0].nodeName)).addClass(C||B.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!C){F.style.visibility="hidden"}return F},update:function(F,G){if(C&&!E.forcePlaceholderSize){return }if(!G.height()){G.height(B.currentItem.innerHeight()-parseInt(B.currentItem.css("paddingTop")||0,10)-parseInt(B.currentItem.css("paddingBottom")||0,10))}if(!G.width()){G.width(B.currentItem.innerWidth()-parseInt(B.currentItem.css("paddingLeft")||0,10)-parseInt(B.currentItem.css("paddingRight")||0,10))}}}}B.placeholder=A(E.placeholder.element.call(B.element,B.currentItem));B.currentItem.after(B.placeholder);E.placeholder.update(B,B.placeholder)},_contactContainers:function(D){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 H=10000;var G=null;var E=this.positionAbs[this.containers[C].floating?"left":"top"];for(var B=this.items.length-1;B>=0;B--){if(!A.ui.contains(this.containers[C].element[0],this.items[B].item[0])){continue}var F=this.items[B][this.containers[C].floating?"left":"top"];if(Math.abs(F-E)<H){H=Math.abs(F-E);G=this.items[B]}}if(!G&&!this.options.dropOnEmpty){continue}this.currentContainer=this.containers[C];G?this._rearrange(D,G,null,true):this._rearrange(D,null,this.containers[C].element,true);this._trigger("change",D,this._uiHash());this.containers[C]._trigger("change",D,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder)}this.containers[C]._trigger("over",D,this._uiHash(this));this.containers[C].containerCache.over=1}}else{if(this.containers[C].containerCache.over){this.containers[C]._trigger("out",D,this._uiHash(this));this.containers[C].containerCache.over=0}}}},_createHelper:function(C){var D=this.options;var B=A.isFunction(D.helper)?A(D.helper.apply(this.element[0],[C,this.currentItem])):(D.helper=="clone"?this.currentItem.clone():this.currentItem);if(!B.parents("body").length){A(D.appendTo!="parent"?D.appendTo:this.currentItem[0].parentNode)[0].appendChild(B[0])}if(B[0]==this.currentItem[0]){this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}}if(B[0].style.width==""||D.forceHelperSize){B.width(this.currentItem.width())}if(B[0].style.height==""||D.forceHelperSize){B.height(this.currentItem.height())}return B},_adjustOffsetFromHelper:function(B){if(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 E=this.options;if(E.containment=="parent"){E.containment=this.helper[0].parentNode}if(E.containment=="document"||E.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,A(E.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(A(E.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(E.containment)){var C=A(E.containment)[0];var D=A(E.containment).offset();var B=(A(C).css("overflow")!="hidden");this.containment=[D.left+(parseInt(A(C).css("borderLeftWidth"),10)||0)+(parseInt(A(C).css("paddingLeft"),10)||0)-this.margins.left,D.top+(parseInt(A(C).css("borderTopWidth"),10)||0)+(parseInt(A(C).css("paddingTop"),10)||0)-this.margins.top,D.left+(B?Math.max(C.scrollWidth,C.offsetWidth):C.offsetWidth)-(parseInt(A(C).css("borderLeftWidth"),10)||0)-(parseInt(A(C).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,D.top+(B?Math.max(C.scrollHeight,C.offsetHeight):C.offsetHeight)-(parseInt(A(C).css("borderTopWidth"),10)||0)-(parseInt(A(C).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(E,G){if(!G){G=this.position}var C=E=="absolute"?1:-1;var D=this.options,B=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&A.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,F=(/(html|body)/i).test(B[0].tagName);return{top:(G.top+this.offset.relative.top*C+this.offset.parent.top*C-(A.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(F?0:B.scrollTop()))*C)),left:(G.left+this.offset.relative.left*C+this.offset.parent.left*C-(A.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():F?0:B.scrollLeft())*C))}},_generatePosition:function(E){var H=this.options,B=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&A.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,I=(/(html|body)/i).test(B[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var D=E.pageX;var C=E.pageY;if(this.originalPosition){if(this.containment){if(E.pageX-this.offset.click.left<this.containment[0]){D=this.containment[0]+this.offset.click.left}if(E.pageY-this.offset.click.top<this.containment[1]){C=this.containment[1]+this.offset.click.top}if(E.pageX-this.offset.click.left>this.containment[2]){D=this.containment[2]+this.offset.click.left}if(E.pageY-this.offset.click.top>this.containment[3]){C=this.containment[3]+this.offset.click.top}}if(H.grid){var G=this.originalPageY+Math.round((C-this.originalPageY)/H.grid[1])*H.grid[1];C=this.containment?(!(G-this.offset.click.top<this.containment[1]||G-this.offset.click.top>this.containment[3])?G:(!(G-this.offset.click.top<this.containment[1])?G-H.grid[1]:G+H.grid[1])):G;var F=this.originalPageX+Math.round((D-this.originalPageX)/H.grid[0])*H.grid[0];D=this.containment?(!(F-this.offset.click.left<this.containment[0]||F-this.offset.click.left>this.containment[2])?F:(!(F-this.offset.click.left<this.containment[0])?F-H.grid[0]:F+H.grid[0])):F}}return{top:(C-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(A.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(I?0:B.scrollTop())))),left:(D-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(A.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():I?0:B.scrollLeft())))}},_rearrange:function(G,F,C,E){C?C[0].appendChild(this.placeholder[0]):F.item[0].parentNode.insertBefore(this.placeholder[0],(this.direction=="down"?F.item[0]:F.item[0].nextSibling));this.counter=this.counter?++this.counter:1;var D=this,B=this.counter;window.setTimeout(function(){if(B==D.counter){D.refreshPositions(!E)}},0)},_clear:function(D,E){this.reverting=false;var F=[],B=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 C in this._storedCSS){if(this._storedCSS[C]=="auto"||this._storedCSS[C]=="static"){this._storedCSS[C]=""}}this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}if(this.fromOutside&&!E){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])&&!E){F.push(function(G){this._trigger("update",G,this._uiHash())})}if(!A.ui.contains(this.element[0],this.currentItem[0])){if(!E){F.push(function(G){this._trigger("remove",G,this._uiHash())})}for(var C=this.containers.length-1;C>=0;C--){if(A.ui.contains(this.containers[C].element[0],this.currentItem[0])&&!E){F.push((function(G){return function(H){G._trigger("receive",H,this._uiHash(this))}}).call(this,this.containers[C]));F.push((function(G){return function(H){G._trigger("update",H,this._uiHash(this))}}).call(this,this.containers[C]))}}}for(var C=this.containers.length-1;C>=0;C--){if(!E){F.push((function(G){return function(H){G._trigger("deactivate",H,this._uiHash(this))}}).call(this,this.containers[C]))}if(this.containers[C].containerCache.over){F.push((function(G){return function(H){G._trigger("out",H,this._uiHash(this))}}).call(this,this.containers[C]));this.containers[C].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(!E){this._trigger("beforeStop",D,this._uiHash());for(var C=0;C<F.length;C++){F[C].call(this,D)}this._trigger("stop",D,this._uiHash())}return false}if(!E){this._trigger("beforeStop",D,this._uiHash())}this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(this.helper[0]!=this.currentItem[0]){this.helper.remove()}this.helper=null;if(!E){for(var C=0;C<F.length;C++){F[C].call(this,D)}this._trigger("stop",D,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);jQuery.effects||(function(D){D.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(G,H){var I,F;switch(G[0]){case"top":I=0;break;case"middle":I=0.5;break;case"bottom":I=1;break;default:I=G[0]/H.height}switch(G[1]){case"left":F=0;break;case"center":F=0.5;break;case"right":F=1;break;default:F=G[1]/H.width}return{x:F,y:I}},createWrapper:function(F){if(F.parent().is(".ui-effects-wrapper")){return F.parent()}var G={width:F.outerWidth(true),height:F.outerHeight(true),"float":F.css("float")};F.wrap('<div class="ui-effects-wrapper" style="font-size:100%;background:transparent;border:none;margin:0;padding:0"></div>');var J=F.parent();if(F.css("position")=="static"){J.css({position:"relative"});F.css({position:"relative"})}else{var I=F.css("top");if(isNaN(parseInt(I,10))){I="auto"}var H=F.css("left");if(isNaN(parseInt(H,10))){H="auto"}J.css({position:F.css("position"),top:I,left:H,zIndex:F.css("z-index")}).show();F.css({position:"relative",top:0,left:0})}J.css(G);return J},removeWrapper:function(F){if(F.parent().is(".ui-effects-wrapper")){return F.parent().replaceWith(F)}return F},setTransition:function(G,I,F,H){H=H||{};D.each(I,function(K,J){unit=G.cssUnit(J);if(unit[0]>0){H[J]=unit[0]*F+unit[1]}});return H},animateClass:function(H,I,K,J){var F=(typeof K=="function"?K:(J?J:null));var G=(typeof K=="string"?K:null);return this.each(function(){var P={};var N=D(this);var O=N.attr("style")||"";if(typeof O=="object"){O=O.cssText}if(H.toggle){N.hasClass(H.toggle)?H.remove=H.toggle:H.add=H.toggle}var L=D.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(H.add){N.addClass(H.add)}if(H.remove){N.removeClass(H.remove)}var M=D.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(H.add){N.removeClass(H.add)}if(H.remove){N.addClass(H.remove)}for(var Q in M){if(typeof M[Q]!="function"&&M[Q]&&Q.indexOf("Moz")==-1&&Q.indexOf("length")==-1&&M[Q]!=L[Q]&&(Q.match(/color/i)||(!Q.match(/color/i)&&!isNaN(parseInt(M[Q],10))))&&(L.position!="static"||(L.position=="static"&&!Q.match(/left|top|bottom|right/)))){P[Q]=M[Q]}}N.animate(P,I,G,function(){if(typeof D(this).attr("style")=="object"){D(this).attr("style")["cssText"]="";D(this).attr("style")["cssText"]=O}else{D(this).attr("style",O)}if(H.add){D(this).addClass(H.add)}if(H.remove){D(this).removeClass(H.remove)}if(F){F.apply(this,arguments)}})})}};function C(G,F){var I=G[1]&&G[1].constructor==Object?G[1]:{};if(F){I.mode=F}var H=G[1]&&G[1].constructor!=Object?G[1]:(I.duration?I.duration:G[2]);H=D.fx.off?0:typeof H==="number"?H:D.fx.speeds[H]||D.fx.speeds._default;var J=I.callback||(D.isFunction(G[1])&&G[1])||(D.isFunction(G[2])&&G[2])||(D.isFunction(G[3])&&G[3]);return[G[0],I,H,J]}D.fn.extend({_show:D.fn.show,_hide:D.fn.hide,__toggle:D.fn.toggle,_addClass:D.fn.addClass,_removeClass:D.fn.removeClass,_toggleClass:D.fn.toggleClass,effect:function(G,F,H,I){return D.effects[G]?D.effects[G].call(this,{method:G,options:F||{},duration:H,callback:I}):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,C(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,C(arguments,"hide"))}},toggle:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))||(D.isFunction(arguments[0])||typeof arguments[0]=="boolean")){return this.__toggle.apply(this,arguments)}else{return this.effect.apply(this,C(arguments,"toggle"))}},addClass:function(G,F,I,H){return F?D.effects.animateClass.apply(this,[{add:G},F,I,H]):this._addClass(G)},removeClass:function(G,F,I,H){return F?D.effects.animateClass.apply(this,[{remove:G},F,I,H]):this._removeClass(G)},toggleClass:function(G,F,I,H){return((typeof F!=="boolean")&&F)?D.effects.animateClass.apply(this,[{toggle:G},F,I,H]):this._toggleClass(G,F)},morph:function(F,H,G,J,I){return D.effects.animateClass.apply(this,[{add:H,remove:F},G,J,I])},switchClass:function(){return this.morph.apply(this,arguments)},cssUnit:function(F){var G=this.css(F),H=[];D.each(["em","px","%","pt"],function(I,J){if(G.indexOf(J)>0){H=[parseFloat(G),J]}});return H}});D.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(G,F){D.fx.step[F]=function(H){if(H.state==0){H.start=E(H.elem,F);H.end=B(H.end)}H.elem.style[F]="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 A.transparent}return A[D.trim(G).toLowerCase()]}function E(H,F){var G;do{G=D.curCSS(H,F);if(G!=""&&G!="transparent"||D.nodeName(H,"body")){break}F="backgroundColor"}while(H=H.parentNode);return B(G)}var A={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]};D.easing.jswing=D.easing.swing;D.extend(D.easing,{def:"easeOutQuad",swing:function(G,H,F,J,I){return D.easing[D.easing.def](G,H,F,J,I)},easeInQuad:function(G,H,F,J,I){return J*(H/=I)*H+F},easeOutQuad:function(G,H,F,J,I){return -J*(H/=I)*(H-2)+F},easeInOutQuad:function(G,H,F,J,I){if((H/=I/2)<1){return J/2*H*H+F}return -J/2*((--H)*(H-2)-1)+F},easeInCubic:function(G,H,F,J,I){return J*(H/=I)*H*H+F},easeOutCubic:function(G,H,F,J,I){return J*((H=H/I-1)*H*H+1)+F},easeInOutCubic:function(G,H,F,J,I){if((H/=I/2)<1){return J/2*H*H*H+F}return J/2*((H-=2)*H*H+2)+F},easeInQuart:function(G,H,F,J,I){return J*(H/=I)*H*H*H+F},easeOutQuart:function(G,H,F,J,I){return -J*((H=H/I-1)*H*H*H-1)+F},easeInOutQuart:function(G,H,F,J,I){if((H/=I/2)<1){return J/2*H*H*H*H+F}return -J/2*((H-=2)*H*H*H-2)+F},easeInQuint:function(G,H,F,J,I){return J*(H/=I)*H*H*H*H+F},easeOutQuint:function(G,H,F,J,I){return J*((H=H/I-1)*H*H*H*H+1)+F},easeInOutQuint:function(G,H,F,J,I){if((H/=I/2)<1){return J/2*H*H*H*H*H+F}return J/2*((H-=2)*H*H*H*H+2)+F},easeInSine:function(G,H,F,J,I){return -J*Math.cos(H/I*(Math.PI/2))+J+F},easeOutSine:function(G,H,F,J,I){return J*Math.sin(H/I*(Math.PI/2))+F},easeInOutSine:function(G,H,F,J,I){return -J/2*(Math.cos(Math.PI*H/I)-1)+F},easeInExpo:function(G,H,F,J,I){return(H==0)?F:J*Math.pow(2,10*(H/I-1))+F},easeOutExpo:function(G,H,F,J,I){return(H==I)?F+J:J*(-Math.pow(2,-10*H/I)+1)+F},easeInOutExpo:function(G,H,F,J,I){if(H==0){return F}if(H==I){return F+J}if((H/=I/2)<1){return J/2*Math.pow(2,10*(H-1))+F}return J/2*(-Math.pow(2,-10*--H)+2)+F},easeInCirc:function(G,H,F,J,I){return -J*(Math.sqrt(1-(H/=I)*H)-1)+F},easeOutCirc:function(G,H,F,J,I){return J*Math.sqrt(1-(H=H/I-1)*H)+F},easeInOutCirc:function(G,H,F,J,I){if((H/=I/2)<1){return -J/2*(Math.sqrt(1-H*H)-1)+F}return J/2*(Math.sqrt(1-(H-=2)*H)+1)+F},easeInElastic:function(G,I,F,M,L){var J=1.70158;var K=0;var H=M;if(I==0){return F}if((I/=L)==1){return F+M}if(!K){K=L*0.3}if(H<Math.abs(M)){H=M;var J=K/4}else{var J=K/(2*Math.PI)*Math.asin(M/H)}return -(H*Math.pow(2,10*(I-=1))*Math.sin((I*L-J)*(2*Math.PI)/K))+F},easeOutElastic:function(G,I,F,M,L){var J=1.70158;var K=0;var H=M;if(I==0){return F}if((I/=L)==1){return F+M}if(!K){K=L*0.3}if(H<Math.abs(M)){H=M;var J=K/4}else{var J=K/(2*Math.PI)*Math.asin(M/H)}return H*Math.pow(2,-10*I)*Math.sin((I*L-J)*(2*Math.PI)/K)+M+F},easeInOutElastic:function(G,I,F,M,L){var J=1.70158;var K=0;var H=M;if(I==0){return F}if((I/=L/2)==2){return F+M}if(!K){K=L*(0.3*1.5)}if(H<Math.abs(M)){H=M;var J=K/4}else{var J=K/(2*Math.PI)*Math.asin(M/H)}if(I<1){return -0.5*(H*Math.pow(2,10*(I-=1))*Math.sin((I*L-J)*(2*Math.PI)/K))+F}return H*Math.pow(2,-10*(I-=1))*Math.sin((I*L-J)*(2*Math.PI)/K)*0.5+M+F},easeInBack:function(G,H,F,K,J,I){if(I==undefined){I=1.70158}return K*(H/=J)*H*((I+1)*H-I)+F},easeOutBack:function(G,H,F,K,J,I){if(I==undefined){I=1.70158}return K*((H=H/J-1)*H*((I+1)*H+I)+1)+F},easeInOutBack:function(G,H,F,K,J,I){if(I==undefined){I=1.70158}if((H/=J/2)<1){return K/2*(H*H*(((I*=(1.525))+1)*H-I))+F}return K/2*((H-=2)*H*(((I*=(1.525))+1)*H+I)+2)+F},easeInBounce:function(G,H,F,J,I){return J-D.easing.easeOutBounce(G,I-H,0,J,I)+F},easeOutBounce:function(G,H,F,J,I){if((H/=I)<(1/2.75)){return J*(7.5625*H*H)+F}else{if(H<(2/2.75)){return J*(7.5625*(H-=(1.5/2.75))*H+0.75)+F}else{if(H<(2.5/2.75)){return J*(7.5625*(H-=(2.25/2.75))*H+0.9375)+F}else{return J*(7.5625*(H-=(2.625/2.75))*H+0.984375)+F}}}},easeInOutBounce:function(G,H,F,J,I){if(H<I/2){return D.easing.easeInBounce(G,H*2,0,J,I)*0.5+F}return D.easing.easeOutBounce(G,H*2-I,0,J,I)*0.5+J*0.5+F}})})(jQuery);(function(A){A.effects.blind=function(B){return this.queue(function(){var D=A(this),C=["position","top","left"];var H=A.effects.setMode(D,B.options.mode||"hide");var G=B.options.direction||"vertical";A.effects.save(D,C);D.show();var J=A.effects.createWrapper(D).css({overflow:"hidden"});var E=(G=="vertical")?"height":"width";var I=(G=="vertical")?J.height():J.width();if(H=="show"){J.css(E,0)}var F={};F[E]=H=="show"?I:0;J.animate(F,B.duration,B.options.easing,function(){if(H=="hide"){D.hide()}A.effects.restore(D,C);A.effects.removeWrapper(D);if(B.callback){B.callback.apply(D[0],arguments)}D.dequeue()})})}})(jQuery);(function(A){A.effects.bounce=function(B){return this.queue(function(){var E=A(this),K=["position","top","left"];var J=A.effects.setMode(E,B.options.mode||"effect");var M=B.options.direction||"up";var C=B.options.distance||20;var D=B.options.times||5;var G=B.duration||250;if(/show|hide/.test(J)){K.push("opacity")}A.effects.save(E,K);E.show();A.effects.createWrapper(E);var F=(M=="up"||M=="down")?"top":"left";var O=(M=="up"||M=="left")?"pos":"neg";var C=B.options.distance||(F=="top"?E.outerHeight({margin:true})/3:E.outerWidth({margin:true})/3);if(J=="show"){E.css("opacity",0).css(F,O=="pos"?-C:C)}if(J=="hide"){C=C/(D*2)}if(J!="hide"){D--}if(J=="show"){var H={opacity:1};H[F]=(O=="pos"?"+=":"-=")+C;E.animate(H,G/2,B.options.easing);C=C/2;D--}for(var I=0;I<D;I++){var N={},L={};N[F]=(O=="pos"?"-=":"+=")+C;L[F]=(O=="pos"?"+=":"-=")+C;E.animate(N,G/2,B.options.easing).animate(L,G/2,B.options.easing);C=(J=="hide")?C*2:C/2}if(J=="hide"){var H={opacity:0};H[F]=(O=="pos"?"-=":"+=")+C;E.animate(H,G/2,B.options.easing,function(){E.hide();A.effects.restore(E,K);A.effects.removeWrapper(E);if(B.callback){B.callback.apply(this,arguments)}})}else{var N={},L={};N[F]=(O=="pos"?"-=":"+=")+C;L[F]=(O=="pos"?"+=":"-=")+C;E.animate(N,G/2,B.options.easing).animate(L,G/2,B.options.easing,function(){A.effects.restore(E,K);A.effects.removeWrapper(E);if(B.callback){B.callback.apply(this,arguments)}})}E.queue("fx",function(){E.dequeue()});E.dequeue()})}})(jQuery);(function(A){A.effects.clip=function(B){return this.queue(function(){var F=A(this),J=["position","top","left","height","width"];var I=A.effects.setMode(F,B.options.mode||"hide");var K=B.options.direction||"vertical";A.effects.save(F,J);F.show();var C=A.effects.createWrapper(F).css({overflow:"hidden"});var E=F[0].tagName=="IMG"?C:F;var G={size:(K=="vertical")?"height":"width",position:(K=="vertical")?"top":"left"};var D=(K=="vertical")?E.height():E.width();if(I=="show"){E.css(G.size,0);E.css(G.position,D/2)}var H={};H[G.size]=I=="show"?D:0;H[G.position]=I=="show"?0:D/2;E.animate(H,{queue:false,duration:B.duration,easing:B.options.easing,complete:function(){if(I=="hide"){F.hide()}A.effects.restore(F,J);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 E=A(this),D=["position","top","left","opacity"];var I=A.effects.setMode(E,B.options.mode||"hide");var H=B.options.direction||"left";A.effects.save(E,D);E.show();A.effects.createWrapper(E);var F=(H=="up"||H=="down")?"top":"left";var C=(H=="up"||H=="left")?"pos":"neg";var J=B.options.distance||(F=="top"?E.outerHeight({margin:true})/2:E.outerWidth({margin:true})/2);if(I=="show"){E.css("opacity",0).css(F,C=="pos"?-J:J)}var G={opacity:I=="show"?1:0};G[F]=(I=="show"?(C=="pos"?"+=":"-="):(C=="pos"?"-=":"+="))+J;E.animate(G,{queue:false,duration:B.duration,easing:B.options.easing,complete:function(){if(I=="hide"){E.hide()}A.effects.restore(E,D);A.effects.removeWrapper(E);if(B.callback){B.callback.apply(this,arguments)}E.dequeue()}})})}})(jQuery);(function(A){A.effects.explode=function(B){return this.queue(function(){var I=B.options.pieces?Math.round(Math.sqrt(B.options.pieces)):3;var E=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 H=A(this).show().css("visibility","hidden");var J=H.offset();J.top-=parseInt(H.css("marginTop"),10)||0;J.left-=parseInt(H.css("marginLeft"),10)||0;var G=H.outerWidth(true);var C=H.outerHeight(true);for(var F=0;F<I;F++){for(var D=0;D<E;D++){H.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-D*(G/E),top:-F*(C/I)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:G/E,height:C/I,left:J.left+D*(G/E)+(B.options.mode=="show"?(D-Math.floor(E/2))*(G/E):0),top:J.top+F*(C/I)+(B.options.mode=="show"?(F-Math.floor(I/2))*(C/I):0),opacity:B.options.mode=="show"?0:1}).animate({left:J.left+D*(G/E)+(B.options.mode=="show"?0:(D-Math.floor(E/2))*(G/E)),top:J.top+F*(C/I)+(B.options.mode=="show"?0:(F-Math.floor(I/2))*(C/I)),opacity:B.options.mode=="show"?1:0},B.duration||500)}}setTimeout(function(){B.options.mode=="show"?H.css({visibility:"visible"}):H.css({visibility:"visible"}).hide();if(B.callback){B.callback.apply(H[0])}H.dequeue();A("div.ui-effects-explode").remove()},B.duration||500)})}})(jQuery);(function(A){A.effects.fold=function(B){return this.queue(function(){var E=A(this),K=["position","top","left"];var H=A.effects.setMode(E,B.options.mode||"hide");var O=B.options.size||15;var N=!(!B.options.horizFirst);var G=B.duration?B.duration/2:A.fx.speeds._default/2;A.effects.save(E,K);E.show();var D=A.effects.createWrapper(E).css({overflow:"hidden"});var I=((H=="show")!=N);var F=I?["width","height"]:["height","width"];var C=I?[D.width(),D.height()]:[D.height(),D.width()];var J=/([0-9]+)%/.exec(O);if(J){O=parseInt(J[1],10)/100*C[H=="hide"?0:1]}if(H=="show"){D.css(N?{height:0,width:O}:{height:O,width:0})}var M={},L={};M[F[0]]=H=="show"?C[0]:O;L[F[1]]=H=="show"?C[1]:0;D.animate(M,G,B.options.easing).animate(L,G,B.options.easing,function(){if(H=="hide"){E.hide()}A.effects.restore(E,K);A.effects.removeWrapper(E);if(B.callback){B.callback.apply(E[0],arguments)}E.dequeue()})})}})(jQuery);(function(A){A.effects.highlight=function(B){return this.queue(function(){var E=A(this),D=["backgroundImage","backgroundColor","opacity"];var H=A.effects.setMode(E,B.options.mode||"show");var C=B.options.color||"#ffff99";var G=E.css("backgroundColor");A.effects.save(E,D);E.show();E.css({backgroundImage:"none",backgroundColor:C});var F={backgroundColor:G};if(H=="hide"){F.opacity=0}E.animate(F,{queue:false,duration:B.duration,easing:B.options.easing,complete:function(){if(H=="hide"){E.hide()}A.effects.restore(E,D);if(H=="show"&&A.browser.msie){this.style.removeAttribute("filter")}if(B.callback){B.callback.apply(this,arguments)}E.dequeue()}})})}})(jQuery);(function(A){A.effects.pulsate=function(B){return this.queue(function(){var D=A(this);var G=A.effects.setMode(D,B.options.mode||"show");var F=B.options.times||5;var E=B.duration?B.duration/2:A.fx.speeds._default/2;if(G=="hide"){F--}if(D.is(":hidden")){D.css("opacity",0);D.show();D.animate({opacity:1},E,B.options.easing);F=F-2}for(var C=0;C<F;C++){D.animate({opacity:0},E,B.options.easing).animate({opacity:1},E,B.options.easing)}if(G=="hide"){D.animate({opacity:0},E,B.options.easing,function(){D.hide();if(B.callback){B.callback.apply(this,arguments)}})}else{D.animate({opacity:0},E,B.options.easing).animate({opacity:1},E,B.options.easing,function(){if(B.callback){B.callback.apply(this,arguments)}})}D.queue("fx",function(){D.dequeue()});D.dequeue()})}})(jQuery);(function(A){A.effects.puff=function(B){return this.queue(function(){var F=A(this);var C=A.extend(true,{},B.options);var H=A.effects.setMode(F,B.options.mode||"hide");var G=parseInt(B.options.percent,10)||150;C.fade=true;var E={height:F.height(),width:F.width()};var D=G/100;F.from=(H=="hide")?E:{height:E.height*D,width:E.width*D};C.from=F.from;C.percent=(H=="hide")?G:100;C.mode=H;F.effect("scale",C,B.duration,B.callback);F.dequeue()})};A.effects.scale=function(B){return this.queue(function(){var G=A(this);var D=A.extend(true,{},B.options);var J=A.effects.setMode(G,B.options.mode||"effect");var H=parseInt(B.options.percent,10)||(parseInt(B.options.percent,10)==0?0:(J=="hide"?0:100));var I=B.options.direction||"both";var C=B.options.origin;if(J!="effect"){D.origin=C||["middle","center"];D.restore=true}var F={height:G.height(),width:G.width()};G.from=B.options.from||(J=="show"?{height:0,width:0}:F);var E={y:I!="horizontal"?(H/100):1,x:I!="vertical"?(H/100):1};G.to={height:F.height*E.y,width:F.width*E.x};if(B.options.fade){if(J=="show"){G.from.opacity=0;G.to.opacity=1}if(J=="hide"){G.from.opacity=1;G.to.opacity=0}}D.from=G.from;D.to=G.to;D.mode=J;G.effect("size",D,B.duration,B.callback);G.dequeue()})};A.effects.size=function(B){return this.queue(function(){var C=A(this),N=["position","top","left","width","height","overflow","opacity"];var M=["position","top","left","overflow","opacity"];var J=["width","height","overflow"];var P=["fontSize"];var K=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"];var F=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"];var G=A.effects.setMode(C,B.options.mode||"effect");var I=B.options.restore||false;var E=B.options.scale||"both";var O=B.options.origin;var D={height:C.height(),width:C.width()};C.from=B.options.from||D;C.to=B.options.to||D;if(O){var H=A.effects.getBaseline(O,D);C.from.top=(D.height-C.from.height)*H.y;C.from.left=(D.width-C.from.width)*H.x;C.to.top=(D.height-C.to.height)*H.y;C.to.left=(D.width-C.to.width)*H.x}var L={from:{y:C.from.height/D.height,x:C.from.width/D.width},to:{y:C.to.height/D.height,x:C.to.width/D.width}};if(E=="box"||E=="both"){if(L.from.y!=L.to.y){N=N.concat(K);C.from=A.effects.setTransition(C,K,L.from.y,C.from);C.to=A.effects.setTransition(C,K,L.to.y,C.to)}if(L.from.x!=L.to.x){N=N.concat(F);C.from=A.effects.setTransition(C,F,L.from.x,C.from);C.to=A.effects.setTransition(C,F,L.to.x,C.to)}}if(E=="content"||E=="both"){if(L.from.y!=L.to.y){N=N.concat(P);C.from=A.effects.setTransition(C,P,L.from.y,C.from);C.to=A.effects.setTransition(C,P,L.to.y,C.to)}}A.effects.save(C,I?N:M);C.show();A.effects.createWrapper(C);C.css("overflow","hidden").css(C.from);if(E=="content"||E=="both"){K=K.concat(["marginTop","marginBottom"]).concat(P);F=F.concat(["marginLeft","marginRight"]);J=N.concat(K).concat(F);C.find("*[width]").each(function(){child=A(this);if(I){A.effects.save(child,J)}var Q={height:child.height(),width:child.width()};child.from={height:Q.height*L.from.y,width:Q.width*L.from.x};child.to={height:Q.height*L.to.y,width:Q.width*L.to.x};if(L.from.y!=L.to.y){child.from=A.effects.setTransition(child,K,L.from.y,child.from);child.to=A.effects.setTransition(child,K,L.to.y,child.to)}if(L.from.x!=L.to.x){child.from=A.effects.setTransition(child,F,L.from.x,child.from);child.to=A.effects.setTransition(child,F,L.to.x,child.to)}child.css(child.from);child.animate(child.to,B.duration,B.options.easing,function(){if(I){A.effects.restore(child,J)}})})}C.animate(C.to,{queue:false,duration:B.duration,easing:B.options.easing,complete:function(){if(G=="hide"){C.hide()}A.effects.restore(C,I?N:M);A.effects.removeWrapper(C);if(B.callback){B.callback.apply(this,arguments)}C.dequeue()}})})}})(jQuery);(function(A){A.effects.shake=function(B){return this.queue(function(){var E=A(this),K=["position","top","left"];var J=A.effects.setMode(E,B.options.mode||"effect");var M=B.options.direction||"left";var C=B.options.distance||20;var D=B.options.times||3;var G=B.duration||B.options.duration||140;A.effects.save(E,K);E.show();A.effects.createWrapper(E);var F=(M=="up"||M=="down")?"top":"left";var O=(M=="up"||M=="left")?"pos":"neg";var H={},N={},L={};H[F]=(O=="pos"?"-=":"+=")+C;N[F]=(O=="pos"?"+=":"-=")+C*2;L[F]=(O=="pos"?"-=":"+=")+C*2;E.animate(H,G,B.options.easing);for(var I=1;I<D;I++){E.animate(N,G,B.options.easing).animate(L,G,B.options.easing)}E.animate(N,G,B.options.easing).animate(H,G/2,B.options.easing,function(){A.effects.restore(E,K);A.effects.removeWrapper(E);if(B.callback){B.callback.apply(this,arguments)}});E.queue("fx",function(){E.dequeue()});E.dequeue()})}})(jQuery);(function(A){A.effects.slide=function(B){return this.queue(function(){var E=A(this),D=["position","top","left"];var I=A.effects.setMode(E,B.options.mode||"show");var H=B.options.direction||"left";A.effects.save(E,D);E.show();A.effects.createWrapper(E).css({overflow:"hidden"});var F=(H=="up"||H=="down")?"top":"left";var C=(H=="up"||H=="left")?"pos":"neg";var J=B.options.distance||(F=="top"?E.outerHeight({margin:true}):E.outerWidth({margin:true}));if(I=="show"){E.css(F,C=="pos"?-J:J)}var G={};G[F]=(I=="show"?(C=="pos"?"+=":"-="):(C=="pos"?"-=":"+="))+J;E.animate(G,{queue:false,duration:B.duration,easing:B.options.easing,complete:function(){if(I=="hide"){E.hide()}A.effects.restore(E,D);A.effects.removeWrapper(E);if(B.callback){B.callback.apply(this,arguments)}E.dequeue()}})})}})(jQuery);(function(A){A.effects.transfer=function(B){return this.queue(function(){var F=A(this),H=A(B.options.to),E=H.offset(),G={top:E.top,left:E.left,height:H.innerHeight(),width:H.innerWidth()},D=F.offset(),C=A('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(B.options.className).css({top:D.top,left:D.left,height:F.innerHeight(),width:F.innerWidth(),position:"absolute"}).animate(G,B.duration,B.options.easing,function(){C.remove();(B.callback&&B.callback.apply(F[0],arguments));F.dequeue()})})}})(jQuery);(function(A){A.widget("ui.accordion",{_init:function(){var D=this.options,B=this;this.running=0;if(D.collapsible==A.ui.accordion.defaults.collapsible&&D.alwaysOpen!=A.ui.accordion.defaults.alwaysOpen){D.collapsible=!D.alwaysOpen}if(D.navigation){var C=this.element.find("a").filter(D.navigationFilter);if(C.length){if(C.filter(D.header).length){this.active=C}else{this.active=C.parent().parent().prev();C.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(D.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||D.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 "+D.icons.header).prependTo(this.headers);this.active.find(".ui-icon").toggleClass(D.icons.header).toggleClass(D.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(D.event){this.headers.bind((D.event)+".accordion",function(E){return B._clickHandler.call(B,E,this)})}},destroy:function(){var C=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role").unbind(".accordion").removeData("accordion");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabindex");this.headers.find("a").removeAttr("tabindex");this.headers.children(".ui-icon").remove();var B=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active");if(C.autoHeight||C.fillHeight){B.css("height","")}},_setData:function(B,C){if(B=="alwaysOpen"){B="collapsible";C=!C}A.widget.prototype._setData.apply(this,arguments)},_keydown:function(E){var G=this.options,F=A.ui.keyCode;if(G.disabled||E.altKey||E.ctrlKey){return }var D=this.headers.length;var B=this.headers.index(E.target);var C=false;switch(E.keyCode){case F.RIGHT:case F.DOWN:C=this.headers[(B+1)%D];break;case F.LEFT:case F.UP:C=this.headers[(B-1+D)%D];break;case F.SPACE:case F.ENTER:return this._clickHandler({target:E.target},E.target)}if(C){A(E.target).attr("tabIndex","-1");A(C).attr("tabIndex","0");C.focus();return false}return true},resize:function(){var E=this.options,D;if(E.fillSpace){if(A.browser.msie){var B=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}D=this.element.parent().height();if(A.browser.msie){this.element.parent().css("overflow",B)}this.headers.each(function(){D-=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,D-C)).css("overflow","auto")}else{if(E.autoHeight){D=0;this.headers.next().each(function(){D=Math.max(D,A(this).outerHeight())}).height(D)}}},activate:function(B){var C=this._findActive(B)[0];this._clickHandler({target:C},C)},_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(B,F){var D=this.options;if(D.disabled){return false}if(!B.target&&D.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(D.icons.headerSelected).addClass(D.icons.header);this.active.next().addClass("ui-accordion-content-active");var H=this.active.next(),E={options:D,newHeader:A([]),oldHeader:D.active,newContent:A([]),oldContent:H},C=(this.active=A([]));this._toggle(C,H,E);return false}var G=A(B.currentTarget||F);var I=G[0]==this.active[0];if(this.running||(!D.collapsible&&I)){return false}this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(D.icons.headerSelected).addClass(D.icons.header);this.active.next().addClass("ui-accordion-content-active");if(!I){G.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").find(".ui-icon").removeClass(D.icons.header).addClass(D.icons.headerSelected);G.next().addClass("ui-accordion-content-active")}var C=G.next(),H=this.active.next(),E={options:D,newHeader:I&&D.collapsible?A([]):G,oldHeader:this.active,newContent:I&&D.collapsible?A([]):C.find("> *"),oldContent:H.find("> *")},J=this.headers.index(this.active[0])>this.headers.index(G[0]);this.active=I?A([]):G;this._toggle(C,H,E,I,J);return false},_toggle:function(B,I,G,J,K){var D=this.options,M=this;this.toShow=B;this.toHide=I;this.data=G;var C=function(){if(!M){return }return M._completed.apply(M,arguments)};this._trigger("changestart",null,this.data);this.running=I.size()===0?B.size():I.size();if(D.animated){var F={};if(D.collapsible&&J){F={toShow:A([]),toHide:I,complete:C,down:K,autoHeight:D.autoHeight||D.fillSpace}}else{F={toShow:B,toHide:I,complete:C,down:K,autoHeight:D.autoHeight||D.fillSpace}}if(!D.proxied){D.proxied=D.animated}if(!D.proxiedDuration){D.proxiedDuration=D.duration}D.animated=A.isFunction(D.proxied)?D.proxied(F):D.proxied;D.duration=A.isFunction(D.proxiedDuration)?D.proxiedDuration(F):D.proxiedDuration;var L=A.ui.accordion.animations,E=D.duration,H=D.animated;if(!L[H]){L[H]=function(N){this.slide(N,{easing:H,duration:E||700})}}L[H](F)}else{if(D.collapsible&&J){B.toggle()}else{I.hide();B.show()}C(true)}I.prev().attr("aria-expanded","false").attr("tabIndex","-1").blur();B.prev().attr("aria-expanded","true").attr("tabIndex","0").focus()},_completed:function(B){var C=this.options;this.running=B?0:--this.running;if(this.running){return }if(C.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(J,H){J=A.extend({easing:"swing",duration:300},J,H);if(!J.toHide.size()){J.toShow.animate({height:"show"},J);return }if(!J.toShow.size()){J.toHide.animate({height:"hide"},J);return }var C=J.toShow.css("overflow"),G,D={},F={},E=["height","paddingTop","paddingBottom"],B;var I=J.toShow;B=I[0].style.width;I.width(parseInt(I.parent().width(),10)-parseInt(I.css("paddingLeft"),10)-parseInt(I.css("paddingRight"),10)-(parseInt(I.css("borderLeftWidth"),10)||0)-(parseInt(I.css("borderRightWidth"),10)||0));A.each(E,function(K,M){F[M]="hide";var L=(""+A.css(J.toShow[0],M)).match(/^([\d+-.]+)(.*)$/);D[M]={value:L[1],unit:L[2]||"px"}});J.toShow.css({height:0,overflow:"hidden"}).show();J.toHide.filter(":hidden").each(J.complete).end().filter(":visible").animate(F,{step:function(K,L){if(L.prop=="height"){G=(L.now-L.start)/(L.end-L.start)}J.toShow[0].style[L.prop]=(G*D[L.prop].value)+D[L.prop].unit},duration:J.duration,easing:J.easing,complete:function(){if(!J.autoHeight){J.toShow.css("height","")}J.toShow.css("width",B);J.toShow.css({overflow:C});J.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($){$.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="#" style="text-decoration:none;font-weight:bold;font-size:11px;color:'+(printDate.getTime()>=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?"#CC0000":"#004276")+'">'+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(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 L=this,M=this.options,J=M.title||this.originalTitle||"&nbsp;",E=C.ui.dialog.getTitleId(this.element),K=(this.uiDialog=C("<div/>")).appendTo(document.body).hide().addClass(A+M.dialogClass).css({position:"absolute",overflow:"hidden",zIndex:M.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(N){(M.closeOnEscape&&N.keyCode&&N.keyCode==C.ui.keyCode.ESCAPE&&L.close(N))}).attr({role:"dialog","aria-labelledby":E}).mousedown(function(N){L.moveToTop(false,N)}),G=this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(K),F=(this.uiDialogTitlebar=C("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(K),I=C('<a href="#"/>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){I.addClass("ui-state-hover")},function(){I.removeClass("ui-state-hover")}).focus(function(){I.addClass("ui-state-focus")}).blur(function(){I.removeClass("ui-state-focus")}).mousedown(function(N){N.stopPropagation()}).click(function(N){L.close(N);return false}).appendTo(F),H=(this.uiDialogTitlebarCloseText=C("<span/>")).addClass("ui-icon ui-icon-closethick").text(M.closeText).appendTo(I),D=C("<span/>").addClass("ui-dialog-title").attr("id",E).html(J).prependTo(F);F.find("*").add(F).disableSelection();(M.draggable&&C.fn.draggable&&this._makeDraggable());(M.resizable&&C.fn.resizable&&this._makeResizable());this._createButtons(M.buttons);this._isOpen=false;(M.bgiframe&&C.fn.bgiframe&&K.bgiframe());(M.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(F){var D=this;if(false===D._trigger("beforeclose",F)){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",F)}):D.uiDialog.hide()&&D._trigger("close",F));C.ui.dialog.overlay.resize();D._isOpen=false;if(D.options.modal){var E=0;C(".ui-dialog").each(function(){if(this!=D.uiDialog[0]){E=Math.max(E,C(this).css("z-index"))}});C.ui.dialog.maxZ=E}},isOpen:function(){return this._isOpen},moveToTop:function(F,E){if((this.options.modal&&!F)||(!this.options.stack&&!this.options.modal)){return this._trigger("focus",E)}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",E)},open:function(){if(this._isOpen){return }var E=this.options,D=this.uiDialog;this.overlay=E.modal?new C.ui.dialog.overlay(this):null;(D.next().length&&D.appendTo("body"));this._size();this._position(E.position);D.show(E.show);this.moveToTop(true);(E.modal&&D.bind("keypress.ui-dialog",function(H){if(H.keyCode!=C.ui.keyCode.TAB){return }var G=C(":tabbable",this),I=G.filter(":first")[0],F=G.filter(":last")[0];if(H.target==F&&!H.shiftKey){setTimeout(function(){I.focus()},1)}else{if(H.target==I&&H.shiftKey){setTimeout(function(){F.focus()},1)}}}));C([]).add(D.find(".ui-dialog-content :tabbable:first")).add(D.find(".ui-dialog-buttonpane :tabbable:first")).add(D).filter(":first").focus();this._trigger("open");this._isOpen=true},_createButtons:function(G){var F=this,D=false,E=C("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");this.uiDialog.find(".ui-dialog-buttonpane").remove();(typeof G=="object"&&G!==null&&C.each(G,function(){return !(D=true)}));if(D){C.each(G,function(H,I){C('<button type="button"></button>').addClass("ui-state-default ui-corner-all").text(H).click(function(){I.apply(F.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,F=this.options,E;this.uiDialog.draggable({cancel:".ui-dialog-content",handle:".ui-dialog-titlebar",containment:"document",start:function(){E=F.height;C(this).height(C(this).height()).addClass("ui-dialog-dragging");(F.dragStart&&F.dragStart.apply(D.element[0],arguments))},drag:function(){(F.drag&&F.drag.apply(D.element[0],arguments))},stop:function(){C(this).removeClass("ui-dialog-dragging").height(E);(F.dragStop&&F.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(I){var E=C(window),F=C(document),G=F.scrollTop(),D=F.scrollLeft(),H=G;if(C.inArray(I,["center","top","right","bottom","left"])>=0){I=[I=="right"||I=="left"?I:"center",I=="top"||I=="bottom"?I:"middle"]}if(I.constructor!=Array){I=["center","middle"]}if(I[0].constructor==Number){D+=I[0]}else{switch(I[0]){case"left":D+=0;break;case"right":D+=E.width()-this.uiDialog.outerWidth();break;default:case"center":D+=(E.width()-this.uiDialog.outerWidth())/2}}if(I[1].constructor==Number){G+=I[1]}else{switch(I[1]){case"top":G+=0;break;case"bottom":G+=E.height()-this.uiDialog.outerHeight();break;default:case"middle":G+=(E.height()-this.uiDialog.outerHeight())/2}}G=Math.max(G,H);this.uiDialog.css({top:G,left:D})},_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 D=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);var E=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(D<E){return C(window).width()+"px"}else{return D+"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.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);(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(I){var F=true;var E=A(this).data("index.ui-slider-handle");if(B.options.disabled){return }switch(I.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:F=false;if(!B._keySliding){B._keySliding=true;A(this).addClass("ui-state-active");B._start(I,E)}break}var G,D,H=B._step();if(B.options.values&&B.options.values.length){G=D=B.values(E)}else{G=D=B.value()}switch(I.keyCode){case A.ui.keyCode.HOME:D=B._valueMin();break;case A.ui.keyCode.END:D=B._valueMax();break;case A.ui.keyCode.UP:case A.ui.keyCode.RIGHT:if(G==B._valueMax()){return }D=G+H;break;case A.ui.keyCode.DOWN:case A.ui.keyCode.LEFT:if(G==B._valueMin()){return }D=G-H;break}B._slide(I,E,D);return F}).keyup(function(E){var D=A(this).data("index.ui-slider-handle");if(B._keySliding){B._stop(E,D);B._change(E,D);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(D){var E=this.options;if(E.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();var H={x:D.pageX,y:D.pageY};var J=this._normValueFromMouse(H);var C=this._valueMax()-this._valueMin()+1,F;var K=this,I;this.handles.each(function(L){var M=Math.abs(J-K.values(L));if(C>M){C=M;F=A(this);I=L}});if(E.range==true&&this.values(1)==E.min){F=A(this.handles[++I])}this._start(D,I);K._handleIndex=I;F.addClass("ui-state-active").focus();var G=F.offset();var B=!A(D.target).parents().andSelf().is(".ui-slider-handle");this._clickOffset=B?{left:0,top:0}:{left:D.pageX-G.left-(F.width()/2),top:D.pageY-G.top-(F.height()/2)-(parseInt(F.css("borderTopWidth"),10)||0)-(parseInt(F.css("borderBottomWidth"),10)||0)+(parseInt(F.css("marginTop"),10)||0)};J=this._normValueFromMouse(H);this._slide(D,I,J);return true},_mouseStart:function(B){return true},_mouseDrag:function(D){var B={x:D.pageX,y:D.pageY};var C=this._normValueFromMouse(B);this._slide(D,this._handleIndex,C);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(D){var C,H;if("horizontal"==this.orientation){C=this.elementSize.width;H=D.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{C=this.elementSize.height;H=D.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}var F=(H/C);if(F>1){F=1}if(F<0){F=0}if("vertical"==this.orientation){F=1-F}var E=this._valueMax()-this._valueMin(),I=F*E,B=I%this.options.step,G=this._valueMin()+I-B;if(B>(this.options.step/2)){G+=this.options.step}return parseFloat(G.toFixed(5))},_start:function(D,C){var B={handle:this.handles[C],value:this.value()};if(this.options.values&&this.options.values.length){B.value=this.values(C);B.values=this.values()}this._trigger("start",D,B)},_slide:function(F,E,D){var G=this.handles[E];if(this.options.values&&this.options.values.length){var B=this.values(E?0:1);if((this.options.values.length==2&&this.options.range===true)&&((E==0&&D>B)||(E==1&&D<B))){D=B}if(D!=this.values(E)){var C=this.values();C[E]=D;var H=this._trigger("slide",F,{handle:this.handles[E],value:D,values:C});var B=this.values(E?0:1);if(H!==false){this.values(E,D,(F.type=="mousedown"&&this.options.animate),true)}}}else{if(D!=this.value()){var H=this._trigger("slide",F,{handle:this.handles[E],value:D});if(H!==false){this._setData("value",D,(F.type=="mousedown"&&this.options.animate))}}}},_stop:function(D,C){var B={handle:this.handles[C],value:this.value()};if(this.options.values&&this.options.values.length){B.value=this.values(C);B.values=this.values()}this._trigger("stop",D,B)},_change:function(D,C){var B={handle:this.handles[C],value:this.value()};if(this.options.values&&this.options.values.length){B.value=this.values(C);B.values=this.values()}this._trigger("change",D,B)},value:function(B){if(arguments.length){this._setData("value",B);this._change(null,0)}return this._value()},values:function(B,E,C,D){if(arguments.length>1){this.options.values[B]=E;this._refreshValue(C);if(!D){this._change(null,B)}}if(arguments.length){if(this.options.values&&this.options.values.length){return this._values(B)}else{return this.value()}}else{return this._values()}},_setData:function(B,D,C){A.widget.prototype._setData.apply(this,arguments);switch(B){case"disabled":if(D){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled")}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(C);break;case"value":this._refreshValue(C);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(C){var F=this.options.range,D=this.options,L=this;if(this.options.values&&this.options.values.length){var I,H;this.handles.each(function(P,N){var O=(L.values(P)-L._valueMin())/(L._valueMax()-L._valueMin())*100;var M={};M[L.orientation=="horizontal"?"left":"bottom"]=O+"%";A(this).stop(1,1)[C?"animate":"css"](M,D.animate);if(L.options.range===true){if(L.orientation=="horizontal"){(P==0)&&L.range.stop(1,1)[C?"animate":"css"]({left:O+"%"},D.animate);(P==1)&&L.range[C?"animate":"css"]({width:(O-lastValPercent)+"%"},{queue:false,duration:D.animate})}else{(P==0)&&L.range.stop(1,1)[C?"animate":"css"]({bottom:(O)+"%"},D.animate);(P==1)&&L.range[C?"animate":"css"]({height:(O-lastValPercent)+"%"},{queue:false,duration:D.animate})}}lastValPercent=O})}else{var J=this.value(),G=this._valueMin(),K=this._valueMax(),E=K!=G?(J-G)/(K-G)*100:0;var B={};B[L.orientation=="horizontal"?"left":"bottom"]=E+"%";this.handle.stop(1,1)[C?"animate":"css"](B,D.animate);(F=="min")&&(this.orientation=="horizontal")&&this.range.stop(1,1)[C?"animate":"css"]({width:E+"%"},D.animate);(F=="max")&&(this.orientation=="horizontal")&&this.range[C?"animate":"css"]({width:(100-E)+"%"},{queue:false,duration:D.animate});(F=="min")&&(this.orientation=="vertical")&&this.range.stop(1,1)[C?"animate":"css"]({height:E+"%"},D.animate);(F=="max")&&(this.orientation=="vertical")&&this.range[C?"animate":"css"]({height:(100-E)+"%"},{queue:false,duration:D.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(M){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 N=this,D=this.options;var C=/^#.+/;this.anchors.each(function(Q,O){var P=A(O).attr("href");var R=P.split("#")[0],S;if(R&&(R===location.toString().split("#")[0]||(S=A("base")[0])&&R===S.href)){P=O.hash;O.href=P}if(C.test(P)){N.panels=N.panels.add(N._sanitizeSelector(P))}else{if(P!="#"){A.data(O,"href.tabs",P);A.data(O,"load.tabs",P.replace(/#.*$/,""));var U=N._tabId(O);O.href="#"+U;var T=A("#"+U);if(!T.length){T=A(D.panelTemplate).attr("id",U).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(N.panels[Q-1]||N.list);T.data("destroy.tabs",true)}N.panels=N.panels.add(T)}else{D.disabled.push(Q)}}});if(M){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(D.selected===undefined){if(location.hash){this.anchors.each(function(P,O){if(O.hash==location.hash){D.selected=P;return false}})}if(typeof D.selected!="number"&&D.cookie){D.selected=parseInt(N._cookie(),10)}if(typeof D.selected!="number"&&this.lis.filter(".ui-tabs-selected").length){D.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}D.selected=D.selected||0}else{if(D.selected===null){D.selected=-1}}D.selected=((D.selected>=0&&this.anchors[D.selected])||D.selected<0)?D.selected:0;D.disabled=A.unique(D.disabled.concat(A.map(this.lis.filter(".ui-state-disabled"),function(P,O){return N.lis.index(P)}))).sort();if(A.inArray(D.selected,D.disabled)!=-1){D.disabled.splice(A.inArray(D.selected,D.disabled),1)}this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(D.selected>=0&&this.anchors.length){this.panels.eq(D.selected).removeClass("ui-tabs-hide");this.lis.eq(D.selected).addClass("ui-tabs-selected ui-state-active");N.element.queue("tabs",function(){N._trigger("show",null,N._ui(N.anchors[D.selected],N.panels[D.selected]))});this.load(D.selected)}A(window).bind("unload",function(){N.lis.add(N.anchors).unbind(".tabs");N.lis=N.anchors=N.panels=null})}else{D.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}this.element[D.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");if(D.cookie){this._cookie(D.selected,D.cookie)}for(var G=0,L;(L=this.lis[G]);G++){A(L)[A.inArray(G,D.disabled)!=-1&&!A(L).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")}if(D.cache===false){this.anchors.removeData("cache.tabs")}this.lis.add(this.anchors).unbind(".tabs");if(D.event!="mouseover"){var F=function(P,O){if(O.is(":not(.ui-state-disabled)")){O.addClass("ui-state-"+P)}};var I=function(P,O){O.removeClass("ui-state-"+P)};this.lis.bind("mouseover.tabs",function(){F("hover",A(this))});this.lis.bind("mouseout.tabs",function(){I("hover",A(this))});this.anchors.bind("focus.tabs",function(){F("focus",A(this).closest("li"))});this.anchors.bind("blur.tabs",function(){I("focus",A(this).closest("li"))})}var B,H;if(D.fx){if(A.isArray(D.fx)){B=D.fx[0];H=D.fx[1]}else{B=H=D.fx}}function E(O,P){O.css({display:""});if(A.browser.msie&&P.opacity){O[0].style.removeAttribute("filter")}}var J=H?function(O,P){A(O).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");P.hide().removeClass("ui-tabs-hide").animate(H,H.duration||"normal",function(){E(P,H);N._trigger("show",null,N._ui(O,P[0]))})}:function(O,P){A(O).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");P.removeClass("ui-tabs-hide");N._trigger("show",null,N._ui(O,P[0]))};var K=B?function(P,O){O.animate(B,B.duration||"normal",function(){N.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");O.addClass("ui-tabs-hide");E(O,B);N.element.dequeue("tabs")})}:function(P,O,Q){N.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");O.addClass("ui-tabs-hide");N.element.dequeue("tabs")};this.anchors.bind(D.event+".tabs",function(){var P=this,R=A(this).closest("li"),O=N.panels.filter(":not(.ui-tabs-hide)"),Q=A(N._sanitizeSelector(this.hash));if((R.hasClass("ui-tabs-selected")&&!D.collapsible)||R.hasClass("ui-state-disabled")||R.hasClass("ui-state-processing")||N._trigger("select",null,N._ui(this,Q[0]))===false){this.blur();return false}D.selected=N.anchors.index(this);N.abort();if(D.collapsible){if(R.hasClass("ui-tabs-selected")){D.selected=-1;if(D.cookie){N._cookie(D.selected,D.cookie)}N.element.queue("tabs",function(){K(P,O)}).dequeue("tabs");this.blur();return false}else{if(!O.length){if(D.cookie){N._cookie(D.selected,D.cookie)}N.element.queue("tabs",function(){J(P,Q)});N.load(N.anchors.index(this));this.blur();return false}}}if(D.cookie){N._cookie(D.selected,D.cookie)}if(Q.length){if(O.length){N.element.queue("tabs",function(){K(P,O)})}N.element.queue("tabs",function(){J(P,Q)});N.load(N.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(E,D,C){if(C===undefined){C=this.anchors.length}var B=this,G=this.options,I=A(G.tabTemplate.replace(/#\{href\}/g,E).replace(/#\{label\}/g,D)),H=!E.indexOf("#")?E.replace("#",""):this._tabId(A("a",I)[0]);I.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var F=A("#"+H);if(!F.length){F=A(G.panelTemplate).attr("id",H).data("destroy.tabs",true)}F.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(C>=this.lis.length){I.appendTo(this.list);F.appendTo(this.list[0].parentNode)}else{I.insertBefore(this.lis[C]);F.insertBefore(this.panels[C])}G.disabled=A.map(G.disabled,function(K,J){return K>=C?++K:K});this._tabify();if(this.anchors.length==1){I.addClass("ui-tabs-selected ui-state-active");F.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){B._trigger("show",null,B._ui(B.anchors[0],B.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[C],this.panels[C]))},remove:function(B){var D=this.options,E=this.lis.eq(B).remove(),C=this.panels.eq(B).remove();if(E.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(B+(B+1<this.anchors.length?1:-1))}D.disabled=A.map(A.grep(D.disabled,function(G,F){return G!=B}),function(G,F){return G>=B?--G:G});this._tabify();this._trigger("remove",null,this._ui(E.find("a")[0],C[0]))},enable:function(B){var C=this.options;if(A.inArray(B,C.disabled)==-1){return }this.lis.eq(B).removeClass("ui-state-disabled");C.disabled=A.grep(C.disabled,function(E,D){return E!=B});this._trigger("enable",null,this._ui(this.anchors[B],this.panels[B]))},disable:function(C){var B=this,D=this.options;if(C!=D.selected){this.lis.eq(C).addClass("ui-state-disabled");D.disabled.push(C);D.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[C],this.panels[C]))}},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(E){var C=this,G=this.options,B=this.anchors.eq(E)[0],D=A.data(B,"load.tabs");this.abort();if(!D||this.element.queue("tabs").length!==0&&A.data(B,"cache.tabs")){this.element.dequeue("tabs");return }this.lis.eq(E).addClass("ui-state-processing");if(G.spinner){var F=A("span",B);F.data("label.tabs",F.html()).html(G.spinner)}this.xhr=A.ajax(A.extend({},G.ajaxOptions,{url:D,success:function(I,H){A(C._sanitizeSelector(B.hash)).html(I);C._cleanup();if(G.cache){A.data(B,"cache.tabs",true)}C._trigger("load",null,C._ui(C.anchors[E],C.panels[E]));try{G.ajaxOptions.success(I,H)}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,F){var B=this,G=this.options;var C=B._rotate||(B._rotate=function(H){clearTimeout(B.rotation);B.rotation=setTimeout(function(){var I=G.selected;B.select(++I<B.anchors.length?I:0)},D);if(H){H.stopPropagation()}});var E=B._unrotate||(B._unrotate=!F?function(H){if(H.clientX){B.rotate(null)}}:function(H){t=G.selected;C()});if(D){this.element.bind("tabsshow",C);this.anchors.bind(G.event+".tabs",E);C()}else{clearTimeout(B.rotation);this.element.unbind("tabsshow",C);this.anchors.unbind(G.event+".tabs",E);delete this._rotate;delete this._unrotate}}})})(jQuery);
