edit animationType option (use opacity if used an unknown typeof animation) end little refactoring