(function(a){a.fn.enabled=function(d){var c=this;var b=a(c);if(typeof d=="undefined"){return b.length===b.filter(":enabled").length}b.each(function(){if(d){a(this).removeAttr("disabled")}else{a(this).attr("disabled","disabled")}});return b};a.fn.enable=function(){return a(this).enabled(true)};a.fn.disabled=function(d){var c=this;var b=a(c);if(typeof d=="undefined"){return b.length===b.filter(":disabled").length}b.each(function(){if(d){a(this).attr("disabled","disabled")}else{a(this).removeAttr("disabled")}});return b};a.fn.disable=function(){return a(this).disabled(true)}})(jQuery);