Drupal.locale = { 'pluralFormula': function ($n) { return Number((($n==1)?(0):((($n==0)||((($n%100)>0)&&(($n%100)<20)))?(1):2))); }, 'strings': {"":{"An AJAX HTTP error occurred.":"A ap\u0103rut o eroare AJAX HTTP.","An AJAX HTTP request terminated abnormally.":"O cerere AJAX HTTP s-a terminat anormal.","Path: !uri":"Cale: !uri","StatusText: !statusText":"StatusText: !statusText","Loading":"Se \u00eencarc\u0103","(active tab)":"(tab activ)","Hide":"Ascundere","Show":"Afi\u015fare","Show row weights":"Afi\u015fare coloana greutate","Hide row weights":"Ascundere coloana greutate","Drag to re-order":"Trage pentru a reordona","Changes made in this table will not be saved until the form is submitted.":"Modific\u0103rile f\u0103cute acestui tabel nu vor fi salvate p\u00e2n\u0103 c\u00e2nd formularul nu este trimis.","Edit":"Modific\u0103","none":"nimic","Upload":"\u00cencarc\u0103","Configure":"Configureaz\u0103","Done":"Gata","Select all rows in this table":"Selecteaz\u0103 toate r\u00e2ndurile din acest tabel","Deselect all rows in this table":"Deselecteaz\u0103 toate r\u00e2ndurile din acest tabel","Not published":"Nepublicat","Please wait...":"V\u0103 rug\u0103m, a\u015ftepta\u0163i...","Only files with the following extensions are allowed: %files-allowed.":"Doar fi\u015fierele cu urm\u0103toarele extensii sunt acceptate: %files-allowed.","By @name on @date":"De @name la @date","By @name":"De @name","Not in menu":"Nu este \u00een meniu","Alias: @alias":"Alias: @alias","No alias":"F\u0103r\u0103 alias","New revision":"Revizie nou\u0103","The changes to these blocks will not be saved until the \u003cem\u003eSave blocks\u003c\/em\u003e button is clicked.":"Modific\u0103rile la aceste blocuri nu vor fi salvate p\u00e2n\u0103 c\u00e2nd nu da\u021bi clic pe butonul \u003cem\u003eSalvare blocuri\u003c\/em\u003e.","No revision":"Nicio revizie","@number comments per page":"@number comentarii pe pagin\u0103","Requires a title":"Titlul este obligatoriu","Not restricted":"Nerestric\u0163ionat","Not customizable":"Nu se poate personaliza","Restricted to certain pages":"Restric\u0163ionat la unele pagini.","The block cannot be placed in this region.":"Blocul nu poate fi plasat \u00een aceast\u0103 regiune.","Customize dashboard":"Personalizare tablou de bord","Autocomplete popup":"Popup autocompletare","Searching for matches...":"Se caut\u0103 potriviri...","Select":"Selectare","Remove group":"\u00cenl\u0103tur\u0103 grup","Close":"\u00cenchidere","Slideshow":"Slideshow"}} };;

