Slideshow.KenBurns=new Class({Extends:Slideshow,options:{pan:[100,100],zoom:[50,50]},initialize:function(f,e,a){a.overlap=true;a.resize=true;["pan","zoom"].each(function(b){if($chk(this[b])){if($type(this[b])!="array")this[b]=[this[b],this[b]];this[b].map(function(g){return(g.toInt()||0).limit(0,100)})}},a);this.parent(f,e,a)},_show:function(f){this.image.retrieve("morph")||["a","b"].each(function(c){this[c].set("tween",{duration:this.options.duration,link:"cancel",onStart:this._start.bind(this),
onComplete:this._complete.bind(this),property:"opacity"}).get("morph",{duration:this.options.delay+this.options.duration*2,link:"cancel",transition:$arguments(0)})},this);this.image.set("styles",{bottom:"auto",left:"auto",right:"auto",top:"auto"});var e=["top left","top right","bottom left","bottom right"][this.counter%4].split(" ");e.each(function(c){this.image.setStyle(c,0)},this);dh=this.height/this.preloader.height;dw=this.width/this.preloader.width;delta=dw>dh?dw:dh;var a={},b=$random.run(this.options.zoom)/
100+1,g=Math.abs($random.run(this.options.pan)/100-1);["height","width"].each(function(c,i){var d=Math.ceil(this.preloader[c]*delta),h=(d*b).toInt();a[c]=[h,d];if(dw>dh||i){d=this[c]-this.image[c];h=(d*g).toInt();a[e[i]]=[h,d]}},this);var j=this.firstrun&&this.options.paused;if(f||j){this._center(this.image);this.image.get("morph").cancel();j?this.image.get("tween").cancel().set(0).start(1):this.image.get("tween").cancel().set(1)}else{this.image.get("morph").start(a);this.image.get("tween").set(0).start(1)}}});

