animation, fix js in firefox