Move TOC javascript up where it belongs