I am a law school graduate. What I offer is mere information, not to be construed as forming an attorney client relationship.
Without knowing your state, here is what I can tell you. I pasted the information from the freeadvice.com homepage under child custody:
WHAT FACTORS GO INTO DETERMINING CUSTODY AND VISITATION?
The primary consideration is, "What is in the best interest of the child?" The focus is from the viewpoint of the child as opposed to the wants and desires of one parent or the other.
Some states have established a general rule that it is in the best interest of a child to have continuing and frequent contact with both parents and the parent who is most supportive of this concept becomes the custodial parent. If one parent attempts to undermine the relationship between the child and the other parent, this factor could be considered in providing custody or additional visitation to the other parent.
The best interest of a child is determined on a case-by-case basis upon consideration of all relevant facts concerning the circumstances of both parents.
DO THE WISHES OF A CHILD HAVE ANY INFLUENCE IN CUSTODY DECISIONS?
Some states (NOT ALL) allow children of sufficient maturity to have an impact upon the determination of custody and visitation by considering their desire to reside with one parent or the other. Judges will listen closely to the child's stated preference and his or her reasons. The child does not have the final say and it will be the judge's decision just how much consideration is to be given to the child's wishes, depending on age, maturity, and the quality of the reasons. The overriding question will always be: what is in the child's best interest?