"use strict";!function(o){var n=".hover-join .join-option";"undefined"==typeof EdgeCms&&(EdgeCms={}),EdgeCms.HoverJoinForm={shouldShow:!0,selectedPackage:null,construct:function(){this.attachEvents(),this.shouldShow="yes"!=o.cookie("killedJoinFormOnScroll")},attachEvents:function(){o(n).on("click ontouchend",this.savePackageChoice.bind(this)),o(".join-option .price").on("click ontouchend",this.savePackageChoice.bind(this)),o(n).on("click ontouchend",this.promptForUsernameAndPassword.bind(this)),o(".hover-join .close-btn").on("click ontouchend",this.closeForm.bind(this)),o(window).on("scroll",this.displayForm.bind(this))},promptForUsernameAndPassword:function(e){"Loading your selection..."!=o(".hover-join h4").html()&&o(".hover-join h4").slideUp(300,function(){o(".hover-join h4").html("Loading your selection..."),o(".hover-join h4").slideDown(300)}),o(n).each(function(n,i){i!=e.currentTarget?o(i).fadeTo(300,.3):(o(i).find('input[type="radio"]').prop("checked",!0),o(i).fadeTo(0,1))}),EdgeCms.JoinFormUsernamePrompt.promptForUsernameAndPassword(e,this)},submitForm:function(n){o(".hover-join-form").submit()},closeForm:function(n){o(".hover-join").fadeOut(),o.cookie("killedJoinFormOnScroll","yes",{expires:7,path:"/"}),n.preventDefault()},clearForm:function(){o(".hover-join").fadeOut()},displayForm:function(){this.shouldShow&&o(window).scrollTop()>1500&&o(window).width()>779&&(o(".hover-join").fadeIn(),this.shouldShow=!1)},assignPackage:function(n){this.selectedPackage=n,o(".hover-join-form").find('[name="pkg"]').val(n)},savePackageChoice:function(e){if(o(e.target).is(n))var i=o(e.target);else i=o(e.target).parents(n);var t=i.find('[type="radio"]');this.assignPackage(t.val())}},EdgeCms.HoverJoinForm.construct()}(jQuery);