var _____WB$wombat$assign$function_____=function(name){return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name))||self[name];};if(!self.__WB_pmw){self.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{
let window = _____WB$wombat$assign$function_____("window");
let self = _____WB$wombat$assign$function_____("self");
let document = _____WB$wombat$assign$function_____("document");
let location = _____WB$wombat$assign$function_____("location");
let top = _____WB$wombat$assign$function_____("top");
let parent = _____WB$wombat$assign$function_____("parent");
let frames = _____WB$wombat$assign$function_____("frames");
let opens = _____WB$wombat$assign$function_____("opens");
(function (global) {
    if (!Array.prototype.indexOf) {
        Array.prototype.indexOf = function(obj, start) {
            var i, j;
            i = start || 0;
            j = this.length;
            while (i < j) {
                if (this[i] === obj) {
                    return i;
                }
                i++;
            }
            return -1;
        };
    }
    if(!global.Spothopper) { global.Spothopper = {}; };
    var spothopper = global.Spothopper;

    if(!spothopper.processedScripts) { spothopper.processedScripts = []; };
    var processedScripts = spothopper.processedScripts;

    var scriptTags = document.getElementsByTagName('script');
    var thisRequestUrl = 'https://www.spothopperapp.com/spots/509485/widgets/newsletter.js?template=newsletter_widget1';
    for(var i = 0; i < scriptTags.length; i++) {
        var scriptTag = scriptTags[i];
        if (scriptTag.src == thisRequestUrl && processedScripts.indexOf(scriptTag) < 0) {
            processedScripts.push(scriptTag);
            var div = document.createElement('div');
            div.id = 'email_subscription_509485_newsletter_widget1_a8cc3e391c55be000603668d3dcb9c9e';
            div.className = 'spothopper-embeddable';
            scriptTag.parentNode.insertBefore(div, scriptTag);
            div.innerHTML = '<div class="sph-email-subscription">    <div class="sph-email-form">        	<h2>Sign up for our newsletter &amp; get exclusive offers and invites!</h2>        <label for="sph-newsletter-input-a8cc3e391c55be000603668d3dcb9c9e" style="display:block; margin-top:40px; margin-bottom:-10px; text-align: inherit; font-size:medium; font-weight:inherit;">Email (required)</label>        <input class="sph-email-input" id="sph-newsletter-input-a8cc3e391c55be000603668d3dcb9c9e" type="email" placeholder="e.g. email@example.com"  required="required"/>                 <button type="button" class="sph-submit-button  sph-newsletter-widget-1-btn" style="" id="a8cc3e391c55be000603668d3dcb9c9e" onclick="submitEmail(this.id)"><span class="sph-submit-label">Submit</span><span class="sph-loading-img"><img src="assets/widgets/loading.gif" alt="Newsletter loader icon"></span></button>    </div>      <div class="sph-response-message">    </div></div>';
        }
    }
    applyH2ColorToLabelsInWidgets();
})(this);

function applyH2ColorToLabelsInWidgets() {
    var font_color = $('.sph-email-subscription h2:first').css('color');
    var all_labels = document.querySelectorAll('.sph-email-subscription label');
    all_labels.forEach((label) => {
        label.style.color = font_color;
    });
};

function sphRecaptchaWidget1Callback(param) {
  $('.sph-newsletter-widget-1-btn').css('display', 'block');
  $('.sph-newsletter-widget-1-recaptcha').css('display', 'none');
};

function sphRecaptchaWidget2Callback(param) {
  $('.sph-newsletter-widget-2-btn').css('display', 'block');
  $('.sph-newsletter-widget-2-recaptcha').css('display', 'none');
};
}