'+
'
Your message has been received.
'+
'
Thank you for contacting Find A Doctor Canada. We usually respond within 1-2 business days. Clinic corrections may be verified before the listing is updated.
'+
'
';
}
function decorateConfirmation(){
if(!slot)return;
var confirmation=slot.querySelector('.wpforms-confirmation-container-full,.wpforms-confirmation-container');
if(!confirmation || confirmation.dataset.fadcStyled==='1')return;
confirmation.dataset.fadcStyled='1';
confirmation.innerHTML=successMarkup();
}
if(!moveContactForm()){
var attempts=0;
var timer=setInterval(function(){
attempts++;
if(moveContactForm() || attempts>48)clearInterval(timer);
},250);
}
if(slot){
new MutationObserver(function(){
decorateConfirmation();
}).observe(slot,{childList:true,subtree:true});
}
// On the live page, select and scroll in place. If the real form is absent, the normal href still works.
document.querySelectorAll('a.fadc-reason').forEach(function(control){
control.addEventListener('click',function(event){
var live=slot && slot.querySelector('form.wpforms-form');
if(!live)return;
var reason=control.getAttribute('data-reason');
event.preventDefault();
applyReason(reason,control,true);
});
});
function applyUrlReason(){
var reason=new URLSearchParams(window.location.search).get('reason');
if(reason)applyReason(reason,null,true);
}
relabelReasonSelect(document.getElementById('fadc-preview-reason'));
setTimeout(applyUrlReason,400);
setTimeout(applyUrlReason,1000);
// Mobile ticker: one readable message at a time. It is informational, not a moving row of tap targets.
function initMobileTicker(){
if(!window.matchMedia('(max-width: 640px)').matches)return;
if(window.matchMedia('(prefers-reduced-motion: reduce)').matches)return;
var group=document.querySelector('.fadc-live-group:first-child');
if(!group)return;
var items=Array.from(group.querySelectorAll('.fadc-live-item'));
if(items.length<2)return;
var index=0,pausedUntil=0;
function advance(){
if(Date.now()