(a) Any person who is at least 18 years of age who violates Section 5 of this Act by delivering cannabis to a person under 18 years of age who is at least 3 years his junior may be sentenced to imprisonment for a term up to twice the maximum term otherwise authorized by Section 5.
     (b) Any person under 18 years of age who violates Section 4 or 5 of this Act may be treated by the court in accordance with the Juvenile Court Act of 1987.