(function($,undefined){var mouseHandled=false;$(document).mouseup(function(e){mouseHandled=false;});$.widget("\x75\x69\x2e\x6d\x6f\x75\x73\x65",{version:"\x31\x2e\x39\x2e\x32",options:{cancel:'\x69\x6e\x70\x75\x74\x2c\x74\x65\x78\x74\x61\x72\x65\x61\x2c\x62\x75\x74\x74\x6f\x6e\x2c\x73\x65\x6c\x65\x63\x74\x2c\x6f\x70\x74\x69\x6f\x6e',distance:1,delay:0},_mouseInit:function(){var that=this;this.element.bind('\x6d\x6f\x75\x73\x65\x64\x6f\x77\x6e\x2e'+this.widgetName,function(event){return that._mouseDown(event);}).bind('\x63\x6c\x69\x63\x6b\x2e'+this.widgetName,function(event){if(true===$.data(event.target,that.widgetName+'\x2e\x70\x72\x65\x76\x65\x6e\x74\x43\x6c\x69\x63\x6b\x45\x76\x65\x6e\x74')){$.removeData(event.target,that.widgetName+'\x2e\x70\x72\x65\x76\x65\x6e\x74\x43\x6c\x69\x63\x6b\x45\x76\x65\x6e\x74');event.stopImmediatePropagation();return false;}});this.started=false;},_mouseDestroy:function(){this.element.unbind('\x2e'+this.widgetName);if(this._mouseMoveDelegate){$(document).unbind('\x6d\x6f\x75\x73\x65\x6d\x6f\x76\x65\x2e'+this.widgetName,this._mouseMoveDelegate).unbind('\x6d\x6f\x75\x73\x65\x75\x70\x2e'+this.widgetName,this._mouseUpDelegate);}},_mouseDown:function(event){if(mouseHandled){return;}(this._mouseStarted&&this._mouseUp(event));this._mouseDownEvent=event;var that=this,btnIsLeft=(event.which===1),elIsCancel=(typeof this.options.cancel==="\x73\x74\x72\x69\x6e\x67"&&event.target.nodeName?$(event.target).closest(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(){that.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;}}if(true===$.data(event.target,this.widgetName+'\x2e\x70\x72\x65\x76\x65\x6e\x74\x43\x6c\x69\x63\x6b\x45\x76\x65\x6e\x74')){$.removeData(event.target,this.widgetName+'\x2e\x70\x72\x65\x76\x65\x6e\x74\x43\x6c\x69\x63\x6b\x45\x76\x65\x6e\x74');}this._mouseMoveDelegate=function(event){return that._mouseMove(event);};this._mouseUpDelegate=function(event){return that._mouseUp(event);};$(document).bind('\x6d\x6f\x75\x73\x65\x6d\x6f\x76\x65\x2e'+this.widgetName,this._mouseMoveDelegate).bind('\x6d\x6f\x75\x73\x65\x75\x70\x2e'+this.widgetName,this._mouseUpDelegate);event.preventDefault();mouseHandled=true;return true;},_mouseMove:function(event){if($.ui.ie&& !(document.documentMode>=9)&& !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('\x6d\x6f\x75\x73\x65\x6d\x6f\x76\x65\x2e'+this.widgetName,this._mouseMoveDelegate).unbind('\x6d\x6f\x75\x73\x65\x75\x70\x2e'+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;if(event.target===this._mouseDownEvent.target){$.data(event.target,this.widgetName+'\x2e\x70\x72\x65\x76\x65\x6e\x74\x43\x6c\x69\x63\x6b\x45\x76\x65\x6e\x74',true);}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;}});})(jQuery); 