if(document.getElementById('sharing')){shareButton=document.getElementById('sharing');shareButton.addEventListener('click',event=>{if(navigator.share){navigator.share({title:document.title,url:document.URL}).then(()=>{console.log('Thanks for sharing!')}).catch(console.error)}})}
function changeForm(uid,option){var form=document.getElementById(uid);var child=form.querySelector('#select');form.scrollIntoView();child.selectedIndex=option}
function disableSharing(uid){var sharing=document.getElementById(uid);sharing.classList.add('hidden')}
function openImage(url){const openlightbox=GLightbox({touchNavigation:!0,zoomable:!1,draggable:!1,elements:[{'href':url}]});openlightbox.open()}
function changePage(el,url,number){el.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" width="24" height="24" viewBox="0 0 24 24"><path d="M13.75 22c0 .966-.783 1.75-1.75 1.75s-1.75-.784-1.75-1.75.783-1.75 1.75-1.75 1.75.784 1.75 1.75zm-1.75-22c-1.104 0-2 .896-2 2s.896 2 2 2 2-.896 2-2-.896-2-2-2zm10 10.75c.689 0 1.249.561 1.249 1.25 0 .69-.56 1.25-1.249 1.25-.69 0-1.249-.559-1.249-1.25 0-.689.559-1.25 1.249-1.25zm-22 1.25c0 1.105.896 2 2 2s2-.895 2-2c0-1.104-.896-2-2-2s-2 .896-2 2zm19-8c.551 0 1 .449 1 1 0 .553-.449 1.002-1 1-.551 0-1-.447-1-.998 0-.553.449-1.002 1-1.002zm0 13.5c.828 0 1.5.672 1.5 1.5s-.672 1.501-1.502 1.5c-.826 0-1.498-.671-1.498-1.499 0-.829.672-1.501 1.5-1.501zm-14-14.5c1.104 0 2 .896 2 2s-.896 2-2.001 2c-1.103 0-1.999-.895-1.999-2s.896-2 2-2zm0 14c1.104 0 2 .896 2 2s-.896 2-2.001 2c-1.103 0-1.999-.895-1.999-2s.896-2 2-2z"/></svg>';var request=ajax({method:'post',data:{number:number},url:url+'?'+Date.now(),})
request.then(function(response){if(response){el.parentNode.parentNode.innerHTML=response;window.history.pushState(null,null,url+':'+number)}});return!1}
function loadCards(button,uid,source){var button=button;button.querySelector('div').classList.toggle('hidden');var ul=document.getElementById("gallery-"+uid);var list=ul.getElementsByTagName("li");var length=list.length;var request=ajax({method:'get',url:source,data:{f:length}})
request.then(function(response,macy){ul.insertAdjacentHTML('beforeend',response.result);if(length+6>=response.count){button.hidden=!0}else{button.querySelector('span').classList.toggle('hidden')}
const ajaxlightbox=GLightbox({selector:'.ajax-lightbox'});ajaxlightbox.reload()})}
function isInViewport(el){const rect=el.getBoundingClientRect();return(rect.top>=0&&rect.left>=0&&rect.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&rect.right<=(window.innerWidth||document.documentElement.clientWidth))}
function ctaEvent(uri,type='ctaClick'){window.dataLayer=window.dataLayer||[];window.dataLayer.push({'event':'ctaClick','location':uri});_paq=_paq||[];_paq.push(['trackEvent',type,uri])}