/*
Adds support for cross-browser form sumbission by hitting [enter].
*/
$(function(){
    $('input').keydown(function(e){
        if (e.keyCode == 13) {
            $(this).parents('form').submit();
            return false;
        }
    });
});

/*
Adds support for input field placeholder texts.
http://zachwaugh.com/2008/07/swapping-input-field-placeholder-text-with-jquery/
*/
$(document).ready(function(){ 
  $('input[type=text]').focus(function(){ 
    if($(this).val() == $(this).attr('defaultValue'))
    {
      $(this).val('');
    }
  });
  
  $('input[type=text]').blur(function(){
    if($(this).val() == '')
    {
      $(this).val($(this).attr('defaultValue'));
    } 
  });
}); 
