beforeShow: function (i,e) { var z = jQuery(i).closest(".ui-dialog").css("z-index") + 4; ('z-index', z); }