jQuery(document).ready(function() {   
  if( !Modernizr.input.placeholder )
  {
    $('input[placeholder]').each(function() {
      var p = $(this).attr('placeholder'); 
      $(this).addClass('empty').val( p );
      $(this)
      .focus(function() { 
        $(this).removeClass('empty'); 
        if( $(this).val() == p ) 
          $(this).val(''); 
      })
      .blur(function() { 
        if( !$.trim($(this).val()).length ) 
        { 
          $(this).addClass('empty').val(p); 
        } 
      });
    });
  }

});
