//MooTools More, <http://mootools.net/more>. Copyright (c) 2006-2009 Aaron Newton <http://clientcide.com/>, Valerio Proietti <http://mad4milk.net> & the MooTools team <http://mootools.net/developers>, MIT Style License.

MooTools.More = { version: "1.2.4.4", build: "6f6057dc645fdb7547689183b2311063bd653ddf" }; Element.implement({ measure: function (e) {
	var g = function (h) {
		return !!(!h || h.offsetHeight || h.offsetWidth);
	}; if (g(this)) { return e.apply(this); } var d = this.getParent(), f = [], b = []; while (!g(d) && d != document.body) { b.push(d.expose()); d = d.getParent(); } var c = this.expose();
	var a = e.apply(this); c(); b.each(function (h) { h(); }); return a;
}, expose: function () {
	if (this.getStyle("display") != "none") { return $empty; } var a = this.style.cssText;
	this.setStyles({ display: "block", position: "absolute", visibility: "hidden" }); return function () { this.style.cssText = a; } .bind(this);
}, getDimensions: function (a) {
	a = $merge({ computeSize: false }, a);
	var f = {}; var d = function (g, e) { return (e.computeSize) ? g.getComputedSize(e) : g.getSize(); }; var b = this.getParent("body"); if (b && this.getStyle("display") == "none") {
		f = this.measure(function () {
			return d(this, a);
		});
	} else { if (b) { try { f = d(this, a); } catch (c) { } } else { f = { x: 0, y: 0 }; } } return $chk(f.x) ? $extend(f, { width: f.x, height: f.y }) : $extend(f, { x: f.width, y: f.height });
}, getComputedSize: function (a) {
	a = $merge({ styles: ["padding", "border"], plains: { height: ["top", "bottom"], width: ["left", "right"] }, mode: "both" }, a);
	var c = { width: 0, height: 0 }; switch (a.mode) {
		case "vertical": delete c.width; delete a.plains.width; break; case "horizontal": delete c.height; delete a.plains.height;
			break;
	} var b = []; $each(a.plains, function (g, f) { g.each(function (h) { a.styles.each(function (i) { b.push((i == "border") ? i + "-" + h + "-width" : i + "-" + h); }); }); }); var e = {};
	b.each(function (f) { e[f] = this.getComputedStyle(f); }, this); var d = []; $each(a.plains, function (g, f) {
		var h = f.capitalize(); c["total" + h] = c["computed" + h] = 0; g.each(function (i) {
			c["computed" + i.capitalize()] = 0;
			b.each(function (k, j) {
				if (k.test(i)) { e[k] = e[k].toInt() || 0; c["total" + h] = c["total" + h] + e[k]; c["computed" + i.capitalize()] = c["computed" + i.capitalize()] + e[k]; } if (k.test(i) && f != k && (k.test("border") || k.test("padding")) && !d.contains(k)) {
					d.push(k);
					c["computed" + h] = c["computed" + h] - e[k];
				} 
			});
		});
	}); ["Width", "Height"].each(function (g) {
		var f = g.toLowerCase(); if (!$chk(c[f])) { return; } c[f] = c[f] + this["offset" + g] + c["computed" + g];
		c["total" + g] = c[f] + c["total" + g]; delete c["computed" + g];
	}, this); return $extend(e, c);
} 
}); Element.implement({ isDisplayed: function () {
	return this.getStyle("display") != "none";
}, isVisible: function () { var a = this.offsetWidth, b = this.offsetHeight; return (a == 0 && b == 0) ? false : (a > 0 && b > 0) ? true : this.isDisplayed(); }, toggle: function () {
	return this[this.isDisplayed() ? "hide" : "show"]();
}, hide: function () { var b; try { b = this.getStyle("display"); } catch (a) { } return this.store("originalDisplay", b || "").setStyle("display", "none"); }, show: function (a) {
	a = a || this.retrieve("originalDisplay") || "block";
	return this.setStyle("display", (a == "none") ? "block" : a);
}, swapClass: function (a, b) { return this.removeClass(a).addClass(b); } 
}); Fx.Elements = new Class({ Extends: Fx.CSS, initialize: function (b, a) {
	this.elements = this.subject = $$(b);
	this.parent(a);
}, compute: function (g, h, j) {
	var c = {}; for (var d in g) { var a = g[d], e = h[d], f = c[d] = {}; for (var b in a) { f[b] = this.parent(a[b], e[b], j); } } return c;
}, set: function (b) { for (var c in b) { var a = b[c]; for (var d in a) { this.render(this.elements[c], d, a[d], this.options.unit); } } return this; }, start: function (c) {
	if (!this.check(c)) {
		return this;
	} var h = {}, j = {}; for (var d in c) { var f = c[d], a = h[d] = {}, g = j[d] = {}; for (var b in f) { var e = this.prepare(this.elements[d], b, f[b]); a[b] = e.from; g[b] = e.to; } } return this.parent(h, j);
} 
}); Fx.Accordion = new Class({ Extends: Fx.Elements, options: { display: 0, show: false, height: true, width: false, opacity: true, alwaysHide: false, trigger: "click", initialDisplayFx: true, returnHeightToAuto: true }, initialize: function () {
	var c = Array.link(arguments, { container: Element.type, options: Object.type, togglers: $defined, elements: $defined });
	this.parent(c.elements, c.options); this.togglers = $$(c.togglers); this.previous = -1; this.internalChain = new Chain(); if (this.options.alwaysHide) {
		this.options.wait = true;
	} if ($chk(this.options.show)) { this.options.display = false; this.previous = this.options.show; } if (this.options.start) {
		this.options.display = false; this.options.show = false;
	} this.effects = {}; if (this.options.opacity) { this.effects.opacity = "fullOpacity"; } if (this.options.width) {
		this.effects.width = this.options.fixedWidth ? "fullWidth" : "offsetWidth";
	} if (this.options.height) { this.effects.height = this.options.fixedHeight ? "fullHeight" : "scrollHeight"; } for (var b = 0, a = this.togglers.length; b < a; b++) {
		this.addSection(this.togglers[b], this.elements[b]);
	} this.elements.each(function (e, d) {
		if (this.options.show === d) { this.fireEvent("active", [this.togglers[d], e]); } else {
			for (var f in this.effects) {
				e.setStyle(f, 0);
			} 
		} 
	}, this); if ($chk(this.options.display) || this.options.initialDisplayFx === false) { this.display(this.options.display, this.options.initialDisplayFx); } if (this.options.fixedHeight !== false) {
		this.options.returnHeightToAuto = false;
	} this.addEvent("complete", this.internalChain.callChain.bind(this.internalChain));
}, addSection: function (e, c) {
	e = document.id(e); c = document.id(c); var f = this.togglers.contains(e);
	this.togglers.include(e); this.elements.include(c); var a = this.togglers.indexOf(e); var b = this.display.bind(this, a); e.store("accordion:display", b); e.addEvent(this.options.trigger, b);
	if (this.options.height) { c.setStyles({ "padding-top": 0, "border-top": "none", "padding-bottom": 0, "border-bottom": "none" }); } if (this.options.width) {
		c.setStyles({ "padding-left": 0, "border-left": "none", "padding-right": 0, "border-right": "none" });
	} c.fullOpacity = 1; if (this.options.fixedWidth) { c.fullWidth = this.options.fixedWidth; } if (this.options.fixedHeight) { c.fullHeight = this.options.fixedHeight; } c.setStyle("overflow", "hidden");
	if (!f) { for (var d in this.effects) { c.setStyle(d, 0); } } return this;
}, detach: function () {
	this.togglers.each(function (a) {
		a.removeEvent(this.options.trigger, a.retrieve("accordion:display"));
	}, this);
}, display: function (a, b) {
	if (!this.check(a, b)) { return this; } b = $pick(b, true); if (this.options.returnHeightToAuto) {
		var d = this.elements[this.previous];
		if (d && !this.selfHidden) { for (var c in this.effects) { d.setStyle(c, d[this.effects[c]]); } } 
	} a = ($type(a) == "element") ? this.elements.indexOf(a) : a; if ((this.timer && this.options.wait) || (a === this.previous && !this.options.alwaysHide)) {
		return this;
	} this.previous = a; var e = {}; this.elements.each(function (h, g) {
		e[g] = {}; var f; if (g != a) { f = true; } else {
			if (this.options.alwaysHide && ((h.offsetHeight > 0 && this.options.height) || h.offsetWidth > 0 && this.options.width)) {
				f = true;
				this.selfHidden = true;
			} 
		} this.fireEvent(f ? "background" : "active", [this.togglers[g], h]); for (var j in this.effects) { e[g][j] = f ? 0 : h[this.effects[j]]; } 
	}, this);
	this.internalChain.chain(function () { if (this.options.returnHeightToAuto && !this.selfHidden) { var f = this.elements[a]; if (f) { f.setStyle("height", "auto"); } } } .bind(this));
	return b ? this.start(e) : this.set(e);
} 
}); var Accordion = new Class({ Extends: Fx.Accordion, initialize: function () {
	this.parent.apply(this, arguments); var a = Array.link(arguments, { container: Element.type });
	this.container = a.container;
}, addSection: function (c, b, e) {
	c = document.id(c); b = document.id(b); var d = this.togglers.contains(c); var a = this.togglers.length; if (a && (!d || e)) {
		e = $pick(e, a - 1);
		c.inject(this.togglers[e], "before"); b.inject(c, "after");
	} else { if (this.container && !d) { c.inject(this.container); b.inject(this.container); } } return this.parent.apply(this, arguments);
} 
}); Fx.Reveal = new Class({ Extends: Fx.Morph, options: { link: "cancel", styles: ["padding", "border", "margin"], transitionOpacity: !Browser.Engine.trident4, mode: "vertical", display: "block", hideInputs: Browser.Engine.trident ? "select, input, textarea, object, embed" : false }, dissolve: function () {
	try {
		if (!this.hiding && !this.showing) {
			if (this.element.getStyle("display") != "none") {
				this.hiding = true;
				this.showing = false; this.hidden = true; this.cssText = this.element.style.cssText; var d = this.element.getComputedSize({ styles: this.options.styles, mode: this.options.mode });
				this.element.setStyle("display", this.options.display); if (this.options.transitionOpacity) { d.opacity = 1; } var b = {}; $each(d, function (f, e) { b[e] = [f, 0]; }, this);
				this.element.setStyle("overflow", "hidden"); var a = this.options.hideInputs ? this.element.getElements(this.options.hideInputs) : null; this.$chain.unshift(function () {
					if (this.hidden) {
						this.hiding = false;
						$each(d, function (f, e) { d[e] = f; }, this); this.element.style.cssText = this.cssText; this.element.setStyle("display", "none"); if (a) {
							a.setStyle("visibility", "visible");
						} 
					} this.fireEvent("hide", this.element); this.callChain();
				} .bind(this)); if (a) { a.setStyle("visibility", "hidden"); } this.start(b);
			} else {
				this.callChain.delay(10, this);
				this.fireEvent("complete", this.element); this.fireEvent("hide", this.element);
			} 
		} else {
			if (this.options.link == "chain") {
				this.chain(this.dissolve.bind(this));
			} else { if (this.options.link == "cancel" && !this.hiding) { this.cancel(); this.dissolve(); } } 
		} 
	} catch (c) {
		this.hiding = false; this.element.setStyle("display", "none");
		this.callChain.delay(10, this); this.fireEvent("complete", this.element); this.fireEvent("hide", this.element);
	} return this;
}, reveal: function () {
	try {
		if (!this.showing && !this.hiding) {
			if (this.element.getStyle("display") == "none" || this.element.getStyle("visiblity") == "hidden" || this.element.getStyle("opacity") == 0) {
				this.showing = true;
				this.hiding = this.hidden = false; var d; this.cssText = this.element.style.cssText; this.element.measure(function () {
					d = this.element.getComputedSize({ styles: this.options.styles, mode: this.options.mode });
				} .bind(this)); $each(d, function (f, e) { d[e] = f; }); if ($chk(this.options.heightOverride)) { d.height = this.options.heightOverride.toInt(); } if ($chk(this.options.widthOverride)) {
					d.width = this.options.widthOverride.toInt();
				} if (this.options.transitionOpacity) { this.element.setStyle("opacity", 0); d.opacity = 1; } var b = { height: 0, display: this.options.display }; $each(d, function (f, e) {
					b[e] = 0;
				}); this.element.setStyles($merge(b, { overflow: "hidden" })); var a = this.options.hideInputs ? this.element.getElements(this.options.hideInputs) : null; if (a) {
					a.setStyle("visibility", "hidden");
				} this.start(d); this.$chain.unshift(function () {
					this.element.style.cssText = this.cssText; this.element.setStyle("display", this.options.display); if (!this.hidden) {
						this.showing = false;
					} if (a) { a.setStyle("visibility", "visible"); } this.callChain(); this.fireEvent("show", this.element);
				} .bind(this));
			} else {
				this.callChain(); this.fireEvent("complete", this.element);
				this.fireEvent("show", this.element);
			} 
		} else {
			if (this.options.link == "chain") { this.chain(this.reveal.bind(this)); } else {
				if (this.options.link == "cancel" && !this.showing) {
					this.cancel();
					this.reveal();
				} 
			} 
		} 
	} catch (c) {
		this.element.setStyles({ display: this.options.display, visiblity: "visible", opacity: 1 }); this.showing = false; this.callChain.delay(10, this);
		this.fireEvent("complete", this.element); this.fireEvent("show", this.element);
	} return this;
}, toggle: function () {
	if (this.element.getStyle("display") == "none" || this.element.getStyle("visiblity") == "hidden" || this.element.getStyle("opacity") == 0) {
		this.reveal();
	} else { this.dissolve(); } return this;
}, cancel: function () {
	this.parent.apply(this, arguments); this.element.style.cssText = this.cssText; this.hidding = false; this.showing = false;
} 
}); Element.Properties.reveal = { set: function (a) {
	var b = this.retrieve("reveal"); if (b) { b.cancel(); } return this.eliminate("reveal").store("reveal:options", a);
}, get: function (a) {
	if (a || !this.retrieve("reveal")) {
		if (a || !this.retrieve("reveal:options")) { this.set("reveal", a); } this.store("reveal", new Fx.Reveal(this, this.retrieve("reveal:options")));
	} return this.retrieve("reveal");
} 
}; Element.Properties.dissolve = Element.Properties.reveal; Element.implement({ reveal: function (a) {
	this.get("reveal", a).reveal();
	return this;
}, dissolve: function (a) { this.get("reveal", a).dissolve(); return this; }, nix: function () {
	var a = Array.link(arguments, { destroy: Boolean.type, options: Object.type });
	this.get("reveal", a.options).dissolve().chain(function () { this[a.destroy ? "destroy" : "dispose"](); } .bind(this)); return this;
}, wink: function () {
	var b = Array.link(arguments, { duration: Number.type, options: Object.type });
	var a = this.get("reveal", b.options); a.reveal().chain(function () { (function () { a.dissolve(); }).delay(b.duration || 2000); });
} 
}); Fx.Slide = new Class({ Extends: Fx, options: { mode: "vertical", wrapper: false, hideOverflow: true }, initialize: function (b, a) {
	this.addEvent("complete", function () {
		this.open = (this.wrapper["offset" + this.layout.capitalize()] != 0);
		if (this.open) { this.wrapper.setStyle("height", ""); } if (this.open && Browser.Engine.webkit419) { this.element.dispose().inject(this.wrapper); } 
	}, true); this.element = this.subject = document.id(b);
	this.parent(a); var d = this.element.retrieve("wrapper"); var c = this.element.getStyles("margin", "position", "overflow"); if (this.options.hideOverflow) {
		c = $extend(c, { overflow: "hidden" });
	} if (this.options.wrapper) { d = document.id(this.options.wrapper).setStyles(c); } this.wrapper = d || new Element("div", { styles: c }).wraps(this.element); this.element.store("wrapper", this.wrapper).setStyle("margin", 0);
	this.now = []; this.open = true;
}, vertical: function () { this.margin = "margin-top"; this.layout = "height"; this.offset = this.element.offsetHeight; }, horizontal: function () {
	this.margin = "margin-left";
	this.layout = "width"; this.offset = this.element.offsetWidth;
}, set: function (a) {
	this.element.setStyle(this.margin, a[0]); this.wrapper.setStyle(this.layout, a[1]);
	return this;
}, compute: function (c, b, a) { return [0, 1].map(function (d) { return Fx.compute(c[d], b[d], a); }); }, start: function (b, e) {
	if (!this.check(b, e)) {
		return this;
	} this[e || this.options.mode](); var d = this.element.getStyle(this.margin).toInt(); var c = this.wrapper.getStyle(this.layout).toInt(); var a = [[d, c], [0, this.offset]];
	var g = [[d, c], [-this.offset, 0]]; var f; switch (b) { case "in": f = a; break; case "out": f = g; break; case "toggle": f = (c == 0) ? a : g; } return this.parent(f[0], f[1]);
}, slideIn: function (a) {
	return this.start("in", a);
}, slideOut: function (a) { return this.start("out", a); }, hide: function (a) { this[a || this.options.mode](); this.open = false; return this.set([-this.offset, 0]); }, show: function (a) {
	this[a || this.options.mode]();
	this.open = true; return this.set([0, this.offset]);
}, toggle: function (a) { return this.start("toggle", a); } 
}); Element.Properties.slide = { set: function (b) {
	var a = this.retrieve("slide");
	if (a) { a.cancel(); } return this.eliminate("slide").store("slide:options", $extend({ link: "cancel" }, b));
}, get: function (a) {
	if (a || !this.retrieve("slide")) {
		if (a || !this.retrieve("slide:options")) {
			this.set("slide", a);
		} this.store("slide", new Fx.Slide(this, this.retrieve("slide:options")));
	} return this.retrieve("slide");
} 
}; Element.implement({ slide: function (d, e) {
	d = d || "toggle";
	var b = this.get("slide"), a; switch (d) {
		case "hide": b.hide(e); break; case "show": b.show(e); break; case "toggle": var c = this.retrieve("slide:flag", b.open); b[c ? "slideOut" : "slideIn"](e);
			this.store("slide:flag", !c); a = true; break; default: b.start(d, e);
	} if (!a) { this.eliminate("slide:flag"); } return this;
} 
}); Fx.Sort = new Class({ Extends: Fx.Elements, options: { mode: "vertical" }, initialize: function (b, a) {
	this.parent(b, a);
	this.elements.each(function (c) { if (c.getStyle("position") == "static") { c.setStyle("position", "relative"); } }); this.setDefaultOrder();
}, setDefaultOrder: function () {
	this.currentOrder = this.elements.map(function (b, a) {
		return a;
	});
}, sort: function (e) {
	if ($type(e) != "array") { return false; } var i = 0, a = 0, c = {}, h = {}, d = this.options.mode == "vertical"; var f = this.elements.map(function (m, j) {
		var l = m.getComputedSize({ styles: ["border", "padding", "margin"] });
		var n; if (d) { n = { top: i, margin: l["margin-top"], height: l.totalHeight }; i += n.height - l["margin-top"]; } else {
			n = { left: a, margin: l["margin-left"], width: l.totalWidth };
			a += n.width;
		} var k = d ? "top" : "left"; h[j] = {}; var o = m.getStyle(k).toInt(); h[j][k] = o || 0; return n;
	}, this); this.set(h); e = e.map(function (j) { return j.toInt(); });
	if (e.length != this.elements.length) {
		this.currentOrder.each(function (j) { if (!e.contains(j)) { e.push(j); } }); if (e.length > this.elements.length) {
			e.splice(this.elements.length - 1, e.length - this.elements.length);
		} 
	} var b = i = a = 0; e.each(function (l, j) { var k = {}; if (d) { k.top = i - f[l].top - b; i += f[l].height; } else { k.left = a - f[l].left; a += f[l].width; } b = b + f[l].margin; c[l] = k; }, this);
	var g = {}; $A(e).sort().each(function (j) { g[j] = c[j]; }); this.start(g); this.currentOrder = e; return this;
}, rearrangeDOM: function (a) {
	a = a || this.currentOrder; var b = this.elements[0].getParent();
	var c = []; this.elements.setStyle("opacity", 0); a.each(function (d) { c.push(this.elements[d].inject(b).setStyles({ top: 0, left: 0 })); }, this); this.elements.setStyle("opacity", 1);
	this.elements = $$(c); this.setDefaultOrder(); return this;
}, getDefaultOrder: function () { return this.elements.map(function (b, a) { return a; }); }, forward: function () {
	return this.sort(this.getDefaultOrder());
}, backward: function () { return this.sort(this.getDefaultOrder().reverse()); }, reverse: function () { return this.sort(this.currentOrder.reverse()); }, sortByElements: function (a) {
	return this.sort(a.map(function (b) {
		return this.elements.indexOf(b);
	}, this));
}, swap: function (c, b) {
	if ($type(c) == "element") { c = this.elements.indexOf(c); } if ($type(b) == "element") { b = this.elements.indexOf(b); } var a = $A(this.currentOrder);
	a[this.currentOrder.indexOf(c)] = b; a[this.currentOrder.indexOf(b)] = c; return this.sort(a);
} 
});

