Theory of vibrational relaxation and infrared absorption in condensed media