In replevin cases pending in circuit courts, any person other than the defendant claiming the property replevied may intervene, verifying the petition by affidavit. The court shall direct a trial of the right of property as in other cases and in case judgment is rendered for the intervening party and it is further found that such party is entitled to the possession of all or any part of the property, judgment shall be entered accordingly and the property to which the claimant is entitled ordered to be delivered to such claimant together with payment of the claimant's costs. In case judgment is entered for the claimant, although he or she is not then entitled to possession of the property, he or she shall be entitled to his or her costs. In case judgment is entered for the plaintiff, the plaintiff shall be entitled to recover the plaintiff's costs from the claimant. If the claimant is a non-resident of the State, he or she shall file security for costs as required of non-resident plaintiffs.
735 ILCS 5/19-124