Changed condition to hide overlay on element click.