Jquery nyroModal multiple instances

Jquery nyroModal multiple instances

Hello,
            I am having a link which opens nyroModal popup on click of it. But when I click on the same when the popup is already opened, its not working properly. It should close the same instance & open again. How can I do that?  I am calling following function for nyromodal.

  1. $(function() {  $('.nyroModal').nyroModal();  });

Please help me. Thanks in advance.