var inIframe = false; var otherOrigins = ["https://brewcitybites.com", "https://iceats.com", "https://kumenus.com", "https://orderaustin.com", "https://orderbn.com", "https://orderindy.com", "https://orderithaca.com", "https://orderlexington.com", "https://orderoshkosh.com", "https://orderpitt.com", "https://orderrichmond.com", "https://orderslc.com", "https://ordertucson.com", "https://orderwilmington.com", "https://statebites.com", "https://twincitybites.com", "https://orderkzoo.com", "https://ordereauclaire.com", "https://uorderapi.com"], eatstreetOrigin = "https://eatstreet.com"; function resizeIframe(a) { if (!inIframe) { document.getElementById("restmenu").style.height = a + "px" } } handleSizingResponse = function(a) { if (a.origin == "https://madbites.com" || a.origin == "https://brewcitybites.com" || a.origin == "https://iceats.com" || a.origin == "https://kumenus.com" || a.origin == "https://orderaustin.com" || a.origin == "https://orderbn.com" || a.origin == "https://orderindy.com" || a.origin == "https://orderithaca.com" || a.origin == "https://orderlexington.com" || a.origin == "https://orderoshkosh.com" || a.origin == "https://orderpitt.com" || a.origin == "https://orderrichmond.com" || a.origin == "https://orderslc.com" || a.origin == "https://ordertucson.com" || a.origin == "https://orderwilmington.com" || a.origin == "https://statebites.com" || a.origin == "https://twincitybites.com" || a.origin == "https://orderkzoo.com" || a.origin == "https://ordereauclaire.com" || a.origin == "https://uorderapi.com" || a.origin == "https://eatstreet.com") { if (a.data == "top") { scrollTo(0, document.getElementById("restmenu").offsetTop - 10) } else { resizeIframe(Math.max(parseInt(a.data), 650)); } } }; var loadIframeJSFromRedesign = function() { var newScript = document.createElement('script'), oldIframe = document.getElementById('restmenu'); oldIframe.onLoad = function() {}; oldIframe.id = 'eatstreet-iframe'; for (var i = 0; i < otherOrigins.length; i++) { if (oldIframe.src.indexOf(otherOrigins[i]) > -1) { oldIframe.src = oldIframe.src.replace(otherOrigins[i], eatstreetOrigin); break; } } if (navigator.appVersion.indexOf("MSIE") != -1) { window.detachEvent('onmessage', handleSizingResponse); } else { window.removeEventListener("message", handleSizingResponse); } newScript.setAttribute('type', 'text/javascript'); newScript.setAttribute('src', 'https://eatstreet.com/redesign/js/iframeParent.js'); document.head.appendChild(newScript); var loadingGraphicElement = document.getElementById('loadingGraphic'); if (loadingGraphicElement) { loadingGraphicElement.parentNode.removeChild(loadingGraphicElement); } }; function initialize() { if (document.getElementById("restmenu")) { var restMenuElement = document.getElementById("restmenu"); var loadingGraphic = document.createElement('div'); loadingGraphic.setAttribute('id', "loadingGraphic"); loadingGraphic.style.cssText = "padding: 10px; border-radius: 5px; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-color: #E5E5E5 #DBDBDB #D2D2D2; border-style: solid; border-width: 1px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); width: 596px;height:700px;background:white;margin-left:auto;margin-right:auto;"; loadingGraphic.innerHTML = "