In every case in which the superior court, the probate court, the magistrate court or the juvenile court of the county shall impose a fine, including costs, for any offense against a criminal or traffic law of this state or any county ordinance, such court shall also impose as an additional penalty a sum equal to ten percent of the original fine.