If you've filed for divorce, and there's a disagreement regarding parenting time/custody, you are required to undergo mediation regardless of the county this is occurring in. In Cook, Mediation (for now) is free, but we're seeing 5 month return dates. Without knowing more about the pleadings involved, that's all I can say.
Best advice I can give; talk to a family law attorney in your area for specific guidance.
Without knowing more facts that would lead me to answer otherwise, your involvement with another person is not, in itself, a basis for your losing custody. Your relationship with the third party does not necessarily reflect on your ability to parent.
Sign up to receive a 10-part series of useful information and legal advice about the divorce process.