(function(C){C.ui=C.ui||{};C.extend(C.ui,{plugin:{add:function(E,F,H){var G=C.ui[E].prototype;for(var D in H){G.plugins[D]=G.plugins[D]||[];G.plugins[D].push([F,H[D]])}},call:function(D,E,G){var H=D.plugins[E];if(!H){return }for(var F=0;F<H.length;F++){if(D.options[H[F][0]]){H[F][1].apply(D.element,G)}}}},cssCache:{},css:function(D){if(C.ui.cssCache[D]){return C.ui.cssCache[D]}var E=C('<div class="ui-resizable-gen">').addClass(D).css({position:"absolute",top:"-5000px",left:"-5000px",display:"block"}).appendTo("body");C.ui.cssCache[D]=!!((!/auto|default/.test(E.css("cursor"))||(/^[1-9]/).test(E.css("height"))||(/^[1-9]/).test(E.css("width"))||!(/none/).test(E.css("backgroundImage"))||!(/transparent|rgba\(0, 0, 0, 0\)/).test(E.css("backgroundColor"))));try{C("body").get(0).removeChild(E.get(0))}catch(F){}return C.ui.cssCache[D]},disableSelection:function(D){D.unselectable="on";D.onselectstart=function(){return false};if(D.style){D.style.MozUserSelect="none"}},enableSelection:function(D){D.unselectable="off";D.onselectstart=function(){return true};if(D.style){D.style.MozUserSelect=""}},hasScroll:function(G,E){var D=/top/.test(E||"top")?"scrollTop":"scrollLeft",F=false;if(G[D]>0){return true}G[D]=1;F=G[D]>0?true:false;G[D]=0;return F}});C.each(["Left","Top"],function(E,D){if(!C.fn["scroll"+D]){C.fn["scroll"+D]=function(F){return F!=undefined?this.each(function(){this==window||this==document?window.scrollTo(D=="Left"?F:C(window)["scrollLeft"](),D=="Top"?F:C(window)["scrollTop"]()):this["scroll"+D]=F}):this[0]==window||this[0]==document?self[(D=="Left"?"pageXOffset":"pageYOffset")]||C.boxModel&&document.documentElement["scroll"+D]||document.body["scroll"+D]:this[0]["scroll"+D]}}});var B=C.fn.remove;C.fn.extend({position:function(){var F=this.offset();var E=this.offsetParent();var D=E.offset();return{top:F.top-A(this[0],"marginTop")-D.top-A(E,"borderTopWidth"),left:F.left-A(this[0],"marginLeft")-D.left-A(E,"borderLeftWidth")}},offsetParent:function(){var D=this[0].offsetParent;while(D&&(!/^body|html$/i.test(D.tagName)&&C.css(D,"position")=="static")){D=D.offsetParent}return C(D)},mouseInteraction:function(D){return this.each(function(){new C.ui.mouseInteraction(this,D)})},removeMouseInteraction:function(D){return this.each(function(){if(C.data(this,"ui-mouse")){C.data(this,"ui-mouse").destroy()}})},remove:function(){jQuery("*",this).add(this).trigger("remove");return B.apply(this,arguments)}});function A(D,E){return parseInt(C.curCSS(D.jquery?D[0]:D,E,true))||0}C.ui.mouseInteraction=function(F,E){var D=this;this.element=F;C.data(this.element,"ui-mouse",this);this.options=C.extend({},E);C(F).bind("mousedown.draggable",function(){return D.click.apply(D,arguments)});if(C.browser.msie){C(F).attr("unselectable","on")}C(F).mouseup(function(){if(D.timer){clearInterval(D.timer)}})};C.extend(C.ui.mouseInteraction.prototype,{destroy:function(){C(this.element).unbind("mousedown.draggable")},trigger:function(){return this.click.apply(this,arguments)},click:function(F){if(F.which!=1||C.inArray(F.target.nodeName.toLowerCase(),this.options.dragPrevention||[])!=-1||(this.options.condition&&!this.options.condition.apply(this.options.executor||this,[F,this.element]))){return true}var E=this;var D=function(){E._MP={left:F.pageX,top:F.pageY};C(document).bind("mouseup.draggable",function(){return E.stop.apply(E,arguments)});C(document).bind("mousemove.draggable",function(){return E.drag.apply(E,arguments)});if(!E.initalized&&Math.abs(E._MP.left-F.pageX)>=E.options.distance||Math.abs(E._MP.top-F.pageY)>=E.options.distance){if(E.options.start){E.options.start.call(E.options.executor||E,F,E.element)}if(E.options.drag){E.options.drag.call(E.options.executor||E,F,this.element)}E.initialized=true}};if(this.options.delay){if(this.timer){clearInterval(this.timer)}this.timer=setTimeout(D,this.options.delay)}else{D()}return false},stop:function(D){var E=this.options;if(!this.initialized){return C(document).unbind("mouseup.draggable").unbind("mousemove.draggable")}if(this.options.stop){this.options.stop.call(this.options.executor||this,D,this.element)}C(document).unbind("mouseup.draggable").unbind("mousemove.draggable");this.initialized=false;return false},drag:function(D){var E=this.options;if(C.browser.msie&&!D.button){return this.stop.apply(this,[D])}if(!this.initialized&&(Math.abs(this._MP.left-D.pageX)>=E.distance||Math.abs(this._MP.top-D.pageY)>=E.distance)){if(this.options.start){this.options.start.call(this.options.executor||this,D,this.element)}this.initialized=true}else{if(!this.initialized){return false}}if(E.drag){E.drag.call(this.options.executor||this,D,this.element)}return false}})})(jQuery);(function(A){A.fn.extend({draggable:function(C){var B=Array.prototype.slice.call(arguments,1);return this.each(function(){if(typeof C=="string"){var D=A.data(this,"draggable");if(D){D[C].apply(D,B)}}else{if(!A.data(this,"draggable")){new A.ui.draggable(this,C)}}})}});A.ui.draggable=function(D,C){var B=this;this.element=A(D);A.data(D,"draggable",this);this.element.addClass("ui-draggable");this.options=A.extend({},C);var E=this.options;A.extend(E,{helper:E.ghosting==true?"clone":(E.helper||"original"),handle:E.handle?(A(E.handle,D)[0]?A(E.handle,D):this.element):this.element,appendTo:E.appendTo||"parent"});A(D).bind("setData.draggable",function(G,F,H){B.options[F]=H}).bind("getData.draggable",function(G,F){return B.options[F]});A(E.handle).mouseInteraction({executor:this,delay:E.delay,distance:E.distance||1,dragPrevention:E.cancel||E.cancel===""?E.cancel.toLowerCase().split(","):["input","textarea","button","select","option"],start:this.start,stop:this.stop,drag:this.drag,condition:function(F){return !(F.target.className.indexOf("ui-resizable-handle")!=-1||this.options.disabled)}});if(E.helper=="original"&&(this.element.css("position")=="static"||this.element.css("position")=="")){this.element.css("position","relative")}if(E.cursorAt&&E.cursorAt.constructor==Array){E.cursorAt={left:E.cursorAt[0],top:E.cursorAt[1]}}};A.extend(A.ui.draggable.prototype,{plugins:{},ui:function(B){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,instance:this,options:this.options,element:this.element}},propagate:function(C,B){A.ui.plugin.call(this,C,[B,this.ui()]);return this.element.triggerHandler(C=="drag"?C:"drag"+C,[B,this.ui()],this.options[C])},destroy:function(){if(!A.data(this.element[0],"draggable")){return }this.options.handle.removeMouseInteraction();this.element.removeClass("ui-draggable ui-draggable-disabled").removeData("draggable").unbind(".draggable")},enable:function(){this.element.removeClass("ui-draggable-disabled");this.options.disabled=false},disable:function(){this.element.addClass("ui-draggable-disabled");this.options.disabled=true},setContrains:function(B,C,E,D){this.minLeft=B;this.maxLeft=C;this.minTop=E;this.maxTop=D;this.constrainsSet=true},checkConstrains:function(){if(!this.constrainsSet){return }if(this.position.left<this.minLeft){this.position.left=this.minLeft}if(this.position.left>this.maxLeft-this.helperProportions.width){this.position.left=this.maxLeft-this.helperProportions.width}if(this.position.top<this.minTop){this.position.top=this.minTop}if(this.position.top>this.maxTop-this.helperProportions.height){this.position.top=this.maxTop-this.helperProportions.height}},recallOffset:function(D){var C={left:this.elementOffset.left-this.offsetParentOffset.left,top:this.elementOffset.top-this.offsetParentOffset.top};var B=this.helper.css("position")=="relative";this.originalPosition={left:(B?parseInt(this.helper.css("left"),10)||0:C.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft)),top:(B?parseInt(this.helper.css("top"),10)||0:C.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop))};this.offset={left:this._pageX-this.originalPosition.left,top:this._pageY-this.originalPosition.top}},start:function(D){var E=this.options;if(A.ui.ddmanager){A.ui.ddmanager.current=this}this.helper=typeof E.helper=="function"?A(E.helper.apply(this.element[0],[D])):(E.helper=="clone"?this.element.clone().appendTo((E.appendTo=="parent"?this.element[0].parentNode:E.appendTo)):this.element);if(this.helper[0]!=this.element[0]){this.helper.css("position","absolute")}if(!this.helper.parents("body").length){this.helper.appendTo((E.appendTo=="parent"?this.element[0].parentNode:E.appendTo))}this.offsetParent=(function(F){while(F){if(F.style&&(/(absolute|relative|fixed)/).test(A.css(F,"position"))){return A(F)}F=F.parentNode?F.parentNode:null}return A("body")})(this.helper[0].parentNode);this.elementOffset=this.element.offset();this.offsetParentOffset=this.offsetParent.offset();var C={left:this.elementOffset.left-this.offsetParentOffset.left,top:this.elementOffset.top-this.offsetParentOffset.top};this._pageX=D.pageX;this._pageY=D.pageY;this.clickOffset={left:D.pageX-this.elementOffset.left,top:D.pageY-this.elementOffset.top};var B=this.helper.css("position")=="relative";this.originalPosition={left:(B?parseInt(this.helper.css("left"),10)||0:C.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft)),top:(B?parseInt(this.helper.css("top"),10)||0:C.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop))};if(this.element.css("position")=="fixed"){this.originalPosition.top-=this.offsetParent[0]==document.body?A(document).scrollTop():this.offsetParent[0].scrollTop;this.originalPosition.left-=this.offsetParent[0]==document.body?A(document).scrollLeft():this.offsetParent[0].scrollLeft}this.offset={left:D.pageX-this.originalPosition.left,top:D.pageY-this.originalPosition.top};if(this.element[0]!=this.helper[0]){this.offset.left+=parseInt(this.element.css("marginLeft"),10)||0;this.offset.top+=parseInt(this.element.css("marginTop"),10)||0}this.propagate("start",D);this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};if(A.ui.ddmanager&&!E.dropBehaviour){A.ui.ddmanager.prepareOffsets(this,D)}if(E.cursorAt){if(E.cursorAt.top!=undefined||E.cursorAt.bottom!=undefined){this.offset.top-=this.clickOffset.top-(E.cursorAt.top!=undefined?E.cursorAt.top:(this.helperProportions.height-E.cursorAt.bottom));this.clickOffset.top=(E.cursorAt.top!=undefined?E.cursorAt.top:(this.helperProportions.height-E.cursorAt.bottom))}if(E.cursorAt.left!=undefined||E.cursorAt.right!=undefined){this.offset.left-=this.clickOffset.left-(E.cursorAt.left!=undefined?E.cursorAt.left:(this.helperProportions.width-E.cursorAt.right));this.clickOffset.left=(E.cursorAt.left!=undefined?E.cursorAt.left:(this.helperProportions.width-E.cursorAt.right))}}return false},clear:function(){if(A.ui.ddmanager){A.ui.ddmanager.current=null}this.helper=null},stop:function(B){if(A.ui.ddmanager&&!this.options.dropBehaviour){A.ui.ddmanager.drop(this,B)}this.propagate("stop",B);if(this.cancelHelperRemoval){return false}if(this.options.helper!="original"){this.helper.remove()}this.clear();return false},drag:function(B){this.position={top:B.pageY-this.offset.top,left:B.pageX-this.offset.left};this.positionAbs={left:B.pageX-this.clickOffset.left,top:B.pageY-this.clickOffset.top};this.checkConstrains();this.position=this.propagate("drag",B)||this.position;this.checkConstrains();A(this.helper).css({left:this.position.left+"px",top:this.position.top+"px"});if(A.ui.ddmanager){A.ui.ddmanager.drag(this,B)}return false}});A.ui.plugin.add("draggable","cursor",{start:function(D,C){var B=A("body");if(B.css("cursor")){C.options._cursor=B.css("cursor")}B.css("cursor",C.options.cursor)},stop:function(C,B){if(B.options._cursor){A("body").css("cursor",B.options._cursor)}}});A.ui.plugin.add("draggable","zIndex",{start:function(D,C){var B=A(C.helper);if(B.css("zIndex")){C.options._zIndex=B.css("zIndex")}B.css("zIndex",C.options.zIndex)},stop:function(C,B){if(B.options._zIndex){A(B.helper).css("zIndex",B.options._zIndex)}}});A.ui.plugin.add("draggable","opacity",{start:function(D,C){var B=A(C.helper);if(B.css("opacity")){C.options._opacity=B.css("opacity")}B.css("opacity",C.options.opacity)},stop:function(C,B){if(B.options._opacity){A(B.helper).css("opacity",B.options._opacity)}}});A.ui.plugin.add("draggable","revert",{stop:function(E,D){var B=D.instance,C=A(B.helper);B.cancelHelperRemoval=true;A(D.helper).animate({left:B.originalPosition.left,top:B.originalPosition.top},parseInt(D.options.revert,10)||500,function(){if(D.options.helper!="original"){C.remove()}if(!C){B.clear()}})}});A.ui.plugin.add("draggable","iframeFix",{start:function(D,C){var F=C.options;if(C.instance.slowMode){return }if(F.iframeFix.constructor==Array){for(var B=0;B<F.iframeFix.length;B++){var E=A(F.iframeFix[B]).offset({border:false});A('<div class="DragDropIframeFix"" style="background: #fff;"></div>').css("width",A(F.iframeFix[B])[0].offsetWidth+"px").css("height",A(F.iframeFix[B])[0].offsetHeight+"px").css("position","absolute").css("opacity","0.001").css("z-index","1000").css("top",E.top+"px").css("left",E.left+"px").appendTo("body")}}else{A("iframe").each(function(){var G=A(this).offset({border:false});A('<div class="DragDropIframeFix" style="background: #fff;"></div>').css("width",this.offsetWidth+"px").css("height",this.offsetHeight+"px").css("position","absolute").css("opacity","0.001").css("z-index","1000").css("top",G.top+"px").css("left",G.left+"px").appendTo("body")})}},stop:function(C,B){if(B.options.iframeFix){A("div.DragDropIframeFix").each(function(){this.parentNode.removeChild(this)})}}});A.ui.plugin.add("draggable","containment",{start:function(E,C){var G=C.options;var B=C.instance;if((G.containment.left!=undefined||G.containment.constructor==Array)&&!G._containment){return }if(!G._containment){G._containment=G.containment}if(G._containment=="parent"){G._containment=this[0].parentNode}if(G._containment=="document"){G.containment=[0,0,A(document).width(),(A(document).height()||document.body.parentNode.scrollHeight)]}else{var D=A(G._containment)[0];var F=A(G._containment).offset();G.containment=[F.left,F.top,F.left+(D.offsetWidth||D.scrollWidth),F.top+(D.offsetHeight||D.scrollHeight)]}var H=G.containment;C.instance.setContrains(H[0]-(B.offset.left-B.clickOffset.left),H[2]-(B.offset.left-B.clickOffset.left),H[1]-(B.offset.top-B.clickOffset.top),H[3]-(B.offset.top-B.clickOffset.top))}});A.ui.plugin.add("draggable","grid",{drag:function(E,D){var F=D.options;var C=D.instance.originalPosition.left+Math.round((E.pageX-D.instance._pageX)/F.grid[0])*F.grid[0];var B=D.instance.originalPosition.top+Math.round((E.pageY-D.instance._pageY)/F.grid[1])*F.grid[1];D.instance.position.left=C;D.instance.position.top=B}});A.ui.plugin.add("draggable","axis",{drag:function(C,B){var D=B.options;if(D.constraint){D.axis=D.constraint}switch(D.axis){case"x":B.instance.position.top=B.instance.originalPosition.top;break;case"y":B.instance.position.left=B.instance.originalPosition.left;break}}});A.ui.plugin.add("draggable","scroll",{start:function(C,B){var D=B.options;D.scrollSensitivity=D.scrollSensitivity||20;D.scrollSpeed=D.scrollSpeed||20;B.instance.overflowY=function(E){do{if(/auto|scroll/.test(E.css("overflow"))||(/auto|scroll/).test(E.css("overflow-y"))){return E}E=E.parent()}while(E[0].parentNode);return A(document)}(this);B.instance.overflowX=function(E){do{if(/auto|scroll/.test(E.css("overflow"))||(/auto|scroll/).test(E.css("overflow-x"))){return E}E=E.parent()}while(E[0].parentNode);return A(document)}(this)},drag:function(D,C){var E=C.options;var B=C.instance;if(B.overflowY[0]!=document&&B.overflowY[0].tagName!="HTML"){if(B.overflowY[0].offsetHeight-(C.position.top-B.overflowY[0].scrollTop+B.clickOffset.top)<E.scrollSensitivity){B.overflowY[0].scrollTop=B.overflowY[0].scrollTop+E.scrollSpeed}if((C.position.top-B.overflowY[0].scrollTop+B.clickOffset.top)<E.scrollSensitivity){B.overflowY[0].scrollTop=B.overflowY[0].scrollTop-E.scrollSpeed}}else{if(D.pageY-A(document).scrollTop()<E.scrollSensitivity){A(document).scrollTop(A(document).scrollTop()-E.scrollSpeed)}if(A(window).height()-(D.pageY-A(document).scrollTop())<E.scrollSensitivity){A(document).scrollTop(A(document).scrollTop()+E.scrollSpeed)}}if(B.overflowX[0]!=document&&B.overflowX[0].tagName!="HTML"){if(B.overflowX[0].offsetWidth-(C.position.left-B.overflowX[0].scrollLeft+B.clickOffset.left)<E.scrollSensitivity){B.overflowX[0].scrollLeft=B.overflowX[0].scrollLeft+E.scrollSpeed}if((C.position.top-B.overflowX[0].scrollLeft+B.clickOffset.left)<E.scrollSensitivity){B.overflowX[0].scrollLeft=B.overflowX[0].scrollLeft-E.scrollSpeed}}else{if(D.pageX-A(document).scrollLeft()<E.scrollSensitivity){A(document).scrollLeft(A(document).scrollLeft()-E.scrollSpeed)}if(A(window).width()-(D.pageX-A(document).scrollLeft())<E.scrollSensitivity){A(document).scrollLeft(A(document).scrollLeft()+E.scrollSpeed)}}C.instance.recallOffset(D)}});A.ui.plugin.add("draggable","snap",{start:function(C,B){B.instance.snapElements=[];A(B.options.snap===true?".ui-draggable":B.options.snap).each(function(){var E=A(this);var D=E.offset();if(this!=B.instance.element[0]){B.instance.snapElements.push({item:this,width:E.outerWidth(),height:E.outerHeight(),top:D.top,left:D.left})}})},drag:function(I,M){var K=M.options.snapTolerance||20;var D=M.absolutePosition.left,C=D+M.instance.helperProportions.width,O=M.absolutePosition.top,N=O+M.instance.helperProportions.height;for(var H=M.instance.snapElements.length-1;H>=0;H--){var E=M.instance.snapElements[H].left,B=E+M.instance.snapElements[H].width,Q=M.instance.snapElements[H].top,L=Q+M.instance.snapElements[H].height;if(!((E-K<D&&D<B+K&&Q-K<O&&O<L+K)||(E-K<D&&D<B+K&&Q-K<N&&N<L+K)||(E-K<C&&C<B+K&&Q-K<O&&O<L+K)||(E-K<C&&C<B+K&&Q-K<N&&N<L+K))){continue}if(M.options.snapMode!="inner"){var J=Math.abs(Q-N)<=20;var P=Math.abs(L-O)<=20;var G=Math.abs(E-C)<=20;var F=Math.abs(B-D)<=20;if(J){M.position.top=Q-M.instance.offset.top+M.instance.clickOffset.top-M.instance.helperProportions.height}if(P){M.position.top=L-M.instance.offset.top+M.instance.clickOffset.top}if(G){M.position.left=E-M.instance.offset.left+M.instance.clickOffset.left-M.instance.helperProportions.width}if(F){M.position.left=B-M.instance.offset.left+M.instance.clickOffset.left}}if(M.options.snapMode!="outer"){var J=Math.abs(Q-O)<=20;var P=Math.abs(L-N)<=20;var G=Math.abs(E-D)<=20;var F=Math.abs(B-C)<=20;if(J){M.position.top=Q-M.instance.offset.top+M.instance.clickOffset.top}if(P){M.position.top=L-M.instance.offset.top+M.instance.clickOffset.top-M.instance.helperProportions.height}if(G){M.position.left=E-M.instance.offset.left+M.instance.clickOffset.left}if(F){M.position.left=B-M.instance.offset.left+M.instance.clickOffset.left-M.instance.helperProportions.width}}}}});A.ui.plugin.add("draggable","connectToSortable",{start:function(C,B){B.instance.sortable=A.data(A(B.options.connectToSortable)[0],"sortable");B.instance.sortableOffset=B.instance.sortable.element.offset();B.instance.sortableOuterWidth=B.instance.sortable.element.outerWidth();B.instance.sortableOuterHeight=B.instance.sortable.element.outerHeight();if(B.instance.sortable.options.revert){B.instance.sortable.shouldRevert=true}},stop:function(D,C){var B=C.instance.sortable;if(B.isOver){B.isOver=0;C.instance.cancelHelperRemoval=true;B.cancelHelperRemoval=false;if(B.shouldRevert){B.options.revert=true}B.stop(D);B.options.helper="original"}},drag:function(F,E){var D=E.instance.sortable;E.instance.position.absolute=E.absolutePosition;if(D.intersectsWith.call(E.instance,{left:E.instance.sortableOffset.left,top:E.instance.sortableOffset.top,width:E.instance.sortableOuterWidth,height:E.instance.sortableOuterHeight})){if(!D.isOver){D.isOver=1;var B=D.options.placeholderElement?A(D.options.placeholderElement,A(D.options.items,D.element)).innerHeight():A(D.options.items,D.element).innerHeight();var C=D.options.placeholderElement?A(D.options.placeholderElement,A(D.options.items,D.element)).innerWidth():A(D.options.items,D.element).innerWidth();D.currentItem=A(this).clone().appendTo(D.element);D.options.helper=function(){return E.helper[0]};D.start(F);D.clickOffset.top=E.instance.clickOffset.top;D.clickOffset.left=E.instance.clickOffset.left;D.offset.left-=E.absolutePosition.left-D.position.absolute.left;D.offset.top-=E.absolutePosition.top-D.position.absolute.top;D.helperProportions={width:C,height:B};E.helper.animate({height:B,width:C},500);E.instance.propagate("toSortable",F)}if(D.currentItem){D.drag(F)}}else{if(D.isOver){D.isOver=0;D.cancelHelperRemoval=true;D.options.revert=false;D.stop(F);D.options.helper="original";D.currentItem.remove();D.placeholder.remove();E.helper.animate({height:this.innerHeight(),width:this.innerWidth()},500);E.instance.propagate("fromSortable",F)}}}})})(jQuery);(function(A){A.fn.extend({droppable:function(C){var B=Array.prototype.slice.call(arguments,1);return this.each(function(){if(typeof C=="string"){var D=A.data(this,"droppable");if(D){D[C].apply(D,B)}}else{if(!A.data(this,"droppable")){new A.ui.droppable(this,C)}}})}});A.ui.droppable=function(E,C){var B=this;this.element=A(E);A.data(E,"droppable",this);this.element.addClass("ui-droppable");var F=this.options=C=A.extend({},A.ui.droppable.defaults,C);var D=F.accept;F=A.extend(F,{accept:F.accept&&F.accept.constructor==Function?F.accept:function(G){return A(G).is(D)}});A(E).bind("setData.droppable",function(H,G,I){F[G]=I}).bind("getData.droppable",function(H,G){return F[G]}).bind("remove",function(){B.destroy()});this.proportions={width:this.element.outerWidth(),height:this.element.outerHeight()};A.ui.ddmanager.droppables.push({item:this,over:0,out:1})};A.extend(A.ui.droppable,{defaults:{disabled:false,tolerance:"intersect"}});A.extend(A.ui.droppable.prototype,{plugins:{},ui:function(B){return{instance:this,draggable:(B.currentItem||B.element),helper:B.helper,position:B.position,absolutePosition:B.positionAbs,options:this.options,element:this.element}},destroy:function(){var B=A.ui.ddmanager.droppables;for(var C=0;C<B.length;C++){if(B[C].item==this){B.splice(C,1)}}this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable")},enable:function(){this.element.removeClass("ui-droppable-disabled");this.options.disabled=false},disable:function(){this.element.addClass("ui-droppable-disabled");this.options.disabled=true},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,(B.currentItem||B.element))){A.ui.plugin.call(this,"over",[C,this.ui(B)]);this.element.triggerHandler("dropover",[C,this.ui(B)],this.options.over)}},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,(B.currentItem||B.element))){A.ui.plugin.call(this,"out",[C,this.ui(B)]);this.element.triggerHandler("dropout",[C,this.ui(B)],this.options.out)}},drop:function(D,C){var B=C||A.ui.ddmanager.current;if(!B||(B.currentItem||B.element)[0]==this.element[0]){return }var E=false;this.element.find(".ui-droppable").each(function(){var F=A.data(this,"droppable");if(F.options.greedy&&A.ui.intersect(B,{item:F,offset:F.element.offset()},F.options.tolerance)){E=true;return false}});if(E){return }if(this.options.accept.call(this.element,(B.currentItem||B.element))){A.ui.plugin.call(this,"drop",[D,this.ui(B)]);this.element.triggerHandler("drop",[D,this.ui(B)],this.options.drop)}},activate:function(C){var B=A.ui.ddmanager.current;A.ui.plugin.call(this,"activate",[C,this.ui(B)]);if(B){this.element.triggerHandler("dropactivate",[C,this.ui(B)],this.options.activate)}},deactivate:function(C){var B=A.ui.ddmanager.current;A.ui.plugin.call(this,"deactivate",[C,this.ui(B)]);if(B){this.element.triggerHandler("dropdeactivate",[C,this.ui(B)],this.options.deactivate)}}});A.ui.intersect=function(L,F,J){if(!F.offset){return false}var D=(L.positionAbs||L.position.absolute).left,C=D+L.helperProportions.width,I=(L.positionAbs||L.position.absolute).top,H=I+L.helperProportions.height;var E=F.offset.left,B=E+F.item.proportions.width,K=F.offset.top,G=K+F.item.proportions.height;switch(J){case"fit":if(!((H-(L.helperProportions.height/2)>K&&I<K)||(I<G&&H>G)||(C>E&&D<E)||(D<B&&C>B))){return false}if(H-(L.helperProportions.height/2)>K&&I<K){return 1}if(I<G&&H>G){return 2}if(C>E&&D<E){return 1}if(D<B&&C>B){return 2}break;case"intersect":return(E<D+(L.helperProportions.width/2)&&C-(L.helperProportions.width/2)<B&&K<I+(L.helperProportions.height/2)&&H-(L.helperProportions.height/2)<G);break;case"pointer":return(E<((L.positionAbs||L.position.absolute).left+L.clickOffset.left)&&((L.positionAbs||L.position.absolute).left+L.clickOffset.left)<B&&K<((L.positionAbs||L.position.absolute).top+L.clickOffset.top)&&((L.positionAbs||L.position.absolute).top+L.clickOffset.top)<G);break;case"touch":return((I>=K&&I<=G)||(H>=K&&H<=G)||(I<K&&H>G))&&((D>=E&&D<=B)||(C>=E&&C<=B)||(D<E&&C>B));break;default:return false;break}};A.ui.ddmanager={current:null,droppables:[],prepareOffsets:function(D,F){var B=A.ui.ddmanager.droppables;var E=F?F.type:null;for(var C=0;C<B.length;C++){if(B[C].item.options.disabled||(D&&!B[C].item.options.accept.call(B[C].item.element,(D.currentItem||D.element)))){continue}B[C].offset=A(B[C].item.element).offset();B[C].item.proportions={width:B[C].item.element.outerWidth(),height:B[C].item.element.outerHeight()};if(E=="dragstart"){B[C].item.activate.call(B[C].item,F)}}},drop:function(B,C){A.each(A.ui.ddmanager.droppables,function(){if(!this.item.options.disabled&&A.ui.intersect(B,this,this.item.options.tolerance)){this.item.drop.call(this.item,C)}if(!this.item.options.disabled&&this.item.options.accept.call(this.item.element,(B.currentItem||B.element))){this.out=1;this.over=0;this.item.deactivate.call(this.item,C)}})},drag:function(B,C){if(B.options.refreshPositions){A.ui.ddmanager.prepareOffsets(B,C)}A.each(A.ui.ddmanager.droppables,function(){if(this.item.disabled||this.greedyChild){return }var E=A.ui.intersect(B,this,this.item.options.tolerance);var F=!E&&this.over==1?"out":(E&&this.over==0?"over":null);if(!F){return }var D=A.data(this.item.element[0],"droppable");if(D.options.greedy){this.item.element.parents(".ui-droppable:eq(0)").each(function(){var G=this;A.each(A.ui.ddmanager.droppables,function(){if(this.item.element[0]!=G){return }this[F]=0;this[F=="out"?"over":"out"]=1;this.greedyChild=(F=="over"?1:0);this.item[F=="out"?"over":"out"].call(this.item,C);return false})})}this[F]=1;this[F=="out"?"over":"out"]=0;this.item[F].call(this.item,C)})}};A.ui.plugin.add("droppable","activeClass",{activate:function(C,B){A(this).addClass(B.options.activeClass)},deactivate:function(C,B){A(this).removeClass(B.options.activeClass)},drop:function(C,B){A(this).removeClass(B.options.activeClass)}});A.ui.plugin.add("droppable","hoverClass",{over:function(C,B){A(this).addClass(B.options.hoverClass)},out:function(C,B){A(this).removeClass(B.options.hoverClass)},drop:function(C,B){A(this).removeClass(B.options.hoverClass)}})})(jQuery);(function(A){A.fn.extend({resizable:function(C,D){var B=Array.prototype.slice.call(arguments,1);return this.each(function(){if(typeof C=="string"){var E=A.data(this,"resizable");if(E){E[C].apply(E,B)}}else{if(!A(this).is(".ui-resizable")){new A.ui.resizable(this,C)}}})}});A.ui.resizable=function(E,H){var O=this;this.element=A(E);A.data(E,"resizable",this);var S=this.element.css("position");this.element.addClass("ui-resizable").css({position:/static/.test(S)?"relative":S});this.options=A.extend({preventDefault:true,transparent:false,minWidth:10,minHeight:10,aspectRatio:false,disableSelection:true,preserveCursor:true,autohide:false,knobHandles:false},H);this.options._aspectRatio=!!(this.options.aspectRatio);this.options.proxy=this.options.proxy||this.options.ghost?"proxy":null;this.options.proxy=this.options.proxy||this.options.animate?"proxy":null;this.options.knobHandles=this.options.knobHandles===true?"ui-resizable-knob-handle":this.options.knobHandles;A(E).bind("setData.resizable",function(X,W,Y){O.options[W]=Y}).bind("getData.resizable",function(X,W){return O.options[W]});var P=this.options;var J="1px solid #DEDEDE";P.defaultTheme={"ui-resizable":{display:"block"},"ui-resizable-handle":{position:"absolute",background:"#F2F2F2",fontSize:"0.1px"},"ui-resizable-n":{cursor:"n-resize",height:"4px",left:"0px",right:"0px",borderTop:J},"ui-resizable-s":{cursor:"s-resize",height:"4px",left:"0px",right:"0px",borderBottom:J},"ui-resizable-e":{cursor:"e-resize",width:"4px",top:"0px",bottom:"0px",borderRight:J},"ui-resizable-w":{cursor:"w-resize",width:"4px",top:"0px",bottom:"0px",borderLeft:J},"ui-resizable-se":{cursor:"se-resize",width:"4px",height:"4px",borderRight:J,borderBottom:J},"ui-resizable-sw":{cursor:"sw-resize",width:"4px",height:"4px",borderBottom:J,borderLeft:J},"ui-resizable-ne":{cursor:"ne-resize",width:"4px",height:"4px",borderRight:J,borderTop:J},"ui-resizable-nw":{cursor:"nw-resize",width:"4px",height:"4px",borderLeft:J,borderTop:J}};P.knobTheme={"ui-resizable-handle":{background:"#F2F2F2",border:"1px solid #808080",height:"8px",width:"8px"},"ui-resizable-n":{cursor:"n-resize",top:"-4px",left:"45%"},"ui-resizable-s":{cursor:"s-resize",bottom:"-4px",left:"45%"},"ui-resizable-e":{cursor:"e-resize",right:"-4px",top:"45%"},"ui-resizable-w":{cursor:"w-resize",left:"-4px",top:"45%"},"ui-resizable-se":{cursor:"se-resize",right:"-4px",bottom:"-4px"},"ui-resizable-sw":{cursor:"sw-resize",left:"-4px",bottom:"-4px"},"ui-resizable-nw":{cursor:"nw-resize",left:"-4px",top:"-4px"},"ui-resizable-ne":{cursor:"ne-resize",right:"-4px",top:"-4px"}};if(!P.proxy&&(this.element.css("position")=="static"||this.element.css("position")==="")){this.element.css("position","relative")}P._nodeName=E.nodeName;if(P._nodeName.match(/textarea|input|select|button|img/i)){var B=this.element;if(/relative/.test(B.css("position"))&&A.browser.opera){B.css({position:"relative",top:"auto",left:"auto"})}B.wrap(A('<div class="ui-wrapper"	style="overflow: hidden;"></div>').css({position:B.css("position"),width:B.outerWidth(),height:B.outerHeight(),top:B.css("top"),left:B.css("left")}));var L=this.element;E=E.parentNode;this.element=A(E);this.element.css({marginLeft:L.css("marginLeft"),marginTop:L.css("marginTop"),marginRight:L.css("marginRight"),marginBottom:L.css("marginBottom")});L.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});if(A.browser.safari&&P.preventDefault){L.css("resize","none")}P.proportionallyResize=L.css({position:"static",zoom:1,display:"block"});this.element.css({margin:L.css("margin")});this._proportionallyResize()}if(!P.handles){P.handles=!A(".ui-resizable-handle",E).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(P.handles.constructor==String){if(P.handles=="all"){P.handles="n,e,s,w,se,sw,ne,nw"}var Q=P.handles.split(",");P.handles={};P.zIndex=P.zIndex||1000;var I={handle:"position: absolute; display: none; overflow:hidden;",n:"top: 0pt; width:100%;",e:"right: 0pt; height:100%;",s:"bottom: 0pt; width:100%;",w:"left: 0pt; height:100%;",se:"bottom: 0pt; right: 0px;",sw:"bottom: 0pt; left: 0px;",ne:"top: 0pt; right: 0px;",nw:"top: 0pt; left: 0px;"};for(var T=0;T<Q.length;T++){var U=jQuery.trim(Q[T]),N=P.defaultTheme,G="ui-resizable-"+U,D=!A.ui.css(G)&&!P.knobHandles,R=A.ui.css("ui-resizable-knob-handle"),V=A.extend(N[G],N["ui-resizable-handle"]),C=A.extend(P.knobTheme[G],!R?P.knobTheme["ui-resizable-handle"]:{});var M=/sw|se|ne|nw/.test(U)?{zIndex:++P.zIndex}:{};var K=(D?I[U]:""),F=A(['<div class="ui-resizable-handle ',G,'" style="',K,I.handle,'"></div>'].join("")).css(M);P.handles[U]=".ui-resizable-"+U;this.element.append(F.css(D?V:{}).css(P.knobHandles?C:{}).addClass(P.knobHandles?"ui-resizable-knob-handle":"").addClass(P.knobHandles))}if(P.knobHandles){this.element.addClass("ui-resizable-knob").css(!A.ui.css("ui-resizable-knob")?{}:{})}}this._renderAxis=function(a){a=a||this.element;for(var X in P.handles){if(P.handles[X].constructor==String){P.handles[X]=A(P.handles[X],E).show()}if(P.transparent){P.handles[X].css({opacity:0})}if(this.element.is(".ui-wrapper")&&P._nodeName.match(/textarea|input|select|button/i)){var Y=A(P.handles[X],E),Z=0;Z=/sw|ne|nw|se|n|s/.test(X)?Y.outerHeight():Y.outerWidth();var W=["padding",/ne|nw|n/.test(X)?"Top":/se|sw|s/.test(X)?"Bottom":/^e$/.test(X)?"Right":"Left"].join("");if(!P.transparent){a.css(W,Z)}this._proportionallyResize()}if(!A(P.handles[X]).length){continue}}};this._renderAxis(this.element);P._handles=A(".ui-resizable-handle",O.element);if(P.disableSelection){P._handles.each(function(W,X){A.ui.disableSelection(X)})}P._handles.mouseover(function(){if(!P.resizing){if(this.className){var W=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}O.axis=P.axis=W&&W[1]?W[1]:"se"}});if(P.autohide){P._handles.hide();A(O.element).addClass("ui-resizable-autohide").hover(function(){A(this).removeClass("ui-resizable-autohide");P._handles.show()},function(){if(!P.resizing){A(this).addClass("ui-resizable-autohide");P._handles.hide()}})}this.element.mouseInteraction({executor:this,delay:0,distance:0,dragPrevention:["input","textarea","button","select","option"],start:this.start,stop:this.stop,drag:this.drag,condition:function(X){if(this.disabled){return false}for(var W in this.options.handles){if(A(this.options.handles[W])[0]==X.target){return true}}return false}})};A.extend(A.ui.resizable.prototype,{plugins:{},ui:function(){return{instance:this,axis:this.options.axis,options:this.options}},_renderProxy:function(){var C=this.element,F=this.options;this.elementOffset=C.offset();if(F.proxy){this.helper=this.helper||A('<div style="overflow:hidden;"></div>');var B=A.browser.msie&&A.browser.version<7,D=(B?1:0),E=(B?2:-1);this.helper.addClass(F.proxy).css({width:C.outerWidth()+E,height:C.outerHeight()+E,position:"absolute",left:this.elementOffset.left-D+"px",top:this.elementOffset.top-D+"px",zIndex:++F.zIndex});this.helper.appendTo("body");if(F.disableSelection){A.ui.disableSelection(this.helper.get(0))}}else{this.helper=C}},propagate:function(C,B){A.ui.plugin.call(this,C,[B,this.ui()]);this.element.triggerHandler(C=="resize"?C:["resize",C].join(""),[B,this.ui()],this.options[C])},destroy:function(){var D=this.element,C=D.children(".ui-resizable").get(0),B=function(E){A(E).removeClass("ui-resizable ui-resizable-disabled").removeMouseInteraction().removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};B(D);if(D.is(".ui-wrapper")&&C){D.parent().append(A(C).css({position:D.css("position"),width:D.outerWidth(),height:D.outerHeight(),top:D.css("top"),left:D.css("left")})).end().remove();B(C)}},enable:function(){this.element.removeClass("ui-resizable-disabled");this.disabled=false},disable:function(){this.element.addClass("ui-resizable-disabled");this.disabled=true},start:function(I){var C=this.options,B=this.element.position(),D=this.element,H=function(M){return parseInt(M,10)||0},G=A.browser.msie&&A.browser.version<7;C.resizing=true;C.documentScroll={top:A(document).scrollTop(),left:A(document).scrollLeft()};if(D.is(".ui-draggable")||(/absolute/).test(D.css("position"))){var J=A.browser.msie&&!C.containment&&(/absolute/).test(D.css("position"))&&!(/relative/).test(D.parent().css("position"));var K=J?C.documentScroll.top:0,F=J?C.documentScroll.left:0;D.css({position:"absolute",top:(B.top+K),left:(B.left+F)})}if(/relative/.test(D.css("position"))&&A.browser.opera){D.css({position:"relative",top:"auto",left:"auto"})}this._renderProxy();var L=H(this.helper.css("left")),E=H(this.helper.css("top"));this.offset=this.helper.offset();this.position={left:L,top:E};this.size=C.proxy||G?{width:D.outerWidth(),height:D.outerHeight()}:{width:D.width(),height:D.height()};this.originalSize=C.proxy||G?{width:D.outerWidth(),height:D.outerHeight()}:{width:D.width(),height:D.height()};this.originalPosition={left:L,top:E};this.sizeDiff={width:D.outerWidth()-D.width(),height:D.outerHeight()-D.height()};this.originalMousePosition={left:I.pageX,top:I.pageY};C.aspectRatio=(typeof C.aspectRatio=="number")?C.aspectRatio:((this.originalSize.height/this.originalSize.width)||1);if(C.preserveCursor){A("body").css("cursor",this.axis+"-resize")}this.propagate("start",I);return false},stop:function(J){this.options.resizing=false;var F=this.options,I=function(M){return parseInt(M,10)||0},L=this;if(F.proxy){var E=F.proportionallyResize,B=E&&/textarea/i.test(E.get(0).nodeName),C=B&&A.ui.hasScroll(E.get(0),"left")?0:L.sizeDiff.height,H=B?0:L.sizeDiff.width;var D={width:(L.size.width-H),height:(L.size.height-C)},G=parseInt(L.element.css("left"),10)+(L.position.left-L.originalPosition.left),K=parseInt(L.element.css("top"),10)+(L.position.top-L.originalPosition.top);if(!F.animate){this.element.css(A.extend(D,{top:K,left:G}))}if(F.proxy&&!F.animate){this._proportionallyResize()}this.helper.remove()}if(F.preserveCursor){A("body").css("cursor","auto")}this.propagate("stop",J);return false},drag:function(I){var D=this.helper,C=this.options,J={},M=this,F=this.originalMousePosition,K=this.axis;var N=(I.pageX-F.left)||0,L=(I.pageY-F.top)||0;var E=this.change[K];if(!E){return false}var H=E.apply(this,[I,N,L]),G=A.browser.msie&&A.browser.version<7,B=this.sizeDiff;if(C._aspectRatio||I.shiftKey){H=this._updateRatio(H,I)}H=this._respectSize(H,I);this.propagate("resize",I);D.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!C.proxy&&C.proportionallyResize){this._proportionallyResize()}this._updateCache(H);return false},_updateCache:function(B){var C=this.options;this.offset=this.helper.offset();if(B.left){this.position.left=B.left}if(B.top){this.position.top=B.top}if(B.height){this.size.height=B.height}if(B.width){this.size.width=B.width}},_updateRatio:function(D,E){var F=this.options,G=this.position,C=this.size,B=this.axis;if(D.height){D.width=Math.round(C.height/F.aspectRatio)}else{if(D.width){D.height=Math.round(C.width*F.aspectRatio)}}if(B=="sw"){D.left=G.left+(C.width-D.width);D.top=null}if(B=="nw"){D.top=G.top+(C.height-D.height);D.left=G.left+(C.width-D.width)}return D},_respectSize:function(H,I){var F=this.helper,E=this.options,N=E._aspectRatio||I.shiftKey,M=this.axis,P=H.width&&E.maxWidth&&E.maxWidth<H.width,J=H.height&&E.maxHeight&&E.maxHeight<H.height,D=H.width&&E.minWidth&&E.minWidth>H.width,O=H.height&&E.minHeight&&E.minHeight>H.height;if(D){H.width=E.minWidth}if(O){H.height=E.minHeight}if(P){H.width=E.maxWidth}if(J){H.height=E.maxHeight}var C=this.originalPosition.left+this.originalSize.width,L=this.position.top+this.size.height;var G=/sw|nw|w/.test(M),B=/nw|ne|n/.test(M);if(D&&G){H.left=C-E.minWidth}if(P&&G){H.left=C-E.maxWidth}if(O&&B){H.top=L-E.minHeight}if(J&&B){H.top=L-E.maxHeight}var K=!H.width&&!H.height;if(K&&!H.left&&H.top){H.top=null}else{if(K&&!H.top&&H.left){H.left=null}}return H},_proportionallyResize:function(){var F=this.options;if(!F.proportionallyResize){return }var D=F.proportionallyResize,C=this.helper||this.element;if(!F.borderDif){var B=[D.css("borderTopWidth"),D.css("borderRightWidth"),D.css("borderBottomWidth"),D.css("borderLeftWidth")],E=[D.css("paddingTop"),D.css("paddingRight"),D.css("paddingBottom"),D.css("paddingLeft")];F.borderDif=A.map(B,function(G,I){var H=parseInt(G,10)||0,J=parseInt(E[I],10)||0;return H+J})}D.css({height:(C.height()-F.borderDif[0]-F.borderDif[2])+"px",width:(C.width()-F.borderDif[1]-F.borderDif[3])+"px"})},change:{e:function(D,C,B){return{width:this.originalSize.width+C}},w:function(F,C,B){var G=this.options,D=this.originalSize,E=this.originalPosition;return{left:E.left+C,width:D.width-C}},n:function(F,C,B){var G=this.options,D=this.originalSize,E=this.originalPosition;return{top:E.top+B,height:D.height-B}},s:function(D,C,B){return{height:this.originalSize.height+B}},se:function(D,C,B){return A.extend(this.change.s.apply(this,arguments),this.change.e.apply(this,[D,C,B]))},sw:function(D,C,B){return A.extend(this.change.s.apply(this,arguments),this.change.w.apply(this,[D,C,B]))},ne:function(D,C,B){return A.extend(this.change.n.apply(this,arguments),this.change.e.apply(this,[D,C,B]))},nw:function(D,C,B){return A.extend(this.change.n.apply(this,arguments),this.change.w.apply(this,[D,C,B]))}}});A.ui.plugin.add("resizable","containment",{start:function(I,K){var E=K.options,M=K.instance,G=M.element;var C=E.containment,F=(C instanceof jQuery)?C.get(0):(/parent/.test(C))?G.parent().get(0):C;if(!F){return }if(/document/.test(C)||C==document){M.containerOffset={left:0,top:0};M.parentData={element:A(document),left:0,top:0,width:A(document).width(),height:A(document).height()||document.body.parentNode.scrollHeight}}else{M.containerOffset=A(F).offset(),M.containerSize={height:A(F).innerHeight(),width:A(F).innerWidth()};var J=M.containerOffset,B=M.containerSize.height,H=M.containerSize.width,D=(A.ui.hasScroll(F,"left")?F.scrollWidth:H),L=(A.ui.hasScroll(F)?F.scrollHeight:B);M.parentData={element:F,left:J.left,top:J.top,width:D,height:L}}},resize:function(F,I){var C=I.options,L=I.instance,B=L.containerSize,H=L.containerOffset,E=L.size,G=L.position,J=C._aspectRatio||F.shiftKey;if(G.left<(C.proxy?H.left:0)){L.size.width=L.size.width+(C.proxy?(L.position.left-H.left):L.position.left);if(J){L.size.height=L.size.width*C.aspectRatio}L.position.left=C.proxy?H.left:0}if(G.top<(C.proxy?H.top:0)){L.size.height=L.size.height+(C.proxy?(L.position.top-H.top):L.position.top);if(J){L.size.width=L.size.height/C.aspectRatio}L.position.top=C.proxy?H.top:0}var D=(C.proxy?L.offset.left-H.left:L.position.left)+L.sizeDiff.width,K=(C.proxy?L.offset.top-H.top:L.position.top)+L.sizeDiff.height;if(D+L.size.width>=L.parentData.width){L.size.width=L.parentData.width-D;if(J){L.size.height=L.size.width*C.aspectRatio}}if(K+L.size.height>=L.parentData.height){L.size.height=L.parentData.height-K;if(J){L.size.width=L.size.height/C.aspectRatio}}}});A.ui.plugin.add("resizable","grid",{resize:function(H,J){var D=J.options,L=J.instance,G=L.size,E=L.originalSize,F=L.originalPosition,K=L.axis,I=D._aspectRatio||H.shiftKey;D.grid=typeof D.grid=="number"?[D.grid,D.grid]:D.grid;var C=Math.round((G.width-E.width)/D.grid[0])*D.grid[0],B=Math.round((G.height-E.height)/D.grid[1])*D.grid[1];if(/^(se|s|e)$/.test(K)){L.size.width=E.width+C;L.size.height=E.height+B}else{if(/^(ne)$/.test(K)){L.size.width=E.width+C;L.size.height=E.height+B;L.position.top=F.top-B}else{if(/^(sw)$/.test(K)){L.size.width=E.width+C;L.size.height=E.height+B;L.position.left=F.left-C}else{L.size.width=E.width+C;L.size.height=E.height+B;L.position.top=F.top-B;L.position.left=F.left-C}}}}});A.ui.plugin.add("resizable","animate",{stop:function(I,K){var F=K.options,L=K.instance;var E=F.proportionallyResize,B=E&&/textarea/i.test(E.get(0).nodeName),C=B&&A.ui.hasScroll(E.get(0),"left")?0:L.sizeDiff.height,H=B?0:L.sizeDiff.width;var D={width:(L.size.width-H),height:(L.size.height-C)},G=parseInt(L.element.css("left"),10)+(L.position.left-L.originalPosition.left),J=parseInt(L.element.css("top"),10)+(L.position.top-L.originalPosition.top);L.element.animate(A.extend(D,{top:J,left:G}),{duration:F.animateDuration||"slow",easing:F.animateEasing||"swing",step:function(){if(E){E.css({width:L.element.css("width"),height:L.element.css("height")})}}})}});A.ui.plugin.add("resizable","ghost",{start:function(E,D){var F=D.options,B=D.instance,G=F.proportionallyResize,C=B.size;if(!G){B.ghost=B.element.clone()}else{B.ghost=G.clone()}B.ghost.css({opacity:0.25,display:"block",position:"relative",height:C.height,width:C.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof F.ghost=="string"?F.ghost:"");B.ghost.appendTo(B.helper)},resize:function(D,C){var E=C.options,B=C.instance,F=E.proportionallyResize;if(B.ghost){B.ghost.css({position:"relative",height:B.size.height,width:B.size.width})}},stop:function(D,C){var E=C.options,B=C.instance,F=E.proportionallyResize;if(B.ghost&&B.helper){B.helper.get(0).removeChild(B.ghost.get(0))}}})})(jQuery);(function(A){A.fn.extend({selectable:function(C){var B=Array.prototype.slice.call(arguments,1);return this.each(function(){if(typeof C=="string"){var D=A.data(this,"selectable");if(D){D[C].apply(D,B)}}else{if(!A.data(this,"selectable")){new A.ui.selectable(this,C)}}})}});A.ui.selectable=function(D,C){var B=this;this.element=A(D);A.data(D,"selectable",this);this.element.addClass("ui-selectable");this.options=A.extend({appendTo:"body",autoRefresh:true,filter:"*",tolerance:"touch"},C);A(D).bind("setData.selectable",function(G,F,H){B.options[F]=H}).bind("getData.selectable",function(G,F){return B.options[F]});this.dragged=false;var E;this.refresh=function(){E=A(B.options.filter,B.element[0]);E.each(function(){var F=A(this);var G=F.offset();A.data(this,"selectable-item",{element:this,$element:F,left:G.left,top:G.top,right:G.left+F.width(),bottom:G.top+F.height(),startselected:false,selected:F.hasClass("ui-selected"),selecting:F.hasClass("ui-selecting"),unselecting:F.hasClass("ui-unselecting")})})};this.refresh();this.selectees=E.addClass("ui-selectee");this.element.mouseInteraction({executor:this,appendTo:"body",delay:0,distance:0,dragPrevention:["input","textarea","button","select","option"],start:this.start,stop:this.stop,drag:this.drag,condition:function(G){var F=false;A(G.target).parents().andSelf().each(function(){if(A.data(this,"selectable-item")){F=true}});return this.options.keyboard?!F:true}});this.helper=A(document.createElement("div")).css({border:"1px dotted black"})};A.extend(A.ui.selectable.prototype,{toggle:function(){if(this.disabled){this.enable()}else{this.disable()}},destroy:function(){this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable").removeMouseInteraction()},enable:function(){this.element.removeClass("ui-selectable-disabled");this.disabled=false},disable:function(){this.element.addClass("ui-selectable-disabled");this.disabled=true},start:function(D,C){this.opos=[D.pageX,D.pageY];if(this.disabled){return }var B=this.options;this.selectees=A(B.filter,C);this.element.triggerHandler("selectablestart",[D,{selectable:C,options:B}],B.start);A("body").append(this.helper);this.helper.css({"z-index":100,position:"absolute",left:D.clientX,top:D.clientY,width:0,height:0});if(B.autoRefresh){this.refresh()}this.selectees.filter(".ui-selected").each(function(){var E=A.data(this,"selectable-item");E.startselected=true;if(!D.ctrlKey){E.$element.removeClass("ui-selected");E.selected=false;E.$element.addClass("ui-unselecting");E.unselecting=true;A(this.element).triggerHandler("selectableunselecting",[D,{selectable:C,unselecting:E.element,options:B}],B.unselecting)}})},drag:function(I,G){this.dragged=true;if(this.disabled){return }var D=this.options;var C=this.opos[0],H=this.opos[1],B=I.pageX,F=I.pageY;if(C>B){var E=B;B=C;C=E}if(H>F){var E=F;F=H;H=E}this.helper.css({left:C,top:H,width:B-C,height:F-H});this.selectees.each(function(){var J=A.data(this,"selectable-item");if(!J||J.element==G){return }var K=false;if(D.tolerance=="touch"){K=(!(J.left>B||J.right<C||J.top>F||J.bottom<H))}else{if(D.tolerance=="fit"){K=(J.left>C&&J.right<B&&J.top>H&&J.bottom<F)}}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;A(this.element).triggerHandler("selectableselecting",[I,{selectable:G,selecting:J.element,options:D}],D.selecting)}}else{if(J.selecting){if(I.ctrlKey&&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}A(this.element).triggerHandler("selectableunselecting",[I,{selectable:G,unselecting:J.element,options:D}],D.unselecting)}}if(J.selected){if(!I.ctrlKey&&!J.startselected){J.$element.removeClass("ui-selected");J.selected=false;J.$element.addClass("ui-unselecting");J.unselecting=true;A(this.element).triggerHandler("selectableunselecting",[I,{selectable:G,unselecting:J.element,options:D}],D.unselecting)}}}})},stop:function(D,C){this.dragged=false;var B=this.options;A(".ui-unselecting",this.element).each(function(){var E=A.data(this,"selectable-item");E.$element.removeClass("ui-unselecting");E.unselecting=false;E.startselected=false;A(this.element).triggerHandler("selectableunselected",[D,{selectable:C,unselected:E.element,options:B}],B.unselected)});A(".ui-selecting",this.element).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;A(this.element).triggerHandler("selectableselected",[D,{selectable:C,selected:E.element,options:B}],B.selected)});A(this.element).triggerHandler("selectablestop",[D,{selectable:C,options:this.options}],this.options.stop);this.helper.remove()}})})(jQuery);(function(A){if(window.Node&&Node.prototype&&!Node.prototype.contains){Node.prototype.contains=function(B){return !!(this.compareDocumentPosition(B)&16)}}A.fn.extend({sortable:function(C){var B=Array.prototype.slice.call(arguments,1);if(C=="serialize"||C=="toArray"){return A.data(this[0],"sortable")[C](arguments[1])}return this.each(function(){if(typeof C=="string"){var D=A.data(this,"sortable");if(D){D[C].apply(D,B)}}else{if(!A.data(this,"sortable")){new A.ui.sortable(this,C)}}})}});A.ui.sortable=function(D,C){var B=this;this.element=A(D);this.containerCache={};A.data(D,"sortable",this);this.element.addClass("ui-sortable");this.options=A.extend({},C);var E=this.options;A.extend(E,{items:this.options.items||"> *",zIndex:this.options.zIndex||1000,startCondition:function(){return !B.options.disabled}});A(D).bind("setData.sortable",function(G,F,H){B.options[F]=H}).bind("getData.sortable",function(G,F){return B.options[F]});this.refresh();this.floating=this.items.length?(/left|right/).test(this.items[0].item.css("float")):false;if(!(/(relative|absolute|fixed)/).test(this.element.css("position"))){this.element.css("position","relative")}this.offset=this.element.offset();this.element.mouseInteraction({executor:this,delay:E.delay,distance:E.distance||0,dragPrevention:E.prevention?E.prevention.toLowerCase().split(","):["input","textarea","button","select","option"],start:this.start,stop:this.stop,drag:this.drag,condition:function(H){if(this.options.disabled||this.options.type=="static"){return false}var G=null,F=A(H.target).parents().each(function(){if(A.data(this,"sortable-item")){G=A(this);return false}});if(A.data(H.target,"sortable-item")){G=A(H.target)}if(!G){return false}if(this.options.handle){var I=false;A(this.options.handle,G).each(function(){if(this==H.target){I=true}});if(!I){return false}}this.currentItem=G;return true}});if(E.cursorAt&&E.cursorAt.constructor==Array){E.cursorAt={left:E.cursorAt[0],top:E.cursorAt[1]}}};A.extend(A.ui.sortable.prototype,{plugins:{},ui:function(B){return{helper:(B||this)["helper"],placeholder:(B||this)["placeholder"]||A([]),position:(B||this)["position"].current,absolutePosition:(B||this)["position"].absolute,instance:this,options:this.options,element:this.element,item:(B||this)["currentItem"],sender:B?B.element:null}},propagate:function(D,C,B){A.ui.plugin.call(this,D,[C,this.ui(B)]);this.element.triggerHandler(D=="sort"?D:"sort"+D,[C,this.ui(B)],this.options[D])},serialize:function(D){var B=A(this.options.items,this.element).not(".ui-sortable-helper");var C=[];D=D||{};B.each(function(){var E=(A(this).attr(D.attribute||"id")||"").match(D.expression||(/(.+)[-=_](.+)/));if(E){C.push((D.key||E[1])+"[]="+(D.key?E[1]:E[2]))}});return C.join("&")},toArray:function(B){var C=A(this.options.items,this.element).not(".ui-sortable-helper");var D=[];C.each(function(){D.push(A(this).attr(B||"id"))});return D},enable:function(){this.element.removeClass("ui-sortable-disabled");this.options.disabled=false},disable:function(){this.element.addClass("ui-sortable-disabled");this.options.disabled=true},intersectsWith:function(I){var D=this.position.absolute.left,C=D+this.helperProportions.width,H=this.position.absolute.top,G=H+this.helperProportions.height;var E=I.left,B=E+I.width,J=I.top,F=J+I.height;return(E<D+(this.helperProportions.width/2)&&C-(this.helperProportions.width/2)<B&&J<H+(this.helperProportions.height/2)&&G-(this.helperProportions.height/2)<F)},intersectsWithEdge:function(I){var D=this.position.absolute.left,C=D+this.helperProportions.width,H=this.position.absolute.top,G=H+this.helperProportions.height;var E=I.left,B=E+I.width,J=I.top,F=J+I.height;if(!(E<D+(this.helperProportions.width/2)&&C-(this.helperProportions.width/2)<B&&J<H+(this.helperProportions.height/2)&&G-(this.helperProportions.height/2)<F)){return false}if(this.floating){if(C>E&&D<E){return 2}if(D<B&&C>B){return 1}}else{if(G>J&&H<J){return 1}if(H<F&&G>F){return 2}}return false},inEmptyZone:function(B){if(!A(B.options.items,B.element).length){return B.options.dropOnEmpty?true:false}var C=A(B.options.items,B.element).not(".ui-sortable-helper");C=A(C[C.length-1]);var D=C.offset()[this.floating?"left":"top"]+C[0][this.floating?"offsetWidth":"offsetHeight"];return(this.position.absolute[this.floating?"left":"top"]>D)},refresh:function(){this.refreshItems();this.refreshPositions()},refreshItems:function(){this.items=[];this.containers=[this];var B=this.items;var D=[A(this.options.items,this.element)];if(this.options.connectWith){for(var E=this.options.connectWith.length-1;E>=0;E--){var G=A(this.options.connectWith[E]);for(var C=G.length-1;C>=0;C--){var F=A.data(G[C],"sortable");if(F&&!F.options.disabled){D.push(A(F.options.items,F.element));this.containers.push(F)}}}}for(var E=D.length-1;E>=0;E--){D[E].each(function(){A.data(this,"sortable-item",true);B.push({item:A(this),width:0,height:0,left:0,top:0})})}},refreshPositions:function(B){for(var C=this.items.length-1;C>=0;C--){if(!B){this.items[C].width=this.items[C].item.outerWidth()}if(!B){this.items[C].height=this.items[C].item.outerHeight()}var D=this.items[C].item.offset();this.items[C].left=D.left;this.items[C].top=D.top}for(var C=this.containers.length-1;C>=0;C--){var D=this.containers[C].element.offset();this.containers[C].containerCache.left=D.left;this.containers[C].containerCache.top=D.top;this.containers[C].containerCache.width=this.containers[C].element.outerWidth();this.containers[C].containerCache.height=this.containers[C].element.outerHeight()}},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable").removeMouseInteraction();for(var B=this.items.length-1;B>=0;B--){this.items[B].item.removeData("sortable-item")}},createPlaceholder:function(B){(B||this).placeholderElement=this.options.placeholderElement?A(this.options.placeholderElement,(B||this).currentItem):(B||this).currentItem;(B||this).placeholder=A("<div></div>").addClass(this.options.placeholder).appendTo("body").css({position:"absolute"}).css((B||this).placeholderElement.offset()).css({width:(B||this).placeholderElement.outerWidth(),height:(B||this).placeholderElement.outerHeight()})},contactContainers:function(E){for(var C=this.containers.length-1;C>=0;C--){if(this.intersectsWith(this.containers[C].containerCache)){if(!this.containers[C].containerCache.over){if(this.currentContainer!=this.containers[C]){var H=10000;var G=null;var D=this.position.absolute[this.containers[C].floating?"left":"top"];for(var B=this.items.length-1;B>=0;B--){if(!this.containers[C].element[0].contains(this.items[B].item[0])){continue}var F=this.items[B][this.containers[C].floating?"left":"top"];if(Math.abs(F-D)<H){H=Math.abs(F-D);G=this.items[B]}}if(this.placeholder){this.placeholder.remove()}if(this.containers[C].options.placeholder){this.containers[C].createPlaceholder(this)}else{this.placeholder=null;this.placeholderElement=null}G?this.rearrange(E,G):this.rearrange(E,null,this.containers[C].element);this.propagate("change",E);this.containers[C].propagate("change",E,this);this.currentContainer=this.containers[C]}this.containers[C].propagate("over",E,this);this.containers[C].containerCache.over=1}}else{if(this.containers[C].containerCache.over){this.containers[C].propagate("out",E,this);this.containers[C].containerCache.over=0}}}},start:function(D,C){var E=this.options;this.refresh();this.helper=typeof E.helper=="function"?A(E.helper.apply(this.element[0],[D,this.currentItem])):this.currentItem.clone();if(!this.helper.parents("body").length){this.helper.appendTo(E.appendTo||this.currentItem[0].parentNode)}this.helper.css({position:"absolute",clear:"both"}).addClass("ui-sortable-helper");A.extend(this,{offsetParent:this.helper.offsetParent(),offsets:{absolute:this.currentItem.offset()},mouse:{start:{top:D.pageY,left:D.pageX}},margins:{top:parseInt(this.currentItem.css("marginTop"))||0,left:parseInt(this.currentItem.css("marginLeft"))||0}});this.offsets.parent=this.offsetParent.offset();this.clickOffset={left:D.pageX-this.offsets.absolute.left,top:D.pageY-this.offsets.absolute.top};this.originalPosition={left:this.offsets.absolute.left-this.offsets.parent.left-this.margins.left,top:this.offsets.absolute.top-this.offsets.parent.top-this.margins.top};this.offset={left:D.pageX-this.originalPosition.left,top:D.pageY-this.originalPosition.top};A.extend(this,{position:{current:{top:D.pageY-this.offset.top,left:D.pageX-this.offset.left},absolute:{left:D.pageX-this.clickOffset.left,top:D.pageY-this.clickOffset.top},dom:this.currentItem.prev()[0]}});if(E.placeholder){this.createPlaceholder()}this.propagate("start",D);this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()};if(E.cursorAt){if(E.cursorAt.top!=undefined||E.cursorAt.bottom!=undefined){this.offset.top-=this.clickOffset.top-(E.cursorAt.top!=undefined?E.cursorAt.top:(this.helperProportions.height-E.cursorAt.bottom));this.clickOffset.top=(E.cursorAt.top!=undefined?E.cursorAt.top:(this.helperProportions.height-E.cursorAt.bottom))}if(E.cursorAt.left!=undefined||E.cursorAt.right!=undefined){this.offset.left-=this.clickOffset.left-(E.cursorAt.left!=undefined?E.cursorAt.left:(this.helperProportions.width-E.cursorAt.right));this.clickOffset.left=(E.cursorAt.left!=undefined?E.cursorAt.left:(this.helperProportions.width-E.cursorAt.right))}}if(this.options.placeholder!="clone"){A(this.currentItem).css("visibility","hidden")}for(var B=this.containers.length-1;B>=0;B--){this.containers[B].propagate("activate",D,this)}if(A.ui.ddmanager){A.ui.ddmanager.current=this}if(A.ui.ddmanager&&!E.dropBehaviour){A.ui.ddmanager.prepareOffsets(this,D)}this.dragging=true;return false},stop:function(C){this.propagate("stop",C);if(this.position.dom!=this.currentItem.prev()[0]){this.propagate("update",C)}if(!this.element[0].contains(this.currentItem[0])){this.propagate("remove",C);for(var B=this.containers.length-1;B>=0;B--){if(this.containers[B].element[0].contains(this.currentItem[0])){this.containers[B].propagate("update",C,this);this.containers[B].propagate("receive",C,this)}}}for(var B=this.containers.length-1;B>=0;B--){this.containers[B].propagate("deactivate",C,this);if(this.containers[B].containerCache.over){this.containers[B].propagate("out",C,this);this.containers[B].containerCache.over=0}}if(A.ui.ddmanager&&!this.options.dropBehaviour){A.ui.ddmanager.drop(this,C)}this.dragging=false;if(this.cancelHelperRemoval){return false}A(this.currentItem).css("visibility","");if(this.placeholder){this.placeholder.remove()}this.helper.remove();return false},drag:function(C){this.position.current={top:C.pageY-this.offset.top,left:C.pageX-this.offset.left};this.position.absolute={left:C.pageX-this.clickOffset.left,top:C.pageY-this.clickOffset.top};for(var B=this.items.length-1;B>=0;B--){var D=this.intersectsWithEdge(this.items[B]);if(!D){continue}if(this.items[B].item[0]!=this.currentItem[0]&&this.currentItem[D==1?"next":"prev"]()[0]!=this.items[B].item[0]&&!this.currentItem[0].contains(this.items[B].item[0])&&(this.options.type=="semi-dynamic"?!this.element[0].contains(this.items[B].item[0]):true)){this.direction=D==1?"down":"up";this.rearrange(C,this.items[B]);this.propagate("change",C);break}}this.contactContainers(C);if(A.ui.ddmanager){A.ui.ddmanager.drag(this,C)}this.propagate("sort",C);this.helper.css({left:this.position.current.left+"px",top:this.position.current.top+"px"});return false},rearrange:function(D,C,B){B?B.append(this.currentItem):C.item[this.direction=="down"?"before":"after"](this.currentItem);this.refreshPositions(true);if(this.placeholderElement){this.placeholder.css(this.placeholderElement.offset())}}});A.ui.plugin.add("sortable","cursor",{start:function(D,C){var B=A("body");if(B.css("cursor")){C.options._cursor=B.css("cursor")}B.css("cursor",C.options.cursor)},stop:function(C,B){if(B.options._cursor){A("body").css("cursor",B.options._cursor)}}});A.ui.plugin.add("sortable","zIndex",{start:function(D,C){var B=C.helper;if(B.css("zIndex")){C.options._zIndex=B.css("zIndex")}B.css("zIndex",C.options.zIndex)},stop:function(C,B){if(B.options._zIndex){A(B.helper).css("zIndex",B.options._zIndex)}}});A.ui.plugin.add("sortable","opacity",{start:function(D,C){var B=C.helper;if(B.css("opacity")){C.options._opacity=B.css("opacity")}B.css("opacity",C.options.opacity)},stop:function(C,B){if(B.options._opacity){A(B.helper).css("opacity",B.options._opacity)}}});A.ui.plugin.add("sortable","revert",{stop:function(D,C){var B=C.instance;B.cancelHelperRemoval=true;var E=B.currentItem.offset();var F=B.helper.offsetParent().offset();if(C.instance.options.zIndex){C.helper.css("zIndex",C.instance.options.zIndex)}if(C.instance.placeholder){C.instance.placeholder.animate({opacity:"hide"},parseInt(C.options.revert,10)||500)}C.helper.animate({left:E.left-F.left-B.margins.left,top:E.top-F.top-B.margins.top},parseInt(C.options.revert,10)||500,function(){B.currentItem.css("visibility","visible");window.setTimeout(function(){if(B.placeholder){B.placeholder.remove()}B.helper.remove();if(C.options._zIndex){C.helper.css("zIndex",C.options._zIndex)}},50)})}});A.ui.plugin.add("sortable","containment",{start:function(D,B){var F=B.options;if((F.containment.left!=undefined||F.containment.constructor==Array)&&!F._containment){return }if(!F._containment){F._containment=F.containment}if(F._containment=="parent"){F._containment=this[0].parentNode}if(F._containment=="sortable"){F._containment=this[0]}if(F._containment=="document"){F.containment=[0,0,A(document).width(),(A(document).height()||document.body.parentNode.scrollHeight)]}else{var C=A(F._containment);var E=C.offset();F.containment=[E.left,E.top,E.left+(C.outerWidth()||C[0].scrollWidth),E.top+(C.outerHeight()||C[0].scrollHeight)]}},sort:function(E,I){var B=I.options;var D=I.helper;var H=B.containment;var K=I.instance;var F=(parseInt(K.offsetParent.css("borderLeftWidth"),10)||0);var J=(parseInt(K.offsetParent.css("borderRightWidth"),10)||0);var C=(parseInt(K.offsetParent.css("borderTopWidth"),10)||0);var G=(parseInt(K.offsetParent.css("borderBottomWidth"),10)||0);if(H.constructor==Array){if((K.position.absolute.left<H[0])){K.position.current.left=H[0]-K.offsets.parent.left-K.margins.left}if((K.position.absolute.top<H[1])){K.position.current.top=H[1]-K.offsets.parent.top-K.margins.top}if(K.position.absolute.left-H[2]+K.helperProportions.width>=0){K.position.current.left=H[2]-K.offsets.parent.left-K.helperProportions.width-K.margins.left-F-J}if(K.position.absolute.top-H[3]+K.helperProportions.height>=0){K.position.current.top=H[3]-K.offsets.parent.top-K.helperProportions.height-K.margins.top-C-G}}else{if((I.position.left<H.left)){K.position.current.left=H.left}if((I.position.top<H.top)){K.position.current.top=H.top}if(I.position.left-K.offsetParent.innerWidth()+K.helperProportions.width+H.right+F+J>=0){K.position.current.left=K.offsetParent.innerWidth()-K.helperProportions.width-H.right-F-J}if(I.position.top-K.offsetParent.innerHeight()+K.helperProportions.height+H.bottom+C+G>=0){K.position.current.top=K.offsetParent.innerHeight()-K.helperProportions.height-H.bottom-C-G}}}});A.ui.plugin.add("sortable","axis",{sort:function(C,B){var D=B.options;if(D.constraint){D.axis=D.constraint}D.axis=="x"?B.instance.position.top=B.instance.originalPosition.top:B.instance.position.left=B.instance.originalPosition.left}});A.ui.plugin.add("sortable","scroll",{start:function(C,B){var D=B.options;D.scrollSensitivity=D.scrollSensitivity||20;D.scrollSpeed=D.scrollSpeed||20;B.instance.overflowY=function(E){do{if((/auto|scroll/).test(E.css("overflow"))||(/auto|scroll/).test(E.css("overflow-y"))){return E}E=E.parent()}while(E[0].parentNode);return A(document)}(this);B.instance.overflowX=function(E){do{if((/auto|scroll/).test(E.css("overflow"))||(/auto|scroll/).test(E.css("overflow-x"))){return E}E=E.parent()}while(E[0].parentNode);return A(document)}(this);if(B.instance.overflowY[0]!=document&&B.instance.overflowY[0].tagName!="HTML"){B.instance.overflowYstart=B.instance.overflowY[0].scrollTop}if(B.instance.overflowX[0]!=document&&B.instance.overflowX[0].tagName!="HTML"){B.instance.overflowXstart=B.instance.overflowX[0].scrollLeft}},sort:function(D,C){var E=C.options;var B=C.instance;if(B.overflowY[0]!=document&&B.overflowY[0].tagName!="HTML"){if(B.overflowY[0].offsetHeight-(C.position.top-B.overflowY[0].scrollTop+B.clickOffset.top)<E.scrollSensitivity){B.overflowY[0].scrollTop=B.overflowY[0].scrollTop+E.scrollSpeed}if((C.position.top-B.overflowY[0].scrollTop+B.clickOffset.top)<E.scrollSensitivity){B.overflowY[0].scrollTop=B.overflowY[0].scrollTop-E.scrollSpeed}}else{if(D.pageY-A(document).scrollTop()<E.scrollSensitivity){A(document).scrollTop(A(document).scrollTop()-E.scrollSpeed)}if(A(window).height()-(D.pageY-A(document).scrollTop())<E.scrollSensitivity){A(document).scrollTop(A(document).scrollTop()+E.scrollSpeed)}}if(B.overflowX[0]!=document&&B.overflowX[0].tagName!="HTML"){if(B.overflowX[0].offsetWidth-(C.position.left-B.overflowX[0].scrollLeft+B.clickOffset.left)<E.scrollSensitivity){B.overflowX[0].scrollLeft=B.overflowX[0].scrollLeft+E.scrollSpeed}if((C.position.top-B.overflowX[0].scrollLeft+B.clickOffset.left)<E.scrollSensitivity){B.overflowX[0].scrollLeft=B.overflowX[0].scrollLeft-E.scrollSpeed}}else{if(D.pageX-A(document).scrollLeft()<E.scrollSensitivity){A(document).scrollLeft(A(document).scrollLeft()-E.scrollSpeed)}if(A(window).width()-(D.pageX-A(document).scrollLeft())<E.scrollSensitivity){A(document).scrollLeft(A(document).scrollLeft()+E.scrollSpeed)}}B.offset={left:B.mouse.start.left-B.originalPosition.left+(B.overflowXstart!==undefined?B.overflowXstart-B.overflowX[0].scrollLeft:0),top:B.mouse.start.top-B.originalPosition.top+(B.overflowYstart!==undefined?B.overflowYstart-B.overflowX[0].scrollTop:0)}}})})(jQuery);(function(E){E.fn.extend({accordion:function(G,H){return this.each(function(){var I=E.data(this,"accordion");if(!I){E.data(this,"accordion",new E.ui.accordion(this,G))}else{if(typeof G=="string"){I[G](H)}}})}});E.ui.accordion=function(G,H){this.options=H=E.extend({},E.ui.accordion.defaults,H);this.element=E(G);if(H.navigation){var K=this.element.find("a").filter(H.navigationFilter);if(K.length){if(K.filter(H.header).length){H.active=K}else{H.active=K.parent().parent().prev();K.addClass("current")}}}H.headers=this.element.find(H.header);H.active=C(H.headers,H.active);if(!this.element.hasClass("ui-accordion")){this.element.addClass("ui-accordion");E("<span class='ui-accordion-left'/>").insertBefore(H.headers);E("<span class='ui-accordion-right'/>").appendTo(H.headers);H.headers.addClass("ui-accordion-header").attr("tabindex","0")}if(H.fillSpace){var J=this.element.parent().height();H.headers.each(function(){J-=E(this).outerHeight()});var I=0;H.headers.next().each(function(){I=Math.max(I,E(this).innerHeight()-E(this).height())}).height(J-I)}else{if(H.autoHeight){var J=0;H.headers.next().each(function(){J=Math.max(J,E(this).outerHeight())}).height(J)}}H.headers.not(H.active||"").next().hide();H.active.parent().andSelf().addClass(H.selectedClass);if(H.event){this.element.bind((H.event)+".accordion",F)}};E.ui.accordion.prototype={activate:function(G){F.call(this.element[0],{target:C(this.options.headers,G)[0]})},enable:function(){this.options.disabled=false},disable:function(){this.options.disabled=true},destroy:function(){this.options.headers.next().css("display","");if(this.options.fillSpace||this.options.autoHeight){this.options.headers.next().css("height","")}E.removeData(this.element[0],"accordion");this.element.removeClass("ui-accordion").unbind(".accordion")}};function B(H,G){return function(){return H.apply(G,arguments)}}function D(I){if(!E.data(this,"accordion")){return }var G=E.data(this,"accordion");var H=G.options;H.running=I?0:--H.running;if(H.running){return }if(H.clearStyle){H.toShow.add(H.toHide).css({height:"",overflow:""})}E(this).triggerHandler("accordionchange",[H.data],H.change)}function A(G,K,L,J,M){var I=E.data(this,"accordion").options;I.toShow=G;I.toHide=K;I.data=L;var H=B(D,this);I.running=K.size()==0?G.size():K.size();if(I.animated){if(!I.alwaysOpen&&J){E.ui.accordion.animations[I.animated]({toShow:jQuery([]),toHide:K,complete:H,down:M,autoHeight:I.autoHeight})}else{E.ui.accordion.animations[I.animated]({toShow:G,toHide:K,complete:H,down:M,autoHeight:I.autoHeight})}}else{if(!I.alwaysOpen&&J){G.toggle()}else{K.hide();G.show()}H(true)}}function F(L){var J=E.data(this,"accordion").options;if(J.disabled){return false}if(!L.target&&!J.alwaysOpen){J.active.parent().andSelf().toggleClass(J.selectedClass);var I=J.active.next(),M={instance:this,options:J,newHeader:jQuery([]),oldHeader:J.active,newContent:jQuery([]),oldContent:I},G=J.active=E([]);A.call(this,G,I,M);return false}var K=E(L.target);if(K.parents(J.header).length){while(!K.is(J.header)){K=K.parent()}}var H=K[0]==J.active[0];if(J.running||(J.alwaysOpen&&H)){return false}if(!K.is(J.header)){return }J.active.parent().andSelf().toggleClass(J.selectedClass);if(!H){K.parent().andSelf().addClass(J.selectedClass)}var G=K.next(),I=J.active.next(),M={instance:this,options:J,newHeader:K,oldHeader:J.active,newContent:G,oldContent:I},N=J.headers.index(J.active[0])>J.headers.index(K[0]);J.active=H?E([]):K;A.call(this,G,I,M,H,N);return false}function C(H,G){return G!=undefined?typeof G=="number"?H.filter(":eq("+G+")"):H.not(H.not(G)):G===false?E([]):H.filter(":eq(0)")}E.extend(E.ui.accordion,{defaults:{selectedClass:"selected",alwaysOpen:true,animated:"slide",event:"click",header:"a",autoHeight:true,running:0,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase()}},animations:{slide:function(G,I){G=E.extend({easing:"swing",duration:300},G,I);if(!G.toHide.size()){G.toShow.animate({height:"show"},G);return }var H=G.toHide.height(),J=G.toShow.height(),K=J/H;G.toShow.css({height:0,overflow:"hidden"}).show();G.toHide.filter(":hidden").each(G.complete).end().filter(":visible").animate({height:"hide"},{step:function(L){var M=(H-L)*K;if(E.browser.msie||E.browser.opera){M=Math.ceil(M)}G.toShow.height(M)},duration:G.duration,easing:G.easing,complete:function(){if(!G.autoHeight){G.toShow.css("height","auto")}G.complete()}})},bounceslide:function(G){this.slide(G,{easing:G.down?"bounceout":"swing",duration:G.down?1000:200})},easeslide:function(G){this.slide(G,{easing:"easeinout",duration:700})}}});E.fn.activate=function(G){return this.accordion("activate",G)}})(jQuery);(function(A){A.fn.extend({dialog:function(C){var B=Array.prototype.slice.call(arguments,1);return this.each(function(){if(typeof C=="string"){var E=A(this).is(".ui-dialog")?this:A(this).parents(".ui-dialog:first").find(".ui-dialog-content")[0];var D=E?A.data(E,"dialog"):{};if(D[C]){D[C].apply(D,B)}}else{if(!A(this).is(".ui-dialog-content")){new A.ui.dialog(this,C)}}})}});A.ui.dialog=function(D,L){this.options=L=A.extend({},A.ui.dialog.defaults,L);this.element=D;var K=this;A.data(this.element,"dialog",this);A(D).bind("remove",function(){K.destroy()});A(D).bind("setData.dialog",function(N,M,O){switch(M){case"draggable":J.draggable(O?"enable":"disable");break;case"dragStart":J.data("start.draggable",O);break;case"drag":J.data("drag.draggable",O);break;case"dragStop":J.data("stop.draggable",O);break;case"height":J.height(O);break;case"maxHeight":case"minHeight":case"maxWidth":case"minWidth":J.data(M+".resizable",O);break;case"position":K.position(O);break;case"resizable":J.resizable(O?"enable":"disable");break;case"resizeStart":J.data("start.resizable",O);break;case"resize":J.data("resize.resizable",O);break;case"resizeStop":J.data("stop.resizable",O);break;case"title":A(".ui-dialog-title",C).text(O);break;case"width":break}L[M]=O}).bind("getData.dialog",function(N,M){return L[M]});var E=A(D).addClass("ui-dialog-content");if(!E.parent().length){E.appendTo("body")}E.wrap(document.createElement("div")).wrap(document.createElement("div"));var H=E.parent().addClass("ui-dialog-container").css({position:"relative"});var J=this.uiDialog=H.parent().hide().addClass("ui-dialog").css({position:"absolute",width:L.width,height:L.height,overflow:"hidden"});var B=E.attr("className").split(" ");A.each(B,function(M,N){if(N!="ui-dialog-content"){J.addClass(N)}});if(A.fn.resizable){J.append('<div class="ui-resizable-n ui-resizable-handle"></div>').append('<div class="ui-resizable-s ui-resizable-handle"></div>').append('<div class="ui-resizable-e ui-resizable-handle"></div>').append('<div class="ui-resizable-w ui-resizable-handle"></div>').append('<div class="ui-resizable-ne ui-resizable-handle"></div>').append('<div class="ui-resizable-se ui-resizable-handle"></div>').append('<div class="ui-resizable-sw ui-resizable-handle"></div>').append('<div class="ui-resizable-nw ui-resizable-handle"></div>');J.resizable({maxWidth:L.maxWidth,maxHeight:L.maxHeight,minWidth:L.minWidth,minHeight:L.minHeight,start:L.resizeStart,resize:L.resize,stop:function(N,M){L.resizeStop&&L.resizeStop.apply(this,arguments);A.ui.dialog.overlay.resize()}});if(!L.resizable){J.resizable("disable")}}H.prepend('<div class="ui-dialog-titlebar"></div>');var C=A(".ui-dialog-titlebar",H);var I=(L.title)?L.title:(E.attr("title"))?E.attr("title"):"";C.append('<span class="ui-dialog-title">'+I+"</span>");C.append('<a href="#" class="ui-dialog-titlebar-close"><span>X</span></a>');this.uiDialogTitlebarClose=A(".ui-dialog-titlebar-close",C).hover(function(){A(this).addClass("ui-dialog-titlebar-close-hover")},function(){A(this).removeClass("ui-dialog-titlebar-close-hover")}).mousedown(function(M){M.stopPropagation()}).click(function(){K.close();return false}).keydown(function(M){var N=27;M.keyCode&&M.keyCode==N&&K.close()});var F=0;A.each(L.buttons,function(){F=1;return false});if(F==1){J.append('<div class="ui-dialog-buttonpane"></div>');var G=A(".ui-dialog-buttonpane",J);A.each(L.buttons,function(M,O){var N=A(document.createElement("button")).text(M).click(O);G.append(N)})}if(A.fn.draggable){J.draggable({handle:".ui-dialog-titlebar",start:function(N,M){K.activate();L.dragStart&&L.dragStart.apply(this,arguments)},drag:L.drag,stop:function(N,M){L.dragStop&&L.dragStop.apply(this,arguments);A.ui.dialog.overlay.resize()}});if(!L.draggable){J.draggable("disable")}}J.mousedown(function(){K.activate()});C.click(function(){K.activate()});L.bgiframe&&A.fn.bgiframe&&J.bgiframe();this.position=function(Q){var M=A(window),P=A(document),O=P.scrollTop(),N=P.scrollLeft();if(Q.constructor==Array){O+=Q[1];N+=Q[0]}else{switch(Q){case"center":O+=(M.height()/2)-(J.height()/2);N+=(M.width()/2)-(J.width()/2);break;case"top":O+=0;N+=(M.width()/2)-(J.width()/2);break;case"right":O+=(M.height()/2)-(J.height()/2);N+=(M.width())-(J.width());break;case"bottom":O+=(M.height())-(J.height());N+=(M.width()/2)-(J.width()/2);break;case"left":O+=(M.height()/2)-(J.height()/2);N+=0;break;default:O+=(M.height()/2)-(J.height()/2);N+=(M.width()/2)-(J.width()/2)}}O=O<P.scrollTop()?P.scrollTop():O;J.css({top:O,left:N})};this.open=function(){this.overlay=L.modal?new A.ui.dialog.overlay(K):null;J.appendTo("body");this.position(L.position);J.show();K.moveToTop();K.activate();var M=null;var N={options:L};this.uiDialogTitlebarClose.focus();A(this.element).triggerHandler("dialogopen",[M,N],L.open)};this.activate=function(){!L.modal&&this.moveToTop()};this.moveToTop=function(){var M=L.zIndex;A(".ui-dialog:visible").each(function(){M=Math.max(M,parseInt(A(this).css("z-index"),10)||L.zIndex)});this.overlay&&this.overlay.$el.css("z-index",++M);J.css("z-index",++M)};this.close=function(){this.overlay&&this.overlay.destroy();J.hide();var N=null;var M={options:L};A(this.element).triggerHandler("dialogclose",[N,M],L.close);A.ui.dialog.overlay.resize()};this.destroy=function(){this.overlay&&this.overlay.destroy();J.hide();A(D).unbind(".dialog").removeClass("ui-dialog-content").hide().appendTo("body");J.remove();A.removeData(this.element,"dialog")};if(L.autoOpen){this.open()}};A.extend(A.ui.dialog,{defaults:{autoOpen:true,bgiframe:false,buttons:[],draggable:true,height:200,minHeight:100,minWidth:150,modal:false,overlay:{},position:"center",resizable:true,width:300,zIndex:1000},overlay:function(B){this.$el=A.ui.dialog.overlay.create(B)}});A.extend(A.ui.dialog.overlay,{instances:[],events:A.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(B){return B+".dialog-overlay"}).join(" "),create:function(C){if(this.instances.length===0){A("a, :input").bind(this.events,function(){var E=false;var G=A(this).parents(".ui-dialog");if(G.length){var D=A(".ui-dialog-overlay");if(D.length){var F=parseInt(D.css("z-index"),10);D.each(function(){F=Math.max(F,parseInt(A(this).css("z-index"),10))});E=parseInt(G.css("z-index"),10)>F}else{E=true}}return E});A(document).bind("keydown.dialog-overlay",function(D){var E=27;D.keyCode&&D.keyCode==E&&C.close()});A(window).bind("resize.dialog-overlay",A.ui.dialog.overlay.resize)}var B=A("<div/>").appendTo(document.body).addClass("ui-dialog-overlay").css(A.extend({borderWidth:0,margin:0,padding:0,position:"absolute",top:0,left:0,width:this.width(),height:this.height()},C.options.overlay));C.options.bgiframe&&A.fn.bgiframe&&B.bgiframe();this.instances.push(B);return B},destroy:function(B){this.instances.splice(A.inArray(this.instances,B),1);if(this.instances.length===0){A("a, :input").add([document,window]).unbind(".dialog-overlay")}B.remove()},height:function(){if(A.browser.msie&&A.browser.version<7){var C=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);var B=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(C<B){return A(window).height()+"px"}else{return C+"px"}}else{return A(document).height()+"px"}},width:function(){if(A.browser.msie&&A.browser.version<7){var B=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);var C=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(B<C){return A(window).width()+"px"}else{return B+"px"}}else{return A(document).width()+"px"}},resize:function(){var B=A([]);A.each(A.ui.dialog.overlay.instances,function(){B=B.add(this)});B.css({width:0,height:0}).css({width:A.ui.dialog.overlay.width(),height:A.ui.dialog.overlay.height()})}});A.extend(A.ui.dialog.overlay.prototype,{destroy:function(){A.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);(function(A){A.fn.extend({slider:function(C){var B=Array.prototype.slice.call(arguments,1);if(C=="value"){return A.data(this[0],"slider").value(arguments[1])}return this.each(function(){if(typeof C=="string"){var D=A.data(this,"slider");if(D){D[C].apply(D,B)}}else{if(!A.data(this,"slider")){new A.ui.slider(this,C)}}})}});A.ui.slider=function(D,C){var B=this;this.element=A(D);A.data(D,"slider",this);this.element.addClass("ui-slider");this.options=A.extend({},A.ui.slider.defaults,C);var E=this.options;A.extend(E,{axis:E.axis||(D.offsetWidth<D.offsetHeight?"vertical":"horizontal"),max:!isNaN(parseInt(E.max,10))?{x:parseInt(E.max,10),y:parseInt(E.max,10)}:({x:E.max&&E.max.x||100,y:E.max&&E.max.y||100}),min:!isNaN(parseInt(E.min,10))?{x:parseInt(E.min,10),y:parseInt(E.min,10)}:({x:E.min&&E.min.x||0,y:E.min&&E.min.y||0})});E.realMax={x:E.max.x-E.min.x,y:E.max.y-E.min.y};E.stepping={x:E.stepping&&E.stepping.x||parseInt(E.stepping,10)||(E.steps&&E.steps.x?E.realMax.x/E.steps.x:0),y:E.stepping&&E.stepping.y||parseInt(E.stepping,10)||(E.steps&&E.steps.y?E.realMax.y/E.steps.y:0)};A(D).bind("setData.slider",function(G,F,H){B.options[F]=H}).bind("getData.slider",function(G,F){return B.options[F]});this.handle=A(E.handle,D);if(!this.handle.length){B.handle=B.generated=A(E.handles||[0]).map(function(){var F=A("<div/>").addClass("ui-slider-handle").appendTo(D);if(this.id){F.attr("id",this.id)}return F[0]})}A(this.handle).mouseInteraction({executor:this,delay:E.delay,distance:E.distance!=undefined?E.distance:1,dragPrevention:E.prevention?E.prevention.toLowerCase().split(","):["input","textarea","button","select","option"],start:this.start,stop:this.stop,drag:this.drag,condition:function(G,F){if(!this.disabled){if(this.currentHandle){this.blur(this.currentHandle)}this.focus(F,1);return !this.disabled}}}).wrap('<a href="javascript:void(0)" style="cursor:default;"></a>').parent().bind("focus",function(F){B.focus(this.firstChild)}).bind("blur",function(F){B.blur(this.firstChild)}).bind("keydown",function(F){if(/(37|38|39|40)/.test(F.keyCode)){B.moveTo({x:/(37|39)/.test(F.keyCode)?(F.keyCode==37?"-":"+")+"="+B.oneStep(1):null,y:/(38|40)/.test(F.keyCode)?(F.keyCode==38?"-":"+")+"="+B.oneStep(2):null},this.firstChild)}});this.actualSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.element.bind("mousedown.slider",function(F){B.click.apply(B,[F]);B.currentHandle.data("ui-mouse").trigger(F);B.firstValue=B.firstValue+1});A.each(E.handles||[],function(F,G){B.moveTo(G.start,F,true)});if(!isNaN(E.startValue)){this.moveTo(E.startValue,0,true)}if(this.handle.length==1){this.previousHandle=this.handle}if(this.handle.length==2&&E.range){this.createRange()}};A.extend(A.ui.slider.prototype,{plugins:{},createRange:function(){this.rangeElement=A("<div></div>").addClass("ui-slider-range").css({position:"absolute"}).appendTo(this.element);this.updateRange()},updateRange:function(){var C=this.options.axis=="vertical"?"top":"left";var B=this.options.axis=="vertical"?"height":"width";this.rangeElement.css(C,parseInt(A(this.handle[0]).css(C),10)+this.handleSize(0,this.options.axis=="vertical"?2:1)/2);this.rangeElement.css(B,parseInt(A(this.handle[1]).css(C),10)-parseInt(A(this.handle[0]).css(C),10))},getRange:function(){return this.rangeElement?this.convertValue(parseInt(this.rangeElement.css(this.options.axis=="vertical"?"height":"width"),10)):null},ui:function(B){return{instance:this,options:this.options,handle:this.currentHandle,value:this.options.axis!="both"||!this.options.axis?Math.round(this.value(null,this.options.axis=="vertical"?2:1)):{x:Math.round(this.value(null,1)),y:Math.round(this.value(null,2))},range:this.getRange()}},propagate:function(C,B){A.ui.plugin.call(this,C,[B,this.ui()]);this.element.triggerHandler(C=="slide"?C:"slide"+C,[B,this.ui()],this.options[C])},destroy:function(){this.element.removeClass("ui-slider ui-slider-disabled").removeData("slider").unbind(".slider");this.handle.removeMouseInteraction();this.generated&&this.generated.remove()},enable:function(){this.element.removeClass("ui-slider-disabled");this.disabled=false},disable:function(){this.element.addClass("ui-slider-disabled");this.disabled=true},focus:function(B,C){this.currentHandle=A(B).addClass("ui-slider-handle-active");if(C){this.currentHandle.parent()[0].focus()}},blur:function(B){A(B).removeClass("ui-slider-handle-active");if(this.currentHandle&&this.currentHandle[0]==B){this.previousHandle=this.currentHandle;this.currentHandle=null}},value:function(D,B){if(this.handle.length==1){this.currentHandle=this.handle}if(!B){B=this.options.axis=="vertical"?2:1}var C=((parseInt(A(D!=undefined&&D!==null?this.handle[D]||D:this.currentHandle).css(B==1?"left":"top"),10)/(this.actualSize[B==1?"width":"height"]-this.handleSize(null,B)))*this.options.realMax[B==1?"x":"y"])+this.options.min[B==1?"x":"y"];var E=this.options;if(E.stepping[B==1?"x":"y"]){C=Math.round(C/E.stepping[B==1?"x":"y"])*E.stepping[B==1?"x":"y"]}return C},convertValue:function(C,B){if(!B){B=this.options.axis=="vertical"?2:1}return this.options.min[B==1?"x":"y"]+(C/(this.actualSize[B==1?"width":"height"]-this.handleSize(null,B)))*this.options.realMax[B==1?"x":"y"]},translateValue:function(C,B){if(!B){B=this.options.axis=="vertical"?2:1}return((C-this.options.min[B==1?"x":"y"])/this.options.realMax[B==1?"x":"y"])*(this.actualSize[B==1?"width":"height"]-this.handleSize(null,B))},handleSize:function(C,B){if(!B){B=this.options.axis=="vertical"?2:1}return A(C!=undefined&&C!==null?this.handle[C]:this.currentHandle)[B==1?"outerWidth":"outerHeight"]()},click:function(C){var D=[C.pageX,C.pageY];var B=false;this.handle.each(function(){if(this==C.target){B=true}});if(B||this.disabled||!(this.currentHandle||this.previousHandle)){return }if(this.previousHandle){this.focus(this.previousHandle,1)}this.offset=this.element.offset();this.moveTo({y:this.convertValue(C.pageY-this.offset.top-this.currentHandle.outerHeight()/2),x:this.convertValue(C.pageX-this.offset.left-this.currentHandle.outerWidth()/2)},null,true)},start:function(C,B){var D=this.options;if(!this.currentHandle){this.focus(this.previousHandle,true)}this.offset=this.element.offset();this.handleOffset=this.currentHandle.offset();this.clickOffset={top:C.pageY-this.handleOffset.top,left:C.pageX-this.handleOffset.left};this.firstValue=this.value();this.propagate("start",C);return false},stop:function(B){this.propagate("stop",B);if(this.firstValue!=this.value()){this.propagate("change",B)}this.focus(this.currentHandle,true);return false},oneStep:function(B){if(!B){B=this.options.axis=="vertical"?2:1}return this.options.stepping[B==1?"x":"y"]?this.options.stepping[B==1?"x":"y"]:(this.options.realMax[B==1?"x":"y"]/this.actualSize[B==1?"width":"height"])*5},translateRange:function(D,B){if(this.rangeElement){if(this.currentHandle[0]==this.handle[0]&&D>=this.translateValue(this.value(1),B)){D=this.translateValue(this.value(1,B)-this.oneStep(B),B)}if(this.currentHandle[0]==this.handle[1]&&D<=this.translateValue(this.value(0),B)){D=this.translateValue(this.value(0,B)+this.oneStep(B))}}if(this.options.handles){var C=this.options.handles[this.handleIndex()];if(D<this.translateValue(C.min,B)){D=this.translateValue(C.min,B)}else{if(D>this.translateValue(C.max,B)){D=this.translateValue(C.max,B)}}}return D},handleIndex:function(){return this.handle.index(this.currentHandle[0])},translateLimits:function(C,B){if(!B){B=this.options.axis=="vertical"?2:1}if(C>=this.actualSize[B==1?"width":"height"]-this.handleSize(null,B)){C=this.actualSize[B==1?"width":"height"]-this.handleSize(null,B)}if(C<=0){C=0}return C},drag:function(E,D){var F=this.options;var B={top:E.pageY-this.offset.top-this.clickOffset.top,left:E.pageX-this.offset.left-this.clickOffset.left};if(!this.currentHandle){this.focus(this.previousHandle,true)}B.left=this.translateLimits(B.left,1);B.top=this.translateLimits(B.top,2);if(F.stepping.x){var C=this.convertValue(B.left,1);C=Math.round(C/F.stepping.x)*F.stepping.x;B.left=this.translateValue(C,1)}if(F.stepping.y){var C=this.convertValue(B.top,2);C=Math.round(C/F.stepping.y)*F.stepping.y;B.top=this.translateValue(C,2)}B.left=this.translateRange(B.left,1);B.top=this.translateRange(B.top,2);if(F.axis!="vertical"){this.currentHandle.css({left:B.left})}if(F.axis!="horizontal"){this.currentHandle.css({top:B.top})}if(this.rangeElement){this.updateRange()}this.propagate("slide",E);return false},moveTo:function(F,E,G){var H=this.options;if(E==undefined&&!this.currentHandle&&this.handle.length!=1){return false}if(E==undefined&&!this.currentHandle){E=0}if(E!=undefined){this.currentHandle=this.previousHandle=A(this.handle[E]||E)}if(F.x!==undefined&&F.y!==undefined){var B=F.x;var I=F.y}else{var B=F,I=F}if(B&&B.constructor!=Number){var D=/^\-\=/.test(B),C=/^\+\=/.test(B);if(D){B=this.value(null,1)-parseInt(B.replace("-=",""),10)}else{if(C){B=this.value(null,1)+parseInt(B.replace("+=",""),10)}}}if(I&&I.constructor!=Number){var D=/^\-\=/.test(I),C=/^\+\=/.test(I);if(D){I=this.value(null,2)-parseInt(I.replace("-=",""),10)}else{if(C){I=this.value(null,2)+parseInt(I.replace("+=",""),10)}}}if(H.axis!="vertical"&&B){if(H.stepping.x){B=Math.round(B/H.stepping.x)*H.stepping.x}B=this.translateValue(B,1);B=this.translateLimits(B,1);B=this.translateRange(B,1);this.currentHandle.css({left:B})}if(H.axis!="horizontal"&&I){if(H.stepping.y){I=Math.round(I/H.stepping.y)*H.stepping.y}I=this.translateValue(I,2);I=this.translateLimits(I,2);I=this.translateRange(I,2);this.currentHandle.css({top:I})}if(this.rangeElement){this.updateRange()}if(!G){this.propagate("start",null);this.propagate("stop",null);this.propagate("change",null);this.propagate("slide",null)}}});A.ui.slider.defaults={handle:".ui-slider-handle"}})(jQuery);(function(A){A.fn.tabs=function(){var C=typeof arguments[0]=="string"&&arguments[0];var B=C&&Array.prototype.slice.call(arguments,1)||arguments;return C=="length"?A.data(this[0],"tabs").$tabs.length:this.each(function(){if(C){var D=A.data(this,"tabs");if(D){D[C].apply(D,B)}}else{new A.ui.tabs(this,B[0]||{})}})};A.ui.tabs=function(D,C){var B=this;this.options=A.extend({},A.ui.tabs.defaults,C);this.element=D;if(C.selected===null){this.options.selected=null}this.options.event+=".tabs";A(D).bind("setData.tabs",function(F,E,G){if((/^selected/).test(E)){B.select(G)}else{B.options[E]=G;B.tabify()}}).bind("getData.tabs",function(F,E){return B.options[E]});A.data(D,"tabs",this);this.tabify(true)};A.ui.tabs.defaults={selected:0,unselect:false,event:"click",disabled:[],cookie:null,spinner:"Loading&#8230;",cache:false,idPrefix:"ui-tabs-",ajaxOptions:{},fx:null,tabTemplate:'<li><a href="#{href}"><span>#{label}</span></a></li>',panelTemplate:"<div></div>",navClass:"ui-tabs-nav",selectedClass:"ui-tabs-selected",unselectClass:"ui-tabs-unselect",disabledClass:"ui-tabs-disabled",panelClass:"ui-tabs-panel",hideClass:"ui-tabs-hide",loadingClass:"ui-tabs-loading"};A.extend(A.ui.tabs.prototype,{tabId:function(B){return B.title&&B.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+A.data(B)},ui:function(C,B){return{instance:this,options:this.options,tab:C,panel:B}},tabify:function(N){this.$lis=A("li:has(a[href])",this.element);this.$tabs=this.$lis.map(function(){return A("a",this)[0]});this.$panels=A([]);var O=this,E=this.options;this.$tabs.each(function(Q,P){if(P.hash&&P.hash.replace("#","")){O.$panels=O.$panels.add(P.hash)}else{if(A(P).attr("href")!="#"){A.data(P,"href.tabs",P.href);A.data(P,"load.tabs",P.href);var S=O.tabId(P);P.href="#"+S;var R=A("#"+S);if(!R.length){R=A(E.panelTemplate).attr("id",S).addClass(E.panelClass).insertAfter(O.$panels[Q-1]||O.element);R.data("destroy.tabs",true)}O.$panels=O.$panels.add(R)}else{E.disabled.push(Q+1)}}});if(N){A(this.element).hasClass(E.navClass)||A(this.element).addClass(E.navClass);this.$panels.each(function(){var P=A(this);P.hasClass(E.panelClass)||P.addClass(E.panelClass)});this.$tabs.each(function(S,P){if(location.hash){if(P.hash==location.hash){E.selected=S;if(A.browser.msie||A.browser.opera){var R=A(location.hash),T=R.attr("id");R.attr("id","");setTimeout(function(){R.attr("id",T)},500)}scrollTo(0,0);return false}}else{if(E.cookie){var Q=parseInt(A.cookie("ui-tabs"+A.data(O.element)),10);if(Q&&O.$tabs[Q]){E.selected=Q;return false}}else{if(O.$lis.eq(S).hasClass(E.selectedClass)){E.selected=S;return false}}}});this.$panels.addClass(E.hideClass);this.$lis.removeClass(E.selectedClass);if(E.selected!==null){this.$panels.eq(E.selected).show().removeClass(E.hideClass);this.$lis.eq(E.selected).addClass(E.selectedClass)}var D=E.selected!==null&&A.data(this.$tabs[E.selected],"load.tabs");if(D){this.load(E.selected)}E.disabled=A.unique(E.disabled.concat(A.map(this.$lis.filter("."+E.disabledClass),function(Q,P){return O.$lis.index(Q)}))).sort();A(window).bind("unload",function(){O.$tabs.unbind(".tabs");O.$lis=O.$tabs=O.$panels=null})}for(var H=0,M;M=this.$lis[H];H++){A(M)[A.inArray(H,E.disabled)!=-1&&!A(M).hasClass(E.selectedClass)?"addClass":"removeClass"](E.disabledClass)}if(E.cache===false){this.$tabs.removeData("cache.tabs")}var C,J,B={"min-width":0,duration:1},F="normal";if(E.fx&&E.fx.constructor==Array){C=E.fx[0]||B,J=E.fx[1]||B}else{C=J=E.fx||B}var I={display:"",overflow:"",height:""};if(!A.browser.msie){I.opacity=""}function L(Q,P,R){P.animate(C,C.duration||F,function(){P.addClass(E.hideClass).css(I);if(A.browser.msie&&C.opacity){P[0].style.filter=""}if(R){K(Q,R,P)}})}function K(Q,R,P){if(J===B){R.css("display","block")}R.animate(J,J.duration||F,function(){R.removeClass(E.hideClass).css(I);if(A.browser.msie&&J.opacity){R[0].style.filter=""}A(O.element).triggerHandler("tabsshow",[O.ui(Q,R[0])],E.show)})}function G(Q,S,P,R){S.addClass(E.selectedClass).siblings().removeClass(E.selectedClass);L(Q,P,R)}this.$tabs.unbind(".tabs").bind(E.event,function(){var S=A(this).parents("li:eq(0)"),P=O.$panels.filter(":visible"),R=A(this.hash);if((S.hasClass(E.selectedClass)&&!E.unselect)||S.hasClass(E.disabledClass)||A(this).hasClass(E.loadingClass)||A(O.element).triggerHandler("tabsselect",[O.ui(this,R[0])],E.select)===false){this.blur();return false}O.options.selected=O.$tabs.index(this);if(E.unselect){if(S.hasClass(E.selectedClass)){O.options.selected=null;S.removeClass(E.selectedClass);O.$panels.stop();L(this,P);this.blur();return false}else{if(!P.length){O.$panels.stop();var Q=this;O.load(O.$tabs.index(this),function(){S.addClass(E.selectedClass).addClass(E.unselectClass);K(Q,R)});this.blur();return false}}}if(E.cookie){A.cookie("ui-tabs"+A.data(O.element),O.options.selected,E.cookie)}O.$panels.stop();if(R.length){var Q=this;O.load(O.$tabs.index(this),P.length?function(){G(Q,S,P,R)}:function(){S.addClass(E.selectedClass);K(Q,R)})}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}if(A.browser.msie){this.blur()}return false});if(!(/^click/).test(E.event)){this.$tabs.bind("click.tabs",function(){return false})}},add:function(E,D,C){if(C==undefined){C=this.$tabs.length}var G=this.options;var I=A(G.tabTemplate.replace(/#\{href\}/,E).replace(/#\{label\}/,D));I.data("destroy.tabs",true);var H=E.indexOf("#")==0?E.replace("#",""):this.tabId(A("a:first-child",I)[0]);var F=A("#"+H);if(!F.length){F=A(G.panelTemplate).attr("id",H).addClass(G.panelClass).addClass(G.hideClass);F.data("destroy.tabs",true)}if(C>=this.$lis.length){I.appendTo(this.element);F.appendTo(this.element.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.$tabs.length==1){I.addClass(G.selectedClass);F.removeClass(G.hideClass);var B=A.data(this.$tabs[0],"load.tabs");if(B){this.load(C,B)}}A(this.element).triggerHandler("tabsadd",[this.ui(this.$tabs[C],this.$panels[C])],G.add)},remove:function(B){var D=this.options,E=this.$lis.eq(B).remove(),C=this.$panels.eq(B).remove();if(E.hasClass(D.selectedClass)&&this.$tabs.length>1){this.select(B+(B+1<this.$tabs.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();A(this.element).triggerHandler("tabsremove",[this.ui(E.find("a")[0],C[0])],D.remove)},enable:function(B){var C=this.options;if(A.inArray(B,C.disabled)==-1){return }var D=this.$lis.eq(B).removeClass(C.disabledClass);if(A.browser.safari){D.css("display","inline-block");setTimeout(function(){D.css("display","block")},0)}C.disabled=A.grep(C.disabled,function(F,E){return F!=B});A(this.element).triggerHandler("tabsenable",[this.ui(this.$tabs[B],this.$panels[B])],C.enable)},disable:function(C){var B=this,D=this.options;if(C!=D.selected){this.$lis.eq(C).addClass(D.disabledClass);D.disabled.push(C);D.disabled.sort();A(this.element).triggerHandler("tabsdisable",[this.ui(this.$tabs[C],this.$panels[C])],D.disable)}},select:function(B){if(typeof B=="string"){B=this.$tabs.index(this.$tabs.filter("[href$="+B+"]")[0])}this.$tabs.eq(B).trigger(this.options.event)},load:function(F,K){var L=this,C=this.options,D=this.$tabs.eq(F),J=D[0],G=K==undefined||K===false,B=D.data("load.tabs");K=K||function(){};if(!B||(A.data(J,"cache.tabs")&&!G)){K();return }if(C.spinner){var H=A("span",J);H.data("label.tabs",H.html()).html("<em>"+C.spinner+"</em>")}var I=function(){L.$tabs.filter("."+C.loadingClass).each(function(){A(this).removeClass(C.loadingClass);if(C.spinner){var M=A("span",this);M.html(M.data("label.tabs")).removeData("label.tabs")}});L.xhr=null};var E=A.extend({},C.ajaxOptions,{url:B,success:function(N,M){A(J.hash).html(N);I();K();if(C.cache){A.data(J,"cache.tabs",true)}A(L.element).triggerHandler("tabsload",[L.ui(L.$tabs[F],L.$panels[F])],C.load);C.ajaxOptions.success&&C.ajaxOptions.success(N,M)}});if(this.xhr){this.xhr.abort();I()}D.addClass(C.loadingClass);setTimeout(function(){L.xhr=A.ajax(E)},0)},url:function(C,B){this.$tabs.eq(C).removeData("cache.tabs").data("load.tabs",B)},destroy:function(){var B=this.options;A(this.element).unbind(".tabs").removeClass(B.navClass).removeData("tabs");this.$tabs.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.add(this.$panels).each(function(){if(A.data(this,"destroy.tabs")){A(this).remove()}else{A(this).removeClass([B.selectedClass,B.unselectClass,B.disabledClass,B.panelClass,B.hideClass].join(" "))}})}});A.extend(A.ui.tabs.prototype,{rotation:null,rotate:function(C,F){F=F||false;var B=this,E=this.options.selected;function G(){B.rotation=setInterval(function(){E=++E<B.$tabs.length?E:0;B.select(E)},C)}function D(H){if(!H||H.clientX){clearInterval(B.rotation)}}if(C){G();if(!F){this.$tabs.bind(this.options.event,D)}else{this.$tabs.bind(this.options.event,function(){D();E=B.options.selected;G()})}}else{D();this.$tabs.unbind(this.options.event,D)}}})})(jQuery);(function($){function Datepicker(){this.debug=false;this._nextId=0;this._inst=[];this._curInst=null;this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=false;this.regional=[];this.regional[""]={clearText:"Clear",clearStatus:"Erase the current date",closeText:"Close",closeStatus:"Close without change",prevText:"&#x3c;Prev",prevStatus:"Show the previous month",nextText:"Next&#x3e;",nextStatus:"Show the next month",currentText:"Today",currentStatus:"Show the current month",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"],monthStatus:"Show a different month",yearStatus:"Show a different year",weekHeader:"Wk",weekStatus:"Week of the year",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],dayStatus:"Set DD as first week day",dateStatus:"Select DD, M d",dateFormat:"mm/dd/yy",firstDay:0,initStatus:"Select a date",isRTL:false};this._defaults={showOn:"focus",showAnim:"show",defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,closeAtTop:true,mandatory:false,hideIfNoPrevNext:false,changeMonth:true,changeYear:true,yearRange:"-10:+10",changeFirstDay:true,showOtherMonths:false,showWeeks:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",showStatus:false,statusForDate:this.dateStatus,minDate:null,maxDate:null,speed:"normal",beforeShowDay:null,beforeShow:null,onSelect:null,onClose:null,numberOfMonths:1,stepMonths:1,rangeSelect:false,rangeSeparator:" - "};$.extend(this._defaults,this.regional[""]);this._datepickerDiv=$('<div id="datepicker_div">')}$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",log:function(){if(this.debug){console.log.apply("",arguments)}},_register:function(inst){var id=this._nextId++;this._inst[id]=inst;return id},_getInst:function(id){return this._inst[id]||id},setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(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 instSettings=(inlineSettings?$.extend(settings||{},inlineSettings||{}):settings);if(nodeName=="input"){var inst=(inst&&!inlineSettings?inst:new DatepickerInstance(instSettings,false));this._connectDatepicker(target,inst)}else{if(nodeName=="div"||nodeName=="span"){var inst=new DatepickerInstance(instSettings,true);this._inlineDatepicker(target,inst)}}},_destroyDatepicker:function(target){var nodeName=target.nodeName.toLowerCase();var calId=target._calId;target._calId=null;var $target=$(target);if(nodeName=="input"){$target.siblings(".datepicker_append").replaceWith("").end().siblings(".datepicker_trigger").replaceWith("").end().removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress);var wrapper=$target.parents(".datepicker_wrap");if(wrapper){wrapper.replaceWith(wrapper.html())}}else{if(nodeName=="div"||nodeName=="span"){$target.removeClass(this.markerClassName).empty()}}if($("input[_calId="+calId+"]").length==0){this._inst[calId]=null}},_enableDatepicker:function(target){target.disabled=false;$(target).siblings("button.datepicker_trigger").each(function(){this.disabled=false}).end().siblings("img.datepicker_trigger").css({opacity:"1.0",cursor:""});this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)})},_disableDatepicker:function(target){target.disabled=true;$(target).siblings("button.datepicker_trigger").each(function(){this.disabled=true}).end().siblings("img.datepicker_trigger").css({opacity:"0.5",cursor:"default"});this._disabledInputs=$.map($.datepicker._disabledInputs,function(value){return(value==target?null:value)});this._disabledInputs[$.datepicker._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},_changeDatepicker:function(target,name,value){var settings=name||{};if(typeof name=="string"){settings={};settings[name]=value}if(inst=this._getInst(target._calId)){extendRemove(inst._settings,settings);this._updateDatepicker(inst)}},_setDateDatepicker:function(target,date,endDate){if(inst=this._getInst(target._calId)){inst._setDate(date,endDate);this._updateDatepicker(inst)}},_getDateDatepicker:function(target){var inst=this._getInst(target._calId);return(inst?inst._getDate():null)},_doKeyDown:function(e){var inst=$.datepicker._getInst(this._calId);if($.datepicker._datepickerShowing){switch(e.keyCode){case 9:$.datepicker._hideDatepicker(null,"");break;case 13:$.datepicker._selectDay(inst,inst._selectedMonth,inst._selectedYear,$("td.datepicker_daysCellOver",inst._datepickerDiv)[0]);return false;break;case 27:$.datepicker._hideDatepicker(null,inst._get("speed"));break;case 33:$.datepicker._adjustDate(inst,(e.ctrlKey?-1:-inst._get("stepMonths")),(e.ctrlKey?"Y":"M"));break;case 34:$.datepicker._adjustDate(inst,(e.ctrlKey?+1:+inst._get("stepMonths")),(e.ctrlKey?"Y":"M"));break;case 35:if(e.ctrlKey){$.datepicker._clearDate(inst)}break;case 36:if(e.ctrlKey){$.datepicker._gotoToday(inst)}break;case 37:if(e.ctrlKey){$.datepicker._adjustDate(inst,-1,"D")}break;case 38:if(e.ctrlKey){$.datepicker._adjustDate(inst,-7,"D")}break;case 39:if(e.ctrlKey){$.datepicker._adjustDate(inst,+1,"D")}break;case 40:if(e.ctrlKey){$.datepicker._adjustDate(inst,+7,"D")}break}}else{if(e.keyCode==36&&e.ctrlKey){$.datepicker._showDatepicker(this)}}},_doKeyPress:function(e){var inst=$.datepicker._getInst(this._calId);var chars=$.datepicker._possibleChars(inst._get("dateFormat"));var chr=String.fromCharCode(e.charCode==undefined?e.keyCode:e.charCode);return e.ctrlKey||(chr<" "||!chars||chars.indexOf(chr)>-1)},_connectDatepicker:function(target,inst){var input=$(target);if(input.is("."+this.markerClassName)){return }var appendText=inst._get("appendText");var isRTL=inst._get("isRTL");if(appendText){if(isRTL){input.before('<span class="datepicker_append">'+appendText)}else{input.after('<span class="datepicker_append">'+appendText)}}var showOn=inst._get("showOn");if(showOn=="focus"||showOn=="both"){input.focus(this._showDatepicker)}if(showOn=="button"||showOn=="both"){input.wrap('<span class="datepicker_wrap">');var buttonText=inst._get("buttonText");var buttonImage=inst._get("buttonImage");var trigger=$(inst._get("buttonImageOnly")?$("<img>").addClass("datepicker_trigger").attr({src:buttonImage,alt:buttonText,title:buttonText}):$("<button>").addClass("datepicker_trigger").attr({type:"button"}).html(buttonImage!=""?$("<img>").attr({src:buttonImage,alt:buttonText,title:buttonText}):buttonText));if(isRTL){input.before(trigger)}else{input.after(trigger)}trigger.click(function(){if($.datepicker._datepickerShowing&&$.datepicker._lastInput==target){$.datepicker._hideDatepicker()}else{$.datepicker._showDatepicker(target)}})}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 inst._get(key)});input[0]._calId=inst._id},_inlineDatepicker:function(target,inst){var input=$(target);if(input.is("."+this.markerClassName)){return }input.addClass(this.markerClassName).append(inst._datepickerDiv).bind("setData.datepicker",function(event,key,value){inst._settings[key]=value}).bind("getData.datepicker",function(event,key){return inst._get(key)});input[0]._calId=inst._id;this._updateDatepicker(inst)},_inlineShow:function(inst){var numMonths=inst._getNumberOfMonths();inst._datepickerDiv.width(numMonths[1]*$(".datepicker",inst._datepickerDiv[0]).width())},_dialogDatepicker:function(input,dateText,onSelect,settings,pos){var inst=this._dialogInst;if(!inst){inst=this._dialogInst=new DatepickerInstance({},false);this._dialogInput=$('<input type="text" size="1" style="position: absolute; top: -100px;"/>');this._dialogInput.keydown(this._doKeyDown);$("body").append(this._dialogInput);this._dialogInput[0]._calId=inst._id}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._datepickerDiv.addClass("datepicker_dialog");this._showDatepicker(this._dialogInput[0]);if($.blockUI){$.blockUI(this._datepickerDiv)}return this},_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._calId);var beforeShow=inst._get("beforeShow");extendRemove(inst._settings,(beforeShow?beforeShow.apply(input,[input,inst]):{}));$.datepicker._hideDatepicker(null,"");$.datepicker._lastInput=input;inst._setDateFromField(input);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"});if(isFixed&&$.browser.opera){$.datepicker._pos[0]-=document.documentElement.scrollLeft;$.datepicker._pos[1]-=document.documentElement.scrollTop}inst._datepickerDiv.css("position",($.datepicker._inDialog&&$.blockUI?"static":(isFixed?"fixed":"absolute"))).css({left:$.datepicker._pos[0]+"px",top:$.datepicker._pos[1]+"px"});$.datepicker._pos=null;inst._rangeStart=null;$.datepicker._updateDatepicker(inst);if(!inst._inline){var speed=inst._get("speed");var postProcess=function(){$.datepicker._datepickerShowing=true;$.datepicker._afterShow(inst)};var showAnim=inst._get("showAnim")||"show";inst._datepickerDiv[showAnim](speed,postProcess);if(speed==""){postProcess()}if(inst._input[0].type!="hidden"){inst._input[0].focus()}$.datepicker._curInst=inst}},_updateDatepicker:function(inst){inst._datepickerDiv.empty().append(inst._generateDatepicker());var numMonths=inst._getNumberOfMonths();if(numMonths[0]!=1||numMonths[1]!=1){inst._datepickerDiv.addClass("datepicker_multi")}else{inst._datepickerDiv.removeClass("datepicker_multi")}if(inst._get("isRTL")){inst._datepickerDiv.addClass("datepicker_rtl")}else{inst._datepickerDiv.removeClass("datepicker_rtl")}if(inst._input&&inst._input[0].type!="hidden"){inst._input[0].focus()}},_afterShow:function(inst){var numMonths=inst._getNumberOfMonths();inst._datepickerDiv.width(numMonths[1]*$(".datepicker",inst._datepickerDiv[0])[0].offsetWidth);if($.browser.msie&&parseInt($.browser.version)<7){$("#datepicker_cover").css({width:inst._datepickerDiv.width()+4,height:inst._datepickerDiv.height()+4})}var isFixed=inst._datepickerDiv.css("position")=="fixed";var pos=inst._input?$.datepicker._findPos(inst._input[0]):null;var browserWidth=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var browserHeight=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;var scrollX=(isFixed?0:document.documentElement.scrollLeft||document.body.scrollLeft);var scrollY=(isFixed?0:document.documentElement.scrollTop||document.body.scrollTop);if((inst._datepickerDiv.offset().left+inst._datepickerDiv.width()-(isFixed&&$.browser.msie?document.documentElement.scrollLeft:0))>(browserWidth+scrollX)){inst._datepickerDiv.css("left",Math.max(scrollX,pos[0]+(inst._input?$(inst._input[0]).width():null)-inst._datepickerDiv.width()-(isFixed&&$.browser.opera?document.documentElement.scrollLeft:0))+"px")}if((inst._datepickerDiv.offset().top+inst._datepickerDiv.height()-(isFixed&&$.browser.msie?document.documentElement.scrollTop:0))>(browserHeight+scrollY)){inst._datepickerDiv.css("top",Math.max(scrollY,pos[1]-(this._inDialog?0:inst._datepickerDiv.height())-(isFixed&&$.browser.opera?document.documentElement.scrollTop:0))+"px")}},_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,speed){var inst=this._curInst;if(!inst){return }var rangeSelect=inst._get("rangeSelect");if(rangeSelect&&this._stayOpen){this._selectDate(inst,inst._formatDate(inst._currentDay,inst._currentMonth,inst._currentYear))}this._stayOpen=false;if(this._datepickerShowing){speed=(speed!=null?speed:inst._get("speed"));var showAnim=inst._get("showAnim");inst._datepickerDiv[(showAnim=="slideDown"?"slideUp":(showAnim=="fadeIn"?"fadeOut":"hide"))](speed,function(){$.datepicker._tidyDialog(inst)});if(speed==""){this._tidyDialog(inst)}var onClose=inst._get("onClose");if(onClose){onClose.apply((inst._input?inst._input[0]:null),[inst._getDate(),inst])}this._datepickerShowing=false;this._lastInput=null;inst._settings.prompt=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if($.blockUI){$.unblockUI();$("body").append(this._datepickerDiv)}}this._inDialog=false}this._curInst=null},_tidyDialog:function(inst){inst._datepickerDiv.removeClass("datepicker_dialog").unbind(".datepicker");$(".datepicker_prompt",inst._datepickerDiv).remove()},_checkExternalClick:function(event){if(!$.datepicker._curInst){return }var $target=$(event.target);if(($target.parents("#datepicker_div").length==0)&&($target.attr("class")!="datepicker_trigger")&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI)){$.datepicker._hideDatepicker(null,"")}},_adjustDate:function(id,offset,period){var inst=this._getInst(id);inst._adjustDate(offset,period);this._updateDatepicker(inst)},_gotoToday:function(id){var date=new Date();var inst=this._getInst(id);inst._selectedDay=date.getDate();inst._drawMonth=inst._selectedMonth=date.getMonth();inst._drawYear=inst._selectedYear=date.getFullYear();this._adjustDate(inst)},_selectMonthYear:function(id,select,period){var inst=this._getInst(id);inst._selectingMonthYear=false;inst[period=="M"?"_drawMonth":"_drawYear"]=select.options[select.selectedIndex].value-0;this._adjustDate(inst)},_clickMonthYear:function(id){var inst=this._getInst(id);if(inst._input&&inst._selectingMonthYear&&!$.browser.msie){inst._input[0].focus()}inst._selectingMonthYear=!inst._selectingMonthYear},_changeFirstDay:function(id,day){var inst=this._getInst(id);inst._settings.firstDay=day;this._updateDatepicker(inst)},_selectDay:function(id,month,year,td){if($(td).is(".datepicker_unselectable")){return }var inst=this._getInst(id);var rangeSelect=inst._get("rangeSelect");if(rangeSelect){if(!this._stayOpen){$(".datepicker td").removeClass("datepicker_currentDay");$(td).addClass("datepicker_currentDay")}this._stayOpen=!this._stayOpen}inst._selectedDay=inst._currentDay=$("a",td).html();inst._selectedMonth=inst._currentMonth=month;inst._selectedYear=inst._currentYear=year;this._selectDate(id,inst._formatDate(inst._currentDay,inst._currentMonth,inst._currentYear));if(this._stayOpen){inst._endDay=inst._endMonth=inst._endYear=null;inst._rangeStart=new Date(inst._currentYear,inst._currentMonth,inst._currentDay);this._updateDatepicker(inst)}else{if(rangeSelect){inst._endDay=inst._currentDay;inst._endMonth=inst._currentMonth;inst._endYear=inst._currentYear;inst._selectedDay=inst._currentDay=inst._rangeStart.getDate();inst._selectedMonth=inst._currentMonth=inst._rangeStart.getMonth();inst._selectedYear=inst._currentYear=inst._rangeStart.getFullYear();inst._rangeStart=null;if(inst._inline){this._updateDatepicker(inst)}}}},_clearDate:function(id){var inst=this._getInst(id);if(inst._get("mandatory")){return }this._stayOpen=false;inst._endDay=inst._endMonth=inst._endYear=inst._rangeStart=null;this._selectDate(inst,"")},_selectDate:function(id,dateStr){var inst=this._getInst(id);dateStr=(dateStr!=null?dateStr:inst._formatDate());if(inst._rangeStart){dateStr=inst._formatDate(inst._rangeStart)+inst._get("rangeSeparator")+dateStr}if(inst._input){inst._input.val(dateStr)}var onSelect=inst._get("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(!this._stayOpen){this._hideDatepicker(null,inst._get("speed"));this._lastInput=inst._input[0];if(typeof (inst._input[0])!="object"){inst._input[0].focus()}this._lastInput=null}}},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(),(date.getTimezoneOffset()/-60));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){checkDate.setDate(checkDate.getDate()+3);return $.datepicker.iso8601Week(checkDate)}}}return Math.floor(((checkDate-firstMon)/86400000)/7)+1},dateStatus:function(date,inst){return $.datepicker.formatDate(inst._get("dateStatus"),date,inst._getFormatConfig())},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 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 size=(match=="y"?4:2);var num=0;while(size>0&&iValue<value.length&&value.charAt(iValue)>="0"&&value.charAt(iValue)<="9"){num=num*10+(value.charAt(iValue++)-0);size--}if(size==(match=="y"?4:2)){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"m":month=getNumber("m");break;case"M":month=getName("M",monthNamesShort,monthNames);break;case"y":year=getNumber("y");break;case"'":if(lookAhead("'")){checkLiteral()}else{literal=true}break;default:checkLiteral()}}}if(year<100){year+=new Date().getFullYear()-new Date().getFullYear()%100+(year<=shortYearCutoff?0:-100)}var date=new Date(year,month-1,day);if(date.getFullYear()!=year||date.getMonth()+1!=month||date.getDate()!=day){throw"Invalid date"}return date},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){return(lookAhead(match)&&value<10?"0":"")+value};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());break;case"D":output+=formatName("D",date.getDay(),dayNamesShort,dayNames);break;case"m":output+=formatNumber("m",date.getMonth()+1);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"'":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"||"m"||"y":chars+="0123456789";break;case"D"||"M":return null;case"'":if(lookAhead("'")){chars+="'"}else{literal=true}break;default:chars+=format.charAt(iFormat)}}}return chars}});function DatepickerInstance(settings,inline){this._id=$.datepicker._register(this);this._selectedDay=0;this._selectedMonth=0;this._selectedYear=0;this._drawMonth=0;this._drawYear=0;this._input=null;this._inline=inline;this._datepickerDiv=(!inline?$.datepicker._datepickerDiv:$('<div id="datepicker_div_'+this._id+'" class="datepicker_inline">'));this._settings=extendRemove(settings||{});if(inline){this._setDate(this._getDefaultDate())}}$.extend(DatepickerInstance.prototype,{_get:function(name){return this._settings[name]||$.datepicker._defaults[name]},_setDateFromField:function(input){this._input=$(input);var dateFormat=this._get("dateFormat");var dates=this._input?this._input.val().split(this._get("rangeSeparator")):null;this._endDay=this._endMonth=this._endYear=null;var date=defaultDate=this._getDefaultDate();if(dates.length>0){var settings=this._getFormatConfig();if(dates.length>1){date=$.datepicker.parseDate(dateFormat,dates[1],settings)||defaultDate;this._endDay=date.getDate();this._endMonth=date.getMonth();this._endYear=date.getFullYear()}try{date=$.datepicker.parseDate(dateFormat,dates[0],settings)||defaultDate}catch(e){$.datepicker.log(e);date=defaultDate}}this._selectedDay=date.getDate();this._drawMonth=this._selectedMonth=date.getMonth();this._drawYear=this._selectedYear=date.getFullYear();this._currentDay=(dates[0]?date.getDate():0);this._currentMonth=(dates[0]?date.getMonth():0);this._currentYear=(dates[0]?date.getFullYear():0);this._adjustDate()},_getDefaultDate:function(){var date=this._determineDate("defaultDate",new Date());var minDate=this._getMinMaxDate("min",true);var maxDate=this._getMinMaxDate("max");date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);return date},_determineDate:function(name,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 matches=/^([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?$/.exec(offset);if(matches){var year=date.getFullYear();var month=date.getMonth();var day=date.getDate();switch(matches[2]||"d"){case"d":case"D":day+=(matches[1]-0);break;case"w":case"W":day+=(matches[1]*7);break;case"m":case"M":month+=(matches[1]-0);day=Math.min(day,getDaysInMonth(year,month));break;case"y":case"Y":year+=(matches[1]-0);day=Math.min(day,getDaysInMonth(year,month));break}date=new Date(year,month,day)}return date};var date=this._get(name);return(date==null?defaultDate:(typeof date=="string"?offsetString(date,this._getDaysInMonth):(typeof date=="number"?offsetNumeric(date):date)))},_setDate:function(date,endDate){this._selectedDay=this._currentDay=date.getDate();this._drawMonth=this._selectedMonth=this._currentMonth=date.getMonth();this._drawYear=this._selectedYear=this._currentYear=date.getFullYear();if(this._get("rangeSelect")){if(endDate){this._endDay=endDate.getDate();this._endMonth=endDate.getMonth();this._endYear=endDate.getFullYear()}else{this._endDay=this._currentDay;this._endMonth=this._currentMonth;this._endYear=this._currentYear}}this._adjustDate()},_getDate:function(){var startDate=(!this._currentYear||(this._input&&this._input.val()=="")?null:new Date(this._currentYear,this._currentMonth,this._currentDay));if(this._get("rangeSelect")){return[startDate,(!this._endYear?null:new Date(this._endYear,this._endMonth,this._endDay))]}else{return startDate}},_generateDatepicker:function(){var today=new Date();today=new Date(today.getFullYear(),today.getMonth(),today.getDate());var showStatus=this._get("showStatus");var isRTL=this._get("isRTL");var clear=(this._get("mandatory")?"":'<div class="datepicker_clear"><a onclick="jQuery.datepicker._clearDate('+this._id+');"'+(showStatus?this._addStatus(this._get("clearStatus")||"&#xa0;"):"")+">"+this._get("clearText")+"</a></div>");var controls='<div class="datepicker_control">'+(isRTL?"":clear)+'<div class="datepicker_close"><a onclick="jQuery.datepicker._hideDatepicker();"'+(showStatus?this._addStatus(this._get("closeStatus")||"&#xa0;"):"")+">"+this._get("closeText")+"</a></div>"+(isRTL?clear:"")+"</div>";var prompt=this._get("prompt");var closeAtTop=this._get("closeAtTop");var hideIfNoPrevNext=this._get("hideIfNoPrevNext");var numMonths=this._getNumberOfMonths();var stepMonths=this._get("stepMonths");var isMultiMonth=(numMonths[0]!=1||numMonths[1]!=1);var minDate=this._getMinMaxDate("min",true);var maxDate=this._getMinMaxDate("max");var drawMonth=this._drawMonth;var drawYear=this._drawYear;if(maxDate){var maxDraw=new Date(maxDate.getFullYear(),maxDate.getMonth()-numMonths[1]+1,maxDate.getDate());maxDraw=(minDate&&maxDraw<minDate?minDate:maxDraw);while(new Date(drawYear,drawMonth,1)>maxDraw){drawMonth--;if(drawMonth<0){drawMonth=11;drawYear--}}}var prev='<div class="datepicker_prev">'+(this._canAdjustMonth(-1,drawYear,drawMonth)?'<a onclick="jQuery.datepicker._adjustDate('+this._id+", -"+stepMonths+", 'M');\""+(showStatus?this._addStatus(this._get("prevStatus")||"&#xa0;"):"")+">"+this._get("prevText")+"</a>":(hideIfNoPrevNext?"":"<label>"+this._get("prevText")+"</label>"))+"</div>";var next='<div class="datepicker_next">'+(this._canAdjustMonth(+1,drawYear,drawMonth)?'<a onclick="jQuery.datepicker._adjustDate('+this._id+", +"+stepMonths+", 'M');\""+(showStatus?this._addStatus(this._get("nextStatus")||"&#xa0;"):"")+">"+this._get("nextText")+"</a>":(hideIfNoPrevNext?">":"<label>"+this._get("nextText")+"</label>"))+"</div>";var html=(prompt?'<div class="datepicker_prompt">'+prompt+"</div>":"")+(closeAtTop&&!this._inline?controls:"")+'<div class="datepicker_links">'+(isRTL?next:prev)+(this._isInRange(today)?'<div class="datepicker_current"><a onclick="jQuery.datepicker._gotoToday('+this._id+');"'+(showStatus?this._addStatus(this._get("currentStatus")||"&#xa0;"):"")+">"+this._get("currentText")+"</a></div>":"")+(isRTL?prev:next)+"</div>";var showWeeks=this._get("showWeeks");for(var row=0;row<numMonths[0];row++){for(var col=0;col<numMonths[1];col++){var selectedDate=new Date(drawYear,drawMonth,this._selectedDay);html+='<div class="datepicker_oneMonth'+(col==0?" datepicker_newRow":"")+'">'+this._generateMonthYearHeader(drawMonth,drawYear,minDate,maxDate,selectedDate,row>0||col>0)+'<table class="datepicker" cellpadding="0" cellspacing="0"><thead><tr class="datepicker_titleRow">'+(showWeeks?"<td>"+this._get("weekHeader")+"</td>":"");var firstDay=this._get("firstDay");var changeFirstDay=this._get("changeFirstDay");var dayNames=this._get("dayNames");var dayNamesShort=this._get("dayNamesShort");var dayNamesMin=this._get("dayNamesMin");for(var dow=0;dow<7;dow++){var day=(dow+firstDay)%7;var status=this._get("dayStatus")||"&#xa0;";status=(status.indexOf("DD")>-1?status.replace(/DD/,dayNames[day]):status.replace(/D/,dayNamesShort[day]));html+="<td"+((dow+firstDay+6)%7>=5?' class="datepicker_weekEndCell"':"")+">"+(!changeFirstDay?"<span":'<a onclick="jQuery.datepicker._changeFirstDay('+this._id+", "+day+');"')+(showStatus?this._addStatus(status):"")+' title="'+dayNames[day]+'">'+dayNamesMin[day]+(changeFirstDay?"</a>":"</span>")+"</td>"}html+="</tr></thead><tbody>";var daysInMonth=this._getDaysInMonth(drawYear,drawMonth);if(drawYear==this._selectedYear&&drawMonth==this._selectedMonth){this._selectedDay=Math.min(this._selectedDay,daysInMonth)}var leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;var currentDate=(!this._currentDay?new Date(9999,9,9):new Date(this._currentYear,this._currentMonth,this._currentDay));var endDate=this._endDay?new Date(this._endYear,this._endMonth,this._endDay):currentDate;var printDate=new Date(drawYear,drawMonth,1-leadDays);var numRows=(isMultiMonth?6:Math.ceil((leadDays+daysInMonth)/7));var beforeShowDay=this._get("beforeShowDay");var showOtherMonths=this._get("showOtherMonths");var calculateWeek=this._get("calculateWeek")||$.datepicker.iso8601Week;var dateStatus=this._get("statusForDate")||$.datepicker.dateStatus;for(var dRow=0;dRow<numRows;dRow++){html+='<tr class="datepicker_daysRow">'+(showWeeks?'<td class="datepicker_weekCol">'+calculateWeek(printDate)+"</td>":"");for(var dow=0;dow<7;dow++){var daySettings=(beforeShowDay?beforeShowDay.apply((this._input?this._input[0]:null),[printDate]):[true,""]);var otherMonth=(printDate.getMonth()!=drawMonth);var unselectable=otherMonth||!daySettings[0]||(minDate&&printDate<minDate)||(maxDate&&printDate>maxDate);html+='<td class="datepicker_daysCell'+((dow+firstDay+6)%7>=5?" datepicker_weekEndCell":"")+(otherMonth?" datepicker_otherMonth":"")+(printDate.getTime()==selectedDate.getTime()&&drawMonth==this._selectedMonth?" datepicker_daysCellOver":"")+(unselectable?" datepicker_unselectable":"")+(otherMonth&&!showOtherMonths?"":" "+daySettings[1]+(printDate.getTime()>=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" datepicker_currentDay":"")+(printDate.getTime()==today.getTime()?" datepicker_today":""))+'"'+(unselectable?"":" onmouseover=\"jQuery(this).addClass('datepicker_daysCellOver');"+(!showStatus||(otherMonth&&!showOtherMonths)?"":"jQuery('#datepicker_status_"+this._id+"').html('"+(dateStatus.apply((this._input?this._input[0]:null),[printDate,this])||"&#xa0;")+"');")+"\" onmouseout=\"jQuery(this).removeClass('datepicker_daysCellOver');"+(!showStatus||(otherMonth&&!showOtherMonths)?"":"jQuery('#datepicker_status_"+this._id+"').html('&#xa0;');")+'" onclick="jQuery.datepicker._selectDay('+this._id+","+drawMonth+","+drawYear+', this);"')+">"+(otherMonth?(showOtherMonths?printDate.getDate():"&#xa0;"):(unselectable?printDate.getDate():"<a>"+printDate.getDate()+"</a>"))+"</td>";printDate.setDate(printDate.getDate()+1)}html+="</tr>"}drawMonth++;if(drawMonth>11){drawMonth=0;drawYear++}html+="</tbody></table></div>"}}html+=(showStatus?'<div id="datepicker_status_'+this._id+'" class="datepicker_status">'+(this._get("initStatus")||"&#xa0;")+"</div>":"")+(!closeAtTop&&!this._inline?controls:"")+'<div style="clear: both;"></div>'+($.browser.msie&&parseInt($.browser.version)<7&&!this._inline?'<iframe src="javascript:false;" class="datepicker_cover"></iframe>':"");return html},_generateMonthYearHeader:function(drawMonth,drawYear,minDate,maxDate,selectedDate,secondary){minDate=(this._rangeStart&&minDate&&selectedDate<minDate?selectedDate:minDate);var showStatus=this._get("showStatus");var html='<div class="datepicker_header">';var monthNames=this._get("monthNames");if(secondary||!this._get("changeMonth")){html+=monthNames[drawMonth]+"&#xa0;"}else{var inMinYear=(minDate&&minDate.getFullYear()==drawYear);var inMaxYear=(maxDate&&maxDate.getFullYear()==drawYear);html+='<select class="datepicker_newMonth" onchange="jQuery.datepicker._selectMonthYear('+this._id+", this, 'M');\" onclick=\"jQuery.datepicker._clickMonthYear("+this._id+');"'+(showStatus?this._addStatus(this._get("monthStatus")||"&#xa0;"):"")+">";for(var month=0;month<12;month++){if((!inMinYear||month>=minDate.getMonth())&&(!inMaxYear||month<=maxDate.getMonth())){html+='<option value="'+month+'"'+(month==drawMonth?' selected="selected"':"")+">"+monthNames[month]+"</option>"}}html+="</select>"}if(secondary||!this._get("changeYear")){html+=drawYear}else{var years=this._get("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="datepicker_newYear" onchange="jQuery.datepicker._selectMonthYear('+this._id+", this, 'Y');\" onclick=\"jQuery.datepicker._clickMonthYear("+this._id+');"'+(showStatus?this._addStatus(this._get("yearStatus")||"&#xa0;"):"")+">";for(;year<=endYear;year++){html+='<option value="'+year+'"'+(year==drawYear?' selected="selected"':"")+">"+year+"</option>"}html+="</select>"}html+="</div>";return html},_addStatus:function(text){return" onmouseover=\"jQuery('#datepicker_status_"+this._id+"').html('"+text+"');\" onmouseout=\"jQuery('#datepicker_status_"+this._id+"').html('&#xa0;');\""},_adjustDate:function(offset,period){var year=this._drawYear+(period=="Y"?offset:0);var month=this._drawMonth+(period=="M"?offset:0);var day=Math.min(this._selectedDay,this._getDaysInMonth(year,month))+(period=="D"?offset:0);var date=new Date(year,month,day);var minDate=this._getMinMaxDate("min",true);var maxDate=this._getMinMaxDate("max");date=(minDate&&date<minDate?minDate:date);date=(maxDate&&date>maxDate?maxDate:date);this._selectedDay=date.getDate();this._drawMonth=this._selectedMonth=date.getMonth();this._drawYear=this._selectedYear=date.getFullYear()},_getNumberOfMonths:function(){var numMonths=this._get("numberOfMonths");return(numMonths==null?[1,1]:(typeof numMonths=="number"?[1,numMonths]:numMonths))},_getMinMaxDate:function(minMax,checkRange){var date=this._determineDate(minMax+"Date",null);if(date){date.setHours(0);date.setMinutes(0);date.setSeconds(0);date.setMilliseconds(0)}return date||(checkRange?this._rangeStart:null)},_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(offset,curYear,curMonth){var numMonths=this._getNumberOfMonths();var date=new Date(curYear,curMonth+(offset<0?offset:numMonths[1]),1);if(offset<0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()))}return this._isInRange(date)},_isInRange:function(date){var newMinDate=(!this._rangeStart?null:new Date(this._selectedYear,this._selectedMonth,this._selectedDay));newMinDate=(newMinDate&&this._rangeStart<newMinDate?this._rangeStart:newMinDate);var minDate=newMinDate||this._getMinMaxDate("min");var maxDate=this._getMinMaxDate("max");return((!minDate||date>=minDate)&&(!maxDate||date<=maxDate))},_getFormatConfig:function(){var shortYearCutoff=this._get("shortYearCutoff");shortYearCutoff=(typeof shortYearCutoff!="string"?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get("dayNamesShort"),dayNames:this._get("dayNames"),monthNamesShort:this._get("monthNamesShort"),monthNames:this._get("monthNames")}},_formatDate:function(day,month,year){if(!day){this._currentDay=this._selectedDay;this._currentMonth=this._selectedMonth;this._currentYear=this._selectedYear}var date=(day?(typeof day=="object"?day:new Date(year,month,day)):new Date(this._currentYear,this._currentMonth,this._currentDay));return $.datepicker.formatDate(this._get("dateFormat"),date,this._getFormatConfig())}});function extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]==null){target[name]=null}}return target}$.fn.datepicker=function(options){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))}return this.each(function(){typeof options=="string"?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options)})};$(document).ready(function(){$(document.body).append($.datepicker._datepickerDiv).mousedown($.datepicker._checkExternalClick)});$.datepicker=new Datepicker()})(jQuery);