Change layer visibility test to use display:none