$j.fn.extend({

		activate : function () {
				return this.each(function() {
						$j(this).fadeTo('fast', 1.0).attr('disabled', false);
				});
		},

		deactivate : function () {
				return this.each(function() {
						$j(this).fadeTo('fast', 0.4).attr('disabled', true).blur();
				});
		},

		wait : function () {
				return this.each(function() {
						$j(this).deactivate().val('Bitte warten...');
				});
		},

		unwait : function (value) {
				return this.each(function() {
						$j(this).activate().val(value);
				});
		},

		/* reset forms */
		reset : function() {
    			return this.each(function() {
						$j(this).is('form') && this.reset();
				});
		},

		toggleValue : function (defaultText) {
				return this.each(function() {
						$j(this).focus(function() {
						        if ($j(this).val() == defaultText) {
						        		$j(this).val('');
						        }
						        $j(this).blur(function () {
						                if ($j.trim($j(this).val()) == '') {
						                        $j(this).val(defaultText);
						                }
						                similarThreads();
						        });
						});
				});
		}

});