title: How to add easing to this? "Cooler" scrolling. Jquery ScrollTo
body: <p>This code is for navigating down/up a page. It's all working properly, I would just like it to have some more ease. Some animation that looks a little better. Any ideas?? </p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  </code></pre>
  
  <p>$(function() {</p>
  
  <pre><code>function scroll(direction) {
  
      var scroll, i,
              positions = [],
              here = $(window).scrollTop(),
              collection = $('.part');
  
      collection.each(function() {
          positions.push(parseInt($(this).offset()['top'],10));
      });
  
      for(i = 0; i &lt; positions.length; i++) {
          if (direction == 'next' &amp;&amp; positions[i] &gt; here) { scroll = collection.get(i); break; }
          if (direction == 'prev' &amp;&amp; i &gt; 0 &amp;&amp; positions[i] &gt;= here) { scroll = collection.get(i-1); break; }
      }
  
      if (scroll) {
          $.scrollTo(scroll, {
              duration: 350       
          });
      }
  
      return false;
  }
  
  $("#next,#prev").click(function() {        
      return scroll($(this).attr('id'));        
  });
  
  $(".scrolltoanchor").click(function() {
      $.scrollTo($($(this).attr("href")), {
          duration: 350
      });
      return false;
  });
  </code></pre>
  
  <p>});
  </p>