bPopup is a lightweight jQuery modal popup plugin (only 1.34KB gzipped). It doesn't create or style your popup but provides you with all the logic like centering, modal overlay, events and more. It gives you a lot of opportunities to customize so it will fit your needs.
I think it will be useful to allow the positioning of the popup to the right.
I think it could be possible to use the negative values for position option to allow that:
position:[-10,'auto'] -----> put the popup 10px right to the right margin of the window