title: Getting some internal link animation to work
body: <p>I have this script that opens a new page and scroll down to a id</p>
  
  <pre><code>var jump = function (e) {
   if (e) {
    e.preventDefault();
    var target = $(this).attr("href");
   } else {
    var target = location.hash;
   }
  
   $('html,body').animate(
   {
    scrollTop: $(target).offset().top
   }, 2000, function () {
    location.hash = target;
   });
  
   }
  
   $('html, body').hide();
  
   $(document).ready(function () {
    $('a[href^=#]').bind("click", jump);
  
    if (location.hash) {
     setTimeout(function () {
     $('html, body').scrollTop(0).show();
     jump();
    }, 0);
   } else {
    $('html, body').show();
   }
  });
  </code></pre>
  
  <p>What I wanna do is, make it animate the scroll on the current page with internal links. How do I integrate that?</p>