BindPageEvents(),$(document).on("click",'a[href^="#"]',(function(e){var s=$(this).attr("href");if(0!==$(s).length){e.preventDefault();var n=$(s).offset().top-100;$("body, html").animate({scrollTop:n},1e3)}})),$(window).scroll((function(){var e=$(this).scrollTop();$(".pfa-hero .foreground-image").css({transform:"translate(0px, "+e/3.2+"% )"}),$(".pfa-hero .background-image").css({transform:"translate(0px, "+e/10+"% )"}),$(".pfa-hero .search-form").css({transform:"translate("+e/80+"%, 0px)"})})),$(".nav-burger").click((function(){showMobileNav()})),$(".nav-close").click((function(){hideMobileNav()})),$(".message-head").click((function(){$("#messagepop").addClass("show")})),$("#message-cancel").click((function(){$("#messagepop").removeClass("show")})),$(".mainNav_item").click((function(){$(this).find(".sub-navigation").addClass("open")})),$(".menuDropDown_back").click((function(e){$(this).parent().removeClass("open"),e.stopPropagation()}));var playerCounter=1,slideIndex=1,pauseSlides=!1;function BindPageEvents(){$(".add-child").click((function(){var e=$(this).parent().find(".child.inactive").first();e.removeClass("inactive"),e.find(".player-active").val("true"),3==(playerCounter+=1)&&$(this).addClass("hidden")}))}function startSpin(){$(".spinner").addClass("spin")}function stopSpin(){$(".spinner").removeClass("spin")}function plusSlides(e,s){showSlides(slideIndex+=e,s),pauseSlides=!0}function currentSlide(e,s){showSlides(slideIndex=e,s),pauseSlides=!0}function loopSlides(){setTimeout((function(){pauseSlides?setTimeout((function(){showSlides(slideIndex+=1),pauseSlides=!1,loopSlides()}),15e3):(showSlides(slideIndex+=1),loopSlides())}),4e3)}function showSlides(e,s){var n;console.log(s);var i=findSlideshowAncestor(s,"slideshow");console.log(i);var l=i.getElementsByClassName("mySlides");console.log(l);var t=i.getElementsByClassName("aspect-container");console.log(t);var o=i.getElementsByClassName("dot");for(e>l.length&&(slideIndex=1),e<1&&(slideIndex=l.length),n=0;n<l.length;n++)l[n].style.display="none",t[n].style.display="none";for(n=0;n<o.length;n++)o[n].className=o[n].className.replace(" active","");l[slideIndex-1].style.display="block",t[slideIndex-1].style.display="block",o[slideIndex-1].className+=" active"}function findSlideshowAncestor(e,s){for(;(e=e.parentElement)&&!e.classList.contains(s););return e}var testimonialSlideIndex=1,pauseTestimonialSlides=!1;function currentTestimonialSlide(e,s){showTestimonialSlides(testimonialSlideIndex=e,s)}function loopTestimonialSlides(){setTimeout((function(){pauseTestimonialSlides?setTimeout((function(){showTestimonialSlides(testimonialSlideIndex+=1),pauseTestimonialSlides=!1,loopTestimonialSlides()}),15e3):(showTestimonialSlides(testimonialSlideIndex+=1),loopTestimonialSlides())}),4e3)}function showTestimonialSlides(e,s){var n;console.log(s);var i=findTestimonialSlideshowAncestor(s,"testimonials");console.log(i);var l=i.getElementsByClassName("my-testamonials");console.log(l);var t=i.getElementsByClassName("testimonialsDot");for(e>l.length&&(testimonialSlideIndex=1),e<1&&(testimonialSlideIndex=l.length),n=0;n<l.length;n++)l[n].style.display="none";for(n=0;n<t.length;n++)t[n].className=t[n].className.replace(" active","");l[testimonialSlideIndex-1].style.display="flex",t[testimonialSlideIndex-1].className+=" active"}function findTestimonialSlideshowAncestor(e,s){for(;(e=e.parentElement)&&!e.classList.contains(s););return e}var textImageSlideIndex=1,productDetailsSlideIndex=1;function currentTextImageSlide(e,s){showtextImageSlides(textImageSlideIndex=e,s)}function currentProductDetailsSlide(e,s){showProductDetailsSlides(productDetailsSlideIndex=e,s)}function showtextImageSlides(e,s){var n,i=findTextImageAncestor(s,"image-wrapper").getElementsByClassName("textImageSlides");for(e>i.length&&(textImageSlideIndex=1),e<1&&(textImageSlideIndex=i.length),n=0;n<i.length;n++)i[n].style.display="none";i[textImageSlideIndex-1].style.display="flex"}function showProductDetailsSlides(e,s){var n,i=findTextImageAncestor(s,"product-overview-image-wrapper").getElementsByClassName("productDetailsSlide");for(e>i.length&&(productDetailsSlideIndex=1),e<1&&(productDetailsSlideIndex=i.length),n=0;n<i.length;n++)i[n].style.display="none";i[productDetailsSlideIndex-1].style.display="block"}function findTextImageAncestor(e,s){for(;(e=e.parentElement)&&!e.classList.contains(s););return e}function showMobileNav(){$(".main-nav").addClass("open"),$(".nav-burger").addClass("hide"),$(".nav-close").addClass("show")}function hideMobileNav(){$(".main-nav").removeClass("open"),$(".nav-burger").removeClass("hide"),$(".nav-close").removeClass("show"),$(".menuDropDown").removeClass("open"),$(".sub-navigation").removeClass("open")}function scrollToElement(e){if(0!==$(e).length){var s=$(e).offset().top-100;$("body, html").animate({scrollTop:s},1e3)}}function closeModals(){$(".modal").removeClass("active")}function activateTarget(e){$(e).addClass("active"),$("body, html").animate({scrollTop:"0px"},1e3)}