
//Anonymous function that is applied to all internal-links
var jump=function(e)
{
       //prevent the "normal" behaviour which would be a "hard" jump
       e.preventDefault();
	   
       //Get the target
       var target = $(this).attr("href");
	   
       //perform animated scrolling
       $('html,body').animate( {scrollTop: $(target).offset().top}, 2000, function() {location.hash = target;} );

}

$(document).ready(function()
{
       $('a[href*=#]').bind("click", jump);
       return false;
});

