(b) At any time after a complaint is filed, the commission may file a petition in the circuit court in the circuit in which the subject of the complaint occurred, or in the circuit in which a respondent resides or transacts business, seeking appropriate temporary relief against the respondent, pending final determination of proceedings under this chapter, including an order or decree restraining the respondent from doing or procuring any act tending to render ineffectual any order the commission may enter with respect to the complaint. The court may grant the temporary relief or restraining order as it deems just and proper, but no relief or order extending beyond five days shall be granted except by consent of the respondent or after hearing upon notice to the respondent and a finding by the court that there is reasonable cause to believe that the respondent has engaged in a discriminatory practice. If a complaint is dismissed by final order of the commission or a court after a court has granted temporary relief or a restraining order under this subsection, the respondent is entitled to recover from the State damages and costs, not to exceed a total of $500, sustained by reason of the temporary relief or restraining order in an action in the court that granted the temporary relief or restraining order.