1 (function(a){function d(b,c){defaults={x:0,y:0,z:0,rotationX:0,rotationY:0,rotationZ:0,scale:1,animationDuration:.01,width:a(b).outerWidth(),height:a(b).outerHeight()};c=a.extend(defaults,c);a(b).css({"-webkit-transition":"translateZ(0px) translateX(0px) translateY(0px)","-webkit-transform-style":"preserve-3d","-moz-transition":"translateZ(0px) translateX(0px) translateY(0px)","-moz-transform-style":"preserve-3d",transition:"translateZ(0px) translateX(0px) translateY(0px)","transform-style":"preserve-3d"});a(b).data({x:c.x,y:c.y,z:c.z,rotationX:c.rotationX,rotationY:c.rotationY,rotationZ:c.rotationX,scale:1,animationDuration:c.animationDuration,width:c.width,height:c.height})}function c(b){a(b).css({"-webkit-transition":"-webkit-transform "+a(b).data("animationDuration")+"s","-webkit-transform-style":"preserve-3d","-webkit-transform":"translateX("+a(b).data("x")+"px)"+" translateY("+a(b).data("y")+"px)"+" translateZ("+a(b).data("z")+"px)"+" scale("+a(b).data("scale")+")"+" rotateX("+a(b).data("rotationX")+"deg)"+" rotateY("+a(b).data("rotationY")+"deg)"+" rotateZ("+a(b).data("rotationZ")+"deg)","-moz-transform":"translateX("+a(b).data("x")+"px)"+" translateY("+a(b).data("y")+"px)"+" translateZ("+a(b).data("z")+"px)"+" scale("+a(b).data("scale")+")"+" rotateX("+a(b).data("rotationX")+"deg)"+" rotateY("+a(b).data("rotationY")+"deg)"+" rotateZ("+a(b).data("rotationZ")+"deg)","-moz-transition":"-moz-transform "+a(b).data("animationDuration")+"s","-moz-transform-style":"preserve-3d",transform:"translateX("+a(b).data("x")+"px)"+" translateY("+a(b).data("y")+"px)"+" translateZ("+a(b).data("z")+"px)"+" scale("+a(b).data("scale")+")"+" rotateX("+a(b).data("rotationX")+"deg)"+" rotateY("+a(b).data("rotationY")+"deg)"+" rotateZ("+a(b).data("rotationZ")+"deg)",transition:"transform "+a(b).data("animationDuration")+"s","transform-style":"preserve-3d"})}var b={decreaseHeight:function(b){return this.each(function(){a(this).data({height:a(this).data("height")-b});a(this).animate({height:a(this).data("height")},a(this).data("animationDuration")*1e3)})},decreaseWidth:function(b){return this.each(function(){a(this).data({width:a(this).data("width")-b});a(this).animate({width:a(this).data("width")},a(this).data("animationDuration")*1e3)})},getX:function(){if(!isNaN(a(this).data("x"))){return a(this).data("x")}else{d(this);return 0}},getY:function(){if(!isNaN(a(this).data("y"))){return a(this).data("y")}else{d(this);return 0}},getZ:function(){if(!isNaN(a(this).data("z"))){return a(this).data("z")}else{d(this);return 0}},getScale:function(){if(!isNaN(a(this).data("scale"))){return a(this).data("scale")}else{d(this);return 0}},getAnimationDuration:function(){if(!isNaN(a(this).data("animationDuration"))){return a(this).data("animationDuration")}else{d(this);return 0}},getWidth:function(){if(!isNaN(a(this).data("width"))){return a(this).data("width")}else{d(this);return a(this).outerWidth()}},getHeight:function(){if(!isNaN(a(this).data("width"))){return a(this).data("width")}else{d(this);return a(this).outerHeight()}},getRotationX:function(){if(!isNaN(a(this).data("rotationX"))){return a(this).data("rotationX")}else{d(this);return 0}},getRotationY:function(){if(!isNaN(a(this).data("rotationY"))){return a(this).data("rotationY")}else{d(this);return 0}},getRotationZ:function(){if(!isNaN(a(this).data("rotationZ"))){return a(this).data("rotationZ")}else{d(this);return 0}},increaseHeight:function(b){return this.each(function(){a(this).data({height:b+a(this).data("height")});a(this).animate({height:a(this).data("height")},a(this).data("animationDuration")*1e3)})},increaseWidth:function(b){return this.each(function(){a(this).data({width:b+a(this).data("width")});a(this).animate({width:a(this).data("width")},a(this).data("animationDuration")*1e3)})},rotateX:function(b){return this.each(function(){if(isNaN(a(this).data("rotationX"))){d(this);a(this).transform("rotateX",b)}else{a(this).data({rotationX:a(this).data("rotationX")+b});c(this)}})},rotateY:function(b){return this.each(function(){if(isNaN(a(this).data("rotationY"))){d(this);a(this).transform("rotateY",b)}else{a(this).data({rotationY:a(this).data("rotationY")+b});c(this)}})},rotateZ:function(b){return this.each(function(){if(isNaN(a(this).data("rotationZ"))){d(this);a(this).transform("rotateZ",b)}else{a(this).data({rotationZ:a(this).data("rotationZ")+b});c(this)}})},rotateXYZ:function(b,e,f){return this.each(function(){if(isNaN(a(this).data("rotationX"))||isNaN(a(this).data("rotationY"))||isNaN(a(this).data("rotationZ"))){d(this);a(this).transform("rotateXYZ",b,e,f)}else{a(this).data({rotationX:a(this).data("rotationX")+b});a(this).data({rotationY:a(this).data("rotationY")+e});a(this).data({rotationZ:a(this).data("rotationZ")+f});c(this)}})},setAnimationDuration:function(b){return this.each(function(){if(isNaN(a(this).data("animationDuration"))){d(this);a(this).transform("setAnimationDuration",b)}else{a(this).data({animationDuration:b});c(this)}})},setHeight:function(b){return this.each(function(){a(this).animate({height:b},a(this).data("animationDuration")*1e3);a(this).data({height:b})})},setWidth:function(b){return this.each(function(){a(this).animate({width:b},a(this).data("animationDuration")*1e3);a(this).data({width:b})})},setScale:function(b){return this.each(function(){if(isNaN(a(this).data("scale"))){d(this);a(this).transform("setScale",b)}else{a(this).data({scale:b});c(this)}})},setX:function(b){return this.each(function(){if(isNaN(a(this).data("x"))){d(this);a(this).transform("setX",b)}else{a(this).data({x:b});c(this)}})},setY:function(b){return this.each(function(){if(isNaN(a(this).data("y"))){d(this);a(this).transform("setY",b)}else{a(this).data({y:b});c(this)}})},setZ:function(b){return this.each(function(){if(isNaN(a(this).data("z"))){d(this);a(this).transform("setZ",b)}else{a(this).data({z:b});c(this)}})},setRotationX:function(b){return this.each(function(){if(isNaN(a(this).data("rotationX"))){d(this);a(this).transform("setRotationX",b)}else{a(this).data({rotationX:b});c(this)}})},setRotationXYZ:function(b,e,f){return this.each(function(){if(isNaN(a(this).data("rotationX"))||isNaN(a(this).data("rotationY"))||isNaN(a(this).data("rotationZ"))){d(this);a(this).transform("setRotationXYZ",b,e,f)}else{a(this).data({rotationX:b});a(this).data({rotationY:e});a(this).data({rotationZ:f});c(this)}})},setRotationY:function(b){return this.each(function(){if(isNaN(a(this).data("rotationY"))){d(this);a(this).transform("setRotationY",b)}else{a(this).data({rotationY:b});c(this)}})},setRotationZ:function(b){return this.each(function(){if(isNaN(a(this).data("rotationZ"))){d(this);a(this).transform("setRotationZ",b)}else{a(this).data({rotationZ:b});c(this)}})},translateX:function(b){return this.each(function(){if(isNaN(a(this).data("x"))){d(this);a(this).transform("translateX",b)}else{a(this).data({x:a(this).data("x")+b});c(this)}})},translateXYZ:function(b,e,f){return this.each(function(){if(isNaN(a(this).data("x"))||isNaN(a(this).data("y"))||isNaN(a(this).data("z"))){d(this);a(this).transform("translateXYZ",b,e,f)}else{a(this).data({x:a(this).data("x")+b});a(this).data({y:a(this).data("y")+e});a(this).data({z:a(this).data("z")+f});c(this)}})},translateY:function(b){return this.each(function(){if(isNaN(a(this).data("y"))){d(this);a(this).transform("translateY",b)}else{a(this).data({y:a(this).data("y")+b});c(this)}})},translateZ:function(b){return this.each(function(){if(isNaN(a(this).data("z"))){d(this);a(this).transform("translateZ",b)}else{a(this).data({z:a(this).data("z")+b});c(this)}})}};a.fn.transform=function(c){if(b[c]){return b[c].apply(this,Array.prototype.slice.call(arguments,1))}else if(typeof c==="object"||!c){return b.init.apply(this,arguments)}else{a.error("Method "+c+" does not exist on jQuery.transform")}}})(jQuery)