Move graphing javascript into it's own file

Pulled the graphing code out of index.html.ep and put it into graphs.js