(function(a){var b="deg";a.fn.rotate=function(c){var d=a(this).css("transform")||"none";if(typeof c=="undefined"){if(d){var e=d.match(/rotate\(([^)]+)\)/);if(e&&e[1])return e[1]}return 0}var e=c.toString().match(/^(-?\d+(\.\d+)?)(.+)?$/);return e&&(e[3]&&(b=e[3]),a(this).css("transform",d.replace(/none|rotate\([^)]*\)/,"")+"rotate("+e[1]+b+")")),this},a.fn.scale=function(b,c,d){var e=a(this).css("transform");if(typeof b=="undefined"){if(e){var f=e.match(/scale\(([^)]+)\)/);if(f&&f[1])return f[1]}return 1}return a(this).css("transform",e.replace(/none|scale\([^)]*\)/,"")+"scale("+b+")"),this};var c=a.fx.prototype.cur;a.fx.prototype.cur=function(){return this.prop=="rotate"?parseFloat(a(this.elem).rotate()):this.prop=="scale"?parseFloat(a(this.elem).scale()):c.apply(this,arguments)},a.fx.step.rotate=function(c){a(c.elem).rotate(c.now+b)},a.fx.step.scale=function(b){a(b.elem).scale(b.now)};var d=a.fn.animate;a.fn.animate=function(a){if(typeof a.rotate!="undefined"){var c=a.rotate.toString().match(/^(([+-]=)?(-?\d+(\.\d+)?))(.+)?$/);c&&c[5]&&(b=c[5]),a.rotate=c[1]}return d.apply(this,arguments)}})(jQuery)
