use onLoad instead of right away so the body dom element isn't null
I apparently don't know how to handle relative paths. added js/ in front of empiredata.json to handle that lack of knowledge.