Stephanie, your story breaks my heart. I too, would get her to the Pediatrician asap and petition the court for an emergency hearing Today!! I wouldn't let this go on any further. She deserves so much better than what she has right now. She needs to be living with you immediately.
Big hugs, I hope everything works out as quickly as possible.
Sherry