(function ($) {
  Drupal.tottoNewsletter = new Object();
  Drupal.tottoNewsletter.itemSelect = 81;
  Drupal.behaviors.tottoNewsletter = {
    attach: function (context, settings) {
      $('#edit-fieldset-newsletter').once('totto-newsletter', function() {
        // Eliminar texto de ayuda en click
        $(this).click(function(e) {
          var value = $(this).attr('value');
          if (value == Drupal.settings.tottoNewsletter) {
            $(this).attr('value', '');
          }
        });
        // Al salir del campo, si está vacío
        // Poner texto de ayuda
        $(this).focusout(function(e) {
          var value = $(this).attr('value');
          if (value == '') {
            $(this).attr('value', Drupal.settings.tottoNewsletter);
          }
        });
      });
    }
  };
}(jQuery));;

