code: function(force, event) {
  		var self = this,
  			options = self.options,
  			saveScroll;
  
  		if ((options.modal && !force) ||
  			(!options.stack && !options.modal)) {
  			return self._trigger('focus', event);
  		}
  
  		if (options.zIndex > $.ui.dialog.maxZ) {
  			$.ui.dialog.maxZ = options.zIndex;
  		}
  		if (self.overlay) {
  			$.ui.dialog.maxZ += 1;
  			self.overlay.$el.css('z-index', $.ui.dialog.overlay.maxZ = $.ui.dialog.maxZ);
  		}
  
  		//Save and then restore scroll since Opera 9.5+ resets when parent z-Index is changed.
  		//  http://ui.jquery.com/bugs/ticket/3193
  		saveScroll = { scrollTop: self.element.scrollTop(), scrollLeft: self.element.scrollLeft() };
  		$.ui.dialog.maxZ += 1;
  		self.uiDialog.css('z-index', $.ui.dialog.maxZ);
  		self.element.attr(saveScroll);
  		self._trigger('focus', event);
  
  		return self;
  	}
docs: the force parameter allows us to move modal dialogs to their correct position on open