The situation you describe is not uncommon to LGBT couples whose marriages and relationships are not recognized in Pennsylvania, even if the marriage occurred in a state where they are legal. Hopefully there will be some legal answers to your situation from the cases that are before the Supreme Court of the United States this week. A decision about the constitutionality of the Defense of Marriage Act could impact your situation.
However, I doubt that the national policy issues are what you care about. There are many questions you have to be able to answer - such as who is the biological parent of the children? If they are adopted, who is the adoptive parent? Pennsylvania is not exactly in the forefront of same-sex relationships and the custody statute tends to favor biology, but there are non-parental custody situations that could be recognized by a court, particularly if the person seeking custody can argue that they were a parent to the child. If your ex is not the biological/adoptive parent, she may have argued that given your long-term relationship, it was in the best interests of the children for her to have custody until the court had the opportunity to review the situation.
If that is the case, the court is treating you much like other parents. Under the current custody statute, one parent may not relocate with the children without the agreement of the other parent. Sixty days notice is required before moving the children out of the jurisdiction and a hearing may be necessary for you to get the court's permission to do it. You do need to get an attorney who will be able to help you demonstrate to the Court that it is in the children's best interests to be with you.
Good luck.
Answered on Mar 25th, 2013 at 3:50 PM