(a) General rule.--
(1) In counties of the third, fourth and fifth class, the persons now holding the following offices and their successors in each county of the third, fourth or fifth class shall compose a board to be known as the board of inspectors of the jail or county prison.
(2) The following persons shall be members of the board:
(i) The president judge of the court of common pleas or a judge designated by him.
(ii) The district attorney.
(iii) The sheriff.
(iv) The controller.
(v) The county commissioners.
(3) The board and the officers appointed by it shall provide for the safekeeping, discipline and employment of inmates and the government and management of the correctional institution.
(4) The duty of the sheriff relating to the safekeeping of inmates shall cease and determine on their committal to the correctional institution, and the sheriff may not be furnished a residence in the correctional institution.
(5) Notwithstanding the provisions of paragraph (2), the president judge may choose at any time to delete the judge position from the board by so notifying the chairperson and secretary of the board in writing. The decision to delete this position shall remain in effect for as long as the president judge making the decision shall remain as president judge and thereafter until rescinded in like fashion by a successor.
(b) Counties that may elect to be subject to subchapter.--Any county of the sixth, seventh or eighth class may elect by resolution of the county commissioners to be governed by the provisions of this subchapter.