title: Set different offset to scrolltop when a specific link is clicked
body: <p>I currently have the following code that works nicely and scrolls to the top of a div when a link is clicked...</p>
  
  <pre><code>$(function () {
    $('a[href*=#]:not([href=#])').click(function () {
      if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') &amp;&amp; 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}, 1500);
          return false;
        }
      }
    });
  });
  </code></pre>
  
  <p>However what I would like to do is that when a specific set of links are clicked (#topbannerlinks a) it scrolls to the top of the div but with a different offset e.g.</p>
  
  <pre><code>$("#topbannerlinks a").click(function(){
      $('html,body').animate({ scrollTop: target.offset().top -180 }, 1500);
  });
  </code></pre>
  
  <p>Can I add build this function/if statement in to the above first function somehow?</p>
  
  <p>I'm trying to do it this way becase I have a different height header on the target link page, and it doesnt scroll to the top correctly.</p>