custody battle

I'm thinking of going for custody of my niece and preparing for a long drawn out battle with her mom. she's not safe where she is and no one will take my concerns seriously, she's living with someone under investigation for child abuse, paedophilia and drug use and her mom doesn't want her but doesn't want anyone else to have her due to spite. I've got some serious decisions to make and a huge upheaval in my life. I know every mistake and irresponsible teenage thing I did will be dragged through the courts but I'm keeping my fingers crossed I will be able to give that baby a safe and stable home. this is going to split my family apart but I can't sit by and do nothing knowing that little girl could be his next victim while her mom does nothing.