Bifurcations in piecewise-smooth dynamical systems