Very good for 500 lines of code :)! Thanks for sharing. O(n^2) for n-body simulation could hurt performance for the larger graph, i guess. But it should work really well for smaller ones.
BTW this one by Lars Rönnbäck is also very impressive: http://js1k.com/2010-first/demo/618 - press any key to add nodes. It's only 1016 bytes. Amazing.
It's such a pleasure to read well organized, well commented code. I'm a total JS n00b, but I feel like I could learn the language very quickly with examples like yours to follow.
The site itself - you can paste URLs from YouTube to visualize particular video :)