/*-------------------------------------------------------------*/
/*                       PRODUCTION KEYS                       */
/*-------------------------------------------------------------*/
/*-------------------------------------------------------------*/
/*      DO NOT EDIT THIS FILE... THIS IS AUTO-GENERATED!!      */
/*-------------------------------------------------------------*/
/* You need to define the following variable to use this file: */
/*                                                             */
/*    myTunnelURI = pathToTunnelDotHtml                        */
/*                                                             */
/* You can set these variables to customize the behavior of    */
/* this file:                                                  */
/*                                                             */
/*    mySiteConfigs : Checked before sitesConfigs which allows */
/*       you to add your own site configurations.              */
/*-------------------------------------------------------------*/

/* make sure myTunnelURI is set */
if(typeof window.myTunnelURI === 'undefined') {
   alert("Need to set myTunnelURI before loading configurables.js");
}

/* set default iframe attributes if not already set */
if(typeof window.iframeAttributes === 'undefined') {
   window.iframeAttributes =  {
      style : {
         border :"0pt none",
         background :"white"
      },
      scrolling :"auto",
      width :"100%",
      height :"100%",
      frameborder :"0"
   };
}

/* extract the protocol + hostname from the current location */
var arr = window.location.href.match(/^https?:(\/\/)?([^\/\s]+)/);
var currentDomain = arr[0];

var widgetPath = '/widgets-server/action/';
window.tunnelURI = currentDomain+myTunnelURI;
window.widgetURLSwitch = {'http' : null, 'https' : null};

getMatchedSiteConfig = function() {
   if(!(typeof mySiteConfigs === 'undefined')) {
      for(var i=0;i<mySiteConfigs.sites.length;i++) {
         if(mySiteConfigs.sites[i].siteDomain == currentDomain)
            return mySiteConfigs.sites[i];
      }
   }
   for(var i=0;i<siteConfigs.sites.length;i++) {
      if(siteConfigs.sites[i].siteDomain == currentDomain)
         return siteConfigs.sites[i];
   }
};

getMatchedWidgetsDomain = function() {
   if(typeof getMatchedSiteConfig() === 'undefined')
      return 'http://' + currentDomain;
   else
      return getMatchedSiteConfig().widgetDomain;
};
 
getMatchedSecureWidgetsDomain = function() {
   if(typeof getMatchedSiteConfig() === 'undefined')
      return 'https://' + currentDomain;
   else
      return getMatchedSiteConfig().widgetSecureDomain;
};

getMatchedTunnelURI = function() {
   return window.tunnelURI;
};

var siteConfigs = {"sites": [
   {
      "siteDomain": "http://www.coca-cola.com",
      "widgetDomain": "http://sh.widgets.icoke.com",
      "widgetSecureDomain": "https://sh.widgets.icoke.com"
   },
   {
      "siteDomain": "https://www.coca-cola.com",
      "widgetDomain": "http://sh.widgets.icoke.com",
      "widgetSecureDomain": "https://sh.widgets.icoke.com"
   },
   {
      "siteDomain": "http://preview.coca-cola.com",
      "widgetDomain": "http://vist.widgets.icoke.com",
      "widgetSecureDomain": "https://vist.widgets.icoke.com"
   },
   {
      "siteDomain": "https://preview.coca-cola.com",
      "widgetDomain": "http://vist.widgets.icoke.com",
      "widgetSecureDomain": "https://vist.widgets.icoke.com"
   }
]}

var widgetMetaData = {"widgets": [
   {"widget": {
      "secureViews": [
         "underAgeUser",
         "registerUserStepTwo",
         "confirmation",
         "registerUserStepOne",
         "registerUser"
      ],
      "widgetType": "RegistrationWidget"
   }},
   {"widget": {
      "secureViews": [],
      "widgetType": "PopupWidget"
   }},
   {"widget": {
      "secureViews": [
         "deleteConfirmation",
         "start"
      ],
      "widgetType": "DeleteProfileWidget"
   }},
   {"widget": {
      "secureViews": [
         "confirmation",
         "contactUs"
      ],
      "widgetType": "ContactUsWidget"
   }},
   {"widget": {
      "secureViews": [
         "resetConfirm",
         "start",
         "resetPassword",
         "forgotConfirm"
      ],
      "widgetType": "ForgotResetPasswordWidget"
   }},
   {"widget": {
      "secureViews": [
         "viewPassword",
         "updateEmailAddress",
         "viewGeneralQuesInfo",
         "updatePassword",
         "processConfirmation",
         "viewEmailOptions",
         "updateEmailOptions",
         "updateProfileInfo",
         "updateEntireProfile",
         "viewProfileInfo",
         "viewEntireProfile",
         "updateMobileOptions",
         "viewMobileOptions",
         "confirmEmailAddress",
         "viewEmailAddress",
         "updateGeneralQuesInfo"
      ],
      "widgetType": "ProfileWidget"
   }},
   {"widget": {
      "secureViews": [
         "pagePersistAccessToken",
         "persistAccessToken",
         "authenticate",
         "logout"
      ],
      "widgetType": "FacebookAuthenticationWidget"
   }},
   {"widget": {
      "secureViews": [
         "start",
         "welcome",
         "preLogin",
         "login",
         "postLogin",
         "logout",
         "confirmationRequired",
         "inboundSSO",
         "confirmEmailAddress"
      ],
      "widgetType": "LoginWidget"
   }}
]}

var widgetData = {"widgets": [
   {"widget": {
      "configKey": "d571a4eb72b8d4fc741b186e90ac5cebd92e705bdc8dcb2cb5d93285766d50a4",
      "name": "MyRegistrationWidget_FB",
      "type": "RegistrationWidget"
   }},
   {"widget": {
      "configKey": "d571a4eb72b8d4fc741b186e90ac5cebb7903b9d0b00c6907757bbc70ea55e4f",
      "name": "MyPopupWidget",
      "type": "PopupWidget"
   }},
   {"widget": {
      "configKey": "d571a4eb72b8d4fc741b186e90ac5ceb7e689aa3a3584844e79b8465855f2ea5",
      "name": "MyDeleteProfileWidget",
      "type": "DeleteProfileWidget"
   }},
   {"widget": {
      "configKey": "d571a4eb72b8d4fc741b186e90ac5ceb372d835052d5bf26aaf11ce3d2c52ed0",
      "name": "MyContactUsWidget",
      "type": "ContactUsWidget"
   }},
   {"widget": {
      "configKey": "d571a4eb72b8d4fc741b186e90ac5ceb5d17a7a0a7ea8a2594f627ebb0303c94",
      "name": "MyForgot_V1_Eng",
      "type": "ForgotResetPasswordWidget"
   }},
   {"widget": {
      "configKey": "d571a4eb72b8d4fc741b186e90ac5cebde0edfe92b77618ea4847df3c2dc723c",
      "name": "MyProfile_FB",
      "type": "ProfileWidget"
   }},
   {"widget": {
      "configKey": "d571a4eb72b8d4fc741b186e90ac5ceb9ddf191453b5a8d893beee42b815625e",
      "name": "MyFacebookAuthenticationWidget",
      "type": "FacebookAuthenticationWidget"
   }},
   {"widget": {
      "configKey": "d571a4eb72b8d4fc741b186e90ac5cebf316e5b53961afb905c9c8ed49b20bba",
      "name": "MyLogin_FB",
      "type": "LoginWidget"
   }}
]}


