I found the answer:
Updated Fiddle: http://jsfiddle.net/YtJcL/694/
Reference: Smooth scrolling within element, only first link/anchor works
$(function() {
$('a[href*=#]:not([href=#])').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
if (target.length) {
$('#wrapper').animate({
scrollTop: $('#wrapper').scrollTop() + target.offset().top
}, 1000);
return false;
}
}
});
});