demos/slideshow/slideshow.js
function scaleImage(img,prop,obj) {
        var scale = Math.min(sw/img.w,sh/img.h);
        obj.sx(scale).sy(scale);
    }
function scaleImage(img,prop,obj) {
        var scale = Math.min(sw/img.w,sh/img.h);
        obj.sx(scale).sy(scale);
    }
function scaleImage ( img , prop , obj ) { var scale = Math . min ( sw / img . w , sh / img . h ) ; obj . sx ( scale ) . sy ( scale ) ; }
auto scale them
auto scale them