69-14-709. Allowance of attorney fees. (1) Except as provided in subsection (2), whenever any of the livestock referred to in this part are injured or killed and the owner brings an action for the recovery of the loss or damage sustained, the court in which the action is brought shall impose, as a part of the costs, a reasonable sum to be fixed by the court as a fee to the attorney of the prevailing or successful party for conducting the action. The fee must be collected in the same manner as other costs.
(2) A fee may not be allowed by the court or collected from the defendant when it appears from the pleadings or proof in an action that the defendant prior to the institution of the action offered or agreed to pay to the plaintiff, in settlement of the loss or damages claimed, a sum equal to or in excess of the amount recovered as damages in the action or unless the plaintiff, at least 40 days prior to the commencement of the action, has made a demand, in writing, upon the defendant, the defendant's agent, or the defendant's attorney for the money claimed as indemnity for the killing of the livestock.