




  var lp = (function (exports) {
    var siteColors = exports.siteColors = exports.siteColors || {};

    var _colors = {
          "svart": "#000000",
      "svart": "#000000",           "morkgra": "#404040",
      "morkgra": "#404040",           "ljusgra": "#c0c0c0",
      "ljusgra": "#c0c0c0",           "ljusgul": "#f9f4e4",
      "ljusgul": "#f9f4e4",           "vit": "#ffffff",
      "vit": "#ffffff",           "rod": "#ff0000",
      "rod": "#ff0000"        };

    siteColors.getAll = function () {
      return _colors;
    };

    siteColors.get = function (colorSlug, defaultColor) {
      if (typeof _colors[colorSlug] === 'string') {
        return _colors[colorSlug];
      }
      return defaultColor;
    };

    siteColors.getSlug = function (colorName) {
      return colorName
        .toLowerCase() // All lowercase
        .replace(/å|ä/g, 'a') // replace åä with a
        .replace(/ö/g, 'o') // replace ö with o
        .replace(/[^a-z0-9]+/g, '-') // replace anything but a-z with -
        .replace(/^-+|-+$/g, ''); // remove invalid trailing and leading
    };

    return exports;
  })(lp || {});

