The mayor has the power and jurisdiction and shall exercise the functions formerly exercised by a justice of the peace, but only for the preservation of peace within the corporate limits and the trial of offenses against the town ordinances.
T.C.A. § 7-81-304