Raw coding on JavaScript, making some animation