Move javascript after DOM elements loaded

This needs to happen or the demo1.js needs to be
wrapped in a document.ready function, because the
script is looking for elements that haven’t yet 
been added to the page!