You have the same id="light"
on each of the pop ups, change this to a class and it should work. id
s need to be distinct in the same document.
If you make it a class you'll need to use something like $(this).find('.light')
or $(this).closest('.light')
or reference it directly like $(this).parent().siblings('.light')