One way to do it is a wall switch timer, and hook it up to a relay.
The relay needs to be a double pole, double throw,like this
http://www.active-tech.ca/b2c/redire...D=50%2D069%2D0 When no power is applied one side is closed, the other open. When power is applied, it switches.