No person shall be permitted to exhibit or conduct indecent shows or dances or to engage in any gambling or other games of chance or horseracing, either inside the enclosure where any state fair or district or county agricultural society fair is being held or within forty rods thereof, during the time of holding such fairs. Nothing in this section shall be construed to prohibit wagering on the results of horseraces by the parimutuel or certificate method when conducted by licensees within the racetrack enclosure at licensed horserace meetings, to prohibit the operation of bingo games as provided in the Nebraska Bingo Act, to prohibit the conduct of lotteries pursuant to the Nebraska County and City Lottery Act, to prohibit the conduct of lotteries or raffles pursuant to the Nebraska Lottery and Raffle Act or the Nebraska Small Lottery and Raffle Act, or to prohibit the sale of pickle cards pursuant to the Nebraska Pickle Card Lottery Act. Nothing in this section shall be construed to prohibit the sale of intoxicating liquors, wine, or beer by a person properly licensed pursuant to Chapter 53 on premises under the control of the Nebraska State Fair Board or any county agricultural society. Any person who violates this section shall be guilty of a Class V misdemeanor. The trial of speed of horses under direction of the society shall not be included in the term horseracing. Upon the filing of proof with the State Treasurer of a violation of this section inside the enclosure of such fair, the amount of money appropriated shall be withheld from any money appropriated for the ensuing year.