/*

Slimbox v1.71 - The ultimate lightweight Lightbox clone

(c) 2007-2009 Christophe Beyls <http://www.digitalia.be>

MIT-style license.

*/


var Slimbox = (function () {

	var F = window, n = Browser.Engine.trident4, u, g, G = -1, o, w, E, v, y, M, s, m = {}, t = new Image(), K = new Image(), I, a, h, q, J, e, H, c, A, L, x, i, d, C; F.addEvent("domready", function () { $(document.body).adopt($$(I = new Element("div", { id: "lbOverlay", events: { click: D} }), a = new Element("div", { id: "lbCenter" }), H = new Element("div", { id: "lbBottomContainer" })).setStyle("display", "none")); h = new Element("div", { id: "lbImage" }).injectInside(a).adopt(q = new Element("div", { styles: { position: "relative"} }).adopt(J = new Element("a", { id: "lbPrevLink", href: "#", events: { click: B} }), e = new Element("a", { id: "lbNextLink", href: "#", events: { click: f} }))); c = new Element("div", { id: "lbBottom" }).injectInside(H).adopt(new Element("a", { id: "lbCloseLink", href: "#", events: { click: D} }), A = new Element("div", { id: "lbCaption" }), L = new Element("div", { id: "lbNumber" }), new Element("div", { styles: { clear: "both"} })) }); function z() { var N = F.getScroll(), O = F.getSize(); $$(a, H).setStyle("left", N.x + (O.x / 2)); if (v) { I.setStyles({ left: N.x, top: N.y, width: O.x, height: O.y }) } } function l(N) { ["object", n ? "select" : "embed"].forEach(function (P) { Array.forEach(document.getElementsByTagName(P), function (Q) { if (N) { Q._slimbox = Q.style.visibility } Q.style.visibility = N ? "hidden" : Q._slimbox }) }); I.style.display = N ? "" : "none"; var O = N ? "addEvent" : "removeEvent"; F[O]("scroll", z)[O]("resize", z); document[O]("keydown", p) } function p(O) { var N = O.code; return u.closeKeys.contains(N) ? D() : u.nextKeys.contains(N) ? f() : u.previousKeys.contains(N) ? B() : false } function B() { return b(w) } function f() { return b(E) } function b(N) { if (N >= 0) { G = N; o = g[N][0]; w = (G || (u.loop ? g.length : 0)) - 1; E = ((G + 1) % g.length) || (u.loop ? 0 : -1); r(); a.className = "lbLoading"; m = new Image(); m.onload = k; m.src = o } return false } function k() {

		a.className = ""; d.set(0); h.setStyles({ backgroundImage: "url(" + o + ")", display: "" }); q.setStyle("width", m.width); $$(q, J, e).setStyle("height", m.height); A.set("html", g[G][1] || ""); L.set("html", (((g.length > 1) && u.counterText) || "").replace(/{x}/, G + 1).replace(/{y}/, g.length)); if (w >= 0) { t.src = g[w][0] } if (E >= 0) { K.src = g[E][0] } M = h.offsetWidth; s = h.offsetHeight; a.setStyles({ top: Math.max(0, y - (s / 2)), width: M, height: s, marginLeft: -M / 2, display: "" }); var P = Math.max(0, y - (s / 2)), N = 0, O; if (a.offsetHeight != s) { N = i.start({ height: s, top: P }) } if (a.offsetWidth != M) { N = i.start({ width: M, marginLeft: -M / 2 }) } O = function () { H.setStyles({ width: M, top: P + s, marginLeft: -M / 2, visibility: "hidden", display: "" }); d.start(1) }; if (N) { i.chain(O) } else { O() }

	} function j() { if (w >= 0) { J.style.display = "" } if (E >= 0) { e.style.display = "" } C.set(-c.offsetHeight).start(0); H.style.visibility = "" } function r() { m.onload = $empty; m.src = t.src = K.src = o; i.cancel(); d.cancel(); C.cancel(); $$(J, e, h, H).setStyle("display", "none") } function D() { if (G >= 0) { r(); G = w = E = -1; a.style.display = "none"; x.cancel().chain(l).start(0) } return false } Element.implement({ slimbox: function (N, O) { $$(this).slimbox(N, O); return this } }); Elements.implement({ slimbox: function (N, Q, P) { Q = Q || function (R) { return [R.href, R.title] }; P = P || function () { return true }; var O = this; O.removeEvents("click").addEvent("click", function () { var R = O.filter(P, this); return Slimbox.open(R.map(Q), R.indexOf(this), N) }); return O } }); return { open: function (P, O, N) { u = $extend({ loop: false, overlayOpacity: 0.8, overlayFadeDuration: 400, resizeDuration: 400, resizeTransition: false, initialWidth: 250, initialHeight: 250, imageFadeDuration: 400, captionAnimationDuration: 400, counterText: "Image {x} of {y}", closeKeys: [27, 88, 67], previousKeys: [37, 80], nextKeys: [39, 78] }, N || {}); x = new Fx.Tween(I, { property: "opacity", duration: u.overlayFadeDuration }); i = new Fx.Morph(a, $extend({ duration: u.resizeDuration, link: "chain" }, u.resizeTransition ? { transition: u.resizeTransition} : {})); d = new Fx.Tween(h, { property: "opacity", duration: u.imageFadeDuration, onComplete: j }); C = new Fx.Tween(c, { property: "margin-top", duration: u.captionAnimationDuration }); if (typeof P == "string") { P = [[P, O]]; O = 0 } y = F.getScrollTop() + (F.getHeight() / 2); M = u.initialWidth; s = u.initialHeight; a.setStyles({ top: Math.max(0, y - (s / 2)), width: M, height: s, marginLeft: -M / 2, display: "" }); v = n || (I.currentStyle && (I.currentStyle.position != "fixed")); if (v) { I.style.position = "absolute" } x.set(0).start(u.overlayOpacity); z(); l(1); g = P; u.loop = u.loop && (g.length > 1); return b(O) } }

})();


