First of all I’m sorry, I understand that this is not straight question and more like code check. Second of all I dont have possibility to recreate the situation on jsfiddle.com.
The problem is that when I open different image (one is vertical, other is horizontal) it makes div that contains all the thumbnails to move 2px at least at my resolution to left. And I cant figure it out why is it happening.
Even if I make both images same with and height, this movement appears.
Read more here: One div that is moved to left on image change