title: JavaScript Smooth Scroll not working
body: <p>I'm attempting to create a smooth scrolling page, but it seems to not work. If I remove the smooth scrolling aspect of my site, the anchor automatically jumps to the div element like usual.</p>
  
  <p>I have attached a JSFiddle: <a href="http://jsfiddle.net/J7sxD/5/" rel="nofollow">http://jsfiddle.net/J7sxD/5/</a></p>
  
  <pre><code>var $root = $('html, body');
  $('a').click(function() {
      $root.animate({
          scrollTop: $( $(this).attr('href') ).offset().top
      }, 500);
      return false;
  });
  </code></pre>