﻿//ToolTip http://cssglobe.com/post/4380/easy-tooltip--jquery-plugin
this.tooltip = function() { xOffset = 10; yOffset = 40; $(".tooltip").hover(function(e) { this.t = this.href.substring(this.href.lastIndexOf('/') + 1); $("body").append("<div id='tooltip'>" + this.t + "</div>"); $("#tooltip").css("top", (e.pageY - xOffset) + "px").css("left", (e.pageX + yOffset) + "px").fadeIn("fast") }, function() { $("#tooltip").remove() }); $(".tooltip").mousemove(function(e) { $("#tooltip").css("top", (e.pageY - xOffset) + "px").css("left", (e.pageX + yOffset) + "px") }) };

//BigTarget http://newism.com.au/blog/post/58/bigtarget-js-increasing-the-size-of-clickable-targets/
(function($) { $.fn.bigTarget = function(options) { debug(this); var opts = $.extend({}, $.fn.bigTarget.defaults, options); return this.each(function() { var $a = $(this); var href = $a.attr('href'); var title = $a.attr('title'); var o = $.meta ? $.extend({}, opts, $a.data()) : opts; $a.parents(o.clickZone).hover(function() { $h = $(this); $h.addClass(o.hoverClass); if (typeof o.title != 'undefined' && o.title === true && title != '') { $h.attr('title', title) } }, function() { $h.removeClass(o.hoverClass); if (typeof o.title != 'undefined' && o.title === true && title != '') { $h.removeAttr('title') } }).click(function() { if (getSelectedText() == "") { if ($a.is('[rel*=external]')) { window.open(href); return false } else { window.location = href } } }) }) }; function debug($obj) { if (window.console && window.console.log) window.console.log('bigTarget selection count: ' + $obj.size()) }; function getSelectedText() { if (window.getSelection) { return window.getSelection().toString() } else if (document.getSelection) { return document.getSelection() } else if (document.selection) { return document.selection.createRange().text } }; $.fn.bigTarget.defaults = { hoverClass: 'hover', clickZone: 'li:eq(0)', title: true} })(jQuery);

