In the index.html page I put:
<div id="loading">
<img src="images/loading.gif">
</div>
obviously display:none in the css file.
In the functions.js file I put:
$('#navigation a').on('click', function (){$('#loading').css('display','block');});
and finally in every single page I put on document.ready:
$('#loading').css('display','none');
Easy and it works like it has to work. What do you think about this "noob" solution?