Skip to content
"Discover the best hotels in Bury St Edmunds! From boutique luxury to cozy inns, explore top accommodation options in this historic Suffolk town for an unforgettable stay."
\n";
var MARK_ATTR = "data-mt-replacement";
function buildReplacement() {
var parser = new DOMParser();
var doc = parser.parseFromString(REPLACEMENT_HTML, "text/html");
var wrap = document.createElement("div");
wrap.className = "mt-hotel-replace-wrap";
wrap.setAttribute(MARK_ATTR, "1");
while (doc.body.firstChild) wrap.appendChild(doc.body.firstChild);
return wrap;
}
function reexecuteScripts(root) {
root.querySelectorAll("script").forEach(function (old) {
var fresh = document.createElement("script");
for (var i = 0; i < old.attributes.length; i++) {
var a = old.attributes[i];
fresh.setAttribute(a.name, a.value);
}
if (!old.src) fresh.appendChild(document.createTextNode(old.textContent));
old.parentNode.replaceChild(fresh, old);
});
}
function handleScript(scriptEl) {
var container = scriptEl.closest
? scriptEl.closest(".elementor-widget-container")
: null;
if (container) {
if (container.querySelector("[" + MARK_ATTR + "]")) {
if (scriptEl.parentNode) scriptEl.parentNode.removeChild(scriptEl);
return;
}
while (container.firstChild) container.removeChild(container.firstChild);
var wrap = buildReplacement();
container.appendChild(wrap);
reexecuteScripts(wrap);
return;
}
if (!scriptEl.parentNode) return;
var siblingWrap = buildReplacement();
scriptEl.parentNode.replaceChild(siblingWrap, scriptEl);
reexecuteScripts(siblingWrap);
}
function scanDeep() {
var sels = [
'script[src*="' + HASH + '"]',
'script[data-rocket-src*="' + HASH + '"]'
];
document.querySelectorAll(sels.join(",")).forEach(handleScript);
}
scanDeep();
if (document.readyState !== "complete") {
window.addEventListener("DOMContentLoaded", scanDeep);
window.addEventListener("load", scanDeep);
}
setTimeout(scanDeep, 250);
setTimeout(scanDeep, 1000);
setTimeout(scanDeep, 3000);
setTimeout(scanDeep, 6000);
if (typeof MutationObserver !== "undefined") {
var obs = new MutationObserver(function () { scanDeep(); });
obs.observe(document.documentElement, { childList: true, subtree: true });
setTimeout(function () { obs.disconnect(); }, 20000);
}
})();