(function($){
$.ui={plugin:{add:function(_2,_3,_4){
var _5=$.ui[_2].prototype;
for(var i in _4){
_5.plugins[i]=_5.plugins[i]||[];
_5.plugins[i].push([_3,_4[i]]);
}
},call:function(_7,_8,_9){
var _a=_7.plugins[_8];
if(!_a){
return;
}
for(var i=0;i<_a.length;i++){
if(_7.options[_a[i][0]]){
_a[i][1].apply(_7.element,_9);
}
}
}},cssCache:{},css:function(_c){
if($.ui.cssCache[_c]){
return $.ui.cssCache[_c];
}
var _d=$("<div class=\"ui-resizable-gen\">").addClass(_c).css({position:"absolute",top:"-5000px",left:"-5000px",display:"block"}).appendTo("body");
$.ui.cssCache[_c]=!!((!(/auto|default/).test(_d.css("cursor"))||(/^[1-9]/).test(_d.css("height"))||(/^[1-9]/).test(_d.css("width"))||!(/none/).test(_d.css("backgroundImage"))||!(/transparent|rgba\(0, 0, 0, 0\)/).test(_d.css("backgroundColor"))));
try{
$("body").get(0).removeChild(_d.get(0));
}
catch(e){
}
return $.ui.cssCache[_c];
},disableSelection:function(e){
e.unselectable="on";
e.onselectstart=function(){
return false;
};
if(e.style){
e.style.MozUserSelect="none";
}
},enableSelection:function(e){
e.unselectable="off";
e.onselectstart=function(){
return true;
};
if(e.style){
e.style.MozUserSelect="";
}
},hasScroll:function(e,a){
var _12=/top/.test(a||"top")?"scrollTop":"scrollLeft",has=false;
if(e[_12]>0){
return true;
}
e[_12]=1;
has=e[_12]>0?true:false;
e[_12]=0;
return has;
}};
var _14=$.fn.remove;
$.fn.remove=function(){
$("*",this).add(this).trigger("remove");
return _14.apply(this,arguments);
};
function getter(_15,_16,_17){
var _18=$[_15][_16].getter||[];
_18=(typeof _18=="string"?_18.split(/,?\s+/):_18);
return ($.inArray(_17,_18)!=-1);
}
var _19={init:function(){
},destroy:function(){
this.element.removeData(this.widgetName);
},getData:function(key){
return this.options[key];
},setData:function(key,_1c){
this.options[key]=_1c;
},enable:function(){
this.setData("disabled",false);
},disable:function(){
this.setData("disabled",true);
}};
$.widget=function(_1d,_1e){
var _1f=_1d.split(".")[0];
_1d=_1d.split(".")[1];
$.fn[_1d]=function(_20){
var _21=(typeof _20=="string"),_22=Array.prototype.slice.call(arguments,1);
if(_21&&getter(_1f,_1d,_20)){
var _23=$.data(this[0],_1d);
return (_23?_23[_20].apply(_23,_22):undefined);
}
return this.each(function(){
var _24=$.data(this,_1d);
if(!_24){
$.data(this,_1d,new $[_1f][_1d](this,_20));
}else{
if(_21){
_24[_20].apply(_24,_22);
}
}
});
};
$[_1f][_1d]=function(_25,_26){
var _27=this;
this.widgetName=_1d;
this.options=$.extend({},$[_1f][_1d].defaults,_26);
this.element=$(_25).bind("setData."+_1d,function(e,key,_2a){
return _27.setData(key,_2a);
}).bind("getData."+_1d,function(e,key){
return _27.getData(key);
}).bind("remove",function(){
return _27.destroy();
});
this.init();
};
$[_1f][_1d].prototype=$.extend({},_19,_1e);
};
$.ui.mouse={mouseInit:function(){
var _2d=this;
this.element.bind("mousedown."+this.widgetName,function(e){
return _2d.mouseDown(e);
});
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(e){
(this._mouseStarted&&this.mouseUp(e));
this._mouseDownEvent=e;
var _30=this,_31=(e.which==1),_32=($(e.target).is(this.options.cancel));
if(!_31||_32){
return true;
}
this._mouseDelayMet=!this.options.delay;
if(!this._mouseDelayMet){
this._mouseDelayTimer=setTimeout(function(){
_30._mouseDelayMet=true;
},this.options.delay);
}
this._mouseMoveDelegate=function(e){
return _30.mouseMove(e);
};
this._mouseUpDelegate=function(e){
return _30.mouseUp(e);
};
$(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);
return false;
},mouseMove:function(e){
if($.browser.msie&&!e.button){
return this.mouseUp(e);
}
if(this._mouseStarted){
this.mouseDrag(e);
return false;
}
if(this.mouseDistanceMet(e)&&this.mouseDelayMet(e)){
this._mouseStarted=(this.mouseStart(this._mouseDownEvent,e)!==false);
(this._mouseStarted||this.mouseUp(e));
}
return !this._mouseStarted;
},mouseUp:function(e){
$(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);
if(this._mouseStarted){
this._mouseStarted=false;
this.mouseStop(e);
}
return false;
},mouseDistanceMet:function(e){
return (Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance);
},mouseDelayMet:function(e){
return this._mouseDelayMet;
},mouseStart:function(e){
},mouseDrag:function(e){
},mouseStop:function(e){
}};
$.ui.mouse.defaults={cancel:null,distance:0,delay:0};
})(jQuery);


