add gif logic for closest to middle of window and static images