The court considers many factors.
Domestic violence is a significant factor.
A parents' sexual behavior, character or lifestyle is not a factor unless it directly affects the child. Priority in custody disputes is usually given to the parent who was first awarded custody by the court or to the parent who first obtained custody by voluntary agreement. Yes, although it may enlist the aid of experts and professionals to help it formulate an opinion. Although a party to a custody or visitation proceeding has no right to insist upon the free services of a psychiatrist to prepare for the case, the courts do order forensic evaluations by such professionals. In fact, it can be considered an abuse of discretion for the court not to order a psychiatric evaluation in a custody case in which psychological factors are critical.