/***************************************************************************
 *   Copyright (C) 2009 by Vladlen Y. Koshelev                             *
 *   vlad.kosh@gmail.com                                                   *
 ***************************************************************************/
 
(function($) {

$.fn.toggleAttr = function(key, value, set) {
	if (set)
		this.attr(key, value);
	else
		this.removeAttr(key);
	
	return this;
}

$.fn.toggleDisabled = function(set) {
	this.toggleAttr("disabled", "disabled", set);
	
	return this;
}

})(jQuery);