Get an attorney and start documenting everything. Sounds like you've got a big job ahead of you though, because remember that you've got a big battle to fight, but once it's won, you've got ANOTHER big battle to fight, and that's the damage that's been done to this kid emotionally. So please don't start this unless you are prepared for many hard years ahead.
Most people start these custody battles because they feel sorry for the kid but believe me, just because you're trying to do the right thing does NOT MEAN that the kid is going to all of a sudden start behaving and being "OK" because he/she is so grateful that you went to court and did the right thing for him; kids are NOT LIKE ADULTS - kids do not realize and understand the sacrifices you make for them, and they are not necessarily grateful to you for making them. If you are looking for this child to be grateful to you for trying to provide him with stability and love and a healthy home, FORGET IT!! Instead, he will feel torn, and homesick, and very very angry - angry at everybody. They do not process things like adults do, so don't expect him to.
YOUR BATTLES ARE JUST BEGINNING - GET READY FOR THAT.
Don't be surprised when you get custody of this kid if the kid starts really acting-out and misbehaving and showing a lot of inappropriate emotions and behavior.
Just because you win the battle doesn't mean you'll win the war.
The war may continue for years and years as that ex-wife is going to try to get even with you and her ex for getting that kid. She will, every chance she gets, try to disrupt things. She will noit stop at causing problems for you two adults - she is selfish and probably very emotionally unstable herself, so she will stop at nothing to try to undermine you and get to you, and if she has to use that kid to do it, she will.
I hope your marriage to this man is a strong one. It's going to take everything you've got to pull this off, and most don't make it.
I'm not against what you are trying to do or anything like that and I do wish you the very best, but just be aware that when you get the judge's decision in your favor, the hard part is just beginning. The trauma to this child is very great and his mother is very, VERY unstable.
Get a good attorney for now, and a good child psychologist for later. Best of luck to you and God bless you for trying to make a difference in a child's life!