Rely on Javascript event delegation and optimize initial hiding of panels