//@preserve Version: 1.1 jQuery(document).ready(function ($) { NProgress.start(); // Mobile main nav toggle $("#nav-toggle").on('click', function (e) { $(this).toggleClass("active"); e.preventDefault(); return false; }); // Share Buttons $('.social-media-share').on('click', 'a', function (e) { e.preventDefault(); var popup_url = $(this).prop('href'), popup = window.open(popup_url, '', 'height=250,width=600,toolbar=0,menubar=0,location=0'); if (window.focus) { popup.focus(); } }); }); jQuery(window).on('load', function () { NProgress.done(); // Main nav jQuery('.nav-slide-button').on('click', function () { jQuery('.pull').fadeToggle(); }); jQuery('.top-nav ul > li > a').on('click', function () { jQuery('.pull').fadeToggle(); jQuery("#nav-toggle").toggleClass("active"); }); // Back to top button jQuery(window).scroll(function () { if (jQuery(this).scrollTop() > 160) { jQuery('.scroll-top').fadeIn(); } else { jQuery('.scroll-top').fadeOut(); } }); jQuery('.scroll-top').click(function () { jQuery('html, body').animate({scrollTop: 0}, 600); return false; }); });