Toggling of slideshow and page mask on clicking of figure