// AUTOLOAD CODE BLOCK (MAY BE CHANGED OR REMOVED)

Slimbox.scanPage = function () {

	$$("a").filter(function (el) {

		return el.rel && el.rel.test(/^lightbox/i);

	}).slimbox({/* Put custom options here */

}, null, function (el) {

	return (this == el) || ((this.rel.length > 8) && (this.rel == el.rel));

});

};
if (!/android|iphone|ipod|series60|symbian|windows ce|blackberry/i.test(navigator.userAgent)) {
	window.addEvent("domready", Slimbox.scanPage);
}
/**
Script: Slideshow.js
	Slideshow - A javascript class for Mootools to stream and animate the presentation of images on your website.

License:
	MIT-style license.

Copyright:
	Copyright (c) 2008 [Aeron Glemann](http://www.electricprism.com/aeron/).

Dependencies:
	Mootools 1.2 Core: Fx.Morph, Fx.Tween, Selectors, Element.Dimensions.
	Mootools 1.2 More: Assets.
*/
Slideshow = new Class({ Implements: [Chain, Events, Options], options: { captions: false, center: true, classes: [], controller: false, delay: 2000, duration: 750, fast: false, height: false, href: "", hu: "", linked: false, loader: { animate: ["css/loader-#.png", 12] }, loop: true, match: /\?slide=(\d+)$/, overlap: true, paused: false, properties: ["href", "rel", "rev", "title"], random: false, replace: [/(\.[^\.]+)$/, "t$1"], resize: "width", slide: 0, thumbnails: false, titles: true, transition: function (A) { return -(Math.cos(Math.PI * A) - 1) / 2 }, width: false }, initialize: function (C, F, L) { this.setOptions(L); this.slideshow = $(C); if (!this.slideshow) { return } this.slideshow.set("styles", { display: "block", position: "relative", "z-index": 0 }); var H = window.location.href.match(this.options.match); this.slide = (this.options.match && H) ? H[1].toInt() : this.options.slide; this.counter = this.delay = this.transition = 0; this.direction = "left"; this.paused = false; if (!this.options.overlap) { this.options.duration *= 2 } var G = this.slideshow.getElement("a") || new Element("a"); if (!this.options.href) { this.options.href = G.get("href") || "" } if (this.options.hu.length && !this.options.hu.test(/\/$/)) { this.options.hu += "/" } if (this.options.fast === true) { this.options.fast = 2 } var K = ["slideshow", "first", "prev", "play", "pause", "next", "last", "images", "captions", "controller", "thumbnails", "hidden", "visible", "inactive", "active", "loader"]; var J = K.map(function (N, M) { return this.options.classes[M] || N }, this); this.classes = J.associate(K); this.classes.get = function () { var O = "." + this.slideshow; for (var N = 0, M = arguments.length; N < M; N++) { O += ("-" + this[arguments[N]]) } return O } .bind(this.classes); if (!F) { this.options.hu = ""; F = {}; var D = this.slideshow.getElements(this.classes.get("thumbnails") + " img"); this.slideshow.getElements(this.classes.get("images") + " img").each(function (O, Q) { var S = O.get("src"); var N = $pick(O.get("alt"), O.get("title"), ""); var R = O.getParent(); var P = (R.get("tag") == "a") ? R.getProperties : {}; var M = O.getParent().get("href") || ""; var T = (D[Q]) ? D[Q].get("src") : ""; F[S] = { caption: N, href: M, thumbnail: T} }) } var E = this.load(F); if (!E) { return } this.events = $H({ keydown: [], keyup: [], mousemove: [] }); var B = function (M) { switch (M.key) { case "left": this.prev(M.shift); break; case "right": this.next(M.shift); break; case "p": this.pause(); break } } .bind(this); this.events.keyup.push(B); document.addEvent("keyup", B); var C = this.slideshow.getElement(this.classes.get("images")); var I = (C) ? C.empty() : new Element("div", { "class": this.classes.get("images").substr(1) }).inject(this.slideshow); var A = I.getSize(); this.height = this.options.height || A.y; this.width = this.options.width || A.x; I.set({ styles: { display: "block", height: this.height, overflow: "hidden", position: "relative", width: this.width} }); this.slideshow.store("images", I); this.a = this.image = this.slideshow.getElement("img") || new Element("img"); if (Browser.Engine.trident && Browser.Engine.version > 4) { this.a.style.msInterpolationMode = "bicubic" } this.a.set("styles", { display: "none", position: "absolute", zIndex: 1 }); this.b = this.a.clone(); [this.a, this.b].each(function (M) { G.clone().cloneEvents(G).grab(M).inject(I) }); if (this.options.captions) { this._captions() } if (this.options.controller) { this._controller() } if (this.options.loader) { this._loader() } if (this.options.thumbnails) { this._thumbnails() } this._preload() }, go: function (B, A) { if ((this.slide - 1 + this.data.images.length) % this.data.images.length == B || $time() < this.transition) { return } $clear(this.timer); this.delay = 0; this.direction = (A) ? A : ((B < this.slide) ? "right" : "left"); this.slide = B; if (this.preloader) { this.preloader = this.preloader.destroy() } this._preload(this.options.fast == 2 || (this.options.fast == 1 && this.paused)) }, first: function () { this.prev(true) }, prev: function (A) { var B = 0; if (!A) { if (this.options.random) { if (this.showed.i < 2) { return } this.showed.i -= 2; B = this.showed.array[this.showed.i] } else { B = (this.slide - 2 + this.data.images.length) % this.data.images.length } } this.go(B, "right") }, pause: function (A) { if ($chk(A)) { this.paused = (A) ? false : true } if (this.paused) { this.paused = false; this.delay = this.transition = 0; this.timer = this._preload.delay(100, this); [this.a, this.b].each(function (B) { ["morph", "tween"].each(function (C) { if (this.retrieve(C)) { this.get(C).resume() } }, B) }); if (this.options.controller) { this.slideshow.getElement("." + this.classes.pause).removeClass(this.classes.play) } } else { this.paused = true; this.delay = Number.MAX_VALUE; this.transition = 0; $clear(this.timer); [this.a, this.b].each(function (B) { ["morph", "tween"].each(function (C) { if (this.retrieve(C)) { this.get(C).pause() } }, B) }); if (this.options.controller) { this.slideshow.getElement("." + this.classes.pause).addClass(this.classes.play) } } }, next: function (A) { var B = (A) ? this.data.images.length - 1 : this.slide; this.go(B, "left") }, last: function () { this.next(true) }, load: function (C) { this.firstrun = true; this.showed = { array: [], i: 0 }; if ($type(C) == "array") { this.options.captions = false; C = new Array(C.length).associate(C.map(function (H, G) { return H + "?" + G })) } this.data = { images: [], captions: [], hrefs: [], thumbnails: [] }; for (var E in C) { var D = C[E] || {}; var B = (D.caption) ? D.caption.trim() : ""; var A = (D.href) ? D.href.trim() : ((this.options.linked) ? this.options.hu + E : this.options.href); var F = (D.thumbnail) ? D.thumbnail.trim() : E.replace(this.options.replace[0], this.options.replace[1]); this.data.images.push(E); this.data.captions.push(B); this.data.hrefs.push(A); this.data.thumbnails.push(F) } if (this.options.random) { this.slide = $random(0, this.data.images.length - 1) } if (this.options.thumbnails && this.slideshow.retrieve("thumbnails")) { this._thumbnails() } if (this.slideshow.retrieve("images")) { [this.a, this.b].each(function (G) { ["morph", "tween"].each(function (H) { if (this.retrieve(H)) { this.get(H).cancel() } }, G) }); this.slide = this.transition = 0; this.go(0) } return this.data.images.length }, destroy: function (A) { this.events.each(function (C, B) { C.each(function (D) { document.removeEvent(B, D) }) }); this.pause(1); if (this.options.loader) { $clear(this.slideshow.retrieve("loader").retrieve("timer")) } if (this.options.thumbnails) { $clear(this.slideshow.retrieve("thumbnails").retrieve("timer")) } this.slideshow.uid = Native.UID++; if (A) { this.slideshow[A]() } }, _preload: function (A) { if (!this.preloader) { this.preloader = new Asset.image(this.options.hu + this.data.images[this.slide], { onload: function () { this.store("loaded", true) } }) } if (this.preloader.retrieve("loaded") && $time() > this.delay && $time() > this.transition) { if (this.stopped) { if (this.options.captions) { this.slideshow.retrieve("captions").get("morph").cancel().start(this.classes.get("captions", "hidden")) } this.pause(1); if (this.end) { this.fireEvent("end") } this.stopped = this.end = false; return } this.image = (this.counter % 2) ? this.b : this.a; this.image.set("styles", { display: "block", height: "auto", visibility: "hidden", width: "auto", zIndex: this.counter }); ["src", "height", "width"].each(function (D) { this.image.set(D, this.preloader.get(D)) }, this); this._resize(this.image); this._center(this.image); var B = this.image.getParent(); if (this.data.hrefs[this.slide]) { B.set("href", this.data.hrefs[this.slide]) } else { B.erase("href") } var C = (this.data.captions[this.slide]) ? this.data.captions[this.slide].replace(/<.+?>/gm, "").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "'") : ""; this.image.set("alt", C); if (this.options.titles) { B.set("title", C) } if (this.options.loader) { this.slideshow.retrieve("loader").fireEvent("hide") } if (this.options.captions) { this.slideshow.retrieve("captions").fireEvent("update", A) } if (this.options.thumbnails) { this.slideshow.retrieve("thumbnails").fireEvent("update", A) } this._show(A); this._loaded() } else { if ($time() > this.delay && this.options.loader) { this.slideshow.retrieve("loader").fireEvent("show") } this.timer = (this.paused && this.preloader.retrieve("loaded")) ? null : this._preload.delay(100, this, A) } }, _show: function (B) { if (!this.image.retrieve("morph")) { var C = (this.options.overlap) ? { duration: this.options.duration, link: "cancel"} : { duration: this.options.duration / 2, link: "chain" }; $$(this.a, this.b).set("morph", $merge(C, { onStart: this._start.bind(this), onComplete: this._complete.bind(this), transition: this.options.transition })) } var E = this.classes.get("images", ((this.direction == "left") ? "next" : "prev")); var F = this.classes.get("images", "visible"); var A = (this.counter % 2) ? this.a : this.b; if (B) { A.get("morph").cancel().set(E); this.image.get("morph").cancel().set(F) } else { if (this.options.overlap) { A.get("morph").set(F); this.image.get("morph").set(E).start(F) } else { var D = function (G, H) { this.image.get("morph").set(G).start(H) } .pass([E, F], this); E = this.classes.get("images", ((this.direction == "left") ? "prev" : "next")); A.get("morph").set(F).start(E).chain(D) } } }, _loaded: function () { this.counter++; this.delay = (this.paused) ? Number.MAX_VALUE : $time() + this.options.duration + this.options.delay; this.direction = "left"; this.transition = (this.options.fast == 2 || (this.options.fast == 1 && this.paused)) ? 0 : $time() + this.options.duration; if (this.slide + 1 == this.data.images.length && !this.options.loop && !this.options.random) { this.stopped = this.end = true } if (this.options.random) { this.showed.i++; if (this.showed.i >= this.showed.array.length) { var A = this.slide; if (this.showed.array.getLast() != A) { this.showed.array.push(A) } while (this.slide == A) { this.slide = $random(0, this.data.images.length - 1) } } else { this.slide = this.showed.array[this.showed.i] } } else { this.slide = (this.slide + 1) % this.data.images.length } if (this.image.getStyle("visibility") != "visible") { (function () { this.image.setStyle("visibility", "visible") }).delay(1, this) } if (this.preloader) { this.preloader = this.preloader.destroy() } this._preload() }, _center: function (A) { if (this.options.center) { var B = A.getSize(); A.set("styles", { left: (B.x - this.width) / -2, top: (B.y - this.height) / -2 }) } }, _resize: function (B) { if (this.options.resize) { var D = this.preloader.get("height"), A = this.preloader.get("width"); var E = this.height / D, C = this.width / A, F; if (this.options.resize == "length") { F = (E > C) ? C : E } else { F = (E > C) ? E : C } B.set("styles", { height: Math.ceil(D * F), width: Math.ceil(A * F) }) } }, _start: function () { this.fireEvent("start") }, _complete: function () { if (this.firstrun && this.options.paused) { this.firstrun = false; this.pause(1) } this.fireEvent("complete") }, _captions: function () { if (this.options.captions === true) { this.options.captions = {} } var B = this.slideshow.getElement(this.classes.get("captions")); var A = (B) ? B.empty() : new Element("div", { "class": this.classes.get("captions").substr(1) }).inject(this.slideshow); A.set({ events: { update: function (D) { var C = this.slideshow.retrieve("captions"); var F = (this.data.captions[this.slide] === ""); if (D) { var G = (F) ? "hidden" : "visible"; C.set("html", this.data.captions[this.slide]).get("morph").cancel().set(this.classes.get("captions", G)) } else { var E = (F) ? $empty : function (H) { this.slideshow.retrieve("captions").set("html", this.data.captions[H]).morph(this.classes.get("captions", "visible")) } .pass(this.slide, this); C.get("morph").cancel().start(this.classes.get("captions", "hidden")).chain(E) } } .bind(this) }, morph: $merge(this.options.captions, { link: "chain" }) }); this.slideshow.store("captions", A) }, _controller: function () { if (this.options.controller === true) { this.options.controller = {} } var E = this.slideshow.getElement(this.classes.get("controller")); var A = (E) ? E.empty() : new Element("div", { "class": this.classes.get("controller").substr(1) }).inject(this.slideshow); var C = new Element("ul").inject(A); $H({ first: "Shift + Leftwards Arrow", prev: "Leftwards Arrow", pause: "P", next: "Rightwards Arrow", last: "Shift + Rightwards Arrow" }).each(function (J, I) { var G = new Element("li", { "class": (I == "pause" && this.options.paused) ? this.classes.play + " " + this.classes[I] : this.classes[I] }).inject(C); var H = this.slideshow.retrieve(I, new Element("a", { title: ((I == "pause") ? this.classes.play.capitalize() + " / " : "") + this.classes[I].capitalize() + " [" + J + "]" }).inject(G)); H.set("events", { click: function (K) { this[K]() } .pass(I, this), mouseenter: function (K) { this.addClass(K) } .pass(this.classes.active, H), mouseleave: function (K) { this.removeClass(K) } .pass(this.classes.active, H) }) }, this); A.set({ events: { hide: function (G) { if (!this.retrieve("hidden")) { this.store("hidden", true).morph(G) } } .pass(this.classes.get("controller", "hidden"), A), show: function (G) { if (this.retrieve("hidden")) { this.store("hidden", false).morph(G) } } .pass(this.classes.get("controller", "visible"), A) }, morph: $merge(this.options.controller, { link: "cancel" }) }).store("hidden", false); var B = function (H) { if (["left", "right", "p"].contains(H.key)) { var G = this.slideshow.retrieve("controller"); if (G.retrieve("hidden")) { G.get("morph").set(this.classes.get("controller", "visible")) } switch (H.key) { case "left": this.slideshow.retrieve((H.shift) ? "first" : "prev").fireEvent("mouseenter"); break; case "right": this.slideshow.retrieve((H.shift) ? "last" : "next").fireEvent("mouseenter"); break; default: this.slideshow.retrieve("pause").fireEvent("mouseenter"); break } } } .bind(this); this.events.keydown.push(B); var F = function (H) { if (["left", "right", "p"].contains(H.key)) { var G = this.slideshow.retrieve("controller"); if (G.retrieve("hidden")) { G.store("hidden", false).fireEvent("hide") } switch (H.key) { case "left": this.slideshow.retrieve((H.shift) ? "first" : "prev").fireEvent("mouseleave"); break; case "right": this.slideshow.retrieve((H.shift) ? "last" : "next").fireEvent("mouseleave"); break; default: this.slideshow.retrieve("pause").fireEvent("mouseleave"); break } } } .bind(this); this.events.keyup.push(F); var D = function (H) { var G = this.slideshow.retrieve("images").getCoordinates(); if (H.page.x > G.left && H.page.x < G.right && H.page.y > G.top && H.page.y < G.bottom) { this.slideshow.retrieve("controller").fireEvent("show") } else { this.slideshow.retrieve("controller").fireEvent("hide") } } .bind(this); this.events.mousemove.push(D); document.addEvents({ keydown: B, keyup: F, mousemove: D }); this.slideshow.retrieve("controller", A).fireEvent("hide") }, _loader: function () { if (this.options.loader === true) { this.options.loader = {} } var A = new Element("div", { "class": this.classes.get("loader").substr(1), morph: $merge(this.options.loader, { link: "cancel" }) }).store("hidden", false).store("i", 1).inject(this.slideshow.retrieve("images")); if (this.options.loader.animate) { for (var B = 0; B < this.options.loader.animate[1]; B++) { img = new Asset.image(this.options.loader.animate[0].replace(/#/, B)) } if (Browser.Engine.trident4 && this.options.loader.animate[0].contains("png")) { A.setStyle("backgroundImage", "none") } } A.set("events", { animate: function () { var C = this.slideshow.retrieve("loader"); var E = (C.retrieve("i").toInt() + 1) % this.options.loader.animate[1]; C.store("i", E); var D = this.options.loader.animate[0].replace(/#/, E); if (Browser.Engine.trident4 && this.options.loader.animate[0].contains("png")) { C.style.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' + D + '", sizingMethod="scale")' } else { C.setStyle("backgroundImage", "url(" + D + ")") } } .bind(this), hide: function () { var C = this.slideshow.retrieve("loader"); if (!C.retrieve("hidden")) { C.store("hidden", true).morph(this.classes.get("loader", "hidden")); if (this.options.loader.animate) { $clear(C.retrieve("timer")) } } } .bind(this), show: function () { var C = this.slideshow.retrieve("loader"); if (C.retrieve("hidden")) { C.store("hidden", false).morph(this.classes.get("loader", "visible")); if (this.options.loader.animate) { C.store("timer", function () { this.fireEvent("animate") } .periodical(50, C)) } } } .bind(this) }); this.slideshow.retrieve("loader", A).fireEvent("hide") }, _thumbnails: function () { if (this.options.thumbnails === true) { this.options.thumbnails = {} } var C = this.slideshow.getElement(this.classes.get("thumbnails")); var E = (C) ? C.empty() : new Element("div", { "class": this.classes.get("thumbnails").substr(1) }).inject(this.slideshow); E.setStyle("overflow", "hidden"); var A = new Element("ul", { tween: { link: "cancel"} }).inject(E); this.data.thumbnails.each(function (J, I) { var F = new Element("li").inject(A); var G = new Element("a", { events: { click: function (K) { this.go(K); return false } .pass(I, this), loaded: function () { this.data.thumbnails.pop(); if (!this.data.thumbnails.length) { var O = E.getCoordinates(); var M = E.retrieve("props"); var K = 0, N = M[1], L = M[2]; E.getElements("li").each(function (P) { var P = P.getCoordinates(); if (P[N] > K) { K = P[N] } }, this); E.store("limit", O[L] + O[M[0]] - K) } } .bind(this) }, href: this.options.hu + this.data.images[I], morph: $merge(this.options.thumbnails, { link: "cancel" }) }).inject(F); if (this.data.captions[I] && this.options.titles) { G.set("title", this.data.captions[I].replace(/<.+?>/gm, "").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "'")) } var H = new Asset.image(this.options.hu + J, { onload: function () { this.fireEvent("loaded") } .bind(G) }).inject(G) }, this); E.set("events", { scroll: function (H, K) { var F = this.getCoordinates(); var L = this.getElement("ul").getPosition(); var N = this.retrieve("props"); var I = N[3], R, O = N[0], T = N[2], P; var S = this.getElement("ul").get("tween", { property: O }); if ($chk(H)) { var Q = this.getElements("li")[H].getCoordinates(); R = F[O] + (F[T] / 2) - (Q[T] / 2) - Q[O]; P = (L[I] - F[O] + R).limit(this.retrieve("limit"), 0); if (K) { S.set(P) } else { S.start(P) } } else { var G = F[N[2]] / 3, M = this.retrieve("page"), J = -0.2; if (M[I] < (F[O] + G)) { R = (M[I] - F[O] - G) * J } else { if (M[I] > (F[O] + F[T] - G)) { R = (M[I] - F[O] - F[T] + G) * J } } if (R) { P = (L[I] - F[O] + R).limit(this.retrieve("limit"), 0); S.set(P) } } } .bind(E), update: function (F) { var G = this.slideshow.retrieve("thumbnails"); G.getElements("a").each(function (H, I) { if (I == this.slide) { if (!H.retrieve("active", false)) { H.store("active", true); var K = this.classes.get("thumbnails", "active"); if (F) { H.get("morph").set(K) } else { H.morph(K) } } } else { if (H.retrieve("active", true)) { H.store("active", false); var J = this.classes.get("thumbnails", "inactive"); if (F) { H.get("morph").set(J) } else { H.morph(J) } } } }, this); if (!G.retrieve("mouseover")) { G.fireEvent("scroll", [this.slide, F]) } } .bind(this) }); var D = E.getCoordinates(); E.store("props", (D.height > D.width) ? ["top", "bottom", "height", "y"] : ["left", "right", "width", "x"]); var B = function (F) { var G = this.getCoordinates(); if (F.page.x > G.left && F.page.x < G.right && F.page.y > G.top && F.page.y < G.bottom) { this.store("page", F.page); if (!this.retrieve("mouseover")) { this.store("mouseover", true); this.store("timer", function () { this.fireEvent("scroll") } .periodical(50, this)) } } else { if (this.retrieve("mouseover")) { this.store("mouseover", false); $clear(this.retrieve("timer")) } } } .bind(E); this.events.mousemove.push(B); document.addEvent("mousemove", B); this.slideshow.store("thumbnails", E) } });


var dwClickables = new Class({
	//implements
	Implements: [Options],
	//options
	options: {
		elements: $$('li'),
		selectClass: '',
		anchorToSpan: false
	},
	//initialization
	initialize: function (options) {
		//set options
		this.setOptions(options);
		//set clickable
		this.doClickables();
	},
	//a method that does whatever you want
	doClickables: function () {
		//for all of the elements
		this.options.elements.each(function (el) {
			//get the href
			var anchor = el.getElements('a' + (this.options.selectClass ? '.' + this.options.selectClass : ''))[0];
			//if we found one
			if ($defined(anchor)) {
				//add a click event to the item so it goes there when clicked. 
				this.setClick(el, anchor.get('href'));
				//modify anchor to span if necesssary
				if (this.options.anchorToSpan) {
					var span = new Element('span', {
						text: anchor.get('text')
					}).replaces(anchor);
				}
			}
		}, this);
	},
	//ads the click event
	setClick: function (element, href) {
		element.addEvent('click', function () {
			window.location = href;
		});
	}
});

