Made the '.animate()' hack work for variable transition durations.