Stochastic Switching Systems