/**
 * function to set onfocus and onblur shit on fields
 * makes use of the title attrib 
 * @author Grant Ockwell
 */
(function($) {  
    $.fn.defaultValue = function() {
        // set default valu from title
        this.each(function() {
            $(this).val($(this).attr('title'));
        });

        // set click event
        $(this).click(function(){
            if ($(this).attr('title') == $(this).val()) {
                $(this).val('');
            }
        });

        // set blur event
        $(this).blur(function(){
            if ($(this).val() == '') {
                $(this).val($(this).attr('title'));
            }
        });
    };
})(jQuery); 
