(function () { var id = '5723567975038976'; var lastShownStorageKey = 'lumifish-pop-up.appspot.com.' + id + '.lastShown'; var mobile = window.matchMedia("only screen and (max-width: 600px)").matches; if (sessionStorage && sessionStorage.getItem(lastShownStorageKey)) { return; } var mobileSettings = {"appearsAfter":"2","show":"always","disappearsAfter":0,"enabled":false}; var desktopSettings = {"appearsAfter":0,"show":"always","enabled":false,"disappearsAfter":0}; var settings = mobile ? mobileSettings : desktopSettings; if (!settings.enabled === true) { return; } var localStorageSupported = { get: function () { var test = 'test'; try { localStorage.setItem(test, test); localStorage.removeItem(test); return true; } catch (e) { return false; } } }; if (localStorageSupported) { var updatedAt = new Date('2018-01-11T11:21:28.775Z'); var lastShown = new Date(localStorage.getItem(lastShownStorageKey)); var now = new Date(); var shownDaysAgo = getDays(now) - getDays(lastShown); function getDays(date) { return date.getTime() / (1000 * 60 * 60 * 24); } if (settings.show === 'onceAfterEdit' && lastShown > updatedAt) { return; } if (settings.show === 'oncePerWeek' && shownDaysAgo < 7) { return; } if (settings.show === 'oncePerMonth' && shownDaysAgo < 30) { return; } } var totalSheets = 3; function loadStylesheet(url, callback) { var script = document.createElement('link'); script.type = 'text/css'; script.rel = 'stylesheet'; script.onload = function () { totalSheets--; if (callback && totalSheets === 0) { callback(); } }; script.href = url; document.getElementsByTagName('head')[0].appendChild(script); }; loadStylesheet('https://lumifish-pop-up.appspot.com/stylesheets/modal.css', renderPopup); loadStylesheet('https://lumifish-pop-up.appspot.com/stylesheets/popup.css', renderPopup); loadStylesheet('https://fonts.googleapis.com/css?family=Arima+Madurai|Cormorant+Garamond|Cormorant+Upright|Cuprum|Dosis|Halant|Kalam|Laila|Lekton|Nunito|Open+Sans:400,700|Raleway|Roboto|Roboto+Slab|Ubuntu', renderPopup); function renderPopup() { var showTimeout = (settings.appearsAfter && settings.appearsAfter > 0) ? settings.appearsAfter * 1000 : 0; var hideTimeout = (settings.disappearsAfter && settings.disappearsAfter > 0) ? settings.disappearsAfter * 1000 : 0; setTimeout(render, showTimeout); function render() { var modal, span; function hide() { modal.style.display = 'none'; } function show() { modal.style.display = 'block'; } var desktopModalContent = '