I believe it depends on the terms of your employment and your jurisdiction. For instance, California specifically forbids employers from claiming ownership of inventions which are unrelated to the employer's line of business created by employees outside of company time and without using company resources: http://www.leginfo.ca.gov/cgi-bin/displaycode?section=lab...