Every person violates a section, division, paragraph or provision of this chapter when he or she performs an act thereby prohibited or declared unlawful, or fails to act when the failure is thereby prohibited or declared unlawful and, upon conviction thereof, shall be punished as follows.
(A) Where the specific section, division, paragraph or provision specifically makes violation a misdemeanor, he or she shall be punished as for a misdemeanor; where a violation is committed in a manner or under circumstances so as to endanger or be likely to endanger any person or property, he or she shall be punished as for a misdemeanor; where he or she stands convicted of violation of any provision of this chapter, exclusive of violations relating to the standing or parking of an unattended vehicle, within the immediate preceding 12-month period for the third or subsequent time, he or she shall be punished as for a misdemeanor.
(B) As to any violation not constituting a misdemeanor under the provisions of division (A) above, he or she shall be punished as for a petty misdemeanor.