function scroll_to( id ) { id = id.replace( "link", "" ); $( 'html,body' ).animate({ scrollTop: $( "#" + id ).offset().top }); }