(function($,undefined){if($.cleanData){var _cleanData=$.cleanData;$.cleanData=function(elems){for(var i=0,elem;(elem=elems[i])!=null;i++){try{$(elem).triggerHandler("\x72\x65\x6d\x6f\x76\x65");}catch(e){}}_cleanData(elems);};}else{var _remove=$.fn.remove;$.fn.remove=function(selector,keepData){return this.each(function(){if(!keepData){if(!selector||$.filter(selector,[this]).length){$("\x2a",this).add([this]).each(function(){try{$(this).triggerHandler("\x72\x65\x6d\x6f\x76\x65");}catch(e){}});}}return _remove.call($(this),selector,keepData);});};}$.widget=function(name,base,prototype){var namespace=name.split("\x2e")[0],fullName;name=name.split("\x2e")[1];fullName=namespace+"\x2d"+name;if(!prototype){prototype=base;base=$.Widget;}$.expr["\x3a"][fullName]=function(elem){return! !$.data(elem,name);};$[namespace]=$[namespace]||{};$[namespace][name]=function(options,element){if(arguments.length){this._createWidget(options,element);}};var basePrototype=new base();basePrototype.options=$.extend(true,{},basePrototype.options);$[namespace][name].prototype=$.extend(true,basePrototype,{namespace:namespace,widgetName:name,widgetEventPrefix:$[namespace][name].prototype.widgetEventPrefix||name,widgetBaseClass:fullName},prototype);$.widget.bridge(name,$[namespace][name]);};$.widget.bridge=function(name,object){$.fn[name]=function(options){var isMethodCall=typeof options==="\x73\x74\x72\x69\x6e\x67",args=Array.prototype.slice.call(arguments,1),returnValue=this;options= !isMethodCall&&args.length?$.extend.apply(null,[true,options].concat(args)):options;if(isMethodCall&&options.charAt(0)==="\x5f"){return returnValue;}if(isMethodCall){this.each(function(){var instance=$.data(this,name),methodValue=instance&&$.isFunction(instance[options])?instance[options].apply(instance,args):instance;if(methodValue!==instance&&methodValue!==undefined){returnValue=methodValue;return false;}});}else{this.each(function(){var instance=$.data(this,name);if(instance){instance.option(options||{})._init();}else{$.data(this,name,new object(options,this));}});}return returnValue;};};$.Widget=function(options,element){if(arguments.length){this._createWidget(options,element);}};$.Widget.prototype={widgetName:"\x77\x69\x64\x67\x65\x74",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(options,element){$.data(element,this.widgetName,this);this.element=$(element);this.options=$.extend(true,{},this.options,this._getCreateOptions(),options);var self=this;this.element.bind("\x72\x65\x6d\x6f\x76\x65\x2e"+this.widgetName,function(){self.destroy();});this._create();this._trigger("\x63\x72\x65\x61\x74\x65");this._init();},_getCreateOptions:function(){return $.metadata&&$.metadata.get(this.element[0])[this.widgetName];},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("\x2e"+this.widgetName).removeData(this.widgetName);this.widget().unbind("\x2e"+this.widgetName).removeAttr("\x61\x72\x69\x61\x2d\x64\x69\x73\x61\x62\x6c\x65\x64").removeClass(this.widgetBaseClass+"\x2d\x64\x69\x73\x61\x62\x6c\x65\x64\x20"+"\x75\x69\x2d\x73\x74\x61\x74\x65\x2d\x64\x69\x73\x61\x62\x6c\x65\x64");},widget:function(){return this.element;},option:function(key,value){var options=key;if(arguments.length===0){return $.extend({},this.options);}if(typeof key==="\x73\x74\x72\x69\x6e\x67"){if(value===undefined){return this.options[key];}options={};options[key]=value;}this._setOptions(options);return this;},_setOptions:function(options){var self=this;$.each(options,function(key,value){self._setOption(key,value);});return this;},_setOption:function(key,value){this.options[key]=value;if(key==="\x64\x69\x73\x61\x62\x6c\x65\x64"){this.widget()[value?"\x61\x64\x64\x43\x6c\x61\x73\x73":"\x72\x65\x6d\x6f\x76\x65\x43\x6c\x61\x73\x73"](this.widgetBaseClass+"\x2d\x64\x69\x73\x61\x62\x6c\x65\x64"+"\x20"+"\x75\x69\x2d\x73\x74\x61\x74\x65\x2d\x64\x69\x73\x61\x62\x6c\x65\x64").attr("\x61\x72\x69\x61\x2d\x64\x69\x73\x61\x62\x6c\x65\x64",value);}return this;},enable:function(){return this._setOption("\x64\x69\x73\x61\x62\x6c\x65\x64",false);},disable:function(){return this._setOption("\x64\x69\x73\x61\x62\x6c\x65\x64",true);},_trigger:function(type,event,data){var aK,orig,callback=this.options[type];data=data||{};event=$.Event(event);event.type=(type===this.widgetEventPrefix?type:this.widgetEventPrefix+type).toLowerCase();event.target=this.element[0];orig=event.originalEvent;if(orig){for(aK in orig){if(!(aK in event)){event[aK]=orig[aK];}}}this.element.trigger(event,data);return!($.isFunction(callback)&&callback.call(this.element[0],event,data)===false||event.isDefaultPrevented());}};})(jQuery); 