| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 | $(function() {  // Set the negative margin on the top menu for slide-menu pages  var $selector1 = $('#menu-top-nav'),    events = 'click.fndtn touchstart.fndtn';  //if ($selector1.length > 0) $selector1.css("margin-top", $selector1.height() * -1);  // Watch for clicks to show the sidebar  var $selector2 = $('#mobile-nav-button');  if ($selector2.length > 0) {    $('#mobile-nav-button').on(events, function(e) {      e.preventDefault();      $('body').toggleClass('active');    });  }  // // Watch for clicks to show the menu for slide-menu pages  // var $selector3 = $('#menuButton');  // if ($selector3.length > 0)  {  //   $('#menuButton').on(events, function(e) {  //     e.preventDefault();  //     $('body').toggleClass('active-menu');  //   });  // }  // Adjust sidebars and sizes when resized  $(window).resize(function() {    $('body').removeClass('active');    var $selector4 = $('#menu-top-nav');    //if ($selector4.length > 0) $selector4.css("margin-top", $selector4.height() * -1);  });  // // Switch panels for the paneled nav on mobile  // var $selector5 = $('#switchPanels');  // if ($selector5.length > 0)  {  //   $('#switchPanels dd').on(events, function(e) {  //     e.preventDefault();  //     var switchToPanel = $(this).children('a').attr('href'),  //         switchToIndex = $(switchToPanel).index();  //     $(this).toggleClass('active').siblings().removeClass('active');  //     $(switchToPanel).parent().css("left", (switchToIndex * (-100) + '%'));  //   });  // }  $('#nav li a').on(events, function(e) {    e.preventDefault();    var href = $(this).attr('href'),      $target = $(href);    $('html, body').animate({scrollTop : $target.offset().top}, 300);  });});
 |