Pop-up

On my website I have a slideshow of images with numbers
underneath it. The first time I click on number 2 on my website it
opens in a new window. When I close it and click the number 2 again
it opens in the same window (the way I want it!).
Every time I refresh the same thing happens again. How comes?