var predictronlabs = predictronlabs || {}; predictronlabs.common = (function($){ function fixedFooter(){ var $body = $('body'); $body.toggleClass('fixed-footer', $body.outerHeight() < $(window).height()); } function mobileMenuButton(){ $('.mobile-menu-button').on('click', function(event){ $('.main-nav__root').toggleClass('is-open'); event.stopPropagation(); event.preventDefault(); }); } return { init: function(){ $('.search-form__toggle-button').on('click', function(){ $('.search-form').toggleClass('search-form--is-open'); }); $(window).on('resize', function(){ fixedFooter(); }); fixedFooter(); $('.nano').nanoScroller(); mobileMenuButton(); }, fixFooter: function(){ fixedFooter(); } } })(jQuery);