document.body.addEventListener('mousemove',e=>{let offsetX=(e.screenX/window.innerWidth);let offsetY=(e.screenY/window.innerHeight);if(document.querySelectorAll('.headline img').length>1){document.querySelector('.img-headline-1-2').style.transform="translate("+(offsetX*12)+"px, "+(offsetY*8)+"px)";document.querySelector('.img-headline-1-1').style.transform="translate("+(offsetX*8)+"px, "+(offsetY*6)+"px)";}}) Number.prototype.format=function(n,x){var re='\\d(?=(\\d{'+(x||3)+'})+'+(n>0?'\\.':'$')+')';return this.toFixed(Math.max(0,~~n)).replace(new RegExp(re,'g'),'$&,');};document.querySelectorAll('.opt-group-item input').forEach(input=>{input.addEventListener("change",event=>{calculateTotal();});});if(document.querySelectorAll("#read_options").length>0){document.querySelector("#read_options").value=1;} function calculateTotal(){let priceMod=0;document.querySelectorAll('.opt-group-item input').forEach(input=>{if(input.checked){priceMod+=parseFloat(input.dataset.pricemod);}});document.querySelectorAll('.total-price [data-base-price]').forEach(total=>{let totalPrice=(parseFloat(total.dataset.basePrice)+priceMod);total.innerHTML='$ '+totalPrice.format();});} calculateTotal();if(document.querySelectorAll('.modal .modal-close').length>0){document.querySelectorAll('.modal .modal-close').forEach(closeBtn=>{closeBtn.addEventListener('click',e=>{e.preventDefault();document.querySelector('.modal-backdrop').remove();});});} if(document.querySelectorAll('a.country-btn').length>0){document.querySelector('a.country-btn').addEventListener('click',e=>{document.querySelector('a.country-btn').remove();})} if(document.querySelectorAll('.copy').length>0){document.querySelectorAll('.copy').forEach(element=>{element.style.cursor="copy";element.addEventListener('click',e=>{element.select();element.setSelectionRange(0,9999);if(typeof(navigator.clipboard)=='undefined'){document.execCommand('copy');}else{navigator.clipboard.writeText(element.value);} if(document.querySelectorAll('#copy-label').length>0){document.querySelector('#copy-label').style.opacity=1;setTimeout(()=>{document.querySelector('#copy-label').style.opacity=0;},3000);}});})}