Fixed a bug where a vote query was executing several times (depending on the photo).
The .click was called inside the loop so it was applied multiple times.