(a) When a defendant is sentenced or committed for a term of one year or less by a court of record having criminal jurisdiction, the court may in its order grant to the defendant the privilege of leaving the jail during necessary and reasonable hours for any of the following purposes:
(1) To work at his or her employment;
(2) To seek employment;
(3) To conduct his or her own business or to engage in other self-employment, including housekeeping and attending to the needs of his or her family;
(4) To attend an educational institution;
(5) To obtain medical treatment;
(6) To devote time to any other purpose approved of or ordered by the court, including participation in the litter control program of the county unless the court specifically finds that this alternative service would be inappropriate.
(b) Whenever an inmate who has been granted the privilege of leaving the jail under this section is not engaged in the activity for which the leave is granted, he or she shall be confined in jail.
(c) An inmate sentenced to ordinary confinement may petition the court at any time after sentence for the privilege of leaving jail under this section and may renew his or her petition in the discretion of the court. The court may withdraw the privilege at any time by order entered with or without notice.
(d) If the inmate has been granted permission to leave the jail to seek or take employment, the court's probation officers or, if none, the jail shall assist him or her in obtaining suitable employment and in making certain that employment already obtained is suitable. Employment shall not be deemed suitable if the wages or working conditions or other circumstances present a danger of exploitation or of interference in a labor dispute in the establishment in which the inmate would be employed.
(e) An inmate who is serving his or her sentence pursuant to this section shall be eligible for a reduction of his or her term for good behavior and faithful performance of duties in the same manner as if he or she had served his or her term in ordinary confinement.
(f) The court shall not make an order granting the privilege of leaving the institution under this section unless it is satisfied that there are adequate facilities for the administration of such privilege in the jail or other institution in which the defendant will be confined.
(g) In every case wherein the defendant has been convicted of an offense, defined in section twelve, article eight, chapter sixty-one of this code or in article eight-b or eight-d of said chapter against a child, the defendant shall not live in the same residence as any minor child, nor exercise visitation with any minor child and shall have no contact with the victim of the offense: Provided, That the defendant may petition the court of the circuit wherein he or she was so convicted for a modification of this term and condition of this probation and the burden shall rest upon the defendant to demonstrate that a modification is in the best interest of the child.