Moving javascript to a file

* Solving bug on css path