/*
* jquery.tools 1.1.1 - The missing UI library for the Web
* 
* [tools.tabs-1.0.3, tools.tooltip-1.1.1, tools.scrollable-1.1.1, tools.scrollable.circular-0.5.1, tools.scrollable.navigator-1.0.1, tools.overlay-1.1.1, tools.expose-1.0.5]
* 
* Copyright (c) 2009 Tero Piirainen
* http://flowplayer.org/tools/
*
* Dual licensed under MIT and GPL 2+ licenses
* http://www.opensource.org/licenses
* 
* -----
* 
* File generated: Wed Sep 23 13:00:48 GMT+00:00 2009
*/
(function(d) { d.tools = d.tools || {}; d.tools.tabs = { version: "1.0.3", conf: { tabs: "a", current: "current", onBeforeClick: null, onClick: null, effect: "default", initialIndex: 0, event: "click", api: false, rotate: false }, addEffect: function(e, f) { c[e] = f } }; var c = { "default": function(f, e) { this.getPanes().hide().eq(f).show(); e.call() }, fade: function(g, e) { var f = this.getConf(), h = f.fadeOutSpeed, j = this.getCurrentPane(); if (h) { j.fadeOut(h) } else { j.hide() } this.getPanes().eq(g).fadeIn(f.fadeInSpeed, e) }, slide: function(f, e) { this.getCurrentPane().slideUp(200); this.getPanes().eq(f).slideDown(400, e) }, ajax: function(f, e) { this.getPanes().eq(0).load(this.getTabs().eq(f).attr("href"), e) } }; var b; d.tools.tabs.addEffect("horizontal", function(f, e) { if (!b) { b = this.getPanes().eq(0).width() } this.getCurrentPane().animate({ width: 0 }, function() { d(this).hide() }); this.getPanes().eq(f).animate({ width: b }, function() { d(this).show(); e.call() }) }); function a(g, h, f) { var e = this, j = d(this), i; d.each(f, function(k, l) { if (d.isFunction(l)) { j.bind(k, l) } }); d.extend(this, { click: function(k) { var o = e.getCurrentPane(); var l = g.eq(k); if (typeof k == "string" && k.replace("#", "")) { l = g.filter("[href*=" + k.replace("#", "") + "]"); k = Math.max(g.index(l), 0) } if (f.rotate) { var m = g.length - 1; if (k < 0) { return e.click(m) } if (k > m) { return e.click(0) } } if (!l.length) { if (i >= 0) { return e } k = f.initialIndex; l = g.eq(k) } var n = d.Event("onBeforeClick"); j.trigger(n, [k]); if (n.isDefaultPrevented()) { return } if (k === i) { return e } l.addClass(f.current); c[f.effect].call(e, k, function() { j.trigger("onClick", [k]) }); g.removeClass(f.current); l.addClass(f.current); i = k; return e }, getConf: function() { return f }, getTabs: function() { return g }, getPanes: function() { return h }, getCurrentPane: function() { return h.eq(i) }, getCurrentTab: function() { return g.eq(i) }, getIndex: function() { return i }, next: function() { return e.click(i + 1) }, prev: function() { return e.click(i - 1) }, bind: function(k, l) { j.bind(k, l); return e }, onBeforeClick: function(k) { return this.bind("onBeforeClick", k) }, onClick: function(k) { return this.bind("onClick", k) }, unbind: function(k) { j.unbind(k); return e } }); g.each(function(k) { d(this).bind(f.event, function(l) { e.click(k); return l.preventDefault() }) }); if (location.hash) { e.click(location.hash) } else { e.click(f.initialIndex) } h.find("a[href^=#]").click(function() { e.click(d(this).attr("href")) }) } d.fn.tabs = function(i, f) { var g = this.eq(typeof f == "number" ? f : 0).data("tabs"); if (g) { return g } if (d.isFunction(f)) { f = { onBeforeClick: f} } var h = d.extend({}, d.tools.tabs.conf), e = this.length; f = d.extend(h, f); this.each(function(l) { var j = d(this); var k = j.find(f.tabs); if (!k.length) { k = j.children() } var m = i.jquery ? i : j.children(i); if (!m.length) { m = e == 1 ? d(i) : j.parent().find(i) } g = new a(k, m, f); j.data("tabs", g) }); return f.api ? g : this } })(jQuery);
(function(c) { c.tools = c.tools || {}; c.tools.tooltip = { version: "1.1.1", conf: { effect: "toggle", fadeOutSpeed: "fast", tip: null, predelay: 0, delay: 30, opacity: 1, lazy: undefined, position: ["top", "center"], offset: [0, 0], cancelDefault: true, relative: false, events: { def: "mouseover,mouseout", input: "focus,blur", widget: "focus mouseover,blur mouseout" }, api: false }, addEffect: function(d, f, e) { b[d] = [f, e] } }; var b = { toggle: [function(d) { var e = this.getConf(); this.getTip().css({ opacity: e.opacity }).show(); d.call() }, function(d) { this.getTip().hide(); d.call() } ], fade: [function(d) { this.getTip().fadeIn(this.getConf().fadeInSpeed, d) }, function(d) { this.getTip().fadeOut(this.getConf().fadeOutSpeed, d) } ] }; function a(e, f) { var o = this, j = c(this); e.data("tooltip", o); var k = e.next(); if (f.tip) { k = c(f.tip); if (k.length > 1) { k = e.nextAll(f.tip).eq(0); if (!k.length) { k = e.parent().nextAll(f.tip).eq(0) } } } function n(t) { var s = f.relative ? e.position().top : e.offset().top, r = f.relative ? e.position().left : e.offset().left, u = f.position[0]; s -= k.outerHeight() - f.offset[0]; r += e.outerWidth() + f.offset[1]; var p = k.outerHeight() + e.outerHeight(); if (u == "center") { s += p / 2 } if (u == "bottom") { s += p } u = f.position[1]; var q = k.outerWidth() + e.outerWidth(); if (u == "center") { r -= q / 2 } if (u == "left") { r -= q } return { top: s, left: r} } var h = e.is(":input"), d = h && e.is(":checkbox, :radio, select, :button"), g = e.attr("type"), m = f.events[g] || f.events[h ? (d ? "widget" : "input") : "def"]; m = m.split(/,\s*/); e.bind(m[0], function(q) { var p = k.data("trigger"); if (p && p[0] != this) { k.hide() } q.target = this; o.show(q); k.hover(o.show, function() { o.hide(q) }) }); e.bind(m[1], function(p) { o.hide(p) }); if (!c.browser.msie && !h) { e.mousemove(function() { if (!o.isShown()) { e.triggerHandler("mouseover") } }) } if (f.opacity < 1) { k.css("opacity", f.opacity) } var l = 0, i = e.attr("title"); if (i && f.cancelDefault) { e.removeAttr("title"); e.data("title", i) } c.extend(o, { show: function(q) { if (q) { e = c(q.target) } clearTimeout(k.data("timer")); if (k.is(":animated") || k.is(":visible")) { return o } function p() { k.data("trigger", e); var s = n(q); if (f.tip && i) { k.html(e.data("title")) } var r = c.Event("onBeforeShow"); j.trigger(r, [s]); if (r.isDefaultPrevented()) { return o } s = n(q); k.css({ position: "absolute", top: s.top, left: s.left }); b[f.effect][0].call(o, function() { j.trigger("onShow") }) } if (f.predelay) { clearTimeout(l); l = setTimeout(p, f.predelay) } else { p() } return o }, hide: function(q) { clearTimeout(k.data("timer")); clearTimeout(l); if (!k.is(":visible")) { return } function p() { var r = c.Event("onBeforeHide"); j.trigger(r); if (r.isDefaultPrevented()) { return } b[f.effect][1].call(o, function() { j.trigger("onHide") }) } if (f.delay && q) { k.data("timer", setTimeout(p, f.delay)) } else { p() } return o }, isShown: function() { return k.is(":visible, :animated") }, getConf: function() { return f }, getTip: function() { return k }, getTrigger: function() { return e }, bind: function(p, q) { j.bind(p, q); return o }, onHide: function(p) { return this.bind("onHide", p) }, onBeforeShow: function(p) { return this.bind("onBeforeShow", p) }, onShow: function(p) { return this.bind("onShow", p) }, onBeforeHide: function(p) { return this.bind("onBeforeHide", p) }, unbind: function(p) { j.unbind(p); return o } }); c.each(f, function(p, q) { if (c.isFunction(q)) { o.bind(p, q) } }) } c.prototype.tooltip = function(d) { var e = this.eq(typeof d == "number" ? d : 0).data("tooltip"); if (e) { return e } var f = c.extend(true, {}, c.tools.tooltip.conf); if (c.isFunction(d)) { d = { onBeforeShow: d} } else { if (typeof d == "string") { d = { tip: d} } } d = c.extend(true, f, d); if (typeof d.position == "string") { d.position = d.position.split(/,?\s/) } if (d.lazy !== false && (d.lazy === true || this.length > 20)) { this.one("mouseover", function(g) { e = new a(c(this), d); e.show(g) }) } else { this.each(function() { e = new a(c(this), d) }) } return d.api ? e : this } })(jQuery);
(function(c) { c.tools = c.tools || {}; c.tools.scrollable = { version: "1.1.1", conf: { size: 5, vertical: false, speed: 400, keyboard: true, keyboardSteps: null, disabledClass: "disabled", hoverClass: null, clickable: true, activeClass: "active", easing: "swing", loop: false, items: ".items", item: null, prev: ".prev", next: ".next", prevPage: ".prevPage", nextPage: ".nextPage", api: false} }; var d, a = 0; function b(q, o, m) { var t = this, r = c(this), e = !o.vertical, f = q.children(), l = 0, j; if (!d) { d = t } c.each(o, function(u, v) { if (c.isFunction(v)) { r.bind(u, v) } }); if (f.length > 1) { f = c(o.items, q) } function n(v) { var u = c(v); return m == 1 || u.length == 1 || o.globalNav ? u : q.parent().find(v) } q.data("finder", n); var g = n(o.prev), i = n(o.next), h = n(o.prevPage), p = n(o.nextPage); c.extend(t, { getIndex: function() { return l }, getClickIndex: function() { var u = t.getItems(); return u.index(u.filter("." + o.activeClass)) }, getConf: function() { return o }, getSize: function() { return t.getItems().size() }, getPageAmount: function() { return Math.ceil(this.getSize() / o.size) }, getPageIndex: function() { return Math.ceil(l / o.size) }, getNaviButtons: function() { return g.add(i).add(h).add(p) }, getRoot: function() { return q }, getItemWrap: function() { return f }, getItems: function() { return f.children(o.item) }, getVisibleItems: function() { return t.getItems().slice(l, l + o.size) }, seekTo: function(u, y, v) { if (u < 0) { u = 0 } if (l === u) { return t } if (y === undefined) { y = o.speed } if (c.isFunction(y)) { v = y; y = o.speed } if (u > t.getSize() - o.size) { return o.loop ? t.begin() : this.end() } var w = t.getItems().eq(u); if (!w.length) { return t } var x = c.Event("onBeforeSeek"); r.trigger(x, [u]); if (x.isDefaultPrevented()) { return t } function z() { if (v) { v.call(t) } r.trigger("onSeek", [u]) } if (e) { f.animate({ left: -w.position().left }, y, o.easing, z) } else { f.animate({ top: -w.position().top }, y, o.easing, z) } d = t; l = u; return t }, move: function(w, v, u) { j = w > 0; return this.seekTo(l + w, v, u) }, next: function(v, u) { return this.move(1, v, u) }, prev: function(v, u) { return this.move(-1, v, u) }, movePage: function(y, x, w) { j = y > 0; var u = o.size * y; var v = l % o.size; if (v > 0) { u += (y > 0 ? -v : o.size - v) } return this.move(u, x, w) }, prevPage: function(v, u) { return this.movePage(-1, v, u) }, nextPage: function(v, u) { return this.movePage(1, v, u) }, setPage: function(v, w, u) { return this.seekTo(v * o.size, w, u) }, begin: function(v, u) { j = false; return this.seekTo(0, v, u) }, end: function(v, u) { j = true; var w = this.getSize() - o.size; return w > 0 ? this.seekTo(w, v, u) : t }, reload: function() { r.trigger("onReload"); return t }, bind: function(u, v) { r.bind(u, v); return t }, onBeforeSeek: function(u) { return this.bind("onBeforeSeek", u) }, onSeek: function(u) { return this.bind("onSeek", u) }, onReload: function(u) { return this.bind("onReload", u) }, unbind: function(u) { r.unbind(u); return t }, focus: function() { d = t; return t }, click: function(w) { var x = t.getItems().eq(w), u = o.activeClass, v = o.size; if (w < 0 || w >= t.getSize()) { return t } if (v == 1) { if (o.loop) { return t.next() } if (w === 0 || w == t.getSize() - 1) { j = (j === undefined) ? true : !j } return j === false ? t.prev() : t.next() } if (v == 2) { if (w == l) { w-- } t.getItems().removeClass(u); x.addClass(u); return t.seekTo(w, time, fn) } if (!x.hasClass(u)) { t.getItems().removeClass(u); x.addClass(u); var z = Math.floor(v / 2); var y = w - z; if (y > t.getSize() - v) { y = t.getSize() - v } if (y !== w) { return t.seekTo(y) } } return t } }); g.addClass(o.disabledClass).click(function() { t.prev() }); i.click(function() { t.next() }); p.click(function() { t.nextPage() }); h.addClass(o.disabledClass).click(function() { t.prevPage() }); t.onSeek(function(v, u) { if (u === 0) { g.add(h).addClass(o.disabledClass) } else { g.add(h).removeClass(o.disabledClass) } if (u >= t.getSize() - o.size) { i.add(p).addClass(o.disabledClass) } else { i.add(p).removeClass(o.disabledClass) } }); var k = o.hoverClass, s = "keydown." + Math.random().toString().substring(10); t.onReload(function() { if (k) { t.getItems().hover(function() { c(this).addClass(k) }, function() { c(this).removeClass(k) }) } if (o.clickable) { t.getItems().each(function(u) { c(this).unbind("click.scrollable").bind("click.scrollable", function(v) { if (c(v.target).is("a")) { return } return t.click(u) }) }) } if (o.keyboard) { c(document).unbind(s).bind(s, function(u) { if (u.altKey || u.ctrlKey) { return } if (o.keyboard != "static" && d != t) { return } var v = o.keyboardSteps; if (e && (u.keyCode == 37 || u.keyCode == 39)) { t.move(u.keyCode == 37 ? -v : v); return u.preventDefault() } if (!e && (u.keyCode == 38 || u.keyCode == 40)) { t.move(u.keyCode == 38 ? -v : v); return u.preventDefault() } return true }) } else { c(document).unbind(s) } }); t.reload() } c.fn.scrollable = function(e) { var f = this.eq(typeof e == "number" ? e : 0).data("scrollable"); if (f) { return f } var g = c.extend({}, c.tools.scrollable.conf); e = c.extend(g, e); e.keyboardSteps = e.keyboardSteps || e.size; a += this.length; this.each(function() { f = new b(c(this), e); c(this).data("scrollable", f) }); return e.api ? f : this } })(jQuery);
(function(b) { var a = b.tools.scrollable; a.plugins = a.plugins || {}; a.plugins.circular = { version: "0.5.1", conf: { api: false, clonedClass: "cloned"} }; b.fn.circular = function(e) { var d = b.extend({}, a.plugins.circular.conf), c; b.extend(d, e); this.each(function() { var i = b(this).scrollable(), n = i.getItems(), k = i.getConf(), f = i.getItemWrap(), j = 0; if (i) { c = i } if (n.length < k.size) { return false } n.slice(0, k.size).each(function(o) { b(this).clone().appendTo(f).click(function() { i.click(n.length + o) }).addClass(d.clonedClass) }); var l = b.makeArray(n.slice(-k.size)).reverse(); b(l).each(function(o) { b(this).clone().prependTo(f).click(function() { i.click(-o - 1) }).addClass(d.clonedClass) }); var m = f.children(k.item); var h = k.hoverClass; if (h) { m.hover(function() { b(this).addClass(h) }, function() { b(this).removeClass(h) }) } function g(o) { var p = m.eq(o); if (k.vertical) { f.css({ top: -p.position().top }) } else { f.css({ left: -p.position().left }) } } g(k.size); b.extend(i, { move: function(s, r, p, q) { var u = j + s + k.size; var t = u > i.getSize() - k.size; if (u < 0 || t) { var o = j + k.size + (t ? -n.length : n.length); g(o); u = o + s } if (q) { m.removeClass(k.activeClass).eq(u + Math.floor(k.size / 2)).addClass(k.activeClass) } if (u === j + k.size) { return self } return i.seekTo(u, r, p) }, begin: function(p, o) { return this.seekTo(k.size, p, o) }, end: function(p, o) { return this.seekTo(n.length, p, o) }, click: function(p, r, q) { if (!k.clickable) { return self } if (k.size == 1) { return this.next() } var s = p - j, o = k.activeClass; s -= Math.floor(k.size / 2); return this.move(s, r, q, true) }, getIndex: function() { return j }, setPage: function(p, q, o) { return this.seekTo(p * k.size + k.size, q, o) }, getPageAmount: function() { return Math.ceil(n.length / k.size) }, getPageIndex: function() { if (j < 0) { return this.getPageAmount() - 1 } if (j >= n.length) { return 0 } return (j + k.size) / k.size - 1 }, getVisibleItems: function() { var o = j + k.size; return m.slice(o, o + k.size) } }); i.onSeek(function(p, o) { j = o - k.size; i.getNaviButtons().removeClass(k.disabledClass) }); i.getNaviButtons().removeClass(k.disabledClass) }); return d.api ? c : this } })(jQuery);
(function(b) { var a = b.tools.scrollable; a.plugins = a.plugins || {}; a.plugins.navigator = { version: "1.0.1", conf: { navi: ".navi", naviItem: null, activeClass: "active", indexed: false, api: false} }; b.fn.navigator = function(d) { var e = b.extend({}, a.plugins.navigator.conf), c; if (typeof d == "string") { d = { navi: d} } d = b.extend(e, d); this.each(function() { var i = b(this).scrollable(), f = i.getRoot(), l = f.data("finder").call(null, d.navi), g = null, k = i.getNaviButtons(); if (i) { c = i } i.getNaviButtons = function() { return k.add(l) }; function j() { if (!l.children().length || l.data("navi") == i) { l.empty(); l.data("navi", i); for (var m = 0; m < i.getPageAmount(); m++) { l.append(b("<" + (d.naviItem || "a") + "/>")) } g = l.children().each(function(n) { b(this).click(function(o) { i.setPage(n); return o.preventDefault() }); if (d.indexed) { b(this).text(n) } }) } else { g = d.naviItem ? l.find(d.naviItem) : l.children(); g.each(function(n) { var o = b(this); o.click(function(p) { i.setPage(n); return p.preventDefault() }) }) } g.eq(0).addClass(d.activeClass) } i.onSeek(function(n) { var m = d.activeClass; g.removeClass(m).eq(i.getPageIndex()).addClass(m) }); i.onReload(function() { j() }); j(); var h = g.filter("[href=" + location.hash + "]"); if (h.length) { i.move(g.index(h)) } }); return d.api ? c : this } })(jQuery);
(function(c) { c.tools = c.tools || {}; c.tools.overlay = { version: "1.1.1", addEffect: function(e, f, g) { b[e] = [f, g] }, conf: { top: "10%", left: "center", absolute: false, speed: "normal", closeSpeed: "fast", effect: "default", close: null, oneInstance: true, closeOnClick: true, closeOnEsc: true, api: false, expose: null, target: null} }; var b = {}; c.tools.overlay.addEffect("default", function(e) { this.getOverlay().fadeIn(this.getConf().speed, e) }, function(e) { this.getOverlay().fadeOut(this.getConf().closeSpeed, e) }); var d = []; function a(h, m) { var p = this, n = c(this), o = c(window), k, j, i, f = m.expose && c.tools.expose.version; var g = m.target || h.attr("rel"); j = g ? c(g) : null || h; if (h && h.index(j) == -1) { h.click(function(q) { p.load(); return q.preventDefault() }) } c.each(m, function(e, q) { if (c.isFunction(q)) { n.bind(e, q) } }); c.extend(p, { load: function() { if (p.isOpened()) { return p } if (m.oneInstance) { c.each(d, function() { this.close() }) } var u = c.Event("onBeforeLoad"); n.trigger(u); if (u.isDefaultPrevented()) { return p } i = true; if (f) { j.expose().load() } var t = m.top; var s = m.left; var q = j.outerWidth({ margin: true }); var r = j.outerHeight({ margin: true }); if (typeof t == "string") { t = t == "center" ? Math.max((o.height() - r) / 2, 0) : parseInt(t, 10) / 100 * o.height() } if (s == "center") { s = Math.max((o.width() - q) / 2, 0) } if (!m.absolute) { t += o.scrollTop(); s += o.scrollLeft() } j.css({ top: t, left: s, position: "absolute" }); b[m.effect][0].call(p, function() { if (i) { n.trigger("onLoad") } }); if (m.closeOnClick) { c(document).bind("click.overlay", function(e) { if (!p.isOpened()) { return } var v = c(e.target); if (v.parents(j).length > 1) { return } c.each(d, function() { this.close() }) }) } if (m.closeOnEsc) { c(document).unbind("keydown.overlay").bind("keydown.overlay", function(e) { if (e.keyCode == 27) { c.each(d, function() { this.close() }) } }) } return p }, close: function() { if (!p.isOpened()) { return p } var r = c.Event("onBeforeClose"); n.trigger(r); if (r.isDefaultPrevented()) { return } i = false; b[m.effect][1].call(p, function() { n.trigger("onClose") }); var q = true; c.each(d, function() { if (this.isOpened()) { q = false } }); if (q) { c(document).unbind("click.overlay").unbind("keydown.overlay") } return p }, getContent: function() { return j }, getOverlay: function() { return j }, getTrigger: function() { return h }, getClosers: function() { return k }, isOpened: function() { return i }, getConf: function() { return m }, bind: function(e, q) { n.bind(e, q); return p }, onBeforeLoad: function(e) { return this.bind("onBeforeLoad", e) }, onLoad: function(e) { return this.bind("onLoad", e) }, onBeforeClose: function(e) { return this.bind("onBeforeClose", e) }, onClose: function(e) { return this.bind("onClose", e) }, unbind: function(e) { n.unbind(e); return p } }); if (f) { if (typeof m.expose == "string") { m.expose = { color: m.expose} } c.extend(m.expose, { api: true, closeOnClick: m.closeOnClick, closeOnEsc: false }); var l = j.expose(m.expose); l.onBeforeClose(function() { p.close() }); p.onClose(function() { l.close() }) } k = j.find(m.close || ".close"); if (!k.length && !m.close) { k = c('<div class="close"></div>'); j.prepend(k) } k.click(function() { p.close() }) } c.fn.overlay = function(e) { var f = this.eq(typeof e == "number" ? e : 0).data("overlay"); if (f) { return f } if (c.isFunction(e)) { e = { onBeforeLoad: e} } var g = c.extend({}, c.tools.overlay.conf); e = c.extend(true, g, e); this.each(function() { f = new a(c(this), e); d.push(f); c(this).data("overlay", f) }); return e.api ? f : this } })(jQuery);
(function(b) { b.tools = b.tools || {}; b.tools.expose = { version: "1.0.5", conf: { maskId: null, loadSpeed: "slow", closeSpeed: "fast", closeOnClick: true, closeOnEsc: true, zIndex: 9998, opacity: 0.8, color: "#456", api: false} }; function a() { if (b.browser.msie) { var f = b(document).height(), e = b(window).height(); return [window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth, f - e < 20 ? e : f] } return [b(window).width(), b(document).height()] } function c(h, g) { var e = this, j = b(this), d = null, f = false, i = 0; b.each(g, function(k, l) { if (b.isFunction(l)) { j.bind(k, l) } }); b(window).resize(function() { e.fit() }); b.extend(this, { getMask: function() { return d }, getExposed: function() { return h }, getConf: function() { return g }, isLoaded: function() { return f }, load: function() { if (f) { return e } i = h.eq(0).css("zIndex"); if (g.maskId) { d = b("#" + g.maskId) } if (!d || !d.length) { var l = a(); d = b("<div/>").css({ position: "absolute", top: 0, left: 0, width: l[0], height: l[1], display: "none", opacity: 0, zIndex: g.zIndex }); if (g.maskId) { d.attr("id", g.maskId) } b("body").append(d); var k = d.css("backgroundColor"); if (!k || k == "transparent" || k == "rgba(0, 0, 0, 0)") { d.css("backgroundColor", g.color) } if (g.closeOnEsc) { b(document).bind("keydown.unexpose", function(o) { if (o.keyCode == 27) { e.close() } }) } if (g.closeOnClick) { d.bind("click.unexpose", function() { e.close() }) } } var n = b.Event("onBeforeLoad"); j.trigger(n); if (n.isDefaultPrevented()) { return e } b.each(h, function() { var o = b(this); if (!/relative|absolute|fixed/i.test(o.css("position"))) { o.css("position", "relative") } }); h.css({ zIndex: Math.max(g.zIndex + 1, i == "auto" ? 0 : i) }); var m = d.height(); if (!this.isLoaded()) { d.css({ opacity: 0, display: "block" }).fadeTo(g.loadSpeed, g.opacity, function() { if (d.height() != m) { d.css("height", m) } j.trigger("onLoad") }) } f = true; return e }, close: function() { if (!f) { return e } var k = b.Event("onBeforeClose"); j.trigger(k); if (k.isDefaultPrevented()) { return e } d.fadeOut(g.closeSpeed, function() { j.trigger("onClose"); h.css({ zIndex: b.browser.msie ? i : null }) }); f = false; return e }, fit: function() { if (d) { var k = a(); d.css({ width: k[0], height: k[1] }) } }, bind: function(k, l) { j.bind(k, l); return e }, onBeforeLoad: function(k) { return this.bind("onBeforeLoad", k) }, onLoad: function(k) { return this.bind("onLoad", k) }, onBeforeClose: function(k) { return this.bind("onBeforeClose", k) }, onClose: function(k) { return this.bind("onClose", k) }, unbind: function(k) { j.unbind(k); return e } }) } b.fn.expose = function(d) { var e = this.eq(typeof d == "number" ? d : 0).data("expose"); if (e) { return e } if (typeof d == "string") { d = { color: d} } var f = b.extend({}, b.tools.expose.conf); d = b.extend(f, d); this.each(function() { e = new c(b(this), d); b(this).data("expose", e) }); return d.api ? e : this } })(jQuery);
