It sounds like you are not so excited about this idea. The first thing before you take any legal action, sit down by yourself and explore whether you are willing and able to take on the responsibility for this child full time. Then talk to your husband openly and honestly about your feelings, thoughts and concerns.
Courts don't like to change custody agreements, unless there is some serious concern for the well being of the child. Now even though the mother's parenting does not meet your standards, it is questionable that the court would deem her unfit for loosing her job in a tough economy and having an unkempt home.
If this child has not indicated that she would like to stay with you, take into consideration the backlash that you, your husband and your family living might encounter if you force a change in custody.
Even if the child were to agree to the changes you must get a lawyer and file the change with a court. Lawyers cost money, if the mother contests the request for custody, the process will drag out and cost more. If you decide to go that way, get a realistic assessment from an attorney (don't overstate your case, be honest in your own interest) what the chances for success are.
Good luck!