from what I can remember from when I took maternity leave, as long as you start work after your maternity leave has ended you'll be ok. Your maternity payments will stop if you start a new job before it is due to end - you cannot get SMP and wages from employers at the same time. However, it is a few years since I had my children and there may have been changes. Try looking at
www.directgov.uk
as there should be info on this website about your rights during maternity. Good luck!