I don't mean to sound like I'm piling on, but you should have been consulting an attorney all along to look out for your interests. I'd recommend you doing so now ASAP. You should take note of all (recent) instances where she displayed inappropriate conduct in the presence of the children...any proof of adultery (mere suspicion is not enough)...basically anything that can help you in the custody battle that is coming. I feel obligated to repeat it again, go get an attorney. This is not something you want to be cheap on either. You get what you pay for. It's been a while, so i had to look up some notes but parenting plans determined by the court consider the following and are not supposed to favor one parent over the other based on gender:
"In a permanent parenting plan, the court will allocate parenting responsibilities (decision-making authority) b/w the parents, as well as determine physical custody (where the child will physically reside), all the best interests of the child. The court will consider various factors to determine the residential schedule of the child, including (i) each parents ability to instruct, inspire, and encourage the child; (ii) the strength and stability of the childs relationship with each parent; (iii) the willingness of each parent to facilitate a continuing relationship with the other parent; (iv) any willful refusal to attend a parent educational seminar as ordered by the court; (v) the disposition of each parent to provide the child with food, clothing, and care; (vi) the degree to which a parent has been the primary caregiver; (vii) the love, affection, and emotional ties between the parent and child; (viii) the emotional and developmental needs of the child; (ix) the fitness of each parent; (x) the importance of continuity in the childs life; (xi) each parents employment schedule; and (xii) any other factors deemed relevant by the court."