var Home;(function(n){var t=function(){function n(n,t){var i=this;this.params=n;this.resourceStrings=t;$(window).scroll(function(){i.animateElems(i.params.animatingElementsEl,$(window).height())});this.params.selectedLanguageEl.on("click",function(n){n.preventDefault();$(this).next(".language-list").removeClass("hidden")});$(document).on("touchstart click",function(n){$(".language-list:visible").length>0&&!$(n.target).parents().hasClass("language-selector")&&(n.stopPropagation(),n.preventDefault(),$(".language-list").addClass("hidden"))});this.params.nativeSelectEl.on("change",function(){window.location.href=$(this).val()});if(Modernizr.mq("screen and (min-width: 600px)")){this.params.videoAreaEl.html(this.params.videoTemplateEl.html());$("<button class='video-controls' />").text(this.resourceStrings.playPause).insertAfter(".video-area");$(".video-controls").on("click",function(){i.playPause()})}this.backgroundVideo=document.getElementById("video-hero");this.params.whatIsGeocachingLinkEl.on("click",function(){i.backgroundVideo.pause();i.params.whatIsGeocachingIFrameEl.toggleClass("hidden");i.params.whatIsGeocachingVideoEl.attr("src",t.whatIsGeocachingVideoUrl+"?wmode=opaque&amp;rel=0&amp;autoplay=1&amp;showinfo=0&amp;theme=light&amp;controls=2&amp;color=white")});$(".close-reveal-modal, .reveal-modal-bg").on("click",function(){$(".video-hero").hasClass("paused")||i.backgroundVideo.play();i.params.whatIsGeocachingIFrameEl.toggleClass("hidden");i.params.whatIsGeocachingVideoEl.attr("src","")});this.params.buttonFacebookClick.one("click",function(){$(this).on("click",function(n){n.preventDefault()})});$(":checkbox").on("click",function(){$(this).parent().toggleClass("checked")})}return n.prototype.playPause=function(){this.backgroundVideo.paused?this.backgroundVideo.play():this.backgroundVideo.pause();$(".video-controls,.video-hero").toggleClass("paused")},n.prototype.animateElems=function(n,t){var i=$(window).scrollTop();n.each(function(){var n=$(this),r;return n.hasClass("grow")?!0:(r=n.offset().top,i>r-t*.66&&n.addClass("grow"),!0)})},n}();n.HomeManager=t})(Home||(Home={}))