Irreversible Thermodynamics of Continuous Media: Internal Variable Theory