implemented animation function
Added time slider on graph
Externalized graphing code to spectrum_graph.js