$("[dialog selector]").shLayerPopup({open : "[opener selector]"});
shLayerPopup
with bootstrap
use openevent and closeevent.
openevent
closeevent