(1) Immediately notify the juvenile's parent, guardian or custodian or, if the parent, guardian or custodian cannot be located, a close relative;
(2) Release the juvenile into the custody of his or her parent, guardian or custodian unless:
(A) Circumstances present an immediate threat of serious bodily harm to the juvenile if released;
(B) No responsible adult can be found into whose custody the juvenile can be delivered: Provided, That each day the juvenile is detained, a written record must be made of all attempts to locate such a responsible adult; or
(C) The juvenile is charged with an act of delinquency for which secure detention is permissible; and
(3) If the juvenile is an alleged status offender, immediately notify the department of health and human resources, and, if the circumstances of either paragraph (A) or (B), subdivision (2) of this subsection exist and the requirements therein are met, the court may order the juvenile detained, but only in a nonsecure or staff-secure facility. Any juvenile detained pursuant to this subdivision shall be placed in the legal custody of the department of health and human resources pending further proceedings by the court.
(b) The judge of the circuit court or the juvenile referee may, in conjunction with the detention hearing, conduct a preliminary hearing pursuant to section nine of this article: Provided, That all parties are prepared to proceed and the juvenile has counsel during such hearing.