Added decision trees to test position of clicked image and set animations/slideup/slidedown accordingly. Makes for less jarring transitions when images in the same row are clicked.