i'd tell family right away. You need the support if anything should happen. I would also tell my boss right away (she is a good friend) but she would keep it quiet from the rest of my work until 12 weeks. Most of my friends i would wait 12 weeks as well.
I never really understood the 3 month thing really. You don't tell people that you are pregnant until most of the chance of miscarrying is gone. I wouldn't be ashamed if i miscarried. I would be sad - but i would want my friends and family to comfort me.