According to work for hire doctrine, if you are in their employ and make something having to do with the job, they own the copyright. In order to retain rights, you have to have that specifically stated in the contract--the assumption is that the employer gets all rights unless otherwise explicitly stated. It used to be that this would only really apply to stuff you did while at work and with the employer's equipment, but that's changing--these days, even if you do stuff on your own time, at home, with your own equipment, it's very likely that your employers will be able to claim ownership if it has anything to do with your work. So get it into your contract that you own the rights, but don't be surprised if your employers take issue with that and hire someone else instead.