JS routing. Fixes #12

Very rudimentary JS routing using a switch statement against `window.location.pathname`. This fixes the js error being thrown on all pages other than the homepage as reported in issue #12 
Yes, as it will make the statement a lot cleaner to read when we add more roots that a list of if/else.