Chalet Mysa – Chalet de Luxe 5 Chambres avec Spa à Labelle

Chalet Scandinave en Bois Rond • 14 personnes • 5 chambres • 3 salles de bain • Région de Mont-Tremblant
✦ MEILLEUR TARIF HÔTE GARANTI • AVANTAGE EN DIRECT
Économisez jusqu’à 15% vs grandes plateformes
Réservez directement avec notre équipe locale pour garantir le tarif le plus bas disponible pour le Chalet MYSA, sans aucun frais de service intermédiaire.
Pourquoi nos tarifs directs sont plus avantageux ▾

1. Zéro commission intermédiaire : Les plateformes tierces ajoutent 14% à 16% de frais voyageurs. Réserver direct élimine ces frais.

2. Conciergerie locale dédiée : Échangez directement avec notre équipe des Laurentides pour vos demandes de séjour.

3. Flexibilité d’accueil : Arrivée hâtive ou départ tardif privilégiés selon disponibilité.

Équipements Haut de Gamme & Spa 4 Saisons

Avis Vérifiés & Expériences 5 Étoiles (Note 4.8)

Propreté ★ 10/10
Communication ★ 10/10
Arrivée ★ 10/10
Précision ★ 9.9/10
Emplacement ★ 9.8/10
Qualité-prix ★ 9.8/10
★★★★★ 5.0
Séjour airbnb vérifié

“Séjour incroyable, maison magnifique avec une vue superbe sur les montagnes. Endroit très moderne et spacieux tout en conservant une belle ambiance montagnarde. Hôte très réactif qui s'est surpassé pour nous aider. Recommandé à 10/10!”

Jacob
Chalets La Belle Vie • Août 2025
★
★★★★★ 5.0
Séjour voyageur vérifié

“Le chalet est très bien aménagé, spacieux et très confortable. Il est très bien équipé et très propre. Nous avons passé un excellent séjour en famille. Je le recommanderais sans hésiter.”

Franck
Chalets La Belle Vie • Sep 2025
✦
★★★★★ 5.0
Séjour airbnb vérifié

“Le chalet était magnifique et disposait de toutes les commodités nécessaires pour notre séjour. Nous avons pu y loger très confortablement jusqu'à 15 personnes et avons profité de chaque instant! Fortement recommandé.”

Dmytro
Chalets La Belle Vie • Sep 2025
★
★★★★★ 5.0
Séjour voyageur vérifié

“J'ai passé un séjour exceptionnel entre amis dans ce chalet somptueux et très spacieux. Le chalet était également très propre et bien entretenu. Notre hôte était très réactif et accommodant à chaque instant pour le check-in et check-out. Les alentours étaient magnifiques avec les couleurs d'automne. Un chalet que je recommande sans hésitation !”

Mathieu
Chalets La Belle Vie • Oct 2024
✦
★★★★★ 5.0
Séjour airbnb vérifié

“Nous venons de terminer un séjour de 5 nuits. La maison était magnifique et les vues sur les montagnes spectaculaires. La cuisine était parfaitement équipée et l'ambiance chaleureuse comme à la maison. Nous avons beaucoup apprécié la réactivité de l'hôte tout au long du séjour.”

Jennifer
Chalets La Belle Vie • Fév 2025
★
★★★★★ 5.0
Séjour voyageur vérifié

“Superbe endroit, excellents hôtes. Très propre et un endroit incroyablement paisible dans les Laurentides. Tout a été fluide de l'arrivée au départ. Nous reviendrons sans hésiter!”

Robert
Chalets La Belle Vie • Juin 2025
✦
★★★★★ 5.0
Séjour airbnb vérifié

“Séjour incroyable, maison magnifique avec une vue superbe sur les montagnes. Endroit très moderne et spacieux tout en conservant une belle ambiance montagnarde. Hôte très réactif qui s'est surpassé pour nous aider. Recommandé à 10/10!”

Jacob
Chalets La Belle Vie • Août 2025
★
★★★★★ 5.0
Séjour voyageur vérifié

“Le chalet est très bien aménagé, spacieux et très confortable. Il est très bien équipé et très propre. Nous avons passé un excellent séjour en famille. Je le recommanderais sans hésiter.”

