Drupal.locale = { 'pluralFormula': function ($n) { return Number(($n!=1)); }, 'strings': {"Disabled":"Disattivato","Enabled":"Attivato","S":"S","W":"O","Edit":"Modifica","Not published":"Non pubblicato","Save and send":"Salva ed invia","Save and send test":"Salva e invia Email di prova","Configure":"Configura","Other":"Altro","Select all rows in this table":"Seleziona tutte le righe in questa tabella","Deselect all rows in this table":"Deseleziona tutte le righe in questa tabella","Join summary":"Unisci il sommario","Split summary at cursor":"Dividi il sommario nella posizione del cursore","Your server has been successfully tested to support this feature.":"Il vostro server ha superato con successo il test per supportare questa funzione.","Your system configuration does not currently support this feature. The \u003ca href=\"http:\/\/drupal.org\/node\/15365\"\u003ehandbook page on Clean URLs\u003c\/a\u003e has additional troubleshooting information.":"La configurazione del vostro sistema attualmente non supporta questa funzione. La pagina del \u003ca href=\"http:\/\/drupal.org\/node\/15365\"\u003emanuale sugli URL semplificati\u003c\/a\u003e contiene informazioni aggiuntive per la soluzione dei problemi.","Testing clean URLs...":"Controllo degli URL semplificati in corso...","An HTTP error @status occurred. \n@uri":"Si \u00e8 verificato un errore HTTP @status. \r\n@uri","Unspecified error":"Errore non specificato","Drag to re-order":"Trascina per riordinare","Changes made in this table will not be saved until the form is submitted.":"I cambiamenti fatti a questa tabella non saranno salvati finch\u00e8 il form non viene inviato.","The changes to these blocks will not be saved until the \u003cem\u003eSave blocks\u003c\/em\u003e button is clicked.":"I cambiamenti a questi blocchi non saranno salvati finch\u00e9 il bottone \u003cem\u003eSalva blocchi\u003c\/em\u003e \u00e8 cliccato.","Please wait...":"Attendere prego...","An error occurred. \n@uri\n@text":"Si \u00e8 verificato un errore. \r\n@uri\r\n@text","An error occurred. \n@uri\n(no information available).":"Si \u00e8 verificato un errore. \r\n@uri\r\n(nessuna informazione disponibile).","Show":"Mostra","Hide":"Nascondi","Not in book":"Non nel libro","New book":"Nuovo libro","By @name on @date":"Da @name il @date","By @name":"Da @name","Not in menu":"Non nel menu","Alias: @alias":"Alias: @alias","No alias":"Nessun alias","New revision":"Nuova revisione","This permission is inherited from the authenticated user role.":"Questo permesso viene ereditato dal ruolo utente autenticato.","No revision":"Nessuna revisione","@number comments per page":"@number commenti per pagina","Not restricted":"Non limitato","(active tab)":"(scheda attiva)","An AJAX HTTP error occurred.":"Si \u00e8 verificato un errore HTTP in AJAX.","HTTP Result Code: !status":"Codice HTTP di risposta: !status","An AJAX HTTP request terminated abnormally.":"Una richiesta AJAX HTTP \u00e8 terminata in modo anomalo.","Debugging information follows.":"Di seguito le informazioni di debug.","Path: !uri":"Percorso: !uri","StatusText: !statusText":"StatusText: !statusText","ResponseText: !responseText":"ResponseText: !responseText","ReadyState: !readyState":"ReadyState: !readyState","Not customizable":"Non personalizzabile","Restricted to certain pages":"Limitato a certe pagine","The block cannot be placed in this region.":"Il blocco non pu\u00f2 essere posizionato in questa regione.","Hide summary":"Nascondi sommario","Edit summary":"Modifica sommario","The selected file %filename cannot be uploaded. Only files with the following extensions are allowed: %extensions.":"Il file selezionato %filename non pu\u00f2 essere caricato. Sono consentiti solo file con le seguenti estensioni: %extensions.","Re-order rows by numerical weight instead of dragging.":"Riordina le righe utilizzando il peso numerico invece del trascinamento.","Show row weights":"Visualizza i pesi delle righe","Hide row weights":"Nascondi i pesi delle righe","Autocomplete popup":"Popup di autocompletamento","Searching for matches...":"Ricerca in corso..."} };;

(function ($) {
  Drupal.Panels = {};

  Drupal.Panels.autoAttach = function() {
    if ($.browser.msie) {
      // If IE, attach a hover event so we can see our admin links.
      $("div.panel-pane").hover(
        function() {
          $('div.panel-hide', this).addClass("panel-hide-hover"); return true;
        },
        function() {
          $('div.panel-hide', this).removeClass("panel-hide-hover"); return true;
        }
      );
      $("div.admin-links").hover(
        function() {
          $(this).addClass("admin-links-hover"); return true;
        },
        function(){
          $(this).removeClass("admin-links-hover"); return true;
        }
      );
    }
  };

  $(Drupal.Panels.autoAttach);
})(jQuery);
;

