(function () {
function getDocumentHead() {
return document.getElementsByTagName('head')[0];
}
function addEmbeddedScript(url) {
var head = getDocumentHead();
var script = document.createElement('script');
script.crossorigin = '';
script.defer = 'defer';
script.src = url;
script.type = 'text/javascript';
head.appendChild(script);
}
function addEmbeddedCss(url) {
var head = getDocumentHead();
var style = document.createElement('link');
style.crossorigin = '';
style.href = url;
style.type = 'text/css';
style.rel = 'stylesheet';
head.appendChild(style);
}
function initBookingBoxRoot(configUrl) {
var root = document.getElementById('bookingbox-root');
if (!root) {
return;
}
root.setAttribute('data-url', configUrl);
root.setAttribute('data-mode', 'embedded');
}
initBookingBoxRoot("https://api.promabox.com/booking-engine/penzion-tatra/sk/config");
addEmbeddedCss("https://apps.promabox.com/bookingbox/static/css/main.57c97970.css");
addEmbeddedScript("https://apps.promabox.com/bookingbox/static/js/main.312291ef.js");
})();