If I understood correctly, you want something like this:
$('a').click(function(e) {
e.preventDefault();
var link_index = $(this).index('a');
var div = $('.topic-intro').eq(link_index);
$('html body').animate({
scrollTop: div.offset().top - 10
}, 300);
});
Demo: http://jsfiddle.net/WN5Tr/1/
The thing is, I personally would not work with indexes in this case as this solution is error-prone. I would work with unique href - id pairs, so structure like this:
<a href="#section1">
<a href="#section2">
<a href="#section3">
<div id="section1"></div>
<div id="section2"></div>
<div id="section3"></div>