Drupal.locale = { 'pluralFormula': function ($n) { return Number(($n!=1)); }, 'strings': {"":{"An AJAX HTTP error occurred.":"Ett AJAX HTTP-fel intr\u00e4ffade","HTTP Result Code: !status":"Resultatkod f\u00f6r HTTP: !status","An AJAX HTTP request terminated abnormally.":"Ett AJAX HTTP-anrop avslutades ov\u00e4ntat.","Debugging information follows.":"Fels\u00f6kningsinformation f\u00f6ljer.","Path: !uri":"S\u00f6kv\u00e4g: !uri","StatusText: !statusText":"Statustext: !statusText","ResponseText: !responseText":"Svarstext: !responseText","ReadyState: !readyState":"Tillst\u00e5nd: !readyState","Loading":"Laddar","(active tab)":"(aktiv flik)","Hide":"D\u00f6lj","Show":"Visa","Re-order rows by numerical weight instead of dragging.":"Sortera om rader efter numerisk vikt ist\u00e4llet f\u00f6r drag-och-sl\u00e4pp.","Show row weights":"Visa radernas vikt","Hide row weights":"D\u00f6lj radernas vikt","Drag to re-order":"Drag f\u00f6r att ordna om","Changes made in this table will not be saved until the form is submitted.":"\u00c4ndringar som g\u00f6rs i denna tabell sparas inte f\u00f6rr\u00e4n formul\u00e4ret skickas.","Hide shortcuts":"D\u00f6lj genv\u00e4gar","Configure":"Konfigurera","Done":"F\u00e4rdig","Select all rows in this table":"Markera alla rader i tabellen","Deselect all rows in this table":"Avmarkera alla rader i tabellen","Not published":"Inte publicerad","Please wait...":"V\u00e4nligen v\u00e4nta...","By @name on @date":"Av @name @date","By @name":"Av @name","Not in menu":"Ej i meny","Alias: @alias":"Alias: @alias","No alias":"Inga alias","New revision":"Ny version","Show shortcuts":"Visa genv\u00e4gar","No revision":"Inga versioner","@number comments per page":"@number kommentarer per sida","Not restricted":"Ej begr\u00e4nsad","Not customizable":"Ej anpassningsbart","Restricted to certain pages":"Begr\u00e4nsad till vissa sidor","Customize dashboard":"Anpassa \u00f6versiktspanel","@title dialog":"Dialog @title","The selected file %filename cannot be uploaded. Only files with the following extensions are allowed: %extensions.":"Den valda filen %filename kan inte laddas upp. Endast filer med f\u00f6ljande \u00e4ndelser \u00e4r till\u00e5tna: %extensions.","Autocomplete popup":"Popup med automatisk komplettering","Searching for matches...":"S\u00f6ker efter tr\u00e4ffar...","One domain with multiple subdomains":"En dom\u00e4n med flera underdom\u00e4ner","Multiple top-level domains":"Flera toppdom\u00e4ner","All pages with exceptions":"Alla sidor utom","Excepted: @roles":"Undantagna: @roles","Not tracked":"Sp\u00e5ras inte","@items tracked":"@items sp\u00e5rade","A single domain":"En dom\u00e4n"}} };;
(function ($) {

$(document).ready(function() {

  // Accepts a string; returns the string with regex metacharacters escaped. The returned string
  // can safely be used at any point within a regex to match the provided literal string. Escaped
  // characters are [ ] { } ( ) * + ? - . , \ ^ $ # and whitespace. The character | is excluded
  // in this function as it's used to separate the domains names.
  RegExp.escapeDomains = function(text) {
    return (text) ? text.replace(/[-[\]{}()*+?.,\\^$#\s]/g, "\\$&") : '';
  }

  // Attach onclick event to document only and catch clicks on all elements.
  $(document.body).click(function(event) {
    // Catch the closest surrounding link of a clicked element.
    $(event.target).closest("a,area").each(function() {

      var ga = Drupal.settings.googleanalytics;
      // Expression to check for absolute internal links.
      var isInternal = new RegExp("^(https?):\/\/" + window.location.host, "i");
      // Expression to check for special links like gotwo.module /go/* links.
      var isInternalSpecial = new RegExp("(\/go\/.*)$", "i");
      // Expression to check for download links.
      var isDownload = new RegExp("\\.(" + ga.trackDownloadExtensions + ")$", "i");
      // Expression to check for the sites cross domains.
      var isCrossDomain = new RegExp("^(https?|ftp|news|nntp|telnet|irc|ssh|sftp|webcal):\/\/.*(" + RegExp.escapeDomains(ga.trackCrossDomains) + ")", "i");

      // Is the clicked URL internal?
      if (isInternal.test(this.href)) {
        // Is download tracking activated and the file extension configured for download tracking?
        if (ga.trackDownload && isDownload.test(this.href)) {
          // Download link clicked.
          var extension = isDownload.exec(this.href);
          _gaq.push(["_trackEvent", "Downloads", extension[1].toUpperCase(), this.href.replace(isInternal, '')]);
        }
        else if (isInternalSpecial.test(this.href)) {
          // Keep the internal URL for Google Analytics website overlay intact.
          _gaq.push(["_trackPageview", this.href.replace(isInternal, '')]);
        }
      }
      else {
        if (ga.trackMailto && $(this).is("a[href^=mailto:],area[href^=mailto:]")) {
          // Mailto link clicked.
          _gaq.push(["_trackEvent", "Mails", "Click", this.href.substring(7)]);
        }
        else if (ga.trackOutbound && this.href) {
          if (ga.trackDomainMode == 2 && isCrossDomain.test(this.href)) {
            // Top-level cross domain clicked. document.location is handled by _link internally.
            _gaq.push(["_link", this.href]);
          }
          else if (ga.trackOutboundAsPageview) {
            // Track all external links as page views after URL cleanup.
            // Currently required, if click should be tracked as goal.
            _gaq.push(["_trackPageview", '/outbound/' + this.href.replace(/^(https?|ftp|news|nntp|telnet|irc|ssh|sftp|webcal):\/\//i, '').split('/').join('--')]);
          }
          else {
            // External link clicked.
            _gaq.push(["_trackEvent", "Outbound links", "Click", this.href]);
          }
        }
      }
    });
  });
});

})(jQuery);
;

