Modification of the original plugin http://swip.codylindley.com/popupWindowDemo.html