added support for "beforeShowSlide" and "afterShowSlide" events