I edited master page, added some custom blocks.
My problem is when opening the web site I see my footer and header blocks.
How can I hide these blocks when "Working on it" block appears?

Can I handle JavaScript event or should I apply SharePoint CSS classes like "s4-notdlg" to hide them?