title: jQuery: Change input value color after user begins typing
body: <p>I've got a form input that has sample search keywords inside. </p>
  
  <p>When the user focuses the input the text disappears, if there is nothing in the input the text reappears when unfocused. </p>
  
  <p>That's all good and works well but what I'd like to do is have the sample text grayed out and then have the normal solid color when the user is actually typing.</p>
  
  <p>Below is the code I'm currently using. Any help would be great!</p>
  
  <pre><code>$(function() {
  $('input').each(function() {
      $.data(this, 'default', this.value);
  }).focus(function() {
      if (!$.data(this, 'edited')) {
          this.value = "";
      }
  }).change(function() {
      $.data(this, 'edited', this.value != "");
  }).blur(function() {
      if (!$.data(this, 'edited')) {
          this.value = $.data(this, 'default');
      }
  });
  });
  </code></pre>