jQuery.fn.disable = function() {
    this.each(function () {
        if ($(this).is('form')) {
            $(this).find('input,select,textarea,button').each(function () {
                this.disabled = true;
            });
        }
    });
    return this;
};
jQuery.fn.enable = function() {
    this.each(function () {
        if ($(this).is('form')) {
            $(this).find('input,select,textarea,button').each(function () {
                this.disabled = false;
            });
        }
    });
    return this;
};
