Move website specific code out of main.js and into index.html. updates #229

Otherwise, we get errors "Cannot read property top of undefined".