Only display image alt in event if one is present
Move functions from jQuery ready function