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.
Here is visual for the moved div. Is not big around few px, but I just dont know from where it appears.
Read more here: Div is moved to left when image is changed