title: jQuery smooth scrolling to link on other page with offset
body: <p>I have started with the code from CSS-Tricks and it works well with the offset. The problem is that the site has a fixed header so I need it to apply the offset when navigating to an internal link from another page. Currently it is getting cut off.</p>
  
  <pre><code>$('a[href*=#]:not([href=#])').click(function() {
      if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') 
          || location.hostname == this.hostname) {
  
          var target = $(this.hash);
          target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
             if (target.length) {
               $('html,body').animate({
                   scrollTop: target.offset().top-144
              }, 1000);
              return false;
          }
      }
  });
  </code></pre>
  
  <p>Any help would be much appreciated. The page in question is <a href="http://marketingmo.wpengine.com/services/#brand-development" rel="nofollow">http://marketingmo.wpengine.com/services/#brand-development</a></p>