Have you tried to move
// Bind to StateChange Event
History.Adapter.bind(window, 'statechange', function() {
var State = History.getState();
mainContent.fadeOut(function() {
$(this).empty();
console.log('this ran');
preloader.fadeIn();
loadContent(mainContent, location.pathname);
});
});
before
navLink.on('click', function(e){