//SimpleModal 1.2.2 http://www.ericmmartin.com/projects/simplemodal/
(function($) { var ie6 = $.browser.msie && parseInt($.browser.version) == 6 && typeof window['XMLHttpRequest'] != "object", ieQuirks = null, w = []; $.modal = function(data, options) { return $.modal.impl.init(data, options); }; $.modal.close = function() { $.modal.impl.close(); }; $.fn.modal = function(options) { return $.modal.impl.init(this, options); }; $.modal.defaults = { opacity: 50, overlayId: 'simplemodal-overlay', overlayCss: {}, containerId: 'simplemodal-container', containerCss: {}, dataCss: {}, zIndex: 1000, close: true, closeHTML: '<a class="modalCloseImg" title="Close"></a>', closeClass: 'simplemodal-close', position: null, persist: false, onOpen: null, onShow: null, onClose: null }; $.modal.impl = { opts: null, dialog: {}, init: function(data, options) { if (this.dialog.data) { return false; } ieQuirks = $.browser.msie && !$.boxModel; this.opts = $.extend({}, $.modal.defaults, options); this.zIndex = this.opts.zIndex; this.occb = false; if (typeof data == 'object') { data = data instanceof jQuery ? data : $(data); if (data.parent().parent().size() > 0) { this.dialog.parentNode = data.parent(); if (!this.opts.persist) { this.dialog.orig = data.clone(true); } } } else if (typeof data == 'string' || typeof data == 'number') { data = $('<div/>').html(data); } else { alert('SimpleModal Error: Unsupported data type: ' + typeof data); return false; } this.dialog.data = data.addClass('simplemodal-data').css(this.opts.dataCss); data = null; this.create(); this.open(); if ($.isFunction(this.opts.onShow)) { this.opts.onShow.apply(this, [this.dialog]); } return this; }, create: function() { w = this.getDimensions(); if (ie6) { this.dialog.iframe = $('<iframe src="javascript:false;"/>').css($.extend(this.opts.iframeCss, { display: 'none', opacity: 0, position: 'fixed', height: w[0], width: w[1], zIndex: this.opts.zIndex, top: 0, left: 0 })).appendTo('form'); } this.dialog.overlay = $('<div/>').attr('id', this.opts.overlayId).addClass('simplemodal-overlay').css($.extend(this.opts.overlayCss, { display: 'none', opacity: this.opts.opacity / 100, height: w[0], width: w[1], position: 'fixed', left: 0, top: 0, zIndex: this.opts.zIndex + 1 })).appendTo('form'); this.dialog.container = $('<div/>').attr('id', this.opts.containerId).addClass('simplemodal-container').css($.extend(this.opts.containerCss, { display: 'none', position: 'fixed', zIndex: this.opts.zIndex + 2 })).append(this.opts.close ? $(this.opts.closeHTML).addClass(this.opts.closeClass) : '').appendTo('form'); this.setPosition(); if (ie6 || ieQuirks) { this.fixIE(); } this.dialog.container.append(this.dialog.data.hide()); }, bindEvents: function() { var self = this; $('.' + this.opts.closeClass).bind('click.simplemodal', function(e) { e.preventDefault(); self.close(); }); $(window).bind('resize.simplemodal', function() { w = self.getDimensions(); self.setPosition(); if (ie6 || ieQuirks) { self.fixIE(); } else { self.dialog.iframe && self.dialog.iframe.css({ height: w[0], width: w[1] }); self.dialog.overlay.css({ height: w[0], width: w[1] }); } }); }, unbindEvents: function() { $('.' + this.opts.closeClass).unbind('click.simplemodal'); $(window).unbind('resize.simplemodal'); }, fixIE: function() { var p = this.opts.position; $.each([this.dialog.iframe || null, this.dialog.overlay, this.dialog.container], function(i, el) { if (el) { var bch = 'document.body.clientHeight', bcw = 'document.body.clientWidth', bsh = 'document.body.scrollHeight', bsl = 'document.body.scrollLeft', bst = 'document.body.scrollTop', bsw = 'document.body.scrollWidth', ch = 'document.documentElement.clientHeight', cw = 'document.documentElement.clientWidth', sl = 'document.documentElement.scrollLeft', st = 'document.documentElement.scrollTop', s = el[0].style; s.position = 'absolute'; if (i < 2) { s.removeExpression('height'); s.removeExpression('width'); s.setExpression('height', '' + bsh + ' > ' + bch + ' ? ' + bsh + ' : ' + bch + ' + "px"'); s.setExpression('width', '' + bsw + ' > ' + bcw + ' ? ' + bsw + ' : ' + bcw + ' + "px"'); } else { var te, le; if (p && p.constructor == Array) { var top = p[0] ? typeof p[0] == 'number' ? p[0].toString() : p[0].replace(/px/, '') : el.css('top').replace(/px/, ''); te = top.indexOf('%') == -1 ? top + ' + (t = ' + st + ' ? ' + st + ' : ' + bst + ') + "px"' : parseInt(top.replace(/%/, '')) + ' * ((' + ch + ' || ' + bch + ') / 100) + (t = ' + st + ' ? ' + st + ' : ' + bst + ') + "px"'; if (p[1]) { var left = typeof p[1] == 'number' ? p[1].toString() : p[1].replace(/px/, ''); le = left.indexOf('%') == -1 ? left + ' + (t = ' + sl + ' ? ' + sl + ' : ' + bsl + ') + "px"' : parseInt(left.replace(/%/, '')) + ' * ((' + cw + ' || ' + bcw + ') / 100) + (t = ' + sl + ' ? ' + sl + ' : ' + bsl + ') + "px"'; } } else { te = '(' + ch + ' || ' + bch + ') / 2 - (this.offsetHeight / 2) + (t = ' + st + ' ? ' + st + ' : ' + bst + ') + "px"'; le = '(' + cw + ' || ' + bcw + ') / 2 - (this.offsetWidth / 2) + (t = ' + sl + ' ? ' + sl + ' : ' + bsl + ') + "px"'; } s.removeExpression('top'); s.removeExpression('left'); s.setExpression('top', te); s.setExpression('left', le); } } }); }, getDimensions: function() { var el = $(window); var h = $.browser.opera && $.browser.version > '9.5' && $.fn.jquery <= '1.2.6' ? document.documentElement['clientHeight'] : el.height(); return [h, el.width()]; }, setPosition: function() { var top, left, hCenter = (w[0] / 2) - ((this.dialog.container.height() || this.dialog.data.height()) / 2), vCenter = (w[1] / 2) - ((this.dialog.container.width() || this.dialog.data.width()) / 2); if (this.opts.position && this.opts.position.constructor == Array) { top = this.opts.position[0] || hCenter; left = this.opts.position[1] || vCenter; } else { top = hCenter; left = vCenter; } this.dialog.container.css({ left: left, top: top }); }, open: function() { this.dialog.iframe && this.dialog.iframe.show(); if ($.isFunction(this.opts.onOpen)) { this.opts.onOpen.apply(this, [this.dialog]); } else { this.dialog.overlay.show(); this.dialog.container.show(); this.dialog.data.show(); } this.bindEvents(); }, close: function() { if (!this.dialog.data) { return false; } if ($.isFunction(this.opts.onClose) && !this.occb) { this.occb = true; this.opts.onClose.apply(this, [this.dialog]); } else { if (this.dialog.parentNode) { if (this.opts.persist) { this.dialog.data.hide().appendTo(this.dialog.parentNode); } else { this.dialog.data.remove(); this.dialog.orig.appendTo(this.dialog.parentNode); } } else { this.dialog.data.remove(); } this.dialog.container.remove(); this.dialog.overlay.remove(); this.dialog.iframe && this.dialog.iframe.remove(); this.dialog = {}; } this.unbindEvents(); } }; })(jQuery);

