(function() {
	if( typeof window.addEventListener === 'function' ) {
		Reveal.addEventListener("slidechanged", function (event) {
			if (event.previousSlide.querySelector('.gallery') || document.querySelector('.reveal > .gallery')) {
				Gallery.stop();
			}

			Gallery.start(event.currentSlide);
		});

		// during initial load
		if (Reveal.getCurrentSlide()) {
			Gallery.start(Reveal.getCurrentSlide());
		}
	}
})();
(function() {
	if( typeof window.addEventListener === 'function' ) {
		Reveal.addEventListener("slidechanged", function (event) {
			if (event.previousSlide.querySelector('.gallery') || document.querySelector('.reveal > .gallery')) {
				Gallery.stop();
			}

			var galleryNode = event.currentSlide.querySelector('.gallery');
			if (galleryNode) {				
				Gallery.start(galleryNode);
			}

		});

		// during initial load
		if (Reveal.getCurrentSlide()) {
			var galleryNode = Reveal.getCurrentSlide().querySelector('.gallery');
			if (galleryNode) {
				Gallery.start(galleryNode);
			}
		}
	}
})();
Fix plugin to pass right node in
Fix plugin to pass right node in
