/*
* jQuery Tools 1.2.0 - The missing UI library for the Web
* 
* [tabs, overlay, toolbox.expose]
* 
* NO COPYRIGHTS OR LICENSES. DO WHAT YOU LIKE.
* 
* http://flowplayer.org/tools/
* 
* File generated: Tue May 11 07:49:46 GMT 2010
*/
(function(c) {
    function p(d, a, b) {
        var e = this, j = d.add(this), h = d.find(b.tabs), k = a.jquery ? a : d.children(a), i; h.length || (h = d.children()); k.length || (k = d.parent().find(a)); k.length || (k = c(a)); c.extend(this, { click: function(f, g) {
            var l = h.eq(f); if (typeof f == "string" && f.replace("#", "")) { l = h.filter("[href*=" + f.replace("#", "") + "]"); f = Math.max(h.index(l), 0) } if (b.rotate) { var n = h.length - 1; if (f < 0) return e.click(n, g); if (f > n) return e.click(0, g) } if (!l.length) { if (i >= 0) return e; f = b.initialIndex; l = h.eq(f) } if (f === i) return e;
            g = g || c.Event(); g.type = "onBeforeClick"; j.trigger(g, [f]); if (!g.isDefaultPrevented()) { o[b.effect].call(e, f, function() { g.type = "onClick"; j.trigger(g, [f]) }); i = f; h.removeClass(b.current); l.addClass(b.current); return e } 
        }, getConf: function() { return b }, getTabs: function() { return h }, getPanes: function() { return k }, getCurrentPane: function() { return k.eq(i) }, getCurrentTab: function() { return h.eq(i) }, getIndex: function() { return i }, next: function() { return e.click(i + 1) }, prev: function() { return e.click(i - 1) } 
        }); c.each("onBeforeClick,onClick".split(","),
function(f, g) { c.isFunction(b[g]) && c(e).bind(g, b[g]); e[g] = function(l) { c(e).bind(g, l); return e } }); if (b.history && c.fn.history) { c.tools.history.init(h); b.event = "history" } h.each(function(f) { c(this).bind(b.event, function(g) { e.click(f, g); return g.preventDefault() }) }); k.find("a[href^=#]").click(function(f) { e.click(c(this).attr("href"), f) }); if (location.hash) e.click(location.hash); else if (b.initialIndex === 0 || b.initialIndex > 0) e.click(b.initialIndex)
    } c.tools = c.tools || { version: "1.2.0" }; c.tools.tabs = { conf: { tabs: "a",
        current: "current", onBeforeClick: null, onClick: null, effect: "default", initialIndex: 0, event: "click", rotate: false, history: false
    }, addEffect: function(d, a) { o[d] = a } 
    }; var o = { "default": function(d, a) { this.getPanes().hide().eq(d).show(); a.call() }, fade: function(d, a) { var b = this.getConf(), e = b.fadeOutSpeed, j = this.getPanes(); if (!j.eq(d).is(":visible")) { e ? j.fadeOut(e) : j.hide(); j.eq(d).fadeIn(b.fadeInSpeed, a) } }, slide: function(d, a) { this.getPanes().slideUp(200); this.getPanes().eq(d).slideDown(400, a) }, ajax: function(d, a) {
        this.getPanes().eq(0).load(this.getTabs().eq(d).attr("href"),
a)
    } 
    }, m; c.tools.tabs.addEffect("horizontal", function(d, a) { m || (m = this.getPanes().eq(0).width()); this.getCurrentPane().animate({ width: 0 }, function() { c(this).hide() }); this.getPanes().eq(d).animate({ width: m }, function() { c(this).show(); a.call() }) }); c.fn.tabs = function(d, a) { var b = this.data("tabs"); if (b) return b; if (c.isFunction(a)) a = { onBeforeClick: a }; a = c.extend({}, c.tools.tabs.conf, a); this.each(function() { b = new p(c(this), d, a); c(this).data("tabs", b) }); return a.api ? b : this } 
})(jQuery);
(function(a) {
    function t(d, b) {
        var c = this, i = d.add(c), o = a(window), k, f, m, g = a.tools.expose && (b.mask || b.expose), n = Math.random().toString().slice(10); if (g) { if (typeof g == "string") g = { color: g }; g.closeOnClick = g.closeOnEsc = false } var p = b.target || d.attr("rel"); f = p ? a(p) : d; if (!f.length) throw "Could not find Overlay: " + p; d && d.index(f) == -1 && d.click(function(e) { c.load(e); return e.preventDefault() }); a.extend(c, { load: function(e) {
            if (c.isOpened()) return c; var h = q[b.effect]; if (!h) throw 'Overlay: cannot find effect : "' + b.effect +
'"'; b.oneInstance && a.each(s, function() { this.close(e) }); e = e || a.Event(); e.type = "onBeforeLoad"; i.trigger(e); if (e.isDefaultPrevented()) return c; m = true; g && a(f).expose(g); var j = b.top, r = b.left, u = f.outerWidth({ margin: true }), v = f.outerHeight({ margin: true }); if (typeof j == "string") j = j == "center" ? Math.max((o.height() - v) / 2, 0) : parseInt(j, 10) / 100 * o.height(); if (r == "center") r = Math.max((o.width() - u) / 2, 0); h[0].call(c, { top: j, left: r }, function() { if (m) { e.type = "onLoad"; i.trigger(e) } }); g && b.closeOnClick && a.mask.getMask().one("click",
c.close); b.closeOnClick && a(document).bind("click." + n, function(l) { a(l.target).parents(f).length || c.close(l) }); b.closeOnEsc && a(document).bind("keydown." + n, function(l) { l.keyCode == 27 && c.close(l) }); return c
        }, close: function(e) { if (!c.isOpened()) return c; e = e || a.Event(); e.type = "onBeforeClose"; i.trigger(e); if (!e.isDefaultPrevented()) { m = false; q[b.effect][1].call(c, function() { e.type = "onClose"; i.trigger(e) }); a(document).unbind("click." + n).unbind("keydown." + n); g && a.mask.close(); return c } }, getOverlay: function() { return f },
            getTrigger: function() { return d }, getClosers: function() { return k }, isOpened: function() { return m }, getConf: function() { return b } 
        }); a.each("onBeforeLoad,onStart,onLoad,onBeforeClose,onClose".split(","), function(e, h) { a.isFunction(b[h]) && a(c).bind(h, b[h]); c[h] = function(j) { a(c).bind(h, j); return c } }); k = f.find(b.close || ".close"); if (!k.length && !b.close) { k = a('<div class="close"></div>'); f.prepend(k) } k.click(function(e) { c.close(e) }); b.load && c.load()
    } a.tools = a.tools || { version: "1.2.0" }; a.tools.overlay = { addEffect: function(d,
b, c) { q[d] = [b, c] }, conf: { close: null, closeOnClick: true, closeOnEsc: true, closeSpeed: "fast", effect: "default", fixed: !a.browser.msie || a.browser.version > 6, left: "center", load: false, mask: null, oneInstance: true, speed: "normal", target: null, top: "10%"}
    }; var s = [], q = {}; a.tools.overlay.addEffect("default", function(d, b) { var c = this.getConf(), i = a(window); if (!c.fixed) { d.top += i.scrollTop(); d.left += i.scrollLeft() } d.position = c.fixed ? "fixed" : "absolute"; this.getOverlay().css(d).fadeIn(c.speed, b) }, function(d) {
        this.getOverlay().fadeOut(this.getConf().closeSpeed,
d)
    }); a.fn.overlay = function(d) { var b = this.data("overlay"); if (b) return b; if (a.isFunction(d)) d = { onBeforeLoad: d }; d = a.extend(true, {}, a.tools.overlay.conf, d); this.each(function() { b = new t(a(this), d); s.push(b); a(this).data("overlay", b) }); return d.api ? b : this } 
})(jQuery);
(function(b) {
    function l() { if (b.browser.msie) { var a = b(document).height(), d = b(window).height(); return [window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth, a - d < 20 ? d : a] } return [b(window).width(), b(document).height()] } function i(a) { if (a) return a.call(b.mask) } b.tools = b.tools || { version: "1.2.0" }; var m; m = b.tools.expose = { conf: { maskId: "exposeMask", loadSpeed: "slow", closeSpeed: "fast", closeOnClick: true, closeOnEsc: true, zIndex: 9998, opacity: 0.8, startOpacity: 0, color: "#fff", onLoad: null,
        onClose: null}
    }; var c, j, f, g, k; b.mask = { load: function(a, d) {
        if (f) return this; if (typeof a == "string") a = { color: a }; a = a || g; g = a = b.extend(b.extend({}, m.conf), a); c = b("#" + a.maskId); if (!c.length) { c = b("<div/>").attr("id", a.maskId); b("body").append(c) } var h = l(); c.css({ position: "absolute", top: 0, left: 0, width: h[0], height: h[1], display: "none", opacity: a.startOpacity, zIndex: a.zIndex }); h = c.css("backgroundColor"); if (!h || h == "transparent" || h == "rgba(0, 0, 0, 0)") c.css("backgroundColor", a.color); if (i(a.onBeforeLoad) === false) return this;
        a.closeOnEsc && b(document).bind("keydown.mask", function(e) { e.keyCode == 27 && b.mask.close(e) }); a.closeOnClick && c.bind("click.mask", function(e) { b.mask.close(e) }); b(window).bind("resize.mask", function() { b.mask.fit() }); if (d && d.length) { k = d.eq(0).css("zIndex"); b.each(d, function() { var e = b(this); /relative|absolute|fixed/i.test(e.css("position")) || e.css("position", "relative") }); j = d.css({ zIndex: Math.max(a.zIndex + 1, k == "auto" ? 0 : k) }) } c.css({ display: "block" }).fadeTo(a.loadSpeed, a.opacity, function() { b.mask.fit(); i(a.onLoad) });
        f = true; return this
    }, close: function() { if (f) { if (i(g.onBeforeClose) === false) return this; c.fadeOut(g.closeSpeed, function() { i(g.onClose); j && j.css({ zIndex: k }) }); b(document).unbind("keydown.mask"); c.unbind("click.mask"); b(window).unbind("resize.mask"); f = false } return this }, fit: function() { if (f) { var a = l(); c.css({ width: a[0], height: a[1] }) } }, getMask: function() { return c }, isLoaded: function() { return f }, getConf: function() { return g }, getExposed: function() { return j } 
    }; b.fn.mask = function(a) { b.mask.load(a); return this };
    b.fn.expose = function(a) { b.mask.load(a, this); return this } 
})(jQuery);

