var indexOfSelectedDots,testimonials=$(".testimonial-wrapper"),currentActive=1,processHeightJsNodes=[];function fNextSlide(){var e;e=currentActive==testimonials.length-1?-1:currentActive,$(".testimonial-wrapper").each(function(t,i){var n=$(this);if(e+1==t){if("true"==n.attr("data-selected"))return;n.attr("data-selected","true"),slideshowDotHandler(currentActive=t)}else{if("false"==n.attr("data-selected"))return;n.attr("data-selected","false")}})}function fPrevSlide(){var e;e=0==currentActive?testimonials.length:currentActive,$(".testimonial-wrapper").each(function(t,i){var n=$(this);if(e-1==t){if("true"==n.attr("data-selected"))return;n.attr("data-selected","true"),slideshowDotHandler(currentActive=t)}else{if("false"==n.attr("data-selected"))return;n.attr("data-selected","false")}})}function slideshowDotHandler(e){$(".slideshow-dots").each(function(t,i){t!=e?$(this).removeClass("selected-dot"):$(this).addClass("selected-dot")})}function processHeightAdjust(){var e=e||[];if(!e[0])for(i=0;it&&(t=n[x].clientHeight);for(y=0;y30||nStartingX-nEndingX<-30)&&(nEndingX>nStartingX?(bGesturing_Slideshow&&fRotateSlide_Right(),bGesturing_Testimonial&&fPrevSlide()):(bGesturing_Slideshow&&fRotateSlide_Left(),bGesturing_Testimonial&&fNextSlide())),bGesturing_Slideshow=0,bGesturing_Testimonial=0)}document.getElementById("touch-controls").addEventListener("mousedown",fTabletSlideMouseDown_Slideshow),document.getElementById("touch-controls").addEventListener("touchstart",fTabletSlideMouseDown_Slideshow),document.getElementById("touch-controls-testimonial").addEventListener("mousedown",fTabletSlideMouseDown_Testimonial),document.getElementById("touch-controls-testimonial").addEventListener("touchstart",fTabletSlideMouseDown_Testimonial),document.body.addEventListener("touchmove",function(e){nEndingX=e.touches[0].clientX}),document.body.addEventListener("mouseup",fTabletSlideMouseUp),document.body.addEventListener("touchend",fTabletSlideMouseUp);var nLatestKnownScrollY=0,bTicking=!1;function fOnScrollOrResize(){nLatestKnownScrollY=window.scrollY,fRequestTick()}function fRequestTick(){bTicking||requestAnimationFrame(fUpdateBackgroundPosition),bTicking=!0}window.addEventListener("scroll",fOnScrollOrResize,!1),window.addEventListener("resize",fOnScrollOrResize,!1);var oTestimonialSection=document.getElementById("testimonial-section"),oTestimonialSectionParallax=document.getElementById("testimonial-section-parallax"),oSupportSection=document.getElementById("support-section"),oSupportSectionParallax=document.getElementById("support-section-parallax");function fUpdateBackgroundPosition(){fUpdateBackgroundPosition_Element(oTestimonialSection,oTestimonialSectionParallax),fUpdateBackgroundPosition_Element(oSupportSection,oSupportSectionParallax),bTicking=!1}function fUpdateBackgroundPosition_Element(e,t){var i=e.getBoundingClientRect(),n=window.innerHeight-i.height;if(i.top>=window.innerHeight)t.style!="transform: translateY(0px);min-height:"+i.height+"px;"&&t.setAttribute("style","transform: translateY(0px);min-height:"+i.height+"px;");else if(i.top+i.height<=0)t.style!="transform: translateY(-"+n+"px);min-height:"+i.height+"px;"&&t.setAttribute("style","transform: translateY(-"+n+"px);min-height:"+i.height+"px;");else{var o=n/100*(100-(i.top+i.height)/((window.innerHeight+i.height)/100));t.setAttribute("style","transform: translateY(-"+o+"px);min-height:"+i.height+"px;")}}function fTabletSlideshowMouseUp(e){bGesturing&&(bGesturing=0,bAutoRotating=0,void 0!==e.clientX&&(nEndingX=e.clientX),nEndingX>nStartingX?fRotateSlide_Right():fRotateSlide_Left())}document.getElementById("touch-controls").addEventListener("mousedown",fTabletSlideshowMouseDown),document.getElementById("touch-controls").addEventListener("touchstart",fTabletSlideshowMouseDown),document.body.addEventListener("touchmove",function(e){nEndingX=e.touches[0].clientX}),document.body.addEventListener("mouseup",fTabletSlideshowMouseUp),document.body.addEventListener("touchend",fTabletSlideshowMouseUp);