Fixed duration of rotator animation and fixed jQuery function