﻿(function($) {
    $.fn.inputDefualts = function(c) {
        var d = {
            cls: 'inactive',
            text: this.val()
        }
        var o = $.extend(d, c);

        this.addClass(o.cls);
        this.val(o.text);

        this.focus(function() {
            if ($(this).val() == o.text) $(this).val('');
            $(this).removeClass(o.cls);
        })
        
        this.blur(function() {
            if ($(this).val() == '') {
                $(this).val(o.text);
                $(this).addClass(o.cls);
            }
        });
    };
})(jQuery);

