jQuery.ui||(function($){var _remove=$.fn.remove,isFF2=$.browser.mozilla&&(parseFloat($.browser.version)<1.9);$.ui={version:"1.7.1",plugin:{add:function(module,option,set){var proto=$.ui[module].prototype;for(var i in set){proto.plugins[i]=proto.plugins[i]||[];proto.plugins[i].push([option,set[i]])}},call:function(instance,name,args){var set=instance.plugins[name];if(!set||!instance.element[0].parentNode){return}for(var i=0;i<set.length;i++){if(instance.options[set[i][0]]){set[i][1].apply(instance.element,args)}}}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(el,a){if($(el).css("overflow")=="hidden"){return false}var scroll=(a&&a=="left")?"scrollLeft":"scrollTop",has=false;if(el[scroll]>0){return true}el[scroll]=1;has=(el[scroll]>0);el[scroll]=0;return has},isOverAxis:function(x,reference,size){return(x>reference)&&(x<(reference+size))},isOver:function(y,x,top,left,height,width){return $.ui.isOverAxis(y,top,height)&&$.ui.isOverAxis(x,left,width)},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(isFF2){var attr=$.attr,removeAttr=$.fn.removeAttr,ariaNS="http://www.w3.org/2005/07/aaa",ariaState=/^aria-/,ariaRole=/^wairole:/;$.attr=function(elem,name,value){var set=value!==undefined;return(name=="role"?(set?attr.call(this,elem,name,"wairole:"+value):(attr.apply(this,arguments)||"").replace(ariaRole,"")):(ariaState.test(name)?(set?elem.setAttributeNS(ariaNS,name.replace(ariaState,"aaa:"),value):attr.call(this,elem,name.replace(ariaState,"aaa:"))):attr.apply(this,arguments)))};$.fn.removeAttr=function(name){return(ariaState.test(name)?this.each(function(){this.removeAttributeNS(ariaNS,name.replace(ariaState,""))}):removeAttr.call(this,name))}}$.fn.extend({remove:function(){$("*",this).add(this).each(function(){$(this).triggerHandler("remove")});return _remove.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 scrollParent;if(($.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){scrollParent=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test($.curCSS(this,"position",1))&&(/(auto|scroll)/).test($.curCSS(this,"overflow",1)+$.curCSS(this,"overflow-y",1)+$.curCSS(this,"overflow-x",1))}).eq(0)}else{scrollParent=this.parents().filter(function(){return(/(auto|scroll)/).test($.curCSS(this,"overflow",1)+$.curCSS(this,"overflow-y",1)+$.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!scrollParent.length?$(document):scrollParent}});$.extend($.expr[":"],{data:function(elem,i,match){return !!$.data(elem,match[3])},focusable:function(element){var nodeName=element.nodeName.toLowerCase(),tabIndex=$.attr(element,"tabindex");return(/input|select|textarea|button|object/.test(nodeName)?!element.disabled:"a"==nodeName||"area"==nodeName?element.href||!isNaN(tabIndex):!isNaN(tabIndex))&&!$(element)["area"==nodeName?"parents":"closest"](":hidden").length},tabbable:function(element){var tabIndex=$.attr(element,"tabindex");return(isNaN(tabIndex)||tabIndex>=0)&&$(element).is(":focusable")}});function getter(namespace,plugin,method,args){function getMethods(type){var methods=$[namespace][plugin][type]||[];return(typeof methods=="string"?methods.split(/,?\s+/):methods)}var methods=getMethods("getter");if(args.length==1&&typeof args[0]=="string"){methods=methods.concat(getMethods("getterSetter"))}return($.inArray(method,methods)!=-1)}$.widget=function(name,prototype){var namespace=name.split(".")[0];name=name.split(".")[1];$.fn[name]=function(options){var isMethodCall=(typeof options=="string"),args=Array.prototype.slice.call(arguments,1);if(isMethodCall&&options.substring(0,1)=="_"){return this}if(isMethodCall&&getter(namespace,name,options,args)){var instance=$.data(this[0],name);return(instance?instance[options].apply(instance,args):undefined)}return this.each(function(){var instance=$.data(this,name);(!instance&&!isMethodCall&&$.data(this,name,new $[namespace][name](this,options))._init());(instance&&isMethodCall&&$.isFunction(instance[options])&&instance[options].apply(instance,args))})};$[namespace]=$[namespace]||{};$[namespace][name]=function(element,options){var self=this;this.namespace=namespace;this.widgetName=name;this.widgetEventPrefix=$[namespace][name].eventPrefix||name;this.widgetBaseClass=namespace+"-"+name;this.options=$.extend({},$.widget.defaults,$[namespace][name].defaults,$.metadata&&$.metadata.get(element)[name],options);this.element=$(element).bind("setData."+name,function(event,key,value){if(event.target==element){return self._setData(key,value)}}).bind("getData."+name,function(event,key){if(event.target==element){return self._getData(key)}}).bind("remove",function(){return self.destroy()})};$[namespace][name].prototype=$.extend({},$.widget.prototype,prototype);$[namespace][name].getterSetter="option"};$.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(key,value){var options=key,self=this;if(typeof key=="string"){if(value===undefined){return this._getData(key)}options={};options[key]=value}$.each(options,function(key,value){self._setData(key,value)})},_getData:function(key){return this.options[key]},_setData:function(key,value){this.options[key]=value;if(key=="disabled"){this.element[value?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",value)}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(type,event,data){var callback=this.options[type],eventName=(type==this.widgetEventPrefix?type:this.widgetEventPrefix+type);event=$.Event(event);event.type=eventName;if(event.originalEvent){for(var i=$.event.props.length,prop;i;){prop=$.event.props[--i];event[prop]=event.originalEvent[prop]}}this.element.trigger(event,data);return !($.isFunction(callback)&&callback.call(this.element[0],event,data)===false||event.isDefaultPrevented())}};$.widget.defaults={disabled:false};$.ui.mouse={_mouseInit:function(){var self=this;this.element.bind("mousedown."+this.widgetName,function(event){return self._mouseDown(event)}).bind("click."+this.widgetName,function(event){if(self._preventClickEvent){self._preventClickEvent=false;event.stopImmediatePropagation();return false}});if($.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);($.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(event){event.originalEvent=event.originalEvent||{};if(event.originalEvent.mouseHandled){return}(this._mouseStarted&&this._mouseUp(event));this._mouseDownEvent=event;var self=this,btnIsLeft=(event.which==1),elIsCancel=(typeof this.options.cancel=="string"?$(event.target).parents().add(event.target).filter(this.options.cancel).length:false);if(!btnIsLeft||elIsCancel||!this._mouseCapture(event)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){self.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){this._mouseStarted=(this._mouseStart(event)!==false);if(!this._mouseStarted){event.preventDefault();return true}}this._mouseMoveDelegate=function(event){return self._mouseMove(event)};this._mouseUpDelegate=function(event){return self._mouseUp(event)};$(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);($.browser.safari||event.preventDefault());event.originalEvent.mouseHandled=true;return true},_mouseMove:function(event){if($.browser.msie&&!event.button){return this._mouseUp(event)}if(this._mouseStarted){this._mouseDrag(event);return event.preventDefault()}if(this._mouseDistanceMet(event)&&this._mouseDelayMet(event)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,event)!==false);(this._mouseStarted?this._mouseDrag(event):this._mouseUp(event))}return !this._mouseStarted},_mouseUp:function(event){$(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(event.target==this._mouseDownEvent.target);this._mouseStop(event)}return false},_mouseDistanceMet:function(event){return(Math.max(Math.abs(this._mouseDownEvent.pageX-event.pageX),Math.abs(this._mouseDownEvent.pageY-event.pageY))>=this.options.distance)},_mouseDelayMet:function(event){return this.mouseDelayMet},_mouseStart:function(event){},_mouseDrag:function(event){},_mouseStop:function(event){},_mouseCapture:function(event){return true}};$.ui.mouse.defaults={cancel:null,distance:1,delay:0};$.ui=$.ui||{};$.fn.dialog=function(o){return this.dialogInit(o).dialogOpen()};$.fn.dialogInit=function(o){return this.each(function(){if(!$(this).is(".ui-dialog-content")){new $.ui.dialogInit(this,o)}})};$.fn.dialogOpen=function(){return this.each(function(){var contentEl;if($(this).parents(".ui-dialog").length){contentEl=this}if(!contentEl&&$(this).is(".ui-dialog")){contentEl=$(".ui-dialog-content",this)[0]}$.ui.dialogOpen(contentEl)})};$.fn.dialogClose=function(){return this.each(function(){var contentEl;var closeEl=$(this);if(closeEl.is(".ui-dialog-content")){var contentEl=closeEl}else{if(closeEl.hasClass("ui-dialog")){contentEl=closeEl.find(".ui-dialog-content")}else{contentEl=closeEl.parents(".ui-dialog:first").find(".ui-dialog-content")}}$.ui.dialogClose(contentEl[0])})};$.ui.dialogInit=function(el,o){var options={width:300,height:200,minWidth:150,minHeight:100,position:"center",buttons:[],draggable:true,resizable:true};var o=o||{};$.extend(options,o);this.element=el;var self=this;$.data(this.element,"ui-dialog",this);var uiDialogContent=$(el).addClass("ui-dialog-content");if(!uiDialogContent.parent().length){uiDialogContent.appendTo("body")}uiDialogContent.wrap(document.createElement("div")).wrap(document.createElement("div"));var uiDialogContainer=uiDialogContent.parent().addClass("ui-dialog-container").css({position:"relative"});var uiDialog=uiDialogContainer.parent().hide().addClass("ui-dialog").css({position:"absolute",width:options.width,height:options.height,overflow:"hidden"});var classNames=uiDialogContent.attr("className").split(" ");$.each(classNames,function(i,className){if(className!="ui-dialog-content"){uiDialog.addClass(className)}});if(options.resizable){uiDialog.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>")}uiDialogContainer.prepend('<div class="ui-dialog-titlebar"></div>');var uiDialogTitlebar=$(".ui-dialog-titlebar",uiDialogContainer);var title=(options.title)?options.title:(uiDialogContent.attr("title"))?uiDialogContent.attr("title"):"";uiDialogTitlebar.append('<span class="ui-dialog-title">'+title+"</span>");uiDialogTitlebar.append('<div class="ui-dialog-titlebar-close"></div>');$(".ui-dialog-titlebar-close",uiDialogTitlebar).hover(function(){$(this).addClass("ui-dialog-titlebar-close-hover")},function(){$(this).removeClass("ui-dialog-titlebar-close-hover")}).mousedown(function(ev){ev.stopPropagation()}).click(function(){self.close()});var l=0;$.each(options.buttons,function(){l=1;return false});if(l==1){uiDialog.append('<div class="ui-dialog-buttonpane"></div>');var uiDialogButtonPane=$(".ui-dialog-buttonpane",uiDialog);$.each(options.buttons,function(name,value){var btn=$(document.createElement("button")).text(name).click(value);uiDialogButtonPane.append(btn)})}if(options.draggable){uiDialog.draggable({handle:".ui-dialog-titlebar"})}this.open=function(){uiDialog.appendTo("body");var wnd=$(window),doc=$(document),top=doc.scrollTop(),left=doc.scrollLeft();if(options.position.constructor==Array){top+=options.position[1];left+=options.position[0]}else{switch(options.position){case"center":top+=(wnd.height()/2)-(uiDialog.height()/2);left+=(wnd.width()/2)-(uiDialog.width()/2);break;case"top":top+=0;left+=(wnd.width()/2)-(uiDialog.width()/2);break;case"right":top+=(wnd.height()/2)-(uiDialog.height()/2);left+=(wnd.width())-(uiDialog.width());break;case"bottom":top+=(wnd.height())-(uiDialog.height());left+=(wnd.width()/2)-(uiDialog.width()/2);break;case"left":top+=(wnd.height()/2)-(uiDialog.height()/2);left+=0;break;default:top+=(wnd.height()/2)-(uiDialog.height()/2);left+=(wnd.width()/2)-(uiDialog.width()/2)}}top=top<doc.scrollTop()?doc.scrollTop():top;uiDialog.css({top:top,left:left});uiDialog.show();var openEV=null;var openUI={options:options};$(this.element).triggerHandler("dialogopen",[openEV,openUI],options.open)};this.close=function(){uiDialog.hide();var closeEV=null;var closeUI={options:options};$(this.element).triggerHandler("dialogclose",[closeEV,closeUI],options.close)}};$.ui.dialogOpen=function(el){$.data(el,"ui-dialog").open()};$.ui.dialogClose=function(el){$.data(el,"ui-dialog").close()};$.ui=$.ui||{};$.extend($.ui,{plugin:{add:function(w,c,o,p){var a=$.ui[w].prototype;if(!a.plugins[c]){a.plugins[c]=[]}a.plugins[c].push([o,p])},call:function(instance,name,arguments){var c=instance.plugins[name];if(!c){return}var o=instance.interaction?instance.interaction.options:instance.options;var e=instance.interaction?instance.interaction.element:instance.element;for(var i=0;i<c.length;i++){if(o[c[i][0]]){c[i][1].apply(e,arguments)}}}}});$.fn.mouseInteractionDestroy=function(){this.each(function(){if($.data(this,"ui-mouse")){$.data(this,"ui-mouse").destroy()}})};$.ui.mouseInteraction=function(el,o){if(!o){var o={}}this.element=el;$.data(this.element,"ui-mouse",this);this.options={};$.extend(this.options,o);$.extend(this.options,{handle:o.handle?($(o.handle,el)[0]?$(o.handle,el):$(el)):$(el),helper:o.helper||"original",preventionDistance:o.preventionDistance||0,dragPrevention:o.dragPrevention?o.dragPrevention.toLowerCase().split(","):["input","textarea","button","select","option"],cursorAt:{top:((o.cursorAt&&o.cursorAt.top)?o.cursorAt.top:0),left:((o.cursorAt&&o.cursorAt.left)?o.cursorAt.left:0),bottom:((o.cursorAt&&o.cursorAt.bottom)?o.cursorAt.bottom:0),right:((o.cursorAt&&o.cursorAt.right)?o.cursorAt.right:0)},cursorAtIgnore:(!o.cursorAt)?true:false,appendTo:o.appendTo||"parent"});o=this.options;if(!this.options.nonDestructive&&(o.helper=="clone"||o.helper=="original")){o.margins={top:parseInt($(el).css("marginTop"))||0,left:parseInt($(el).css("marginLeft"))||0,bottom:parseInt($(el).css("marginBottom"))||0,right:parseInt($(el).css("marginRight"))||0};if(o.cursorAt.top!=0){o.cursorAt.top=o.margins.top}if(o.cursorAt.left!=0){o.cursorAt.left+=o.margins.left}if(o.cursorAt.bottom!=0){o.cursorAt.bottom+=o.margins.bottom}if(o.cursorAt.right!=0){o.cursorAt.right+=o.margins.right}if(o.helper=="original"){o.wasPositioned=$(el).css("position")}}else{o.margins={top:0,left:0,right:0,bottom:0}}var self=this;this.mousedownfunc=function(e){return self.click.apply(self,[e])};o.handle.bind("mousedown",this.mousedownfunc);if($.browser.msie){$(this.element).attr("unselectable","on")}};$.extend($.ui.mouseInteraction.prototype,{plugins:{},currentTarget:null,lastTarget:null,timer:null,slowMode:false,init:false,destroy:function(){this.options.handle.unbind("mousedown",this.mousedownfunc)},trigger:function(e){return this.click.apply(this,arguments)},click:function(e){var o=this.options;window.focus();if(e.which!=1){return true}var targetName=(e.target)?e.target.nodeName.toLowerCase():e.srcElement.nodeName.toLowerCase();for(var i=0;i<o.dragPrevention.length;i++){if(targetName==o.dragPrevention[i]){return true}}if(o.startCondition&&!o.startCondition.apply(this,[e])){return true}var self=this;this.mouseup=function(e){return self.stop.apply(self,[e])};this.mousemove=function(e){return self.drag.apply(self,[e])};var initFunc=function(){$(document).bind("mouseup",self.mouseup);$(document).bind("mousemove",self.mousemove);self.opos=[e.pageX,e.pageY]};if(o.preventionTimeout){if(this.timer){clearInterval(this.timer)}this.timer=setTimeout(function(){initFunc()},o.preventionTimeout);return false}initFunc();return false},start:function(e){var o=this.options;var a=this.element;o.co=$(a).offset();this.helper=typeof o.helper=="function"?$(o.helper.apply(a,[e,this]))[0]:(o.helper=="clone"?$(a).clone()[0]:a);if(o.appendTo=="parent"){var cp=a.parentNode;while(cp){if(cp.style&&($(cp).css("position")=="relative"||$(cp).css("position")=="absolute")){o.pp=cp;o.po=$(cp).offset();o.ppOverflow=!!($(o.pp).css("overflow")=="auto"||$(o.pp).css("overflow")=="scroll");break}cp=cp.parentNode?cp.parentNode:null}if(!o.pp){o.po={top:0,left:0}}}this.pos=[this.opos[0],this.opos[1]];this.rpos=[this.pos[0],this.pos[1]];if(o.cursorAtIgnore){o.cursorAt.left=this.pos[0]-o.co.left+o.margins.left;o.cursorAt.top=this.pos[1]-o.co.top+o.margins.top}if(o.pp){this.pos[0]-=o.po.left;this.pos[1]-=o.po.top}this.slowMode=(o.cursorAt&&(o.cursorAt.top-o.margins.top>0||o.cursorAt.bottom-o.margins.bottom>0)&&(o.cursorAt.left-o.margins.left>0||o.cursorAt.right-o.margins.right>0))?true:false;if(!o.nonDestructive){$(this.helper).css("position","absolute")}if(o.helper!="original"){$(this.helper).appendTo((o.appendTo=="parent"?a.parentNode:o.appendTo)).show()}if(o.cursorAt.right&&!o.cursorAt.left){o.cursorAt.left=this.helper.offsetWidth+o.margins.right+o.margins.left-o.cursorAt.right}if(o.cursorAt.bottom&&!o.cursorAt.top){o.cursorAt.top=this.helper.offsetHeight+o.margins.top+o.margins.bottom-o.cursorAt.bottom}this.init=true;if(o._start){o._start.apply(a,[this.helper,this.pos,o.cursorAt,this,e])}this.helperSize={width:$(this.helper).outerWidth(),height:$(this.helper).outerHeight()};return false},stop:function(e){var o=this.options;var a=this.element;var self=this;$(document).unbind("mouseup",self.mouseup);$(document).unbind("mousemove",self.mousemove);if(this.init==false){return this.opos=this.pos=null}if(o._beforeStop){o._beforeStop.apply(a,[this.helper,this.pos,o.cursorAt,this,e])}if(this.helper!=a&&!o.beQuietAtEnd){$(this.helper).remove();this.helper=null}if(!o.beQuietAtEnd){if(o._stop){o._stop.apply(a,[this.helper,this.pos,o.cursorAt,this,e])}}this.init=false;this.opos=this.pos=null;return false},drag:function(e){if(!this.opos||($.browser.msie&&!e.button)){return this.stop.apply(this,[e])}var o=this.options;this.pos=[e.pageX,e.pageY];if(this.rpos&&this.rpos[0]==this.pos[0]&&this.rpos[1]==this.pos[1]){return false}this.rpos=[this.pos[0],this.pos[1]];if(o.pp){this.pos[0]-=o.po.left;this.pos[1]-=o.po.top}if((Math.abs(this.rpos[0]-this.opos[0])>o.preventionDistance||Math.abs(this.rpos[1]-this.opos[1])>o.preventionDistance)&&this.init==false){this.start.apply(this,[e])}else{if(this.init==false){return false}}if(o._drag){o._drag.apply(this.element,[this.helper,this.pos,o.cursorAt,this,e])}return false}});$.extend($.expr[":"],{draggable:"(' '+a.className+' ').indexOf(' ui-draggable ')"});var methods="destroy,enable,disable".split(",");for(var i=0;i<methods.length;i++){var cur=methods[i],f;eval('f = function() { var a = arguments; return this.each(function() { if(jQuery(this).is(".ui-draggable")) jQuery.data(this, "ui-draggable")["'+cur+'"](a); }); }');$.fn["draggable"+cur.substr(0,1).toUpperCase()+cur.substr(1)]=f}$.fn.draggableInstance=function(){if($(this[0]).is(".ui-draggable")){return $.data(this[0],"ui-draggable")}return false};$.fn.draggable=function(o){return this.each(function(){if(!$(this).is(".ui-draggable")){new $.ui.draggable(this,o)}})};$.ui.ddmanager={current:null,droppables:[],prepareOffsets:function(t,e){var dropTop=$.ui.ddmanager.dropTop=[];var dropLeft=$.ui.ddmanager.dropLeft;var m=$.ui.ddmanager.droppables;for(var i=0;i<m.length;i++){if(m[i].item.disabled){continue}m[i].offset=$(m[i].item.element).offset();if(t&&m[i].item.options.accept(t.element)){m[i].item.activate.call(m[i].item,e)}}},fire:function(oDrag,e){var oDrops=$.ui.ddmanager.droppables;var oOvers=$.grep(oDrops,function(oDrop){if(!!oDrop&&!oDrop.item.disabled&&$.ui.intersect(oDrag,oDrop,oDrop.item.options.tolerance)){oDrop.item.drop.call(oDrop.item,e)}});$.each(oDrops,function(i,oDrop){if(!oDrop.item.disabled&&oDrop.item.options.accept(oDrag.element)){oDrop.out=1;oDrop.over=0;oDrop.item.deactivate.call(oDrop.item,e)}})},update:function(oDrag,e){if(oDrag.options.refreshPositions){$.ui.ddmanager.prepareOffsets()}var oDrops=$.ui.ddmanager.droppables;var oOvers=$.grep(oDrops,function(oDrop){if(oDrop.item.disabled){return false}var isOver=$.ui.intersect(oDrag,oDrop,oDrop.item.options.tolerance);if(!isOver&&oDrop.over==1){oDrop.out=1;oDrop.over=0;oDrop.item.out.call(oDrop.item,e)}return isOver});$.each(oOvers,function(i,oOver){if(oOver.over==0){oOver.out=0;oOver.over=1;oOver.item.over.call(oOver.item,e)}})}};$.ui.draggable=function(el,o){var options={};$.extend(options,o);var self=this;$.extend(options,{_start:function(h,p,c,t,e){self.start.apply(t,[self,e])},_beforeStop:function(h,p,c,t,e){self.stop.apply(t,[self,e])},_drag:function(h,p,c,t,e){self.drag.apply(t,[self,e])},startCondition:function(e){return !(e.target.className.indexOf("ui-resizable-handle")!=-1||self.disabled)}});$.data(el,"ui-draggable",this);if(options.ghosting==true){options.helper="clone"}$(el).addClass("ui-draggable");this.interaction=new $.ui.mouseInteraction(el,options)};$.extend($.ui.draggable.prototype,{plugins:{},currentTarget:null,lastTarget:null,destroy:function(){$(this.interaction.element).removeClass("ui-draggable").removeClass("ui-draggable-disabled");this.interaction.destroy()},enable:function(){$(this.interaction.element).removeClass("ui-draggable-disabled");this.disabled=false},disable:function(){$(this.interaction.element).addClass("ui-draggable-disabled");this.disabled=true},prepareCallbackObj:function(self){return{helper:self.helper,position:{left:self.pos[0],top:self.pos[1]},offset:self.options.cursorAt,draggable:self,options:self.options}},start:function(that,e){var o=this.options;$.ui.ddmanager.current=this;$.ui.plugin.call(that,"start",[e,that.prepareCallbackObj(this)]);$(this.element).triggerHandler("dragstart",[e,that.prepareCallbackObj(this)],o.start);if(this.slowMode&&$.ui.droppable&&!o.dropBehaviour){$.ui.ddmanager.prepareOffsets(this,e)}return false},stop:function(that,e){var o=this.options;$.ui.plugin.call(that,"stop",[e,that.prepareCallbackObj(this)]);$(this.element).triggerHandler("dragstop",[e,that.prepareCallbackObj(this)],o.stop);if(this.slowMode&&$.ui.droppable&&!o.dropBehaviour){$.ui.ddmanager.fire(this,e)}$.ui.ddmanager.current=null;$.ui.ddmanager.last=this;return false},drag:function(that,e){var o=this.options;$.ui.ddmanager.update(this,e);this.pos=[this.pos[0]-o.cursorAt.left,this.pos[1]-o.cursorAt.top];$.ui.plugin.call(that,"drag",[e,that.prepareCallbackObj(this)]);var nv=$(this.element).triggerHandler("drag",[e,that.prepareCallbackObj(this)],o.drag);var nl=(nv&&nv.left)?nv.left:this.pos[0];var nt=(nv&&nv.top)?nv.top:this.pos[1];$(this.helper).css("left",nl+"px").css("top",nt+"px");return false}})})(jQuery);