/*
 * jQuery CSS Class Animations v 0.8
 *
 * Copyright (c) 2009 Johnny Marnell
 * johnnymarnell 'at' gmail 'dot' com
 * http://johnnymarnell.com
 * http://www.emusic.com/artist/Johnny-Marnell-MP3-Download/12078073.html
 *
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 */
(function(J){var G=J,I={},C=J.fn.animate,Q=["borderSpacing","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","bottom","elevation","fontSize","fontStyle","fontWeight","height","left","letterSpacing","lineHeight","marginRight","marginLeft","marginTop","marginBottom","margin","maxHeight","maxWidth","minHeight","minWidth","outlineWidth","paddingTop","paddingRight","paddingBottom","paddingLeft","right","textIndent","top","verticalAlign","width","wordSpacing","zIndex","opacity","borderTop","borderRight","borderBottom","borderLeft","border","outline","padding"];function H(Y){var T=I[Y],c,Z,b,V,U,a,X=window.document.styleSheets;if(!T){c=new RegExp("(.*)\\."+Y+"(\\S+)?(?:\\s+(.*))?");T=I[Y]={};for(V=0;V<X.length;V++){Z=X[V];b=Z.cssRules||Z.rules;for(var W=0;W<b.length;W++){a=b[W];U=a.selectorText;if(U&&U.match(c)){J.each(U.split(/,\s*/),function(g,e){var f=e.match(c),d;if(f){d=f[1].length;if(d===0||f[1].substring(d-1,d).match(/\s/)){f[1]+="*"}P(f,a,e,T)}})}}}}return T}function P(a,c,X,T){var b={},d,W,V,Z,U=c.style,Y=false;for(Z=0;Z<Q.length;Z++){V=Q[Z];if(U[V]&&typeof (U[V])){b[V]=U[V];Y=true}}if(Y){d=a[1]+(a[2]||"");W=T[d]||(T[d]={});if(!a[3]){if(!W.leaf){W.leaf={css:b,specificity:F(d)}}else{J.extend(W.leaf.css,b)}}else{d=a[3];W.children=W.children||{};if(!W.children[d]){W.children[d]={css:b,specifity:F(d)}}else{J.extend(W.children[d].css,b)}}W.specificity=0}}function B(U,T){J.each(U,function(V,X){var W=V.split(/\s+/);J.each(T.parents,function(Z,a){var Y,b=G(a.el);for(Y=W.length-1;Y>=0&&b.length;Y--){if(b.is(W[Y])){Y--}b=b.parent()}if(Y<0){if(X.leaf){(a.css||(a.css=[])).push(X.leaf)}if(X.children){b=G(a.el);J.each(X.children,function(c,d){b.find(c).each(function(){var e=J.data(this);(T.children[e]||(T.children[e]={el:this,css:[]})).css.push(d)})})}}})})}function A(U,Z,X,b){var V,Y=[],d,a,c,T=[null],W={parents:{},children:{}};U.each(function(){W.parents[this]={el:this}});J.each(Z,function(){B(H(this),W)});for(V=(X?2:1);V<b.length;V++){c=b[V];T.push(c);if(!!c&&typeof c!="string"&&!c.nodeName&&c.constructor!=Array&&/^[(\[]?\s*function/.test(c+"")){d=b[V];a=T.length-1}}a=d?a:T.length;J.each(W.parents,function(e,f){var g=G(f.el);if(f.css){g.addClass("ca-to-"+Z.join(" ca-to-")+(X?" ca-from-"+X.join(" ca-from-"):""));E(T,g,f,Y,a,d,Z,X)}else{S(Y,g,Z,X,d)}});J.each(W.children,function(e,f){E(T,G(f.el),f,Y,a,d)});if(!Y.pendingAnimations){O(Y)}}function E(U,a,W,T,Y,Z,V,X){U[0]=M(a,W.css);T.pendingAnimations=(T.pendingAnimations||0)+1;if(V){S(T,a,V,X,Z)}U[Y]=function(){if(--T.pendingAnimations===0){O(T)}};N(a,U)}function K(T){if(T&&T.currentStyle&&T.currentStyle.filter){G(T).css("opacity",J.attr(T.currentStyle,"opacity"))}}function N(U,T){K(U.get(0));return C.apply(U,T)}function F(U){var T=U.split(/\s+/),V=0,W;J.each(T,function(Y,X){W=false;J.each(X,function(Z,a){if(!W&&a==="#"){V+=40000;W=true}else{if(a==="."||a===":"||a==="["){V+=200}else{if(Z===0){V+=1}}}})})}function R(){var U,W,V=arguments[0],T=arguments[1];if(typeof V==="string"&&V.indexOf(".")===0){U=V.substring(1).split(/\./);if(typeof T==="string"&&T.indexOf(".")===0){W=T.substring(1).split(/\./)}return A(this,U,W,arguments)}else{return N(this,arguments)}}function D(T,U){return T.specificity-U.specificity}function S(T,X,U,V,W){T.push({jq:X,clazz:U,fromClass:V,callback:W})}function L(U){var T=U.attr("class");if(T){T=T.split(/\s+/);J.each(T,function(){if(this.indexOf("ca-")===0){U.removeClass(this)}})}}function O(T){J.each(T,function(U,V){var W=V.jq;L(W);if(V.fromClass){W.removeClass(V.fromClass.join(" "))}W.addClass(V.clazz.join(" ")+" ca-done-"+V.clazz.join(" ca-done-"));if(V.callback){V.callback.apply(W.get(0))}})}function M(V,U){var T={};J.each(U.sort(D),function(X,W){J.extend(T,W.css)});return T}J.fn.extend({animate:R,cacheClassAnimation:function(T){H(T)}})})(window.jQuery);
