(function($){
$.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};
var _2=$.fn.remove;
var _3=$.browser.mozilla&&(parseFloat($.browser.version)<1.9);
$.ui={version:"@VERSION",plugin:{add:function(_4,_5,_6){
var _7=$.ui[_4].prototype;
for(var i in _6){
_7.plugins[i]=_7.plugins[i]||[];
_7.plugins[i].push([_5,_6[i]]);
}
},call:function(_9,_a,_b){
var _c=_9.plugins[_a];
if(!_c){
return;
}
for(var i=0;i<_c.length;i++){
if(_9.options[_c[i][0]]){
_c[i][1].apply(_9.element,_b);
}
}
}},cssCache:{},css:function(_e){
if($.ui.cssCache[_e]){
return $.ui.cssCache[_e];
}
var _f=$("<div class=\"ui-gen\">").addClass(_e).css({position:"absolute",top:"-5000px",left:"-5000px",display:"block"}).appendTo("body");
$.ui.cssCache[_e]=!!((!(/auto|default/).test(_f.css("cursor"))||(/^[1-9]/).test(_f.css("height"))||(/^[1-9]/).test(_f.css("width"))||!(/none/).test(_f.css("backgroundImage"))||!(/transparent|rgba\(0, 0, 0, 0\)/).test(_f.css("backgroundColor"))));
try{
$("body").get(0).removeChild(_f.get(0));
}
catch(e){
}
return $.ui.cssCache[_e];
},hasScroll:function(e,a){
if($(e).css("overflow")=="hidden"){
return false;
}
var _12=(a&&a=="left")?"scrollLeft":"scrollTop",has=false;
if(e[_12]>0){
return true;
}
e[_12]=1;
has=(e[_12]>0);
e[_12]=0;
return has;
}};
$.fn.extend({remove:function(){
$("*",this).add(this).each(function(){
$(this).triggerHandler("remove");
});
return _2.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;
});
},ariaRole:function(_14){
return (_14!==undefined?this.attr("role",_3?"wairole:"+_14:_14):(this.attr("role")||"").replace(/^wairole:/,""));
},ariaState:function(_15,_16){
return (_16!==undefined?this.each(function(i,el){
(_3?el.setAttributeNS("http://www.w3.org/2005/07/aaa","aaa:"+_15,_16):$(el).attr("aria-"+_15,_16));
}):this.attr(_3?"aaa:"+_15:"aria-"+_15));
}});
$.extend($.expr[":"],{data:function(a,i,m){
return $.data(a,m[3]);
},tabbable:function(a,i,m){
var _1f=a.nodeName.toLowerCase();
var _20=function(_21){
function _22(_23){
var _24=_23.style;
return (_24.display!="none"&&_24.visibility!="hidden");
};
var _25=_22(_21);
(_25&&$.each($.dir(_21,"parentNode"),function(){
return (_25=_22(this));
}));
return _25;
};
return (a.tabIndex>=0&&(("a"==_1f&&a.href)||(/input|select|textarea|button/.test(_1f)&&"hidden"!=a.type&&!a.disabled))&&_20(a));
}});
function _26(_27,_28,_29,_2a){
function _2b(_2c){
var _2d=$[_27][_28][_2c]||[];
return (typeof _2d=="string"?_2d.split(/,?\s+/):_2d);
};
var _2e=_2b("getter");
if(_2a.length==1&&typeof _2a[0]=="string"){
_2e=_2e.concat(_2b("getterSetter"));
}
return ($.inArray(_29,_2e)!=-1);
};
$.widget=function(_2f,_30){
var _31=_2f.split(".")[0];
_2f=_2f.split(".")[1];
$.fn[_2f]=function(_32){
var _33=(typeof _32=="string"),_34=Array.prototype.slice.call(arguments,1);
if(_33&&_32.substring(0,1)=="_"){
return this;
}
if(_33&&_26(_31,_2f,_32,_34)){
var _35=$.data(this[0],_2f);
return (_35?_35[_32].apply(_35,_34):undefined);
}
return this.each(function(){
var _36=$.data(this,_2f);
(!_36&&!_33&&$.data(this,_2f,new $[_31][_2f](this,_32)));
(_36&&_33&&$.isFunction(_36[_32])&&_36[_32].apply(_36,_34));
});
};
$[_31]=$[_31]||{};
$[_31][_2f]=function(_37,_38){
var _39=this;
this.widgetName=_2f;
this.widgetEventPrefix=$[_31][_2f].eventPrefix||_2f;
this.widgetBaseClass=_31+"-"+_2f;
this.options=$.extend({},$.widget.defaults,$[_31][_2f].defaults,$.metadata&&$.metadata.get(_37)[_2f],_38);
this.element=$(_37).bind("setData."+_2f,function(e,key,_3c){
return _39._setData(key,_3c);
}).bind("getData."+_2f,function(e,key){
return _39._getData(key);
}).bind("remove",function(){
return _39.destroy();
});
this._init();
};
$[_31][_2f].prototype=$.extend({},$.widget.prototype,_30);
$[_31][_2f].getterSetter="option";
};
$.widget.prototype={_init:function(){
},destroy:function(){
this.element.removeData(this.widgetName);
},option:function(key,_40){
var _41=key,_42=this;
if(typeof key=="string"){
if(_40===undefined){
return this._getData(key);
}
_41={};
_41[key]=_40;
}
$.each(_41,function(key,_44){
_42._setData(key,_44);
});
},_getData:function(key){
return this.options[key];
},_setData:function(key,_47){
this.options[key]=_47;
if(key=="disabled"){
this.element[_47?"addClass":"removeClass"](this.widgetBaseClass+"-disabled");
}
},enable:function(){
this._setData("disabled",false);
},disable:function(){
this._setData("disabled",true);
},_trigger:function(_48,e,_4a){
var _4b=(_48==this.widgetEventPrefix?_48:this.widgetEventPrefix+_48);
e=e||$.event.fix({type:_4b,target:this.element[0]});
return this.element.triggerHandler(_4b,[e,_4a],this.options[_48]);
}};
$.widget.defaults={disabled:false};
$.ui.mouse={_mouseInit:function(){
var _4c=this;
this.element.bind("mousedown."+this.widgetName,function(e){
return _4c._mouseDown(e);
}).bind("click."+this.widgetName,function(e){
if(_4c._preventClickEvent){
_4c._preventClickEvent=false;
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(e){
(this._mouseStarted&&this._mouseUp(e));
this._mouseDownEvent=e;
var _50=this,_51=(e.which==1),_52=(typeof this.options.cancel=="string"?$(e.target).parents().add(e.target).filter(this.options.cancel).length:false);
if(!_51||_52||!this._mouseCapture(e)){
return true;
}
this.mouseDelayMet=!this.options.delay;
if(!this.mouseDelayMet){
this._mouseDelayTimer=setTimeout(function(){
_50.mouseDelayMet=true;
},this.options.delay);
}
if(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)){
this._mouseStarted=(this._mouseStart(e)!==false);
if(!this._mouseStarted){
e.preventDefault();
return true;
}
}
this._mouseMoveDelegate=function(e){
return _50._mouseMove(e);
};
this._mouseUpDelegate=function(e){
return _50._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._mouseDrag(e):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._preventClickEvent=true;
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){
},_mouseCapture:function(e){
return true;
}};
$.ui.mouse.defaults={cancel:null,distance:1,delay:0};
})(jQuery);

