jQuery.fn.autoclear = function() {
    resetTitle(this);
};

function resetTitle(selector){
    $(selector).each(
        function() {
            if (!$(this).attr("resetText")) {
                $(this).attr("resetText", $(this).val());
            }

            var txt = $(this).attr("resetText");
            $(this).focus(
                function() {
                    ($(this).val() == txt) ? $(this).val("") : $(this).val();
                }
            );
            $(this).blur(
                function() {
                    ($(this).val() == "") ? $(this).val(txt) : $(this).val();
                }
            );
        }
    );
}



