add animation for gallery