added support for jQuery plugin, and new stageChanged event