the mediation, in which case the issues of custody and visitation shall be tried only upon failure to resolve the issues of custody by mediation; (2) Order mediation under this section prior to trial and proceed to try the case as to issues other than custody and visitation while the parties are at the same time engaged in the mediation, in which the issue of custody shall be tried separately upo