(function() {
  window.SpinGoWidgets = [];
  window.SpinGoWidgetBaseConfig = {
    "authToken": "05624a01374b9d75c0b6b1b2b3f5ac71dd9d681ae3c4141aa764cffbdfbe7eef",
    "calendarUrl": "http://coloradosprings.com/events/#",
    "calendarId": 2001,
    "calendarApiHost": "calendarapi-cdn.spingo.com",
    "loggingApiHost": "loggingapi.spingo.com",
    "mainColor": "#A3C2C7",
    "featuredColor": "#336699",
    "sponsorship": {
      "link": "http://www.spingo.com/submit?AffiliateID=2001",
      "className": "calendar",
      "id": 2001,
      "images": {
        "main": "//d16twqtnxc0kgx.cloudfront.net/widgets/sponsorship-images/add-event-2014-12-03.png"
      },
      "background": {
        "light": "#2b2b2b",
        "dark": "#2b2b2b"
      }
    },
    "embedOptions": {}
  };
  window.SpinGoWidgetUrl = '//d16twqtnxc0kgx.cloudfront.net/apps/list-widget/v1.4.1/list-widget.js'

  window.SpinGoWidget = (function() {
    function SpinGoWidget(config) {
      this.config = config;
      this.defaults = SpinGoWidgetBaseConfig;
      SpinGoWidgets.push(this);
    }
    return SpinGoWidget;
  })();


  if (typeof define === 'function' && define.amd) {
    define(function() {
      require([SpinGoWidgetUrl], function() {});
      return window.SpinGoWidget;
    });
  } else {
    var head = document.getElementsByTagName("head")[0];
    var script = document.createElement('script');
    script.setAttribute("type", "text/javascript");
    script.setAttribute("src", SpinGoWidgetUrl);
    head.appendChild(script);
  }
}())
