YAHOO.util.Easing = {
easeNone: function(B, A, D, C) {
return D * B / C + A;
},
easeIn: function(B, A, D, C) {
return D * (B /= C) * B + A;
},
easeOut: function(B, A, D, C) {
return - D * (B /= C) * (B - 2) + A;
},
easeBoth: function(B, A, D, C) {
if ((B /= C / 2) < 1) {
return D / 2 * B * B + A;
}
return - D / 2 * ((--B) * (B - 2) - 1) + A;
},
easeInStrong: function(B, A, D, C) {
return D * (B /= C) * B * B * B + A;
},
easeOutStrong: function(B, A, D, C) {
return - D * ((B = B / C - 1) * B * B * B - 1) + A;
},
easeBothStrong: function(B, A, D, C) {
if ((B /= C / 2) < 1) {
return D / 2 * B * B * B * B + A;
}
return - D / 2 * ((B -= 2) * B * B * B - 2) + A;
},
elasticIn: function(C, A, G, F, B, E) {
if (C == 0) {
return A;
}
if ((C /= F) == 1) {
return A + G;
}
if (!E) {
E = F * 0.3;
}
if (!B || B < Math.abs(G)) {
B = G;
var D = E / 4;
} else {
var D = E / (2 * Math.PI) * Math.asin(G / B);
}
return - (B * Math.pow(2, 10 * (C -= 1)) * Math.sin((C * F - D) * (2 * Math.PI) / E)) + A;
},
elasticOut: function(C, A, G, F, B, E) {
if (C == 0) {
return A;
}
if ((C /= F) == 1) {
return A + G;
}
if (!E) {
E = F * 0.3;
}
if (!B || B < Math.abs(G)) {
B = G;
var D = E / 4;
} else {
var D = E / (2 * Math.PI) * Math.asin(G / B);
}
return B * Math.pow(2, -10 * C) * Math.sin((C * F - D) * (2 * Math.PI) / E) + G + A;
},
elasticBoth: function(C, A, G, F, B, E) {
if (C == 0) {
return A;
}
if ((C /= F / 2) == 2) {
return A + G;
}
if (!E) {
E = F * (0.3 * 1.5);
}
if (!B || B < Math.abs(G)) {
B = G;
var D = E / 4;
} else {
var D = E / (2 * Math.PI) * Math.asin(G / B);
}
if (C < 1) {
return - 0.5 * (B * Math.pow(2, 10 * (C -= 1)) * Math.sin((C * F - D) * (2 * Math.PI) / E)) + A;
}
return B * Math.pow(2, -10 * (C -= 1)) * Math.sin((C * F - D) * (2 * Math.PI) / E) * 0.5 + G + A;
},
backIn: function(B, A, E, D, C) {
if (typeof C == "undefined") {
C = 1.70158;
}
return E * (B /= D) * B * ((C + 1) * B - C) + A;
},
backOut: function(B, A, E, D, C) {
if (typeof C == "undefined") {
C = 1.70158;
}
return E * ((B = B / D - 1) * B * ((C + 1) * B + C) + 1) + A;
},
backBoth: function(B, A, E, D, C) {
if (typeof C == "undefined") {
C = 1.70158;
}
if ((B /= D / 2) < 1) {
return E / 2 * (B * B * (((C *= (1.525)) + 1) * B - C)) + A;
}
return E / 2 * ((B -= 2) * B * (((C *= (1.525)) + 1) * B + C) + 2) + A;
},
bounceIn: function(B, A, D, C) {
return D - YAHOO.util.Easing.bounceOut(C - B, 0, D, C) + A;
},
bounceOut: function(B, A, D, C) {
if ((B /= C) < (1 / 2.75)) {
return D * (7.5625 * B * B) + A;
} else {
if (B < (2 / 2.75)) {
return D * (7.5625 * (B -= (1.5 / 2.75)) * B + 0.75) + A;
} else {
if (B < (2.5 / 2.75)) {
return D * (7.5625 * (B -= (2.25 / 2.75)) * B + 0.9375) + A;
}
}
}
return D * (7.5625 * (B -= (2.625 / 2.75)) * B + 0.984375) + A;
},
bounceBoth: function(B, A, D, C) {
if (B < C / 2) {
return YAHOO.util.Easing.bounceIn(B * 2, 0, D, C) * 0.5 + A;
}
return YAHOO.util.Easing.bounceOut(B * 2 - C, 0, D, C) * 0.5 + D * 0.5 + A;
}
}; (function() {
var A = function(H, G, I, J) {
if (H) {
A.superclass.constructor.call(this, H, G, I, J);
}
};
A.NAME = "Motion";
var E = YAHOO.util;
YAHOO.extend(A, E.ColorAnim);
var F = A.superclass;
var C = A.prototype;
C.patterns.points = /^points$/i;
C.setAttribute = function(G, I, H) {
if (this.patterns.points.test(G)) {
H = H || "px";
F.setAttribute.call(this, "left", I[0], H);
F.setAttribute.call(this, "top", I[1], H);
} else {
F.setAttribute.call(this, G, I, H);
}
};
C.getAttribute = function(G) {
if (this.patterns.points.test(G)) {
var H = [F.getAttribute.call(this, "left"), F.getAttribute.call(this, "top")];
} else {
H = F.getAttribute.call(this, G);
}
return H;
};
C.doMethod = function(G, K, H) {
var J = null;
if (this.patterns.points.test(G)) {
var I = this.method(this.currentFrame, 0, 100, this.totalFrames) / 100;
J = E.Bezier.getPosition(this.runtimeAttributes[G], I);
} else {
J = F.doMethod.call(this, G, K, H);
}
return J;
};
C.setRuntimeAttribute = function(P) {
if (this.patterns.points.test(P)) {
var H = this.getEl();
var J = this.attributes;
var G;
var L = J["points"]["control"] || [];
var I;
var M,
O;
if (L.length > 0 && !(L[0]
instanceof Array)) {
L = [L];
} else {
var K = [];
for (M = 0, O = L.length; M < O;++M) {
K[M] = L[M];
}
L = K;
}
if (E.Dom.getStyle(H, "position") == "static") {
E.Dom.setStyle(H, "position", "relative");
}
if (D(J["points"]["from"])) {
E.Dom.setXY(H, J["points"]["from"]);
} else {
E.Dom.setXY(H, E.Dom.getXY(H));
}
G = this.getAttribute("points");
if (D(J["points"]["to"])) {
I = B.call(this, J["points"]["to"], G);
var N = E.Dom.getXY(this.getEl());
for (M = 0, O = L.length; M < O;++M) {
L[M] = B.call(this, L[M], G);
}
} else {
if (D(J["points"]["by"])) {
I = [G[0] + J["points"]["by"][0], G[1] + J["points"]["by"][1]];
for (M = 0, O = L.length; M < O;++M) {
L[M] = [G[0] + L[M][0], G[1] + L[M][1]];
}
}
}
this.runtimeAttributes[P] = [G];
if (L.length > 0) {
this.runtimeAttributes[P] = this.runtimeAttributes[P].concat(L);
}
this.runtimeAttributes[P][this.runtimeAttributes[P].length] = I;
} else {
F.setRuntimeAttribute.call(this, P);
}
};
var B = function(G, I) {
var H = E.Dom.getXY(this.getEl());
G = [G[0] - H[0] + I[0], G[1] - H[1] + I[1]];
return G;
};
var D = function(G) {
return (typeof G !== "undefined");
};
E.Motion = A;
})(); (function() {
var D = function(F, E, G, H) {
if (F) {
D.superclass.constructor.call(this, F, E, G, H);
}
};
D.NAME = "Scroll";
var B = YAHOO.util;
YAHOO.extend(D, B.ColorAnim);
var C = D.superclass;
var A = D.prototype;
A.doMethod = function(E, H, F) {
var G = null;
if (E == "scroll") {
G = [this.method(this.currentFrame, H[0], F[0] - H[0], this.totalFrames), this.method(this.currentFrame, H[1], F[1] - H[1], this.totalFrames)];
} else {
G = C.doMethod.call(this, E, H, F);
}
return G;
};
A.getAttribute = function(E) {
var G = null;
var F = this.getEl();
if (E == "scroll") {
G = [F.scrollLeft, F.scrollTop];
} else {
G = C.getAttribute.call(this, E);
}
return G;
};
A.setAttribute = function(E, H, G) {
var F = this.getEl();
if (E == "scroll") {
F.scrollLeft = H[0];
F.scrollTop = H[1];
} else {
C.setAttribute.call(this, E, H, G);
}
};
B.Scroll = D;
})();
YAHOO.register("animation", YAHOO.util.Anim, {
version: "2.6.0",
build: "1321"
});