Franck
Chalets La Belle Vie • Sep 2025
✦
★★★★★ 5.0
Séjour airbnb vérifié

“Le chalet était magnifique et disposait de toutes les commodités nécessaires pour notre séjour. Nous avons pu y loger très confortablement jusqu'à 15 personnes et avons profité de chaque instant! Fortement recommandé.”

Dmytro
Chalets La Belle Vie • Sep 2025
★
★★★★★ 5.0
Séjour voyageur vérifié

“J'ai passé un séjour exceptionnel entre amis dans ce chalet somptueux et très spacieux. Le chalet était également très propre et bien entretenu. Notre hôte était très réactif et accommodant à chaque instant pour le check-in et check-out. Les alentours étaient magnifiques avec les couleurs d'automne. Un chalet que je recommande sans hésitation !”

Mathieu
Chalets La Belle Vie • Oct 2024
✦
★★★★★ 5.0
Séjour airbnb vérifié

“Nous venons de terminer un séjour de 5 nuits. La maison était magnifique et les vues sur les montagnes spectaculaires. La cuisine était parfaitement équipée et l'ambiance chaleureuse comme à la maison. Nous avons beaucoup apprécié la réactivité de l'hôte tout au long du séjour.”

Jennifer
Chalets La Belle Vie • Fév 2025
★
★★★★★ 5.0
Séjour voyageur vérifié

“Superbe endroit, excellents hôtes. Très propre et un endroit incroyablement paisible dans les Laurentides. Tout a été fluide de l'arrivée au départ. Nous reviendrons sans hésiter!”

Robert
Chalets La Belle Vie • Juin 2025
✦
Avis 100% récents et vérifiés • Provenant directement de notre PMS Hostaway et de séjours Airbnb vérifiés
Vérifier les dates pour le Chalet Mysa →

Emplacement Privilégié & Attraits à Proximité (Labelle & Mont-Tremblant)

Labelle, Québec, Canada (Région de Mont-Tremblant) • Refuge privé au sommet d’une colline entouré de forêt laurentienne, sans aucun voisin immédiat pour une quiétude absolue.
Proximité & Attraits Régionaux des Laurentides :
• Parc national du Mont-Tremblant : ~15 min
• Station de ski Mont-Tremblant : ~25 min
• Piste cyclable P’tit Train du Nord : ~5 min
• Accès au lac & kayak à Labelle : ~5 min
• Village de Labelle (Commerces & restos) : ~5 min
• Station de ski Mont Blanc : ~20 min
Emplacement approximatif affiché pour préserver la quiétude des lieux. L’itinéraire exact et les codes d’accès numériques sont transmis lors de la confirmation de réservation.

Bon à Savoir – Règlements & Politiques de Séjour

Règlement intérieur

Arrivée: 17:00
Animaux: autorisés (frais de 80 $)
Départ: 11:00
Fumer à l’intérieur: interdit

Politique d'annulation

Chambres & Hébergement de Groupe (Jusqu'à 14 Personnes)

Accueille confortablement jusqu’à 14 invités répartis dans 5 chambres avec literie hôtelière soignée :
Chambre 1
1 Lit King (2 pers.)
Chambre 2 & 3
2 Lits Queen (4 pers.)
Chambre 4
2 Lits superposés (4 pers.)
Chambre 5
1 Lit double (2 pers.)
Salon familial
Canapé-lit + Lit simple (3 pers.)

Assistance & Conciergerie Dédiée

Demandes spéciales, retraites corporatives ou questions sur le Chalet MYSA? Notre équipe locale des Laurentides est à votre entière disposition pour personnaliser votre séjour.

Contacter la conciergerie → ou écrivez à [email protected] • Réponse sous 2 heures
TARIF DU JOUR
✦ Hôte Vérifié
Dès 290 $ CAD / nuit
~41 $ CAD / pers.
✓ Économisez vs Airbnb
0 % frais · Économisez 15 % en direct
ARRIVÉE Ajouter date
DÉPART Ajouter date
VOYAGEURS 14 voyageurs
⌵
Détail des tarifs et frais
Zéro frais cachés ▾
Meilleur tarif direct garanti
Dès 290 $ / nt ★ 4.8 (0+)
Ajoutez des dates pour le devis saisonnier
+ 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); })(); })();