var sectionArray = [], i; $(function() { function e(e) { "function" == typeof jQuery && e instanceof jQuery && (e = e[0]); var i = e.getBoundingClientRect(); return i.bottom >= 120 } function i() { $(".navbar-collapse").is(":visible") && $(".navbar-toggle").is(":visible") && $(".navbar-collapse").collapse("hide") } $(document).on("click", ".manual-list a", function() { var e = 0, i = $("header").height() + 20, t = $(this).attr("data-role"); $(".manual-list a").removeClass("active-section"), $(this).addClass("active-section"); var c = $(".manual-list a.active-section").prev().html(), n = $(".manual-list a.active-section").next().html(); }); var t = function() { $deferred = $.Deferred(); var e = $("article section").length, i = {}; return $("article section").each(function(t) { i = {}, i.pos = $(this).position().top, i.id = $(this).attr("id"), sectionArray.push(i), e - 1 === t && $deferred.resolve(sectionArray) }), $deferred.promise() }; $(function() { $('.listitmmain a').bind('click', function(event) { var $anchor = $(this); $('html, body').stop().animate({ scrollTop: $($anchor.attr('href')).offset().top }, 1000); event.preventDefault(); }); }); $(function() { $(window).scroll(function() { $(this).scrollTop() > 100 ? $(".back-top").addClass("active") : $(".back-top").removeClass("active") }), $(".back-top a").click(function() { return $("body,html").animate({ scrollTop: 0 }, 800), !1 }) }), screen.width < 767 && ($(document).on("click", function() { i() }), $(document).on("click", ".ch-link", function() { $(".navbar-collapse.in").collapse("hide") }), $(".search-bar .icon-search").click(function() { $(".search-collapse").slideToggle(), i() }), $(".navbar-toggle").click(function() { $(".search-collapse").slideUp() })) });