Will a judge give custody to the parent with more money who's had a drug problem or the jobless parent who loves the child more than life itself?

Custody is granted to the parent who will give the child the most stable, safe and caring environment.Needless to say, any parent who has a proven drug problem, will not be looked on favorably by the court. Regardless of their checkbook balance.