// jQuery Cycle Plugin http://jquery.malsup.com/cycle/
;(function(F) { var A = "2.37"; if (F.support == undefined) { F.support = { opacity: !(F.browser.msie && /MSIE 6.0/.test(navigator.userAgent))} } function C() { if (window.console && window.console.log) { window.console.log("[cycle] " + Array.prototype.join.call(arguments, "")) } } F.fn.cycle = function(I) { if (this.length == 0) { C("terminating; zero elements found by selector" + (F.isReady ? "" : " (DOM not ready)")); return this } var J = arguments[1]; return this.each(function() { if (this.cycleStop == undefined) { this.cycleStop = 0 } if (I === undefined || I === null) { I = {} } if (I.constructor == String) { switch (I) { case "stop": this.cycleStop++; if (this.cycleTimeout) { clearTimeout(this.cycleTimeout) } this.cycleTimeout = 0; F(this).removeData("cycle.opts"); return; case "pause": this.cyclePause = 1; return; case "resume": this.cyclePause = 0; if (J === true) { I = F(this).data("cycle.opts"); if (!I) { C("options not found, can not resume"); return } if (this.cycleTimeout) { clearTimeout(this.cycleTimeout); this.cycleTimeout = 0 } D(I.elements, I, 1, 1) } return; default: I = { fx: I} } } else { if (I.constructor == Number) { var S = I; I = F(this).data("cycle.opts"); if (!I) { C("options not found, can not advance slide"); return } if (S < 0 || S >= I.elements.length) { C("invalid slide index: " + S); return } I.nextSlide = S; if (this.cycleTimeout) { clearTimeout(this.cycleTimeout); this.cycleTimeout = 0 } D(I.elements, I, 1, S >= I.currSlide); return } } if (this.cycleTimeout) { clearTimeout(this.cycleTimeout) } this.cycleTimeout = 0; this.cyclePause = 0; var X = F(this); var T = I.slideExpr ? F(I.slideExpr, this) : X.children(); var N = T.get(); if (N.length < 2) { C("terminating; too few slides: " + N.length); return } var K = F.extend({}, F.fn.cycle.defaults, I || {}, F.metadata ? X.metadata() : F.meta ? X.data() : {}); if (K.autostop) { K.countdown = K.autostopCount || N.length } X.data("cycle.opts", K); K.container = this; K.stopCount = this.cycleStop; K.elements = N; K.before = K.before ? [K.before] : []; K.after = K.after ? [K.after] : []; K.after.unshift(function() { K.busy = 0 }); if (K.continuous) { K.after.push(function() { D(N, K, 0, !K.rev) }) } if (!F.support.opacity && K.cleartype && !K.cleartypeNoBg) { B(T) } var Z = this.className; K.width = parseInt((Z.match(/w:(\d+)/) || [])[1]) || K.width; K.height = parseInt((Z.match(/h:(\d+)/) || [])[1]) || K.height; K.timeout = parseInt((Z.match(/t:(\d+)/) || [])[1]) || K.timeout; if (X.css("position") == "static") { X.css("position", "relative") } if (K.width) { X.width(K.width) } if (K.height && K.height != "auto") { X.height(K.height) } if (K.startingSlide) { K.startingSlide = parseInt(K.startingSlide) } if (K.random) { K.randomMap = []; for (var P = 0; P < N.length; P++) { K.randomMap.push(P) } K.randomMap.sort(function(d, c) { return Math.random() - 0.5 }); K.randomIndex = 0; K.startingSlide = K.randomMap[0] } else { if (K.startingSlide >= N.length) { K.startingSlide = 0 } } var R = K.startingSlide || 0; T.css({ position: "absolute", top: 0, left: 0 }).hide().each(function(a) { var b = R ? a >= R ? N.length - (a - R) : R - a : N.length - a; F(this).css("z-index", b) }); F(N[R]).css("opacity", 1).show(); if (F.browser.msie) { N[R].style.removeAttribute("filter") } if (K.fit && K.width) { T.width(K.width) } if (K.fit && K.height && K.height != "auto") { T.height(K.height) } var O = K.containerResize && !X.innerHeight(); if (O) { var U = 0, M = 0; for (var P = 0; P < N.length; P++) { var L = F(N[P]), W = L.outerWidth(), Q = L.outerHeight(); U = W > U ? W : U; M = Q > M ? Q : M } X.css({ width: U + "px", height: M + "px" }) } if (K.pause) { X.hover(function() { this.cyclePause++ }, function() { this.cyclePause-- }) } var Y = F.fn.cycle.transitions[K.fx]; if (F.isFunction(Y)) { Y(X, T, K) } else { if (K.fx != "custom") { C("unknown transition: " + K.fx) } } T.each(function() { var a = F(this); this.cycleH = (K.fit && K.height) ? K.height : a.height(); this.cycleW = (K.fit && K.width) ? K.width : a.width() }); K.cssBefore = K.cssBefore || {}; K.animIn = K.animIn || {}; K.animOut = K.animOut || {}; T.not(":eq(" + R + ")").css(K.cssBefore); if (K.cssFirst) { F(T[R]).css(K.cssFirst) } if (K.timeout) { K.timeout = parseInt(K.timeout); if (K.speed.constructor == String) { K.speed = F.fx.speeds[K.speed] || parseInt(K.speed) } if (!K.sync) { K.speed = K.speed / 2 } while ((K.timeout - K.speed) < 250) { K.timeout += K.speed } } if (K.easing) { K.easeIn = K.easeOut = K.easing } if (!K.speedIn) { K.speedIn = K.speed } if (!K.speedOut) { K.speedOut = K.speed } K.slideCount = N.length; K.currSlide = K.lastSlide = R; if (K.random) { K.nextSlide = K.currSlide; if (++K.randomIndex == N.length) { K.randomIndex = 0 } K.nextSlide = K.randomMap[K.randomIndex] } else { K.nextSlide = K.startingSlide >= (N.length - 1) ? 0 : K.startingSlide + 1 } var V = T[R]; if (K.before.length) { K.before[0].apply(V, [V, V, K, true]) } if (K.after.length > 1) { K.after[1].apply(V, [V, V, K, true]) } if (K.click && !K.next) { K.next = K.click } if (K.next) { F(K.next).bind("click", function() { return E(N, K, K.rev ? -1 : 1) }) } if (K.prev) { F(K.prev).bind("click", function() { return E(N, K, K.rev ? 1 : -1) }) } if (K.pager) { H(N, K) } K.addSlide = function(b, c) { var a = F(b), d = a[0]; if (!K.autostopCount) { K.countdown++ } N[c ? "unshift" : "push"](d); if (K.els) { K.els[c ? "unshift" : "push"](d) } K.slideCount = N.length; a.css("position", "absolute"); a[c ? "prependTo" : "appendTo"](X); if (c) { K.currSlide++; K.nextSlide++ } if (!F.support.opacity && K.cleartype && !K.cleartypeNoBg) { B(a) } if (K.fit && K.width) { a.width(K.width) } if (K.fit && K.height && K.height != "auto") { T.height(K.height) } d.cycleH = (K.fit && K.height) ? K.height : a.height(); d.cycleW = (K.fit && K.width) ? K.width : a.width(); a.css(K.cssBefore); if (K.pager) { F.fn.cycle.createPagerAnchor(N.length - 1, d, F(K.pager), N, K) } if (typeof K.onAddSlide == "function") { K.onAddSlide(a) } }; if (K.timeout || K.continuous) { this.cycleTimeout = setTimeout(function() { D(N, K, 0, !K.rev) }, K.continuous ? 10 : K.timeout + (K.delay || 0)) } }) }; function D(N, I, M, O) { if (M && I.busy) { F(N).stop(true, true); I.busy = false } if (I.busy) { return } var L = I.container, Q = N[I.currSlide], P = N[I.nextSlide]; if (L.cycleStop != I.stopCount || L.cycleTimeout === 0 && !M) { return } if (!M && !L.cyclePause && ((I.autostop && (--I.countdown <= 0)) || (I.nowrap && !I.random && I.nextSlide < I.currSlide))) { if (I.end) { I.end(I) } return } if (M || !L.cyclePause) { if (I.before.length) { F.each(I.before, function(R, S) { if (L.cycleStop != I.stopCount) { return } S.apply(P, [Q, P, I, O]) }) } var J = function() { if (F.browser.msie && I.cleartype) { this.style.removeAttribute("filter") } F.each(I.after, function(R, S) { if (L.cycleStop != I.stopCount) { return } S.apply(P, [Q, P, I, O]) }) }; if (I.nextSlide != I.currSlide) { I.busy = 1; if (I.fxFn) { I.fxFn(Q, P, I, J, O) } else { if (F.isFunction(F.fn.cycle[I.fx])) { F.fn.cycle[I.fx](Q, P, I, J) } else { F.fn.cycle.custom(Q, P, I, J, M && I.fastOnEvent) } } } I.lastSlide = I.currSlide; if (I.random) { I.currSlide = I.nextSlide; if (++I.randomIndex == N.length) { I.randomIndex = 0 } I.nextSlide = I.randomMap[I.randomIndex] } else { var K = (I.nextSlide + 1) == N.length; I.nextSlide = K ? 0 : I.nextSlide + 1; I.currSlide = K ? N.length - 1 : I.nextSlide - 1 } if (I.pager) { F.fn.cycle.updateActivePagerLink(I.pager, I.currSlide) } } if (I.timeout && !I.continuous) { L.cycleTimeout = setTimeout(function() { D(N, I, 0, !I.rev) }, G(Q, P, I, O)) } else { if (I.continuous && L.cyclePause) { L.cycleTimeout = setTimeout(function() { D(N, I, 0, !I.rev) }, 10) } } } F.fn.cycle.updateActivePagerLink = function(I, J) { F(I).find("a").removeClass("activeSlide").filter("a:eq(" + J + ")").addClass("activeSlide") }; function G(M, K, L, J) { if (L.timeoutFn) { var I = L.timeoutFn(M, K, L, J); if (I !== false) { return I } } return L.timeout } function E(I, J, M) { var L = J.container, K = L.cycleTimeout; if (K) { clearTimeout(K); L.cycleTimeout = 0 } if (J.random && M < 0) { J.randomIndex--; if (--J.randomIndex == -2) { J.randomIndex = I.length - 2 } else { if (J.randomIndex == -1) { J.randomIndex = I.length - 1 } } J.nextSlide = J.randomMap[J.randomIndex] } else { if (J.random) { if (++J.randomIndex == I.length) { J.randomIndex = 0 } J.nextSlide = J.randomMap[J.randomIndex] } else { J.nextSlide = J.currSlide + M; if (J.nextSlide < 0) { if (J.nowrap) { return false } J.nextSlide = I.length - 1 } else { if (J.nextSlide >= I.length) { if (J.nowrap) { return false } J.nextSlide = 0 } } } } if (J.prevNextClick && typeof J.prevNextClick == "function") { J.prevNextClick(M > 0, J.nextSlide, I[J.nextSlide]) } D(I, J, 1, M >= 0); return false } function H(J, K) { var I = F(K.pager); F.each(J, function(L, M) { F.fn.cycle.createPagerAnchor(L, M, I, J, K) }); F.fn.cycle.updateActivePagerLink(K.pager, K.startingSlide) } F.fn.cycle.createPagerAnchor = function(L, M, J, K, N) { var I = (typeof N.pagerAnchorBuilder == "function") ? N.pagerAnchorBuilder(L, M) : '<a href="#">' + (L + 1) + "</a>"; if (!I) { return } var O = F(I); if (O.parents("body").length == 0) { O.appendTo(J) } O.bind(N.pagerEvent, function() { N.nextSlide = L; var Q = N.container, P = Q.cycleTimeout; if (P) { clearTimeout(P); Q.cycleTimeout = 0 } if (typeof N.pagerClick == "function") { N.pagerClick(N.nextSlide, K[N.nextSlide]) } D(K, N, 1, N.currSlide < L); return false }); if (N.pauseOnPagerHover) { O.hover(function() { N.container.cyclePause++ }, function() { N.container.cyclePause-- }) } }; F.fn.cycle.hopsFromLast = function(L, K) { var J, I = L.lastSlide, M = L.currSlide; if (K) { J = M > I ? M - I : L.slideCount - I } else { J = M < I ? I - M : I + L.slideCount - M } return J }; function B(K) { function J(L) { var L = parseInt(L).toString(16); return L.length < 2 ? "0" + L : L } function I(N) { for (; N && N.nodeName.toLowerCase() != "html"; N = N.parentNode) { var L = F.css(N, "background-color"); if (L.indexOf("rgb") >= 0) { var M = L.match(/\d+/g); return "#" + J(M[0]) + J(M[1]) + J(M[2]) } if (L && L != "transparent") { return L } } return "#ffffff" } K.each(function() { F(this).css("background-color", I(this)) }) } F.fn.cycle.custom = function(T, N, I, K, J) { var S = F(T), O = F(N); O.css(I.cssBefore); var L = I.speedIn; var R = I.speedOut; var M = I.easeIn; var Q = I.easeOut; if (J) { if (typeof J == "number") { L = R = J } else { L = R = 1 } M = Q = null } var P = function() { O.animate(I.animIn, L, M, K) }; S.animate(I.animOut, R, Q, function() { if (I.cssAfter) { S.css(I.cssAfter) } if (!I.sync) { P() } }); if (I.sync) { P() } }; F.fn.cycle.transitions = { fade: function(J, K, I) { K.not(":eq(" + I.startingSlide + ")").css("opacity", 0); I.before.push(function() { F(this).show() }); I.animIn = { opacity: 1 }; I.animOut = { opacity: 0 }; I.cssBefore = { opacity: 0 }; I.cssAfter = { display: "none" }; I.onAddSlide = function(L) { L.hide() } } }; F.fn.cycle.ver = function() { return A }; F.fn.cycle.defaults = { fx: "fade", timeout: 4000, timeoutFn: null, continuous: 0, speed: 1000, speedIn: null, speedOut: null, next: null, prev: null, prevNextClick: null, pager: null, pagerClick: null, pagerEvent: "click", pagerAnchorBuilder: null, before: null, after: null, end: null, easing: null, easeIn: null, easeOut: null, shuffle: null, animIn: null, animOut: null, cssBefore: null, cssAfter: null, fxFn: null, height: "auto", startingSlide: 0, sync: 1, random: 0, fit: 0, containerResize: 1, pause: 0, pauseOnPagerHover: 0, autostop: 0, autostopCount: 0, delay: 0, slideExpr: null, cleartype: 0, nowrap: 0, fastOnEvent: 0} })(jQuery);

