jQuery(function() {
    jQuery.fn.hint = function () {
        return this.each(function (){
            var t = jQuery(this);
            var title = t.attr('title');
            if (title) {
                t.blur(function (){
                    if (t.val() == '') {
                        t.val(title);
                        t.addClass('blur');
                    }
                });
                t.focus(function (){
                    if (t.val() == title) {
                        t.val('');
                        t.removeClass('blur');
                    }
                });
                t.parents('form:first()').submit(function(){
                    if (t.val() == title) {
                        t.val('');
                        t.removeClass('blur');
                    }
                });
                t.blur();
            }
        });
    }
})

