The mayor and city council of a city of the second class or village board of trustees may pass rules and ordinances imposing penalties and fines not exceeding one hundred dollars, regulating, protecting, and governing the cemetery, the owners of lots, visitors, and trespassers. The officers of such city or village shall have as full jurisdiction and power in the enforcing of such rules and ordinances as though they related to the municipality itself.