In order to make the top offset property of the affix dynamic you need to set it as a function.
For example, your js can be like this:
$('#navbar-wrapper').affix({
offset: {
top: function() {return $('.hero-image').height();}
}
});
A jsfiddle is here.