$(document).ready(function() {
  // Set all values to default
  $('.clearme').each(function() {
    $(this).val( $(this).attr('default') );
  });
  
  // Set/unset default values
  $('.clearme').focus(function() {
    $(this).removeClass('clearme');
    $(this).addClass('focus');
    if ($(this).val() == $(this).attr('default'))
      $(this).val('');
  });
  $('.clearme').blur(function() {
    $(this).removeClass('focus');
    if ($(this).val() == '') {
      $(this).addClass('clearme');
      $(this).val( $(this).attr('default') );
    }
  });
});


/* $(function() { // onload...do
    $('#storyform').submit(function() {
      // now we're going to capture *all* the fields in the
      // form and submit it via ajax.
      
      // :input is a macro that grabs all input types, select boxes
      // textarea, etc.  Then I'm using the context of the form from 
      // the initial '#contactForm' to narrow down our selector
      var inputs = [];
      $(':input', this).each(function() {
        inputs.push(this.name + '=' + escape(this.value));
      })
      
      // now if I join our inputs using '&' we'll have a query string
      jQuery.ajax({
        data: inputs.join('&'),
        url: this.action,
        timeout: 2000,
        error: function() {
          console.log("Failed to submit");
        },
        success: function(r) { 
          //alert(r);
        }
      }) // checkout http://jquery.com/api for more syntax and options on this method.
      
      // re-test...
      // by default - we'll always return false so it doesn't redirect the user.
      return false;
    })
  }) */