Fix #585

Use a JS solution for the "anchors are hidden by the navbar" problem (Issue #585)

The solution used requires the hashchange event which has decent browser support:

http://caniuse.com/hashchange