function Animation(){function t(){n()}function n(){e=0}function r(e,t,n,r,s){var s=s||0,o=i(e);e.unbind(transEndEvent),setTimeout(function(){var r=e.attr("class")||"",i=r.split(" "),s=i.length-1;for(s;s>=0;s--)i[s].match(n)||i.splice(s,1);e.on(transEndEvent,u).removeClass(i.join(" ")).addClass("animate ani_"+n+"_"+t)},s);var u=function(t,n){var i=$(t.target).attr("id");if(i===o||n)e.off(transEndEvent,u),e.removeClass("animate"),!n&&typeof r=="function"&&r.apply(this)},a=function(){u({target:e},!0)};return a}function i(t){var n=t.attr("id");return n||(e++,n="a-"+e,t.attr("id",n)),n}var e;this.animateUI=r,t()};