Drupal.behaviors.pasarComingsoon = {
  attach: function(context, settings) {
    (function ($) {
      // Add 'x' close button and handler to status messages.
      $.fn.closeButtonMessages = function() {
        $('.messages').each(function() {
          $(this).prepend('<a class="close" href="#" title="' + Drupal.t('Close') + '">x</a>');
        });
        $('.messages a.close').click(function(e) {
          e.preventDefault();
          $(this).parent().fadeOut('slow');
        });
      };
      $().closeButtonMessages();

      // Usability enhancement to subscribe form.
      $('#pasar-prelaunch-subscribe-subscribe-form .form-item').click(function() {
        $(this).find('.form-text').focus();
      });
      $('#pasar-prelaunch-subscribe-subscribe-form #form-prefix-username').click(function() {
        $(this).parent().find('#edit-username').focus();
      });
    })(jQuery);
  }
}
;

