Recalculate height of gallery on caption toggle