/**
 * @file
 * Integrates Views data with the FullCalendar plugin.
 */

(function ($) {

Drupal.behaviors.fullCalendar = {
  attach: function(context) {
    // Process each view and its settings.
    $.each(Drupal.settings.fullcalendar, function(index, settings) {
      // Hide the failover display.
      $(index).find('.fullcalendar-content').hide();

       // Add events from Drupal.
       var eventSourcesArray = [
         function(start, end, callback) {
           var events = [];
           $(index).find('.fullcalendar-event-details').each(function() {
            events.push({
              field: $(this).attr('field'),
              index: $(this).attr('index'),
              eid: $(this).attr('eid'),
              entity_type: $(this).attr('entity_type'),
              title: $(this).attr('title'),
              start: $(this).attr('start'),
              end: $(this).attr('end'),
              url: $(this).attr('href'),
              allDay: ($(this).attr('allDay') === '1'),
              className: $(this).attr('cn'),
              editable: $(this).attr('editable'),
              dom_id: index
            });
          });
          callback(events);
        }
      ];

       // Add events from Google Calendar feeds.
       $.each(settings.gcal, function(i, gcalEntry) {
         eventSourcesArray.push($.fullCalendar.gcalFeed(gcalEntry[0], gcalEntry[1]));
      });

      // Use .once() to protect against extra AJAX calls from Colorbox.
      $(index).find('.fullcalendar').once().fullCalendar({
        defaultView: settings.defaultView,
        theme: settings.theme,
        header: {
          left: settings.left,
          center: settings.center,
          right: settings.right
        },
        isRTL: settings.isRTL === '1',
        eventClick: function(calEvent, jsEvent, view) {
          // Use colorbox only for events based on entities
          if (settings.colorbox && (calEvent.eid !== undefined)) {
            // Open in colorbox if exists, else open in new window.
            if ($.colorbox) {
              var url = calEvent.url;
              if (settings.colorboxClass !== '') {
                url += ' ' + settings.colorboxClass;
              }
              $.colorbox({
                href: url,
                width: settings.colorboxWidth,
                height: settings.colorboxHeight
              });
            }
          }
          else {
            if (settings.sameWindow) {
              window.open(calEvent.url, '_self');
            }
            else {
              window.open(calEvent.url);
            }
          }
          return false;
        },
        year: (settings.year) ? settings.year : undefined,
        month: (settings.month) ? settings.month - 1 : undefined,
        date: (settings.day) ? settings.day : undefined,
        timeFormat: {
          agenda: (settings.clock) ? 'HH:mm{ - HH:mm}' : settings.agenda,
          '': (settings.clock) ? 'HH:mm' : settings.agenda
        },
        axisFormat: (settings.clock) ? 'HH:mm' : 'h(:mm)tt',
        weekMode: settings.weekMode,
        firstDay: settings.firstDay,
        monthNames: settings.monthNames,
        monthNamesShort: settings.monthNamesShort,
        dayNames: settings.dayNames,
        dayNamesShort: settings.dayNamesShort,
        allDayText: settings.allDayText,
        buttonText: {
          today:  settings.todayString,
          day: settings.dayString,
          week: settings.weekString,
          month: settings.monthString
        },
        eventSources: eventSourcesArray,
        eventDrop: function(event, dayDelta, minuteDelta, allDay, revertFunc) {
          $.post(Drupal.settings.basePath + 'fullcalendar/ajax/update/drop/'+ event.eid,
            'field=' + event.field + '&entity_type=' + event.entity_type + '&index=' + event.index + '&day_delta=' + dayDelta + '&minute_delta=' + minuteDelta + '&all_day=' + allDay + '&dom_id=' + event.dom_id,
            fullcalendarUpdate);
          return false;
        },
        eventResize: function(event, dayDelta, minuteDelta, revertFunc) {
          $.post(Drupal.settings.basePath + 'fullcalendar/ajax/update/resize/'+ event.eid,
            'field=' + event.field + '&entity_type=' + event.entity_type + '&index=' + event.index + '&day_delta=' + dayDelta + '&minute_delta=' + minuteDelta + '&dom_id=' + event.dom_id,
            fullcalendarUpdate);
          return false;
        }
      });
    });

    var fullcalendarUpdate = function(result) {
      fcStatus = $(result.dom_id).find('.fullcalendar-status');
      if (fcStatus.text() === '') {
        fcStatus.html(result.msg).slideDown();
      }
      else {
        fcStatus.effect('highlight', {}, 5000);
      }
      return false;
    };

    $('.fullcalendar-status-close').live('click', function() {
      $(this).parent().slideUp();
      return false;
    });

    // Trigger a window resize so that calendar will redraw itself as it loads funny in some browsers occasionally
    $(window).resize();
  }
};

})(jQuery);
;

