Drupal.locale = { 'pluralFormula': function ($n) { return Number(($n!=1)); }, 'strings': {"An AJAX HTTP error occurred.":"Ocorreu um erro HTTP no Ajax.","HTTP Result Code: !status":"C\u00f3digo de Resultado HTTP: !status","An AJAX HTTP request terminated abnormally.":"Um pedido HTTP Ajax terminou com anomalia.","Debugging information follows.":"Segue informa\u00e7\u00e3o para depura\u00e7\u00e3o.","Path: !uri":"Caminho: !uri","StatusText: !statusText":"Texto de Estado: !statusText","ResponseText: !responseText":"Texto de Resposta: !responsetext","ReadyState: !readyState":"ReadyState: !readyState","Hide":"Esconder","Show":"Mostrar","Show shortcuts":"Mostrar atalhos","Hide shortcuts":"Ocultar atalhos","Translate Text":"Traduzir Texto","An HTTP error @status occured.":"Ocorreu um erro HTTP: @status.","Re-order rows by numerical weight instead of dragging.":"Re-ordenar linhas por peso num\u00e9rico em vez de as arrastar.","Show row weights":"Mostrar coluna de pesos","Hide row weights":"Ocultar coluna de pesos","Drag to re-order":"Arraste para reordenar.","Changes made in this table will not be saved until the form is submitted.":"As altera\u00e7\u00f5es efectuadas nesta tabela n\u00e3o ir\u00e3o ser guardadas at\u00e9 que o formul\u00e1rio seja enviado.","(active tab)":"(separador ativo)","Configure":"Configurar","@title dialog":"Di\u00e1logo @title","Loading":"A carregar","Select all rows in this table":"Marcar todas as colunas nesta tabela.","Deselect all rows in this table":"Desmarcar todas as colunas nesta tabela.","Automatic alias":"Caminho alternativo autom\u00e1tico","Autocomplete popup":"Pop-up de preenchimento autom\u00e1tico","Searching for matches...":"Procurando por correspond\u00eancias...","Please wait...":"Aguarde...","The changes to these blocks will not be saved until the \u003cem\u003eSave blocks\u003c\/em\u003e button is clicked.":"As altera\u00e7\u00f5es a estes blocos n\u00e3o ser\u00e3o guardadas at\u00e9 clicar no bot\u00e3o \u003cem\u003eGuardar blocos\u003c\/em\u003e.","Not restricted":"N\u00e3o restringido","Not customizable":"N\u00e3o personaliz\u00e1vel","Restricted to certain pages":"Restringido a determinadas p\u00e1ginas","The block cannot be placed in this region.":"O bloco n\u00e3o pode ser colocado nesta regi\u00e3o","Excepted: @roles":"Exce\u00e7\u00e3o: @roles"} };;
(function ($) {
  Drupal.behaviors.newsletter = {
    attach: function (context, settings) {
      $("input[name='email']").click(function () {
          if ($("input[name='email']").val() == 'user@example.com') {
            $("input[name='email']").val('');
          }
      });
      $("input[name='email']").blur(function () {
        if ($("input[name='email']").val() == '') {
          $("input[name='email']").val('user@example.com');
        }
      });
    },

    subscribeForm: function(data) {
      $.each(Drupal.settings.exposed, function(e,i) {
        if (!$('#edit-field-newsletter-list-' + Drupal.settings.lang + '-' + i).attr('checked')) {
          $('.form-item-exposed-' + i).css('display', 'none');
        }

        $('#edit-field-newsletter-list-' + Drupal.settings.lang + '-' + i).click(function () {
          if($('.form-item-exposed-' + i).css('display') == 'none') {
            $('.form-item-exposed-' + i).css('display', 'block');
          }
          else {
            $('.form-item-exposed-' + i).css('display', 'none');
          }
        });
      });

      $('#newsletter-subscribe-advanced').submit(function() {
        if(!$('#newsletter-subscribe-advanced input[type="checkbox"]').is(':checked')){
          alert(Drupal.t("Please check at least one newsletter list."));
          return false;
        }
      });
    },
  };
})(jQuery);
;

