Hide notice and alert divs when not needed