|
|
!function(a,b,c,d){a.fn.transition=function(){{var e,f=a(this),g=f.selector||"",h=(new Date).getTime(),i=[],j=arguments,k=j[0],l=[].slice.call(arguments,1),m="string"==typeof k;b.requestAnimationFrame||b.mozRequestAnimationFrame||b.webkitRequestAnimationFrame||b.msRequestAnimationFrame||function(a){setTimeout(a,0)}}return f.each(function(){var b,n,o,p,q,r,s,t,u,v,w=a(this),x=this;v={initialize:function(){b=v.get.settings.apply(x,j),v.verbose("Converted arguments into settings object",b),o=b.error,p=b.className,t=b.namespace,q=b.metadata,u="module-"+t,r=v.get.animationEvent(),s=v.get.animationName(),n=w.data(u)||v,m&&(m=v.invoke(k)),m===!1&&(v.animate(),v.instantiate())},instantiate:function(){v.verbose("Storing instance of module",v),w.data(u,n)},destroy:function(){v.verbose("Destroying previous module for",x),w.removeData(u)},refresh:function(){v.verbose("Refreshing display type on next animation"),delete n.displayType},forceRepaint:function(){v.verbose("Forcing element repaint");var a=w.parent(),b=w.next();0===b.size()?w.detach().appendTo(a):w.detach().insertBefore(b)},repaint:function(){v.verbose("Repainting element");x.offsetWidth},animate:function(a){return b=a||b,v.is.supported()?(v.debug("Preparing animation",b.animation),v.is.animating()&&b.queue?(!b.allowRepeats&&v.has.direction()&&v.is.occuring()&&n.queuing!==!0?v.error(o.repeated):v.queue(b.animation),!1):void(v.can.animate?v.set.animating(b.animation):v.error(o.noAnimation,b.animation))):(v.error(o.support),!1)},reset:function(){v.debug("Resetting animation to beginning conditions"),w.off(r),v.restore.conditions(),v.hide(),v.remove.animating()},queue:function(a){v.debug("Queueing animation of",a),n.queuing=!0,w.one(r,function(){n.queuing=!1,v.repaint(),v.animate.apply(this,b)})},complete:function(){v.verbose("CSS animation complete",b.animation),v.is.looping()||(v.is.outward()?(v.verbose("Animation is outward, hiding element"),v.restore.conditions(),v.remove.display(),v.hide(),a.proxy(b.onHide,this)()):v.is.inward()?(v.verbose("Animation is outward, showing element"),v.restore.conditions(),v.show(),a.proxy(b.onShow,this)()):v.restore.conditions(),v.remove.duration(),v.remove.animating()),a.proxy(b.complete,this)()},has:{direction:function(a){return a=a||b.animation,-1!==a.search(p.inward)||-1!==a.search(p.outward)?(v.debug("Direction already set in animation"),!0):!1}},set:{animating:function(a){a=a||b.animation,v.save.conditions(),v.can.transition()&&!v.has.direction()&&v.set.direction(),v.remove.hidden(),v.set.display(),w.addClass(p.animating).addClass(p.transition).addClass(a).one(r,v.complete),v.set.duration(b.duration),v.debug("Starting tween",b.animation,w.attr("class"))},display:function(){var a=w.css("style"),b=v.get.displayType(),c=a+";display: "+b+" !important;";"block"!==b&&(v.verbose("Setting final visibility to",b),w.attr("style",c))},direction:function(){w.is(":visible")?(v.debug("Automatically determining the direction of animation","Outward"),w.removeClass(p.inward).addClass(p.outward)):(v.debug("Automatically determining the direction of animation","Inward"),w.removeClass(p.outward).addClass(p.inward))},looping:function(){v.debug("Transition set to loop"),w.addClass(p.looping)},duration:function(a){a=a||b.duration,a="number"==typeof a?a+"ms":a,v.verbose("Setting animation duration",a),w.css({"-webkit-animation-duration":a,"-moz-animation-duration":a,"-ms-animation-duration":a,"-o-animation-duration":a,"animation-duration":a})},hidden:function(){w.addClass(p.transition).addClass(p.hidden)},visible:function(){w.addClass(p.transition).addClass(p.visible)}},save:{displayType:function(a){n.displayType=a},transitionExists:function(b,c){a.fn.transition.exists[b]=c,v.verbose("Saving existence of transition",b,c)},conditions:function(){n.cache={className:w.attr("class"),style:w.attr("style")},v.verbose("Saving original attributes",n.cache)}},restore:{conditions:function(){return n.cache===d?!1:(n.cache.className?w.attr("class",n.cache.className):w.removeAttr("class"),n.cache.style?w.attr("style",n.cache.style):"block"===v.get.displayType()&&w.removeA
|