improves on jquery animations for substitution