modal windows support

please add my pull request for modal windows support