(function (a) { function d(c, d, e) { var f = this, g = c.add(this), h = c.find(e.tabs), i = d.jquery ? d : c.children(d), j; if (!h.length) { h = c.children() } if (!i.length) { i = c.parent().find(d) } if (!i.length) { i = a(d) } a.extend(this, { click: function (c, d) { var i = h.eq(c); if (typeof c == "string" && c.replace("#", "")) { i = h.filter("[href*=" + c.replace("#", "") + "]"); c = Math.max(h.index(i), 0) } if (e.rotate) { var k = h.length - 1; if (c < 0) { return f.click(k, d) } if (c > k) { return f.click(0, d) } } if (!i.length) { if (j >= 0) { return f } c = e.initialIndex; i = h.eq(c) } if (c === j) { return f } d = d || a.Event(); d.type = "onBeforeClick"; g.trigger(d, [c]); if (d.isDefaultPrevented()) { return } b[e.effect].call(f, c, function () { d.type = "onClick"; g.trigger(d, [c]) }); j = c; h.removeClass(e.current); i.addClass(e.current); return f }, getConf: function () { return e }, getTabs: function () { return h }, getPanes: function () { return i }, getCurrentPane: function () { return i.eq(j) }, getCurrentTab: function () { return h.eq(j) }, getIndex: function () { return j }, next: function () { return f.click(j + 1) }, prev: function () { return f.click(j - 1) }, destroy: function () { h.unbind(e.event).removeClass(e.current); i.find("a[href^=#]").unbind("click.T"); return f } }); a.each("onBeforeClick,onClick".split(","), function (b, c) { if (a.isFunction(e[c])) { a(f).bind(c, e[c]) } f[c] = function (b) { if (b) { a(f).bind(c, b) } return f } }); if (e.history && a.fn.history) { a.tools.history.init(h); e.event = "history" } h.each(function (b) { a(this).bind(e.event, function (a) { f.click(b, a); return a.preventDefault() }) }); i.find("a[href^=#]").bind("click.T", function (b) { f.click(a(this).attr("href"), b) }); if (location.hash && e.tabs == "a" && c.find("[href=" + location.hash + "]").length) { f.click(location.hash) } else { if (e.initialIndex === 0 || e.initialIndex > 0) { f.click(e.initialIndex) } } } a.tools = a.tools || { version: "@VERSION" }; a.tools.tabs = { conf: { tabs: "a", current: "current", onBeforeClick: null, onClick: null, effect: "default", initialIndex: 0, event: "click", rotate: false, history: false }, addEffect: function (a, c) { b[a] = c } }; var b = { "default": function (a, b) { this.getPanes().addClass("schowaj").eq(a).removeClass("schowaj"); b.call() }, fade: function (a, b) { var c = this.getConf(), d = c.fadeOutSpeed, e = this.getPanes(); if (d) { e.fadeOut(d) } else { e.hide() } e.eq(a).fadeIn(c.fadeInSpeed, b) }, slide: function (a, b) { this.getPanes().slideUp(200); this.getPanes().eq(a).slideDown(400, b) }, ajax: function (a, b) { this.getPanes().eq(0).load(this.getTabs().eq(a).attr("href"), b) } }; var c; a.tools.tabs.addEffect("horizontal", function (b, d) { if (!c) { c = this.getPanes().eq(0).width() } this.getCurrentPane().animate({ width: 0 }, function () { a(this).hide() }); this.getPanes().eq(b).animate({ width: c }, function () { a(this).show(); d.call() }) }); a.fn.tabs = function (b, c) { var e = this.data("tabs"); if (e) { e.destroy(); this.removeData("tabs") } if (a.isFunction(c)) { c = { onBeforeClick: c} } c = a.extend({}, a.tools.tabs.conf, c); this.each(function () { e = new d(a(this), b, c); a(this).data("tabs", e) }); return c.api ? e : this } })(jQuery); (function (a) { function c(b, c) { function i(c) { var d = a(c); return d.length < 2 ? d : b.parent().find(c) } var d = this, e = b.add(this), f = b.data("tabs"), g, h = true; var j = i(c.next).click(function () { f.next() }); var k = i(c.prev).click(function () { f.prev() }); a.extend(d, { getTabs: function () { return f }, getConf: function () { return c }, play: function () { if (g) { return d } var b = a.Event("onBeforePlay"); e.trigger(b); if (b.isDefaultPrevented()) { return d } g = setInterval(f.next, c.interval); h = false; e.trigger("onPlay"); return d }, pause: function () { if (!g) { return d } var b = a.Event("onBeforePause"); e.trigger(b); if (b.isDefaultPrevented()) { return d } g = clearInterval(g); e.trigger("onPause"); return d }, stop: function () { d.pause(); h = true } }); a.each("onBeforePlay,onPlay,onBeforePause,onPause".split(","), function (b, e) { if (a.isFunction(c[e])) { a(d).bind(e, c[e]) } d[e] = function (b) { return a(d).bind(e, b) } }); if (c.autopause) { f.getTabs().add(j).add(k).add(f.getPanes()).hover(d.pause, function () { if (!h) { }; }) } if (c.autoplay) { d.play() } if (c.clickable) { f.getPanes().click(function () { f.next() }) } if (!f.getConf().rotate) { var l = c.disabledClass; if (!f.getIndex()) { k.addClass(l) } f.onBeforeClick(function (a, b) { k.toggleClass(l, !b); j.toggleClass(l, b == f.getTabs().length - 1) }) } } var b; b = a.tools.tabs.slideshow = { conf: { next: ".forward", prev: ".backward", disabledClass: "disabled", autoplay: false, autopause: true, interval: 3e3, clickable: true, api: false} }; a.fn.slideshow = function (d) { var e = this.data("slideshow"); if (e) { return e } d = a.extend({}, b.conf, d); this.each(function () { e = new c(a(this), d); a(this).data("slideshow", e) }); return d.api ? e : this } })(jQuery); (function (a) { function e(b, e) { var f = this, g = b.add(f), h = b.children(), i = 0, j = e.vertical; d || (d = f), h.length > 1 && (h = a(e.items, b)), a.extend(f, { getConf: function () { return e }, getIndex: function () { return i }, getSize: function () { return f.getItems().size() }, getNaviButtons: function () { return m.add(n) }, getRoot: function () { return b }, getItemWrap: function () { return h }, getItems: function () { return h.children(e.item).not("." + e.clonedClass) }, move: function (a, b) { return f.seekTo(i + a, b) }, next: function (a) { return f.move(1, a) }, prev: function (a) { return f.move(-1, a) }, begin: function (a) { return f.seekTo(0, a) }, end: function (a) { return f.seekTo(f.getSize() - 1, a) }, focus: function () { d = f; return f }, addItem: function (b) { b = a(b), e.circular ? (h.children("." + e.clonedClass + ":last").before(b), h.children("." + e.clonedClass + ":first").replaceWith(b.clone().addClass(e.clonedClass))) : h.append(b), g.trigger("onAddItem", [b]); return f }, seekTo: function (b, c, k) { b.jquery || (b *= 1); if (e.circular && b === 0 && i == -1 && c !== 0) return f; if (!e.circular && b < 0 || b > f.getSize() || b < -1) return f; var l = b; b.jquery ? b = f.getItems().index(b) : l = f.getItems().eq(b); var m = a.Event("onBeforeSeek"); if (!k) { g.trigger(m, [b, c]); if (m.isDefaultPrevented() || !l.length) return f } var n = j ? { top: -l.position().top} : { left: -l.position().left }; i = b, d = f, c === undefined && (c = e.speed), h.animate(n, c, e.easing, k || function () { g.trigger("onSeek", [b]) }); return f } }), a.each(["onBeforeSeek", "onSeek", "onAddItem"], function (b, c) { a.isFunction(e[c]) && a(f).bind(c, e[c]), f[c] = function (b) { b && a(f).bind(c, b); return f } }); if (e.circular) { var k = f.getItems().slice(-1).clone().prependTo(h), l = f.getItems().eq(1).clone().appendTo(h); k.add(l).addClass(e.clonedClass), f.onBeforeSeek(function (a, b, c) { if (!a.isDefaultPrevented()) { if (b == -1) { f.seekTo(k, c, function () { f.end(0) }); return a.preventDefault() } b == f.getSize() && f.seekTo(l, c, function () { f.begin(0) }) } }), f.seekTo(0, 0, function () { }) } var m = c(b, e.prev).click(function () { f.prev() }), n = c(b, e.next).click(function () { f.next() }); !e.circular && f.getSize() > 1 && (f.onBeforeSeek(function (a, b) { setTimeout(function () { a.isDefaultPrevented() || (m.toggleClass(e.disabledClass, b <= 0), n.toggleClass(e.disabledClass, b >= f.getSize() - 1)) }, 1) }), e.initialIndex || m.addClass(e.disabledClass)), e.mousewheel && a.fn.mousewheel && b.mousewheel(function (a, b) { if (e.mousewheel) { f.move(b < 0 ? 1 : -1, e.wheelSpeed || 50); return !1 } }); if (e.touch) { var o = {}; h[0].ontouchstart = function (a) { var b = a.touches[0]; o.x = b.clientX, o.y = b.clientY }, h[0].ontouchmove = function (a) { if (a.touches.length == 1 && !h.is(":animated")) { var b = a.touches[0], c = o.x - b.clientX, d = o.y - b.clientY; f[j && d > 0 || !j && c > 0 ? "next" : "prev"](), a.preventDefault() } } } e.keyboard && a(document).bind("keydown.scrollable", function (b) { if (e.keyboard && !b.altKey && !b.ctrlKey && !a(b.target).is(":input")) { if (e.keyboard != "static" && d != f) return; var c = b.keyCode; if (j && (c == 38 || c == 40)) { f.move(c == 38 ? -1 : 1); return b.preventDefault() } if (!j && (c == 37 || c == 39)) { f.move(c == 37 ? -1 : 1); return b.preventDefault() } } }), e.initialIndex && f.seekTo(e.initialIndex, 0, function () { }) } function c(b, c) { var d = a(c); return d.length < 2 ? d : b.parent().find(c) } function b(a, b) { var c = parseInt(a.css(b), 10); if (c) return c; var d = a[0].currentStyle; return d && d.width && parseInt(d.width, 10) } a.tools = a.tools || { version: "v1.2.5" }, a.tools.scrollable = { conf: { activeClass: "active", circular: !1, clonedClass: "cloned", disabledClass: "disabled", easing: "swing", initialIndex: 0, item: null, items: ".items", keyboard: !0, mousewheel: !1, next: ".next", prev: ".prev", speed: 400, vertical: !1, touch: !0, wheelSpeed: 0} }; var d; a.fn.scrollable = function (b) { var c = this.data("scrollable"); if (c) return c; b = a.extend({}, a.tools.scrollable.conf, b), this.each(function () { c = new e(a(this), b), a(this).data("scrollable", c) }); return b.api ? c : this } })(jQuery); (function (a) { var b = a.tools.scrollable; b.autoscroll = { conf: { autoplay: !0, interval: 3e3, autopause: !0} }, a.fn.autoscroll = function (c) { typeof c == "number" && (c = { interval: c }); var d = a.extend({}, b.autoscroll.conf, c), e; this.each(function () { var b = a(this).data("scrollable"); b && (e = b); var c, f = !0; b.play = function () { c || (f = !1, c = setInterval(function () { b.next() }, d.interval)) }, b.pause = function () { c = clearInterval(c) }, b.stop = function () { b.pause(), f = !0 }, d.autopause && b.getRoot().add(b.getNaviButtons()).hover(b.pause, b.play), d.autoplay && b.play() }); return d.api ? e : this } })(jQuery); (function (a) { function c(b, c) { var d = a(c); return d.length < 2 ? d : b.parent().find(c) } var b = a.tools.scrollable; b.navigator = { conf: { navi: ".navi", naviItem: null, activeClass: "active", indexed: !1, idPrefix: null, history: !1} }; a.fn.navigator = function (d) { typeof d == "string" && (d = { navi: d }), d = a.extend({}, b.navigator.conf, d); var e; this.each(function () { function m(a, b) { var c = k().eq(b.replace("#", "")); c.length || (c = k().filter("[href=" + b + "]")), c.click() } function l(b) { var c = a("<" + (d.naviItem || "a") + "/>").click(function (c) { j(a(this), b, c) }).attr("href", "#" + b); b === 0 && c.addClass(h), d.indexed && c.text(b + 1), d.idPrefix && c.attr("id", d.idPrefix + b); return c.appendTo(f) } function k() { return f.find(d.naviItem || "> *") } function j(a, c, d) { b.seekTo(c); if (i) location.hash && (location.hash = a.attr("href").replace("#", "")); else return d.preventDefault() } var b = a(this).data("scrollable"), f = d.navi.jquery ? d.navi : c(b.getRoot(), d.navi), g = b.getNaviButtons(), h = d.activeClass, i = d.history && a.fn.history; b && (e = b), b.getNaviButtons = function () { return g.add(f) }; k().length ? k().each(function (b) { a(this).click(function (c) { j(a(this), b, c) }) }) : a.each(b.getItems(), function (a) { l(a) }), b.onBeforeSeek(function (a, b) { setTimeout(function () { if (!a.isDefaultPrevented()) { var c = k().eq(b); !a.isDefaultPrevented() && c.length && k().removeClass(h).eq(b).addClass(h) } }, 1) }); b.onAddItem(function (a, c) { c = l(b.getItems().index(c)), i && c.history(m) }), i && k().history(m) }); return d.api ? e : this } })(jQuery); (function (a) { var b, c, d, e, f, g, h, i, j, k, l = 0, m = {}, n = [], o = 0, p = {}, q = [], r = null, s = new Image, t = /\.(jpg|gif|png|bmp|jpeg)(.*)?$/i, u = /[^\.]\.(swf)\s*$/i, v, w = 1, x = 0, y = "", z, A, B = false, C = a.extend(a("<div/>")[0], { prop: 0 }), D = a.browser.msie && a.browser.version < 7 && !window.XMLHttpRequest, E = function () { c.hide(); s.onerror = s.onload = null; if (r) { r.abort() } b.empty() }, F = function () { if (false === m.onError(n, l, m)) { c.hide(); B = false; return } m.titleShow = false; m.width = "auto"; m.height = "auto"; b.html('<p id="fancybox-error">The requested content cannot be loaded.<br />Please try again later.</p>'); H() }, G = function () { var d = n[l], e, f, h, i, j, k; E(); m = a.extend({}, a.fn.fancybox.defaults, typeof a(d).data("fancybox") == "undefined" ? m : a(d).data("fancybox")); k = m.onStart(n, l, m); if (k === false) { B = false; return } else if (typeof k == "object") { m = a.extend(m, k) } h = m.title || (d.nodeName ? a(d).attr("title") : d.title) || ""; if (d.nodeName && !m.orig) { m.orig = a(d).children("img:first").length ? a(d).children("img:first") : a(d) } if (h === "" && m.orig && m.titleFromAlt) { h = m.orig.attr("alt") } e = m.href || (d.nodeName ? a(d).attr("href") : d.href) || null; if (/^(?:javascript)/i.test(e) || e == "#") { e = null } if (m.type) { f = m.type; if (!e) { e = m.content } } else if (m.content) { f = "html" } else if (e) { if (e.match(t)) { f = "image" } else if (e.match(u)) { f = "swf" } else if (a(d).hasClass("iframe")) { f = "iframe" } else if (e.indexOf("#") === 0) { f = "inline" } else { f = "ajax" } } if (!f) { F(); return } if (f == "inline") { d = e.substr(e.indexOf("#")); f = a(d).length > 0 ? "inline" : "ajax" } m.type = f; m.href = e; m.title = h; if (m.autoDimensions) { if (m.type == "html" || m.type == "inline" || m.type == "ajax") { m.width = "auto"; m.height = "auto" } else { m.autoDimensions = false } } if (m.modal) { m.overlayShow = true; m.hideOnOverlayClick = false; m.hideOnContentClick = false; m.enableEscapeButton = false; m.showCloseButton = false } m.padding = parseInt(m.padding, 10); m.margin = parseInt(m.margin, 10); b.css("padding", m.padding + m.margin); a(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change", function () { a(this).replaceWith(g.children()) }); switch (f) { case "html": b.html(m.content); H(); break; case "inline": if (a(d).parent().is("#fancybox-content") === true) { B = false; return } a('<div class="fancybox-inline-tmp" />').hide().insertBefore(a(d)).bind("fancybox-cleanup", function () { a(this).replaceWith(g.children()) }).bind("fancybox-cancel", function () { a(this).replaceWith(b.children()) }); a(d).appendTo(b); H(); break; case "image": B = false; a.fancybox.showActivity(); s = new Image; s.onerror = function () { F() }; s.onload = function () { B = true; s.onerror = s.onload = null; I() }; s.src = e; break; case "swf": m.scrolling = "no"; i = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' + m.width + '" height="' + m.height + '"><param name="movie" value="' + e + '"></param>'; j = ""; a.each(m.swf, function (a, b) { i += '<param name="' + a + '" value="' + b + '"></param>'; j += " " + a + '="' + b + '"' }); i += '<embed src="' + e + '" type="application/x-shockwave-flash" width="' + m.width + '" height="' + m.height + '"' + j + "></embed></object>"; b.html(i); H(); break; case "ajax": B = false; a.fancybox.showActivity(); m.ajax.win = m.ajax.success; r = a.ajax(a.extend({}, m.ajax, { url: e, data: m.ajax.data || {}, error: function (a, b, c) { if (a.status > 0) { F() } }, success: function (a, d, f) { var g = typeof f == "object" ? f : r; if (g.status == 200) { if (typeof m.ajax.win == "function") { k = m.ajax.win(e, a, d, f); if (k === false) { c.hide(); return } else if (typeof k == "string" || typeof k == "object") { a = k } } b.html(a); H() } } })); break; case "iframe": J(); break } }, H = function () { var c = m.width, d = m.height; if (c.toString().indexOf("%") > -1) { c = parseInt((a(window).width() - m.margin * 2) * parseFloat(c) / 100, 10) + "px" } else { c = c == "auto" ? "auto" : c + "px" } if (d.toString().indexOf("%") > -1) { d = parseInt((a(window).height() - m.margin * 2) * parseFloat(d) / 100, 10) + "px" } else { d = d == "auto" ? "auto" : d + "px" } b.wrapInner('<div style="width:' + c + ";height:" + d + ";overflow: " + (m.scrolling == "auto" ? "auto" : m.scrolling == "yes" ? "scroll" : "hidden") + ';position:relative;"></div>'); m.width = b.width(); m.height = b.height(); J() }, I = function () { m.width = s.width; m.height = s.height; a("<img />").attr({ id: "fancybox-img", src: s.src, alt: m.title }).appendTo(b); J() }, J = function () { var f, r; c.hide(); if (e.is(":visible") && false === p.onCleanup(q, o, p)) { a.event.trigger("fancybox-cancel"); B = false; return } B = true; a(g.add(d)).unbind(); a(window).unbind("resize.fb scroll.fb"); a(document).unbind("keydown.fb"); if (e.is(":visible") && p.titlePosition !== "outside") { e.css("height", e.height()) } q = n; o = l; p = m; if (p.overlayShow) { d.css({ "background-color": p.overlayColor, opacity: p.overlayOpacity, cursor: p.hideOnOverlayClick ? "pointer" : "auto", height: a(document).height() }); if (!d.is(":visible")) { if (D) { a("select:not(#fancybox-tmp select)").filter(function () { return this.style.visibility !== "hidden" }).css({ visibility: "hidden" }).one("fancybox-cleanup", function () { this.style.visibility = "inherit" }) } d.show() } } else { d.hide() } A = R(); L(); if (e.is(":visible")) { a(h.add(j).add(k)).hide(); f = e.position(), z = { top: f.top, left: f.left, width: e.width(), height: e.height() }; r = z.width == A.width && z.height == A.height; g.fadeTo(p.changeFade, .3, function () { var c = function () { g.html(b.contents()).fadeTo(p.changeFade, 1, N) }; a.event.trigger("fancybox-change"); g.empty().removeAttr("filter").css({ "border-width": p.padding, width: A.width - p.padding * 2, height: m.autoDimensions ? "auto" : A.height - x - p.padding * 2 }); if (r) { c() } else { C.prop = 0; a(C).animate({ prop: 1 }, { duration: p.changeSpeed, easing: p.easingChange, step: P, complete: c }) } }); return } e.removeAttr("style"); g.css("border-width", p.padding); if (p.transitionIn == "elastic") { z = T(); g.html(b.contents()); e.show(); if (p.opacity) { A.opacity = 0 } C.prop = 0; a(C).animate({ prop: 1 }, { duration: p.speedIn, easing: p.easingIn, step: P, complete: N }); return } if (p.titlePosition == "inside" && x > 0) { i.show() } g.css({ width: A.width - p.padding * 2, height: m.autoDimensions ? "auto" : A.height - x - p.padding * 2 }).html(b.contents()); e.css(A).fadeIn(p.transitionIn == "none" ? 0 : p.speedIn, N) }, K = function (a) { if (a && a.length) { if (p.titlePosition == "float") { return '<table id="fancybox-title-float-wrap" cellpadding="0" cellspacing="0"><tr><td id="fancybox-title-float-left"></td><td id="fancybox-title-float-main">' + a + '</td><td id="fancybox-title-float-right"></td></tr></table>' } return '<div id="fancybox-title-' + p.titlePosition + '">' + a + "</div>" } return false }, L = function () { y = p.title || ""; x = 0; i.empty().removeAttr("style").removeClass(); if (p.titleShow === false) { i.hide(); return } y = a.isFunction(p.titleFormat) ? p.titleFormat(y, q, o, p) : K(y); if (!y || y === "") { i.hide(); return } i.addClass("fancybox-title-" + p.titlePosition).html(y).appendTo("body").show(); switch (p.titlePosition) { case "inside": i.css({ width: A.width - p.padding * 2, marginLeft: p.padding, marginRight: p.padding }); x = i.outerHeight(true); i.appendTo(f); A.height += x; break; case "over": i.css({ marginLeft: p.padding, width: A.width - p.padding * 2, bottom: p.padding }).appendTo(f); break; case "float": i.css("left", parseInt((i.width() - A.width - 40) / 2, 10) * -1).appendTo(e); break; default: i.css({ width: A.width - p.padding * 2, paddingLeft: p.padding, paddingRight: p.padding }).appendTo(e); break } i.hide() }, M = function () { if (p.enableEscapeButton || p.enableKeyboardNav) { a(document).bind("keydown.fb", function (b) { if (b.keyCode == 27 && p.enableEscapeButton) { b.preventDefault(); a.fancybox.close() } else if ((b.keyCode == 37 || b.keyCode == 39) && p.enableKeyboardNav && b.target.tagName !== "INPUT" && b.target.tagName !== "TEXTAREA" && b.target.tagName !== "SELECT") { b.preventDefault(); a.fancybox[b.keyCode == 37 ? "prev" : "next"]() } }) } if (!p.showNavArrows) { j.hide(); k.hide(); return } if (p.cyclic && q.length > 1 || o !== 0) { j.show() } if (p.cyclic && q.length > 1 || o != q.length - 1) { k.show() } }, N = function () { if (!a.support.opacity) { g.get(0).style.removeAttribute("filter"); e.get(0).style.removeAttribute("filter") } if (m.autoDimensions) { g.css("height", "auto") } e.css("height", "auto"); if (y && y.length) { i.show() } if (p.showCloseButton) { h.show() } M(); if (p.hideOnContentClick) { g.bind("click", a.fancybox.close) } if (p.hideOnOverlayClick) { d.bind("click", a.fancybox.close) } a(window).bind("resize.fb", a.fancybox.resize); if (p.centerOnScroll) { a(window).bind("scroll.fb", a.fancybox.center) } if (p.type == "iframe") { a('<iframe id="fancybox-frame" name="fancybox-frame' + (new Date).getTime() + '" frameborder="0" hspace="0" ' + (a.browser.msie ? 'allowtransparency="true""' : "") + ' scrolling="' + m.scrolling + '" src="' + p.href + '"></iframe>').appendTo(g) } e.show(); B = false; a.fancybox.center(); p.onComplete(q, o, p); O() }, O = function () { var a, b; if (q.length - 1 > o) { a = q[o + 1].href; if (typeof a !== "undefined" && a.match(t)) { b = new Image; b.src = a } } if (o > 0) { a = q[o - 1].href; if (typeof a !== "undefined" && a.match(t)) { b = new Image; b.src = a } } }, P = function (a) { var b = { width: parseInt(z.width + (A.width - z.width) * a, 10), height: parseInt(z.height + (A.height - z.height) * a, 10), top: parseInt(z.top + (A.top - z.top) * a, 10), left: parseInt(z.left + (A.left - z.left) * a, 10) }; if (typeof A.opacity !== "undefined") { b.opacity = a < .5 ? .5 : a } e.css(b); g.css({ width: b.width - p.padding * 2, height: b.height - x * a - p.padding * 2 }) }, Q = function () { return [a(window).width() - p.margin * 2, a(window).height() - p.margin * 2, a(document).scrollLeft() + p.margin, a(document).scrollTop() + p.margin] }, R = function () { var a = Q(), b = {}, c = p.autoScale, d = p.padding * 2, e; if (p.width.toString().indexOf("%") > -1) { b.width = parseInt(a[0] * parseFloat(p.width) / 100, 10) } else { b.width = p.width + d } if (p.height.toString().indexOf("%") > -1) { b.height = parseInt(a[1] * parseFloat(p.height) / 100, 10) } else { b.height = p.height + d } if (c && (b.width > a[0] || b.height > a[1])) { if (m.type == "image" || m.type == "swf") { e = p.width / p.height; if (b.width > a[0]) { b.width = a[0]; b.height = parseInt((b.width - d) / e + d, 10) } if (b.height > a[1]) { b.height = a[1]; b.width = parseInt((b.height - d) * e + d, 10) } } else { b.width = Math.min(b.width, a[0]); b.height = Math.min(b.height, a[1]) } } b.top = parseInt(Math.max(a[3] - 20, a[3] + (a[1] - b.height - 40) * .5), 10); b.left = parseInt(Math.max(a[2] - 20, a[2] + (a[0] - b.width - 40) * .5), 10); return b }, S = function (a) { var b = a.offset(); b.top += parseInt(a.css("paddingTop"), 10) || 0; b.left += parseInt(a.css("paddingLeft"), 10) || 0; b.top += parseInt(a.css("border-top-width"), 10) || 0; b.left += parseInt(a.css("border-left-width"), 10) || 0; b.width = a.width(); b.height = a.height(); return b }, T = function () { var b = m.orig ? a(m.orig) : false, c = {}, d, e; if (b && b.length) { d = S(b); c = { width: d.width + p.padding * 2, height: d.height + p.padding * 2, top: d.top - p.padding - 20, left: d.left - p.padding - 20} } else { e = Q(); c = { width: p.padding * 2, height: p.padding * 2, top: parseInt(e[3] + e[1] * .5, 10), left: parseInt(e[2] + e[0] * .5, 10)} } return c }, U = function () { if (!c.is(":visible")) { clearInterval(v); return } a("div", c).css("top", w * -40 + "px"); w = (w + 1) % 12 }; a.fn.fancybox = function (b) { if (!a(this).length) { return this } a(this).data("fancybox", a.extend({}, b, a.metadata ? a(this).metadata() : {})).unbind("click.fb").bind("click.fb", function (b) { b.preventDefault(); if (B) { return } B = true; a(this).blur(); n = []; l = 0; var c = a(this).attr("rel") || ""; if (!c || c == "" || c === "nofollow") { n.push(this) } else { n = a("a[rel=" + c + "], area[rel=" + c + "]"); l = n.index(this) } G(); return }); return this }; a.fancybox = function (b) { var c; if (B) { return } B = true; c = typeof arguments[1] !== "undefined" ? arguments[1] : {}; n = []; l = parseInt(c.index, 10) || 0; if (a.isArray(b)) { for (var d = 0, e = b.length; d < e; d++) { if (typeof b[d] == "object") { a(b[d]).data("fancybox", a.extend({}, c, b[d])) } else { b[d] = a({}).data("fancybox", a.extend({ content: b[d] }, c)) } } n = jQuery.merge(n, b) } else { if (typeof b == "object") { a(b).data("fancybox", a.extend({}, c, b)) } else { b = a({}).data("fancybox", a.extend({ content: b }, c)) } n.push(b) } if (l > n.length || l < 0) { l = 0 } G() }; a.fancybox.showActivity = function () { clearInterval(v); c.show(); v = setInterval(U, 66) }; a.fancybox.hideActivity = function () { c.hide() }; a.fancybox.next = function () { return a.fancybox.pos(o + 1) }; a.fancybox.prev = function () { return a.fancybox.pos(o - 1) }; a.fancybox.pos = function (a) { if (B) { return } a = parseInt(a); n = q; if (a > -1 && a < q.length) { l = a; G() } else if (p.cyclic && q.length > 1) { l = a >= q.length ? 0 : q.length - 1; G() } return }; a.fancybox.cancel = function () { if (B) { return } B = true; a.event.trigger("fancybox-cancel"); E(); m.onCancel(n, l, m); B = false }; a.fancybox.close = function () { function b() { d.fadeOut("fast"); i.empty().hide(); e.hide(); a.event.trigger("fancybox-cleanup"); g.empty(); p.onClosed(q, o, p); q = m = []; o = l = 0; p = m = {}; B = false } if (B || e.is(":hidden")) { return } B = true; if (p && false === p.onCleanup(q, o, p)) { B = false; return } E(); a(h.add(j).add(k)).hide(); a(g.add(d)).unbind(); a(window).unbind("resize.fb scroll.fb"); a(document).unbind("keydown.fb"); g.find("iframe").attr("src", D && /^https/i.test(window.location.href || "") ? "javascript:void(false)" : "about:blank"); if (p.titlePosition !== "inside") { i.empty() } e.stop(); if (p.transitionOut == "elastic") { z = T(); var c = e.position(); A = { top: c.top, left: c.left, width: e.width(), height: e.height() }; if (p.opacity) { A.opacity = 1 } i.empty().hide(); C.prop = 1; a(C).animate({ prop: 0 }, { duration: p.speedOut, easing: p.easingOut, step: P, complete: b }) } else { e.fadeOut(p.transitionOut == "none" ? 0 : p.speedOut, b) } }; a.fancybox.resize = function () { if (d.is(":visible")) { d.css("height", a(document).height()) } a.fancybox.center(true) }; a.fancybox.center = function () { var a, b; if (B) { return } b = arguments[0] === true ? 1 : 0; a = Q(); if (!b && (e.width() > a[0] || e.height() > a[1])) { return } e.stop().animate({ top: parseInt(Math.max(a[3] - 20, a[3] + (a[1] - g.height() - 40) * .5 - p.padding)), left: parseInt(Math.max(a[2] - 20, a[2] + (a[0] - g.width() - 40) * .5 - p.padding)) }, typeof arguments[0] == "number" ? arguments[0] : 200) }; a.fancybox.init = function () { if (a("#fancybox-wrap").length) { return } a("form").append(b = a('<div id="fancybox-tmp"></div>'), c = a('<div id="fancybox-loading"><div></div></div>'), d = a('<div id="fancybox-overlay"></div>'), e = a('<div id="fancybox-wrap"></div>')); f = a('<div id="fancybox-outer"></div>').append('<div class="fancybox-bg" id="fancybox-bg-n"></div><div class="fancybox-bg" id="fancybox-bg-ne"></div><div class="fancybox-bg" id="fancybox-bg-e"></div><div class="fancybox-bg" id="fancybox-bg-se"></div><div class="fancybox-bg" id="fancybox-bg-s"></div><div class="fancybox-bg" id="fancybox-bg-sw"></div><div class="fancybox-bg" id="fancybox-bg-w"></div><div class="fancybox-bg" id="fancybox-bg-nw"></div>').appendTo(e); f.append(g = a('<div id="fancybox-content"></div>'), h = a('<a id="fancybox-close"></a>'), i = a('<div id="fancybox-title"></div>'), j = a('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'), k = a('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>')); h.click(a.fancybox.close); c.click(a.fancybox.cancel); j.click(function (b) { b.preventDefault(); a.fancybox.prev() }); k.click(function (b) { b.preventDefault(); a.fancybox.next() }); if (a.fn.mousewheel) { e.bind("mousewheel.fb", function (b, c) { if (B) { b.preventDefault() } else if (a(b.target).get(0).clientHeight == 0 || a(b.target).get(0).scrollHeight === a(b.target).get(0).clientHeight) { b.preventDefault(); a.fancybox[c > 0 ? "prev" : "next"]() } }) } if (!a.support.opacity) { e.addClass("fancybox-ie") } if (D) { c.addClass("fancybox-ie6"); e.addClass("fancybox-ie6"); a('<iframe id="fancybox-hide-sel-frame" src="' + (/^https/i.test(window.location.href || "") ? "javascript:void(false)" : "about:blank") + '" scrolling="no" border="0" frameborder="0" tabindex="-1"></iframe>').prependTo(f) } }; a.fn.fancybox.defaults = { padding: 10, margin: 40, opacity: false, modal: false, cyclic: false, scrolling: "auto", width: 560, height: 340, autoScale: true, autoDimensions: true, centerOnScroll: false, ajax: {}, swf: { wmode: "transparent" }, hideOnOverlayClick: true, hideOnContentClick: false, overlayShow: true, overlayOpacity: .7, overlayColor: "#777", titleShow: true, titlePosition: "float", titleFormat: null, titleFromAlt: false, transitionIn: "fade", transitionOut: "fade", speedIn: 300, speedOut: 300, changeSpeed: 300, changeFade: "fast", easingIn: "swing", easingOut: "swing", showCloseButton: true, showNavArrows: true, enableEscapeButton: true, enableKeyboardNav: true, onStart: function () { }, onCancel: function () { }, onComplete: function () { }, onCleanup: function () { }, onClosed: function () { }, onError: function () { } }; a(document).ready(function () { a.fancybox.init() }) })(jQuery); (function (a) { a.fn.coolinput = function (b) { var c = { hint: null, source: "title", blurClass: "blur", iconClass: false, clearOnSubmit: true, clearOnFocus: true, persistent: true }; if (b && typeof b == "object") a.extend(c, b); else c.hint = b; return this.each(function () { function g() { if (b.val() == d && b.hasClass(e)) b.val("").removeClass(e) } function f() { if (b.val() == "") b.val(d).addClass(e) } var b = a(this); var d = c.hint || b.attr(c.source); var e = c.blurClass; if (d) { if (c.persistent) b.blur(f); if (c.clearOnFocus) b.focus(g); if (c.clearOnSubmit) b.parents("form:first").submit(g); if (c.iconClass) b.addClass(c.iconClass); f() } }) } })(jQuery); $(document).ready(function () { $(".topnav").hover(function () { $("#menuSubnavBox", this).css("display", "block"); $("ul.topnav li .obecna").addClass("wybrane"); $("ul.topnav li div.ostatni").css("top", $("ul.topnav li ul.subnav").height() + 74) }, function () { $("#menuSubnavBox", this).css("display", "none"); $("ul.topnav li .obecna").removeClass("wybrane") }) }); jQuery.cookie = function (a, b, c) { if (arguments.length > 1 && String(b) !== "[object Object]") { c = jQuery.extend({}, c); if (b === null || b === undefined) { c.expires = -1 } if (typeof c.expires === "number") { var d = c.expires, e = c.expires = new Date; e.setDate(e.getDate() + d) } b = String(b); return document.cookie = [encodeURIComponent(a), "=", c.raw ? b : encodeURIComponent(b), c.expires ? "; expires=" + c.expires.toUTCString() : "", c.path ? "; path=" + c.path : "", c.domain ? "; domain=" + c.domain : "", c.secure ? "; secure" : ""].join("") } c = b || {}; var f, g = c.raw ? function (a) { return a } : decodeURIComponent; return (f = (new RegExp("(?:^|; )" + encodeURIComponent(a) + "=([^;]*)")).exec(document.cookie)) ? g(f[1]) : null }