//fancyZoom http://orderedlist.com/articles/fancyzoom-meet-jquery
jQuery.fn.fancyZoom = function(O) { var O = O || {}; var L = O && O.directory ? O.directory : "/images/fancyzoom"; var D = false; if ($("#zoom").length == 0) { var E = $.browser.msie ? "gif" : "png"; var J = '<div id="zoom" style="display:none;position:relative;z-index:900;">                   <table id="zoom_table" style="border-collapse:collapse; width:100%; height:100%;">                     <tbody>                       <tr>                         <td class="tl" style="background:url(' + L + "/tl." + E + ') 0 0 no-repeat; width:20px; height:20px; overflow:hidden;" />                         <td class="tm" style="background:url(' + L + "/tm." + E + ') 0 0 repeat-x; height:20px; overflow:hidden;" />                         <td class="tr" style="background:url(' + L + "/tr." + E + ') 100% 0 no-repeat; width:20px; height:20px; overflow:hidden;" />                       </tr>                       <tr>                         <td class="ml" style="background:url(' + L + "/ml." + E + ') 0 0 repeat-y; width:20px; overflow:hidden;" />                         <td class="mm" style="background:#c8d9e5; vertical-align:top; padding:10px;">                           <div id="zoom_content">                           </div>                         </td>                         <td class="mr" style="background:url(' + L + "/mr." + E + ') 100% 0 repeat-y;  width:20px; overflow:hidden;" />                       </tr>                       <tr>                         <td class="bl" style="background:url(' + L + "/bl." + E + ') 0 100% no-repeat; width:20px; height:20px; overflow:hidden;" />                         <td class="bm" style="background:url(' + L + "/bm." + E + ') 0 100% repeat-x; height:20px; overflow:hidden;" />                         <td class="br" style="background:url(' + L + "/br." + E + ') 100% 100% no-repeat; width:20px; height:20px; overflow:hidden;" />                       </tr>                     </tbody>                   </table>                   <a href="#" title="Close" id="zoom_close" style="position:absolute; top:0; left:0;">                     <img src="' + L + "/closebox." + E + '" alt="Close" style="border:none; margin:0; padding:0;" />                   </a>                 </div>'; $("#bodyText").append(J); $("html").click(function(P) { if ($(P.target).parents("#zoom:visible").length == 0) { K() } }); $(document).keyup(function(P) { if (P.keyCode == 27 && $("#zoom:visible").length > 0) { K() } }); $("#zoom_close").click(K) } var N = $("#zoom"); var I = $("#zoom_table"); var H = $("#zoom_close"); var G = $("#zoom_content"); var A = $("td.ml,td.mm,td.mr"); this.each(function(P) { $($(this).attr("href")).hide(); $(this).click(M) }); return this; function M(V) { if (D) { return false } D = true; var P = $($(this).attr("href")); var T = O.width; var U = O.height; var Q = window.innerWidth || (window.document.documentElement.clientWidth || window.document.body.clientWidth); var b = window.innerHeight || (window.document.documentElement.clientHeight || window.document.body.clientHeight); var Z = window.pageXOffset || (window.document.documentElement.scrollLeft || window.document.body.scrollLeft); var Y = window.pageYOffset || (window.document.documentElement.scrollTop || window.document.body.scrollTop); var c = { width: Q, height: b, x: Z, y: Y }; var Q = (T || P.width()) + 60; var b = (U || P.height()) + 60; var W = c; var X = Math.max((W.height / 2) - (b / 2) + Y, 0); var a = (W.width / 2) - (Q / 2); var R = V.pageY; var S = V.pageX; H.attr("curTop", R); H.attr("curLeft", S); H.attr("scaleImg", O.scaleImg ? "true" : "false"); $("#zoom").hide().css({ position: "absolute", top: R + "px", left: S + "px", width: "1px", height: "1px" }); F(); H.hide(); if (O.closeOnClick) { $("#zoom").click(K) } if (O.scaleImg) { G.html(P.html()); $("#zoom_content img").css("width", "100%") } else { G.html("") } $("#zoom").animate({ top: X + "px", left: a + "px", opacity: "show", width: Q, height: b }, 500, null, function() { if (O.scaleImg != true) { G.html(P.html()) } C(); H.show(); D = false }); return false } function K() { if (D) { return false } D = true; $("#zoom").unbind("click"); F(); if (H.attr("scaleImg") != "true") { G.html("") } H.hide(); $("#zoom").animate({ top: H.attr("curTop") + "px", left: H.attr("curLeft") + "px", opacity: "hide", width: "1px", height: "1px" }, 500, null, function() { if (H.attr("scaleImg") == "true") { G.html("") } C(); D = false }); return false } function B(R) { $("#zoom_table td").each(function(T) { var S = $(this).css("background-image").replace(/\.(png|gif|none)\"\)$/, "." + R + '")'); $(this).css("background-image", S) }); var Q = H.children("img"); var P = Q.attr("src").replace(/\.(png|gif|none)$/, "." + R); Q.attr("src", P) } function F() { if ($.browser.msie && parseFloat($.browser.version) >= 7) { B("gif") } } function C() { if ($.browser.msie && $.browser.version >= 7) { B("png") } } };

//InnerFade
(function($) { $.fn.innerfade = function(options) { return this.each(function() { $.innerfade(this, options) }) }; $.innerfade = function(container, options) { var settings = { 'animationtype': 'fade', 'speed': 'normal', 'type': 'sequence', 'timeout': 2000, 'containerheight': 'auto', 'runningclass': 'innerfade', 'children': null }; if (options) $.extend(settings, options); if (settings.children === null) var elements = $(container).children(); else var elements = $(container).children(settings.children); if (elements.length > 1) { $(container).css('position', 'relative').css('height', settings.containerheight).addClass(settings.runningclass); for (var i = 0; i < elements.length; i++) { $(elements[i]).css('z-index', String(elements.length - i)).css('position', 'absolute').hide() }; if (settings.type == "sequence") { setTimeout(function() { $.innerfade.next(elements, settings, 1, 0) }, settings.timeout); $(elements[0]).show() } else if (settings.type == "random") { var last = Math.floor(Math.random() * (elements.length)); setTimeout(function() { do { current = Math.floor(Math.random() * (elements.length)) } while (last == current); $.innerfade.next(elements, settings, current, last) }, settings.timeout); $(elements[last]).show() } else if (settings.type == 'random_start') { settings.type = 'sequence'; var current = Math.floor(Math.random() * (elements.length)); setTimeout(function() { $.innerfade.next(elements, settings, (current + 1) % elements.length, current) }, settings.timeout); $(elements[current]).show() } else { alert('Innerfade-Type must either be \'sequence\', \'random\' or \'random_start\'') } } }; $.innerfade.next = function(elements, settings, current, last) { if (settings.animationtype == 'slide') { $(elements[last]).slideUp(settings.speed); $(elements[current]).slideDown(settings.speed) } else if (settings.animationtype == 'fade') { $(elements[last]).fadeOut(settings.speed); $(elements[current]).fadeIn(settings.speed, function() { removeFilter($(this)[0]) }) } else alert('Innerfade-animationtype must either be \'slide\' or \'fade\''); if (settings.type == "sequence") { if ((current + 1) < elements.length) { current = current + 1; last = current - 1 } else { current = 0; last = elements.length - 1 } } else if (settings.type == "random") { last = current; while (current == last) current = Math.floor(Math.random() * elements.length) } else alert('Innerfade-Type must either be \'sequence\', \'random\' or \'random_start\''); setTimeout((function() { $.innerfade.next(elements, settings, current, last) }), settings.timeout) } })(jQuery); function removeFilter(element) { if (element.style.removeAttribute) { element.style.removeAttribute('filter') } }

// Tabs http://stilbuero.de/tabs/
(function($) { $.extend({ tabs: { remoteCount: 0} }); $.fn.tabs = function(initial, settings) { if (typeof initial == 'object') settings = initial; settings = $.extend({ initial: (initial && typeof initial == 'number' && initial > 0) ? --initial : 0, disabled: null, bookmarkable: $.ajaxHistory ? true : false, remote: false, spinner: 'Loading&#8230;', hashPrefix: 'remote-tab-', fxFade: null, fxSlide: null, fxShow: null, fxHide: null, fxSpeed: 'normal', fxShowSpeed: null, fxHideSpeed: null, fxAutoHeight: false, onClick: null, onHide: null, onShow: null, navClass: 'tabs-nav', selectedClass: 'tabs-selected', disabledClass: 'tabs-disabled', containerClass: 'tabs-container', hideClass: 'tabs-hide', loadingClass: 'tabs-loading', tabStruct: 'div' }, settings || {}); $.browser.msie6 = $.browser.msie && ($.browser.version && $.browser.version < 7 || /MSIE 6.0/.test(navigator.userAgent)); function unFocus() { scrollTo(0, 0); } return this.each(function() { var container = this; var nav = $('ul.' + settings.navClass, container); nav = nav.size() && nav || $('>ul:eq(0)', container); var tabs = $('a', nav); if (settings.remote) { tabs.each(function() { var id = settings.hashPrefix + (++$.tabs.remoteCount), hash = '#' + id, url = this.href; this.href = hash; $('<div id="' + id + '" class="' + settings.containerClass + '"></div>').appendTo(container); $(this).bind('loadRemoteTab', function(e, callback) { var $$ = $(this).addClass(settings.loadingClass), span = $('span', this)[0], tabTitle = span.innerHTML; if (settings.spinner) { span.innerHTML = '<em>' + settings.spinner + '</em>'; } setTimeout(function() { $(hash).load(url, function() { if (settings.spinner) { span.innerHTML = tabTitle; } $$.removeClass(settings.loadingClass); callback && callback(); }); }, 0); }); }); } var containers = $('div.' + settings.containerClass, container); containers = containers.size() && containers || $('>' + settings.tabStruct, container); nav.is('.' + settings.navClass) || nav.addClass(settings.navClass); containers.each(function() { var $$ = $(this); $$.is('.' + settings.containerClass) || $$.addClass(settings.containerClass); }); var hasSelectedClass = $('li', nav).index($('li.' + settings.selectedClass, nav)[0]); if (hasSelectedClass >= 0) { settings.initial = hasSelectedClass; } if (location.hash) { tabs.each(function(i) { if (this.hash == location.hash) { settings.initial = i; if (($.browser.msie || $.browser.opera) && !settings.remote) { var toShow = $(location.hash); var toShowId = toShow.attr('id'); toShow.attr('id', ''); setTimeout(function() { toShow.attr('id', toShowId); }, 500); } unFocus(); return false; } }); } if ($.browser.msie) { unFocus(); } containers.filter(':eq(' + settings.initial + ')').show().end().not(':eq(' + settings.initial + ')').addClass(settings.hideClass); $('li', nav).removeClass(settings.selectedClass).eq(settings.initial).addClass(settings.selectedClass); tabs.eq(settings.initial).trigger('loadRemoteTab').end(); if (settings.fxAutoHeight) { var _setAutoHeight = function(reset) { var heights = $.map(containers.get(), function(el) { var h, jq = $(el); if (reset) { if ($.browser.msie6) { el.style.removeExpression('behaviour'); el.style.height = ''; el.minHeight = null; } h = jq.css({ 'min-height': '' }).height(); } else { h = jq.height(); } return h; }).sort(function(a, b) { return b - a; }); if ($.browser.msie6) { containers.each(function() { this.minHeight = heights[0] + 'px'; this.style.setExpression('behaviour', 'this.style.height = this.minHeight ? this.minHeight : "1px"'); }); } else { containers.css({ 'min-height': heights[0] + 'px' }); } }; _setAutoHeight(); var cachedWidth = container.offsetWidth; var cachedHeight = container.offsetHeight; var watchFontSize = $('#tabs-watch-font-size').get(0) || $('<span id="tabs-watch-font-size">M</span>').css({ display: 'block', position: 'absolute', visibility: 'hidden' }).appendTo(document.body).get(0); var cachedFontSize = watchFontSize.offsetHeight; setInterval(function() { var currentWidth = container.offsetWidth; var currentHeight = container.offsetHeight; var currentFontSize = watchFontSize.offsetHeight; if (currentHeight > cachedHeight || currentWidth != cachedWidth || currentFontSize != cachedFontSize) { _setAutoHeight((currentWidth > cachedWidth || currentFontSize < cachedFontSize)); cachedWidth = currentWidth; cachedHeight = currentHeight; cachedFontSize = currentFontSize; } }, 50); } var showAnim = {}, hideAnim = {}, showSpeed = settings.fxShowSpeed || settings.fxSpeed, hideSpeed = settings.fxHideSpeed || settings.fxSpeed; if (settings.fxSlide || settings.fxFade) { if (settings.fxSlide) { showAnim['height'] = 'show'; hideAnim['height'] = 'hide'; } if (settings.fxFade) { showAnim['opacity'] = 'show'; hideAnim['opacity'] = 'hide'; } } else { if (settings.fxShow) { showAnim = settings.fxShow; } else { showAnim['min-width'] = 0; showSpeed = 1; } if (settings.fxHide) { hideAnim = settings.fxHide; } else { hideAnim['min-width'] = 0; hideSpeed = 1; } } var onClick = settings.onClick, onHide = settings.onHide, onShow = settings.onShow; tabs.bind('triggerTab', function() { var li = $(this).parents('li:eq(0)'); if (container.locked || li.is('.' + settings.selectedClass) || li.is('.' + settings.disabledClass)) { return false; } var hash = this.hash; if ($.browser.msie) { $(this).trigger('click'); if (settings.bookmarkable) { $.ajaxHistory.update(hash); location.hash = hash.replace('#', ''); } } else if ($.browser.safari) { var tempForm = $('<form action="' + hash + '"><div><input type="submit" value="h" /></div></form>').get(0); tempForm.submit(); $(this).trigger('click'); if (settings.bookmarkable) { $.ajaxHistory.update(hash); } } else { if (settings.bookmarkable) { location.hash = hash.replace('#', ''); } else { $(this).trigger('click'); } } }); tabs.bind('disableTab', function() { var li = $(this).parents('li:eq(0)'); if ($.browser.safari) { li.animate({ opacity: 0 }, 1, function() { li.css({ opacity: '' }); }); } li.addClass(settings.disabledClass); }); if (settings.disabled && settings.disabled.length) { for (var i = 0, k = settings.disabled.length; i < k; i++) { tabs.eq(--settings.disabled[i]).trigger('disableTab').end(); } }; tabs.bind('enableTab', function() { var li = $(this).parents('li:eq(0)'); li.removeClass(settings.disabledClass); if ($.browser.safari) { li.animate({ opacity: 1 }, 1, function() { li.css({ opacity: '' }); }); } }); tabs.bind('click', function(e) { var trueClick = e.clientX; var clicked = this, li = $(this).parents('li:eq(0)'), toShow = $(this.hash), toHide = containers.filter(':visible'); if (container['locked'] || li.is('.' + settings.selectedClass) || li.is('.' + settings.disabledClass) || typeof onClick == 'function' && onClick(this, toShow[0], toHide[0]) === false) { this.blur(); return false; } container['locked'] = true; if (toShow.size()) { if ($.browser.msie && settings.bookmarkable) { var toShowId = this.hash.replace('#', ''); toShow.attr('id', ''); setTimeout(function() { toShow.attr('id', toShowId); }, 0); } var resetCSS = { display: '', overflow: '', height: '' }; if (!$.browser.msie) { resetCSS['opacity'] = ''; } function switchTab() { if (settings.bookmarkable && trueClick) { $.ajaxHistory.update(clicked.hash); } toHide.animate(hideAnim, hideSpeed, function() { $(clicked).parents('li:eq(0)').addClass(settings.selectedClass).siblings().removeClass(settings.selectedClass); toHide.addClass(settings.hideClass).css(resetCSS); if (typeof onHide == 'function') { onHide(clicked, toShow[0], toHide[0]); } if (!(settings.fxSlide || settings.fxFade || settings.fxShow)) { toShow.css('display', 'block'); } toShow.animate(showAnim, showSpeed, function() { toShow.removeClass(settings.hideClass).css(resetCSS); if ($.browser.msie) { toHide[0].style.filter = ''; toShow[0].style.filter = ''; } if (typeof onShow == 'function') { onShow(clicked, toShow[0], toHide[0]); } container['locked'] = null; }); }); } if (!settings.remote) { switchTab(); } else { $(clicked).trigger('loadRemoteTab', [switchTab]); } } else { alert('There is no such container.'); } var scrollX = window.pageXOffset || document.documentElement && document.documentElement.scrollLeft || document.body.scrollLeft || 0; var scrollY = window.pageYOffset || document.documentElement && document.documentElement.scrollTop || document.body.scrollTop || 0; setTimeout(function() { window.scrollTo(scrollX, scrollY); }, 0); this.blur(); return settings.bookmarkable && !!trueClick; }); if (settings.bookmarkable) { $.ajaxHistory.initialize(function() { tabs.eq(settings.initial).trigger('click').end(); }); } }); }; var tabEvents = ['triggerTab', 'disableTab', 'enableTab']; for (var i = 0; i < tabEvents.length; i++) { $.fn[tabEvents[i]] = (function(tabEvent) { return function(tab) { return this.each(function() { var nav = $('ul.tabs-nav', this); nav = nav.size() && nav || $('>ul:eq(0)', this); var a; if (!tab || typeof tab == 'number') { a = $('li a', nav).eq((tab && tab > 0 && tab - 1 || 0)); } else if (typeof tab == 'string') { a = $('li a[@href$="#' + tab + '"]', nav); } a.trigger(tabEvent); }); }; })(tabEvents[i]); } $.fn.activeTab = function() { var selectedTabs = []; this.each(function() { var nav = $('ul.tabs-nav', this); nav = nav.size() && nav || $('>ul:eq(0)', this); var lis = $('li', nav); selectedTabs.push(lis.index(lis.filter('.tabs-selected')[0]) + 1); }); return selectedTabs[0]; }; })(jQuery);


