Transfer getContainer().addClass('lock');

If modal is open, then called $.modal().close();
and class 'lock' removed from container (body or html)