(a)
(1) In all actions for the recovery of personal property, where the defendant has given a delivery bond as provided for by § 18-60-816, the court or jury trying the cause may render judgment against the defendant for the recovery of the property, or its value, together with all damages sustained by the detention thereof.
(2) Upon motion of the plaintiff the court or jury may also render judgment against the sureties upon the defendant's delivery bond for the value of the property and also for damages as they may be found and determined by the court or jury trying the cause.
(b) If, upon the trial of any replevin cause, judgment is given for the defendant in the action, the court or jury trying the cause may render judgment, not only against the plaintiff for the value of the property taken under the order of delivery in the case, provided it has not been surrendered to the defendant, upon bond, as provided for in § 18-60-816, together with all damages sustained by the defendant in the action, but may, upon motion of the defendant, also render judgment against the sureties upon the bond of the plaintiff, for the value of the property and all damages sustained by the defendant in the action.