/
navbar.min.js
1 lines (1 loc) · 3.11 KB
/
navbar.min.js
1
$(document).ready(function(o){function e(){if(s=o(window).scrollTop(),0==s)o(".navbar").removeClass("hidden_nav"),i=!0;else{if(Math.abs(s-r)<l)return;s>r+l?(o(".navbar").addClass("hidden_nav"),o("#myNavbar").collapse("hide"),o(".blackout_background").removeClass("navbar_open"),i=!1):s<r-2*l&&(o(".navbar").removeClass("hidden_nav"),i=!0)}r=s}function n(o){d=!0}function a(){o(".services_tile").toggleClass("touch_device_mode"),o("#video_thumbnail").toggleClass("touch_device_mode"),o(".animated_social_icon").toggleClass("animated_social_icon_hover_attr"),o(".content_button").toggleClass("content_button_hover_attr"),o(".download_button").toggleClass("touch_device_mode"),o(".video_thumbnail").toggleClass("touch_device_mode"),o("#submit_button").toggleClass("submit_button_hover_attr"),o("#services_tile_8").toggleClass("touch_device_mode")}function t(){document.removeEventListener("touchmove",n)}o(".fouc_blocker").removeClass("fouc_blocker"),o(function(){var e="";e=window.location.href.lastIndexOf("#")>1?window.location.href.substr(window.location.href.lastIndexOf("/")+1,window.location.href.lastIndexOf("#")-(window.location.href.lastIndexOf("/")+1)):window.location.href.substr(window.location.href.lastIndexOf("/")+1),o(".navbar ul li a").each(function(){o(this).attr("href")!=e&&""!=o(this).attr("href")||o(this).parent("li").addClass("active_link")})});var i,c=!1,l=o(".navbar").height(),r=0,s=0;o(window).scroll(function(o){c=!0}),setInterval(function(){c&&o(window).width()<768&&(e(),c=!1)},250),o(window).resize(function(){o(window).width()>767?(o(".blackout_background").removeClass("navbar_open"),i=!0):i=!1}),setInterval(function(){i&&o(".navbar").removeClass("hidden_nav")},500),o("#hamburger_menu").click(function(){o(".blackout_background").toggleClass("navbar_open")}),o(".blackout_background").click(function(){o("#myNavbar").collapse("hide"),o(".blackout_background").toggleClass("navbar_open")});var d=!1,_=!1;document.addEventListener("touchmove",n),setInterval(function(){d&&(a(),t(),_=!0,d=!1)},100);var u,v=!1,w=!1;o(".social_media_container").removeClass("social_drawer_expanded"),o("#drawer_icon").click(function(){w=!0}),o(".social_media_container").mouseenter(function(){v=!0}),setInterval(function(){w&&v?(clearTimeout(u),o(".social_media_container").addClass("social_drawer_expanded"),w=!1,v=!1):w&&!v?(clearTimeout(u),o(".social_media_container").toggleClass("social_drawer_expanded"),w=!1,v=!1):v&&(clearTimeout(u),o(".social_media_container").addClass("social_drawer_expanded"),w=!1,v=!1)},50),o(".social_media_container").mouseleave(function(){u=setTimeout(function(){o(".social_media_container").removeClass("social_drawer_expanded"),w=!1,v=!1},400)}),o("#social_icon_1").click(function(){var o=window.location.href;window.open("https://twitter.com/intent/tweet?text="+o,"_blank")}),o("#social_icon_2").click(function(){var o=window.location.href;window.open("http://www.facebook.com/share.php?u="+o,"_blank")}),o("#social_icon_3").click(function(){var o=window.location.href;window.open("http://www.linkedin.com/shareArticle?mini=true&url="+o,"_blank")}),o("#social_icon_4").click(function(){}),o("body").find("*").removeAttr("title")});