(function (window, _shoprunner_com) {
    window._shoprunner_com = _shoprunner_com || {};
   /* -----------------------------------------
    * SR Configuration
    * -----------------------------------------
    */

    _shoprunner_com.version = 3.0;

    /* -------------------------------------- */
    /* DO NOT MODIFY ANYTHING BELOW THIS LINE */
    /* -------------------------------------- */

    if (_shoprunner_com.enabled) {
        _shoprunner_com.prefix = window.parent.document.location.protocol + '//';
        _shoprunner_com.sr_jsContentURL = _shoprunner_com.prefix + window.ShopRunnerResources.SHOPRUNNER_STAGING_CONTENT;

        if (_shoprunner_com.environmentID === 2) {
            _shoprunner_com.sr_jsContentURL = _shoprunner_com.prefix + window.ShopRunnerResources.SHOPRUNNER_CONTENT_URL;
        }

        var sr_CSS_URL = _shoprunner_com.sr_jsContentURL + '/' + _shoprunner_com.retailerID + '.css';
        var sr_js_content_el_URL = _shoprunner_com.sr_jsContentURL + '/' + _shoprunner_com.retailerID + '.js';

        setTimeout(function () {
            var a = document.createElement('link');
            a.href = sr_CSS_URL;
            a.type = 'text/css';
            a.rel = 'stylesheet';
            document.getElementsByTagName('head')[0].appendChild(a);
            var b = document.createElement('script');
            b.src = sr_js_content_el_URL;
            b.type = 'text/javascript';
            document.getElementsByTagName('head')[0].appendChild(b);
        }, 1);
    }

    _shoprunner_com.docReady = false;

    _shoprunner_com.dom_loaded = function () {
        _shoprunner_com.docReady = true;
    };

    if (document.addEventListener) {
        document.addEventListener('DOMContentLoaded', _shoprunner_com.dom_loaded, false);
    } else {
        if (document.attachEvent) {
            document.attachEvent('onreadystatechange', _shoprunner_com.dom_loaded);
        }
    }

    if (window.addEventListener) {
        window.addEventListener('load', _shoprunner_com.dom_loaded, false);
    } else {
        if (window.attachEvent) {
            var r = window.attachEvent('onload', _shoprunner_com.dom_loaded);
        }
    }
}(window, _shoprunner_com));