In a proceeding for a temporary grant of custodial responsibility:(1) A prior judicial order granting custodial responsibility in the event of deployment is binding on the court unless circumstances meet the requirements authorized by general law for modifying a judicial order regarding custodial responsibility.
(2) The court shall enforce a prior written agreement between the parents for granting custodial responsibility in the event of deployment, including an agreement for custodial responsibility during deployment, unless the court finds that the agreement is not in the best interest of the child.