PageSourceSearch

https://michellecoombsphotography.com/assets/js/site.4befcda35596.js?v=20261002-refined

js michellecoombsphotography.com collected 2026-10-04 20:41:26 UTC 12,336 bytes, 94 lines download raw bytes

1(()=>{
2  const toggle=document.querySelector('[data-menu-toggle]');
3  const menu=document.querySelector('[data-menu]');
4  const header=document.querySelector('[data-header]')||document.querySelector('.site-header');
5  const mobile=window.matchMedia('(max-width:1060px)');
6  const buttons=[...document.querySelectorAll('.has-menu>.nav-button')];
7  const collapseSubmenus=()=>buttons.forEach(button=>button.setAttribute('aria-expanded','false'));
8  buttons.forEach((button,index)=>{
9    const submenu=button.nextElementSibling;
10    if(submenu?.classList.contains('subnav')){
11      if(!submenu.id)submenu.id='site-subnav-'+index;
12      button.setAttribute('aria-controls',submenu.id);
13    }
14    button.addEventListener('click',()=>{
15      const open=button.getAttribute('aria-expanded')==='true';
16      collapseSubmenus();
17      button.setAttribute('aria-expanded',String(!open));
18    });
19  });
20  const setMenu=(open,restoreFocus=false)=>{
21    if(!toggle||!menu)return;
22    if(open&&header)menu.style.setProperty('--menu-top',header.getBoundingClientRect().height+'px');
23    toggle.setAttribute('aria-expanded',String(open));
24    toggle.setAttribute('aria-label',open?'Close navigation':'Open navigation');
25    const label=toggle.querySelector('.sr-only');
26    if(label)label.textContent=open?'Close navigation':'Open navigation';
27    menu.classList.toggle('is-open',open);
28    document.body.classList.toggle('menu-open',open);
29    if(!open){
30      collapseSubmenus();
31      menu.scrollTop=0;
32      if(restoreFocus)toggle.focus();
33    }
34  };
35  if(toggle&&menu){
36    setMenu(false);
37    toggle.addEventListener('click',()=>setMenu(toggle.getAttribute('aria-expanded')!=='true'));
38    menu.addEventListener('click',event=>{
39      if(mobile.matches&&event.target.closest('a'))setMenu(false);
40    });
41    document.addEventListener('keydown',event=>{
42      const open=toggle.getAttribute('aria-expanded')==='true';
43      if(event.key==='Escape'){
44        const expanded=buttons.find(button=>button.getAttribute('aria-expanded')==='true');
45        if(open){event.preventDefault();setMenu(false,true);}
46        else if(expanded){event.preventDefault();collapseSubmenus();expanded.focus();}
47      }
48      if(event.key==='Tab'&&open&&mobile.matches){
49        const focusable=[toggle,...menu.querySelectorAll('a[href],button:not([disabled])')]
50          .filter(element=>element.getClientRects().length&&getComputedStyle(element).visibility!=='hidden');
51        const first=focusable[0],last=focusable[focusable.length-1];
52        if(event.shiftKey&&document.activeElement===first){event.preventDefault();last.focus();}
53        else if(!event.shiftKey&&document.activeElement===last){event.preventDefault();first.focus();}
54      }
55    });
56    mobile.addEventListener('change',()=>setMenu(false));
57    window.addEventListener('pageshow',()=>setMenu(false));
58  }
59  document.addEventListener('click',event=>{
60    if(!event.target.closest('.has-menu'))collapseSubmenus();
61    if(toggle&&menu&&toggle.getAttribute('aria-expanded')==='true'&&!menu.contains(event.target)&&!toggle.contains(event.target))setMenu(false);
62  });
63  const fs=document.querySelectorAll('[data-filter]'),items=document.querySelectorAll('[data-portfolio-item]');fs.forEach(b=>b.addEventListener('click',()=>{const f=b.dataset.filter;fs.forEach(x=>x.setAttribute('aria-pressed',String(x===b)));items.forEach(i=>i.hidden=f!=='all'&&i.dataset.category!==f)}));document.querySelectorAll('[data-track]').forEach(el=>el.addEventListener('click',()=>window.dispatchEvent(new CustomEvent('mcp:conversion',{detail:{action:el.dataset.track,href:el.getAttribute('href')}}))));})();
64
65;(()=>{document.querySelectorAll('[data-gallery-rail]').forEach(s=>{const r=s.querySelector('.gallery-rail');if(!r)return;const amt=()=>Math.min(r.clientWidth*.82,520);s.querySelector('.rail-prev')?.addEventListener('click',()=>r.scrollBy({left:-amt(),behavior:'smooth'}));s.querySelector('.rail-next')?.addEventListener('click',()=>r.scrollBy({left:amt(),behavior:'smooth'}));});})();
66;(()=>{document.querySelectorAll('[data-testimonial-slider]').forEach(sli
66der=>{const track=slider.querySelector('.testimonial-track'),viewport=slider.querySelector('.testimonial-viewport'),slides=[...slider.querySelectorAll('[data-testimonial-slide]')],dotsWrap=slider.querySelector('.testimonial-dots'),prev=slider.querySelector('.testimonial-prev'),next=slider.querySelector('.testimonial-next');if(!track||!viewport||slides.length<2)return;let index=0,timer=null,startX=null;const dots=slides.map((_,i)=>{const dot=document.createElement('button');dot.className='testimonial-dot';dot.type='button';dot.setAttribute('aria-label',`Show review ${i+1}`);dot.addEventListener('click',()=>show(i,true));dotsWrap?.append(dot);return dot});const show=(nextIndex,userInitiated=false)=>{index=(nextIndex+slides.length)%slides.length;track.style.transform=`translateX(-${index*100}%)`;slides.forEach((slide,i)=>slide.setAttribute('aria-hidden',i===index?'false':'true'));dots.forEach((dot,i)=>dot.setAttribute('aria-current',i===index?'true':'false'));if(userInitiated)restart()};const stop=()=>{if(timer){window.clearInterval(timer);timer=null}};const start=()=>{if(!window.matchMedia('(prefers-reduced-motion: reduce)').matches&&!timer)timer=window.setInterval(()=>show(index+1),8000)};const restart=()=>{stop();start()};prev?.addEventListener('click',()=>show(index-1,true));next?.addEventListener('click',()=>show(index+1,true));slider.addEventListener('keydown',event=>{if(event.key==='ArrowLeft'){event.preventDefault();show(index-1,true)}if(event.key==='ArrowRight'){event.preventDefault();show(index+1,true)}});viewport.addEventListener('pointerdown',event=>{startX=event.clientX;viewport.setPointerCapture?.(event.pointerId)});viewport.addEventListener('pointerup',event=>{if(startX===null)return;const distance=event.clientX-startX;startX=null;if(Math.abs(distance)>45)show(index+(distance<0?1:-1),true)});slider.addEventListener('mouseenter',stop);slider.addEventListener('mouseleave',start);slider.addEventListener('focusin',stop);slider.addEventListener('focusout',event=>{if(!slider.contains(event.relatedTarget))start()});document.addEventListener('visibilitychange',()=>document.hidden?stop():start());show(0);start()})})();
67
68;(()=>{const bookingUrl='https://mcpcollective.client.photos/bookings';const labels=new Set(['Book Online','Check Availability','View Availability & Book','View Availability & Book Online','View Dates & Book','View dates & book','Book this session']);document.querySelectorAll('header a[data-track="header-inquiry"]').forEach(link=>{link.href=bookingUrl;link.textContent='View Availability & Book Online';link.dataset.track='book-online';link.target='_blank';link.rel='noopener';link.setAttribute('aria-label','View live availability and book online (opens in a new tab)')});document.querySelectorAll('a[href="'+bookingUrl+'"]').forEach(link=>{const label=link.textContent.trim();if(labels.has(label))link.textContent=link.closest('header')?'Book Online':'View Availability & Book Online';link.setAttribute('aria-label','View live availability and book online (opens in a new tab)')});document.querySelectorAll('header .has-menu').forEach(item=>{const button=item.querySelector(':scope>.nav-button'),subnav=item.querySelector(':scope>.subnav');if(!button||!subnav)return;if(button.textContent.trim()==='Families'){button.textContent='Services';if(!subnav.querySelector('a[href="/central-florida-wedding-photographer/"]')){const wedding=document.createElement('a');wedding.href='/central-florida-wedding-photographer/';wedding.textContent='Weddings';const process=subnav.querySelector('a[href="/process/"]');process?subnav.insertBefore(wedding,process):subnav.append(wedding)}}});const allowed=['page-home','page-about','page-pricing','page-family','page-extended','page-vacation','page-newborn','page-studio','page-locations','page-beach','page-nsb','page-cocoa','page-daytona','page-ponce','page-palm','page-staug','page-portfolio','page-reviews','page-process'].some(name=>document.body.classList.contains(name));if(!allowed||document.querySelector('.mobile-booking-bar'))return;const bar=document.createElement('aside');bar.className='mobile-booking-bar';bar.setAttribute('aria-label','Session inquiry and booking options');bar.innerHTML='<a class="button" data-track="session-inquiry-mobile" href="/contact-me/#session-inquiry">Ask About Your Session</a><a class="button button-ghost" data-track="book-online-mobile" href="'+bookingUrl+'" rel="noopener" target="_blank">Book Online</a>';document.body.append(bar);document.body.classList.add('has-mobile-booking-bar');bar.querySelector('[data-track]')?.addEventListener('click',event=>window.dispatchEvent(new CustomEvent('mcp:conversion',{detail:{action:event.currentTarget.dataset.track,href:event.currentTarget.getAttribute('href')}})))})();
69
70;(()=>{const altFixes={'/assets/images/portfolio/02-mother-holding-her-young-child-orlando-vacation-portrait-session-1200.webp':'Mother holding her young child during an Orlando vacation portrait session'};document.querySelectorAll('img[src]').forEach(img=>{const key=img.getAttribute('src');if(altFixes[key])img.alt=altFixes[key]})})();
71
72;(()=>{const path=location.pathname.replace(/\/+$/,'')||'/';const copy={
73'/':{eyebrow:'Questions before you book?',heading:'Tell us what you’re planning.',text:'Not quite ready to reserve a date? Send a quick note and we’ll help you figure out the right session, location or next step.'},
74'/central-florida-wedding-photographer':{eyebrow:'Planning your wedding?',heading:'Tell us about your day.',text:'Share your date, venue and what you’re planning. We’ll reply with availability and the wedding photography options that fit best.'},
75'/central-florida-newborn-photography':{eyebrow:'Have a newborn question?',heading:'Tell us what you’re planning.',text:'Share your due date or baby’s age, who you’d like included and whether you’re considering the studio or an in-home session.'}
76};const c=copy[path];if(!c||document.querySelector('[data-page-inquiry-form]'))return;const main=document.querySelector('main');if(!main)return;const section=document.createElement('section');section.className='section section-paper';section.setAttribute('data-page-inquiry-form','');section.innerHTML='<div class="shell"><div class="section-heading center"><p class="eyebrow">'+c.eyebrow+'</p><h2>'+c.heading+'</h2><p class="lead">'+c.text+'</p></div><div class="form-frame" style="max-width:980px;margin:0 auto;"><div class="sprout-form" data-sprout-form><iframe id="sprout-iframe-page-inquiry" src="https://api.sproutstudio.com/leads/viewform/4df1aad5ebb79667288d3addeea2833d661c741aa1bb9045/1729302" frameborder="0" scrolling="yes" style="display:block;margin:0;padding:0;width:1px;min-width:100%;height:1000px;" title="Photography session inquiry form"></iframe></div><noscript><p>Please email <a href="mailto:[email protected]">[email protected]</a> to inquire.</p></noscript></div></div>';main.append(section)})();
77
78
79;(()=>{document.querySelectorAll('header nav.site-nav').forEach(nav=>{if(nav.querySelector(':scope > a[href="/contact-me/"]'))return;const link=document.createElement('a');link.className='nav-link';link.href='/contact-me/';link.textContent='Contact';link.dataset.track='contact-nav';const booking=nav.querySelector(':scope > a.button');nav.insertBefore(link,booking||null)})})();
80
81;(()=>{
82  // Extend the same inquiry choice to existing session pages using the shared script.
83  const form=document.querySelector('main section[data-page-inquiry-form]');
84  if(form&&!document.body.classList.contains('page-wedding')){
85    if(!form.id)form.id='session-inquiry';
86    document.querySelectorAll('main .hero-copy .button-row').forEach(row=>{
87      if(!row.querySelector('a[href*="client.photos/bookings"]')||row.querySelector('[data-track="session-inquiry"]'))return;
88      const inquiry=document.createElement('a');inquiry.className='button';
88inquiry.href='#'+form.id;inquiry.dataset.track='session-inquiry';inquiry.textContent='Ask About Your Session';
89      row.prepend(inquiry);
90      row.querySelectorAll('a[href*="client.photos/bookings"]').forEach(a=>a.classList.add('button-ghost'));
91      row.querySelectorAll('a[href="/investment/"]').forEach(a=>a.className='text-link');
92    });
93  }
94})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.