Construction of Fences, Farm Crossings, and Damages. (1) Fencing. Every rail carrier shall, within 6 months after any part of its line is open for use, erect and thereafter maintain fences on both sides of its road or so much thereof as is open for use, suitable and sufficient to prevent cattle, horses, sheep, hogs or other livestock from getting on such railroad, provided that the other 3 sides of the property are enclosed, except at the crossings of public roads and highways, and within such portion of cities and incorporated towns and villages as are or may be hereafter laid out and platted into lots and blocks, with gates at the farm crossings of such railroad, which farm crossings shall be constructed by such rail carrier when and where the same may become necessary, for the use of the proprietors of the lands adjoining such railroad; and when such fences are not made as aforesaid, or when such fences are not kept in good repair, such rail carrier shall be liable for all damages which may be done by the agents, engines or cars of such rail carrier, to such cattle, horses, sheep, hogs or other livestock thereof, and reasonable attorney's fees in any court wherein suit is brought for such damages, or to which the same may be appealed; but where such fences have been duly made and kept in good repair, such rail carrier shall not be liable for any such damages, unless negligently or willfully done.
(2) Enforcement. If the rail carrier, after being notified, shall refuse to build or repair such fence, gates, or farm crossings, in accordance with the provisions of this, Section, the owner or occupant of the land required to be fenced shall be entitled to an order from any court of competent jurisdiction requiring the rail carrier to build or repair such fence, gates, or farm crossing and may recover interest at one percent per month of the cost of such building or repair, from the time the crossing or repair was requested, as damage in the circuit court, together with costs to be taxed by the court.