jQuery.ui||(function(G){var A=G.fn.remove,F=G.browser.mozilla&&(parseFloat(G.browser.version)<1.9);G.ui={version:"1.7.1",plugin:{add:function(L,K,N){var J=G.ui[L].prototype;for(var M in N){J.plugins[M]=J.plugins[M]||[];J.plugins[M].push([K,N[M]])}},call:function(M,K,L){var N=M.plugins[K];if(!N||!M.element[0].parentNode){return }for(var J=0;J<N.length;J++){if(M.options[N[J][0]]){N[J][1].apply(M.element,L)}}}},contains:function(J,K){return document.compareDocumentPosition?J.compareDocumentPosition(K)&16:J!==K&&J.contains(K)},hasScroll:function(J,L){if(G(J).css("overflow")=="hidden"){return false}var M=(L&&L=="left")?"scrollLeft":"scrollTop",K=false;if(J[M]>0){return true}J[M]=1;K=(J[M]>0);J[M]=0;return K},isOverAxis:function(K,L,J){return(K>L)&&(K<(L+J))},isOver:function(N,L,O,J,M,K){return G.ui.isOverAxis(N,O,M)&&G.ui.isOverAxis(L,J,K)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(F){var D=G.attr,E=G.fn.removeAttr,B="http://www.w3.org/2005/07/aaa",I=/^aria-/,H=/^wairole:/;G.attr=function(L,M,K){var J=K!==undefined;return(M=="role"?(J?D.call(this,L,M,"wairole:"+K):(D.apply(this,arguments)||"").replace(H,"")):(I.test(M)?(J?L.setAttributeNS(B,M.replace(I,"aaa:"),K):D.call(this,L,M.replace(I,"aaa:"))):D.apply(this,arguments)))};G.fn.removeAttr=function(J){return(I.test(J)?this.each(function(){this.removeAttributeNS(B,J.replace(I,""))}):E.call(this,J))}}G.fn.extend({remove:function(){G("*",this).add(this).each(function(){G(this).triggerHandler("remove")});return A.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var J;if((G.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){J=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(G.curCSS(this,"position",1))&&(/(auto|scroll)/).test(G.curCSS(this,"overflow",1)+G.curCSS(this,"overflow-y",1)+G.curCSS(this,"overflow-x",1))}).eq(0)}else{J=this.parents().filter(function(){return(/(auto|scroll)/).test(G.curCSS(this,"overflow",1)+G.curCSS(this,"overflow-y",1)+G.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!J.length?G(document):J}});G.extend(G.expr[":"],{data:function(J,K,L){return !!G.data(J,L[3])},focusable:function(K){var J=K.nodeName.toLowerCase(),L=G.attr(K,"tabindex");return(/input|select|textarea|button|object/.test(J)?!K.disabled:"a"==J||"area"==J?K.href||!isNaN(L):!isNaN(L))&&!G(K)["area"==J?"parents":"closest"](":hidden").length},tabbable:function(J){var K=G.attr(J,"tabindex");return(isNaN(K)||K>=0)&&G(J).is(":focusable")}});function C(J,O,N,K){function L(P){var Q=G[J][O][P]||[];return(typeof Q=="string"?Q.split(/,?\s+/):Q)}var M=L("getter");if(K.length==1&&typeof K[0]=="string"){M=M.concat(L("getterSetter"))}return(G.inArray(N,M)!=-1)}G.widget=function(K,L){var J=K.split(".")[0];K=K.split(".")[1];G.fn[K]=function(N){var P=(typeof N=="string"),O=Array.prototype.slice.call(arguments,1);if(P&&N.substring(0,1)=="_"){return this}if(P&&C(J,K,N,O)){var M=G.data(this[0],K);return(M?M[N].apply(M,O):undefined)}return this.each(function(){var Q=G.data(this,K);(!Q&&!P&&G.data(this,K,new G[J][K](this,N))._init());(Q&&P&&G.isFunction(Q[N])&&Q[N].apply(Q,O))})};G[J]=G[J]||{};G[J][K]=function(N,O){var M=this;this.namespace=J;this.widgetName=K;this.widgetEventPrefix=G[J][K].eventPrefix||K;this.widgetBaseClass=J+"-"+K;this.options=G.extend({},G.widget.defaults,G[J][K].defaults,G.metadata&&G.metadata.get(N)[K],O);this.element=G(N).bind("setData."+K,function(Q,R,P){if(Q.target==N){return M._setData(R,P)}}).bind("getData."+K,function(P,Q){if(P.target==N){return M._getData(Q)}}).bind("remove",function(){return M.destroy()})};G[J][K].prototype=G.extend({},G.widget.prototype,L);G[J][K].getterSetter="option"};G.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(K,J){var L=K,M=this;if(typeof K=="string"){if(J===undefined){return this._getData(K)}L={};L[K]=J}G.each(L,function(O,N){M._setData(O,N)})},_getData:function(J){return this.options[J]},_setData:function(K,J){this.options[K]=J;if(K=="disabled"){this.element[J?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",J)}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(K,J,P){var N=this.options[K],M=(K==this.widgetEventPrefix?K:this.widgetEventPrefix+K);J=G.Event(J);J.type=M;if(J.originalEvent){for(var L=G.event.props.length,O;L;){O=G.event.props[--L];J[O]=J.originalEvent[O]}}this.element.trigger(J,P);return !(G.isFunction(N)&&N.call(this.element[0],J,P)===false||J.isDefaultPrevented())}};G.widget.defaults={disabled:false};G.ui.mouse={_mouseInit:function(){var J=this;this.element.bind("mousedown."+this.widgetName,function(K){return J._mouseDown(K)}).bind("click."+this.widgetName,function(K){if(J._preventClickEvent){J._preventClickEvent=false;K.stopImmediatePropagation();return false}});if(G.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);(G.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(K){K.originalEvent=K.originalEvent||{};if(K.originalEvent.mouseHandled){return }(this._mouseStarted&&this._mouseUp(K));this._mouseDownEvent=K;var L=this,J=(K.which==1),M=(typeof this.options.cancel=="string"?G(K.target).parents().add(K.target).filter(this.options.cancel).length:false);if(!J||M||!this._mouseCapture(K)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){L.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(K)&&this._mouseDelayMet(K)){this._mouseStarted=(this._mouseStart(K)!==false);if(!this._mouseStarted){K.preventDefault();return true}}this._mouseMoveDelegate=function(N){return L._mouseMove(N)};this._mouseUpDelegate=function(N){return L._mouseUp(N)};G(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);(G.browser.safari||K.preventDefault());K.originalEvent.mouseHandled=true;return true},_mouseMove:function(J){if(G.browser.msie&&!J.button){return this._mouseUp(J)}if(this._mouseStarted){this._mouseDrag(J);return J.preventDefault()}if(this._mouseDistanceMet(J)&&this._mouseDelayMet(J)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,J)!==false);(this._mouseStarted?this._mouseDrag(J):this._mouseUp(J))}return !this._mouseStarted},_mouseUp:function(J){G(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(J.target==this._mouseDownEvent.target);this._mouseStop(J)}return false},_mouseDistanceMet:function(J){return(Math.max(Math.abs(this._mouseDownEvent.pageX-J.pageX),Math.abs(this._mouseDownEvent.pageY-J.pageY))>=this.options.distance)},_mouseDelayMet:function(J){return this.mouseDelayMet},_mouseStart:function(J){},_mouseDrag:function(J){},_mouseStop:function(J){},_mouseCapture:function(J){return true}};G.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);(function(A){A.widget("ui.draggable",A.extend({},A.ui.mouse,{_init:function(){if(this.options.helper=="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative"}(this.options.addClasses&&this.element.addClass("ui-draggable"));(this.options.disabled&&this.element.addClass("ui-draggable-disabled"));this._mouseInit()},destroy:function(){if(!this.element.data("draggable")){return }this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy()},_mouseCapture:function(B){var C=this.options;if(this.helper||C.disabled||A(B.target).is(".ui-resizable-handle")){return false}this.handle=this._getHandle(B);if(!this.handle){return false}return true},_mouseStart:function(B){var C=this.options;this.helper=this._createHelper(B);this._cacheHelperProportions();if(A.ui.ddmanager){A.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};A.extend(this.offset,{click:{left:B.pageX-this.offset.left,top:B.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(B);this.originalPageX=B.pageX;this.originalPageY=B.pageY;if(C.cursorAt){this._adjustOffsetFromHelper(C.cursorAt)}if(C.containment){this._setContainment()}this._trigger("start",B);this._cacheHelperProportions();if(A.ui.ddmanager&&!C.dropBehaviour){A.ui.ddmanager.prepareOffsets(this,B)}this.helper.addClass("ui-draggable-dragging");this._mouseDrag(B,true);return true},_mouseDrag:function(B,C){this.position=this._generatePosition(B);this.positionAbs=this._convertPositionTo("absolute");if(!C){var D=this._uiHash();this._trigger("drag",B,D);this.position=D.position}if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}if(A.ui.ddmanager){A.ui.ddmanager.drag(this,B)}return false},_mouseStop:function(D){var C=false;if(A.ui.ddmanager&&!this.options.dropBehaviour){C=A.ui.ddmanager.drop(this,D)}if(this.dropped){C=this.dropped;this.dropped=false}if((this.options.revert=="invalid"&&!C)||(this.options.revert=="valid"&&C)||this.options.revert===true||(A.isFunction(this.options.revert)&&this.options.revert.call(this.element,C))){var B=this;A(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){B._trigger("stop",D);B._clear()})}else{this._trigger("stop",D);this._clear()}return false},_getHandle:function(B){var C=!this.options.handle||!A(this.options.handle,this.element).length?true:false;A(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==B.target){C=true}});return C},_createHelper:function(D){var C=this.options;var B=A.isFunction(C.helper)?A(C.helper.apply(this.element[0],[D])):(C.helper=="clone"?this.element.clone():this.element);if(!B.parents("body").length){B.appendTo((C.appendTo=="parent"?this.element[0].parentNode:C.appendTo))}if(B[0]!=this.element[0]&&!(/(fixed|absolute)/).test(B.css("position"))){B.css("position","absolute")}return B},_adjustOffsetFromHelper:function(B){if(B.left!=undefined){this.offset.click.left=B.left+this.margins.left}if(B.right!=undefined){this.offset.click.left=this.helperProportions.width-B.right+this.margins.left}if(B.top!=undefined){this.offset.click.top=B.top+this.margins.top}if(B.bottom!=undefined){this.offset.click.top=this.helperProportions.height-B.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var B=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&A.ui.contains(this.scrollParent[0],this.offsetParent[0])){B.left+=this.scrollParent.scrollLeft();B.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&A.browser.msie)){B={top:0,left:0}}return{top:B.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:B.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var B=this.element.position();return{top:B.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:B.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var C=this.options;if(C.containment=="parent"){C.containment=this.helper[0].parentNode}if(C.containment=="document"||C.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,A(C.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(A(C.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(C.containment)&&C.containment.constructor!=Array){var E=A(C.containment)[0];if(!E){return }var D=A(C.containment).offset();var B=(A(E).css("overflow")!="hidden");this.containment=[D.left+(parseInt(A(E).css("borderLeftWidth"),10)||0)+(parseInt(A(E).css("paddingLeft"),10)||0)-this.margins.left,D.top+(parseInt(A(E).css("borderTopWidth"),10)||0)+(parseInt(A(E).css("paddingTop"),10)||0)-this.margins.top,D.left+(B?Math.max(E.scrollWidth,E.offsetWidth):E.offsetWidth)-(parseInt(A(E).css("borderLeftWidth"),10)||0)-(parseInt(A(E).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,D.top+(B?Math.max(E.scrollHeight,E.offsetHeight):E.offsetHeight)-(parseInt(A(E).css("borderTopWidth"),10)||0)-(parseInt(A(E).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}else{if(C.containment.constructor==Array){this.containment=C.containment}}},_convertPositionTo:function(E,C){if(!C){C=this.position}var G=E=="absolute"?1:-1;var F=this.options,B=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&A.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,D=(/(html|body)/i).test(B[0].tagName);return{top:(C.top+this.offset.relative.top*G+this.offset.parent.top*G-(A.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(D?0:B.scrollTop()))*G)),left:(C.left+this.offset.relative.left*G+this.offset.parent.left*G-(A.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():D?0:B.scrollLeft())*G))}},_generatePosition:function(G){var D=this.options,B=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&A.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,C=(/(html|body)/i).test(B[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var H=G.pageX;var I=G.pageY;if(this.originalPosition){if(this.containment){if(G.pageX-this.offset.click.left<this.containment[0]){H=this.containment[0]+this.offset.click.left}if(G.pageY-this.offset.click.top<this.containment[1]){I=this.containment[1]+this.offset.click.top}if(G.pageX-this.offset.click.left>this.containment[2]){H=this.containment[2]+this.offset.click.left}if(G.pageY-this.offset.click.top>this.containment[3]){I=this.containment[3]+this.offset.click.top}}if(D.grid){var E=this.originalPageY+Math.round((I-this.originalPageY)/D.grid[1])*D.grid[1];I=this.containment?(!(E-this.offset.click.top<this.containment[1]||E-this.offset.click.top>this.containment[3])?E:(!(E-this.offset.click.top<this.containment[1])?E-D.grid[1]:E+D.grid[1])):E;var F=this.originalPageX+Math.round((H-this.originalPageX)/D.grid[0])*D.grid[0];H=this.containment?(!(F-this.offset.click.left<this.containment[0]||F-this.offset.click.left>this.containment[2])?F:(!(F-this.offset.click.left<this.containment[0])?F-D.grid[0]:F+D.grid[0])):F}}return{top:(I-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(A.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(C?0:B.scrollTop())))),left:(H-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(A.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():C?0:B.scrollLeft())))}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false},_trigger:function(B,D,C){C=C||this._uiHash();A.ui.plugin.call(this,B,[D,C]);if(B=="drag"){this.positionAbs=this._convertPositionTo("absolute")}return A.widget.prototype._trigger.call(this,B,D,C)},plugins:{},_uiHash:function(B){return{helper:this.helper,position:this.position,absolutePosition:this.positionAbs,offset:this.positionAbs}}}));A.extend(A.ui.draggable,{version:"1.7.1",eventPrefix:"drag",defaults:{addClasses:true,appendTo:"parent",axis:false,cancel:":input,option",connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,delay:0,distance:1,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false}});A.ui.plugin.add("draggable","connectToSortable",{start:function(F,D){var E=A(this).data("draggable"),C=E.options,B=A.extend({},D,{item:E.element});E.sortables=[];A(C.connectToSortable).each(function(){var G=A.data(this,"sortable");if(G&&!G.options.disabled){E.sortables.push({instance:G,shouldRevert:G.options.revert});G._refreshItems();G._trigger("activate",F,B)}})},stop:function(E,C){var D=A(this).data("draggable"),B=A.extend({},C,{item:D.element});A.each(D.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;D.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=true}this.instance._mouseStop(E);this.instance.options.helper=this.instance.options._helper;if(D.options.helper=="original"){this.instance.currentItem.css({top:"auto",left:"auto"})}}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",E,B)}})},drag:function(F,C){var D=A(this).data("draggable"),B=this;var E=function(M){var H=this.offset.click.top,I=this.offset.click.left;var O=this.positionAbs.top,K=this.positionAbs.left;var L=M.height,J=M.width;var G=M.top,N=M.left;return A.ui.isOver(O+H,K+I,G,N,L,J)};A.each(D.sortables,function(G){this.instance.positionAbs=D.positionAbs;this.instance.helperProportions=D.helperProportions;this.instance.offset.click=D.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=A(B).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return C.helper[0]};F.target=this.instance.currentItem[0];this.instance._mouseCapture(F,true);this.instance._mouseStart(F,true,true);this.instance.offset.click.top=D.offset.click.top;this.instance.offset.click.left=D.offset.click.left;this.instance.offset.parent.left-=D.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=D.offset.parent.top-this.instance.offset.parent.top;D._trigger("toSortable",F);D.dropped=this.instance.element;D.currentItem=D.element;this.instance.fromOutside=D}if(this.instance.currentItem){this.instance._mouseDrag(F)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",F,this.instance._uiHash(this.instance));this.instance._mouseStop(F,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}D._trigger("fromSortable",F);D.dropped=false}}})}});A.ui.plugin.add("draggable","cursor",{start:function(E,D){var B=A("body"),C=A(this).data("draggable").options;if(B.css("cursor")){C._cursor=B.css("cursor")}B.css("cursor",C.cursor)},stop:function(B,D){var C=A(this).data("draggable").options;if(C._cursor){A("body").css("cursor",C._cursor)}}});A.ui.plugin.add("draggable","iframeFix",{start:function(B,D){var C=A(this).data("draggable").options;A(C.iframeFix===true?"iframe":C.iframeFix).each(function(){A('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(A(this).offset()).appendTo("body")})},stop:function(B,C){A("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});A.ui.plugin.add("draggable","opacity",{start:function(E,D){var B=A(D.helper),C=A(this).data("draggable").options;if(B.css("opacity")){C._opacity=B.css("opacity")}B.css("opacity",C.opacity)},stop:function(B,D){var C=A(this).data("draggable").options;if(C._opacity){A(D.helper).css("opacity",C._opacity)}}});A.ui.plugin.add("draggable","scroll",{start:function(D,C){var B=A(this).data("draggable");if(B.scrollParent[0]!=document&&B.scrollParent[0].tagName!="HTML"){B.overflowOffset=B.scrollParent.offset()}},drag:function(E,D){var F=A(this).data("draggable"),C=F.options,B=false;if(F.scrollParent[0]!=document&&F.scrollParent[0].tagName!="HTML"){if(!C.axis||C.axis!="x"){if((F.overflowOffset.top+F.scrollParent[0].offsetHeight)-E.pageY<C.scrollSensitivity){F.scrollParent[0].scrollTop=B=F.scrollParent[0].scrollTop+C.scrollSpeed}else{if(E.pageY-F.overflowOffset.top<C.scrollSensitivity){F.scrollParent[0].scrollTop=B=F.scrollParent[0].scrollTop-C.scrollSpeed}}}if(!C.axis||C.axis!="y"){if((F.overflowOffset.left+F.scrollParent[0].offsetWidth)-E.pageX<C.scrollSensitivity){F.scrollParent[0].scrollLeft=B=F.scrollParent[0].scrollLeft+C.scrollSpeed}else{if(E.pageX-F.overflowOffset.left<C.scrollSensitivity){F.scrollParent[0].scrollLeft=B=F.scrollParent[0].scrollLeft-C.scrollSpeed}}}}else{if(!C.axis||C.axis!="x"){if(E.pageY-A(document).scrollTop()<C.scrollSensitivity){B=A(document).scrollTop(A(document).scrollTop()-C.scrollSpeed)}else{if(A(window).height()-(E.pageY-A(document).scrollTop())<C.scrollSensitivity){B=A(document).scrollTop(A(document).scrollTop()+C.scrollSpeed)}}}if(!C.axis||C.axis!="y"){if(E.pageX-A(document).scrollLeft()<C.scrollSensitivity){B=A(document).scrollLeft(A(document).scrollLeft()-C.scrollSpeed)}else{if(A(window).width()-(E.pageX-A(document).scrollLeft())<C.scrollSensitivity){B=A(document).scrollLeft(A(document).scrollLeft()+C.scrollSpeed)}}}}if(B!==false&&A.ui.ddmanager&&!C.dropBehaviour){A.ui.ddmanager.prepareOffsets(F,E)}}});A.ui.plugin.add("draggable","snap",{start:function(E,D){var B=A(this).data("draggable"),C=B.options;B.snapElements=[];A(C.snap.constructor!=String?(C.snap.items||":data(draggable)"):C.snap).each(function(){var F=A(this);var G=F.offset();if(this!=B.element[0]){B.snapElements.push({item:this,width:F.outerWidth(),height:F.outerHeight(),top:G.top,left:G.left})}})},drag:function(G,K){var Q=A(this).data("draggable"),I=Q.options;var C=I.snapTolerance;var D=K.offset.left,E=D+Q.helperProportions.width,R=K.offset.top,S=R+Q.helperProportions.height;for(var F=Q.snapElements.length-1;F>=0;F--){var H=Q.snapElements[F].left,L=H+Q.snapElements[F].width,M=Q.snapElements[F].top,J=M+Q.snapElements[F].height;if(!((H-C<D&&D<L+C&&M-C<R&&R<J+C)||(H-C<D&&D<L+C&&M-C<S&&S<J+C)||(H-C<E&&E<L+C&&M-C<R&&R<J+C)||(H-C<E&&E<L+C&&M-C<S&&S<J+C))){if(Q.snapElements[F].snapping){(Q.options.snap.release&&Q.options.snap.release.call(Q.element,G,A.extend(Q._uiHash(),{snapItem:Q.snapElements[F].item})))}Q.snapElements[F].snapping=false;continue}if(I.snapMode!="inner"){var T=Math.abs(M-S)<=C;var B=Math.abs(J-R)<=C;var O=Math.abs(H-E)<=C;var N=Math.abs(L-D)<=C;if(T){K.position.top=Q._convertPositionTo("relative",{top:M-Q.helperProportions.height,left:0}).top-Q.margins.top}if(B){K.position.top=Q._convertPositionTo("relative",{top:J,left:0}).top-Q.margins.top}if(O){K.position.left=Q._convertPositionTo("relative",{top:0,left:H-Q.helperProportions.width}).left-Q.margins.left}if(N){K.position.left=Q._convertPositionTo("relative",{top:0,left:L}).left-Q.margins.left}}var P=(T||B||O||N);if(I.snapMode!="outer"){var T=Math.abs(M-R)<=C;var B=Math.abs(J-S)<=C;var O=Math.abs(H-D)<=C;var N=Math.abs(L-E)<=C;if(T){K.position.top=Q._convertPositionTo("relative",{top:M,left:0}).top-Q.margins.top}if(B){K.position.top=Q._convertPositionTo("relative",{top:J-Q.helperProportions.height,left:0}).top-Q.margins.top}if(O){K.position.left=Q._convertPositionTo("relative",{top:0,left:H}).left-Q.margins.left}if(N){K.position.left=Q._convertPositionTo("relative",{top:0,left:L-Q.helperProportions.width}).left-Q.margins.left}}if(!Q.snapElements[F].snapping&&(T||B||O||N||P)){(Q.options.snap.snap&&Q.options.snap.snap.call(Q.element,G,A.extend(Q._uiHash(),{snapItem:Q.snapElements[F].item})))}Q.snapElements[F].snapping=(T||B||O||N||P)}}});A.ui.plugin.add("draggable","stack",{start:function(B,E){var C=A(this).data("draggable").options;var D=A.makeArray(A(C.stack.group)).sort(function(F,G){return(parseInt(A(F).css("zIndex"),10)||C.stack.min)-(parseInt(A(G).css("zIndex"),10)||C.stack.min)});A(D).each(function(F){this.style.zIndex=C.stack.min+F});this[0].style.zIndex=C.stack.min+D.length}});A.ui.plugin.add("draggable","zIndex",{start:function(E,D){var B=A(D.helper),C=A(this).data("draggable").options;if(B.css("zIndex")){C._zIndex=B.css("zIndex")}B.css("zIndex",C.zIndex)},stop:function(B,D){var C=A(this).data("draggable").options;if(C._zIndex){A(D.helper).css("zIndex",C._zIndex)}}})})(jQuery);(function(A){A.widget("ui.accordion",{_init:function(){var C=this.options,B=this;this.running=0;if(C.collapsible==A.ui.accordion.defaults.collapsible&&C.alwaysOpen!=A.ui.accordion.defaults.alwaysOpen){C.collapsible=!C.alwaysOpen}if(C.navigation){var D=this.element.find("a").filter(C.navigationFilter);if(D.length){if(D.filter(C.header).length){this.active=D}else{this.active=D.parent().parent().prev();D.addClass("ui-accordion-content-active")}}}this.element.addClass("ui-accordion ui-widget ui-helper-reset");if(this.element[0].nodeName=="UL"){this.element.children("li").addClass("ui-accordion-li-fix")}this.headers=this.element.find(C.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){A(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){A(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){A(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){A(this).removeClass("ui-state-focus")});this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");this.active=this._findActive(this.active||C.active).toggleClass("ui-state-default").toggleClass("ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");this.active.next().addClass("ui-accordion-content-active");A("<span/>").addClass("ui-icon "+C.icons.header).prependTo(this.headers);this.active.find(".ui-icon").toggleClass(C.icons.header).toggleClass(C.icons.headerSelected);if(A.browser.msie){this.element.find("a").css("zoom","1")}this.resize();this.element.attr("role","tablist");this.headers.attr("role","tab").bind("keydown",function(E){return B._keydown(E)}).next().attr("role","tabpanel");this.headers.not(this.active||"").attr("aria-expanded","false").attr("tabIndex","-1").next().hide();if(!this.active.length){this.headers.eq(0).attr("tabIndex","0")}else{this.active.attr("aria-expanded","true").attr("tabIndex","0")}if(!A.browser.safari){this.headers.find("a").attr("tabIndex","-1")}if(C.event){this.headers.bind((C.event)+".accordion",function(E){return B._clickHandler.call(B,E,this)})}},destroy:function(){var C=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role").unbind(".accordion").removeData("accordion");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabindex");this.headers.find("a").removeAttr("tabindex");this.headers.children(".ui-icon").remove();var B=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active");if(C.autoHeight||C.fillHeight){B.css("height","")}},_setData:function(B,C){if(B=="alwaysOpen"){B="collapsible";C=!C}A.widget.prototype._setData.apply(this,arguments)},_keydown:function(E){var C=this.options,D=A.ui.keyCode;if(C.disabled||E.altKey||E.ctrlKey){return }var F=this.headers.length;var B=this.headers.index(E.target);var G=false;switch(E.keyCode){case D.RIGHT:case D.DOWN:G=this.headers[(B+1)%F];break;case D.LEFT:case D.UP:G=this.headers[(B-1+F)%F];break;case D.SPACE:case D.ENTER:return this._clickHandler({target:E.target},E.target)}if(G){A(E.target).attr("tabIndex","-1");A(G).attr("tabIndex","0");G.focus();return false}return true},resize:function(){var C=this.options,D;if(C.fillSpace){if(A.browser.msie){var B=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}D=this.element.parent().height();if(A.browser.msie){this.element.parent().css("overflow",B)}this.headers.each(function(){D-=A(this).outerHeight()});var E=0;this.headers.next().each(function(){E=Math.max(E,A(this).innerHeight()-A(this).height())}).height(Math.max(0,D-E)).css("overflow","auto")}else{if(C.autoHeight){D=0;this.headers.next().each(function(){D=Math.max(D,A(this).outerHeight())}).height(D)}}},activate:function(B){var C=this._findActive(B)[0];this._clickHandler({target:C},C)},_findActive:function(B){return B?typeof B=="number"?this.headers.filter(":eq("+B+")"):this.headers.not(this.headers.not(B)):B===false?A([]):this.headers.filter(":eq(0)")},_clickHandler:function(J,F){var H=this.options;if(H.disabled){return false}if(!J.target&&H.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(H.icons.headerSelected).addClass(H.icons.header);this.active.next().addClass("ui-accordion-content-active");var D=this.active.next(),G={options:H,newHeader:A([]),oldHeader:H.active,newContent:A([]),oldContent:D},I=(this.active=A([]));this._toggle(I,D,G);return false}var E=A(J.currentTarget||F);var C=E[0]==this.active[0];if(this.running||(!H.collapsible&&C)){return false}this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(H.icons.headerSelected).addClass(H.icons.header);this.active.next().addClass("ui-accordion-content-active");if(!C){E.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").find(".ui-icon").removeClass(H.icons.header).addClass(H.icons.headerSelected);E.next().addClass("ui-accordion-content-active")}var I=E.next(),D=this.active.next(),G={options:H,newHeader:C&&H.collapsible?A([]):E,oldHeader:this.active,newContent:C&&H.collapsible?A([]):I.find("> *"),oldContent:D.find("> *")},B=this.headers.index(this.active[0])>this.headers.index(E[0]);this.active=C?A([]):E;this._toggle(I,D,G,C,B);return false},_toggle:function(M,F,H,E,D){var K=this.options,B=this;this.toShow=M;this.toHide=F;this.data=H;var L=function(){if(!B){return }return B._completed.apply(B,arguments)};this._trigger("changestart",null,this.data);this.running=F.size()===0?M.size():F.size();if(K.animated){var I={};if(K.collapsible&&E){I={toShow:A([]),toHide:F,complete:L,down:D,autoHeight:K.autoHeight||K.fillSpace}}else{I={toShow:M,toHide:F,complete:L,down:D,autoHeight:K.autoHeight||K.fillSpace}}if(!K.proxied){K.proxied=K.animated}if(!K.proxiedDuration){K.proxiedDuration=K.duration}K.animated=A.isFunction(K.proxied)?K.proxied(I):K.proxied;K.duration=A.isFunction(K.proxiedDuration)?K.proxiedDuration(I):K.proxiedDuration;var C=A.ui.accordion.animations,J=K.duration,G=K.animated;if(!C[G]){C[G]=function(N){this.slide(N,{easing:G,duration:J||700})}}C[G](I)}else{if(K.collapsible&&E){M.toggle()}else{F.hide();M.show()}L(true)}F.prev().attr("aria-expanded","false").attr("tabIndex","-1").blur();M.prev().attr("aria-expanded","true").attr("tabIndex","0").focus()},_completed:function(B){var C=this.options;this.running=B?0:--this.running;if(this.running){return }if(C.clearStyle){this.toShow.add(this.toHide).css({height:"",overflow:""})}this._trigger("change",null,this.data)}});A.extend(A.ui.accordion,{version:"1.7.1",defaults:{active:null,alwaysOpen:true,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase()}},animations:{slide:function(B,D){B=A.extend({easing:"swing",duration:300},B,D);if(!B.toHide.size()){B.toShow.animate({height:"show"},B);return }if(!B.toShow.size()){B.toHide.animate({height:"hide"},B);return }var I=B.toShow.css("overflow"),E,H={},F={},G=["height","paddingTop","paddingBottom"],J;var C=B.toShow;J=C[0].style.width;C.width(parseInt(C.parent().width(),10)-parseInt(C.css("paddingLeft"),10)-parseInt(C.css("paddingRight"),10)-(parseInt(C.css("borderLeftWidth"),10)||0)-(parseInt(C.css("borderRightWidth"),10)||0));A.each(G,function(M,K){F[K]="hide";var L=(""+A.css(B.toShow[0],K)).match(/^([\d+-.]+)(.*)$/);H[K]={value:L[1],unit:L[2]||"px"}});B.toShow.css({height:0,overflow:"hidden"}).show();B.toHide.filter(":hidden").each(B.complete).end().filter(":visible").animate(F,{step:function(L,K){if(K.prop=="height"){E=(K.now-K.start)/(K.end-K.start)}B.toShow[0].style[K.prop]=(E*H[K.prop].value)+H[K.prop].unit},duration:B.duration,easing:B.easing,complete:function(){if(!B.autoHeight){B.toShow.css("height","")}B.toShow.css("width",J);B.toShow.css({overflow:I});B.complete()}})},bounceslide:function(B){this.slide(B,{easing:B.down?"easeOutBounce":"swing",duration:B.down?1000:200})},easeslide:function(B){this.slide(B,{easing:"easeinout",duration:700})}}})})(jQuery);(function(C){var A={dragStart:"start.draggable",drag:"drag.draggable",dragStop:"stop.draggable",maxHeight:"maxHeight.resizable",minHeight:"minHeight.resizable",maxWidth:"maxWidth.resizable",minWidth:"minWidth.resizable",resizeStart:"start.resizable",resize:"drag.resizable",resizeStop:"stop.resizable"},B="ui-dialog ui-widget ui-widget-content ui-corner-all ";C.widget("ui.dialog",{_init:function(){this.originalTitle=this.element.attr("title");var E=this,D=this.options,G=D.title||this.originalTitle||"&nbsp;",L=C.ui.dialog.getTitleId(this.element),F=(this.uiDialog=C("<div/>")).appendTo(document.body).hide().addClass(B+D.dialogClass).css({position:"absolute",overflow:"hidden",zIndex:D.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(N){(D.closeOnEscape&&N.keyCode&&N.keyCode==C.ui.keyCode.ESCAPE&&E.close(N))}).attr({role:"dialog","aria-labelledby":L}).mousedown(function(N){E.moveToTop(false,N)}),J=this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(F),K=(this.uiDialogTitlebar=C("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(F),H=C('<a href="#"/>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){H.addClass("ui-state-hover")},function(){H.removeClass("ui-state-hover")}).focus(function(){H.addClass("ui-state-focus")}).blur(function(){H.removeClass("ui-state-focus")}).mousedown(function(N){N.stopPropagation()}).click(function(N){E.close(N);return false}).appendTo(K),I=(this.uiDialogTitlebarCloseText=C("<span/>")).addClass("ui-icon ui-icon-closethick").text(D.closeText).appendTo(H),M=C("<span/>").addClass("ui-dialog-title").attr("id",L).html(G).prependTo(K);K.find("*").add(K).disableSelection();(D.draggable&&C.fn.draggable&&this._makeDraggable());(D.resizable&&C.fn.resizable&&this._makeResizable());this._createButtons(D.buttons);this._isOpen=false;(D.bgiframe&&C.fn.bgiframe&&F.bgiframe());(D.autoOpen&&this.open())},destroy:function(){(this.overlay&&this.overlay.destroy());this.uiDialog.hide();this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");this.uiDialog.remove();(this.originalTitle&&this.element.attr("title",this.originalTitle))},close:function(D){var E=this;if(false===E._trigger("beforeclose",D)){return }(E.overlay&&E.overlay.destroy());E.uiDialog.unbind("keypress.ui-dialog");(E.options.hide?E.uiDialog.hide(E.options.hide,function(){E._trigger("close",D)}):E.uiDialog.hide()&&E._trigger("close",D));C.ui.dialog.overlay.resize();E._isOpen=false},isOpen:function(){return this._isOpen},moveToTop:function(D,E){if((this.options.modal&&!D)||(!this.options.stack&&!this.options.modal)){return this._trigger("focus",E)}if(this.options.zIndex>C.ui.dialog.maxZ){C.ui.dialog.maxZ=this.options.zIndex}(this.overlay&&this.overlay.$el.css("z-index",C.ui.dialog.overlay.maxZ=++C.ui.dialog.maxZ));var F={scrollTop:this.element.attr("scrollTop"),scrollLeft:this.element.attr("scrollLeft")};this.uiDialog.css("z-index",++C.ui.dialog.maxZ);this.element.attr(F);this._trigger("focus",E)},open:function(){if(this._isOpen){return }var D=this.options,E=this.uiDialog;this.overlay=D.modal?new C.ui.dialog.overlay(this):null;(E.next().length&&E.appendTo("body"));this._size();this._position(D.position);E.show(D.show);this.moveToTop(true);(D.modal&&E.bind("keypress.ui-dialog",function(G){if(G.keyCode!=C.ui.keyCode.TAB){return }var H=C(":tabbable",this),F=H.filter(":first")[0],I=H.filter(":last")[0];if(G.target==I&&!G.shiftKey){setTimeout(function(){F.focus()},1)}else{if(G.target==F&&G.shiftKey){setTimeout(function(){I.focus()},1)}}}));C([]).add(E.find(".ui-dialog-content :tabbable:first")).add(E.find(".ui-dialog-buttonpane :tabbable:first")).add(E).filter(":first").focus();this._trigger("open");this._isOpen=true},_createButtons:function(D){var E=this,G=false,F=C("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");this.uiDialog.find(".ui-dialog-buttonpane").remove();(typeof D=="object"&&D!==null&&C.each(D,function(){return !(G=true)}));if(G){C.each(D,function(I,H){C('<button type="button"></button>').addClass("ui-state-default ui-corner-all").text(I).click(function(){H.apply(E.element[0],arguments)}).hover(function(){C(this).addClass("ui-state-hover")},function(){C(this).removeClass("ui-state-hover")}).focus(function(){C(this).addClass("ui-state-focus")}).blur(function(){C(this).removeClass("ui-state-focus")}).appendTo(F)});F.appendTo(this.uiDialog)}},_makeDraggable:function(){var F=this,D=this.options,E;this.uiDialog.draggable({cancel:".ui-dialog-content",handle:".ui-dialog-titlebar",containment:"document",start:function(){E=D.height;C(this).height(C(this).height()).addClass("ui-dialog-dragging");(D.dragStart&&D.dragStart.apply(F.element[0],arguments))},drag:function(){(D.drag&&D.drag.apply(F.element[0],arguments))},stop:function(){C(this).removeClass("ui-dialog-dragging").height(E);(D.dragStop&&D.dragStop.apply(F.element[0],arguments));C.ui.dialog.overlay.resize()}})},_makeResizable:function(D){D=(D===undefined?this.options.resizable:D);var G=this,E=this.options,F=typeof D=="string"?D:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",alsoResize:this.element,maxWidth:E.maxWidth,maxHeight:E.maxHeight,minWidth:E.minWidth,minHeight:E.minHeight,start:function(){C(this).addClass("ui-dialog-resizing");(E.resizeStart&&E.resizeStart.apply(G.element[0],arguments))},resize:function(){(E.resize&&E.resize.apply(G.element[0],arguments))},handles:F,stop:function(){C(this).removeClass("ui-dialog-resizing");E.height=C(this).height();E.width=C(this).width();(E.resizeStop&&E.resizeStop.apply(G.element[0],arguments));C.ui.dialog.overlay.resize()}}).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_position:function(D){var H=C(window),G=C(document),F=G.scrollTop(),I=G.scrollLeft(),E=F;if(C.inArray(D,["center","top","right","bottom","left"])>=0){D=[D=="right"||D=="left"?D:"center",D=="top"||D=="bottom"?D:"middle"]}if(D.constructor!=Array){D=["center","middle"]}if(D[0].constructor==Number){I+=D[0]}else{switch(D[0]){case"left":I+=0;break;case"right":I+=H.width()-this.uiDialog.outerWidth();break;default:case"center":I+=(H.width()-this.uiDialog.outerWidth())/2}}if(D[1].constructor==Number){F+=D[1]}else{switch(D[1]){case"top":F+=0;break;case"bottom":F+=H.height()-this.uiDialog.outerHeight();break;default:case"middle":F+=(H.height()-this.uiDialog.outerHeight())/2}}F=Math.max(F,E);this.uiDialog.css({top:F,left:I})},_setData:function(F,E){(A[F]&&this.uiDialog.data(A[F],E));switch(F){case"buttons":this._createButtons(E);break;case"closeText":this.uiDialogTitlebarCloseText.text(E);break;case"dialogClass":this.uiDialog.removeClass(this.options.dialogClass).addClass(B+E);break;case"draggable":(E?this._makeDraggable():this.uiDialog.draggable("destroy"));break;case"height":this.uiDialog.height(E);break;case"position":this._position(E);break;case"resizable":var G=this.uiDialog,D=this.uiDialog.is(":data(resizable)");(D&&!E&&G.resizable("destroy"));(D&&typeof E=="string"&&G.resizable("option","handles",E));(D||this._makeResizable(E));break;case"title":C(".ui-dialog-title",this.uiDialogTitlebar).html(E||"&nbsp;");break;case"width":this.uiDialog.width(E);break}C.widget.prototype._setData.apply(this,arguments)},_size:function(){var D=this.options;this.element.css({height:0,minHeight:0,width:"auto"});var E=this.uiDialog.css({height:"auto",width:D.width}).height();this.element.css({minHeight:Math.max(D.minHeight-E,0),height:D.height=="auto"?"auto":Math.max(D.height-E,0)})}});C.extend(C.ui.dialog,{version:"1.7.1",defaults:{autoOpen:true,bgiframe:false,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:"center",resizable:true,show:null,stack:true,title:"",width:300,zIndex:1000},getter:"isOpen",uuid:0,maxZ:0,getTitleId:function(D){return"ui-dialog-title-"+(D.attr("id")||++this.uuid)},overlay:function(D){this.$el=C.ui.dialog.overlay.create(D)}});C.extend(C.ui.dialog.overlay,{instances:[],maxZ:0,events:C.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(D){return D+".dialog-overlay"}).join(" "),create:function(D){if(this.instances.length===0){setTimeout(function(){C(document).bind(C.ui.dialog.overlay.events,function(G){var F=C(G.target).parents(".ui-dialog").css("zIndex")||0;return(F>C.ui.dialog.overlay.maxZ)})},1);C(document).bind("keydown.dialog-overlay",function(F){(D.options.closeOnEscape&&F.keyCode&&F.keyCode==C.ui.keyCode.ESCAPE&&D.close(F))});C(window).bind("resize.dialog-overlay",C.ui.dialog.overlay.resize)}var E=C("<div></div>").appendTo(document.body).addClass("ui-widget-overlay").css({width:this.width(),height:this.height()});(D.options.bgiframe&&C.fn.bgiframe&&E.bgiframe());this.instances.push(E);return E},destroy:function(D){this.instances.splice(C.inArray(this.instances,D),1);if(this.instances.length===0){C([document,window]).unbind(".dialog-overlay")}D.remove()},height:function(){if(C.browser.msie&&C.browser.version<7){var D=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);var E=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(D<E){return C(window).height()+"px"}else{return D+"px"}}else{return C(document).height()+"px"}},width:function(){if(C.browser.msie&&C.browser.version<7){var E=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);var D=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);if(E<D){return C(window).width()+"px"}else{return E+"px"}}else{return C(document).width()+"px"}},resize:function(){var D=C([]);C.each(C.ui.dialog.overlay.instances,function(){D=D.add(this)});D.css({width:0,height:0}).css({width:C.ui.dialog.overlay.width(),height:C.ui.dialog.overlay.height()})}});C.extend(C.ui.dialog.overlay.prototype,{destroy:function(){C.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);