(function( $ ) {

  $.fn.jQueryFields = function( options ) {
  
    var settings = {
      event: 'focus',
      retype: true
    };
    
    if ( options )
      $.extend( settings, options );
    
    return this.each( function() {
    
      if ( $( this ).attr( 'type' ) != 'text' )
        return false;
        
      var initValue = $( this ).val() || '';
      
      $( this ).bind( settings.event, function( e ) {         
        if ( $( this ).val() == initValue )
          $( this ).val('');        
      } );      
      $( this ).bind( 'blur', function( e ) {
        if ( $( this ).val() == '' && settings.retype)
          $( this ).val( initValue );
      } );      
    } );  
  };
} )( jQuery );
