Sureties, whether bound on the contract or instrument with the principal debtor as joint or joint and several obligors or promisors, as accommodation drawers, acceptors, or endorsers of a bill of exchange or in any other manner, are entitled to a summary judgment against their principal and between each other, by motion in the circuit court on three days' notice thereof, in the cases, and in the following manner:
(1) Against the principal debtor:
a. When a judgment has been obtained against the surety which he has satisfied, either wholly or in part, for the amount paid and interest;
b. When a surety or sureties are sued without their principal upon notice given to the principal of the pending action if judgment is obtained against the surety, judgment for the same amount must be entered against the principal in favor of the surety.
(2) Between sureties:
a. A surety who has paid the debt of his principal may recover of each of his cosureties their aliquot proportion of the debt, and, if any of the cosureties are insolvent, the proportion of such insolvent must be excluded from the estimate, and judgment be entered against the remaining solvent sureties for their proportion of the debt as if such insolvent were not a cosurety.
b. When an action is pending against one or more sureties either in connection with or without their principal, then if the principal is insolvent or dead, the surety so sued may recover on notice of the pending action judgment against such of the cosureties as are not sued in that action for their aliquot proportion of the debt, excluding from the estimate the proportion of such of the sureties as are insolvent as if such insolvent had not been a surety.