(function($) { "use strict"; // Start of use strict // jQuery for page scrolling feature - requires jQuery Easing plugin $('a.page-scroll').bind('click', function(event) { var $anchor = $(this); $('html, body').stop().animate({ scrollTop: ($($anchor.attr('href')).offset().top - 50) }, 1250, 'easeInOutExpo'); event.preventDefault(); }); // Highlight the top nav as scrolling occurs $('body').scrollspy({ target: '.navbar-fixed-top', offset: 51 }) // Closes the Responsive Menu on Menu Item Click $('.navbar-collapse ul li a').click(function() { $('.navbar-toggle:visible').click(); }); // Fit Text Plugin for Main Header $("h1").fitText( 2.0, { minFontSize: '40px', maxFontSize: '55px' } ); // Offset for Main Navigation $('#mainNav').affix({ offset: { top: 100 } }) // Screenshot video button press // I'd like to use the timeupdate event, but it doesn't fire often enough (I'm seeing every 0.25s) var $video = $("#screenshot .device-container video").first(); var $device = $video.closest(".device"); if ($device.length) { setInterval(function() { var time = $video[0].currentTime; $device.toggleClass("screenshot", time >= 4.37 && time < 5.07); }, 30); } // Initialize WOW.js Scrolling Animations if (window.WOW) { // WOW is disabled on mobile, so only init if it's available new WOW().init(); } })(jQuery); // End of use strict