Automatically attach mathjax event for slideshows