Change JavaScript navigation ordering to a function
Merge branch 'master' into gh-pages