adding auto show/hide to sidebar