
/*
 * jQuery hoverInputText
 * http://crgdesign.com.br/blog/
 *
 * Copyright (c) 2009 Carlos Roberto Gomes Júnior
 * Dual licensed under the MIT and GPL licenses.
 * 
 * Date: 2009-12-02 18:31:00 +0300 (Wed, 19 Mai 2009)
 * Revision: 1
 */
(function() {

jQuery.fn.hoverInputText = function(options) {
   
   settings = jQuery.extend({
    text:false
   }, options);


    function init(obj){
        var rtxt = settings.text || obj.val();
        obj.val(rtxt);
        obj.focus(function(){
        if($(this).val() == rtxt){
            $(this).val('');
        }
        });
        
        obj.blur(function(){
        
        if($(this).val() == ''){
            $(this).val(rtxt);
        }
        });    
    }
   
    
   return this.each(function(){
        init($(this));
   });
  
};

})(jQuery);