(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);
;
(function ($) {

Drupal.behaviors.qt_accordion = {
  attach: function (context, settings) {
    var qt_options = Drupal.settings.quicktabs;
    var history_enabled = false;
    $('.quick-accordion', context).once(function(){
      var qtKey = 'qt_' + this.id.substring(this.id.indexOf('-') +1);
      var options = Drupal.settings.quicktabs[qtKey].options;
      if (options.history) {
        history_enabled = true;
      }
      var active_tab = parseInt(Drupal.settings.quicktabs[qtKey].active_tab);
      options.active = active_tab;
      options.event = 'change';
      $(this).accordion(options).addClass("init");
    });

    var accordions = $(".quick-accordion", context);
    var acc_selector = "h3 a";

    // Add href value to links.
    $(".accordion a").each(function(index, value) {
      var id = $(this).closest( '.quick-accordion' ).attr( 'id' );
      $(this).attr("href", "#" + id + "_" + index);
    });

    accordions.find( acc_selector ).click(function(event){
      // Keep the link from firing.
      event.preventDefault();

      var state = {},
        id = $(this).closest( '.quick-accordion' ).attr( 'id' ),
        idx = $(this).parent().prevAll('h3').length,
        el = id.split("quickset-");

      var key = 'qt_' + el[1];
      // Only fire if history is set.
      if (qt_options[key].history) {
        state[ id ] = idx;
        $.bbq.pushState( state );
      }
      else {
        $('#' + id).accordion('activate', idx);
      }
    });

    if (history_enabled) {
      $(window).bind( 'hashchange', function(e) {
        params = $.deparam.fragment();
        // Should only fire once when page loads.
        if (accordions.hasClass("init")) {
          for (var key in qt_options) {
            var name = 'quickset-' + qt_options[key].name,
              active_tab = parseInt(qt_options[key].active_tab);
            // If there is an active tab and the tab isn't already defined by a hash.
            if (active_tab > 0 && !params[name]) {
              $("#" + name).accordion('activate', active_tab);
            }
          }
          accordions.removeClass("init");
        }

        accordions.each(function(){
          var idx = e.getState( this.id, true );
          // Only activate tab if it has a hash.
          if (params[$(this).attr('id')]) {
            $(this).accordion('activate', idx);
          }
        });
      });

      $(window).trigger( 'hashchange' );
    }

  }
}

})(jQuery);
;
(function ($) {
Drupal.settings.views = Drupal.settings.views || {'ajax_path': '/views/ajax'};

Drupal.quicktabs = Drupal.quicktabs || {};

Drupal.quicktabs.getQTName = function (el) {
  return el.id.substring(el.id.indexOf('-') +1);
}

Drupal.behaviors.quicktabs = {
  attach: function (context, settings) {
    $.extend(true, Drupal.settings, settings);
    $('.quicktabs-wrapper', context).once(function(){
      Drupal.quicktabs.prepare(this);
    });
  }
}

// Setting up the inital behaviours
Drupal.quicktabs.prepare = function(el) {
  // el.id format: "quicktabs-$name"
  var qt_name = Drupal.quicktabs.getQTName(el);
  var $ul = $(el).find('ul.quicktabs-tabs:first');
  $ul.find('li a').each(function(i, element){
    element.myTabIndex = i;
    element.qt_name = qt_name;
    var tab = new Drupal.quicktabs.tab(element);
    var parent_li = $(element).parents('li').get(0);
    if ($(parent_li).hasClass('active')) {
      $(element).addClass('quicktabs-loaded');
    }
    $(element).once(function() {$(this).bind('click', {tab: tab}, Drupal.quicktabs.clickHandler);});
  });
}

Drupal.quicktabs.clickHandler = function(event) {
  var tab = event.data.tab;
  var element = this;
  // Set clicked tab to active.
  $(this).parents('li').siblings().removeClass('active');
  $(this).parents('li').addClass('active');

  // Hide all tabpages.
  tab.container.children().addClass('quicktabs-hide');
  
  if (!tab.tabpage.hasClass("quicktabs-tabpage")) {
    tab = new Drupal.quicktabs.tab(element);
  }

  tab.tabpage.removeClass('quicktabs-hide');
  return false;
}

// Constructor for an individual tab
Drupal.quicktabs.tab = function (el) {
  this.element = el;
  this.tabIndex = el.myTabIndex;
  var qtKey = 'qt_' + el.qt_name;
  var i = 0;
  for (var key in Drupal.settings.quicktabs[qtKey].tabs) {
    if (i == this.tabIndex) {
      this.tabObj = Drupal.settings.quicktabs[qtKey].tabs[key];
      this.tabKey = key;
    }
    i++;
  }
  this.tabpage_id = 'quicktabs-tabpage-' + el.qt_name + '-' + this.tabKey;
  this.container = $('#quicktabs-container-' + el.qt_name);
  this.tabpage = this.container.find('#' + this.tabpage_id);
}

if (Drupal.ajax) {
  /**
   * Handle an event that triggers an AJAX response.
   *
   * We unfortunately need to override this function, which originally comes from
   * misc/ajax.js, in order to be able to cache loaded tabs, i.e. once a tab
   * content has loaded it should not need to be loaded again.
   *
   * I have removed all comments that were in the original core function, so that
   * the only comments inside this function relate to the Quicktabs modification
   * of it.
   */
  Drupal.ajax.prototype.eventResponse = function (element, event) {
    var ajax = this;

    if (ajax.ajaxing) {
      return false;
    }
  
    try {
      if (ajax.form) {
        if (ajax.setClick) {
          element.form.clk = element;
        }
  
        ajax.form.ajaxSubmit(ajax.options);
      }
      else {
        // Do not perform an ajax request for already loaded Quicktabs content.
        if (!$(element).hasClass('quicktabs-loaded')) {
          ajax.beforeSerialize(ajax.element, ajax.options);
          $.ajax(ajax.options);
          if ($(element).parents('ul').hasClass('quicktabs-tabs')) {
            $(element).addClass('quicktabs-loaded');
          }
        }
      }
    }
    catch (e) {
      ajax.ajaxing = false;
      alert("An error occurred while attempting to process " + ajax.options.url + ": " + e.message);
    }
    return false;
  };
}


})(jQuery);
;
/**
 * @file base.js
 *
 * Some basic behaviors and utility functions for Views.
 */
