Change gallery ul class and update jQuery