Number of Guests
Sleeps up to 14 guests
−
14
+
Host Accommodation:
Add dates
Departure Cleaning & Linen:
$280.00 CAD
Direct Booking Advantage:
Save ~15% ($0 platform fee)
TVQ / QST (9.975%):
$0.00 CAD
TPS / GST (5%):
$0.00 CAD
Lodging Tax (3.5%):
$0.00 CAD
Estimated Total (CAD):
Add dates
✦ 100% Host Transparency: Rates reflect Hostaway live calendar. Zero surprise booking markups at checkout.
Reserve Direct →
From $290
/ nt
★ 4.8 (0 +)
Add dates for exact seasonal quote
View price breakdown ▾
Select Dates →
Chalet MYSA
Photo 1 of 45
Use Arrow Keys or ESC
Chalet MYSA • Scandinavian Mountain Retreat • High-Resolution Gallery (45 Photos)
+ avgRate.toLocaleString(lbvIsFr ? 'fr-CA' : 'en-CA');
if (priceCurrency) priceCurrency.innerText = 'CAD';
if (priceSubtitle) priceSubtitle.innerHTML = '
setInterval(checkAndCalculateDates, 350);
// 12. DIRECT CHECKOUT ROUTING (Guarantees zero drop-off of dates & guests)
window.lbvGoToCheckout = function() {
if (!selectedCheckInIso || !selectedCheckOutIso) {
window.lbvOpenCalendarModal();
updateMinStayNotice('initial');
return;
}
var minStay = getMinStayForCheckIn(selectedCheckInIso);
var dIn = new Date(selectedCheckInIso + 'T12:00:00');
var dOut = new Date(selectedCheckOutIso + 'T12:00:00');
var nights = Math.round((dOut - dIn) / (1000 * 60 * 60 * 24));
if (nights < minStay) {
window.lbvOpenCalendarModal();
updateMinStayNotice('violation', minStay, nights, selectedCheckInIso, selectedCheckOutIso);
return;
}
var checkoutUrl = 'https://book.chaletslabellevie.ca/checkout/' + lbvChaletHostawayId + '?start=' + selectedCheckInIso + '&end=' + selectedCheckOutIso + '&numberOfGuests=' + currentGuests;
window.location.href = checkoutUrl;
};
window.lbvHandleMainCta = function() { window.lbvGoToCheckout(); };
window.lbvHandleMobileCta = function() { window.lbvGoToCheckout(); };
// 13. INTERCEPT HOSTAWAy NATIVE WIDGET BUTTON WITH CAPTURE PHASE
function setupHostawayWidgetInterceptor() {
var calEl = document.getElementById('hostaway-calendar-widget');
if (!calEl) return;
calEl.addEventListener('click', function(e) {
var btn = e.target.closest('button');
if (btn && btn.textContent && /Reserve|Book|Réserver/i.test(btn.textContent)) {
e.preventDefault();
e.stopPropagation();
e.stopImmediatePropagation();
checkAndCalculateDates(true);
window.lbvGoToCheckout();
return false;
}
}, true);
}
setupHostawayWidgetInterceptor();
// 14. SMOOTH SCROLL TO INQUIRY CONTACT FORM
window.lbvScrollToInquiryForm = function(e) {
if (e && e.preventDefault) e.preventDefault();
var formSec = document.getElementById('Inquiry') || document.querySelector('.elementor-widget-form');
if (formSec) {
formSec.scrollIntoView({ behavior: 'smooth', block: 'start' });
setTimeout(function() {
var firstInput = formSec.querySelector('input[name*="name"], input[type="text"], input');
if (firstInput) {
firstInput.focus({ preventScroll: true });
}
}, 500);
}
};
// 14. DEDICATED LANGUAGE SWITCHER ENHANCER (Mobile & Desktop)
(function initLanguageSwitcherEnhancer() {
function enhanceSwitcher() {
var isFr = window.location.pathname.indexOf('/fr/') !== -1;
var targetUrl = isFr ? 'https://chaletslabellevie.ca/chalet-mysa-spa-porch-firepit/' : 'https://chaletslabellevie.ca/fr/chalet-mysa-spa-veranda-foyer/';
// A. Direct navigation on header switcher links
var headerLinks = document.querySelectorAll('header.elementor-location-header .cpel-switcher__lang:not(.cpel-switcher__lang--active) a, header.elementor-location-header .elementor-widget-polylang-language-switcher a');
headerLinks.forEach(function(a) {
var txt = (a.textContent || '').trim().toUpperCase();
if ((!isFr && txt.indexOf('FR') !== -1) || (isFr && txt.indexOf('EN') !== -1)) {
a.setAttribute('href', targetUrl);
a.onclick = function(e) {
e.preventDefault();
window.location.href = targetUrl;
};
}
});
// B. Inject language switcher into mobile hamburger menu
var mobileMenus = document.querySelectorAll('header.elementor-location-header .elementor-nav-menu--dropdown ul.elementor-nav-menu');
mobileMenus.forEach(function(menu) {
if (!menu.querySelector('.lbv-mobile-lang-item')) {
var li = document.createElement('li');
li.className = 'menu-item lbv-mobile-lang-item';
li.style.cssText = 'border-top: 1px solid rgba(214,169,117,0.3) !important; margin: 12px 14px 6px 14px !important; padding-top: 10px !important; list-style: none !important;';
var badge = isFr ? 'EN' : 'FR';
li.innerHTML = '' +
'' + (isFr ? '🇬🇧 Switch to English' : ' Passer au Français') + ' ' +
'' + badge + ' ' +
' ';
var link = li.querySelector('a');
if (link) {
link.onclick = function(e) {
e.preventDefault();
window.location.href = targetUrl;
};
}
menu.appendChild(li);
}
});
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', enhanceSwitcher);
} else {
enhanceSwitcher();
}
setTimeout(enhanceSwitcher, 500);
setTimeout(enhanceSwitcher, 1500);
setTimeout(enhanceSwitcher, 3000);
})();
})();
+ baseVal.toLocaleString(lbvIsFr ? 'fr-CA' : 'en-CA') + ' CAD ' + (lbvIsFr ? 'total pour ' + nights + ' nuits' : 'total for ' + nights + (nights === 1 ? ' night' : ' nights'));
if (priceTaxLine) priceTaxLine.innerText = '+ ' + (lbvIsFr ? (Math.round(totalTax).toLocaleString('fr-CA') + ' $ taxes (TPS/TVQ)') : ('
setInterval(checkAndCalculateDates, 350);
// 12. DIRECT CHECKOUT ROUTING (Guarantees zero drop-off of dates & guests)
window.lbvGoToCheckout = function() {
if (!selectedCheckInIso || !selectedCheckOutIso) {
window.lbvOpenCalendarModal();
updateMinStayNotice('initial');
return;
}
var minStay = getMinStayForCheckIn(selectedCheckInIso);
var dIn = new Date(selectedCheckInIso + 'T12:00:00');
var dOut = new Date(selectedCheckOutIso + 'T12:00:00');
var nights = Math.round((dOut - dIn) / (1000 * 60 * 60 * 24));
if (nights < minStay) {
window.lbvOpenCalendarModal();
updateMinStayNotice('violation', minStay, nights, selectedCheckInIso, selectedCheckOutIso);
return;
}
var checkoutUrl = 'https://book.chaletslabellevie.ca/checkout/' + lbvChaletHostawayId + '?start=' + selectedCheckInIso + '&end=' + selectedCheckOutIso + '&numberOfGuests=' + currentGuests;
window.location.href = checkoutUrl;
};
window.lbvHandleMainCta = function() { window.lbvGoToCheckout(); };
window.lbvHandleMobileCta = function() { window.lbvGoToCheckout(); };
// 13. INTERCEPT HOSTAWAy NATIVE WIDGET BUTTON WITH CAPTURE PHASE
function setupHostawayWidgetInterceptor() {
var calEl = document.getElementById('hostaway-calendar-widget');
if (!calEl) return;
calEl.addEventListener('click', function(e) {
var btn = e.target.closest('button');
if (btn && btn.textContent && /Reserve|Book|Réserver/i.test(btn.textContent)) {
e.preventDefault();
e.stopPropagation();
e.stopImmediatePropagation();
checkAndCalculateDates(true);
window.lbvGoToCheckout();
return false;
}
}, true);
}
setupHostawayWidgetInterceptor();
// 14. SMOOTH SCROLL TO INQUIRY CONTACT FORM
window.lbvScrollToInquiryForm = function(e) {
if (e && e.preventDefault) e.preventDefault();
var formSec = document.getElementById('Inquiry') || document.querySelector('.elementor-widget-form');
if (formSec) {
formSec.scrollIntoView({ behavior: 'smooth', block: 'start' });
setTimeout(function() {
var firstInput = formSec.querySelector('input[name*="name"], input[type="text"], input');
if (firstInput) {
firstInput.focus({ preventScroll: true });
}
}, 500);
}
};
// 14. DEDICATED LANGUAGE SWITCHER ENHANCER (Mobile & Desktop)
(function initLanguageSwitcherEnhancer() {
function enhanceSwitcher() {
var isFr = window.location.pathname.indexOf('/fr/') !== -1;
var targetUrl = isFr ? 'https://chaletslabellevie.ca/chalet-mysa-spa-porch-firepit/' : 'https://chaletslabellevie.ca/fr/chalet-mysa-spa-veranda-foyer/';
// A. Direct navigation on header switcher links
var headerLinks = document.querySelectorAll('header.elementor-location-header .cpel-switcher__lang:not(.cpel-switcher__lang--active) a, header.elementor-location-header .elementor-widget-polylang-language-switcher a');
headerLinks.forEach(function(a) {
var txt = (a.textContent || '').trim().toUpperCase();
if ((!isFr && txt.indexOf('FR') !== -1) || (isFr && txt.indexOf('EN') !== -1)) {
a.setAttribute('href', targetUrl);
a.onclick = function(e) {
e.preventDefault();
window.location.href = targetUrl;
};
}
});
// B. Inject language switcher into mobile hamburger menu
var mobileMenus = document.querySelectorAll('header.elementor-location-header .elementor-nav-menu--dropdown ul.elementor-nav-menu');
mobileMenus.forEach(function(menu) {
if (!menu.querySelector('.lbv-mobile-lang-item')) {
var li = document.createElement('li');
li.className = 'menu-item lbv-mobile-lang-item';
li.style.cssText = 'border-top: 1px solid rgba(214,169,117,0.3) !important; margin: 12px 14px 6px 14px !important; padding-top: 10px !important; list-style: none !important;';
var badge = isFr ? 'EN' : 'FR';
li.innerHTML = '
' +
'' + (isFr ? '🇬🇧 Switch to English' : ' Passer au Français') + ' ' +
'' + badge + ' ' +
' ';
var link = li.querySelector('a');
if (link) {
link.onclick = function(e) {
e.preventDefault();
window.location.href = targetUrl;
};
}
menu.appendChild(li);
}
});
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', enhanceSwitcher);
} else {
enhanceSwitcher();
}
setTimeout(enhanceSwitcher, 500);
setTimeout(enhanceSwitcher, 1500);
setTimeout(enhanceSwitcher, 3000);
})();
})();
+ Math.round(totalTax).toLocaleString('en-CA') + ' taxes (GST/QST)'));
if (costPill) costPill.innerText = ' ~
setInterval(checkAndCalculateDates, 350);
// 12. DIRECT CHECKOUT ROUTING (Guarantees zero drop-off of dates & guests)
window.lbvGoToCheckout = function() {
if (!selectedCheckInIso || !selectedCheckOutIso) {
window.lbvOpenCalendarModal();
updateMinStayNotice('initial');
return;
}
var minStay = getMinStayForCheckIn(selectedCheckInIso);
var dIn = new Date(selectedCheckInIso + 'T12:00:00');
var dOut = new Date(selectedCheckOutIso + 'T12:00:00');
var nights = Math.round((dOut - dIn) / (1000 * 60 * 60 * 24));
if (nights < minStay) {
window.lbvOpenCalendarModal();
updateMinStayNotice('violation', minStay, nights, selectedCheckInIso, selectedCheckOutIso);
return;
}
var checkoutUrl = 'https://book.chaletslabellevie.ca/checkout/' + lbvChaletHostawayId + '?start=' + selectedCheckInIso + '&end=' + selectedCheckOutIso + '&numberOfGuests=' + currentGuests;
window.location.href = checkoutUrl;
};
window.lbvHandleMainCta = function() { window.lbvGoToCheckout(); };
window.lbvHandleMobileCta = function() { window.lbvGoToCheckout(); };
// 13. INTERCEPT HOSTAWAy NATIVE WIDGET BUTTON WITH CAPTURE PHASE
function setupHostawayWidgetInterceptor() {
var calEl = document.getElementById('hostaway-calendar-widget');
if (!calEl) return;
calEl.addEventListener('click', function(e) {
var btn = e.target.closest('button');
if (btn && btn.textContent && /Reserve|Book|Réserver/i.test(btn.textContent)) {
e.preventDefault();
e.stopPropagation();
e.stopImmediatePropagation();
checkAndCalculateDates(true);
window.lbvGoToCheckout();
return false;
}
}, true);
}
setupHostawayWidgetInterceptor();
// 14. SMOOTH SCROLL TO INQUIRY CONTACT FORM
window.lbvScrollToInquiryForm = function(e) {
if (e && e.preventDefault) e.preventDefault();
var formSec = document.getElementById('Inquiry') || document.querySelector('.elementor-widget-form');
if (formSec) {
formSec.scrollIntoView({ behavior: 'smooth', block: 'start' });
setTimeout(function() {
var firstInput = formSec.querySelector('input[name*="name"], input[type="text"], input');
if (firstInput) {
firstInput.focus({ preventScroll: true });
}
}, 500);
}
};
// 14. DEDICATED LANGUAGE SWITCHER ENHANCER (Mobile & Desktop)
(function initLanguageSwitcherEnhancer() {
function enhanceSwitcher() {
var isFr = window.location.pathname.indexOf('/fr/') !== -1;
var targetUrl = isFr ? 'https://chaletslabellevie.ca/chalet-mysa-spa-porch-firepit/' : 'https://chaletslabellevie.ca/fr/chalet-mysa-spa-veranda-foyer/';
// A. Direct navigation on header switcher links
var headerLinks = document.querySelectorAll('header.elementor-location-header .cpel-switcher__lang:not(.cpel-switcher__lang--active) a, header.elementor-location-header .elementor-widget-polylang-language-switcher a');
headerLinks.forEach(function(a) {
var txt = (a.textContent || '').trim().toUpperCase();
if ((!isFr && txt.indexOf('FR') !== -1) || (isFr && txt.indexOf('EN') !== -1)) {
a.setAttribute('href', targetUrl);
a.onclick = function(e) {
e.preventDefault();
window.location.href = targetUrl;
};
}
});
// B. Inject language switcher into mobile hamburger menu
var mobileMenus = document.querySelectorAll('header.elementor-location-header .elementor-nav-menu--dropdown ul.elementor-nav-menu');
mobileMenus.forEach(function(menu) {
if (!menu.querySelector('.lbv-mobile-lang-item')) {
var li = document.createElement('li');
li.className = 'menu-item lbv-mobile-lang-item';
li.style.cssText = 'border-top: 1px solid rgba(214,169,117,0.3) !important; margin: 12px 14px 6px 14px !important; padding-top: 10px !important; list-style: none !important;';
var badge = isFr ? 'EN' : 'FR';
li.innerHTML = '
' +
'' + (isFr ? '🇬🇧 Switch to English' : ' Passer au Français') + ' ' +
'' + badge + ' ' +
' ';
var link = li.querySelector('a');
if (link) {
link.onclick = function(e) {
e.preventDefault();
window.location.href = targetUrl;
};
}
menu.appendChild(li);
}
});
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', enhanceSwitcher);
} else {
enhanceSwitcher();
}
setTimeout(enhanceSwitcher, 500);
setTimeout(enhanceSwitcher, 1500);
setTimeout(enhanceSwitcher, 3000);
})();
})();
+ Math.round(total / guests) + ' CAD / ' + (lbvIsFr ? 'invité' : 'guest') + ' (' + guests + ' ' + (lbvIsFr ? 'invités' : 'guests') + ')';
if (ctaText) ctaText.innerText = (lbvIsFr ? 'Réserver en direct •
setInterval(checkAndCalculateDates, 350);
// 12. DIRECT CHECKOUT ROUTING (Guarantees zero drop-off of dates & guests)
window.lbvGoToCheckout = function() {
if (!selectedCheckInIso || !selectedCheckOutIso) {
window.lbvOpenCalendarModal();
updateMinStayNotice('initial');
return;
}
var minStay = getMinStayForCheckIn(selectedCheckInIso);
var dIn = new Date(selectedCheckInIso + 'T12:00:00');
var dOut = new Date(selectedCheckOutIso + 'T12:00:00');
var nights = Math.round((dOut - dIn) / (1000 * 60 * 60 * 24));
if (nights < minStay) {
window.lbvOpenCalendarModal();
updateMinStayNotice('violation', minStay, nights, selectedCheckInIso, selectedCheckOutIso);
return;
}
var checkoutUrl = 'https://book.chaletslabellevie.ca/checkout/' + lbvChaletHostawayId + '?start=' + selectedCheckInIso + '&end=' + selectedCheckOutIso + '&numberOfGuests=' + currentGuests;
window.location.href = checkoutUrl;
};
window.lbvHandleMainCta = function() { window.lbvGoToCheckout(); };
window.lbvHandleMobileCta = function() { window.lbvGoToCheckout(); };
// 13. INTERCEPT HOSTAWAy NATIVE WIDGET BUTTON WITH CAPTURE PHASE
function setupHostawayWidgetInterceptor() {
var calEl = document.getElementById('hostaway-calendar-widget');
if (!calEl) return;
calEl.addEventListener('click', function(e) {
var btn = e.target.closest('button');
if (btn && btn.textContent && /Reserve|Book|Réserver/i.test(btn.textContent)) {
e.preventDefault();
e.stopPropagation();
e.stopImmediatePropagation();
checkAndCalculateDates(true);
window.lbvGoToCheckout();
return false;
}
}, true);
}
setupHostawayWidgetInterceptor();
// 14. SMOOTH SCROLL TO INQUIRY CONTACT FORM
window.lbvScrollToInquiryForm = function(e) {
if (e && e.preventDefault) e.preventDefault();
var formSec = document.getElementById('Inquiry') || document.querySelector('.elementor-widget-form');
if (formSec) {
formSec.scrollIntoView({ behavior: 'smooth', block: 'start' });
setTimeout(function() {
var firstInput = formSec.querySelector('input[name*="name"], input[type="text"], input');
if (firstInput) {
firstInput.focus({ preventScroll: true });
}
}, 500);
}
};
// 14. DEDICATED LANGUAGE SWITCHER ENHANCER (Mobile & Desktop)
(function initLanguageSwitcherEnhancer() {
function enhanceSwitcher() {
var isFr = window.location.pathname.indexOf('/fr/') !== -1;
var targetUrl = isFr ? 'https://chaletslabellevie.ca/chalet-mysa-spa-porch-firepit/' : 'https://chaletslabellevie.ca/fr/chalet-mysa-spa-veranda-foyer/';
// A. Direct navigation on header switcher links
var headerLinks = document.querySelectorAll('header.elementor-location-header .cpel-switcher__lang:not(.cpel-switcher__lang--active) a, header.elementor-location-header .elementor-widget-polylang-language-switcher a');
headerLinks.forEach(function(a) {
var txt = (a.textContent || '').trim().toUpperCase();
if ((!isFr && txt.indexOf('FR') !== -1) || (isFr && txt.indexOf('EN') !== -1)) {
a.setAttribute('href', targetUrl);
a.onclick = function(e) {
e.preventDefault();
window.location.href = targetUrl;
};
}
});
// B. Inject language switcher into mobile hamburger menu
var mobileMenus = document.querySelectorAll('header.elementor-location-header .elementor-nav-menu--dropdown ul.elementor-nav-menu');
mobileMenus.forEach(function(menu) {
if (!menu.querySelector('.lbv-mobile-lang-item')) {
var li = document.createElement('li');
li.className = 'menu-item lbv-mobile-lang-item';
li.style.cssText = 'border-top: 1px solid rgba(214,169,117,0.3) !important; margin: 12px 14px 6px 14px !important; padding-top: 10px !important; list-style: none !important;';
var badge = isFr ? 'EN' : 'FR';
li.innerHTML = '
' +
'' + (isFr ? '🇬🇧 Switch to English' : ' Passer au Français') + ' ' +
'' + badge + ' ' +
' ';
var link = li.querySelector('a');
if (link) {
link.onclick = function(e) {
e.preventDefault();
window.location.href = targetUrl;
};
}
menu.appendChild(li);
}
});
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', enhanceSwitcher);
} else {
enhanceSwitcher();
}
setTimeout(enhanceSwitcher, 500);
setTimeout(enhanceSwitcher, 1500);
setTimeout(enhanceSwitcher, 3000);
})();
})();
: 'Reserve Direct •
setInterval(checkAndCalculateDates, 350);
// 12. DIRECT CHECKOUT ROUTING (Guarantees zero drop-off of dates & guests)
window.lbvGoToCheckout = function() {
if (!selectedCheckInIso || !selectedCheckOutIso) {
window.lbvOpenCalendarModal();
updateMinStayNotice('initial');
return;
}
var minStay = getMinStayForCheckIn(selectedCheckInIso);
var dIn = new Date(selectedCheckInIso + 'T12:00:00');
var dOut = new Date(selectedCheckOutIso + 'T12:00:00');
var nights = Math.round((dOut - dIn) / (1000 * 60 * 60 * 24));
if (nights < minStay) {
window.lbvOpenCalendarModal();
updateMinStayNotice('violation', minStay, nights, selectedCheckInIso, selectedCheckOutIso);
return;
}
var checkoutUrl = 'https://book.chaletslabellevie.ca/checkout/' + lbvChaletHostawayId + '?start=' + selectedCheckInIso + '&end=' + selectedCheckOutIso + '&numberOfGuests=' + currentGuests;
window.location.href = checkoutUrl;
};
window.lbvHandleMainCta = function() { window.lbvGoToCheckout(); };
window.lbvHandleMobileCta = function() { window.lbvGoToCheckout(); };
// 13. INTERCEPT HOSTAWAy NATIVE WIDGET BUTTON WITH CAPTURE PHASE
function setupHostawayWidgetInterceptor() {
var calEl = document.getElementById('hostaway-calendar-widget');
if (!calEl) return;
calEl.addEventListener('click', function(e) {
var btn = e.target.closest('button');
if (btn && btn.textContent && /Reserve|Book|Réserver/i.test(btn.textContent)) {
e.preventDefault();
e.stopPropagation();
e.stopImmediatePropagation();
checkAndCalculateDates(true);
window.lbvGoToCheckout();
return false;
}
}, true);
}
setupHostawayWidgetInterceptor();
// 14. SMOOTH SCROLL TO INQUIRY CONTACT FORM
window.lbvScrollToInquiryForm = function(e) {
if (e && e.preventDefault) e.preventDefault();
var formSec = document.getElementById('Inquiry') || document.querySelector('.elementor-widget-form');
if (formSec) {
formSec.scrollIntoView({ behavior: 'smooth', block: 'start' });
setTimeout(function() {
var firstInput = formSec.querySelector('input[name*="name"], input[type="text"], input');
if (firstInput) {
firstInput.focus({ preventScroll: true });
}
}, 500);
}
};
// 14. DEDICATED LANGUAGE SWITCHER ENHANCER (Mobile & Desktop)
(function initLanguageSwitcherEnhancer() {
function enhanceSwitcher() {
var isFr = window.location.pathname.indexOf('/fr/') !== -1;
var targetUrl = isFr ? 'https://chaletslabellevie.ca/chalet-mysa-spa-porch-firepit/' : 'https://chaletslabellevie.ca/fr/chalet-mysa-spa-veranda-foyer/';
// A. Direct navigation on header switcher links
var headerLinks = document.querySelectorAll('header.elementor-location-header .cpel-switcher__lang:not(.cpel-switcher__lang--active) a, header.elementor-location-header .elementor-widget-polylang-language-switcher a');
headerLinks.forEach(function(a) {
var txt = (a.textContent || '').trim().toUpperCase();
if ((!isFr && txt.indexOf('FR') !== -1) || (isFr && txt.indexOf('EN') !== -1)) {
a.setAttribute('href', targetUrl);
a.onclick = function(e) {
e.preventDefault();
window.location.href = targetUrl;
};
}
});
// B. Inject language switcher into mobile hamburger menu
var mobileMenus = document.querySelectorAll('header.elementor-location-header .elementor-nav-menu--dropdown ul.elementor-nav-menu');
mobileMenus.forEach(function(menu) {
if (!menu.querySelector('.lbv-mobile-lang-item')) {
var li = document.createElement('li');
li.className = 'menu-item lbv-mobile-lang-item';
li.style.cssText = 'border-top: 1px solid rgba(214,169,117,0.3) !important; margin: 12px 14px 6px 14px !important; padding-top: 10px !important; list-style: none !important;';
var badge = isFr ? 'EN' : 'FR';
li.innerHTML = '
' +
'' + (isFr ? '🇬🇧 Switch to English' : ' Passer au Français') + ' ' +
'' + badge + ' ' +
' ';
var link = li.querySelector('a');
if (link) {
link.onclick = function(e) {
e.preventDefault();
window.location.href = targetUrl;
};
}
menu.appendChild(li);
}
});
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', enhanceSwitcher);
} else {
enhanceSwitcher();
}
setTimeout(enhanceSwitcher, 500);
setTimeout(enhanceSwitcher, 1500);
setTimeout(enhanceSwitcher, 3000);
})();
})();
) + Math.round(total).toLocaleString('en-CA') + ' CAD →';
if (panelRateLabel) panelRateLabel.innerText = '
setInterval(checkAndCalculateDates, 350);
// 12. DIRECT CHECKOUT ROUTING (Guarantees zero drop-off of dates & guests)
window.lbvGoToCheckout = function() {
if (!selectedCheckInIso || !selectedCheckOutIso) {
window.lbvOpenCalendarModal();
updateMinStayNotice('initial');
return;
}
var minStay = getMinStayForCheckIn(selectedCheckInIso);
var dIn = new Date(selectedCheckInIso + 'T12:00:00');
var dOut = new Date(selectedCheckOutIso + 'T12:00:00');
var nights = Math.round((dOut - dIn) / (1000 * 60 * 60 * 24));
if (nights < minStay) {
window.lbvOpenCalendarModal();
updateMinStayNotice('violation', minStay, nights, selectedCheckInIso, selectedCheckOutIso);
return;
}
var checkoutUrl = 'https://book.chaletslabellevie.ca/checkout/' + lbvChaletHostawayId + '?start=' + selectedCheckInIso + '&end=' + selectedCheckOutIso + '&numberOfGuests=' + currentGuests;
window.location.href = checkoutUrl;
};
window.lbvHandleMainCta = function() { window.lbvGoToCheckout(); };
window.lbvHandleMobileCta = function() { window.lbvGoToCheckout(); };
// 13. INTERCEPT HOSTAWAy NATIVE WIDGET BUTTON WITH CAPTURE PHASE
function setupHostawayWidgetInterceptor() {
var calEl = document.getElementById('hostaway-calendar-widget');
if (!calEl) return;
calEl.addEventListener('click', function(e) {
var btn = e.target.closest('button');
if (btn && btn.textContent && /Reserve|Book|Réserver/i.test(btn.textContent)) {
e.preventDefault();
e.stopPropagation();
e.stopImmediatePropagation();
checkAndCalculateDates(true);
window.lbvGoToCheckout();
return false;
}
}, true);
}
setupHostawayWidgetInterceptor();
// 14. SMOOTH SCROLL TO INQUIRY CONTACT FORM
window.lbvScrollToInquiryForm = function(e) {
if (e && e.preventDefault) e.preventDefault();
var formSec = document.getElementById('Inquiry') || document.querySelector('.elementor-widget-form');
if (formSec) {
formSec.scrollIntoView({ behavior: 'smooth', block: 'start' });
setTimeout(function() {
var firstInput = formSec.querySelector('input[name*="name"], input[type="text"], input');
if (firstInput) {
firstInput.focus({ preventScroll: true });
}
}, 500);
}
};
// 14. DEDICATED LANGUAGE SWITCHER ENHANCER (Mobile & Desktop)
(function initLanguageSwitcherEnhancer() {
function enhanceSwitcher() {
var isFr = window.location.pathname.indexOf('/fr/') !== -1;
var targetUrl = isFr ? 'https://chaletslabellevie.ca/chalet-mysa-spa-porch-firepit/' : 'https://chaletslabellevie.ca/fr/chalet-mysa-spa-veranda-foyer/';
// A. Direct navigation on header switcher links
var headerLinks = document.querySelectorAll('header.elementor-location-header .cpel-switcher__lang:not(.cpel-switcher__lang--active) a, header.elementor-location-header .elementor-widget-polylang-language-switcher a');
headerLinks.forEach(function(a) {
var txt = (a.textContent || '').trim().toUpperCase();
if ((!isFr && txt.indexOf('FR') !== -1) || (isFr && txt.indexOf('EN') !== -1)) {
a.setAttribute('href', targetUrl);
a.onclick = function(e) {
e.preventDefault();
window.location.href = targetUrl;
};
}
});
// B. Inject language switcher into mobile hamburger menu
var mobileMenus = document.querySelectorAll('header.elementor-location-header .elementor-nav-menu--dropdown ul.elementor-nav-menu');
mobileMenus.forEach(function(menu) {
if (!menu.querySelector('.lbv-mobile-lang-item')) {
var li = document.createElement('li');
li.className = 'menu-item lbv-mobile-lang-item';
li.style.cssText = 'border-top: 1px solid rgba(214,169,117,0.3) !important; margin: 12px 14px 6px 14px !important; padding-top: 10px !important; list-style: none !important;';
var badge = isFr ? 'EN' : 'FR';
li.innerHTML = '
' +
'' + (isFr ? '🇬🇧 Switch to English' : ' Passer au Français') + ' ' +
'' + badge + ' ' +
' ';
var link = li.querySelector('a');
if (link) {
link.onclick = function(e) {
e.preventDefault();
window.location.href = targetUrl;
};
}
menu.appendChild(li);
}
});
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', enhanceSwitcher);
} else {
enhanceSwitcher();
}
setTimeout(enhanceSwitcher, 500);
setTimeout(enhanceSwitcher, 1500);
setTimeout(enhanceSwitcher, 3000);
})();
})();
+ baseVal.toLocaleString(lbvIsFr ? 'fr-CA' : 'en-CA') + ' CAD (
setInterval(checkAndCalculateDates, 350);
// 12. DIRECT CHECKOUT ROUTING (Guarantees zero drop-off of dates & guests)
window.lbvGoToCheckout = function() {
if (!selectedCheckInIso || !selectedCheckOutIso) {
window.lbvOpenCalendarModal();
updateMinStayNotice('initial');
return;
}
var minStay = getMinStayForCheckIn(selectedCheckInIso);
var dIn = new Date(selectedCheckInIso + 'T12:00:00');
var dOut = new Date(selectedCheckOutIso + 'T12:00:00');
var nights = Math.round((dOut - dIn) / (1000 * 60 * 60 * 24));
if (nights < minStay) {
window.lbvOpenCalendarModal();
updateMinStayNotice('violation', minStay, nights, selectedCheckInIso, selectedCheckOutIso);
return;
}
var checkoutUrl = 'https://book.chaletslabellevie.ca/checkout/' + lbvChaletHostawayId + '?start=' + selectedCheckInIso + '&end=' + selectedCheckOutIso + '&numberOfGuests=' + currentGuests;
window.location.href = checkoutUrl;
};
window.lbvHandleMainCta = function() { window.lbvGoToCheckout(); };
window.lbvHandleMobileCta = function() { window.lbvGoToCheckout(); };
// 13. INTERCEPT HOSTAWAy NATIVE WIDGET BUTTON WITH CAPTURE PHASE
function setupHostawayWidgetInterceptor() {
var calEl = document.getElementById('hostaway-calendar-widget');
if (!calEl) return;
calEl.addEventListener('click', function(e) {
var btn = e.target.closest('button');
if (btn && btn.textContent && /Reserve|Book|Réserver/i.test(btn.textContent)) {
e.preventDefault();
e.stopPropagation();
e.stopImmediatePropagation();
checkAndCalculateDates(true);
window.lbvGoToCheckout();
return false;
}
}, true);
}
setupHostawayWidgetInterceptor();
// 14. SMOOTH SCROLL TO INQUIRY CONTACT FORM
window.lbvScrollToInquiryForm = function(e) {
if (e && e.preventDefault) e.preventDefault();
var formSec = document.getElementById('Inquiry') || document.querySelector('.elementor-widget-form');
if (formSec) {
formSec.scrollIntoView({ behavior: 'smooth', block: 'start' });
setTimeout(function() {
var firstInput = formSec.querySelector('input[name*="name"], input[type="text"], input');
if (firstInput) {
firstInput.focus({ preventScroll: true });
}
}, 500);
}
};
// 14. DEDICATED LANGUAGE SWITCHER ENHANCER (Mobile & Desktop)
(function initLanguageSwitcherEnhancer() {
function enhanceSwitcher() {
var isFr = window.location.pathname.indexOf('/fr/') !== -1;
var targetUrl = isFr ? 'https://chaletslabellevie.ca/chalet-mysa-spa-porch-firepit/' : 'https://chaletslabellevie.ca/fr/chalet-mysa-spa-veranda-foyer/';
// A. Direct navigation on header switcher links
var headerLinks = document.querySelectorAll('header.elementor-location-header .cpel-switcher__lang:not(.cpel-switcher__lang--active) a, header.elementor-location-header .elementor-widget-polylang-language-switcher a');
headerLinks.forEach(function(a) {
var txt = (a.textContent || '').trim().toUpperCase();
if ((!isFr && txt.indexOf('FR') !== -1) || (isFr && txt.indexOf('EN') !== -1)) {
a.setAttribute('href', targetUrl);
a.onclick = function(e) {
e.preventDefault();
window.location.href = targetUrl;
};
}
});
// B. Inject language switcher into mobile hamburger menu
var mobileMenus = document.querySelectorAll('header.elementor-location-header .elementor-nav-menu--dropdown ul.elementor-nav-menu');
mobileMenus.forEach(function(menu) {
if (!menu.querySelector('.lbv-mobile-lang-item')) {
var li = document.createElement('li');
li.className = 'menu-item lbv-mobile-lang-item';
li.style.cssText = 'border-top: 1px solid rgba(214,169,117,0.3) !important; margin: 12px 14px 6px 14px !important; padding-top: 10px !important; list-style: none !important;';
var badge = isFr ? 'EN' : 'FR';
li.innerHTML = '
' +
'' + (isFr ? '🇬🇧 Switch to English' : ' Passer au Français') + ' ' +
'' + badge + ' ' +
' ';
var link = li.querySelector('a');
if (link) {
link.onclick = function(e) {
e.preventDefault();
window.location.href = targetUrl;
};
}
menu.appendChild(li);
}
});
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', enhanceSwitcher);
} else {
enhanceSwitcher();
}
setTimeout(enhanceSwitcher, 500);
setTimeout(enhanceSwitcher, 1500);
setTimeout(enhanceSwitcher, 3000);
})();
})();
+ avgRate + ' × ' + nights + ' nt)';
if (panelCleaningFee) panelCleaningFee.innerText = '
setInterval(checkAndCalculateDates, 350);
// 12. DIRECT CHECKOUT ROUTING (Guarantees zero drop-off of dates & guests)
window.lbvGoToCheckout = function() {
if (!selectedCheckInIso || !selectedCheckOutIso) {
window.lbvOpenCalendarModal();
updateMinStayNotice('initial');
return;
}
var minStay = getMinStayForCheckIn(selectedCheckInIso);
var dIn = new Date(selectedCheckInIso + 'T12:00:00');
var dOut = new Date(selectedCheckOutIso + 'T12:00:00');
var nights = Math.round((dOut - dIn) / (1000 * 60 * 60 * 24));
if (nights < minStay) {
window.lbvOpenCalendarModal();
updateMinStayNotice('violation', minStay, nights, selectedCheckInIso, selectedCheckOutIso);
return;
}
var checkoutUrl = 'https://book.chaletslabellevie.ca/checkout/' + lbvChaletHostawayId + '?start=' + selectedCheckInIso + '&end=' + selectedCheckOutIso + '&numberOfGuests=' + currentGuests;
window.location.href = checkoutUrl;
};
window.lbvHandleMainCta = function() { window.lbvGoToCheckout(); };
window.lbvHandleMobileCta = function() { window.lbvGoToCheckout(); };
// 13. INTERCEPT HOSTAWAy NATIVE WIDGET BUTTON WITH CAPTURE PHASE
function setupHostawayWidgetInterceptor() {
var calEl = document.getElementById('hostaway-calendar-widget');
if (!calEl) return;
calEl.addEventListener('click', function(e) {
var btn = e.target.closest('button');
if (btn && btn.textContent && /Reserve|Book|Réserver/i.test(btn.textContent)) {
e.preventDefault();
e.stopPropagation();
e.stopImmediatePropagation();
checkAndCalculateDates(true);
window.lbvGoToCheckout();
return false;
}
}, true);
}
setupHostawayWidgetInterceptor();
// 14. SMOOTH SCROLL TO INQUIRY CONTACT FORM
window.lbvScrollToInquiryForm = function(e) {
if (e && e.preventDefault) e.preventDefault();
var formSec = document.getElementById('Inquiry') || document.querySelector('.elementor-widget-form');
if (formSec) {
formSec.scrollIntoView({ behavior: 'smooth', block: 'start' });
setTimeout(function() {
var firstInput = formSec.querySelector('input[name*="name"], input[type="text"], input');
if (firstInput) {
firstInput.focus({ preventScroll: true });
}
}, 500);
}
};
// 14. DEDICATED LANGUAGE SWITCHER ENHANCER (Mobile & Desktop)
(function initLanguageSwitcherEnhancer() {
function enhanceSwitcher() {
var isFr = window.location.pathname.indexOf('/fr/') !== -1;
var targetUrl = isFr ? 'https://chaletslabellevie.ca/chalet-mysa-spa-porch-firepit/' : 'https://chaletslabellevie.ca/fr/chalet-mysa-spa-veranda-foyer/';
// A. Direct navigation on header switcher links
var headerLinks = document.querySelectorAll('header.elementor-location-header .cpel-switcher__lang:not(.cpel-switcher__lang--active) a, header.elementor-location-header .elementor-widget-polylang-language-switcher a');
headerLinks.forEach(function(a) {
var txt = (a.textContent || '').trim().toUpperCase();
if ((!isFr && txt.indexOf('FR') !== -1) || (isFr && txt.indexOf('EN') !== -1)) {
a.setAttribute('href', targetUrl);
a.onclick = function(e) {
e.preventDefault();
window.location.href = targetUrl;
};
}
});
// B. Inject language switcher into mobile hamburger menu
var mobileMenus = document.querySelectorAll('header.elementor-location-header .elementor-nav-menu--dropdown ul.elementor-nav-menu');
mobileMenus.forEach(function(menu) {
if (!menu.querySelector('.lbv-mobile-lang-item')) {
var li = document.createElement('li');
li.className = 'menu-item lbv-mobile-lang-item';
li.style.cssText = 'border-top: 1px solid rgba(214,169,117,0.3) !important; margin: 12px 14px 6px 14px !important; padding-top: 10px !important; list-style: none !important;';
var badge = isFr ? 'EN' : 'FR';
li.innerHTML = '
' +
'' + (isFr ? '🇬🇧 Switch to English' : ' Passer au Français') + ' ' +
'' + badge + ' ' +
' ';
var link = li.querySelector('a');
if (link) {
link.onclick = function(e) {
e.preventDefault();
window.location.href = targetUrl;
};
}
menu.appendChild(li);
}
});
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', enhanceSwitcher);
} else {
enhanceSwitcher();
}
setTimeout(enhanceSwitcher, 500);
setTimeout(enhanceSwitcher, 1500);
setTimeout(enhanceSwitcher, 3000);
})();
})();
+ cleaningVal + ' CAD' + (lbvIsFr ? ' / séjour' : ' / stay');
if (extraVal > 0) {
if (panelExtraGuestRow) panelExtraGuestRow.style.display = 'flex';
if (panelExtraGuestVal) panelExtraGuestVal.innerText = '
setInterval(checkAndCalculateDates, 350);
// 12. DIRECT CHECKOUT ROUTING (Guarantees zero drop-off of dates & guests)
window.lbvGoToCheckout = function() {
if (!selectedCheckInIso || !selectedCheckOutIso) {
window.lbvOpenCalendarModal();
updateMinStayNotice('initial');
return;
}
var minStay = getMinStayForCheckIn(selectedCheckInIso);
var dIn = new Date(selectedCheckInIso + 'T12:00:00');
var dOut = new Date(selectedCheckOutIso + 'T12:00:00');
var nights = Math.round((dOut - dIn) / (1000 * 60 * 60 * 24));
if (nights < minStay) {
window.lbvOpenCalendarModal();
updateMinStayNotice('violation', minStay, nights, selectedCheckInIso, selectedCheckOutIso);
return;
}
var checkoutUrl = 'https://book.chaletslabellevie.ca/checkout/' + lbvChaletHostawayId + '?start=' + selectedCheckInIso + '&end=' + selectedCheckOutIso + '&numberOfGuests=' + currentGuests;
window.location.href = checkoutUrl;
};
window.lbvHandleMainCta = function() { window.lbvGoToCheckout(); };
window.lbvHandleMobileCta = function() { window.lbvGoToCheckout(); };
// 13. INTERCEPT HOSTAWAy NATIVE WIDGET BUTTON WITH CAPTURE PHASE
function setupHostawayWidgetInterceptor() {
var calEl = document.getElementById('hostaway-calendar-widget');
if (!calEl) return;
calEl.addEventListener('click', function(e) {
var btn = e.target.closest('button');
if (btn && btn.textContent && /Reserve|Book|Réserver/i.test(btn.textContent)) {
e.preventDefault();
e.stopPropagation();
e.stopImmediatePropagation();
checkAndCalculateDates(true);
window.lbvGoToCheckout();
return false;
}
}, true);
}
setupHostawayWidgetInterceptor();
// 14. SMOOTH SCROLL TO INQUIRY CONTACT FORM
window.lbvScrollToInquiryForm = function(e) {
if (e && e.preventDefault) e.preventDefault();
var formSec = document.getElementById('Inquiry') || document.querySelector('.elementor-widget-form');
if (formSec) {
formSec.scrollIntoView({ behavior: 'smooth', block: 'start' });
setTimeout(function() {
var firstInput = formSec.querySelector('input[name*="name"], input[type="text"], input');
if (firstInput) {
firstInput.focus({ preventScroll: true });
}
}, 500);
}
};
// 14. DEDICATED LANGUAGE SWITCHER ENHANCER (Mobile & Desktop)
(function initLanguageSwitcherEnhancer() {
function enhanceSwitcher() {
var isFr = window.location.pathname.indexOf('/fr/') !== -1;
var targetUrl = isFr ? 'https://chaletslabellevie.ca/chalet-mysa-spa-porch-firepit/' : 'https://chaletslabellevie.ca/fr/chalet-mysa-spa-veranda-foyer/';
// A. Direct navigation on header switcher links
var headerLinks = document.querySelectorAll('header.elementor-location-header .cpel-switcher__lang:not(.cpel-switcher__lang--active) a, header.elementor-location-header .elementor-widget-polylang-language-switcher a');
headerLinks.forEach(function(a) {
var txt = (a.textContent || '').trim().toUpperCase();
if ((!isFr && txt.indexOf('FR') !== -1) || (isFr && txt.indexOf('EN') !== -1)) {
a.setAttribute('href', targetUrl);
a.onclick = function(e) {
e.preventDefault();
window.location.href = targetUrl;
};
}
});
// B. Inject language switcher into mobile hamburger menu
var mobileMenus = document.querySelectorAll('header.elementor-location-header .elementor-nav-menu--dropdown ul.elementor-nav-menu');
mobileMenus.forEach(function(menu) {
if (!menu.querySelector('.lbv-mobile-lang-item')) {
var li = document.createElement('li');
li.className = 'menu-item lbv-mobile-lang-item';
li.style.cssText = 'border-top: 1px solid rgba(214,169,117,0.3) !important; margin: 12px 14px 6px 14px !important; padding-top: 10px !important; list-style: none !important;';
var badge = isFr ? 'EN' : 'FR';
li.innerHTML = '
' +
'' + (isFr ? '🇬🇧 Switch to English' : ' Passer au Français') + ' ' +
'' + badge + ' ' +
' ';
var link = li.querySelector('a');
if (link) {
link.onclick = function(e) {
e.preventDefault();
window.location.href = targetUrl;
};
}
menu.appendChild(li);
}
});
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', enhanceSwitcher);
} else {
enhanceSwitcher();
}
setTimeout(enhanceSwitcher, 500);
setTimeout(enhanceSwitcher, 1500);
setTimeout(enhanceSwitcher, 3000);
})();
})();
+ extraVal + ' CAD';
} else {
if (panelExtraGuestRow) panelExtraGuestRow.style.display = 'none';
}
function formatMoney(val) {
return lbvIsFr ? (val.toFixed(2).replace('.', ',') + ' $ CAD') : ('
setInterval(checkAndCalculateDates, 350);
// 12. DIRECT CHECKOUT ROUTING (Guarantees zero drop-off of dates & guests)
window.lbvGoToCheckout = function() {
if (!selectedCheckInIso || !selectedCheckOutIso) {
window.lbvOpenCalendarModal();
updateMinStayNotice('initial');
return;
}
var minStay = getMinStayForCheckIn(selectedCheckInIso);
var dIn = new Date(selectedCheckInIso + 'T12:00:00');
var dOut = new Date(selectedCheckOutIso + 'T12:00:00');
var nights = Math.round((dOut - dIn) / (1000 * 60 * 60 * 24));
if (nights < minStay) {
window.lbvOpenCalendarModal();
updateMinStayNotice('violation', minStay, nights, selectedCheckInIso, selectedCheckOutIso);
return;
}
var checkoutUrl = 'https://book.chaletslabellevie.ca/checkout/' + lbvChaletHostawayId + '?start=' + selectedCheckInIso + '&end=' + selectedCheckOutIso + '&numberOfGuests=' + currentGuests;
window.location.href = checkoutUrl;
};
window.lbvHandleMainCta = function() { window.lbvGoToCheckout(); };
window.lbvHandleMobileCta = function() { window.lbvGoToCheckout(); };
// 13. INTERCEPT HOSTAWAy NATIVE WIDGET BUTTON WITH CAPTURE PHASE
function setupHostawayWidgetInterceptor() {
var calEl = document.getElementById('hostaway-calendar-widget');
if (!calEl) return;
calEl.addEventListener('click', function(e) {
var btn = e.target.closest('button');
if (btn && btn.textContent && /Reserve|Book|Réserver/i.test(btn.textContent)) {
e.preventDefault();
e.stopPropagation();
e.stopImmediatePropagation();
checkAndCalculateDates(true);
window.lbvGoToCheckout();
return false;
}
}, true);
}
setupHostawayWidgetInterceptor();
// 14. SMOOTH SCROLL TO INQUIRY CONTACT FORM
window.lbvScrollToInquiryForm = function(e) {
if (e && e.preventDefault) e.preventDefault();
var formSec = document.getElementById('Inquiry') || document.querySelector('.elementor-widget-form');
if (formSec) {
formSec.scrollIntoView({ behavior: 'smooth', block: 'start' });
setTimeout(function() {
var firstInput = formSec.querySelector('input[name*="name"], input[type="text"], input');
if (firstInput) {
firstInput.focus({ preventScroll: true });
}
}, 500);
}
};
// 14. DEDICATED LANGUAGE SWITCHER ENHANCER (Mobile & Desktop)
(function initLanguageSwitcherEnhancer() {
function enhanceSwitcher() {
var isFr = window.location.pathname.indexOf('/fr/') !== -1;
var targetUrl = isFr ? 'https://chaletslabellevie.ca/chalet-mysa-spa-porch-firepit/' : 'https://chaletslabellevie.ca/fr/chalet-mysa-spa-veranda-foyer/';
// A. Direct navigation on header switcher links
var headerLinks = document.querySelectorAll('header.elementor-location-header .cpel-switcher__lang:not(.cpel-switcher__lang--active) a, header.elementor-location-header .elementor-widget-polylang-language-switcher a');
headerLinks.forEach(function(a) {
var txt = (a.textContent || '').trim().toUpperCase();
if ((!isFr && txt.indexOf('FR') !== -1) || (isFr && txt.indexOf('EN') !== -1)) {
a.setAttribute('href', targetUrl);
a.onclick = function(e) {
e.preventDefault();
window.location.href = targetUrl;
};
}
});
// B. Inject language switcher into mobile hamburger menu
var mobileMenus = document.querySelectorAll('header.elementor-location-header .elementor-nav-menu--dropdown ul.elementor-nav-menu');
mobileMenus.forEach(function(menu) {
if (!menu.querySelector('.lbv-mobile-lang-item')) {
var li = document.createElement('li');
li.className = 'menu-item lbv-mobile-lang-item';
li.style.cssText = 'border-top: 1px solid rgba(214,169,117,0.3) !important; margin: 12px 14px 6px 14px !important; padding-top: 10px !important; list-style: none !important;';
var badge = isFr ? 'EN' : 'FR';
li.innerHTML = '
' +
'' + (isFr ? '🇬🇧 Switch to English' : ' Passer au Français') + ' ' +
'' + badge + ' ' +
' ';
var link = li.querySelector('a');
if (link) {
link.onclick = function(e) {
e.preventDefault();
window.location.href = targetUrl;
};
}
menu.appendChild(li);
}
});
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', enhanceSwitcher);
} else {
enhanceSwitcher();
}
setTimeout(enhanceSwitcher, 500);
setTimeout(enhanceSwitcher, 1500);
setTimeout(enhanceSwitcher, 3000);
})();
})();
+ val.toFixed(2) + ' CAD');
}
if (panelSalesTax) panelSalesTax.innerText = formatMoney(salesTaxVal);
if (panelVatTax) panelVatTax.innerText = formatMoney(vatVal);
if (panelLodgingTax) panelLodgingTax.innerText = formatMoney(lodgingTaxVal);
if (panelGrandTotal) panelGrandTotal.innerText = formatMoney(total);
if (panelTotalRow) panelTotalRow.style.display = 'flex';
// Mobile Bottom Bar & Sheet
var mobilePrice = document.getElementById('lbv-mobile-price');
var mobileDatesSummary = document.getElementById('lbv-mobile-dates-summary');
var mobileBreakdownTrigger = document.getElementById('lbv-mobile-breakdown-trigger');
var mobileCtaBtn = document.getElementById('lbv-mobile-cta-btn');
var mbSub = document.getElementById('lbv-mb-sheet-dates-sub');
var mbRateDesc = document.getElementById('lbv-mb-sheet-rate-desc');
var mbRateVal = document.getElementById('lbv-mb-sheet-rate-val');
var mbCleaningVal = document.getElementById('lbv-mb-sheet-cleaning-val');
var mbExtraGuestRow = document.getElementById('lbv-mb-sheet-extraguest-row');
var mbExtraGuestVal = document.getElementById('lbv-mb-sheet-extraguest-val');
var mbLodgingTax = document.getElementById('lbv-mb-sheet-lodging-tax');
var mbSalesTax = document.getElementById('lbv-mb-sheet-sales-tax');
var mbVatTax = document.getElementById('lbv-mb-sheet-vat-tax');
var mbGrandTotal = document.getElementById('lbv-mb-sheet-grand-total');
if (mobilePrice) mobilePrice.innerText = '
setInterval(checkAndCalculateDates, 350);
// 12. DIRECT CHECKOUT ROUTING (Guarantees zero drop-off of dates & guests)
window.lbvGoToCheckout = function() {
if (!selectedCheckInIso || !selectedCheckOutIso) {
window.lbvOpenCalendarModal();
updateMinStayNotice('initial');
return;
}
var minStay = getMinStayForCheckIn(selectedCheckInIso);
var dIn = new Date(selectedCheckInIso + 'T12:00:00');
var dOut = new Date(selectedCheckOutIso + 'T12:00:00');
var nights = Math.round((dOut - dIn) / (1000 * 60 * 60 * 24));
if (nights < minStay) {
window.lbvOpenCalendarModal();
updateMinStayNotice('violation', minStay, nights, selectedCheckInIso, selectedCheckOutIso);
return;
}
var checkoutUrl = 'https://book.chaletslabellevie.ca/checkout/' + lbvChaletHostawayId + '?start=' + selectedCheckInIso + '&end=' + selectedCheckOutIso + '&numberOfGuests=' + currentGuests;
window.location.href = checkoutUrl;
};
window.lbvHandleMainCta = function() { window.lbvGoToCheckout(); };
window.lbvHandleMobileCta = function() { window.lbvGoToCheckout(); };
// 13. INTERCEPT HOSTAWAy NATIVE WIDGET BUTTON WITH CAPTURE PHASE
function setupHostawayWidgetInterceptor() {
var calEl = document.getElementById('hostaway-calendar-widget');
if (!calEl) return;
calEl.addEventListener('click', function(e) {
var btn = e.target.closest('button');
if (btn && btn.textContent && /Reserve|Book|Réserver/i.test(btn.textContent)) {
e.preventDefault();
e.stopPropagation();
e.stopImmediatePropagation();
checkAndCalculateDates(true);
window.lbvGoToCheckout();
return false;
}
}, true);
}
setupHostawayWidgetInterceptor();
// 14. SMOOTH SCROLL TO INQUIRY CONTACT FORM
window.lbvScrollToInquiryForm = function(e) {
if (e && e.preventDefault) e.preventDefault();
var formSec = document.getElementById('Inquiry') || document.querySelector('.elementor-widget-form');
if (formSec) {
formSec.scrollIntoView({ behavior: 'smooth', block: 'start' });
setTimeout(function() {
var firstInput = formSec.querySelector('input[name*="name"], input[type="text"], input');
if (firstInput) {
firstInput.focus({ preventScroll: true });
}
}, 500);
}
};
// 14. DEDICATED LANGUAGE SWITCHER ENHANCER (Mobile & Desktop)
(function initLanguageSwitcherEnhancer() {
function enhanceSwitcher() {
var isFr = window.location.pathname.indexOf('/fr/') !== -1;
var targetUrl = isFr ? 'https://chaletslabellevie.ca/chalet-mysa-spa-porch-firepit/' : 'https://chaletslabellevie.ca/fr/chalet-mysa-spa-veranda-foyer/';
// A. Direct navigation on header switcher links
var headerLinks = document.querySelectorAll('header.elementor-location-header .cpel-switcher__lang:not(.cpel-switcher__lang--active) a, header.elementor-location-header .elementor-widget-polylang-language-switcher a');
headerLinks.forEach(function(a) {
var txt = (a.textContent || '').trim().toUpperCase();
if ((!isFr && txt.indexOf('FR') !== -1) || (isFr && txt.indexOf('EN') !== -1)) {
a.setAttribute('href', targetUrl);
a.onclick = function(e) {
e.preventDefault();
window.location.href = targetUrl;
};
}
});
// B. Inject language switcher into mobile hamburger menu
var mobileMenus = document.querySelectorAll('header.elementor-location-header .elementor-nav-menu--dropdown ul.elementor-nav-menu');
mobileMenus.forEach(function(menu) {
if (!menu.querySelector('.lbv-mobile-lang-item')) {
var li = document.createElement('li');
li.className = 'menu-item lbv-mobile-lang-item';
li.style.cssText = 'border-top: 1px solid rgba(214,169,117,0.3) !important; margin: 12px 14px 6px 14px !important; padding-top: 10px !important; list-style: none !important;';
var badge = isFr ? 'EN' : 'FR';
li.innerHTML = '
' +
'' + (isFr ? '🇬🇧 Switch to English' : ' Passer au Français') + ' ' +
'' + badge + ' ' +
' ';
var link = li.querySelector('a');
if (link) {
link.onclick = function(e) {
e.preventDefault();
window.location.href = targetUrl;
};
}
menu.appendChild(li);
}
});
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', enhanceSwitcher);
} else {
enhanceSwitcher();
}
setTimeout(enhanceSwitcher, 500);
setTimeout(enhanceSwitcher, 1500);
setTimeout(enhanceSwitcher, 3000);
})();
})();
+ avgRate;
if (mobileDatesSummary) mobileDatesSummary.innerText = formatDisplayDate(startIso) + ' – ' + formatDisplayDate(endIso) + ' ·
setInterval(checkAndCalculateDates, 350);
// 12. DIRECT CHECKOUT ROUTING (Guarantees zero drop-off of dates & guests)
window.lbvGoToCheckout = function() {
if (!selectedCheckInIso || !selectedCheckOutIso) {
window.lbvOpenCalendarModal();
updateMinStayNotice('initial');
return;
}
var minStay = getMinStayForCheckIn(selectedCheckInIso);
var dIn = new Date(selectedCheckInIso + 'T12:00:00');
var dOut = new Date(selectedCheckOutIso + 'T12:00:00');
var nights = Math.round((dOut - dIn) / (1000 * 60 * 60 * 24));
if (nights < minStay) {
window.lbvOpenCalendarModal();
updateMinStayNotice('violation', minStay, nights, selectedCheckInIso, selectedCheckOutIso);
return;
}
var checkoutUrl = 'https://book.chaletslabellevie.ca/checkout/' + lbvChaletHostawayId + '?start=' + selectedCheckInIso + '&end=' + selectedCheckOutIso + '&numberOfGuests=' + currentGuests;
window.location.href = checkoutUrl;
};
window.lbvHandleMainCta = function() { window.lbvGoToCheckout(); };
window.lbvHandleMobileCta = function() { window.lbvGoToCheckout(); };
// 13. INTERCEPT HOSTAWAy NATIVE WIDGET BUTTON WITH CAPTURE PHASE
function setupHostawayWidgetInterceptor() {
var calEl = document.getElementById('hostaway-calendar-widget');
if (!calEl) return;
calEl.addEventListener('click', function(e) {
var btn = e.target.closest('button');
if (btn && btn.textContent && /Reserve|Book|Réserver/i.test(btn.textContent)) {
e.preventDefault();
e.stopPropagation();
e.stopImmediatePropagation();
checkAndCalculateDates(true);
window.lbvGoToCheckout();
return false;
}
}, true);
}
setupHostawayWidgetInterceptor();
// 14. SMOOTH SCROLL TO INQUIRY CONTACT FORM
window.lbvScrollToInquiryForm = function(e) {
if (e && e.preventDefault) e.preventDefault();
var formSec = document.getElementById('Inquiry') || document.querySelector('.elementor-widget-form');
if (formSec) {
formSec.scrollIntoView({ behavior: 'smooth', block: 'start' });
setTimeout(function() {
var firstInput = formSec.querySelector('input[name*="name"], input[type="text"], input');
if (firstInput) {
firstInput.focus({ preventScroll: true });
}
}, 500);
}
};
// 14. DEDICATED LANGUAGE SWITCHER ENHANCER (Mobile & Desktop)
(function initLanguageSwitcherEnhancer() {
function enhanceSwitcher() {
var isFr = window.location.pathname.indexOf('/fr/') !== -1;
var targetUrl = isFr ? 'https://chaletslabellevie.ca/chalet-mysa-spa-porch-firepit/' : 'https://chaletslabellevie.ca/fr/chalet-mysa-spa-veranda-foyer/';
// A. Direct navigation on header switcher links
var headerLinks = document.querySelectorAll('header.elementor-location-header .cpel-switcher__lang:not(.cpel-switcher__lang--active) a, header.elementor-location-header .elementor-widget-polylang-language-switcher a');
headerLinks.forEach(function(a) {
var txt = (a.textContent || '').trim().toUpperCase();
if ((!isFr && txt.indexOf('FR') !== -1) || (isFr && txt.indexOf('EN') !== -1)) {
a.setAttribute('href', targetUrl);
a.onclick = function(e) {
e.preventDefault();
window.location.href = targetUrl;
};
}
});
// B. Inject language switcher into mobile hamburger menu
var mobileMenus = document.querySelectorAll('header.elementor-location-header .elementor-nav-menu--dropdown ul.elementor-nav-menu');
mobileMenus.forEach(function(menu) {
if (!menu.querySelector('.lbv-mobile-lang-item')) {
var li = document.createElement('li');
li.className = 'menu-item lbv-mobile-lang-item';
li.style.cssText = 'border-top: 1px solid rgba(214,169,117,0.3) !important; margin: 12px 14px 6px 14px !important; padding-top: 10px !important; list-style: none !important;';
var badge = isFr ? 'EN' : 'FR';
li.innerHTML = '
' +
'' + (isFr ? '🇬🇧 Switch to English' : ' Passer au Français') + ' ' +
'' + badge + ' ' +
' ';
var link = li.querySelector('a');
if (link) {
link.onclick = function(e) {
e.preventDefault();
window.location.href = targetUrl;
};
}
menu.appendChild(li);
}
});
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', enhanceSwitcher);
} else {
enhanceSwitcher();
}
setTimeout(enhanceSwitcher, 500);
setTimeout(enhanceSwitcher, 1500);
setTimeout(enhanceSwitcher, 3000);
})();
})();
+ Math.round(total).toLocaleString('en-CA') + ' total';
if (mobileBreakdownTrigger) mobileBreakdownTrigger.style.display = 'inline-block';
if (mobileCtaBtn) mobileCtaBtn.innerText = (lbvIsFr ? 'Réserver •
setInterval(checkAndCalculateDates, 350);
// 12. DIRECT CHECKOUT ROUTING (Guarantees zero drop-off of dates & guests)
window.lbvGoToCheckout = function() {
if (!selectedCheckInIso || !selectedCheckOutIso) {
window.lbvOpenCalendarModal();
updateMinStayNotice('initial');
return;
}
var minStay = getMinStayForCheckIn(selectedCheckInIso);
var dIn = new Date(selectedCheckInIso + 'T12:00:00');
var dOut = new Date(selectedCheckOutIso + 'T12:00:00');
var nights = Math.round((dOut - dIn) / (1000 * 60 * 60 * 24));
if (nights < minStay) {
window.lbvOpenCalendarModal();
updateMinStayNotice('violation', minStay, nights, selectedCheckInIso, selectedCheckOutIso);
return;
}
var checkoutUrl = 'https://book.chaletslabellevie.ca/checkout/' + lbvChaletHostawayId + '?start=' + selectedCheckInIso + '&end=' + selectedCheckOutIso + '&numberOfGuests=' + currentGuests;
window.location.href = checkoutUrl;
};
window.lbvHandleMainCta = function() { window.lbvGoToCheckout(); };
window.lbvHandleMobileCta = function() { window.lbvGoToCheckout(); };
// 13. INTERCEPT HOSTAWAy NATIVE WIDGET BUTTON WITH CAPTURE PHASE
function setupHostawayWidgetInterceptor() {
var calEl = document.getElementById('hostaway-calendar-widget');
if (!calEl) return;
calEl.addEventListener('click', function(e) {
var btn = e.target.closest('button');
if (btn && btn.textContent && /Reserve|Book|Réserver/i.test(btn.textContent)) {
e.preventDefault();
e.stopPropagation();
e.stopImmediatePropagation();
checkAndCalculateDates(true);
window.lbvGoToCheckout();
return false;
}
}, true);
}
setupHostawayWidgetInterceptor();
// 14. SMOOTH SCROLL TO INQUIRY CONTACT FORM
window.lbvScrollToInquiryForm = function(e) {
if (e && e.preventDefault) e.preventDefault();
var formSec = document.getElementById('Inquiry') || document.querySelector('.elementor-widget-form');
if (formSec) {
formSec.scrollIntoView({ behavior: 'smooth', block: 'start' });
setTimeout(function() {
var firstInput = formSec.querySelector('input[name*="name"], input[type="text"], input');
if (firstInput) {
firstInput.focus({ preventScroll: true });
}
}, 500);
}
};
// 14. DEDICATED LANGUAGE SWITCHER ENHANCER (Mobile & Desktop)
(function initLanguageSwitcherEnhancer() {
function enhanceSwitcher() {
var isFr = window.location.pathname.indexOf('/fr/') !== -1;
var targetUrl = isFr ? 'https://chaletslabellevie.ca/chalet-mysa-spa-porch-firepit/' : 'https://chaletslabellevie.ca/fr/chalet-mysa-spa-veranda-foyer/';
// A. Direct navigation on header switcher links
var headerLinks = document.querySelectorAll('header.elementor-location-header .cpel-switcher__lang:not(.cpel-switcher__lang--active) a, header.elementor-location-header .elementor-widget-polylang-language-switcher a');
headerLinks.forEach(function(a) {
var txt = (a.textContent || '').trim().toUpperCase();
if ((!isFr && txt.indexOf('FR') !== -1) || (isFr && txt.indexOf('EN') !== -1)) {
a.setAttribute('href', targetUrl);
a.onclick = function(e) {
e.preventDefault();
window.location.href = targetUrl;
};
}
});
// B. Inject language switcher into mobile hamburger menu
var mobileMenus = document.querySelectorAll('header.elementor-location-header .elementor-nav-menu--dropdown ul.elementor-nav-menu');
mobileMenus.forEach(function(menu) {
if (!menu.querySelector('.lbv-mobile-lang-item')) {
var li = document.createElement('li');
li.className = 'menu-item lbv-mobile-lang-item';
li.style.cssText = 'border-top: 1px solid rgba(214,169,117,0.3) !important; margin: 12px 14px 6px 14px !important; padding-top: 10px !important; list-style: none !important;';
var badge = isFr ? 'EN' : 'FR';
li.innerHTML = '
' +
'' + (isFr ? '🇬🇧 Switch to English' : ' Passer au Français') + ' ' +
'' + badge + ' ' +
' ';
var link = li.querySelector('a');
if (link) {
link.onclick = function(e) {
e.preventDefault();
window.location.href = targetUrl;
};
}
menu.appendChild(li);
}
});
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', enhanceSwitcher);
} else {
enhanceSwitcher();
}
setTimeout(enhanceSwitcher, 500);
setTimeout(enhanceSwitcher, 1500);
setTimeout(enhanceSwitcher, 3000);
})();
})();
: 'Reserve •
setInterval(checkAndCalculateDates, 350);
// 12. DIRECT CHECKOUT ROUTING (Guarantees zero drop-off of dates & guests)
window.lbvGoToCheckout = function() {
if (!selectedCheckInIso || !selectedCheckOutIso) {
window.lbvOpenCalendarModal();
updateMinStayNotice('initial');
return;
}
var minStay = getMinStayForCheckIn(selectedCheckInIso);
var dIn = new Date(selectedCheckInIso + 'T12:00:00');
var dOut = new Date(selectedCheckOutIso + 'T12:00:00');
var nights = Math.round((dOut - dIn) / (1000 * 60 * 60 * 24));
if (nights < minStay) {
window.lbvOpenCalendarModal();
updateMinStayNotice('violation', minStay, nights, selectedCheckInIso, selectedCheckOutIso);
return;
}
var checkoutUrl = 'https://book.chaletslabellevie.ca/checkout/' + lbvChaletHostawayId + '?start=' + selectedCheckInIso + '&end=' + selectedCheckOutIso + '&numberOfGuests=' + currentGuests;
window.location.href = checkoutUrl;
};
window.lbvHandleMainCta = function() { window.lbvGoToCheckout(); };
window.lbvHandleMobileCta = function() { window.lbvGoToCheckout(); };
// 13. INTERCEPT HOSTAWAy NATIVE WIDGET BUTTON WITH CAPTURE PHASE
function setupHostawayWidgetInterceptor() {
var calEl = document.getElementById('hostaway-calendar-widget');
if (!calEl) return;
calEl.addEventListener('click', function(e) {
var btn = e.target.closest('button');
if (btn && btn.textContent && /Reserve|Book|Réserver/i.test(btn.textContent)) {
e.preventDefault();
e.stopPropagation();
e.stopImmediatePropagation();
checkAndCalculateDates(true);
window.lbvGoToCheckout();
return false;
}
}, true);
}
setupHostawayWidgetInterceptor();
// 14. SMOOTH SCROLL TO INQUIRY CONTACT FORM
window.lbvScrollToInquiryForm = function(e) {
if (e && e.preventDefault) e.preventDefault();
var formSec = document.getElementById('Inquiry') || document.querySelector('.elementor-widget-form');
if (formSec) {
formSec.scrollIntoView({ behavior: 'smooth', block: 'start' });
setTimeout(function() {
var firstInput = formSec.querySelector('input[name*="name"], input[type="text"], input');
if (firstInput) {
firstInput.focus({ preventScroll: true });
}
}, 500);
}
};
// 14. DEDICATED LANGUAGE SWITCHER ENHANCER (Mobile & Desktop)
(function initLanguageSwitcherEnhancer() {
function enhanceSwitcher() {
var isFr = window.location.pathname.indexOf('/fr/') !== -1;
var targetUrl = isFr ? 'https://chaletslabellevie.ca/chalet-mysa-spa-porch-firepit/' : 'https://chaletslabellevie.ca/fr/chalet-mysa-spa-veranda-foyer/';
// A. Direct navigation on header switcher links
var headerLinks = document.querySelectorAll('header.elementor-location-header .cpel-switcher__lang:not(.cpel-switcher__lang--active) a, header.elementor-location-header .elementor-widget-polylang-language-switcher a');
headerLinks.forEach(function(a) {
var txt = (a.textContent || '').trim().toUpperCase();
if ((!isFr && txt.indexOf('FR') !== -1) || (isFr && txt.indexOf('EN') !== -1)) {
a.setAttribute('href', targetUrl);
a.onclick = function(e) {
e.preventDefault();
window.location.href = targetUrl;
};
}
});
// B. Inject language switcher into mobile hamburger menu
var mobileMenus = document.querySelectorAll('header.elementor-location-header .elementor-nav-menu--dropdown ul.elementor-nav-menu');
mobileMenus.forEach(function(menu) {
if (!menu.querySelector('.lbv-mobile-lang-item')) {
var li = document.createElement('li');
li.className = 'menu-item lbv-mobile-lang-item';
li.style.cssText = 'border-top: 1px solid rgba(214,169,117,0.3) !important; margin: 12px 14px 6px 14px !important; padding-top: 10px !important; list-style: none !important;';
var badge = isFr ? 'EN' : 'FR';
li.innerHTML = '
' +
'' + (isFr ? '🇬🇧 Switch to English' : ' Passer au Français') + ' ' +
'' + badge + ' ' +
' ';
var link = li.querySelector('a');
if (link) {
link.onclick = function(e) {
e.preventDefault();
window.location.href = targetUrl;
};
}
menu.appendChild(li);
}
});
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', enhanceSwitcher);
} else {
enhanceSwitcher();
}
setTimeout(enhanceSwitcher, 500);
setTimeout(enhanceSwitcher, 1500);
setTimeout(enhanceSwitcher, 3000);
})();
})();
) + Math.round(total).toLocaleString('en-CA') + ' CAD →';
if (mbSub) mbSub.innerText = formatDisplayDate(startIso) + ' – ' + formatDisplayDate(endIso) + ' (' + nights + (lbvIsFr ? ' nuits · ' : ' nights · ') + guests + (lbvIsFr ? ' invités' : ' guests') + ')';
if (mbRateDesc) mbRateDesc.innerText = (lbvIsFr ? 'Hébergement (
setInterval(checkAndCalculateDates, 350);
// 12. DIRECT CHECKOUT ROUTING (Guarantees zero drop-off of dates & guests)
window.lbvGoToCheckout = function() {
if (!selectedCheckInIso || !selectedCheckOutIso) {
window.lbvOpenCalendarModal();
updateMinStayNotice('initial');
return;
}
var minStay = getMinStayForCheckIn(selectedCheckInIso);
var dIn = new Date(selectedCheckInIso + 'T12:00:00');
var dOut = new Date(selectedCheckOutIso + 'T12:00:00');
var nights = Math.round((dOut - dIn) / (1000 * 60 * 60 * 24));
if (nights < minStay) {
window.lbvOpenCalendarModal();
updateMinStayNotice('violation', minStay, nights, selectedCheckInIso, selectedCheckOutIso);
return;
}
var checkoutUrl = 'https://book.chaletslabellevie.ca/checkout/' + lbvChaletHostawayId + '?start=' + selectedCheckInIso + '&end=' + selectedCheckOutIso + '&numberOfGuests=' + currentGuests;
window.location.href = checkoutUrl;
};
window.lbvHandleMainCta = function() { window.lbvGoToCheckout(); };
window.lbvHandleMobileCta = function() { window.lbvGoToCheckout(); };
// 13. INTERCEPT HOSTAWAy NATIVE WIDGET BUTTON WITH CAPTURE PHASE
function setupHostawayWidgetInterceptor() {
var calEl = document.getElementById('hostaway-calendar-widget');
if (!calEl) return;
calEl.addEventListener('click', function(e) {
var btn = e.target.closest('button');
if (btn && btn.textContent && /Reserve|Book|Réserver/i.test(btn.textContent)) {
e.preventDefault();
e.stopPropagation();
e.stopImmediatePropagation();
checkAndCalculateDates(true);
window.lbvGoToCheckout();
return false;
}
}, true);
}
setupHostawayWidgetInterceptor();
// 14. SMOOTH SCROLL TO INQUIRY CONTACT FORM
window.lbvScrollToInquiryForm = function(e) {
if (e && e.preventDefault) e.preventDefault();
var formSec = document.getElementById('Inquiry') || document.querySelector('.elementor-widget-form');
if (formSec) {
formSec.scrollIntoView({ behavior: 'smooth', block: 'start' });
setTimeout(function() {
var firstInput = formSec.querySelector('input[name*="name"], input[type="text"], input');
if (firstInput) {
firstInput.focus({ preventScroll: true });
}
}, 500);
}
};
// 14. DEDICATED LANGUAGE SWITCHER ENHANCER (Mobile & Desktop)
(function initLanguageSwitcherEnhancer() {
function enhanceSwitcher() {
var isFr = window.location.pathname.indexOf('/fr/') !== -1;
var targetUrl = isFr ? 'https://chaletslabellevie.ca/chalet-mysa-spa-porch-firepit/' : 'https://chaletslabellevie.ca/fr/chalet-mysa-spa-veranda-foyer/';
// A. Direct navigation on header switcher links
var headerLinks = document.querySelectorAll('header.elementor-location-header .cpel-switcher__lang:not(.cpel-switcher__lang--active) a, header.elementor-location-header .elementor-widget-polylang-language-switcher a');
headerLinks.forEach(function(a) {
var txt = (a.textContent || '').trim().toUpperCase();
if ((!isFr && txt.indexOf('FR') !== -1) || (isFr && txt.indexOf('EN') !== -1)) {
a.setAttribute('href', targetUrl);
a.onclick = function(e) {
e.preventDefault();
window.location.href = targetUrl;
};
}
});
// B. Inject language switcher into mobile hamburger menu
var mobileMenus = document.querySelectorAll('header.elementor-location-header .elementor-nav-menu--dropdown ul.elementor-nav-menu');
mobileMenus.forEach(function(menu) {
if (!menu.querySelector('.lbv-mobile-lang-item')) {
var li = document.createElement('li');
li.className = 'menu-item lbv-mobile-lang-item';
li.style.cssText = 'border-top: 1px solid rgba(214,169,117,0.3) !important; margin: 12px 14px 6px 14px !important; padding-top: 10px !important; list-style: none !important;';
var badge = isFr ? 'EN' : 'FR';
li.innerHTML = '
' +
'' + (isFr ? '🇬🇧 Switch to English' : ' Passer au Français') + ' ' +
'' + badge + ' ' +
' ';
var link = li.querySelector('a');
if (link) {
link.onclick = function(e) {
e.preventDefault();
window.location.href = targetUrl;
};
}
menu.appendChild(li);
}
});
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', enhanceSwitcher);
} else {
enhanceSwitcher();
}
setTimeout(enhanceSwitcher, 500);
setTimeout(enhanceSwitcher, 1500);
setTimeout(enhanceSwitcher, 3000);
})();
})();
: 'Accommodation (
setInterval(checkAndCalculateDates, 350);
// 12. DIRECT CHECKOUT ROUTING (Guarantees zero drop-off of dates & guests)
window.lbvGoToCheckout = function() {
if (!selectedCheckInIso || !selectedCheckOutIso) {
window.lbvOpenCalendarModal();
updateMinStayNotice('initial');
return;
}
var minStay = getMinStayForCheckIn(selectedCheckInIso);
var dIn = new Date(selectedCheckInIso + 'T12:00:00');
var dOut = new Date(selectedCheckOutIso + 'T12:00:00');
var nights = Math.round((dOut - dIn) / (1000 * 60 * 60 * 24));
if (nights < minStay) {
window.lbvOpenCalendarModal();
updateMinStayNotice('violation', minStay, nights, selectedCheckInIso, selectedCheckOutIso);
return;
}
var checkoutUrl = 'https://book.chaletslabellevie.ca/checkout/' + lbvChaletHostawayId + '?start=' + selectedCheckInIso + '&end=' + selectedCheckOutIso + '&numberOfGuests=' + currentGuests;
window.location.href = checkoutUrl;
};
window.lbvHandleMainCta = function() { window.lbvGoToCheckout(); };
window.lbvHandleMobileCta = function() { window.lbvGoToCheckout(); };
// 13. INTERCEPT HOSTAWAy NATIVE WIDGET BUTTON WITH CAPTURE PHASE
function setupHostawayWidgetInterceptor() {
var calEl = document.getElementById('hostaway-calendar-widget');
if (!calEl) return;
calEl.addEventListener('click', function(e) {
var btn = e.target.closest('button');
if (btn && btn.textContent && /Reserve|Book|Réserver/i.test(btn.textContent)) {
e.preventDefault();
e.stopPropagation();
e.stopImmediatePropagation();
checkAndCalculateDates(true);
window.lbvGoToCheckout();
return false;
}
}, true);
}
setupHostawayWidgetInterceptor();
// 14. SMOOTH SCROLL TO INQUIRY CONTACT FORM
window.lbvScrollToInquiryForm = function(e) {
if (e && e.preventDefault) e.preventDefault();
var formSec = document.getElementById('Inquiry') || document.querySelector('.elementor-widget-form');
if (formSec) {
formSec.scrollIntoView({ behavior: 'smooth', block: 'start' });
setTimeout(function() {
var firstInput = formSec.querySelector('input[name*="name"], input[type="text"], input');
if (firstInput) {
firstInput.focus({ preventScroll: true });
}
}, 500);
}
};
// 14. DEDICATED LANGUAGE SWITCHER ENHANCER (Mobile & Desktop)
(function initLanguageSwitcherEnhancer() {
function enhanceSwitcher() {
var isFr = window.location.pathname.indexOf('/fr/') !== -1;
var targetUrl = isFr ? 'https://chaletslabellevie.ca/chalet-mysa-spa-porch-firepit/' : 'https://chaletslabellevie.ca/fr/chalet-mysa-spa-veranda-foyer/';
// A. Direct navigation on header switcher links
var headerLinks = document.querySelectorAll('header.elementor-location-header .cpel-switcher__lang:not(.cpel-switcher__lang--active) a, header.elementor-location-header .elementor-widget-polylang-language-switcher a');
headerLinks.forEach(function(a) {
var txt = (a.textContent || '').trim().toUpperCase();
if ((!isFr && txt.indexOf('FR') !== -1) || (isFr && txt.indexOf('EN') !== -1)) {
a.setAttribute('href', targetUrl);
a.onclick = function(e) {
e.preventDefault();
window.location.href = targetUrl;
};
}
});
// B. Inject language switcher into mobile hamburger menu
var mobileMenus = document.querySelectorAll('header.elementor-location-header .elementor-nav-menu--dropdown ul.elementor-nav-menu');
mobileMenus.forEach(function(menu) {
if (!menu.querySelector('.lbv-mobile-lang-item')) {
var li = document.createElement('li');
li.className = 'menu-item lbv-mobile-lang-item';
li.style.cssText = 'border-top: 1px solid rgba(214,169,117,0.3) !important; margin: 12px 14px 6px 14px !important; padding-top: 10px !important; list-style: none !important;';
var badge = isFr ? 'EN' : 'FR';
li.innerHTML = '
' +
'' + (isFr ? '🇬🇧 Switch to English' : ' Passer au Français') + ' ' +
'' + badge + ' ' +
' ';
var link = li.querySelector('a');
if (link) {
link.onclick = function(e) {
e.preventDefault();
window.location.href = targetUrl;
};
}
menu.appendChild(li);
}
});
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', enhanceSwitcher);
} else {
enhanceSwitcher();
}
setTimeout(enhanceSwitcher, 500);
setTimeout(enhanceSwitcher, 1500);
setTimeout(enhanceSwitcher, 3000);
})();
})();
) + avgRate + ' × ' + nights + ' nt):';
if (mbRateVal) mbRateVal.innerText = '
setInterval(checkAndCalculateDates, 350);
// 12. DIRECT CHECKOUT ROUTING (Guarantees zero drop-off of dates & guests)
window.lbvGoToCheckout = function() {
if (!selectedCheckInIso || !selectedCheckOutIso) {
window.lbvOpenCalendarModal();
updateMinStayNotice('initial');
return;
}
var minStay = getMinStayForCheckIn(selectedCheckInIso);
var dIn = new Date(selectedCheckInIso + 'T12:00:00');
var dOut = new Date(selectedCheckOutIso + 'T12:00:00');
var nights = Math.round((dOut - dIn) / (1000 * 60 * 60 * 24));
if (nights < minStay) {
window.lbvOpenCalendarModal();
updateMinStayNotice('violation', minStay, nights, selectedCheckInIso, selectedCheckOutIso);
return;
}
var checkoutUrl = 'https://book.chaletslabellevie.ca/checkout/' + lbvChaletHostawayId + '?start=' + selectedCheckInIso + '&end=' + selectedCheckOutIso + '&numberOfGuests=' + currentGuests;
window.location.href = checkoutUrl;
};
window.lbvHandleMainCta = function() { window.lbvGoToCheckout(); };
window.lbvHandleMobileCta = function() { window.lbvGoToCheckout(); };
// 13. INTERCEPT HOSTAWAy NATIVE WIDGET BUTTON WITH CAPTURE PHASE
function setupHostawayWidgetInterceptor() {
var calEl = document.getElementById('hostaway-calendar-widget');
if (!calEl) return;
calEl.addEventListener('click', function(e) {
var btn = e.target.closest('button');
if (btn && btn.textContent && /Reserve|Book|Réserver/i.test(btn.textContent)) {
e.preventDefault();
e.stopPropagation();
e.stopImmediatePropagation();
checkAndCalculateDates(true);
window.lbvGoToCheckout();
return false;
}
}, true);
}
setupHostawayWidgetInterceptor();
// 14. SMOOTH SCROLL TO INQUIRY CONTACT FORM
window.lbvScrollToInquiryForm = function(e) {
if (e && e.preventDefault) e.preventDefault();
var formSec = document.getElementById('Inquiry') || document.querySelector('.elementor-widget-form');
if (formSec) {
formSec.scrollIntoView({ behavior: 'smooth', block: 'start' });
setTimeout(function() {
var firstInput = formSec.querySelector('input[name*="name"], input[type="text"], input');
if (firstInput) {
firstInput.focus({ preventScroll: true });
}
}, 500);
}
};
// 14. DEDICATED LANGUAGE SWITCHER ENHANCER (Mobile & Desktop)
(function initLanguageSwitcherEnhancer() {
function enhanceSwitcher() {
var isFr = window.location.pathname.indexOf('/fr/') !== -1;
var targetUrl = isFr ? 'https://chaletslabellevie.ca/chalet-mysa-spa-porch-firepit/' : 'https://chaletslabellevie.ca/fr/chalet-mysa-spa-veranda-foyer/';
// A. Direct navigation on header switcher links
var headerLinks = document.querySelectorAll('header.elementor-location-header .cpel-switcher__lang:not(.cpel-switcher__lang--active) a, header.elementor-location-header .elementor-widget-polylang-language-switcher a');
headerLinks.forEach(function(a) {
var txt = (a.textContent || '').trim().toUpperCase();
if ((!isFr && txt.indexOf('FR') !== -1) || (isFr && txt.indexOf('EN') !== -1)) {
a.setAttribute('href', targetUrl);
a.onclick = function(e) {
e.preventDefault();
window.location.href = targetUrl;
};
}
});
// B. Inject language switcher into mobile hamburger menu
var mobileMenus = document.querySelectorAll('header.elementor-location-header .elementor-nav-menu--dropdown ul.elementor-nav-menu');
mobileMenus.forEach(function(menu) {
if (!menu.querySelector('.lbv-mobile-lang-item')) {
var li = document.createElement('li');
li.className = 'menu-item lbv-mobile-lang-item';
li.style.cssText = 'border-top: 1px solid rgba(214,169,117,0.3) !important; margin: 12px 14px 6px 14px !important; padding-top: 10px !important; list-style: none !important;';
var badge = isFr ? 'EN' : 'FR';
li.innerHTML = '
' +
'' + (isFr ? '🇬🇧 Switch to English' : ' Passer au Français') + ' ' +
'' + badge + ' ' +
' ';
var link = li.querySelector('a');
if (link) {
link.onclick = function(e) {
e.preventDefault();
window.location.href = targetUrl;
};
}
menu.appendChild(li);
}
});
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', enhanceSwitcher);
} else {
enhanceSwitcher();
}
setTimeout(enhanceSwitcher, 500);
setTimeout(enhanceSwitcher, 1500);
setTimeout(enhanceSwitcher, 3000);
})();
})();
+ baseVal.toFixed(2) + ' CAD';
if (mbCleaningVal) mbCleaningVal.innerText = '
setInterval(checkAndCalculateDates, 350);
// 12. DIRECT CHECKOUT ROUTING (Guarantees zero drop-off of dates & guests)
window.lbvGoToCheckout = function() {
if (!selectedCheckInIso || !selectedCheckOutIso) {
window.lbvOpenCalendarModal();
updateMinStayNotice('initial');
return;
}
var minStay = getMinStayForCheckIn(selectedCheckInIso);
var dIn = new Date(selectedCheckInIso + 'T12:00:00');
var dOut = new Date(selectedCheckOutIso + 'T12:00:00');
var nights = Math.round((dOut - dIn) / (1000 * 60 * 60 * 24));
if (nights < minStay) {
window.lbvOpenCalendarModal();
updateMinStayNotice('violation', minStay, nights, selectedCheckInIso, selectedCheckOutIso);
return;
}
var checkoutUrl = 'https://book.chaletslabellevie.ca/checkout/' + lbvChaletHostawayId + '?start=' + selectedCheckInIso + '&end=' + selectedCheckOutIso + '&numberOfGuests=' + currentGuests;
window.location.href = checkoutUrl;
};
window.lbvHandleMainCta = function() { window.lbvGoToCheckout(); };
window.lbvHandleMobileCta = function() { window.lbvGoToCheckout(); };
// 13. INTERCEPT HOSTAWAy NATIVE WIDGET BUTTON WITH CAPTURE PHASE
function setupHostawayWidgetInterceptor() {
var calEl = document.getElementById('hostaway-calendar-widget');
if (!calEl) return;
calEl.addEventListener('click', function(e) {
var btn = e.target.closest('button');
if (btn && btn.textContent && /Reserve|Book|Réserver/i.test(btn.textContent)) {
e.preventDefault();
e.stopPropagation();
e.stopImmediatePropagation();
checkAndCalculateDates(true);
window.lbvGoToCheckout();
return false;
}
}, true);
}
setupHostawayWidgetInterceptor();
// 14. SMOOTH SCROLL TO INQUIRY CONTACT FORM
window.lbvScrollToInquiryForm = function(e) {
if (e && e.preventDefault) e.preventDefault();
var formSec = document.getElementById('Inquiry') || document.querySelector('.elementor-widget-form');
if (formSec) {
formSec.scrollIntoView({ behavior: 'smooth', block: 'start' });
setTimeout(function() {
var firstInput = formSec.querySelector('input[name*="name"], input[type="text"], input');
if (firstInput) {
firstInput.focus({ preventScroll: true });
}
}, 500);
}
};
// 14. DEDICATED LANGUAGE SWITCHER ENHANCER (Mobile & Desktop)
(function initLanguageSwitcherEnhancer() {
function enhanceSwitcher() {
var isFr = window.location.pathname.indexOf('/fr/') !== -1;
var targetUrl = isFr ? 'https://chaletslabellevie.ca/chalet-mysa-spa-porch-firepit/' : 'https://chaletslabellevie.ca/fr/chalet-mysa-spa-veranda-foyer/';
// A. Direct navigation on header switcher links
var headerLinks = document.querySelectorAll('header.elementor-location-header .cpel-switcher__lang:not(.cpel-switcher__lang--active) a, header.elementor-location-header .elementor-widget-polylang-language-switcher a');
headerLinks.forEach(function(a) {
var txt = (a.textContent || '').trim().toUpperCase();
if ((!isFr && txt.indexOf('FR') !== -1) || (isFr && txt.indexOf('EN') !== -1)) {
a.setAttribute('href', targetUrl);
a.onclick = function(e) {
e.preventDefault();
window.location.href = targetUrl;
};
}
});
// B. Inject language switcher into mobile hamburger menu
var mobileMenus = document.querySelectorAll('header.elementor-location-header .elementor-nav-menu--dropdown ul.elementor-nav-menu');
mobileMenus.forEach(function(menu) {
if (!menu.querySelector('.lbv-mobile-lang-item')) {
var li = document.createElement('li');
li.className = 'menu-item lbv-mobile-lang-item';
li.style.cssText = 'border-top: 1px solid rgba(214,169,117,0.3) !important; margin: 12px 14px 6px 14px !important; padding-top: 10px !important; list-style: none !important;';
var badge = isFr ? 'EN' : 'FR';
li.innerHTML = '
' +
'' + (isFr ? '🇬🇧 Switch to English' : ' Passer au Français') + ' ' +
'' + badge + ' ' +
' ';
var link = li.querySelector('a');
if (link) {
link.onclick = function(e) {
e.preventDefault();
window.location.href = targetUrl;
};
}
menu.appendChild(li);
}
});
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', enhanceSwitcher);
} else {
enhanceSwitcher();
}
setTimeout(enhanceSwitcher, 500);
setTimeout(enhanceSwitcher, 1500);
setTimeout(enhanceSwitcher, 3000);
})();
})();
+ cleaningVal.toFixed(2) + ' CAD';
if (extraVal > 0) {
if (mbExtraGuestRow) mbExtraGuestRow.style.display = 'flex';
if (mbExtraGuestVal) mbExtraGuestVal.innerText = '
setInterval(checkAndCalculateDates, 350);
// 12. DIRECT CHECKOUT ROUTING (Guarantees zero drop-off of dates & guests)
window.lbvGoToCheckout = function() {
if (!selectedCheckInIso || !selectedCheckOutIso) {
window.lbvOpenCalendarModal();
updateMinStayNotice('initial');
return;
}
var minStay = getMinStayForCheckIn(selectedCheckInIso);
var dIn = new Date(selectedCheckInIso + 'T12:00:00');
var dOut = new Date(selectedCheckOutIso + 'T12:00:00');
var nights = Math.round((dOut - dIn) / (1000 * 60 * 60 * 24));
if (nights < minStay) {
window.lbvOpenCalendarModal();
updateMinStayNotice('violation', minStay, nights, selectedCheckInIso, selectedCheckOutIso);
return;
}
var checkoutUrl = 'https://book.chaletslabellevie.ca/checkout/' + lbvChaletHostawayId + '?start=' + selectedCheckInIso + '&end=' + selectedCheckOutIso + '&numberOfGuests=' + currentGuests;
window.location.href = checkoutUrl;
};
window.lbvHandleMainCta = function() { window.lbvGoToCheckout(); };
window.lbvHandleMobileCta = function() { window.lbvGoToCheckout(); };
// 13. INTERCEPT HOSTAWAy NATIVE WIDGET BUTTON WITH CAPTURE PHASE
function setupHostawayWidgetInterceptor() {
var calEl = document.getElementById('hostaway-calendar-widget');
if (!calEl) return;
calEl.addEventListener('click', function(e) {
var btn = e.target.closest('button');
if (btn && btn.textContent && /Reserve|Book|Réserver/i.test(btn.textContent)) {
e.preventDefault();
e.stopPropagation();
e.stopImmediatePropagation();
checkAndCalculateDates(true);
window.lbvGoToCheckout();
return false;
}
}, true);
}
setupHostawayWidgetInterceptor();
// 14. SMOOTH SCROLL TO INQUIRY CONTACT FORM
window.lbvScrollToInquiryForm = function(e) {
if (e && e.preventDefault) e.preventDefault();
var formSec = document.getElementById('Inquiry') || document.querySelector('.elementor-widget-form');
if (formSec) {
formSec.scrollIntoView({ behavior: 'smooth', block: 'start' });
setTimeout(function() {
var firstInput = formSec.querySelector('input[name*="name"], input[type="text"], input');
if (firstInput) {
firstInput.focus({ preventScroll: true });
}
}, 500);
}
};
// 14. DEDICATED LANGUAGE SWITCHER ENHANCER (Mobile & Desktop)
(function initLanguageSwitcherEnhancer() {
function enhanceSwitcher() {
var isFr = window.location.pathname.indexOf('/fr/') !== -1;
var targetUrl = isFr ? 'https://chaletslabellevie.ca/chalet-mysa-spa-porch-firepit/' : 'https://chaletslabellevie.ca/fr/chalet-mysa-spa-veranda-foyer/';
// A. Direct navigation on header switcher links
var headerLinks = document.querySelectorAll('header.elementor-location-header .cpel-switcher__lang:not(.cpel-switcher__lang--active) a, header.elementor-location-header .elementor-widget-polylang-language-switcher a');
headerLinks.forEach(function(a) {
var txt = (a.textContent || '').trim().toUpperCase();
if ((!isFr && txt.indexOf('FR') !== -1) || (isFr && txt.indexOf('EN') !== -1)) {
a.setAttribute('href', targetUrl);
a.onclick = function(e) {
e.preventDefault();
window.location.href = targetUrl;
};
}
});
// B. Inject language switcher into mobile hamburger menu
var mobileMenus = document.querySelectorAll('header.elementor-location-header .elementor-nav-menu--dropdown ul.elementor-nav-menu');
mobileMenus.forEach(function(menu) {
if (!menu.querySelector('.lbv-mobile-lang-item')) {
var li = document.createElement('li');
li.className = 'menu-item lbv-mobile-lang-item';
li.style.cssText = 'border-top: 1px solid rgba(214,169,117,0.3) !important; margin: 12px 14px 6px 14px !important; padding-top: 10px !important; list-style: none !important;';
var badge = isFr ? 'EN' : 'FR';
li.innerHTML = '
' +
'' + (isFr ? '🇬🇧 Switch to English' : ' Passer au Français') + ' ' +
'' + badge + ' ' +
' ';
var link = li.querySelector('a');
if (link) {
link.onclick = function(e) {
e.preventDefault();
window.location.href = targetUrl;
};
}
menu.appendChild(li);
}
});
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', enhanceSwitcher);
} else {
enhanceSwitcher();
}
setTimeout(enhanceSwitcher, 500);
setTimeout(enhanceSwitcher, 1500);
setTimeout(enhanceSwitcher, 3000);
})();
})();
+ extraVal.toFixed(2) + ' CAD';
} else {
if (mbExtraGuestRow) mbExtraGuestRow.style.display = 'none';
}
if (mbSalesTax) mbSalesTax.innerText = formatMoney(salesTaxVal);
if (mbVatTax) mbVatTax.innerText = formatMoney(vatVal);
if (mbLodgingTax) mbLodgingTax.innerText = formatMoney(lodgingTaxVal);
if (mbGrandTotal) mbGrandTotal.innerText = formatMoney(total);
})
.catch(function(err) {
console.warn('Hostaway quote fetch error:', err);
});
}
setInterval(checkAndCalculateDates, 350);
// 12. DIRECT CHECKOUT ROUTING (Guarantees zero drop-off of dates & guests)
window.lbvGoToCheckout = function() {
if (!selectedCheckInIso || !selectedCheckOutIso) {
window.lbvOpenCalendarModal();
updateMinStayNotice('initial');
return;
}
var minStay = getMinStayForCheckIn(selectedCheckInIso);
var dIn = new Date(selectedCheckInIso + 'T12:00:00');
var dOut = new Date(selectedCheckOutIso + 'T12:00:00');
var nights = Math.round((dOut - dIn) / (1000 * 60 * 60 * 24));
if (nights < minStay) {
window.lbvOpenCalendarModal();
updateMinStayNotice('violation', minStay, nights, selectedCheckInIso, selectedCheckOutIso);
return;
}
var checkoutUrl = 'https://book.chaletslabellevie.ca/checkout/' + lbvChaletHostawayId + '?start=' + selectedCheckInIso + '&end=' + selectedCheckOutIso + '&numberOfGuests=' + currentGuests;
window.location.href = checkoutUrl;
};
window.lbvHandleMainCta = function() { window.lbvGoToCheckout(); };
window.lbvHandleMobileCta = function() { window.lbvGoToCheckout(); };
// 13. INTERCEPT HOSTAWAy NATIVE WIDGET BUTTON WITH CAPTURE PHASE
function setupHostawayWidgetInterceptor() {
var calEl = document.getElementById('hostaway-calendar-widget');
if (!calEl) return;
calEl.addEventListener('click', function(e) {
var btn = e.target.closest('button');
if (btn && btn.textContent && /Reserve|Book|Réserver/i.test(btn.textContent)) {
e.preventDefault();
e.stopPropagation();
e.stopImmediatePropagation();
checkAndCalculateDates(true);
window.lbvGoToCheckout();
return false;
}
}, true);
}
setupHostawayWidgetInterceptor();
// 14. SMOOTH SCROLL TO INQUIRY CONTACT FORM
window.lbvScrollToInquiryForm = function(e) {
if (e && e.preventDefault) e.preventDefault();
var formSec = document.getElementById('Inquiry') || document.querySelector('.elementor-widget-form');
if (formSec) {
formSec.scrollIntoView({ behavior: 'smooth', block: 'start' });
setTimeout(function() {
var firstInput = formSec.querySelector('input[name*="name"], input[type="text"], input');
if (firstInput) {
firstInput.focus({ preventScroll: true });
}
}, 500);
}
};
// 14. DEDICATED LANGUAGE SWITCHER ENHANCER (Mobile & Desktop)
(function initLanguageSwitcherEnhancer() {
function enhanceSwitcher() {
var isFr = window.location.pathname.indexOf('/fr/') !== -1;
var targetUrl = isFr ? 'https://chaletslabellevie.ca/chalet-mysa-spa-porch-firepit/' : 'https://chaletslabellevie.ca/fr/chalet-mysa-spa-veranda-foyer/';
// A. Direct navigation on header switcher links
var headerLinks = document.querySelectorAll('header.elementor-location-header .cpel-switcher__lang:not(.cpel-switcher__lang--active) a, header.elementor-location-header .elementor-widget-polylang-language-switcher a');
headerLinks.forEach(function(a) {
var txt = (a.textContent || '').trim().toUpperCase();
if ((!isFr && txt.indexOf('FR') !== -1) || (isFr && txt.indexOf('EN') !== -1)) {
a.setAttribute('href', targetUrl);
a.onclick = function(e) {
e.preventDefault();
window.location.href = targetUrl;
};
}
});
// B. Inject language switcher into mobile hamburger menu
var mobileMenus = document.querySelectorAll('header.elementor-location-header .elementor-nav-menu--dropdown ul.elementor-nav-menu');
mobileMenus.forEach(function(menu) {
if (!menu.querySelector('.lbv-mobile-lang-item')) {
var li = document.createElement('li');
li.className = 'menu-item lbv-mobile-lang-item';
li.style.cssText = 'border-top: 1px solid rgba(214,169,117,0.3) !important; margin: 12px 14px 6px 14px !important; padding-top: 10px !important; list-style: none !important;';
var badge = isFr ? 'EN' : 'FR';
li.innerHTML = '
' +
'' + (isFr ? '🇬🇧 Switch to English' : ' Passer au Français') + ' ' +
'' + badge + ' ' +
' ';
var link = li.querySelector('a');
if (link) {
link.onclick = function(e) {
e.preventDefault();
window.location.href = targetUrl;
};
}
menu.appendChild(li);
}
});
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', enhanceSwitcher);
} else {
enhanceSwitcher();
}
setTimeout(enhanceSwitcher, 500);
setTimeout(enhanceSwitcher, 1500);
setTimeout(enhanceSwitcher, 3000);
})();
})();