(function ($) {

Drupal.Views = {};

/**
 * jQuery UI tabs, Views integration component
 */
Drupal.behaviors.viewsTabs = {
  attach: function (context) {
    if ($.viewsUi && $.viewsUi.tabs) {
      $('#views-tabset').once('views-processed').viewsTabs({
        selectedClass: 'active'
      });
    }

    $('a.views-remove-link').once('views-processed').click(function(event) {
      var id = $(this).attr('id').replace('views-remove-link-', '');
      $('#views-row-' + id).hide();
      $('#views-removed-' + id).attr('checked', true);
      event.preventDefault();
   });
  /**
    * Here is to handle display deletion 
    * (checking in the hidden checkbox and hiding out the row) 
    */
  $('a.display-remove-link')
    .addClass('display-processed')
    .click(function() {
      var id = $(this).attr('id').replace('display-remove-link-', '');
      $('#display-row-' + id).hide();
      $('#display-removed-' + id).attr('checked', true);
      return false;
  });
  }
};

/**
 * Helper function to parse a querystring.
 */
Drupal.Views.parseQueryString = function (query) {
  var args = {};
  var pos = query.indexOf('?');
  if (pos != -1) {
    query = query.substring(pos + 1);
  }
  var pairs = query.split('&');
  for(var i in pairs) {
    if (typeof(pairs[i]) == 'string') {
      var pair = pairs[i].split('=');
      // Ignore the 'q' path argument, if present.
      if (pair[0] != 'q' && pair[1]) {
        args[decodeURIComponent(pair[0].replace(/\+/g, ' '))] = decodeURIComponent(pair[1].replace(/\+/g, ' '));
      }
    }
  }
  return args;
};

/**
 * Helper function to return a view's arguments based on a path.
 */
Drupal.Views.parseViewArgs = function (href, viewPath) {
  var returnObj = {};
  var path = Drupal.Views.getPath(href);
  // Ensure we have a correct path.
  if (viewPath && path.substring(0, viewPath.length + 1) == viewPath + '/') {
    var args = decodeURIComponent(path.substring(viewPath.length + 1, path.length));
    returnObj.view_args = args;
    returnObj.view_path = path;
  }
  return returnObj;
};

/**
 * Strip off the protocol plus domain from an href.
 */
Drupal.Views.pathPortion = function (href) {
  // Remove e.g. http://example.com if present.
  var protocol = window.location.protocol;
  if (href.substring(0, protocol.length) == protocol) {
    // 2 is the length of the '//' that normally follows the protocol
    href = href.substring(href.indexOf('/', protocol.length + 2));
  }
  return href;
};

/**
 * Return the Drupal path portion of an href.
 */
Drupal.Views.getPath = function (href) {
  href = Drupal.Views.pathPortion(href);
  href = href.substring(Drupal.settings.basePath.length, href.length);
  // 3 is the length of the '?q=' added to the url without clean urls.
  if (href.substring(0, 3) == '?q=') {
    href = href.substring(3, href.length);
  }
  var chars = ['#', '?', '&'];
  for (i in chars) {
    if (href.indexOf(chars[i]) > -1) {
      href = href.substr(0, href.indexOf(chars[i]));
    }
  }
  return href;
};

})(jQuery);
;

