Functional integration approach to hysteresis.