$(document).ready(function(){
// jQuery SmoothScroll
$('a[href*=#]').click(function(e) {
   // duration in ms
   var duration=1000;

   // easing values: swing | linear
   var easing='swing';
   // make sure it's the same location      
   if(location.pathname.replace(/^\//,'')==this.pathname.replace(/^\//,'') && location.hostname==this.hostname && this.hash.replace(/#/,''))
   {
   	  // get parameters
      var hash=this.hash;
      var target=$(hash).offset().top;

      // animate to target and set the hash to the window.location after the animation
      $("html:not(:animated),body:not(:animated)").animate({ scrollTop: target }, duration, easing, function() { location.hash=hash; });

      // cancel default click action
      return false;
   }

});
});