old_contents: $(document).ready(function() {
    var height = $("#page-header").height()
    $("a").click(function(e) {
        e.preventDefault();
        var href = $(this).attr("href");
         $('html, body').animate({
          scrollTop: $(href).offset().top - height
         }, 0);
    });
  });
  
new_contents: $(document).ready(function() {
    var height = $("#page-header").height()
    $("a.internal").click(function(e) {
        e.preventDefault();
        var href = $(this).attr("href");
         $('html, body').animate({
          scrollTop: $(href).offset().top - height
         }, 0);
    });
  });
  
subject: Make the selector more restrictive