In any dispute as to the custody of a minor child involving a parent and a nonparent, there shall be a presumption that it is in the best interest of the child to be in the custody of the parent, which presumption may be rebutted by showing that it would be detrimental to the child to permit the parent to have custody.