Added support for fetching JSON data representing compiled graph

Added an example compiled graph in examples/27012014.json. Also tidied
some code, moving stuff around and putting stuff in functions. Moved
page elements around for layout reasons.
Made image locations relative.
Merge branch 'master' into gh-pages
Merge branch 'master' into gh-pages
Moved JS into a separate file. Added link to pages site.
Merge branch 'master' into gh-pages
Added link to the example.