The buttons change the size of the conatiner for each image (.container.small, .container.medium, .container.large, or no size class - so no restraints). The image is the same image throughout but the max-height/width (.contaier img) are set to the height/width of the container so it grows the image is allowed to grow.
Boilerplate code for a fiddle that loads the latest YUI 3 source from git master,
Fork this fiddle to build your own fiddles using the latest YUI 3 git source.