(function($) {
$.fn.DefaultValue = function(klass,text) {
    return this.each(function() {
        if (this.type != 'text' && this.type != 'password' && this.type != 'textarea') {
            return;
        }
        var fld_current = this;
        var fldVal = $.trim(this.value.toLowerCase());
        var textVal = $.trim(text.toLowerCase());

        if (fldVal == textVal || fldVal == '') {
            $(this).addClass(klass);
            this.value = text;
        }

        $(this).focus(function() {
            var fldVal = $.trim(this.value.toLowerCase());
            if (fldVal == textVal || fldVal =='') {
                this.value = '';
                $(this).removeClass(klass);
            }
        });

        $(this).blur(function() {
            var fldVal = $.trim(this.value.toLowerCase());
            if (fldVal == textVal || fldVal == '') {
                $(this).addClass(klass);
                this.value = text;
            }
        });
    });
};
})(jQuery);


