For pre-trial detention programs, including purchase of service and state-operated programs incidental to the operation of certain residential care programs; provided, that the commissioner of youth services may transfer a total amount not to exceed 7 per cent of the funds appropriated herein to items 4200-0100 and 4200-0300