1 $('a[rel=tooltip]').tooltip({
6 $('.navbar a, .subnav a').smoothScroll();
13 // fix sub nav on scroll
17 navHeight = $('.navbar').first().height(),
18 subnavHeight = $('.subnav').first().height(),
19 subnavTop = $('.subnav').length && $('.subnav').offset().top - navHeight,
20 marginTop = parseInt($body.css('margin-top'), 10);
25 $win.on('scroll', processScroll);
27 function processScroll() {
28 var i, scrollTop = $win.scrollTop();
30 if (scrollTop >= subnavTop && !isFixed) {
32 $nav.addClass('subnav-fixed');
33 $body.css('margin-top', marginTop + subnavHeight + 'px');
34 } else if (scrollTop <= subnavTop && isFixed) {
36 $nav.removeClass('subnav-fixed');
37 $body.css('margin-top', marginTop + 'px');