// version: 2.3 last update: 11.07.2013 /* * licensed under the mit license: http://www.opensource.org/licenses/mit-license.php * * made by wilq32, wilq32@gmail.com, wroclaw, poland, 01.2009 * website: http://code.google.com/p/jqueryrotate/ */ (function(k){for(var d,f,l=document.getelementsbytagname("head")[0].style,h=["transformproperty","webkittransform","otransform","mstransform","moztransform"],g=0;gthis._parameters.duration;if(b&&!this._parameters.animatedgif)cleartimeout(this._timer);else{if(this._canvas||this._vimage||this._img)a=this._parameters.easing(0,a-this._animatestarttime,this._animatestartangle,this._parameters.animateto-this._animatestartangle,this._parameters.duration), this._rotate(~~(10*a)/10);this._parameters.step&&this._parameters.step(this._angle);var c=this;this._timer=settimeout(function(){c._animate.call(c)},10)}this._parameters.callback&&b&&(this._angle=this._parameters.animateto,this._rotate(this._angle),this._parameters.callback.call(this._rootobj))},_rotate:function(){var a=math.pi/180;return ie?function(a){this._angle=a;this._container.style.rotation=a%360+"deg";this._vimage.style.top=-(this._rotationcentery-this._imgheight/2)+"px";this._vimage.style.left= -(this._rotationcenterx-this._imgwidth/2)+"px";this._container.style.top=this._rotationcentery-this._imgheight/2+"px";this._container.style.left=this._rotationcenterx-this._imgwidth/2+"px"}:d?function(a){this._angle=a;this._img.style[d]="rotate("+a%360+"deg)";this._img.style[f]=this._parameters.center.join(" ")}:function(b){this._angle=b;b=b%360*a;this._canvas.width=this._width;this._canvas.height=this._height;this._cnv.translate(this._imgwidth*this._aspectw,this._imgheight*this._aspecth);this._cnv.translate(this._rotationcenterx, this._rotationcentery);this._cnv.rotate(b);this._cnv.translate(-this._rotationcenterx,-this._rotationcentery);this._cnv.scale(this._aspectw,this._aspecth);this._cnv.drawimage(this._img,0,0)}}()};ie&&(wilq32.photoeffect.prototype.createvmlnode=function(){document.createstylesheet().addrule(".rvml","behavior:url(#default#vml)");try{return!document.namespaces.rvml&&document.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),function(a){return document.createelement("')}}catch(a){return function(a){return document.createelement("<"+ a+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}}())})(jquery);