Update main.js

bad animated class manipulation