/*
* jQuery Ajaxify v2.00 (11/12/2008) - http://max.jsrhost.com/ajaxify/
*/
(function(a) { jQuery.AjaxifyDefaults = { event: "click", link: false, target: "#container", animateOut: false, animateIn: false, animateOutSpeed: "normal", animateInSpeed: "normal", method: "GET", tagToload: false, loading_txt: "", loading_img: "images/loading.gif", loading_target: false, loading_fn: function(b) { jQuery.ajaxifyLoading(b) }, loadHash: false, title: false, forms: false, params: "ajax=true", timeout: false, contentType: "application/x-www-form-urlencoded", dataType: "html", cache: false, username: false, password: false, onStart: function(b) { }, onError: function(b) { jQuery.ajaxifyManip(b, "<font style='color: #CC0000'>Error: </font> Couldn't open the page.") }, onSuccess: function(b) { }, onComplete: function(b) { } }; jQuery.AjaxifyFirstLoad = true; jQuery.AjaxifyhistorySet = new Object(); jQuery.AjaxifyPageTitle = document.title; jQuery.AjaxifyDebug = false; jQuery.fn.ajaxify = function(c) { if (!jQuery(this).size()) { jQuery.ajaxifylog('Error: No matched element/s for your ajaxify selector " ' + jQuery(this).selector + ' ".'); return false } var b = jQuery.fn.jquery.split("."); if (b[0] < 1 || b[1] < 2 || b[2] < 6) { jQuery.ajaxifylog("Error: Your jQuery version is old. Version 1.2.6 or newer is required."); return false } return this.each(function() { var d = jQuery.extend({}, jQuery.AjaxifyDefaults, c); if (jQuery.metadata) { d = jQuery.extend(d, jQuery(this).metadata()) } if (d.event) { jQuery(this).bind(d.event, function() { jQuery(this).ajaxifyAnalyse(d); if (!d.hash) { jQuery.ajaxifyLoad(d) } else { jQuery.ajaxifyHash(d) } if (jQuery(this).is("a") || jQuery(this).is("form")) { return false } }) } else { jQuery(this).ajaxifyAnalyse(d); jQuery.ajaxifyLoad(d) } if (d.loadHash && jQuery.AjaxifyFirstLoad) { jQuery(this).ajaxifyAnalyse(d); if (document.location.hash.replace(/^#/, "") == d.hash && d.hash) { jQuery.ajaxifyHash(d); jQuery.AjaxifyFirstLoad = false } } }) }; jQuery.fn.ajaxifyAnalyse = function(d) { d.object = this; if (jQuery(this).is("a")) { if (jQuery(this).attr("href")) { var c = jQuery(this).attr("href").replace(/^#/, ""); d.link = c || d.link } else { d.link } if (typeof d.tagToload != "object") { if (jQuery(this).attr("target")) { d.target = jQuery(this).attr("target") } else { d.target } } else { d.target = d.loading_target || "#AjaxifyTemp" } } if (!d.loading_target) { d.loading_target = d.target } if (d.forms) { var f = jQuery(d.forms).serialize(); d.paramres = f } if (typeof d.params == "function") { var e = d.params(d) } else { var e = d.params } if (typeof e == "string") { if (f) { d.paramres += "&" + e } else { d.paramres = e } } var b = d.target.length - 1; if (typeof d.tagToload != "object") { if (d.target.charAt(b) == "+" || d.target.charAt(b) == "-") { d.manip = d.target.charAt(b); d.target = d.target.substr(0, b) } } if (d.loadHash) { if (!jQuery.historyInit) { jQuery.ajaxifylog("Error: loadHash is enabled but history plugin couldn't be found."); return false } if (d.loadHash === true) { jQuery.ajaxifylog('Info: It seemes you are upgrading from v1.0. Please see the new documentation about loadHash. "attr:href" will be used instead of "true".'); d.loadHash = "attr:href" } if (d.loadHash.toLowerCase() == "attr:href" || d.loadHash.toLowerCase() == "attr:rel" || d.loadHash.toLowerCase() == "attr:title") { d.loadHash = d.loadHash.toLowerCase(); d.hash = jQuery(this).attr(d.loadHash.replace("attr:", "")); if (jQuery.browser.opera) { d.hash = d.hash.replace("?", "%3F"); d.hash = d.hash.replace("&", "%26"); d.hash = d.hash.replace("=", "%3D") } } else { d.hash = d.loadHash } if (!d.hash) { jQuery.ajaxifylog("Warning: You have specified loadHash, but its empty or attribute couldn't be found.") } } if (!jQuery(d.target).size() && typeof d.tagToload != "object") { jQuery.ajaxifylog('Warning: Target " ' + d.target + " \" couldn't be found.") } }; jQuery.ajaxifyLoading = function(b) { var c = "<div id='AjaxifyLoading'><img src='" + b.loading_img + "' alt='Loading...' title='Loading...' >" + b.loading_txt + "</div>"; if (b.loading_target) { jQuery.ajaxifyManip(b.loading_target, c) } else { jQuery.ajaxifyManip(b, c) } }; jQuery.ajaxifyHash = function(c) { var b = new Object(); jQuery.each(c, function(d, e) { b[d] = e }); jQuery.AjaxifyhistorySet[b.hash] = b; location.hash = b.hash; jQuery.historyInit(jQuery.ajaxifyHistory); jQuery.AjaxifyFirstLoad.history = false }; jQuery.ajaxifyLoad = function(b) { jQuery.ajaxSetup({ global: false }); jQuery.ajax({ type: b.method, url: b.link, dataType: b.dataType, data: b.paramres, contentType: b.contentType, processData: true, timeout: b.timeout, cache: b.cache, username: b.username, password: b.password, complete: function() { b.onComplete(b) }, beforeSend: function() { b.onStart(b); if (b.animateOut) { if (b.loading_target != b.target) { } b.loading_fn(b); jQuery(b.target).animate(b.animateOut, b.animateOutSpeed, function() { if (!b.loading_target) { b.loading_fn(b) } }) } else { b.loading_fn(b) } }, success: function(c) { jQuery(b.target).stop(); jQuery("#AjaxifyLoading").remove(); if (b.title) { document.title = b.title } else { if (document.title != jQuery.AjaxifyPageTitle) { document.title = jQuery.AjaxifyPageTitle } } if (b.tagToload) { c = "<div>" + c + "</div>"; if (typeof b.tagToload == "string") { jQuery.ajaxifyManip(b, jQuery(c).find(b.tagToload)) } else { if (typeof b.tagToload == "object") { jQuery.each(b.tagToload, function(d, e) { if (jQuery(c).find(d).size()) { jQuery.ajaxifyManip(e, jQuery(c).find(d)) } else { jQuery.ajaxifylog('Warning: Tag "' + d + "\" couldn't be found.") } }) } } } else { jQuery.ajaxifyManip(b, c) } b.onSuccess(b, c); if (b.animateIn) { jQuery(b.target).animate(b.animateIn, b.animateInSpeed) } }, error: function(c) { jQuery(b.target).stop(); b.onError(b, c); if (b.animateIn) { jQuery(b.target).animate(b.animateIn, b.animateInSpeed) } } }) }; jQuery.ajaxifylog = function(b) { if (jQuery.AjaxifyDebug) { if (window.console) { console.debug(b) } else { alert(b) } } }; jQuery.ajaxifyHistory = function(c) { if (c) { if (jQuery.browser.safari) { var b = jQuery.AjaxifyhistorySet[location.hash.replace(/^#/, "")] } else { var b = jQuery.AjaxifyhistorySet[c] } if (b) { jQuery.ajaxifyLoad(b) } else { jQuery.ajaxifylog("History Fired. But I couldn't find hash. Most propabley, the hash is empty. If so, its normal.") } } }; jQuery.ajaxifyManip = function(e, c) { if (typeof e != "object") { var d = e; var e = new Object; var b = d.length - 1; if (d.charAt(b) == "+" || d.charAt(b) == "-") { e.manip = d.charAt(b); e.target = d.substr(0, b) } else { e.manip = ""; e.target = d } if (!jQuery(e.target).size()) { jQuery.ajaxifylog('Warning: Target "' + e.target + "\" couldn't be found.") } } if (e.manip == "+") { jQuery(e.target).append(c) } else { if (e.manip == "-") { jQuery(e.target).prepend(c) } else { jQuery(e.target).html(c) } } } })(jQuery);
/*
* jQuery UI Accordion 1.6 - http://docs.jquery.com/UI/Accordion
*/
(function(e) { e.ui = e.ui || {}; e.fn.extend({ accordion: function(h, i) { var g = Array.prototype.slice.call(arguments, 1); return this.each(function() { if (typeof h == "string") { var j = e.data(this, "ui-accordion"); j[h].apply(j, g) } else { if (!e(this).is(".ui-accordion")) { e.data(this, "ui-accordion", new e.ui.accordion(this, h)) } } }) }, activate: function(g) { return this.accordion("activate", g) } }); e.ui.accordion = function(g, h) { this.options = h = e.extend({}, e.ui.accordion.defaults, h); this.element = g; e(g).addClass("ui-accordion"); if (h.navigation) { var k = e(g).find("a").filter(h.navigationFilter); if (k.length) { if (k.filter(h.header).length) { h.active = k } else { h.active = k.parent().parent().prev(); k.addClass("current") } } } h.headers = e(g).find(h.header); h.active = c(h.headers, h.active); if (h.fillSpace) { var j = e(g).parent().height(); h.headers.each(function() { j -= e(this).outerHeight() }); var i = 0; h.headers.next().each(function() { i = Math.max(i, e(this).innerHeight() - e(this).height()) }).height(j - i) } else { if (h.autoheight) { var j = 0; h.headers.next().each(function() { j = Math.max(j, e(this).outerHeight()) }).height(j) } } h.headers.not(h.active || "").next().hide(); h.active.parent().andSelf().addClass(h.selectedClass); if (h.event) { e(g).bind((h.event) + ".ui-accordion", f) } }; e.ui.accordion.prototype = { activate: function(g) { f.call(this.element, { target: c(this.options.headers, g)[0] }) }, enable: function() { this.options.disabled = false }, disable: function() { this.options.disabled = true }, destroy: function() { this.options.headers.next().css("display", ""); if (this.options.fillSpace || this.options.autoheight) { this.options.headers.next().css("height", "") } e.removeData(this.element, "ui-accordion"); e(this.element).removeClass("ui-accordion").unbind(".ui-accordion") } }; function b(h, g) { return function() { return h.apply(g, arguments) } } function d(i) { if (!e.data(this, "ui-accordion")) { return } var g = e.data(this, "ui-accordion"); var h = g.options; h.running = i ? 0 : --h.running; if (h.running) { return } if (h.clearStyle) { h.toShow.add(h.toHide).css({ height: "", overflow: "" }) } e(this).triggerHandler("change.ui-accordion", [h.data], h.change) } function a(g, k, l, j, m) { var i = e.data(this, "ui-accordion").options; i.toShow = g; i.toHide = k; i.data = l; var h = b(d, this); i.running = k.size() == 0 ? g.size() : k.size(); if (i.animated) { if (!i.alwaysOpen && j) { e.ui.accordion.animations[i.animated]({ toShow: jQuery([]), toHide: k, complete: h, down: m, autoheight: i.autoheight }) } else { e.ui.accordion.animations[i.animated]({ toShow: g, toHide: k, complete: h, down: m, autoheight: i.autoheight }) } } else { if (!i.alwaysOpen && j) { g.toggle() } else { k.hide(); g.show() } h(true) } } function f(l) { var j = e.data(this, "ui-accordion").options; if (j.disabled) { return false } if (!l.target && !j.alwaysOpen) { j.active.parent().andSelf().toggleClass(j.selectedClass); var i = j.active.next(), m = { instance: this, options: j, newHeader: jQuery([]), oldHeader: j.active, newContent: jQuery([]), oldContent: i }, g = j.active = e([]); a.call(this, g, i, m); return false } var k = e(l.target); if (k.parents(j.header).length) { while (!k.is(j.header)) { k = k.parent() } } var h = k[0] == j.active[0]; if (j.running || (j.alwaysOpen && h)) { return false } if (!k.is(j.header)) { return } j.active.parent().andSelf().toggleClass(j.selectedClass); if (!h) { k.parent().andSelf().addClass(j.selectedClass) } var g = k.next(), i = j.active.next(), m = { instance: this, options: j, newHeader: k, oldHeader: j.active, newContent: g, oldContent: i }, n = j.headers.index(j.active[0]) > j.headers.index(k[0]); j.active = h ? e([]) : k; a.call(this, g, i, m, h, n); return false } function c(h, g) { return g != undefined ? typeof g == "number" ? h.filter(":eq(" + g + ")") : h.not(h.not(g)) : g === false ? e([]) : h.filter(":eq(0)") } e.extend(e.ui.accordion, { defaults: { selectedClass: "selected", alwaysOpen: true, animated: "slide", event: "click", header: "a", autoheight: true, running: 0, navigationFilter: function() { return this.href.toLowerCase() == location.href.toLowerCase() } }, animations: { slide: function(g, i) { g = e.extend({ easing: "swing", duration: 300 }, g, i); if (!g.toHide.size()) { g.toShow.animate({ height: "show" }, g); return } var h = g.toHide.height(), j = g.toShow.height(), k = j / h; g.toShow.css({ height: 0, overflow: "hidden" }).show(); g.toHide.filter(":hidden").each(g.complete).end().filter(":visible").animate({ height: "hide" }, { step: function(l) { var m = (h - l) * k; if (e.browser.msie || e.browser.opera) { m = Math.ceil(m) } g.toShow.height(m) }, duration: g.duration, easing: g.easing, complete: function() { if (!g.autoheight) { g.toShow.css("height", "auto") } g.complete() } }) }, bounceslide: function(g) { this.slide(g, { easing: g.down ? "bounceout" : "swing", duration: g.down ? 1000 : 200 }) }, easeslide: function(g) { this.slide(g, { easing: "easeinout", duration: 700 }) } } }) })(jQuery);
/*
* jQuery Intercept Plugin v1.1.2 - http://flesler.blogspot.com
*/
(function(b) { var a = b.intercept = function(g, c, d) { b("html").intercept(g, c, d) }; b.fn.intercept = function(h, d, g) { var c, f, e; if (g) { c = {}; c[d] = g; d = c } return this.each(function() { f = this; b.each(h.split(" "), function(k, j) { e = b.data(f, j + ".intercept"); if (!e) { b.data(f, j + ".intercept", b.extend({}, d)); b.event.add(f, j, a.handle) } else { b.extend(e, d) } }) }) }; a.absolute = /[\s>+~]/; a.handle = function(i) { var f = b.data(this, i.type + ".intercept"), h = i.target, d = b(h), c, g; if (!f) { return } for (c in f) { if (c == "self" && h == this || a.absolute.test(c) ? b(c).index(h) != -1 : d.is(c)) { g = f[c].apply(h, arguments) !== false && g } } return g } })(jQuery);
/*
* jQuery Smart Lists Plugin v1.0.3 - http://www.benjaminkeen.com/software/smartlists/
*/
(function(a) { a.extend({ currentPage: 1, currentFlag: "smartlist-all", options: {}, flagInfo: null, listItems: [], itemFlagIndexes: [], smartlist: function(l) { var e = { baseName: "sl", itemClass: "item", showFlagCount: true, itemFlagClass: "flags", itemFlagSeparator: ", ", itemChangeEffect: "Blind", itemChangeDuration: 800, pageChangeEffect: "", pageChangeDuration: 500, numItemsPerPage: 10, paginationLeft: "\u00ab", paginationRight: "\u00bb", maxPaginationLinks: 10, defaultDropdownOptText: "All items", optgroups: {} }; jQuery.extend(e, l); var n = a("#" + e.baseName + " ." + e.itemClass); var g = []; var y = []; var c = 0; for (var s = 0; s < n.length; s++) { if (s < e.numItemsPerPage) { a(n[s]).show() } else { a(n[s]).hide() } var v = a(n[s]).find("." + e.itemFlagClass); var o = []; var t = []; for (var r = 0; r < v.length; r++) { var d = a(v[r]).html().split(/\s+/); var u = document.createElement("span"); for (var q = 0; q < d.length; q++) { var f = d[q].replace(/&nbsp;/g, " "); flagIndex = c; var x = false; for (var p = 0; p < y.length; p++) { if (y[p][0] == f) { y[p][2]++; flagIndex = y[p][1]; x = true } } if (!x) { y.push([f, flagIndex, 1]); c++ } var w = document.createElement("a"); w.setAttribute("href", "#"); w.setAttribute("class", e.baseName + "-flag" + flagIndex); w.setAttribute("className", e.baseName + "-flag" + flagIndex); w.appendChild(document.createTextNode(f)); u.appendChild(w); u.appendChild(document.createTextNode(e.itemFlagSeparator)); o.push(flagIndex) } if (u.childNodes.length) { u.removeChild(u.childNodes[u.childNodes.length - 1]) } a(v[r]).html(u) } g[s] = o } var h = []; for (var s = 0; s < y.length; s++) { h.push(y[s][0]) } h.sort(); var b = []; for (var s = 0; s < h.length; s++) { var f = h[s]; for (var r = 0; r < y.length; r++) { if (y[r][0] == f) { b.push([f, y[r][1], y[r][2]]) } } } this.options = e; this.flagInfo = b; this.listItems = n; this.itemFlagIndexes = g; this.createPagination("smartlist-all"); this.addDropdown(); a(e.baseName).show() }, createPagination: function(g) { var d = this.listItems; var p = this.options; var j = this.flagInfo; var c = 0; if (g == "smartlist-all") { c = Math.ceil(d.length / p.numItemsPerPage) } else { var f = this._getFlagCountFromFlagIndex(g); c = Math.ceil(f / p.numItemsPerPage) } a("#" + p.baseName + "-pagination").empty(); if (c <= 1) { return } var o = document.createElement("span"); var e = document.createElement("span"); e.setAttribute("id", p.baseName + "-pagination-previous"); e.appendChild(document.createTextNode(this.options.paginationLeft)); o.appendChild(e); var l = Math.floor(p.maxPaginationLinks / 2); for (var h = 1; h <= c; h++) { var m = document.createElement("span"); m.setAttribute("id", p.baseName + "-page" + h); if (h == 1) { m.setAttribute("class", p.baseName + "-pagination-selected"); m.setAttribute("className", p.baseName + "-pagination-selected") } if (h > l) { m.style.cssText = "display:none" } var k = document.createElement("a"); k.setAttribute("href", "#"); var b = this; a(k).bind("click", { page: h }, function(i) { return b.changePage(i) }); k.appendChild(document.createTextNode(h)); m.appendChild(k); o.appendChild(m) } var n = document.createElement("span"); n.setAttribute("id", p.baseName + "-pagination-next"); n.appendChild(this._getPaginationNextLinkNode()); o.appendChild(n); a("#" + p.baseName + "-pagination").html(o) }, addDropdown: function() { var m = this.options; var h = this.flagInfo; var b = this; var l = document.createElement("select"); a(l).bind("change", function(i) { return b.filterByFlag(i) }); var f = document.createElement("option"); f.setAttribute("value", "smartlist-all"); f.appendChild(document.createTextNode(m.defaultDropdownOptText)); l.appendChild(f); for (var d = 0; d < h.length; d++) { var k = h[d][0]; var g = h[d][1]; var e = h[d][2]; var c = document.createElement("option"); c.setAttribute("value", g); var j = (m.showFlagCount) ? k + " (" + e + ")" : k; c.appendChild(document.createTextNode(j)); l.appendChild(c); a("." + m.baseName + "-flag" + g).bind("click", { flagIndex: g }, function(i) { return b.filterByFlag(i) }) } a("#" + m.baseName + "-flag-dropdown").html(l) }, changePage: function(b) { var r = this.options; var j = this.currentPage; var l = b.data.page; if (l == j) { return } if (l == "next") { l = j + 1 } else { if (l == "previous") { l = j - 1 } } a("#" + r.baseName + "-page" + j).removeClass(r.baseName + "-pagination-selected"); a("#" + r.baseName + "-page" + l).addClass(r.baseName + "-pagination-selected"); var q = (this.currentFlag == "smartlist-all") ? this.listItems : this._getItemsByFlag(this.currentFlag); var e = (j - 1) * r.numItemsPerPage; var o = e + r.numItemsPerPage; var h = (o > q.length) ? q.length : o; var k = (l - 1) * r.numItemsPerPage; var o = k + r.numItemsPerPage; var p = (o > q.length) ? q.length : o; for (var f = 0; f < q.length; f++) { if (f >= e && f < h) { switch (r.pageChangeEffect) { case "Blind": a(q[f]).hide(r.pageChangeDuration); break; case "FadeAppear": a(q[f]).fadeOut(r.pageChangeDuration); break; default: a(q[f]).hide(); break } } if (f >= k && f < p) { switch (r.pageChangeEffect) { case "Blind": a(q[f]).animate({ opacity: r.pageChangeDuration }).show(r.pageChangeDuration); break; case "FadeAppear": a(q[f]).animate({ opacity: r.pageChangeDuration }).fadeIn(r.pageChangeDuration); break; default: a(q[f]).show(); break } } } var g = Math.ceil(q.length / r.numItemsPerPage); if (l == 1) { a("#" + r.baseName + "-pagination-previous").html(r.paginationLeft) } else { a("#" + r.baseName + "-pagination-previous").html(this._getPaginationPreviousLinkNode()) } if (l == g) { a("#" + r.baseName + "-pagination-next").html(r.paginationRight) } else { a("#" + r.baseName + "-pagination-next").html(this._getPaginationNextLinkNode()) } var m = 0; var n = Math.floor(r.maxPaginationLinks / 2); var d = (l > n) ? l - n : 1; var c = ((l + n) < g) ? l + n : g; for (var f = 1; f <= g; f++) { if (f < d) { a("#" + r.baseName + "-page" + f).hide() } if (f > c) { a("#" + r.baseName + "-page" + f).hide() } if (f >= d && f <= c) { a("#" + r.baseName + "-page" + f).show() } } this.currentPage = l; return false }, filterByFlag: function(g) { var f = f; if (g.target.value == "smartlist-all") { f = g.target.value } else { if (g.target.value != undefined) { f = parseInt(g.target.value) } } if (g.data) { f = g.data.flagIndex } var h = this.listItems; var c = this.options; var b = this.itemFlagIndexes; var e = 0; for (var d = 0; d < h.length; d++) { if (e >= c.numItemsPerPage) { a(h[d]).hide(); continue } if (a.inArray(f, b[d]) != -1 || f == "smartlist-all") { if (a(h[d]).css("display") == "none") { switch (c.itemChangeEffect) { case "Blind": a(h[d]).show(c.itemChangeDuration); break; case "FadeAppear": a(h[d]).fadeIn(c.itemChangeDuration); break; default: a(h[d]).show(); break } } e++ } else { if (a(h[d]).css("display") != "none") { switch (c.itemChangeEffect) { case "Blind": a(h[d]).hide(c.itemChangeDuration); break; case "FadeAppear": a(h[d]).fadeOut(c.itemChangeDuration); break; default: a(h[d]).hide(); break } } else { a(h[d]).hide() } } } this._selectDropdownOption(f); this.createPagination(f); this.currentPage = 1; this.currentFlag = f; return false }, _getFlagCountFromFlagIndex: function(c) { var d = null; for (var b = 0; b < this.flagInfo.length; b++) { if (this.flagInfo[b][1] == c) { d = this.flagInfo[b][2] } } return d }, _getPaginationNextLinkNode: function() { var b = document.createElement("a"); b.setAttribute("href", "#"); var c = this; a(b).bind("click", { page: "next" }, function(d) { c.changePage(d) }); b.appendChild(document.createTextNode(this.options.paginationRight)); return b }, _getPaginationPreviousLinkNode: function() { var b = document.createElement("a"); b.setAttribute("href", "#"); var d = this; a(b).bind("click", { page: "previous" }, function(f) { d.changePage(f) }); var c = this.options.paginationLeft; b.appendChild(document.createTextNode(c)); return b }, _selectDropdownOption: function(f) { var d = this.options; var c = a("#" + d.baseName + "-flag-dropdown").find("select"); var b = c[0]; for (var e = 0; e < b.options.length; e++) { if (b.options[e].value == f) { b.options[e].selected = true; break } } }, _getItemsByFlag: function(d) { var b = []; for (var c = 0; c < this.listItems.length; c++) { if (a.inArray(d, this.itemFlagIndexes[c]) != -1) { b.push(this.listItems[c]) } } return b } }) })(jQuery);
/*
* jQuery TableSorter Plugin v2.0.3 - http://tablesorter.com
*/
(function($) { $.extend({ tablesorter: new function() { var parsers = [], widgets = []; this.defaults = { cssHeader: "header", cssAsc: "headerSortUp", cssDesc: "headerSortDown", sortInitialOrder: "asc", sortMultiSortKey: "shiftKey", sortForce: null, sortAppend: null, textExtraction: "simple", parsers: {}, widgets: [], widgetZebra: { css: ["even", "odd"] }, headers: {}, widthFixed: false, cancelSelection: true, sortList: [], headerList: [], dateFormat: "us", decimal: '.', debug: false }; function benchmark(s, d) { log(s + "," + (new Date().getTime() - d.getTime()) + "ms"); } this.benchmark = benchmark; function log(s) { if (typeof console != "undefined" && typeof console.debug != "undefined") { console.log(s); } else { alert(s); } } function buildParserCache(table, $headers) { if (table.config.debug) { var parsersDebug = ""; } var rows = table.tBodies[0].rows; if (table.tBodies[0].rows[0]) { var list = [], cells = rows[0].cells, l = cells.length; for (var i = 0; i < l; i++) { var p = false; if ($.metadata && ($($headers[i]).metadata() && $($headers[i]).metadata().sorter)) { p = getParserById($($headers[i]).metadata().sorter); } else if ((table.config.headers[i] && table.config.headers[i].sorter)) { p = getParserById(table.config.headers[i].sorter); } if (!p) { p = detectParserForColumn(table, cells[i]); } if (table.config.debug) { parsersDebug += "column:" + i + " parser:" + p.id + "\n"; } list.push(p); } } if (table.config.debug) { log(parsersDebug); } return list; }; function detectParserForColumn(table, node) { var l = parsers.length; for (var i = 1; i < l; i++) { if (parsers[i].is($.trim(getElementText(table.config, node)), table, node)) { return parsers[i]; } } return parsers[0]; } function getParserById(name) { var l = parsers.length; for (var i = 0; i < l; i++) { if (parsers[i].id.toLowerCase() == name.toLowerCase()) { return parsers[i]; } } return false; } function buildCache(table) { if (table.config.debug) { var cacheTime = new Date(); } var totalRows = (table.tBodies[0] && table.tBodies[0].rows.length) || 0, totalCells = (table.tBodies[0].rows[0] && table.tBodies[0].rows[0].cells.length) || 0, parsers = table.config.parsers, cache = { row: [], normalized: [] }; for (var i = 0; i < totalRows; ++i) { var c = table.tBodies[0].rows[i], cols = []; cache.row.push($(c)); for (var j = 0; j < totalCells; ++j) { cols.push(parsers[j].format(getElementText(table.config, c.cells[j]), table, c.cells[j])); } cols.push(i); cache.normalized.push(cols); cols = null; }; if (table.config.debug) { benchmark("Building cache for " + totalRows + " rows:", cacheTime); } return cache; }; function getElementText(config, node) { if (!node) return ""; var t = ""; if (config.textExtraction == "simple") { if (node.childNodes[0] && node.childNodes[0].hasChildNodes()) { t = node.childNodes[0].innerHTML; } else { t = node.innerHTML; } } else { if (typeof (config.textExtraction) == "function") { t = config.textExtraction(node); } else { t = $(node).text(); } } return t; } function appendToTable(table, cache) { if (table.config.debug) { var appendTime = new Date() } var c = cache, r = c.row, n = c.normalized, totalRows = n.length, checkCell = (n[0].length - 1), tableBody = $(table.tBodies[0]), rows = []; for (var i = 0; i < totalRows; i++) { rows.push(r[n[i][checkCell]]); if (!table.config.appender) { var o = r[n[i][checkCell]]; var l = o.length; for (var j = 0; j < l; j++) { tableBody[0].appendChild(o[j]); } } } if (table.config.appender) { table.config.appender(table, rows); } rows = null; if (table.config.debug) { benchmark("Rebuilt table:", appendTime); } applyWidget(table); setTimeout(function() { $(table).trigger("sortEnd"); }, 0); }; function buildHeaders(table) { if (table.config.debug) { var time = new Date(); } var meta = ($.metadata) ? true : false, tableHeadersRows = []; for (var i = 0; i < table.tHead.rows.length; i++) { tableHeadersRows[i] = 0; }; $tableHeaders = $("thead th", table); $tableHeaders.each(function(index) { this.count = 0; this.column = index; this.order = formatSortingOrder(table.config.sortInitialOrder); if (checkHeaderMetadata(this) || checkHeaderOptions(table, index)) this.sortDisabled = true; if (!this.sortDisabled) { $(this).addClass(table.config.cssHeader); } table.config.headerList[index] = this; }); if (table.config.debug) { benchmark("Built headers:", time); log($tableHeaders); } return $tableHeaders; }; function checkCellColSpan(table, rows, row) { var arr = [], r = table.tHead.rows, c = r[row].cells; for (var i = 0; i < c.length; i++) { var cell = c[i]; if (cell.colSpan > 1) { arr = arr.concat(checkCellColSpan(table, headerArr, row++)); } else { if (table.tHead.length == 1 || (cell.rowSpan > 1 || !r[row + 1])) { arr.push(cell); } } } return arr; }; function checkHeaderMetadata(cell) { if (($.metadata) && ($(cell).metadata().sorter === false)) { return true; }; return false; } function checkHeaderOptions(table, i) { if ((table.config.headers[i]) && (table.config.headers[i].sorter === false)) { return true; }; return false; } function applyWidget(table) { var c = table.config.widgets; var l = c.length; for (var i = 0; i < l; i++) { getWidgetById(c[i]).format(table); } } function getWidgetById(name) { var l = widgets.length; for (var i = 0; i < l; i++) { if (widgets[i].id.toLowerCase() == name.toLowerCase()) { return widgets[i]; } } }; function formatSortingOrder(v) { if (typeof (v) != "Number") { i = (v.toLowerCase() == "desc") ? 1 : 0; } else { i = (v == (0 || 1)) ? v : 0; } return i; } function isValueInArray(v, a) { var l = a.length; for (var i = 0; i < l; i++) { if (a[i][0] == v) { return true; } } return false; } function setHeadersCss(table, $headers, list, css) { $headers.removeClass(css[0]).removeClass(css[1]); var h = []; $headers.each(function(offset) { if (!this.sortDisabled) { h[this.column] = $(this); } }); var l = list.length; for (var i = 0; i < l; i++) { h[list[i][0]].addClass(css[list[i][1]]); } } function fixColumnWidth(table, $headers) { var c = table.config; if (c.widthFixed) { var colgroup = $('<colgroup>'); $("tr:first td", table.tBodies[0]).each(function() { colgroup.append($('<col>').css('width', $(this).width())); }); $(table).prepend(colgroup); }; } function updateHeaderSortCount(table, sortList) { var c = table.config, l = sortList.length; for (var i = 0; i < l; i++) { var s = sortList[i], o = c.headerList[s[0]]; o.count = s[1]; o.count++; } } function multisort(table, sortList, cache) { if (table.config.debug) { var sortTime = new Date(); } var dynamicExp = "var sortWrapper = function(a,b) {", l = sortList.length; for (var i = 0; i < l; i++) { var c = sortList[i][0]; var order = sortList[i][1]; var s = (getCachedSortType(table.config.parsers, c) == "text") ? ((order == 0) ? "sortText" : "sortTextDesc") : ((order == 0) ? "sortNumeric" : "sortNumericDesc"); var e = "e" + i; dynamicExp += "var " + e + " = " + s + "(a[" + c + "],b[" + c + "]); "; dynamicExp += "if(" + e + ") { return " + e + "; } "; dynamicExp += "else { "; } var orgOrderCol = cache.normalized[0].length - 1; dynamicExp += "return a[" + orgOrderCol + "]-b[" + orgOrderCol + "];"; for (var i = 0; i < l; i++) { dynamicExp += "}; "; } dynamicExp += "return 0; "; dynamicExp += "}; "; eval(dynamicExp); cache.normalized.sort(sortWrapper); if (table.config.debug) { benchmark("Sorting on " + sortList.toString() + " and dir " + order + " time:", sortTime); } return cache; }; function sortText(a, b) { return ((a < b) ? -1 : ((a > b) ? 1 : 0)); }; function sortTextDesc(a, b) { return ((b < a) ? -1 : ((b > a) ? 1 : 0)); }; function sortNumeric(a, b) { return a - b; }; function sortNumericDesc(a, b) { return b - a; }; function getCachedSortType(parsers, i) { return parsers[i].type; }; this.construct = function(settings) { return this.each(function() { if (!this.tHead || !this.tBodies) return; var $this, $document, $headers, cache, config, shiftDown = 0, sortOrder; this.config = {}; config = $.extend(this.config, $.tablesorter.defaults, settings); $this = $(this); $headers = buildHeaders(this); this.config.parsers = buildParserCache(this, $headers); cache = buildCache(this); var sortCSS = [config.cssDesc, config.cssAsc]; fixColumnWidth(this); $headers.click(function(e) { $this.trigger("sortStart"); var totalRows = ($this[0].tBodies[0] && $this[0].tBodies[0].rows.length) || 0; if (!this.sortDisabled && totalRows > 0) { var $cell = $(this); var i = this.column; this.order = this.count++ % 2; if (!e[config.sortMultiSortKey]) { config.sortList = []; if (config.sortForce != null) { var a = config.sortForce; for (var j = 0; j < a.length; j++) { if (a[j][0] != i) { config.sortList.push(a[j]); } } } config.sortList.push([i, this.order]); } else { if (isValueInArray(i, config.sortList)) { for (var j = 0; j < config.sortList.length; j++) { var s = config.sortList[j], o = config.headerList[s[0]]; if (s[0] == i) { o.count = s[1]; o.count++; s[1] = o.count % 2; } } } else { config.sortList.push([i, this.order]); } }; setTimeout(function() { setHeadersCss($this[0], $headers, config.sortList, sortCSS); appendToTable($this[0], multisort($this[0], config.sortList, cache)); }, 1); return false; } }).mousedown(function() { if (config.cancelSelection) { this.onselectstart = function() { return false }; return false; } }); $this.bind("update", function() { this.config.parsers = buildParserCache(this, $headers); cache = buildCache(this); }).bind("sorton", function(e, list) { $(this).trigger("sortStart"); config.sortList = list; var sortList = config.sortList; updateHeaderSortCount(this, sortList); setHeadersCss(this, $headers, sortList, sortCSS); appendToTable(this, multisort(this, sortList, cache)); }).bind("appendCache", function() { appendToTable(this, cache); }).bind("applyWidgetId", function(e, id) { getWidgetById(id).format(this); }).bind("applyWidgets", function() { applyWidget(this); }); if ($.metadata && ($(this).metadata() && $(this).metadata().sortlist)) { config.sortList = $(this).metadata().sortlist; } if (config.sortList.length > 0) { $this.trigger("sorton", [config.sortList]); } applyWidget(this); }); }; this.addParser = function(parser) { var l = parsers.length, a = true; for (var i = 0; i < l; i++) { if (parsers[i].id.toLowerCase() == parser.id.toLowerCase()) { a = false; } } if (a) { parsers.push(parser); }; }; this.addWidget = function(widget) { widgets.push(widget); }; this.formatFloat = function(s) { var i = parseFloat(s); return (isNaN(i)) ? 0 : i; }; this.formatInt = function(s) { var i = parseInt(s); return (isNaN(i)) ? 0 : i; }; this.isDigit = function(s, config) { var DECIMAL = '\\' + config.decimal; var exp = '/(^[+]?0(' + DECIMAL + '0+)?$)|(^([-+]?[1-9][0-9]*)$)|(^([-+]?((0?|[1-9][0-9]*)' + DECIMAL + '(0*[1-9][0-9]*)))$)|(^[-+]?[1-9]+[0-9]*' + DECIMAL + '0+$)/'; return RegExp(exp).test($.trim(s)); }; this.clearTableBody = function(table) { if ($.browser.msie) { function empty() { while (this.firstChild) this.removeChild(this.firstChild); } empty.apply(table.tBodies[0]); } else { table.tBodies[0].innerHTML = ""; } }; } }); $.fn.extend({ tablesorter: $.tablesorter.construct }); var ts = $.tablesorter; ts.addParser({ id: "text", is: function(s) { return true; }, format: function(s) { return $.trim(s.toLowerCase()); }, type: "text" }); ts.addParser({ id: "digit", is: function(s, table) { var c = table.config; return $.tablesorter.isDigit(s, c); }, format: function(s) { return $.tablesorter.formatFloat(s); }, type: "numeric" }); ts.addParser({ id: "currency", is: function(s) { return /^[£$€?.]/.test(s); }, format: function(s) { return $.tablesorter.formatFloat(s.replace(new RegExp(/[^0-9.]/g), "")); }, type: "numeric" }); ts.addParser({ id: "ipAddress", is: function(s) { return /^\d{2,3}[\.]\d{2,3}[\.]\d{2,3}[\.]\d{2,3}$/.test(s); }, format: function(s) { var a = s.split("."), r = "", l = a.length; for (var i = 0; i < l; i++) { var item = a[i]; if (item.length == 2) { r += "0" + item; } else { r += item; } } return $.tablesorter.formatFloat(r); }, type: "numeric" }); ts.addParser({ id: "url", is: function(s) { return /^(https?|ftp|file):\/\/$/.test(s); }, format: function(s) { return jQuery.trim(s.replace(new RegExp(/(https?|ftp|file):\/\//), '')); }, type: "text" }); ts.addParser({ id: "isoDate", is: function(s) { return /^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(s); }, format: function(s) { return $.tablesorter.formatFloat((s != "") ? new Date(s.replace(new RegExp(/-/g), "/")).getTime() : "0"); }, type: "numeric" }); ts.addParser({ id: "percent", is: function(s) { return /\%$/.test($.trim(s)); }, format: function(s) { return $.tablesorter.formatFloat(s.replace(new RegExp(/%/g), "")); }, type: "numeric" }); ts.addParser({ id: "usLongDate", is: function(s) { return s.match(new RegExp(/^[A-Za-z]{3,10}\.? [0-9]{1,2}, ([0-9]{4}|'?[0-9]{2}) (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(AM|PM)))$/)); }, format: function(s) { return $.tablesorter.formatFloat(new Date(s).getTime()); }, type: "numeric" }); ts.addParser({ id: "shortDate", is: function(s) { return /\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(s); }, format: function(s, table) { var c = table.config; s = s.replace(/\-/g, "/"); if (c.dateFormat == "us") { s = s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/, "$3/$1/$2"); } else if (c.dateFormat == "uk") { s = s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/, "$3/$2/$1"); } else if (c.dateFormat == "dd/mm/yy" || c.dateFormat == "dd-mm-yy") { s = s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/, "$1/$2/$3"); } return $.tablesorter.formatFloat(new Date(s).getTime()); }, type: "numeric" }); ts.addParser({ id: "time", is: function(s) { return /^(([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(am|pm)))$/.test(s); }, format: function(s) { return $.tablesorter.formatFloat(new Date("2000/01/01 " + s).getTime()); }, type: "numeric" }); ts.addParser({ id: "metadata", is: function(s) { return false; }, format: function(s, table, cell) { var c = table.config, p = (!c.parserMetadataName) ? 'sortValue' : c.parserMetadataName; return $(cell).metadata()[p]; }, type: "numeric" }); ts.addWidget({ id: "zebra", format: function(table) { if (table.config.debug) { var time = new Date(); } $("tr:visible", table.tBodies[0]).filter(':even').removeClass(table.config.widgetZebra.css[1]).addClass(table.config.widgetZebra.css[0]).end().filter(':odd').removeClass(table.config.widgetZebra.css[0]).addClass(table.config.widgetZebra.css[1]); if (table.config.debug) { $.tablesorter.benchmark("Applying Zebra widget", time); } } }); })(jQuery);
(function(a) { a.extend({ tablesorterPager: new function() { function j(l) { var k = a(l.cssPageDisplay, l.container).val("Page " + (l.page + 1) + l.seperator + l.totalPages) } function b(l, k) { var m = l.config; m.size = k; m.totalPages = Math.ceil(m.totalRows / m.size); m.pagerPositionSet = false; d(l); e(l) } function e(k) { var m = k.config; if (!m.pagerPositionSet && m.positionFixed) { var m = k.config, l = a(k); if (l.offset) { m.container.css({ top: l.offset().top + l.height() + "px", position: "absolute" }) } m.pagerPositionSet = true } } function f(k) { var l = k.config; l.page = 0; d(k) } function c(k) { var l = k.config; l.page = (l.totalPages - 1); d(k) } function i(k) { var l = k.config; l.page++; if (l.page >= (l.totalPages - 1)) { l.page = (l.totalPages - 1) } d(k) } function g(k) { var l = k.config; l.page--; if (l.page <= 0) { l.page = 0 } d(k) } function d(k) { var l = k.config; if (l.page < 0 || l.page > (l.totalPages - 1)) { l.page = 0 } h(k, l.rowsCopy) } function h(u, v) { var t = u.config; var n = v.length; var w = (t.page * t.size); var r = (w + t.size); if (r > v.length) { r = v.length } var m = a(u.tBodies[0]); a.tablesorter.clearTableBody(u); for (var q = w; q < r; q++) { var k = v[q]; var n = k.length; for (var p = 0; p < n; p++) { m[0].appendChild(k[p]) } } e(u, m); a(u).trigger("applyWidgets"); if (t.page >= t.totalPages) { c(u) } j(t) } this.appender = function(k, l) { var m = k.config; m.rowsCopy = l; m.totalRows = l.length; m.totalPages = Math.ceil(m.totalRows / m.size); h(k, l) }; this.defaults = { size: 10, offset: 0, page: 0, totalRows: 0, totalPages: 0, container: null, cssNext: ".next", cssPrev: ".prev", cssFirst: ".first", cssLast: ".last", cssPageDisplay: ".pagedisplay", cssPageSize: ".pagesize", seperator: "/", positionFixed: true, appender: this.appender }; this.construct = function(k) { return this.each(function() { config = a.extend(this.config, a.tablesorterPager.defaults, k); var m = this, l = config.container; a(this).trigger("appendCache"); config.size = parseInt(a(".pagesize", l).val()); a(config.cssFirst, l).click(function() { f(m); return false }); a(config.cssNext, l).click(function() { i(m); return false }); a(config.cssPrev, l).click(function() { g(m); return false }); a(config.cssLast, l).click(function() { c(m); return false }); a(config.cssPageSize, l).change(function() { b(m, parseInt(a(this).val())); return false }) }) } } }); a.fn.extend({ tablesorterPager: a.tablesorterPager.construct }) })(jQuery);
/*
* RSS Ticker - Written by Graham Wobcke
*/
this.rssTicker = function(a) { var newsitems; var curritem = 0; var tickduration = 3000; newsitems = $(a).hide().size(); headline_interval = setInterval(ticknews, tickduration); $(a + ":eq(" + curritem + ")").show(); $("#rsstick").hover(function(e) { clearInterval(headline_interval); $(a).css('cursor', 'default'); }, function() { headline_interval = setInterval(ticknews, tickduration); }); function ticknews() { $(a + ":eq(" + curritem + ")").hide(); curritem = ++curritem % newsitems; $(a + ":eq(" + curritem + ")").css('visibility', 'visible'); $(a + ":eq(" + curritem + ")").show(); } };
/*
* jQuery ui.core plugin v1.5 - http://docs.jquery.com/UI
*/
(function(c) { c.ui = { plugin: { add: function(e, f, h) { var g = c.ui[e].prototype; for (var d in h) { g.plugins[d] = g.plugins[d] || []; g.plugins[d].push([f, h[d]]) } }, call: function(d, f, e) { var h = d.plugins[f]; if (!h) { return } for (var g = 0; g < h.length; g++) { if (d.options[h[g][0]]) { h[g][1].apply(d.element, e) } } } }, cssCache: {}, css: function(d) { if (c.ui.cssCache[d]) { return c.ui.cssCache[d] } var f = c('<div class="ui-resizable-gen">').addClass(d).css({ position: "absolute", top: "-5000px", left: "-5000px", display: "block" }).appendTo("body"); c.ui.cssCache[d] = !!((!(/auto|default/).test(f.css("cursor")) || (/^[1-9]/).test(f.css("height")) || (/^[1-9]/).test(f.css("width")) || !(/none/).test(f.css("backgroundImage")) || !(/transparent|rgba\(0, 0, 0, 0\)/).test(f.css("backgroundColor")))); try { c("body").get(0).removeChild(f.get(0)) } catch (g) { } return c.ui.cssCache[d] }, disableSelection: function(d) { d.unselectable = "on"; d.onselectstart = function() { return false }; if (d.style) { d.style.MozUserSelect = "none" } }, enableSelection: function(d) { d.unselectable = "off"; d.onselectstart = function() { return true }; if (d.style) { d.style.MozUserSelect = "" } }, hasScroll: function(h, f) { var d = /top/.test(f || "top") ? "scrollTop" : "scrollLeft", g = false; if (h[d] > 0) { return true } h[d] = 1; g = h[d] > 0 ? true : false; h[d] = 0; return g } }; var b = c.fn.remove; c.fn.remove = function() { c("*", this).add(this).trigger("remove"); return b.apply(this, arguments) }; function a(e, f, g) { var d = c[e][f].getter || []; d = (typeof d == "string" ? d.split(/,?\s+/) : d); return (c.inArray(g, d) != -1) } c.widget = function(e, d) { var f = e.split(".")[0]; e = e.split(".")[1]; c.fn[e] = function(j) { var h = (typeof j == "string"), i = Array.prototype.slice.call(arguments, 1); if (h && a(f, e, j)) { var g = c.data(this[0], e); return (g ? g[j].apply(g, i) : undefined) } return this.each(function() { var k = c.data(this, e); if (h && k && c.isFunction(k[j])) { k[j].apply(k, i) } else { if (!h) { c.data(this, e, new c[f][e](this, j)) } } }) }; c[f][e] = function(i, h) { var g = this; this.widgetName = e; this.widgetBaseClass = f + "-" + e; this.options = c.extend({ disabled: false }, c[f][e].defaults, h); this.element = c(i).bind("setData." + e, function(l, j, k) { return g.setData(j, k) }).bind("getData." + e, function(k, j) { return g.getData(j) }).bind("remove", function() { return g.destroy() }); this.init() }; c[f][e].prototype = c.extend({}, c.widget.prototype, d) }; c.widget.prototype = { init: function() { }, destroy: function() { this.element.removeData(this.widgetName) }, getData: function(d) { return this.options[d] }, setData: function(d, e) { this.options[d] = e; if (d == "disabled") { this.element[e ? "addClass" : "removeClass"](this.widgetBaseClass + "-disabled") } }, enable: function() { this.setData("disabled", false) }, disable: function() { this.setData("disabled", true) } }; c.ui.mouse = { mouseInit: function() { var d = this; this.element.bind("mousedown." + this.widgetName, function(f) { return d.mouseDown(f) }); if (c.browser.msie) { this._mouseUnselectable = this.element.attr("unselectable"); this.element.attr("unselectable", "on") } this.started = false }, mouseDestroy: function() { this.element.unbind("." + this.widgetName); (c.browser.msie && this.element.attr("unselectable", this._mouseUnselectable)) }, mouseDown: function(g) { (this._mouseStarted && this.mouseUp(g)); this._mouseDownEvent = g; var f = this, h = (g.which == 1), d = (typeof this.options.cancel == "string" ? c(g.target).is(this.options.cancel) : false); if (!h || d || !this.mouseCapture(g)) { return true } this._mouseDelayMet = !this.options.delay; if (!this._mouseDelayMet) { this._mouseDelayTimer = setTimeout(function() { f._mouseDelayMet = true }, this.options.delay) } if (this.mouseDistanceMet(g) && this.mouseDelayMet(g)) { this._mouseStarted = (this.mouseStart(g) !== false); if (!this._mouseStarted) { g.preventDefault(); return true } } this._mouseMoveDelegate = function(i) { return f.mouseMove(i) }; this._mouseUpDelegate = function(i) { return f.mouseUp(i) }; c(document).bind("mousemove." + this.widgetName, this._mouseMoveDelegate).bind("mouseup." + this.widgetName, this._mouseUpDelegate); return false }, mouseMove: function(d) { if (c.browser.msie && !d.button) { return this.mouseUp(d) } if (this._mouseStarted) { this.mouseDrag(d); return false } if (this.mouseDistanceMet(d) && this.mouseDelayMet(d)) { this._mouseStarted = (this.mouseStart(this._mouseDownEvent, d) !== false); (this._mouseStarted ? this.mouseDrag(d) : this.mouseUp(d)) } return !this._mouseStarted }, mouseUp: function(d) { c(document).unbind("mousemove." + this.widgetName, this._mouseMoveDelegate).unbind("mouseup." + this.widgetName, this._mouseUpDelegate); if (this._mouseStarted) { this._mouseStarted = false; this.mouseStop(d) } return false }, mouseDistanceMet: function(d) { return (Math.max(Math.abs(this._mouseDownEvent.pageX - d.pageX), Math.abs(this._mouseDownEvent.pageY - d.pageY)) >= this.options.distance) }, mouseDelayMet: function(d) { return this._mouseDelayMet }, mouseStart: function(d) { }, mouseDrag: function(d) { }, mouseStop: function(d) { }, mouseCapture: function(d) { return true } }; c.ui.mouse.defaults = { cancel: null, distance: 1, delay: 0} })(jQuery);
/*
* Query Star Rating Plugin http://php.scripts.psu.edu/rja171/widgets/rating.php
*/
jQuery.fn.rating = function(c, l) { if (c == null) { return } var f = { url: c, increment: 1, maxvalue: 5, curvalue: 0 }; if (l) { jQuery.extend(f, l) } jQuery.extend(f, { cancel: (f.maxvalue > 1) ? true : false }); var d = jQuery(this); jQuery.extend(d, { averageRating: f.curvalue, url: f.url }); f.increment = (f.increment < 0.75) ? 0.5 : 1; var k = 0; for (var g = 0; g <= f.maxvalue; g++) { if (g == 0) { if (f.cancel == true) { var b = '<div class="cancel"><a href="#0" title="Cancel Rating">Cancel Rating</a></div>'; d.empty().append(b) } } else { var h = $('<div class="star"></div>').append('<a href="#' + g + '" title="Give it ' + g + "/" + f.maxvalue + '">' + g + "</a>").appendTo(d); if (f.increment == 0.5) { if (k % 2) { h.addClass("star-left") } else { h.addClass("star-right") } } } g = g - 1 + f.increment; k++ } var e = jQuery(d).children(".star"); var j = jQuery(d).children(".cancel"); e.mouseover(function() { a.drain(); a.fill(this) }).mouseout(function() { a.drain(); a.reset() }).focus(function() { a.drain(); a.fill(this) }).blur(function() { a.drain(); a.reset() }); e.click(function() { if (f.cancel == true) { f.curvalue = (e.index(this) * f.increment) + f.increment; jQuery.post(d.url, { rating: jQuery(this).children("a")[0].href.split("#")[1] }); return false } else { if (f.maxvalue == 1) { f.curvalue = (f.curvalue == 0) ? 1 : 0; $(this).toggleClass("on"); jQuery.post(d.url, { rating: jQuery(this).children("a")[0].href.split("#")[1] }); return false } } return true }); if (j) { j.mouseover(function() { a.drain(); jQuery(this).addClass("on") }).mouseout(function() { a.reset(); jQuery(this).removeClass("on") }).focus(function() { a.drain(); jQuery(this).addClass("on") }).blur(function() { a.reset(); jQuery(this).removeClass("on") }); j.click(function() { a.drain(); f.curvalue = 0; jQuery.post(d.url, { rating: jQuery(this).children("a")[0].href.split("#")[1] }); return false }) } var a = { fill: function(m) { var i = e.index(m) + 1; e.children("a").css("width", "100%").end().slice(0, i).addClass("hover").end() }, drain: function() { e.filter(".on").removeClass("on").end().filter(".hover").removeClass("hover").end() }, reset: function() { e.slice(0, f.curvalue / f.increment).addClass("on").end() } }; a.reset(); return (this) };
/*
* Countdown plugin v1.5.2 http://keith-wood.name/countdown.html
*/
(function(g) { function b() { this.regional = []; this.regional[""] = { labels: ["Years", "Months", "Weeks", "Days", "Hours", "Minutes", "Seconds"], labels1: ["Year", "Month", "Week", "Day", "Hour", "Minute", "Second"], compactLabels: ["y", "m", "w", "d"], timeSeparator: ":", isRTL: false }; this._defaults = { until: null, since: null, timezone: null, format: "dHMS", layout: "", compact: false, description: "", expiryUrl: "", expiryText: "", alwaysExpire: false, onExpiry: null, onTick: null }; g.extend(this._defaults, this.regional[""]) } var j = "countdown"; var c = 0; var h = 1; var d = 2; var a = 3; var k = 4; var i = 5; var f = 6; g.extend(b.prototype, { markerClassName: "hasCountdown", _timer: setInterval(function() { g.countdown._updateTargets() }, 980), _timerTargets: [], setDefaults: function(l) { this._resetExtraLabels(this._defaults, l); e(this._defaults, l || {}) }, UTCDate: function(n, r, p, s, t, m, o, l) { if (typeof r == "object" && r.constructor == Date) { l = r.getMilliseconds(); o = r.getSeconds(); m = r.getMinutes(); t = r.getHours(); s = r.getDate(); p = r.getMonth(); r = r.getFullYear() } var q = new Date(); q.setUTCFullYear(r); q.setUTCDate(1); q.setUTCMonth(p || 0); q.setUTCDate(s || 1); q.setUTCHours(t || 0); q.setUTCMinutes((m || 0) - (Math.abs(n) < 30 ? n * 60 : n)); q.setUTCSeconds(o || 0); q.setUTCMilliseconds(l || 0); return q }, _attachCountdown: function(o, m) { var l = g(o); if (l.hasClass(this.markerClassName)) { return } l.addClass(this.markerClassName); var n = { options: g.extend({}, m), _periods: [0, 0, 0, 0, 0, 0, 0] }; g.data(o, j, n); this._changeCountdown(o) }, _addTarget: function(l) { if (!this._hasTarget(l)) { this._timerTargets.push(l) } }, _hasTarget: function(l) { return (g.inArray(l, this._timerTargets) > -1) }, _removeTarget: function(l) { this._timerTargets = g.map(this._timerTargets, function(m) { return (m == l ? null : m) }) }, _updateTargets: function() { for (var l = 0; l < this._timerTargets.length; l++) { this._updateCountdown(this._timerTargets[l]) } }, _updateCountdown: function(q, o) { var m = g(q); o = o || g.data(q, j); if (!o) { return } m.html(this._generateHTML(o)); m[(this._get(o, "isRTL") ? "add" : "remove") + "Class"]("countdown_rtl"); var n = this._get(o, "onTick"); if (n) { n.apply(q, [o._hold != "lap" ? o._periods : this._calculatePeriods(o, o._show, new Date())]) } var r = o._hold != "pause" && (o._since ? o._now.getTime() <= o._since.getTime() : o._now.getTime() >= o._until.getTime()); if (r && !o._expiring) { o._expiring = true; if (this._hasTarget(q) || this._get(o, "alwaysExpire")) { this._removeTarget(q); var l = this._get(o, "onExpiry"); if (l) { l.apply(q, []) } var t = this._get(o, "expiryText"); if (t) { var p = this._get(o, "layout"); o.options.layout = t; this._updateCountdown(q, o); o.options.layout = p } var s = this._get(o, "expiryUrl"); if (s) { window.location = s } } o._expiring = false } else { if (o._hold == "pause") { this._removeTarget(q) } } g.data(q, j, o) }, _changeCountdown: function(q, n, p) { n = n || {}; if (typeof n == "string") { var m = n; n = {}; n[m] = p } var o = g.data(q, j); if (o) { this._resetExtraLabels(o.options, n); e(o.options, n); this._adjustSettings(o); g.data(q, j, o); var l = new Date(); if ((o._since && o._since < l) || (o._until && o._until > l)) { this._addTarget(q) } this._updateCountdown(q, o) } }, _resetExtraLabels: function(o, l) { var m = false; for (var p in l) { if (p.match(/[Ll]abels/)) { m = true; break } } if (m) { for (var p in o) { if (p.match(/[Ll]abels[0-9]/)) { o[p] = null } } } }, _destroyCountdown: function(m) { var l = g(m); if (!l.hasClass(this.markerClassName)) { return } this._removeTarget(m); l.removeClass(this.markerClassName).empty(); g.removeData(m, j) }, _pauseCountdown: function(l) { this._hold(l, "pause") }, _lapCountdown: function(l) { this._hold(l, "lap") }, _resumeCountdown: function(l) { this._hold(l, null) }, _hold: function(o, n) { var m = g.data(o, j); if (m) { if (m._hold == "pause" && !n) { m._periods = m._savePeriods; var l = (m._since ? "-" : "+"); m[m._since ? "_since" : "_until"] = this._determineTime(l + m._periods[0] + "y" + l + m._periods[1] + "o" + l + m._periods[2] + "w" + l + m._periods[3] + "d" + l + m._periods[4] + "h" + l + m._periods[5] + "m" + l + m._periods[6] + "s"); this._addTarget(o) } m._hold = n; m._savePeriods = (n == "pause" ? m._periods : null); g.data(o, j, m); this._updateCountdown(o, m) } }, _getTimesCountdown: function(m) { var l = g.data(m, j); return (!l ? null : (!l._hold ? l._periods : this._calculatePeriods(l, l._show, new Date()))) }, _get: function(m, l) { return (m.options[l] != null ? m.options[l] : g.countdown._defaults[l]) }, _adjustSettings: function(n) { var l = new Date(); var m = this._get(n, "timezone"); m = (m == null ? -new Date().getTimezoneOffset() : m); n._since = this._get(n, "since"); if (n._since) { n._since = this.UTCDate(m, this._determineTime(n._since, null)) } n._until = this.UTCDate(m, this._determineTime(this._get(n, "until"), l)); n._show = this._determineShow(n) }, _determineTime: function(o, l) { var n = function(r) { var q = new Date(); q.setTime(q.getTime() + r * 1000); return q }; var m = function(u) { u = u.toLowerCase(); var r = new Date(); var y = r.getFullYear(); var w = r.getMonth(); var z = r.getDate(); var t = r.getHours(); var s = r.getMinutes(); var q = r.getSeconds(); var x = /([+-]?[0-9]+)\s*(s|m|h|d|w|o|y)?/g; var v = x.exec(u); while (v) { switch (v[2] || "s") { case "s": q += parseInt(v[1], 10); break; case "m": s += parseInt(v[1], 10); break; case "h": t += parseInt(v[1], 10); break; case "d": z += parseInt(v[1], 10); break; case "w": z += parseInt(v[1], 10) * 7; break; case "o": w += parseInt(v[1], 10); z = Math.min(z, g.countdown._getDaysInMonth(y, w)); break; case "y": y += parseInt(v[1], 10); z = Math.min(z, g.countdown._getDaysInMonth(y, w)); break } v = x.exec(u) } return new Date(y, w, z, t, s, q, 0) }; var p = (o == null ? l : (typeof o == "string" ? m(o) : (typeof o == "number" ? n(o) : o))); if (p) { p.setMilliseconds(0) } return p }, _getDaysInMonth: function(l, m) { return 32 - new Date(l, m, 32).getDate() }, _generateHTML: function(n) { n._periods = periods = (n._hold ? n._periods : this._calculatePeriods(n, n._show, new Date())); var t = false; var l = 0; for (var r = 0; r < n._show.length; r++) { t |= (n._show[r] == "?" && periods[r] > 0); n._show[r] = (n._show[r] == "?" && !t ? null : n._show[r]); l += (n._show[r] ? 1 : 0) } var s = this._get(n, "compact"); var p = this._get(n, "layout"); var o = (s ? this._get(n, "compactLabels") : this._get(n, "labels")); var v = this._get(n, "timeSeparator"); var u = this._get(n, "description") || ""; var q = function(x) { var w = g.countdown._get(n, "compactLabels" + periods[x]); return (n._show[x] ? periods[x] + (w ? w[x] : o[x]) + " " : "") }; var m = function(x) { var w = g.countdown._get(n, "labels" + periods[x]); return (n._show[x] ? '<span class="countdown_section"><span class="countdown_amount">' + periods[x] + "</span><br/>" + (w ? w[x] : o[x]) + "</span>" : "") }; return (p ? this._buildLayout(n, p, s) : ((s ? '<span class="countdown_row countdown_amount' + (n._hold ? " countdown_holding" : "") + '">' + q(c) + q(h) + q(d) + q(a) + (n._show[k] ? this._twoDigits(periods[k]) : "") + (n._show[i] ? (n._show[k] ? v : "") + this._twoDigits(periods[i]) : "") + (n._show[f] ? (n._show[k] || n._show[i] ? v : "") + this._twoDigits(periods[f]) : "") : '<span class="countdown_row countdown_show' + l + (n._hold ? " countdown_holding" : "") + '">' + m(c) + m(h) + m(d) + m(a) + m(k) + m(i) + m(f)) + "</span>" + (u ? '<span class="countdown_row countdown_descr">' + u + "</span>" : ""))) }, _buildLayout: function(o, r, t) { var q = (t ? this._get(o, "compactLabels") : this._get(o, "labels")); var l = function(v) { return (g.countdown._get(o, (t ? "compactLabels" : "labels") + o._periods[v]) || q)[v] }; var m = { yl: l(c), yn: o._periods[c], ynn: this._twoDigits(o._periods[c]), ol: l(h), on: o._periods[h], onn: this._twoDigits(o._periods[h]), wl: l(d), wn: o._periods[d], wnn: this._twoDigits(o._periods[d]), dl: l(a), dn: o._periods[a], dnn: this._twoDigits(o._periods[a]), hl: l(k), hn: o._periods[k], hnn: this._twoDigits(o._periods[k]), ml: l(i), mn: o._periods[i], mnn: this._twoDigits(o._periods[i]), sl: l(f), sn: o._periods[f], snn: this._twoDigits(o._periods[f]) }; var p = r; for (var n = 0; n < 7; n++) { var s = "yowdhms".charAt(n); var u = new RegExp("\\{" + s + "<\\}(.*)\\{" + s + ">\\}", "g"); p = p.replace(u, (o._show[n] ? "$1" : "")) } g.each(m, function(y, w) { var x = new RegExp("\\{" + y + "\\}", "g"); p = p.replace(x, w) }); return p }, _twoDigits: function(l) { return (l < 10 ? "0" : "") + l }, _determineShow: function(m) { var n = this._get(m, "format"); var l = []; l[c] = (n.match("y") ? "?" : (n.match("Y") ? "!" : null)); l[h] = (n.match("o") ? "?" : (n.match("O") ? "!" : null)); l[d] = (n.match("w") ? "?" : (n.match("W") ? "!" : null)); l[a] = (n.match("d") ? "?" : (n.match("D") ? "!" : null)); l[k] = (n.match("h") ? "?" : (n.match("H") ? "!" : null)); l[i] = (n.match("m") ? "?" : (n.match("M") ? "!" : null)); l[f] = (n.match("s") ? "?" : (n.match("S") ? "!" : null)); return l }, _calculatePeriods: function(s, w, o) { s._now = o; s._now.setMilliseconds(0); var n = new Date(s._now.getTime()); if (s._since && o.getTime() < s._since.getTime()) { s._now = o = n } else { if (s._since) { o = s._since } else { n.setTime(s._until.getTime()); if (o.getTime() > s._until.getTime()) { s._now = o = n } } } var u = [0, 0, 0, 0, 0, 0, 0]; if (w[c] || w[h]) { var p = g.countdown._getDaysInMonth(o.getFullYear(), o.getMonth()); var l = g.countdown._getDaysInMonth(n.getFullYear(), n.getMonth()); var x = (n.getDate() == o.getDate() || (n.getDate() >= Math.min(p, l) && o.getDate() >= Math.min(p, l))); var t = function(y) { return (y.getHours() * 60 + y.getMinutes()) * 60 + y.getSeconds() }; var m = Math.max(0, (n.getFullYear() - o.getFullYear()) * 12 + n.getMonth() - o.getMonth() + ((n.getDate() < o.getDate() && !x) || (x && t(n) < t(o)) ? -1 : 0)); u[c] = (w[c] ? Math.floor(m / 12) : 0); u[h] = (w[h] ? m - u[c] * 12 : 0); var q = function(y, B, z) { var A = (y.getDate() == z); var C = g.countdown._getDaysInMonth(y.getFullYear() + B * u[c], y.getMonth() + B * u[h]); if (y.getDate() > C) { y.setDate(C) } y.setFullYear(y.getFullYear() + B * u[c]); y.setMonth(y.getMonth() + B * u[h]); if (A) { y.setDate(C) } return y }; if (s._since) { n = q(n, -1, l) } else { o = q(new Date(o.getTime()), +1, p) } } var v = Math.floor((n.getTime() - o.getTime()) / 1000); var r = function(z, y) { u[z] = (w[z] ? Math.floor(v / y) : 0); v -= u[z] * y }; r(d, 604800); r(a, 86400); r(k, 3600); r(i, 60); r(f, 1); return u } }); function e(n, m) { g.extend(n, m); for (var l in m) { if (m[l] == null) { n[l] = null } } return n } g.fn.countdown = function(m) { var l = Array.prototype.slice.call(arguments, 1); if (m == "getTimes") { return g.countdown["_" + m + "Countdown"].apply(g.countdown, [this[0]].concat(l)) } return this.each(function() { if (typeof m == "string") { g.countdown["_" + m + "Countdown"].apply(g.countdown, [this].concat(l)) } else { g.countdown._attachCountdown(this, m) } }) }; g.countdown = new b() })(jQuery);
/*
* jQuery Unsigned Currency Plugin http://plugins.jquery.com/project/currencyFormat
*/
(function(A) { A.fn.extend({ currency: function(B) { var C = { s: ",", d: ".", c: 2 }; C = A.extend({}, C, B); return this.each(function() { var D = (C.n || A(this).text()); D = (typeof D === "number") ? D : ((/\./.test(D)) ? parseFloat(D) : parseInt(D)), s = D < 0 ? "-" : "", i = parseInt(D = Math.abs(+D || 0).toFixed(C.c)) + "", j = (j = i.length) > 3 ? j % 3 : 0; A(this).text(s + (j ? i.substr(0, j) + C.s : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + C.s) + (C.c ? C.d + Math.abs(D - i).toFixed(C.c).slice(2) : "")); return this }) } }) })(jQuery); jQuery.currency = function() { var A = jQuery("<span>").text(arguments[0]).currency(arguments[1]); return A.text() };
/*
* http://cufon.shoqolate.com/generate/ v1.0.6
*/
var Cufon = (function() { var m = function() { return m.replace.apply(null, arguments) }; var x = m.DOM = { ready: (function() { var C = false, E = { loaded: 1, complete: 1 }; var B = [], D = function() { if (C) { return } C = true; for (var F; F = B.shift(); F()) { } }; if (document.addEventListener) { document.addEventListener("DOMContentLoaded", D, false); window.addEventListener("pageshow", D, false) } if (!window.opera && document.readyState) { (function() { E[document.readyState] ? D() : setTimeout(arguments.callee, 10) })() } if (document.readyState && document.createStyleSheet) { (function() { try { document.body.doScroll("left"); D() } catch (F) { setTimeout(arguments.callee, 1) } })() } q(window, "load", D); return function(F) { if (!arguments.length) { D() } else { C ? F() : B.push(F) } } })(), root: function() { return document.documentElement || document.body } }; var n = m.CSS = { Size: function(C, B) { this.value = parseFloat(C); this.unit = String(C).match(/[a-z%]*$/)[0] || "px"; this.convert = function(D) { return D / B * this.value }; this.convertFrom = function(D) { return D / this.value * B }; this.toString = function() { return this.value + this.unit } }, addClass: function(C, B) { var D = C.className; C.className = D + (D && " ") + B; return C }, color: j(function(C) { var B = {}; B.color = C.replace(/^rgba\((.*?),\s*([\d.]+)\)/, function(E, D, F) { B.opacity = parseFloat(F); return "rgb(" + D + ")" }); return B }), fontStretch: j(function(B) { if (typeof B == "number") { return B } if (/%$/.test(B)) { return parseFloat(B) / 100 } return { "ultra-condensed": 0.5, "extra-condensed": 0.625, condensed: 0.75, "semi-condensed": 0.875, "semi-expanded": 1.125, expanded: 1.25, "extra-expanded": 1.5, "ultra-expanded": 2}[B] || 1 }), getStyle: function(C) { var B = document.defaultView; if (B && B.getComputedStyle) { return new a(B.getComputedStyle(C, null)) } if (C.currentStyle) { return new a(C.currentStyle) } return new a(C.style) }, gradient: j(function(F) { var G = { id: F, type: F.match(/^-([a-z]+)-gradient\(/)[1], stops: [] }, C = F.substr(F.indexOf("(")).match(/([\d.]+=)?(#[a-f0-9]+|[a-z]+\(.*?\)|[a-z]+)/ig); for (var E = 0, B = C.length, D; E < B; ++E) { D = C[E].split("=", 2).reverse(); G.stops.push([D[1] || E / (B - 1), D[0]]) } return G }), quotedList: j(function(E) { var D = [], C = /\s*((["'])([\s\S]*?[^\\])\2|[^,]+)\s*/g, B; while (B = C.exec(E)) { D.push(B[3] || B[1]) } return D }), recognizesMedia: j(function(G) { var E = document.createElement("style"), D, C, B; E.type = "text/css"; E.media = G; try { E.appendChild(document.createTextNode("/**/")) } catch (F) { } C = g("head")[0]; C.insertBefore(E, C.firstChild); D = (E.sheet || E.styleSheet); B = D && !D.disabled; C.removeChild(E); return B }), removeClass: function(D, C) { var B = RegExp("(?:^|\\s+)" + C + "(?=\\s|$)", "g"); D.className = D.className.replace(B, ""); return D }, supports: function(D, C) { var B = document.createElement("span").style; if (B[D] === undefined) { return false } B[D] = C; return B[D] === C }, textAlign: function(E, D, B, C) { if (D.get("textAlign") == "right") { if (B > 0) { E = " " + E } } else { if (B < C - 1) { E += " " } } return E }, textShadow: j(function(F) { if (F == "none") { return null } var E = [], G = {}, B, C = 0; var D = /(#[a-f0-9]+|[a-z]+\(.*?\)|[a-z]+)|(-?[\d.]+[a-z%]*)|,/ig; while (B = D.exec(F)) { if (B[0] == ",") { E.push(G); G = {}; C = 0 } else { if (B[1]) { G.color = B[1] } else { G[["offX", "offY", "blur"][C++]] = B[2] } } } E.push(G); return E }), textTransform: (function() { var B = { uppercase: function(C) { return C.toUpperCase() }, lowercase: function(C) { return C.toLowerCase() }, capitalize: function(C) { return C.replace(/\b./g, function(D) { return D.toUpperCase() }) } }; return function(E, D) { var C = B[D.get("textTransform")]; return C ? C(E) : E } })(), whiteSpace: (function() { var D = { inline: 1, "inline-block": 1, "run-in": 1 }; var C = /^\s+/, B = /\s+$/; return function(H, F, G, E) { if (E) { if (E.nodeName.toLowerCase() == "br") { H = H.replace(C, "") } } if (D[F.get("display")]) { return H } if (!G.previousSibling) { H = H.replace(C, "") } if (!G.nextSibling) { H = H.replace(B, "") } return H } })() }; n.ready = (function() { var B = !n.recognizesMedia("all"), E = false; var D = [], H = function() { B = true; for (var K; K = D.shift(); K()) { } }; var I = g("link"), J = g("style"); function C(K) { return K.disabled || G(K.sheet, K.media || "screen") } function G(M, P) { if (!n.recognizesMedia(P || "all")) { return true } if (!M || M.disabled) { return false } try { var Q = M.cssRules, O; if (Q) { search: for (var L = 0, K = Q.length; O = Q[L], L < K; ++L) { switch (O.type) { case 2: break; case 3: if (!G(O.styleSheet, O.media.mediaText)) { return false } break; default: break search } } } } catch (N) { } return true } function F() { if (document.createStyleSheet) { return true } var L, K; for (K = 0; L = I[K]; ++K) { if (L.rel.toLowerCase() == "stylesheet" && !C(L)) { return false } } for (K = 0; L = J[K]; ++K) { if (!C(L)) { return false } } return true } x.ready(function() { if (!E) { E = n.getStyle(document.body).isUsable() } if (B || (E && F())) { H() } else { setTimeout(arguments.callee, 10) } }); return function(K) { if (B) { K() } else { D.push(K) } } })(); function s(D) { var C = this.face = D.face, B = { "\u0020": 1, "\u00a0": 1, "\u3000": 1 }; this.glyphs = D.glyphs; this.w = D.w; this.baseSize = parseInt(C["units-per-em"], 10); this.family = C["font-family"].toLowerCase(); this.weight = C["font-weight"]; this.style = C["font-style"] || "normal"; this.viewBox = (function() { var F = C.bbox.split(/\s+/); var E = { minX: parseInt(F[0], 10), minY: parseInt(F[1], 10), maxX: parseInt(F[2], 10), maxY: parseInt(F[3], 10) }; E.width = E.maxX - E.minX; E.height = E.maxY - E.minY; E.toString = function() { return [this.minX, this.minY, this.width, this.height].join(" ") }; return E })(); this.ascent = -parseInt(C.ascent, 10); this.descent = -parseInt(C.descent, 10); this.height = -this.ascent + this.descent; this.spacing = function(L, N, E) { var O = this.glyphs, M, K, G, P = [], F = 0, J = -1, I = -1, H; while (H = L[++J]) { M = O[H] || this.missingGlyph; if (!M) { continue } if (K) { F -= G = K[H] || 0; P[I - 1] -= G } F += P[++I] = ~ ~(M.w || this.w) + N + (B[H] ? E : 0); K = M.k } P.total = F; return P } } function f() { var C = {}, B = { oblique: "italic", italic: "oblique" }; this.add = function(D) { (C[D.style] || (C[D.style] = {}))[D.weight] = D }; this.get = function(H, I) { var G = C[H] || C[B[H]] || C.normal || C.italic || C.oblique; if (!G) { return null } I = { normal: 400, bold: 700}[I] || parseInt(I, 10); if (G[I]) { return G[I] } var E = { 1: 1, 99: 0}[I % 100], K = [], F, D; if (E === undefined) { E = I > 400 } if (I == 500) { I = 400 } for (var J in G) { if (!k(G, J)) { continue } J = parseInt(J, 10); if (!F || J < F) { F = J } if (!D || J > D) { D = J } K.push(J) } if (I < F) { I = F } if (I > D) { I = D } K.sort(function(M, L) { return (E ? (M >= I && L >= I) ? M < L : M > L : (M <= I && L <= I) ? M > L : M < L) ? -1 : 1 }); return G[K[0]] } } function r() { function D(F, G) { if (F.contains) { return F.contains(G) } return F.compareDocumentPosition(G) & 16 } function B(G) { var F = G.relatedTarget; if (!F || D(this, F)) { return } C(this, G.type == "mouseover") } function E(F) { C(this, F.type == "mouseenter") } function C(F, G) { setTimeout(function() { var H = d.get(F).options; m.replace(F, G ? h(H, H.hover) : H, true) }, 10) } this.attach = function(F) { if (F.onmouseenter === undefined) { q(F, "mouseover", B); q(F, "mouseout", B) } else { q(F, "mouseenter", E); q(F, "mouseleave", E) } } } function u() { var C = [], D = {}; function B(H) { var E = [], G; for (var F = 0; G = H[F]; ++F) { E[F] = C[D[G]] } return E } this.add = function(F, E) { D[F] = C.push(E) - 1 }; this.repeat = function() { var E = arguments.length ? B(arguments) : C, F; for (var G = 0; F = E[G++]; ) { m.replace(F[0], F[1], true) } } } function A() { var D = {}, B = 0; function C(E) { return E.cufid || (E.cufid = ++B) } this.get = function(E) { var F = C(E); return D[F] || (D[F] = {}) } } function a(B) { var D = {}, C = {}; this.extend = function(E) { for (var F in E) { if (k(E, F)) { D[F] = E[F] } } return this }; this.get = function(E) { return D[E] != undefined ? D[E] : B[E] }; this.getSize = function(F, E) { return C[F] || (C[F] = new n.Size(this.get(F), E)) }; this.isUsable = function() { return !!B } } function q(C, B, D) { if (C.addEventListener) { C.addEventListener(B, D, false) } else { if (C.attachEvent) { C.attachEvent("on" + B, function() { return D.call(C, window.event) }) } } } function v(C, B) { var D = d.get(C); if (D.options) { return C } if (B.hover && B.hoverables[C.nodeName.toLowerCase()]) { b.attach(C) } D.options = B; return C } function j(B) { var C = {}; return function(D) { if (!k(C, D)) { C[D] = B.apply(null, arguments) } return C[D] } } function c(F, E) { var B = n.quotedList(E.get("fontFamily").toLowerCase()), D; for (var C = 0; D = B[C]; ++C) { if (i[D]) { return i[D].get(E.get("fontStyle"), E.get("fontWeight")) } } return null } function g(B) { return document.getElementsByTagName(B) } function k(C, B) { return C.hasOwnProperty(B) } function h() { var C = {}, B, F; for (var E = 0, D = arguments.length; B = arguments[E], E < D; ++E) { for (F in B) { if (k(B, F)) { C[F] = B[F] } } } return C } function o(E, M, C, N, F, D) { var K = document.createDocumentFragment(), H; if (M === "") { return K } var L = N.separate; var I = M.split(p[L]), B = (L == "words"); if (B && t) { if (/^\s/.test(M)) { I.unshift("") } if (/\s$/.test(M)) { I.push("") } } for (var J = 0, G = I.length; J < G; ++J) { H = z[N.engine](E, B ? n.textAlign(I[J], C, J, G) : I[J], C, N, F, D, J < G - 1); if (H) { K.appendChild(H) } } return K } function l(D, M) { var C = D.nodeName.toLowerCase(); if (M.ignore[C]) { return } var E = !M.textless[C]; var B = n.getStyle(v(D, M)).extend(M); var F = c(D, B), G, K, I, H, L, J; if (!F) { return } for (G = D.firstChild; G; G = I) { K = G.nodeType; I = G.nextSibling; if (E && K == 3) { if (H) { H.appendData(G.data); D.removeChild(G) } else { H = G } if (I) { continue } } if (H) { D.replaceChild(o(F, n.whiteSpace(H.data, B, H, J), B, M, G, D), H); H = null } if (K == 1) { if (G.firstChild) { if (G.nodeName.toLowerCase() == "cufon") { z[M.engine](F, null, B, M, G, D) } else { arguments.callee(G, M) } } J = G } } } var t = " ".split(/\s+/).length == 0; var d = new A(); var b = new r(); var y = new u(); var e = false; var z = {}, i = {}, w = { autoDetect: false, engine: null, forceHitArea: false, hover: false, hoverables: { a: true }, ignore: { applet: 1, canvas: 1, col: 1, colgroup: 1, head: 1, iframe: 1, map: 1, optgroup: 1, option: 1, script: 1, select: 1, style: 1, textarea: 1, title: 1, pre: 1 }, printable: true, selector: (window.Sizzle || (window.jQuery && function(B) { return jQuery(B) }) || (window.dojo && dojo.query) || (window.Ext && Ext.query) || (window.YAHOO && YAHOO.util && YAHOO.util.Selector && YAHOO.util.Selector.query) || (window.$$ && function(B) { return $$(B) }) || (window.$ && function(B) { return $(B) }) || (document.querySelectorAll && function(B) { return document.querySelectorAll(B) }) || g), separate: "words", textless: { dl: 1, html: 1, ol: 1, table: 1, tbody: 1, thead: 1, tfoot: 1, tr: 1, ul: 1 }, textShadow: "none" }; var p = { words: /\s/.test("\u00a0") ? /[^\S\u00a0]+/ : /\s+/, characters: "", none: /^/ }; m.now = function() { x.ready(); return m }; m.refresh = function() { y.repeat.apply(y, arguments); return m }; m.registerEngine = function(C, B) { if (!B) { return m } z[C] = B; return m.set("engine", C) }; m.registerFont = function(D) { if (!D) { return m } var B = new s(D), C = B.family; if (!i[C]) { i[C] = new f() } i[C].add(B); return m.set("fontFamily", '"' + C + '"') }; m.replace = function(D, C, B) { C = h(w, C); if (!C.engine) { return m } if (!e) { n.addClass(x.root(), "cufon-active cufon-loading"); n.ready(function() { n.addClass(n.removeClass(x.root(), "cufon-loading"), "cufon-ready") }); e = true } if (C.hover) { C.forceHitArea = true } if (C.autoDetect) { delete C.fontFamily } if (typeof C.textShadow == "string") { C.textShadow = n.textShadow(C.textShadow) } if (typeof C.color == "string" && /^-/.test(C.color)) { C.textGradient = n.gradient(C.color) } else { delete C.textGradient } if (!B) { y.add(D, arguments) } if (D.nodeType || typeof D == "string") { D = [D] } n.ready(function() { for (var F = 0, E = D.length; F < E; ++F) { var G = D[F]; if (typeof G == "string") { m.replace(C.selector(G), C, true) } else { l(G, C) } } }); return m }; m.set = function(B, C) { w[B] = C; return m }; return m })(); Cufon.registerEngine("canvas", (function() { var b = document.createElement("canvas"); if (!b || !b.getContext || !b.getContext.apply) { return } b = null; var a = Cufon.CSS.supports("display", "inline-block"); var e = !a && (document.compatMode == "BackCompat" || /frameset|transitional/i.test(document.doctype.publicId)); var f = document.createElement("style"); f.type = "text/css"; f.appendChild(document.createTextNode(("cufon{text-indent:0;}@media screen,projection{cufon{display:inline;display:inline-block;position:relative;vertical-align:middle;" + (e ? "" : "font-size:1px;line-height:1px;") + "}cufon cufontext{display:-moz-inline-box;display:inline-block;width:0;height:0;overflow:hidden;text-indent:-10000in;}" + (a ? "cufon canvas{position:relative;}" : "cufon canvas{position:absolute;}") + "}@media print{cufon{padding:0;}cufon canvas{display:none;}}").replace(/;/g, "!important;"))); document.getElementsByTagName("head")[0].appendChild(f); function d(p, h) { var n = 0, m = 0; var g = [], o = /([mrvxe])([^a-z]*)/g, k; generate: for (var j = 0; k = o.exec(p); ++j) { var l = k[2].split(","); switch (k[1]) { case "v": g[j] = { m: "bezierCurveTo", a: [n + ~ ~l[0], m + ~ ~l[1], n + ~ ~l[2], m + ~ ~l[3], n += ~ ~l[4], m += ~ ~l[5]] }; break; case "r": g[j] = { m: "lineTo", a: [n += ~ ~l[0], m += ~ ~l[1]] }; break; case "m": g[j] = { m: "moveTo", a: [n = ~ ~l[0], m = ~ ~l[1]] }; break; case "x": g[j] = { m: "closePath" }; break; case "e": break generate } h[g[j].m].apply(h, g[j].a) } return g } function c(m, k) { for (var j = 0, h = m.length; j < h; ++j) { var g = m[j]; k[g.m].apply(k, g.a) } } return function(V, w, P, t, C, W) { var k = (w === null); if (k) { w = C.alt } var A = V.viewBox; var m = P.getSize("fontSize", V.baseSize); var B = 0, O = 0, N = 0, u = 0; var z = t.textShadow, L = []; if (z) { for (var U = z.length; U--; ) { var F = z[U]; var K = m.convertFrom(parseFloat(F.offX)); var I = m.convertFrom(parseFloat(F.offY)); L[U] = [K, I]; if (I < B) { B = I } if (K > O) { O = K } if (I > N) { N = I } if (K < u) { u = K } } } var Z = Cufon.CSS.textTransform(w, P).split(""); var E = V.spacing(Z, ~ ~m.convertFrom(parseFloat(P.get("letterSpacing")) || 0), ~ ~m.convertFrom(parseFloat(P.get("wordSpacing")) || 0)); if (!E.length) { return null } var h = E.total; O += A.width - E[E.length - 1]; u += A.minX; var s, n; if (k) { s = C; n = C.firstChild } else { s = document.createElement("cufon"); s.className = "cufon cufon-canvas"; s.alt = w; n = document.createElement("canvas"); s.appendChild(n); if (t.printable) { var S = document.createElement("cufontext"); S.appendChild(document.createTextNode(w)); s.appendChild(S) } } var aa = s.style; var H = n.style; var j = m.convert(A.height); var Y = Math.ceil(j); var M = Y / j; var G = M * Cufon.CSS.fontStretch(P.get("fontStretch")); var J = h * G; var Q = Math.ceil(m.convert(J + O - u)); var o = Math.ceil(m.convert(A.height - B + N)); n.width = Q; n.height = o; H.width = Q + "px"; H.height = o + "px"; B += A.minY; H.top = Math.round(m.convert(B - V.ascent)) + "px"; H.left = Math.round(m.convert(u)) + "px"; var r = Math.max(Math.ceil(m.convert(J)), 0) + "px"; if (a) { aa.width = r; aa.height = m.convert(V.height) + "px" } else { aa.paddingLeft = r; aa.paddingBottom = (m.convert(V.height) - 1) + "px" } var X = n.getContext("2d"), D = j / A.height; X.scale(D, D * M); X.translate(-u, -B); X.save(); function T() { var x = V.glyphs, ab, l = -1, g = -1, y; X.scale(G, 1); while (y = Z[++l]) { var ab = x[Z[l]] || V.missingGlyph; if (!ab) { continue } if (ab.d) { X.beginPath(); if (ab.code) { c(ab.code, X) } else { ab.code = d("m" + ab.d, X) } X.fill() } X.translate(E[++g], 0) } X.restore() } if (z) { for (var U = z.length; U--; ) { var F = z[U]; X.save(); X.fillStyle = F.color; X.translate.apply(X, L[U]); T() } } var q = t.textGradient; if (q) { var v = q.stops, p = X.createLinearGradient(0, A.minY, 0, A.maxY); for (var U = 0, R = v.length; U < R; ++U) { p.addColorStop.apply(p, v[U]) } X.fillStyle = p } else { X.fillStyle = P.get("color") } T(); return s } })()); Cufon.registerEngine("vml", (function() { var e = document.namespaces; if (!e) { return } e.add("cvml", "urn:schemas-microsoft-com:vml"); e = null; var b = document.createElement("cvml:shape"); b.style.behavior = "url(#default#VML)"; if (!b.coordsize) { return } b = null; var h = (document.documentMode || 0) < 8; document.write(('<style type="text/css">cufoncanvas{text-indent:0;}@media screen{cvml\\:shape,cvml\\:rect,cvml\\:fill,cvml\\:shadow{behavior:url(#default#VML);display:block;antialias:true;position:absolute;}cufoncanvas{position:absolute;text-align:left;}cufon{display:inline-block;position:relative;vertical-align:' + (h ? "middle" : "text-bottom") + ";}cufon cufontext{position:absolute;left:-10000in;font-size:1px;}a cufon{cursor:pointer}}@media print{cufon cufoncanvas{display:none;}}</style>").replace(/;/g, "!important;")); function c(i, j) { return a(i, /(?:em|ex|%)$|^[a-z-]+$/i.test(j) ? "1em" : j) } function a(l, m) { if (m === "0") { return 0 } if (/px$/i.test(m)) { return parseFloat(m) } var k = l.style.left, j = l.runtimeStyle.left; l.runtimeStyle.left = l.currentStyle.left; l.style.left = m.replace("%", "em"); var i = l.style.pixelLeft; l.style.left = k; l.runtimeStyle.left = j; return i } function f(l, k, j, n) { var i = "computed" + n, m = k[i]; if (isNaN(m)) { m = k.get(n); k[i] = m = (m == "normal") ? 0 : ~ ~j.convertFrom(a(l, m)) } return m } var g = {}; function d(p) { var q = p.id; if (!g[q]) { var n = p.stops, o = document.createElement("cvml:fill"), i = []; o.type = "gradient"; o.angle = 180; o.focus = "0"; o.method = "sigma"; o.color = n[0][1]; for (var m = 1, l = n.length - 1; m < l; ++m) { i.push(n[m][0] * 100 + "% " + n[m][1]) } o.colors = i.join(","); o.color2 = n[l][1]; g[q] = o } return g[q] } return function(ac, G, Y, C, K, ad, W) { var n = (G === null); if (n) { G = K.alt } var I = ac.viewBox; var p = Y.computedFontSize || (Y.computedFontSize = new Cufon.CSS.Size(c(ad, Y.get("fontSize")) + "px", ac.baseSize)); var y, q; if (n) { y = K; q = K.firstChild } else { y = document.createElement("cufon"); y.className = "cufon cufon-vml"; y.alt = G; q = document.createElement("cufoncanvas"); y.appendChild(q); if (C.printable) { var Z = document.createElement("cufontext"); Z.appendChild(document.createTextNode(G)); y.appendChild(Z) } if (!W) { y.appendChild(document.createElement("cvml:shape")) } } var ai = y.style; var R = q.style; var l = p.convert(I.height), af = Math.ceil(l); var V = af / l; var P = V * Cufon.CSS.fontStretch(Y.get("fontStretch")); var U = I.minX, T = I.minY; R.height = af; R.top = Math.round(p.convert(T - ac.ascent)); R.left = Math.round(p.convert(U)); ai.height = p.convert(ac.height) + "px"; var F = Y.get("color"); var ag = Cufon.CSS.textTransform(G, Y).split(""); var L = ac.spacing(ag, f(ad, Y, p, "letterSpacing"), f(ad, Y, p, "wordSpacing")); if (!L.length) { return null } var k = L.total; var x = -U + k + (I.width - L[L.length - 1]); var ah = p.convert(x * P), X = Math.round(ah); var O = x + "," + I.height, m; var J = "r" + O + "ns"; var u = C.textGradient && d(C.textGradient); var o = ac.glyphs, S = 0; var H = C.textShadow; var ab = -1, aa = 0, w; while (w = ag[++ab]) { var D = o[ag[ab]] || ac.missingGlyph, v; if (!D) { continue } if (n) { v = q.childNodes[aa]; while (v.firstChild) { v.removeChild(v.firstChild) } } else { v = document.createElement("cvml:shape"); q.appendChild(v) } v.stroked = "f"; v.coordsize = O; v.coordorigin = m = (U - S) + "," + T; v.path = (D.d ? "m" + D.d + "xe" : "") + "m" + m + J; v.fillcolor = F; if (u) { v.appendChild(u.cloneNode(false)) } var ae = v.style; ae.width = X; ae.height = af; if (H) { var s = H[0], r = H[1]; var B = Cufon.CSS.color(s.color), z; var N = document.createElement("cvml:shadow"); N.on = "t"; N.color = B.color; N.offset = s.offX + "," + s.offY; if (r) { z = Cufon.CSS.color(r.color); N.type = "double"; N.color2 = z.color; N.offset2 = r.offX + "," + r.offY } N.opacity = B.opacity || (z && z.opacity) || 1; v.appendChild(N) } S += L[aa++] } var M = v.nextSibling, t, A; if (C.forceHitArea) { if (!M) { M = document.createElement("cvml:rect"); M.stroked = "f"; M.className = "cufon-vml-cover"; t = document.createElement("cvml:fill"); t.opacity = 0; M.appendChild(t); q.appendChild(M) } A = M.style; A.width = X; A.height = af } else { if (M) { q.removeChild(M) } } ai.width = Math.max(Math.ceil(p.convert(k * P)), 0); if (h) { var Q = Y.computedYAdjust; if (Q === undefined) { var E = Y.get("lineHeight"); if (E == "normal") { E = "1em" } else { if (!isNaN(E)) { E += "em" } } Y.computedYAdjust = Q = 0.5 * (a(ad, E) - parseFloat(ai.height)) } if (Q) { ai.marginTop = Math.ceil(Q) + "px"; ai.marginBottom = Q + "px" } } return y } })());

/*
* GalleryView v1.1 - http://www.spaceforaname.com/jquery/galleryview/
*/
(function(a) { a.fn.galleryView = function(d) { var o = a.extend(a.fn.galleryView.defaults, d); var s; var r = 0; var i; var u; var k = 10; var f; var B; var n = 0; var D; var v; var A = false; var z = 20; var p = 5; var e = 2; var C; var w; var y; var l; var q; function j(E) { a("img.nav-next").unbind("click"); a("img.nav-prev").unbind("click"); y.unbind("click"); if (has_panels) { if (o.fade_panels) { l.fadeOut(o.transition_speed).eq(E % n).fadeIn(o.transition_speed, function() { if (!has_filmstrip) { a("img.nav-prev").click(c); a("img.nav-next").click(t) } }) } } if (has_filmstrip) { if (D == "strip") { w.stop(); var H = x(y[E]).left - (x(q[0]).left + 2); var F = (H >= 0 ? "-=" : "+=") + Math.abs(H) + "px"; w.animate({ left: F }, o.transition_speed, o.easing, function() { if (E > n) { E = E % n; r = E; w.css("left", "-" + ((o.frame_width + k) * E) + "px") } else { if (E <= (n - strip_size)) { E = (E % n) + n; r = E; w.css("left", "-" + ((o.frame_width + k) * E) + "px") } } if (!o.fade_panels) { l.hide().eq(E % n).show() } a("img.nav-prev").click(c); a("img.nav-next").click(t); m() }) } else { if (D == "pointer") { q.stop(); var G = x(y[E]); q.animate({ left: (G.left - 2 + "px") }, o.transition_speed, o.easing, function() { if (!o.fade_panels) { l.hide().eq(E % n).show() } a("img.nav-prev").click(c); a("img.nav-next").click(t); m() }) } } if (a("a", y[E])[0]) { q.unbind("click").click(function() { var I = a("a", y[E]).eq(0); if (I.attr("target") == "_blank") { window.open(I.attr("href")) } else { location.href = I.attr("href") } }) } } } function t() { a(document).stopTime("transition"); if (++r == y.length) { r = 0 } j(r); a(document).everyTime(o.transition_interval, "transition", function() { t() }) } function c() { a(document).stopTime("transition"); if (--r < 0) { r = n - 1 } j(r); a(document).everyTime(o.transition_interval, "transition", function() { t() }) } function x(H) { var K = 0, J = 0; var E = H.id; if (H.offsetParent) { do { K += H.offsetLeft; J += H.offsetTop } while (H = H.offsetParent) } if (E == s) { return { left: K, top: J} } else { var G = x(C[0]); var I = G.left; var F = G.top; return { left: K - I, top: J - F} } } function m() { y.each(function(E) { if (a("a", this).length == 0) { a(this).click(function() { a(document).stopTime("transition"); j(E); r = E; a(document).everyTime(o.transition_interval, "transition", function() { t() }) }) } }) } function h() { if (a(".panel-overlay").length > 0) { l.append('<div class="overlay"></div>') } if (!has_filmstrip) { a("<img />").addClass("nav-next").attr("src", v + o.nav_theme + "/next.gif").appendTo(C).css({ position: "absolute", zIndex: "210", cursor: "pointer", top: ((o.panel_height - 22) / 2) + "px", right: "10px", display: "none" }).click(t); a("<img />").addClass("nav-prev").attr("src", v + o.nav_theme + "/prev.gif").appendTo(C).css({ position: "absolute", zIndex: "210", cursor: "pointer", top: ((o.panel_height - 22) / 2) + "px", left: "10px", display: "none" }).click(c); a("<img />").addClass("nav-overlay").attr("src", v + o.nav_theme + "/panel-nav-next.gif").appendTo(C).css({ position: "absolute", zIndex: "209", top: ((o.panel_height - 22) / 2) - 10 + "px", right: "0", display: "none" }); a("<img />").addClass("nav-overlay").attr("src", v + o.nav_theme + "/panel-nav-prev.gif").appendTo(C).css({ position: "absolute", zIndex: "209", top: ((o.panel_height - 22) / 2) - 10 + "px", left: "0", display: "none" }) } l.css({ width: (o.panel_width - parseInt(l.css("paddingLeft").split("px")[0], 10) - parseInt(l.css("paddingRight").split("px")[0], 10)) + "px", height: (o.panel_height - parseInt(l.css("paddingTop").split("px")[0], 10) - parseInt(l.css("paddingBottom").split("px")[0], 10)) + "px", position: "absolute", top: (o.filmstrip_position == "top" ? (o.frame_height + p + (o.show_captions ? z : p)) + "px" : "0px"), left: "0px", overflow: "hidden", background: "white", display: "none" }); a(".panel-overlay", l).css({ position: "absolute", zIndex: "199", width: (o.panel_width - 20) + "px", height: o.overlay_height + "px", top: (o.overlay_position == "top" ? "0" : o.panel_height - o.overlay_height + "px"), left: "0", padding: "0 10px", color: o.overlay_text_color, fontSize: o.overlay_font_size }); a(".panel-overlay a", l).css({ color: o.overlay_text_color, textDecoration: "underline", fontWeight: "bold" }); a(".overlay", l).css({ position: "absolute", zIndex: "198", width: o.panel_width + "px", height: o.overlay_height + "px", top: (o.overlay_position == "top" ? "0" : o.panel_height - o.overlay_height + "px"), left: "0", background: o.overlay_color, opacity: o.overlay_opacity }); a(".panel iframe", l).css({ width: o.panel_width + "px", height: (o.panel_height - o.overlay_height) + "px", border: "0" }) } function g() { w.wrap('<div class="strip_wrapper"></div>'); if (D == "strip") { y.clone().appendTo(w); y.clone().appendTo(w); y = a("li", w) } if (o.show_captions) { y.append('<div class="caption"></div>').each(function(G) { a(this).find(".caption").html(a(this).find("img").attr("title")) }) } w.css({ listStyle: "none", margin: "0", padding: "0", width: f + "px", position: "absolute", zIndex: "190", top: "0", left: "0", height: (o.frame_height + 10) + "px", background: o.background_color }); y.css({ "float": "left", position: "relative", height: o.frame_height + "px", zIndex: "191", marginTop: p + "px", marginBottom: "0px", marginRight: k + "px", padding: "0", cursor: "pointer" }); a("img", y).css({ border: "none" }); a(".strip_wrapper", C).css({ position: "absolute", top: (o.filmstrip_position == "top" ? "0px" : o.panel_height + "px"), left: ((i - B) / 2) + "px", width: B + "px", height: (o.frame_height + p + (o.show_captions ? z : p)) + "px", overflow: "hidden" }); a(".caption", C).css({ position: "absolute", top: o.frame_height + "px", left: "0", margin: "0", width: o.frame_width + "px", padding: "0", color: o.caption_text_color, textAlign: "center", fontSize: "10px", height: z + "px", lineHeight: z + "px" }); var F = a("<div></div>"); F.attr("id", "pointer").appendTo(C).css({ position: "absolute", zIndex: "200", cursor: "pointer", top: x(y[0]).top - (e / 2) + "px", left: x(y[0]).left - (e / 2) + "px", height: o.frame_height - e + "px", width: o.frame_width - e + "px", border: (has_panels ? e + "px solid " + (o.nav_theme == "dark" ? "black" : "white") : "none") }); q = a("#pointer", C); if (has_panels) { var E = a("<img />"); E.attr("src", v + o.nav_theme + "/pointer" + (o.filmstrip_position == "top" ? "-down" : "") + ".gif").appendTo(a("#pointer")).css({ position: "absolute", zIndex: "201", top: (o.filmstrip_position == "bottom" ? "-" + (10 + e) + "px" : o.frame_height + "px"), left: ((o.frame_width / 2) - 10) + "px" }) } if (D == "strip") { w.css("left", "-" + ((o.frame_width + k) * n) + "px"); r = n } if (a("a", y[r])[0]) { q.click(function() { var G = a("a", y[r]).eq(0); if (G.attr("target") == "_blank") { window.open(G.attr("href")) } else { location.href = G.attr("href") } }) } a("<img />").addClass("nav-next").attr("src", v + o.nav_theme + "/next.gif").appendTo(C).css({ position: "absolute", cursor: "pointer", top: (o.filmstrip_position == "top" ? 0 : o.panel_height) + p + ((o.frame_height - 22) / 2) + "px", right: (i / 2) - (B / 2) - 10 - 22 + "px" }).click(t); a("<img />").addClass("nav-prev").attr("src", v + o.nav_theme + "/prev.gif").appendTo(C).css({ position: "absolute", cursor: "pointer", top: (o.filmstrip_position == "top" ? 0 : o.panel_height) + p + ((o.frame_height - 22) / 2) + "px", left: (i / 2) - (B / 2) - 10 - 22 + "px" }).click(c) } function b(E, I) { var H = x(C[0]); var G = H.top; var F = H.left; return E > F && E < F + o.panel_width && I > G && I < G + o.panel_height } return this.each(function() { C = a(this); a("script").each(function(E) { var F = a(this); var G = (("https:" == document.location.protocol) ? "https://cdn." : "http://cdn."); v = G + "casinorewards.com/js/jgallery/themes/" }); C.css("visibility", "hidden"); w = a(".filmstrip", C); y = a("li", w); l = a(".panel", C); s = C.attr("id"); has_panels = l.length > 0; has_filmstrip = y.length > 0; if (!has_panels) { o.panel_height = 0 } n = has_panels ? l.length : y.length; strip_size = has_panels ? Math.floor((o.panel_width - 64) / (o.frame_width + k)) : Math.min(n, o.filmstrip_size); if (strip_size >= n) { D = "pointer"; strip_size = n } else { D = "strip" } i = has_panels ? o.panel_width : (strip_size * (o.frame_width + k)) - k + 64; u = (has_panels ? o.panel_height : 0) + (has_filmstrip ? o.frame_height + p + (o.show_captions ? z : p) : 0); if (D == "pointer") { f = (o.frame_width * n) + (k * (n)) } else { f = (o.frame_width * n * 3) + (k * (n * 3)) } B = ((strip_size * o.frame_width) + ((strip_size - 1) * k)); C.css({ position: "relative", margin: "0", background: o.background_color, border: o.border, width: i + "px", height: u + "px" }); if (has_filmstrip) { g() } if (has_panels) { h() } if (has_filmstrip) { m() } a().mousemove(function(E) { if (b(E.pageX, E.pageY)) { if (o.pause_on_hover) { a(document).oneTime(500, "animation_pause", function() { a(document).stopTime("transition"); A = true }) } if (has_panels && !has_filmstrip) { a(".nav-overlay").fadeIn("fast"); a(".nav-next").fadeIn("fast"); a(".nav-prev").fadeIn("fast") } } else { if (o.pause_on_hover) { a(document).stopTime("animation_pause"); if (A) { a(document).everyTime(o.transition_interval, "transition", function() { t() }); A = false } } if (has_panels && !has_filmstrip) { a(".nav-overlay").fadeOut("fast"); a(".nav-next").fadeOut("fast"); a(".nav-prev").fadeOut("fast") } } }); l.eq(0).show(); if (n > 1) { a(document).everyTime(o.transition_interval, "transition", function() { t() }) } C.css("visibility", "visible") }) }; a.fn.galleryView.defaults = { panel_width: 400, panel_height: 300, frame_width: 80, frame_height: 80, filmstrip_size: 3, overlay_height: 70, overlay_font_size: "1em", transition_speed: 400, transition_interval: 6000, overlay_opacity: 0.6, overlay_color: "black", background_color: "black", overlay_text_color: "white", caption_text_color: "white", border: "1px solid black", nav_theme: "light", easing: "swing", filmstrip_position: "bottom", overlay_position: "bottom", show_captions: false, fade_panels: true, pause_on_hover: false} })(jQuery);
/*
* jQuery.timers v1.1.2 - http://sam.zoy.org/wtfpl/
*/
jQuery.fn.extend({ everyTime: function(b, c, d, e, a) { return this.each(function() { jQuery.timer.add(this, b, c, d, e, a) }) }, oneTime: function(a, b, c) { return this.each(function() { jQuery.timer.add(this, a, b, c, 1) }) }, stopTime: function(a, b) { return this.each(function() { jQuery.timer.remove(this, a, b) }) } }); jQuery.event.special; jQuery.extend({ timer: { global: [], guid: 1, dataKey: "jQuery.timer", regex: /^([0-9]+(?:\.[0-9]*)?)\s*(.*s)?$/, powers: { ms: 1, cs: 10, ds: 100, s: 1000, das: 10000, hs: 100000, ks: 1000000 }, timeParse: function(c) { if (c == undefined || c == null) { return null } var a = this.regex.exec(jQuery.trim(c.toString())); if (a[2]) { var b = parseFloat(a[1]); var d = this.powers[a[2]] || 1; return b * d } else { return c } }, add: function(e, c, h, g, b, f) { var a = 0; if (jQuery.isFunction(h)) { if (!b) { b = g } g = h; h = c } c = jQuery.timer.timeParse(c); if (typeof c != "number" || isNaN(c) || c <= 0) { return } if (b && b.constructor != Number) { f = !!b; b = 0 } b = b || 0; f = f || false; var d = jQuery.data(e, this.dataKey) || jQuery.data(e, this.dataKey, {}); if (!d[h]) { d[h] = {} } g.timerID = g.timerID || this.guid++; var i = function() { if (f && this.inProgress) { return } this.inProgress = true; if ((++a > b && b !== 0) || g.call(e, a) === false) { jQuery.timer.remove(e, h, g) } this.inProgress = false }; i.timerID = g.timerID; if (!d[h][g.timerID]) { d[h][g.timerID] = window.setInterval(i, c) } this.global.push(e) }, remove: function(c, b, d) { var e = jQuery.data(c, this.dataKey), a; if (e) { if (!b) { for (b in e) { this.remove(c, b, d) } } else { if (e[b]) { if (d) { if (d.timerID) { window.clearInterval(e[b][d.timerID]); delete e[b][d.timerID] } } else { for (var d in e[b]) { window.clearInterval(e[b][d]); delete e[b][d] } } for (a in e[b]) { break } if (!a) { a = null; delete e[b] } } } for (a in e) { break } if (!a) { jQuery.removeData(c, this.dataKey) } } } } }); jQuery(window).bind("unload", function() { jQuery.each(jQuery.timer.global, function(a, b) { jQuery.timer.remove(b) }) });
