Whoever violates any of the provisions of this chapter, or fails to comply therewith or with any of the requirements thereof, or erects or alters any building or commences to erect or alter any building in disregard or in violation of any detailed statement or plan submitted or approved in connection with the issuance of any permit, is guilty of a misdemeanor of the third degree and shall be fined not more than five hundred dollars ($500.00) or imprisoned not more than sixty days, or both. A separate offense shall be deemed committed each day during or on which a violation or noncompliance occurs or continues. The owner of the building or lot where anything in violation of this chapter is placed or permitted to exist and any architect, builder, contractor, agent, lessee or person employed in connection with such violation or who may have assisted in the commission of any such violation, shall be deemed guilty of a separate offense and shall be subject to the penalty herein provided.