In this work we present a trajectory Optimization framework for whole-body\nmotion planning through contacts. We demonstrate how the proposed approach can\nbe applied to automatically discover different gaits and dynamic motions on a\nquadruped robot. In contrast to most previous methods, we do not pre-specify\ncontact switches, timings, points or gait patterns, but they are a direct\noutcome of the optimization. Furthermore, we optimize over the entire dynamics\nof the robot, which enables the optimizer to fully leverage the capabilities of\nthe robot. To illustrate the spectrum of achievable motions, here we show eight\ndifferent tasks, which would require very different control structures when\nsolved with state-of-the-art methods. Using our trajectory Optimization\napproach, we are solving each task with a simple, high level cost function and\nwithout any changes in the control structure. Furthermore, we fully integrated\nour approach with the robot's control and estimation framework such that\noptimization can be run online. By demonstrating a rough manipulation task with\nmultiple dynamic contact switches, we exemplarily show how optimized\ntrajectories and control inputs can be directly applied to hardware.\n