Create toc.js

Javascript to build tables of contents and show and hide sidenotes.