(a) No person driving or in charge of a motor vehicle shall permit it to stand unattended without first stopping the engine, locking the ignition, removing the key from the ignition, effectively setting the parking brake, and, when the motor vehicle is standing upon any grade, turning the front wheels to the curb or side of the highway.
The requirements of this section relating to the stopping of the engine, locking of the ignition and removing the key from the ignition of a motor vehicle do not apply to any of the following:
(1) A motor vehicle that is parked on residential property;
(2) A motor vehicle that is locked, regardless of where it is parked;
(3) An emergency vehicle;
(4) A public safety vehicle.
(b) Whoever violates any provision of this section is guilty of a minor misdemeanor on a first offense; on a second offense within one year after the first offense, the person is guilty of a misdemeanor of the fourth degree; on each subsequent offense within one year after the first offense, the person is guilty of a misdemeanor of the third degree.