(function($){
var _2=$.fn.remove,_3=$.browser.mozilla&&(parseFloat($.browser.version)<1.9);
$.ui={version:"1.6rc6",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);
}
}
}},contains:function(a,b){
return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b);
},cssCache:{},css:function(_10){
if($.ui.cssCache[_10]){
return $.ui.cssCache[_10];
}
var tmp=$("<div class=\"ui-gen\"></div>").addClass(_10).css({position:"absolute",top:"-5000px",left:"-5000px",display:"block"}).appendTo("body");
$.ui.cssCache[_10]=!!((!(/auto|default/).test(tmp.css("cursor"))||(/^[1-9]/).test(tmp.css("height"))||(/^[1-9]/).test(tmp.css("width"))||!(/none/).test(tmp.css("backgroundImage"))||!(/transparent|rgba\(0, 0, 0, 0\)/).test(tmp.css("backgroundColor"))));
try{
$("body").get(0).removeChild(tmp.get(0));
}
catch(e){
}
return $.ui.cssCache[_10];
},hasScroll:function(el,a){
if($(el).css("overflow")=="hidden"){
return false;
}
var _14=(a&&a=="left")?"scrollLeft":"scrollTop",has=false;
if(el[_14]>0){
return true;
}
el[_14]=1;
has=(el[_14]>0);
el[_14]=0;
return has;
},isOverAxis:function(x,_17,_18){
return (x>_17)&&(x<(_17+_18));
},isOver:function(y,x,top,_1c,_1d,_1e){
return $.ui.isOverAxis(y,top,_1d)&&$.ui.isOverAxis(x,_1c,_1e);
},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(_3){
var _1f=$.attr,_20=$.fn.removeAttr,_21="http://www.w3.org/2005/07/aaa",_22=/^aria-/,_23=/^wairole:/;
$.attr=function(_24,_25,_26){
var set=_26!==undefined;
return (_25=="role"?(set?_1f.call(this,_24,_25,"wairole:"+_26):(_1f.apply(this,arguments)||"").replace(_23,"")):(_22.test(_25)?(set?_24.setAttributeNS(_21,_25.replace(_22,"aaa:"),_26):_1f.call(this,_24,_25.replace(_22,"aaa:"))):_1f.apply(this,arguments)));
};
$.fn.removeAttr=function(_28){
return (_22.test(_28)?this.each(function(){
this.removeAttributeNS(_21,_28.replace(_22,""));
}):_20.call(this,_28));
};
}
$.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;
});
},scrollParent:function(){
var _29;
if(($.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){
_29=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{
_29=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"))||!_29.length?$(document):_29;
}});
$.extend($.expr[":"],{data:function(_2a,i,_2c){
return !!$.data(_2a,_2c[3]);
},focusable:function(_2d){
var _2e=_2d.nodeName.toLowerCase(),_2f=$.attr(_2d,"tabindex");
return (/input|select|textarea|button|object/.test(_2e)?!_2d.disabled:"a"==_2e||"area"==_2e?_2d.href||!isNaN(_2f):!isNaN(_2f))&&!$(_2d)["area"==_2e?"parents":"closest"](":hidden").length;
},tabbable:function(_30){
var _31=$.attr(_30,"tabindex");
return (isNaN(_31)||_31>=0)&&$(_30).is(":focusable");
}});
function _32(_33,_34,_35,_36){
function _37(_38){
var _39=$[_33][_34][_38]||[];
return (typeof _39=="string"?_39.split(/,?\s+/):_39);
};
var _3a=_37("getter");
if(_36.length==1&&typeof _36[0]=="string"){
_3a=_3a.concat(_37("getterSetter"));
}
return ($.inArray(_35,_3a)!=-1);
};
$.widget=function(_3b,_3c){
var _3d=_3b.split(".")[0];
_3b=_3b.split(".")[1];
$.fn[_3b]=function(_3e){
var _3f=(typeof _3e=="string"),_40=Array.prototype.slice.call(arguments,1);
if(_3f&&_3e.substring(0,1)=="_"){
return this;
}
if(_3f&&_32(_3d,_3b,_3e,_40)){
var _41=$.data(this[0],_3b);
return (_41?_41[_3e].apply(_41,_40):undefined);
}
return this.each(function(){
var _42=$.data(this,_3b);
(!_42&&!_3f&&$.data(this,_3b,new $[_3d][_3b](this,_3e))._init());
(_42&&_3f&&$.isFunction(_42[_3e])&&_42[_3e].apply(_42,_40));
});
};
$[_3d]=$[_3d]||{};
$[_3d][_3b]=function(_43,_44){
var _45=this;
this.namespace=_3d;
this.widgetName=_3b;
this.widgetEventPrefix=$[_3d][_3b].eventPrefix||_3b;
this.widgetBaseClass=_3d+"-"+_3b;
this.options=$.extend({},$.widget.defaults,$[_3d][_3b].defaults,$.metadata&&$.metadata.get(_43)[_3b],_44);
this.element=$(_43).bind("setData."+_3b,function(_46,key,_48){
if(_46.target==_43){
return _45._setData(key,_48);
}
}).bind("getData."+_3b,function(_49,key){
if(_49.target==_43){
return _45._getData(key);
}
}).bind("remove",function(){
return _45.destroy();
});
};
$[_3d][_3b].prototype=$.extend({},$.widget.prototype,_3c);
$[_3d][_3b].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,_4c){
var _4d=key,_4e=this;
if(typeof key=="string"){
if(_4c===undefined){
return this._getData(key);
}
_4d={};
_4d[key]=_4c;
}
$.each(_4d,function(key,_50){
_4e._setData(key,_50);
});
},_getData:function(key){
return this.options[key];
},_setData:function(key,_53){
this.options[key]=_53;
if(key=="disabled"){
this.element[_53?"addClass":"removeClass"](this.widgetBaseClass+"-disabled"+" "+this.namespace+"-state-disabled").attr("aria-disabled",_53);
}
},enable:function(){
this._setData("disabled",false);
},disable:function(){
this._setData("disabled",true);
},_trigger:function(_54,_55,_56){
var _57=this.options[_54],_58=(_54==this.widgetEventPrefix?_54:this.widgetEventPrefix+_54);
_55=$.Event(_55);
_55.type=_58;
if(_55.originalEvent){
for(var i=$.event.props.length,_5a;i;){
_5a=$.event.props[--i];
_55[_5a]=_55.originalEvent[_5a];
}
}
this.element.trigger(_55,_56);
return !($.isFunction(_57)&&_57.call(this.element[0],_55,_56)===false||_55.isDefaultPrevented());
}};
$.widget.defaults={disabled:false};
$.ui.mouse={_mouseInit:function(){
var _5b=this;
this.element.bind("mousedown."+this.widgetName,function(_5c){
return _5b._mouseDown(_5c);
}).bind("click."+this.widgetName,function(_5d){
if(_5b._preventClickEvent){
_5b._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(_5e){
if(_5e.originalEvent.mouseHandled){
return;
}
(this._mouseStarted&&this._mouseUp(_5e));
this._mouseDownEvent=_5e;
var _5f=this,_60=(_5e.which==1),_61=(typeof this.options.cancel=="string"?$(_5e.target).parents().add(_5e.target).filter(this.options.cancel).length:false);
if(!_60||_61||!this._mouseCapture(_5e)){
return true;
}
this.mouseDelayMet=!this.options.delay;
if(!this.mouseDelayMet){
this._mouseDelayTimer=setTimeout(function(){
_5f.mouseDelayMet=true;
},this.options.delay);
}
if(this._mouseDistanceMet(_5e)&&this._mouseDelayMet(_5e)){
this._mouseStarted=(this._mouseStart(_5e)!==false);
if(!this._mouseStarted){
_5e.preventDefault();
return true;
}
}
this._mouseMoveDelegate=function(_62){
return _5f._mouseMove(_62);
};
this._mouseUpDelegate=function(_63){
return _5f._mouseUp(_63);
};
$(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);
($.browser.safari||_5e.preventDefault());
_5e.originalEvent.mouseHandled=true;
return true;
},_mouseMove:function(_64){
if($.browser.msie&&!_64.button){
return this._mouseUp(_64);
}
if(this._mouseStarted){
this._mouseDrag(_64);
return _64.preventDefault();
}
if(this._mouseDistanceMet(_64)&&this._mouseDelayMet(_64)){
this._mouseStarted=(this._mouseStart(this._mouseDownEvent,_64)!==false);
(this._mouseStarted?this._mouseDrag(_64):this._mouseUp(_64));
}
return !this._mouseStarted;
},_mouseUp:function(_65){
$(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);
if(this._mouseStarted){
this._mouseStarted=false;
this._preventClickEvent=true;
this._mouseStop(_65);
}
return false;
},_mouseDistanceMet:function(_66){
return (Math.max(Math.abs(this._mouseDownEvent.pageX-_66.pageX),Math.abs(this._mouseDownEvent.pageY-_66.pageY))>=this.options.distance);
},_mouseDelayMet:function(_67){
return this.mouseDelayMet;
},_mouseStart:function(_68){
},_mouseDrag:function(_69){
},_mouseStop:function(_6a){
},_mouseCapture:function(_6b){
return true;
}};
$.ui.mouse.defaults={cancel:null,distance:1,delay:0};
})(jQuery);


