if (Drupal.jsEnabled) {	
  $(document).ready(function() {
//    target_blank(); deprecated
    defaultValues();
    nowhere_links();
  });
}

function defaultValues() {
  var fields = $('form input.form-default-value');
  var forms = fields.parents('form');
  fields.each(function() {
    this.defaultValue = this.value;
    $(this).focus(function() {
      if (this.value == this.defaultValue) {
        this.value = '';
        $(this).removeClass('form-default-value');
      }
    });
    $(this).blur(function() {
      if (this.value == '') {
        $(this).addClass('form-default-value');
        this.value = this.defaultValue;
      }
    });
  });

  // Clear all the form elements before submission.
  forms.submit(function() {
    fields.focus();
  });
};




function nowhere_links() {
  $('a[href$=nowhere]')
  .attr('href', 'javascript:;')
  // Everything from here onward will go in the master stylesheet once approved
  .css('color', '#ccc')
  .css('cursor', 'default')
  .hover(function() {
    $(this).css('text-decoration', 'none');
  },
  function() {
    return 1;
  });	  
}


