Rotation of the JS boxes