reposition popup window of image
<p>I have a popup that show in a specific place on a image, my objective is to detect the position of the element and check if is near of the end of the left or right browser side. Basically what is happening now  is the popup being overlaped/cut by the browser window.
I wish to detect when this is happening, and if is hapening in the left the popup go to the right, and vice-verse. Any suggestion how shold i do it?</p>