(function(a) {
    function b(d, g) { if (g == 2) { var m = Math.floor(d.length / 2); return d.length % 2 ? d[m] : (d[m] + d[m + 1]) / 2 } else { m = Math.floor(d.length / 4); return d.length % 2 ? (d[m * g] + d[m * g + 1]) / 2 : d[m * g] } } a.fn.simpledraw = function(d, g, m) { if (m && this[0].vcanvas) return this[0].vcanvas; if (d == undefined) d = a(this).innerWidth(); if (g == undefined) g = a(this).innerHeight(); return a.browser.hasCanvas ? new c(d, g, this) : a.browser.msie ? new h(d, g, this) : false }; var f = []; a.fn.sparkline = function(d, g) {
        g = a.extend({ type: "line", lineColor: "#00f", fillColor: "#cdf",
            defaultPixelsPerValue: 3, width: "auto", height: "auto", composite: false
        }, g ? g : {}); return this.each(function() {
            var m = function() { var o = d == "html" || d == undefined ? a(this).text().split(",") : d, u = g.width == "auto" ? o.length * g.defaultPixelsPerValue : g.width; if (g.height == "auto") { if (!g.composite || !this.vcanvas) { var r = document.createElement("span"); r.innerHTML = "a"; a(this).html(r); height = a(r).innerHeight(); a(r).remove() } } else height = g.height; a.fn.sparkline[g.type].call(this, o, g, u, height) }; a(this).html() && a(this).is(":hidden") ||
a.fn.jquery < "1.3.0" && a(this).parents().is(":hidden") ? f.push([this, m]) : m.call(this)
        })
    }; a.sparkline_display_visible = function() { for (var d = f.length - 1; d >= 0; d--) { var g = f[d][0]; if (a(g).is(":visible") && !a(g).parents().is(":hidden")) { f[d][1].call(g); f.splice(d, 1) } } }; a.fn.sparkline.line = function(d, g, m, o) {
        g = a.extend({ spotColor: "#f80", spotRadius: 1.5, minSpotColor: "#f80", maxSpotColor: "#f80", lineWidth: 1, normalRangeMin: undefined, normalRangeMax: undefined, normalRangeColor: "#ccc", chartRangeMin: undefined, chartRangeMax: undefined,
            chartRangeMinX: undefined, chartRangeMaxX: undefined
        }, g ? g : {}); var u = [], r = [], v = []; for (A = 0; A < d.length; A++) { var w = typeof d[A] == "string", k = typeof d[A] == "object" && d[A] instanceof Array, l = w && d[A].split(":"); if (w && l.length == 2) { u.push(Number(l[0])); r.push(Number(l[1])); v.push(Number(l[1])) } else if (k) { u.push(d[A][0]); r.push(d[A][1]); v.push(d[A][1]) } else { u.push(A); if (d[A] === null || d[A] == "null") r.push(null); else { r.push(Number(d[A])); v.push(Number(d[A])) } } } if (g.xvalues) u = g.xvalues; w = d = Math.max.apply(Math, v); k = v = Math.min.apply(Math,
v); A = Math.max.apply(Math, u); l = Math.min.apply(Math, u); if (g.normalRangeMin != undefined) { if (g.normalRangeMin < v) v = g.normalRangeMin; if (g.normalRangeMax > d) d = g.normalRangeMax } if (g.chartRangeMin != undefined && (g.chartRangeClip || g.chartRangeMin < v)) v = g.chartRangeMin; if (g.chartRangeMax != undefined && (g.chartRangeClip || g.chartRangeMax > d)) d = g.chartRangeMax; if (g.chartRangeMinX != undefined && (g.chartRangeClipX || g.chartRangeMinX < l)) l = g.chartRangeMinX; if (g.chartRangeMaxX != undefined && (g.chartRangeClipX || g.chartRangeMaxX >
A)) A = g.chartRangeMaxX; var q = A - l == 0 ? 1 : A - l, s = d - v == 0 ? 1 : d - v, t = r.length - 1; if (t < 1) this.innerHTML = ""; else if (m = a(this).simpledraw(m, o, g.composite)) {
            var n = m.pixel_width, y = m.pixel_height, z = 0, B = 0; if (g.spotRadius && (n < g.spotRadius * 4 || y < g.spotRadius * 4)) g.spotRadius = 0; if (g.spotRadius) {
                if (g.minSpotColor || g.spotColor && r[t] == v) y -= Math.ceil(g.spotRadius); if (g.maxSpotColor || g.spotColor && r[t] == d) { y -= Math.ceil(g.spotRadius); z += Math.ceil(g.spotRadius) } if (g.minSpotColor || g.maxSpotColor && (r[0] == v || r[0] == d)) {
                    B += Math.ceil(g.spotRadius);
                    n -= Math.ceil(g.spotRadius)
                } if (g.spotColor || g.minSpotColor || g.maxSpotColor && (r[t] == v || r[t] == d)) n -= Math.ceil(g.spotRadius)
            } y--; if (g.normalRangeMin != undefined) { A = z + Math.round(y - y * ((g.normalRangeMax - v) / s)); o = Math.round(y * (g.normalRangeMax - g.normalRangeMin) / s); m.drawRect(B, A, n, o, undefined, g.normalRangeColor) } o = []; for (var G = [o], A = 0, F = r.length; A < F; A++) {
                var C = u[A], D = r[A]; if (D === null) { if (A) if (r[A - 1] !== null) { o = []; G.push(o) } } else {
                    if (D < v) D = v; if (D > d) D = d; o.length || o.push([B + Math.round((C - l) * (n / q)), z + y]); o.push([B +
Math.round((C - l) * (n / q)), z + Math.round(y - y * ((D - v) / s))])
                } 
            } A = 0; for (F = G.length; A < F; A++) { o = G[A]; if (o.length) { if (g.fillColor) { o.push([o[o.length - 1][0], z + y - 1]); m.drawShape(o, undefined, g.fillColor); o.pop() } if (o.length > 2) o[0] = [o[0][0], o[1][1]]; m.drawShape(o, g.lineColor, undefined, g.lineWidth) } } g.spotRadius && g.spotColor && m.drawCircle(B + Math.round(u[u.length - 1] * (n / q)), z + Math.round(y - y * ((r[t] - v) / s)), g.spotRadius, undefined, g.spotColor); if (d != k) {
                if (g.spotRadius && g.minSpotColor) {
                    C = u[r.indexOf(k)]; m.drawCircle(B + Math.round((C -
l) * (n / q)), z + Math.round(y - y * ((k - v) / s)), g.spotRadius, undefined, g.minSpotColor)
                } if (g.spotRadius && g.maxSpotColor) { C = u[r.indexOf(w)]; m.drawCircle(B + Math.round((C - l) * (n / q)), z + Math.round(y - y * ((w - v) / s)), g.spotRadius, undefined, g.maxSpotColor) } 
            } 
        } else this.innerHTML = ""
    }; a.fn.sparkline.bar = function(d, g, m, o) {
        g = a.extend({ type: "bar", barColor: "#00f", negBarColor: "#f44", zeroColor: undefined, nullColor: undefined, zeroAxis: undefined, barWidth: 4, barSpacing: 1, chartRangeMax: undefined, chartRangeMin: undefined, chartRangeClip: false,
            colorMap: undefined
        }, g ? g : {}); m = d.length * g.barWidth + (d.length - 1) * g.barSpacing; for (var u = [], r = 0, v = d.length; r < v; r++) if (d[r] == "null" || d[r] === null) d[r] = null; else { d[r] = Number(d[r]); u.push(Number(d[r])) } var w = Math.max.apply(Math, u); u = Math.min.apply(Math, u); if (g.chartRangeMin != undefined && (g.chartRangeClip || g.chartRangeMin < u)) u = g.chartRangeMin; if (g.chartRangeMax != undefined && (g.chartRangeClip || g.chartRangeMax > w)) w = g.chartRangeMax; if (g.zeroAxis == undefined) g.zeroAxis = u < 0; var k = w - u == 0 ? 1 : w - u; if (a.isArray(g.colorMap)) var l =
g.colorMap, q = null; else { l = null; q = g.colorMap } if (m = a(this).simpledraw(m, o, g.composite)) {
            var s = m.pixel_height, t = u < 0 && g.zeroAxis ? s - Math.round(s * (Math.abs(u) / k)) - 1 : s - 1; r = 0; for (v = d.length; r < v; r++) {
                var n = r * (g.barWidth + g.barSpacing), y = d[r]; if (y === null) if (g.nullColor) { B = g.nullColor; o = 1; var z = g.zeroAxis && u < 0 ? t : s - o } else continue; else {
                    if (y < u) y = u; if (y > w) y = w; var B = y < 0 ? g.negBarColor : g.barColor; if (g.zeroAxis && u < 0) { o = Math.round(s * (Math.abs(y) / k)) + 1; z = y < 0 ? t : t - o } else { o = Math.round(s * ((y - u) / k)) + 1; z = s - o } if (y == 0 && g.zeroColor !=
undefined) B = g.zeroColor; if (q && q[y]) B = q[y]; else if (l && l.length > r) B = l[r]; if (B === null) continue
                } m.drawRect(n, z, g.barWidth - 1, o - 1, B, B)
            } 
        } else this.innerHTML = ""
    }; a.fn.sparkline.tristate = function(d, g, m, o) {
        d = a.map(d, Number); g = a.extend({ barWidth: 4, barSpacing: 1, posBarColor: "#6f6", negBarColor: "#f44", zeroBarColor: "#999", colorMap: {} }, g); m = d.length * g.barWidth + (d.length - 1) * g.barSpacing; if (a.isArray(g.colorMap)) var u = g.colorMap, r = null; else { u = null; r = g.colorMap } if (m = a(this).simpledraw(m, o, g.composite)) for (var v = Math.round(m.pixel_height /
2), w = 0, k = d.length; w < k; w++) { var l = w * (g.barWidth + g.barSpacing); if (d[w] < 0) { var q = v; o = v - 1; var s = g.negBarColor } else if (d[w] > 0) { q = 0; o = v - 1; s = g.posBarColor } else { q = v - 1; o = 2; s = g.zeroBarColor } if (r && r[d[w]]) s = r[d[w]]; else if (u && u.length > w) s = u[w]; s !== null && m.drawRect(l, q, g.barWidth - 1, o - 1, s, s) } else this.innerHTML = ""
    }; a.fn.sparkline.discrete = function(d, g, m, o) {
        d = a.map(d, Number); g = a.extend({ lineHeight: "auto", thresholdColor: undefined, thresholdValue: 0, chartRangeMax: undefined, chartRangeMin: undefined, chartRangeClip: false },
g); m = g.width == "auto" ? d.length * 2 : m; var u = Math.floor(m / d.length); if (m = a(this).simpledraw(m, o, g.composite)) {
            var r = m.pixel_height; o = g.lineHeight == "auto" ? Math.round(r * 0.3) : g.lineHeight; r = r - o; var v = Math.min.apply(Math, d), w = Math.max.apply(Math, d); if (g.chartRangeMin != undefined && (g.chartRangeClip || g.chartRangeMin < v)) v = g.chartRangeMin; if (g.chartRangeMax != undefined && (g.chartRangeClip || g.chartRangeMax > w)) w = g.chartRangeMax; for (var k = w - v, l = 0, q = d.length; l < q; l++) {
                var s = d[l]; if (s < v) s = v; if (s > w) s = w; var t = l * u, n = Math.round(r -
r * ((s - v) / k)); m.drawLine(t, n, t, n + o, g.thresholdColor && s < g.thresholdValue ? g.thresholdColor : g.lineColor)
            } 
        } else this.innerHTML = ""
    }; a.fn.sparkline.bullet = function(d, g, m, o) {
        d = a.map(d, Number); g = a.extend({ targetColor: "red", targetWidth: 3, performanceColor: "blue", rangeColors: ["#D3DAFE", "#A8B6FF", "#7F94FF"], base: undefined }, g); m = g.width == "auto" ? "4.0em" : m; if ((m = a(this).simpledraw(m, o, g.composite)) && d.length > 1) {
            var u = m.pixel_width - Math.ceil(g.targetWidth / 2); o = m.pixel_height; var r = Math.min.apply(Math, d), v = Math.max.apply(Math,
d); r = g.base == undefined ? r < 0 ? r : 0 : g.base; v = v - r; i = 2; for (vlen = d.length; i < vlen; i++) { var w = parseInt(d[i]); m.drawRect(0, 0, Math.round(u * ((w - r) / v)) - 1, o - 1, g.rangeColors[i - 2], g.rangeColors[i - 2]) } w = parseInt(d[1]); w = Math.round(u * ((w - r) / v)); m.drawRect(0, Math.round(o * 0.3), w - 1, Math.round(o * 0.4) - 1, g.performanceColor, g.performanceColor); d = parseInt(d[0]); d = Math.round(u * ((d - r) / v) - g.targetWidth / 2); u = Math.round(o * 0.1); m.drawRect(d, u, g.targetWidth - 1, o - u * 2 - 1, g.targetColor, g.targetColor)
        } else this.innerHTML = ""
    }; a.fn.sparkline.pie =
function(d, g, m, o) { d = a.map(d, Number); g = a.extend({ sliceColors: ["#f00", "#0f0", "#00f"] }, g); m = g.width == "auto" ? o : m; if ((m = a(this).simpledraw(m, o, g.composite)) && d.length > 1) { o = Math.floor(Math.min(m.pixel_width, m.pixel_height) / 2); for (var u = 0, r = 0, v = d.length; r < v; r++) u += d[r]; var w = 0; if (g.offset) w += 2 * Math.PI * (g.offset / 360); var k = 2 * Math.PI; r = 0; for (v = d.length; r < v; r++) { var l = w, q = w; if (u > 0) q = w + k * (d[r] / u); m.drawPieSlice(o, o, o, l, q, undefined, g.sliceColors[r % g.sliceColors.length]); w = q } } }; a.fn.sparkline.box = function(d, g,
m, o) {
    d = a.map(d, Number); g = a.extend({ raw: false, boxLineColor: "black", boxFillColor: "#cdf", whiskerColor: "black", outlierLineColor: "#333", outlierFillColor: "white", medianColor: "red", showOutliers: true, outlierIQR: 1.5, spotRadius: 1.5, target: undefined, targetColor: "#4a2", chartRangeMax: undefined, chartRangeMin: undefined }, g); m = g.width == "auto" ? "4.0em" : m; minvalue = g.chartRangeMin == undefined ? Math.min.apply(Math, d) : g.chartRangeMin; maxvalue = g.chartRangeMax == undefined ? Math.max.apply(Math, d) : g.chartRangeMax; if ((m = a(this).simpledraw(m,
o, g.composite)) && d.length > 1) {
        var u = m.pixel_width; o = m.pixel_height; if (g.raw) if (g.showOutliers && d.length > 5) var r = d[0], v = d[1], w = d[2], k = d[3], l = d[4], q = d[5], s = d[6]; else { v = d[0]; w = d[1]; k = d[2]; l = d[3]; q = d[4] } else { d.sort(function(n, y) { return n - y }); w = b(d, 1); k = b(d, 2); l = b(d, 3); var t = l - w; if (g.showOutliers) { q = v = undefined; r = 0; for (s = d.length; r < s; r++) { if (v == undefined && d[r] > w - t * g.outlierIQR) v = d[r]; if (d[r] < l + t * g.outlierIQR) q = d[r] } r = d[0]; s = d[d.length - 1] } else { v = d[0]; q = d[d.length - 1] } } d = u / (maxvalue - minvalue + 1); t = 0; if (g.showOutliers) {
            t =
Math.ceil(g.spotRadius); u -= 2 * Math.ceil(g.spotRadius); d = u / (maxvalue - minvalue + 1); r < v && m.drawCircle((r - minvalue) * d + t, o / 2, g.spotRadius, g.outlierLineColor, g.outlierFillColor); s > q && m.drawCircle((s - minvalue) * d + t, o / 2, g.spotRadius, g.outlierLineColor, g.outlierFillColor)
        } m.drawRect(Math.round((w - minvalue) * d + t), Math.round(o * 0.1), Math.round((l - w) * d), Math.round(o * 0.8), g.boxLineColor, g.boxFillColor); m.drawLine(Math.round((v - minvalue) * d + t), Math.round(o / 2), Math.round((w - minvalue) * d + t), Math.round(o / 2), g.lineColor);
        m.drawLine(Math.round((v - minvalue) * d + t), Math.round(o / 4), Math.round((v - minvalue) * d + t), Math.round(o - o / 4), g.whiskerColor); m.drawLine(Math.round((q - minvalue) * d + t), Math.round(o / 2), Math.round((l - minvalue) * d + t), Math.round(o / 2), g.lineColor); m.drawLine(Math.round((q - minvalue) * d + t), Math.round(o / 4), Math.round((q - minvalue) * d + t), Math.round(o - o / 4), g.whiskerColor); m.drawLine(Math.round((k - minvalue) * d + t), Math.round(o * 0.1), Math.round((k - minvalue) * d + t), Math.round(o * 0.9), g.medianColor); if (g.target) {
            u = Math.ceil(g.spotRadius);
            m.drawLine(Math.round((g.target - minvalue) * d + t), Math.round(o / 2 - u), Math.round((g.target - minvalue) * d + t), Math.round(o / 2 + u), g.targetColor); m.drawLine(Math.round((g.target - minvalue) * d + t - u), Math.round(o / 2), Math.round((g.target - minvalue) * d + t + u), Math.round(o / 2), g.targetColor)
        } 
    } else this.innerHTML = ""
}; if (!Array.prototype.indexOf) Array.prototype.indexOf = function(d) { for (var g = 0, m = this.length; g < m; g++) if (this[g] == d) return g; return -1 }; a.browser.msie && !document.namespaces.v && document.namespaces.add("v", "urn:schemas-microsoft-com:vml",
"#default#VML"); if (a.browser.hasCanvas == undefined) { var e = document.createElement("canvas"); a.browser.hasCanvas = e.getContext != undefined } e = function() { }; e.prototype = { init: function(d, g, m) { this.width = d; this.height = g; this.target = m; if (m[0]) m = m[0]; m.vcanvas = this }, drawShape: function() { alert("drawShape not implemented") }, drawLine: function(d, g, m, o, u, r) { return this.drawShape([[d, g], [m, o]], u, r) }, drawCircle: function() { alert("drawCircle not implemented") }, drawPieSlice: function() { alert("drawPieSlice not implemented") },
    drawRect: function() { alert("drawRect not implemented") }, getElement: function() { return this.canvas }, _insert: function(d, g) { a(g).html(d) } 
}; var c = function(d, g, m) { return this.init(d, g, m) }; c.prototype = a.extend(new e, { _super: e.prototype, init: function(d, g, m) {
    this._super.init(d, g, m); this.canvas = document.createElement("canvas"); if (m[0]) m = m[0]; m.vcanvas = this; a(this.canvas).css({ display: "inline-block", width: d, height: g, verticalAlign: "top" }); this._insert(this.canvas, m); this.pixel_height = a(this.canvas).height(); this.pixel_width =
a(this.canvas).width(); this.canvas.width = this.pixel_width; this.canvas.height = this.pixel_height; a(this.canvas).css({ width: this.pixel_width, height: this.pixel_height })
}, _getContext: function(d, g, m) { var o = this.canvas.getContext("2d"); if (d != undefined) o.strokeStyle = d; o.lineWidth = m == undefined ? 1 : m; if (g != undefined) o.fillStyle = g; return o }, drawShape: function(d, g, m, o) {
    o = this._getContext(g, m, o); o.beginPath(); o.moveTo(d[0][0] + 0.5, d[0][1] + 0.5); for (var u = 1, r = d.length; u < r; u++) o.lineTo(d[u][0] + 0.5, d[u][1] + 0.5); g != undefined &&
o.stroke(); m != undefined && o.fill()
}, drawCircle: function(d, g, m, o, u) { var r = this._getContext(o, u); r.beginPath(); r.arc(d, g, m, 0, 2 * Math.PI, false); o != undefined && r.stroke(); u != undefined && r.fill() }, drawPieSlice: function(d, g, m, o, u, r, v) { var w = this._getContext(r, v); w.beginPath(); w.moveTo(d, g); w.arc(d, g, m, o, u, false); w.lineTo(d, g); w.closePath(); r != undefined && w.stroke(); v && w.fill() }, drawRect: function(d, g, m, o, u, r) { return this.drawShape([[d, g], [d + m, g], [d + m, g + o], [d, g + o], [d, g]], u, r) } 
}); var h = function(d, g, m) {
    return this.init(d,
g, m)
}; h.prototype = a.extend(new e, { _super: e.prototype, init: function(d, g, m) {
    this._super.init(d, g, m); if (m[0]) m = m[0]; m.vcanvas = this; this.canvas = document.createElement("span"); a(this.canvas).css({ display: "inline-block", position: "relative", overflow: "hidden", width: d, height: g, margin: "0px", padding: "0px", verticalAlign: "top" }); this._insert(this.canvas, m); this.pixel_height = a(this.canvas).height(); this.pixel_width = a(this.canvas).width(); this.canvas.width = this.pixel_width; this.canvas.height = this.pixel_height; this.canvas.insertAdjacentHTML("beforeEnd",
'<v:group coordorigin="0 0" coordsize="' + this.pixel_width + " " + this.pixel_height + '" style="position:absolute;top:0;left:0;width:' + this.pixel_width + "px;height=" + this.pixel_height + 'px;"></v:group>'); this.group = a(this.canvas).children()[0]
}, drawShape: function(d, g, m, o) {
    for (var u = [], r = 0, v = d.length; r < v; r++) u[r] = "" + d[r][0] + "," + d[r][1]; d = u.splice(0, 1); o = o == undefined ? 1 : o; r = u[0] == u[u.length - 1] ? "x " : ""; this.group.insertAdjacentHTML("beforeEnd", '<v:shape coordorigin="0 0" coordsize="' + this.pixel_width + " " + this.pixel_height +
'" ' + (g == undefined ? ' stroked="false" ' : ' strokeWeight="' + o + '" strokeColor="' + g + '" ') + (m == undefined ? ' filled="false"' : ' fillColor="' + m + '" filled="true" ') + ' style="position:absolute;left:0px;top:0px;height:' + this.pixel_height + "px;width:" + this.pixel_width + 'px;padding:0px;margin:0px;"  path="m ' + d + " l " + u.join(", ") + " " + r + 'e"> </v:shape>')
}, drawCircle: function(d, g, m, o, u) {
    d -= m + 1; g -= m + 1; this.group.insertAdjacentHTML("beforeEnd", "<v:oval " + (o == undefined ? ' stroked="false" ' : ' strokeWeight="1" strokeColor="' +
o + '" ') + (u == undefined ? ' filled="false"' : ' fillColor="' + u + '" filled="true" ') + ' style="position:absolute;top:' + g + "px; left:" + d + "px; width:" + m * 2 + "px; height:" + m * 2 + 'px"></v:oval>')
}, drawPieSlice: function(d, g, m, o, u, r, v) {
    if (o != u) {
        if (u - o == 2 * Math.PI) { o = 0; u = 2 * Math.PI } var w = d + Math.round(Math.cos(o) * m), k = g + Math.round(Math.sin(o) * m), l = d + Math.round(Math.cos(u) * m), q = g + Math.round(Math.sin(u) * m); w == l && k == q && u - o < Math.PI || this.group.insertAdjacentHTML("beforeEnd", '<v:shape coordorigin="0 0" coordsize="' + this.pixel_width +
" " + this.pixel_height + '" ' + (r == undefined ? ' stroked="false" ' : ' strokeWeight="1" strokeColor="' + r + '" ') + (v == undefined ? ' filled="false"' : ' fillColor="' + v + '" filled="true" ') + ' style="position:absolute;left:0px;top:0px;height:' + this.pixel_height + "px;width:" + this.pixel_width + 'px;padding:0px;margin:0px;"  path="m ' + d + "," + g + " wa " + [d - m, g - m, d + m, g + m, w, k, l, q].join(", ") + ' x e"> </v:shape>')
    } 
}, drawRect: function(d, g, m, o, u, r) { return this.drawShape([[d, g], [d, g + o], [d + m, g + o], [d + m, g], [d, g]], u, r) } 
})
})(jQuery);
(function(a) {
    a.fn.validationEngine = function(b) {
        if (a.validationEngineLanguage) allRules = a.validationEngineLanguage.allRules; else a.validationEngine.debug("Validation engine rules are not loaded check your external file"); b = jQuery.extend({ allrules: allRules, validationEventTriggers: "focusout", inlineValidation: true, returnIsValid: false, liveEvent: true, unbindEngine: true, containerOverflow: false, containerOverflowDOM: "", ajaxSubmit: false, scroll: true, promptPosition: "topRight", success: false, beforeSuccess: function() { },
            failure: function() { } 
        }, b); a.validationEngine.settings = b; a.validationEngine.ajaxValidArray = []; if (b.inlineValidation == true) {
            if (!b.returnIsValid) {
                allowReturnIsvalid = false; if (b.liveEvent) { a(this).find("[class*=validate][type!=checkbox]").live(b.validationEventTriggers, function() { f(this) }); a(this).find("[class*=validate][type=checkbox]").live("click", function() { f(this) }) } else {
                    a(this).find("[class*=validate]").not("[type=checkbox]").bind(b.validationEventTriggers, function() { f(this) }); a(this).find("[class*=validate][type=checkbox]").bind("click",
function() { f(this) })
                } firstvalid = false
            } var f = function(e) { a.validationEngine.settings = b; if (a.validationEngine.intercept == false || !a.validationEngine.intercept) { a.validationEngine.onSubmitValid = false; a.validationEngine.loadValidation(e) } else a.validationEngine.intercept = false } 
        } if (b.returnIsValid) return a.validationEngine.submitValidation(this, b) ? false : true; a(this).bind("submit", function() {
            a.validationEngine.onSubmitValid = true; a.validationEngine.settings = b; if (a.validationEngine.submitValidation(this, b) ==
false) { if (a.validationEngine.submitForm(this, b) == true) return false } else { b.failure && b.failure(); return false } 
        }); a(".formError").live("click", function() { a(this).fadeOut(150, function() { a(this).remove() }) })
    }; a.validationEngine = { defaultSetting: function() {
        if (a.validationEngineLanguage) allRules = a.validationEngineLanguage.allRules; else a.validationEngine.debug("Validation engine rules are not loaded check your external file"); settings = { allrules: allRules, validationEventTriggers: "blur", inlineValidation: true,
            containerOverflow: false, containerOverflowDOM: "", returnIsValid: false, scroll: true, unbindEngine: true, ajaxSubmit: false, promptPosition: "topRight", success: false, failure: function() { } 
        }; a.validationEngine.settings = settings
    }, loadValidation: function(b) {
        a.validationEngine.settings || a.validationEngine.defaultSetting(); rulesParsing = a(b).attr("class"); rulesRegExp = /\[(.*)\]/; getRules = rulesRegExp.exec(rulesParsing); if (getRules == null) return false; str = getRules[1]; pattern = /\[|,|\]/; result = str.split(pattern); return a.validationEngine.validateCall(b,
result)
    }, validateCall: function(b, f) {
        function e(l, q) {
            callerType = a(l).attr("type"); if (callerType == "text" || callerType == "password" || callerType == "textarea") if (!a(l).val()) { a.validationEngine.isError = true; v += a.validationEngine.settings.allrules[q[i]].alertText + "<br />" } if (callerType == "radio" || callerType == "checkbox") {
                w = a(l).attr("name"); if (a("input[name='" + w + "']:checked").size() == 0) {
                    a.validationEngine.isError = true; v += a("input[name='" + w + "']").size() == 1 ? a.validationEngine.settings.allrules[q[i]].alertTextCheckboxe +
"<br />" : a.validationEngine.settings.allrules[q[i]].alertTextCheckboxMultiple + "<br />"
                } 
            } if (callerType == "select-one") if (!a(l).val()) { a.validationEngine.isError = true; v += a.validationEngine.settings.allrules[q[i]].alertText + "<br />" } if (callerType == "select-multiple") if (!a(l).find("option:selected").val()) { a.validationEngine.isError = true; v += a.validationEngine.settings.allrules[q[i]].alertText + "<br />" } 
        } function c(l, q, s) {
            customRule = q[s + 1]; pattern = eval(a.validationEngine.settings.allrules[customRule].regex);
            if (!pattern.test(a(l).attr("value"))) { a.validationEngine.isError = true; v += a.validationEngine.settings.allrules[customRule].alertText + "<br />" } 
        } function h(l, q, s) { customString = q[s + 1]; if (customString == a(l).attr("value")) { a.validationEngine.isError = true; v += a.validationEngine.settings.allrules.required.alertText + "<br />" } } function d(l, q, s) {
            customRule = q[s + 1]; funce = a.validationEngine.settings.allrules[customRule].nname; l = window[funce]; if (typeof l === "function") {
                if (!l()) a.validationEngine.isError = true; v += a.validationEngine.settings.allrules[customRule].alertText +
"<br />"
            } 
        } function g(l, q, s) {
            customAjaxRule = q[s + 1]; postfile = a.validationEngine.settings.allrules[customAjaxRule].file; fieldValue = a(l).val(); ajaxCaller = l; fieldId = a(l).attr("id"); ajaxValidate = true; ajaxisError = a.validationEngine.isError; extraData = a.validationEngine.settings.allrules[customAjaxRule].extraData ? a.validationEngine.settings.allrules[customAjaxRule].extraData : ""; ajaxisError || a.ajax({ type: "POST", url: postfile, async: true, data: "validateValue=" + fieldValue + "&validateId=" + fieldId + "&validateError=" +
customAjaxRule + "&extraData=" + extraData, beforeSend: function() { if (a.validationEngine.settings.allrules[customAjaxRule].alertTextLoad) if (a("div." + fieldId + "formError")[0]) a.validationEngine.updatePromptText(ajaxCaller, a.validationEngine.settings.allrules[customAjaxRule].alertTextLoad, "load"); else return a.validationEngine.buildPrompt(ajaxCaller, a.validationEngine.settings.allrules[customAjaxRule].alertTextLoad, "load") }, error: function(t, n) { a.validationEngine.debug("error in the ajax: " + t.status + " " + n) },
                success: function(t) {
                    function n(y) { for (x = 0; x < ajaxErrorLength; x++) if (a.validationEngine.ajaxValidArray[x][0] == fieldId) { a.validationEngine.ajaxValidArray[x][1] = y; existInarray = true } } t = eval("(" + t + ")"); ajaxisError = t.jsonValidateReturn[2]; customAjaxRule = t.jsonValidateReturn[1]; fieldId = ajaxCaller = a("#" + t.jsonValidateReturn[0])[0]; ajaxErrorLength = a.validationEngine.ajaxValidArray.length; existInarray = false; if (ajaxisError == "false") {
                        n(false); if (!existInarray) {
                            a.validationEngine.ajaxValidArray[ajaxErrorLength] =
Array(2); a.validationEngine.ajaxValidArray[ajaxErrorLength][0] = fieldId; existInarray = a.validationEngine.ajaxValidArray[ajaxErrorLength][1] = false
                        } a.validationEngine.ajaxValid = false; v += a.validationEngine.settings.allrules[customAjaxRule].alertText + "<br />"; a.validationEngine.updatePromptText(ajaxCaller, v, "", true)
                    } else {
                        n(true); a.validationEngine.ajaxValid = true; customAjaxRule || a.validationEngine.debug("wrong ajax response, are you on a server or in xampp? if not delete de ajax[ajaxUser] validating rule from your form ");
                        if (a.validationEngine.settings.allrules[customAjaxRule].alertTextOk) a.validationEngine.updatePromptText(ajaxCaller, a.validationEngine.settings.allrules[customAjaxRule].alertTextOk, "pass", true); else { ajaxValidate = false; a.validationEngine.closePrompt(ajaxCaller) } 
                    } 
                } 
            })
        } function m(l, q, s) { confirmField = q[s + 1]; if (a(l).attr("value") != a("#" + confirmField).attr("value")) { a.validationEngine.isError = true; v += a.validationEngine.settings.allrules.confirm.alertText + "<br />" } } function o(l, q, s) {
            startLength = eval(q[s + 1]);
            endLength = eval(q[s + 2]); feildLength = a(l).attr("value").length; if (feildLength < startLength || feildLength > endLength) { a.validationEngine.isError = true; v += a.validationEngine.settings.allrules.length.alertText + startLength + a.validationEngine.settings.allrules.length.alertText2 + endLength + a.validationEngine.settings.allrules.length.alertText3 + "<br />" } 
        } function u(l, q, s) {
            nbCheck = eval(q[s + 1]); groupname = a(l).attr("name"); groupSize = a("input[name='" + groupname + "']:checked").size(); if (groupSize > nbCheck) {
                a.validationEngine.showTriangle =
false; a.validationEngine.isError = true; v += a.validationEngine.settings.allrules.maxCheckbox.alertText + "<br />"
            } 
        } function r(l, q, s) { nbCheck = eval(q[s + 1]); groupname = a(l).attr("name"); groupSize = a("input[name='" + groupname + "']:checked").size(); if (groupSize < nbCheck) { a.validationEngine.isError = true; a.validationEngine.showTriangle = false; v += a.validationEngine.settings.allrules.minCheckbox.alertText + " " + nbCheck + " " + a.validationEngine.settings.allrules.minCheckbox.alertText2 + "<br />" } } var v = ""; a(b).attr("id") ||
a.validationEngine.debug("This field have no ID attribut( name & class displayed): " + a(b).attr("name") + " " + a(b).attr("class")); b = b; ajaxValidate = false; var w = a(b).attr("name"); a.validationEngine.isError = false; a.validationEngine.showTriangle = true; callerType = a(b).attr("type"); for (i = 0; i < f.length; i++) switch (f[i]) {
            case "optional": if (!a(b).val()) { a.validationEngine.closePrompt(b); return a.validationEngine.isError } break; case "required": e(b, f); break; case "custom": c(b, f, i); break; case "exemptString": h(b, f, i);
                break; case "ajax": a.validationEngine.onSubmitValid || g(b, f, i); break; case "length": o(b, f, i); break; case "maxCheckbox": u(b, f, i); groupname = a(b).attr("name"); b = a("input[name='" + groupname + "']"); break; case "minCheckbox": r(b, f, i); groupname = a(b).attr("name"); b = a("input[name='" + groupname + "']"); break; case "confirm": m(b, f, i); break; case "funcCall": d(b, f, i); break; default: 
        } if (a("input[name='" + w + "']").size() > 1 && (callerType == "radio" || callerType == "checkbox")) {
            b = a("input[name='" + w + "'][type!=hidden]:first"); a.validationEngine.showTriangle =
false
        } if (a.validationEngine.isError == true) { var k = "." + a.validationEngine.linkTofield(b); if (k != ".") a(k)[0] ? a.validationEngine.updatePromptText(b, v) : a.validationEngine.buildPrompt(b, v, "error"); else a.validationEngine.updatePromptText(b, v) } else a.validationEngine.closePrompt(b); return a.validationEngine.isError ? a.validationEngine.isError : false
    }, submitForm: function(b) {
        if (a.validationEngine.settings.ajaxSubmit) {
            extraData = a.validationEngine.settings.ajaxSubmitExtraData ? a.validationEngine.settings.ajaxSubmitExtraData :
""; a.ajax({ type: "POST", url: a.validationEngine.settings.ajaxSubmitFile, async: true, data: a(b).serialize() + "&" + extraData, error: function(f, e) { a.validationEngine.debug("error in the ajax: " + f.status + " " + e) }, success: function(f) {
    if (f == "true") {
        a(b).css("opacity", 1); a(b).animate({ opacity: 0, height: 0 }, function() {
            a(b).css("display", "none"); a(b).before("<div class='ajaxSubmit'>" + a.validationEngine.settings.ajaxSubmitMessage + "</div>"); a.validationEngine.closePrompt(".formError", true); a(".ajaxSubmit").show("slow");
            if (a.validationEngine.settings.success) { a.validationEngine.settings.success && a.validationEngine.settings.success(); return false } 
        })
    } else {
        f = eval("(" + f + ")"); f.jsonValidateReturn || a.validationEngine.debug("you are not going into the success fonction and jsonValidateReturn return nothing"); errorNumber = f.jsonValidateReturn.length; for (index = 0; index < errorNumber; index++) {
            fieldId = f.jsonValidateReturn[index][0]; promptError = f.jsonValidateReturn[index][1]; type = f.jsonValidateReturn[index][2]; a.validationEngine.buildPrompt(fieldId,
promptError, type)
        } 
    } 
} 
}); return true
        } if (a.validationEngine.settings.beforeSuccess()) return true; else if (a.validationEngine.settings.success) { a.validationEngine.settings.unbindEngine && a(b).unbind("submit"); a.validationEngine.settings.success && a.validationEngine.settings.success(); return true } return false
    }, buildPrompt: function(b, f, e, c) {
        a.validationEngine.settings || a.validationEngine.defaultSetting(); deleteItself = "." + a(b).attr("id") + "formError"; if (a(deleteItself)[0]) { a(deleteItself).stop(); a(deleteItself).remove() } var h =
document.createElement("div"), d = document.createElement("div"); linkTofield = a.validationEngine.linkTofield(b); a(h).addClass("formError"); e == "pass" && a(h).addClass("greenPopup"); e == "load" && a(h).addClass("blackPopup"); c && a(h).addClass("ajaxed"); a(h).addClass(linkTofield); a(d).addClass("formErrorContent"); a.validationEngine.settings.errorClass && a(h).addClass(a.validationEngine.settings.errorClass); a.validationEngine.settings.containerOverflow ? a(b).before(h) : a("body").append(h); a(h).append(d); if (a.validationEngine.showTriangle !=
false) {
            var g = document.createElement("div"); a(g).addClass("formErrorArrow"); a(h).append(g); if (a.validationEngine.settings.promptPosition == "bottomLeft" || a.validationEngine.settings.promptPosition == "bottomRight") { a(g).addClass("formErrorArrowBottom"); a(g).html('<div class="line1"><!-- --\></div><div class="line2"><!-- --\></div><div class="line3"><!-- --\></div><div class="line4"><!-- --\></div><div class="line5"><!-- --\></div><div class="line6"><!-- --\></div><div class="line7"><!-- --\></div><div class="line8"><!-- --\></div><div class="line9"><!-- --\></div><div class="line10"><!-- --\></div>') } if (a.validationEngine.settings.promptPosition ==
"topLeft" || a.validationEngine.settings.promptPosition == "topRight") { a(h).append(g); a(g).html('<div class="line10"><!-- --\></div><div class="line9"><!-- --\></div><div class="line8"><!-- --\></div><div class="line7"><!-- --\></div><div class="line6"><!-- --\></div><div class="line5"><!-- --\></div><div class="line4"><!-- --\></div><div class="line3"><!-- --\></div><div class="line2"><!-- --\></div><div class="line1"><!-- --\></div>') } 
        } a(d).html(f); b = a.validationEngine.calculatePosition(b, f, e, c, h);
        b.callerTopPosition += "px"; b.callerleftPosition += "px"; b.marginTopSize += "px"; a(h).css({ top: b.callerTopPosition, left: b.callerleftPosition, marginTop: b.marginTopSize, opacity: 0 }); return a(h).animate({ opacity: 0.87 }, function() { return true })
    }, updatePromptText: function(b, f, e, c) {
        linkTofield = a.validationEngine.linkTofield(b); var h = "." + linkTofield; e == "pass" ? a(h).addClass("greenPopup") : a(h).removeClass("greenPopup"); e == "load" ? a(h).addClass("blackPopup") : a(h).removeClass("blackPopup"); c ? a(h).addClass("ajaxed") :
a(h).removeClass("ajaxed"); a(h).find(".formErrorContent").html(f); b = a.validationEngine.calculatePosition(b, f, e, c, h); b.callerTopPosition += "px"; b.callerleftPosition += "px"; b.marginTopSize += "px"; a(h).animate({ top: b.callerTopPosition, marginTop: b.marginTopSize })
    }, calculatePosition: function(b, f, e, c, h) {
        if (a.validationEngine.settings.containerOverflow) { callerleftPosition = callerTopPosition = 0; callerWidth = a(b).width(); inputHeight = a(h).height(); f = "-" + inputHeight } else {
            callerTopPosition = a(b).offset().top; callerleftPosition =
a(b).offset().left; callerWidth = a(b).width(); inputHeight = a(h).height(); f = 0
        } if (a.validationEngine.settings.promptPosition == "topRight") if (a.validationEngine.settings.containerOverflow) callerleftPosition += callerWidth - 30; else { callerleftPosition += callerWidth - 30; callerTopPosition += -inputHeight } if (a.validationEngine.settings.promptPosition == "topLeft") callerTopPosition += -inputHeight - 10; if (a.validationEngine.settings.promptPosition == "centerRight") callerleftPosition += callerWidth + 13; if (a.validationEngine.settings.promptPosition ==
"bottomLeft") { callerHeight = a(b).height(); callerTopPosition = callerTopPosition + callerHeight + 15 } if (a.validationEngine.settings.promptPosition == "bottomRight") { callerHeight = a(b).height(); callerleftPosition += callerWidth - 30; callerTopPosition += callerHeight + 5 } return { callerTopPosition: callerTopPosition, callerleftPosition: callerleftPosition, marginTopSize: f}
    }, linkTofield: function(b) { b = a(b).attr("id") + "formError"; b = b.replace(/\[/g, ""); return b = b.replace(/\]/g, "") }, closePrompt: function(b, f) {
        a.validationEngine.settings ||
a.validationEngine.defaultSetting(); if (f) { a(b).fadeTo("fast", 0, function() { a(b).remove() }); return false } if (typeof ajaxValidate == "undefined") ajaxValidate = false; if (!ajaxValidate) { linkTofield = a.validationEngine.linkTofield(b); closingPrompt = "." + linkTofield; a(closingPrompt).fadeTo("fast", 0, function() { a(closingPrompt).remove() }) } 
    }, debug: function(b) {
        a("#debugMode")[0] || a("body").append("<div id='debugMode'><div class='debugError'><strong>This is a debug mode, you got a problem with your form, it will try to help you, refresh when you think you nailed down the problem</strong></div></div>");
        a(".debugError").append("<div class='debugerror'>" + b + "</div>")
    }, submitValidation: function(b) {
        var f = false; a.validationEngine.ajaxValid = true; a(b).find("[class*=validate]").size(); a(b).find("[class*=validate]").each(function() { linkTofield = a.validationEngine.linkTofield(this); if (!a(this).is(":hidden") && !a("." + linkTofield).hasClass("ajaxed")) return a.validationEngine.loadValidation(this) ? f = true : "" }); ajaxErrorLength = a.validationEngine.ajaxValidArray.length; for (x = 0; x < ajaxErrorLength; x++) if (a.validationEngine.ajaxValidArray[x][1] ==
false) a.validationEngine.ajaxValid = false; if (f || !a.validationEngine.ajaxValid) {
            if (a.validationEngine.settings.scroll) if (a.validationEngine.settings.containerOverflow) { c = a(".formError:not('.greenPopup'):first").offset().top; b = a(a.validationEngine.settings.containerOverflowDOM).scrollTop(); var e = -parseInt(a(a.validationEngine.settings.containerOverflowDOM).offset().top); c = b + c + e - 5; a(a.validationEngine.settings.containerOverflowDOM + ":not(:animated)").animate({ scrollTop: c }, 1100) } else {
                var c = a(".formError:not('.greenPopup'):first").offset().top;
                a(".formError:not('.greenPopup')").each(function() { testDestination = a(this).offset().top; if (c > testDestination) c = a(this).offset().top }); a("html:not(:animated),body:not(:animated)").animate({ scrollTop: c }, 1100)
            } return true
        } else return false
    } }
    })(jQuery);
    (function(a) {
        a.fn.validationEngineLanguage = function() { }; a.validationEngineLanguage = { newLang: function() {
            a.validationEngineLanguage.allRules = { required: { regex: "none", alertText: "* This field is required", alertTextCheckboxMultiple: "* Please select an option", alertTextCheckboxe: "* This checkbox is required" }, length: { regex: "none", alertText: "*Between ", alertText2: " and ", alertText3: " characters allowed" }, maxCheckbox: { regex: "none", alertText: "* Checks allowed Exceeded" }, minCheckbox: { regex: "none", alertText: "* Please select ",
                alertText2: " options"
            }, confirm: { regex: "none", alertText: "* Your field is not matching" }, telephone: { regex: "/^[0-9-() ]+$/", alertText: "* Invalid phone number" }, email: { regex: "/^[a-zA-Z0-9_.-]+@([a-zA-Z0-9-]+.)+[a-zA-Z0-9]{2,4}$/", alertText: "* Invalid email address" }, date: { regex: "/^[0-9]{4}-[0-9]{1,2}-[0-9]{1,2}$/", alertText: "* Invalid date, must be in YYYY-MM-DD format" }, onlyNumber: { regex: "/^[0-9 ]+$/", alertText: "* Numbers only" }, noSpecialCaracters: { regex: "/^[0-9a-zA-Z]+$/", alertText: "* No special characters allowed" },
                ajaxUser: { file: "validateUser.php", extraData: "name=eric", alertTextOk: "* This user is available", alertTextLoad: "* Loading, please wait", alertText: "* This user is already taken" }, ajaxName: { file: "validateUser.php", alertText: "* This name is already taken", alertTextOk: "* This name is available", alertTextLoad: "* Loading, please wait" }, onlyLetter: { regex: "/^[a-zA-Z ']+$/", alertText: "* Letters only" }, validate2fields: { nname: "validate2fields", alertText: "* You must have a firstname and a lastname" }, validateExpDate: { nname: "validateExpDate",
                    alertText: "* The expiration date is in the past"}}
                } }
        })(jQuery); $(document).ready(function() { $.validationEngineLanguage.newLang() }); var cure = { ACTIVITY_STREAM_ENABLED: false, REQUEST_URI: "", HTTP_REFERER: "" };
        (function(a) {
            a.fn.extend({ maskPassword: function(b) {
                return this.each(function() {
                    var f = function() { if (h.data("masked")) { h.html("Mask password"); e.hide(); c.show(); e.val(c.val()); h.data("masked", false) } else { h.html("Unmask password"); c.hide(); e.show(); c.val(e.val()); h.data("masked", true) } return false }, e = function(d) { d = a(d); var g = a("<input type='password' />"); g.insertAfter(d).attr({ id: d.attr("id") + "_mask", "class": d.attr("class"), style: d.attr("style") }); g.hide(); return g } (this), c = a(this), h = a(b); h.toggle(f,
f); c.keyup(function() { e.val(c.val()) }); e.keyup(function() { c.val(e.val()) })
                })
            } 
            })
        })(jQuery);
        jQuery.cookie = function(a, b, f) {
            if (typeof b != "undefined") { f = f || {}; if (b === null) { b = ""; f.expires = -1 } var e = ""; if (f.expires && (typeof f.expires == "number" || f.expires.toUTCString)) { if (typeof f.expires == "number") { e = new Date; e.setTime(e.getTime() + f.expires * 24 * 60 * 60 * 1E3) } else e = f.expires; e = "; expires=" + e.toUTCString() } var c = f.path ? "; path=" + f.path : "", h = f.domain ? "; domain=" + f.domain : ""; f = f.secure ? "; secure" : ""; document.cookie = [a, "=", encodeURIComponent(b), e, c, h, f].join("") } else {
                b = null; if (document.cookie && document.cookie !=
"") { f = document.cookie.split(";"); for (e = 0; e < f.length; e++) { c = jQuery.trim(f[e]); if (c.substring(0, a.length + 1) == a + "=") { b = decodeURIComponent(c.substring(a.length + 1)); break } } } return b
            } 
        };
        (function(a) {
            a.fn.hoverIntent = function(b, f) {
                var e = { sensitivity: 7, interval: 100, timeout: 0 }; e = a.extend(e, f ? { over: b, out: f} : b); var c, h, d, g, m = function(r) { c = r.pageX; h = r.pageY }, o = function(r, v) { v.hoverIntent_t = clearTimeout(v.hoverIntent_t); if (Math.abs(d - c) + Math.abs(g - h) < e.sensitivity) { a(v).unbind("mousemove", m); v.hoverIntent_s = 1; return e.over.apply(v, [r]) } else { d = c; g = h; v.hoverIntent_t = setTimeout(function() { o(r, v) }, e.interval) } }, u = function(r) {
                    for (var v = (r.type == "mouseover" ? r.fromElement : r.toElement) || r.relatedTarget; v &&
v != this; ) try { v = v.parentNode } catch (w) { v = this } if (v == this) return false; var k = jQuery.extend({}, r), l = this; if (l.hoverIntent_t) l.hoverIntent_t = clearTimeout(l.hoverIntent_t); if (r.type == "mouseover") { d = k.pageX; g = k.pageY; a(l).bind("mousemove", m); if (l.hoverIntent_s != 1) l.hoverIntent_t = setTimeout(function() { o(k, l) }, e.interval) } else { a(l).unbind("mousemove", m); if (l.hoverIntent_s == 1) l.hoverIntent_t = setTimeout(function() { l.hoverIntent_t = clearTimeout(l.hoverIntent_t); l.hoverIntent_s = 0; e.out.apply(l, [k]) }, e.timeout) } 
                };
                return this.mouseover(u).mouseout(u)
            } 
        })(jQuery);
        var dateFormat = function() {
            var a = /d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g, b = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g, f = /[^-+\dA-Z]/g, e = function(c, h) { c = String(c); for (h = h || 2; c.length < h; ) c = "0" + c; return c }; return function(c, h, d) {
                var g = dateFormat; if (arguments.length == 1 && Object.prototype.toString.call(c) == "[object String]" && !/\d/.test(c)) { h = c; c = undefined } c = c ? new Date(c) : new Date; if (isNaN(c)) throw SyntaxError("invalid date");
                h = String(g.masks[h] || h || g.masks["default"]); if (h.slice(0, 4) == "UTC:") { h = h.slice(4); d = true } var m = d ? "getUTC" : "get", o = c[m + "Date"](), u = c[m + "Day"](), r = c[m + "Month"](), v = c[m + "FullYear"](), w = c[m + "Hours"](), k = c[m + "Minutes"](), l = c[m + "Seconds"](); m = c[m + "Milliseconds"](); var q = d ? 0 : c.getTimezoneOffset(), s = { d: o, dd: e(o), ddd: g.i18n.dayNames[u], dddd: g.i18n.dayNames[u + 7], m: r + 1, mm: e(r + 1), mmm: g.i18n.monthNames[r], mmmm: g.i18n.monthNames[r + 12], yy: String(v).slice(2), yyyy: v, h: w % 12 || 12, hh: e(w % 12 || 12), H: w, HH: e(w), M: k, MM: e(k),
                    s: l, ss: e(l), l: e(m, 3), L: e(m > 99 ? Math.round(m / 10) : m), t: w < 12 ? "a" : "p", tt: w < 12 ? "am" : "pm", T: w < 12 ? "A" : "P", TT: w < 12 ? "AM" : "PM", Z: d ? "UTC" : (String(c).match(b) || [""]).pop().replace(f, ""), o: (q > 0 ? "-" : "+") + e(Math.floor(Math.abs(q) / 60) * 100 + Math.abs(q) % 60, 4), S: ["th", "st", "nd", "rd"][o % 10 > 3 ? 0 : (o % 100 - o % 10 != 10) * o % 10]
                }; return h.replace(a, function(t) { return t in s ? s[t] : t.slice(1, t.length - 1) })
            } 
        } ();
        dateFormat.masks = { "default": "ddd mmm dd yyyy HH:MM:ss", shortDate: "m/d/yy", mediumDate: "mmm d, yyyy", longDate: "mmmm d, yyyy", fullDate: "dddd, mmmm d, yyyy", shortTime: "h:MM TT", mediumTime: "h:MM:ss TT", longTime: "h:MM:ss TT Z", isoDate: "yyyy-mm-dd", isoTime: "HH:MM:ss", isoDateTime: "yyyy-mm-dd'T'HH:MM:ss", isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'" };
        dateFormat.i18n = { dayNames: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], monthNames: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"] }; Date.prototype.format = function(a, b) { return dateFormat(this, a, b) };
        (function(a) {
            function b(k) { a.fn.cycle.debug && f(k) } function f() { window.console && window.console.log && window.console.log("[cycle] " + Array.prototype.join.call(arguments, " ")) } function e(k, l, q) {
                if (k.cycleStop == undefined) k.cycleStop = 0; if (l === undefined || l === null) l = {}; if (l.constructor == String) {
                    switch (l) {
                        case "stop": k.cycleStop++; k.cycleTimeout && clearTimeout(k.cycleTimeout); k.cycleTimeout = 0; a(k).removeData("cycle.opts"); return false; case "pause": k.cyclePause = 1; return false; case "resume": k.cyclePause = 0; if (q ===
true) { l = a(k).data("cycle.opts"); if (!l) { f("options not found, can not resume"); return false } if (k.cycleTimeout) { clearTimeout(k.cycleTimeout); k.cycleTimeout = 0 } o(l.elements, l, 1, 1) } return false; case "prev": case "next": k = a(k).data("cycle.opts"); if (!k) { f('options not found, "prev/next" ignored'); return false } a.fn.cycle[l](k); return false; default: l = { fx: l}
                    } return l
                } else if (l.constructor == Number) {
                    var s = l; l = a(k).data("cycle.opts"); if (!l) { f("options not found, can not advance slide"); return false } if (s < 0 || s >=
l.elements.length) { f("invalid slide index: " + s); return false } l.nextSlide = s; if (k.cycleTimeout) { clearTimeout(k.cycleTimeout); k.cycleTimeout = 0 } if (typeof q == "string") l.oneTimeFx = q; o(l.elements, l, 1, s >= l.currSlide); return false
                } return l
            } function c(k, l) { if (!a.support.opacity && l.cleartype && k.style.filter) try { k.style.removeAttribute("filter") } catch (q) { } } function h(k, l, q, s, t) {
                var n = a.extend({}, a.fn.cycle.defaults, s || {}, a.metadata ? k.metadata() : a.meta ? k.data() : {}); if (n.autostop) n.countdown = n.autostopCount || q.length;
                var y = k[0]; k.data("cycle.opts", n); n.$cont = k; n.stopCount = y.cycleStop; n.elements = q; n.before = n.before ? [n.before] : []; n.after = n.after ? [n.after] : []; n.after.unshift(function() { n.busy = 0 }); !a.support.opacity && n.cleartype && n.after.push(function() { c(this, n) }); n.continuous && n.after.push(function() { o(q, n, 0, !n.rev) }); d(n); !a.support.opacity && n.cleartype && !n.cleartypeNoBg && w(l); k.css("position") == "static" && k.css("position", "relative"); n.width && k.width(n.width); n.height && n.height != "auto" && k.height(n.height); if (n.startingSlide) n.startingSlide =
parseInt(n.startingSlide); if (n.random) { n.randomMap = []; for (y = 0; y < q.length; y++) n.randomMap.push(y); n.randomMap.sort(function() { return Math.random() - 0.5 }); n.randomIndex = 0; n.startingSlide = n.randomMap[0] } else if (n.startingSlide >= q.length) n.startingSlide = 0; n.currSlide = n.startingSlide = n.startingSlide || 0; var z = n.startingSlide; l.css({ position: "absolute", top: 0, left: 0 }).hide().each(function(E) { E = z ? E >= z ? q.length - (E - z) : z - E : q.length - E; a(this).css("z-index", E) }); a(q[z]).css("opacity", 1).show(); c(q[z], n); n.fit &&
n.width && l.width(n.width); n.fit && n.height && n.height != "auto" && l.height(n.height); if (n.containerResize && !k.innerHeight()) { for (var B = y = 0, G = 0; G < q.length; G++) { var A = a(q[G]), F = A[0], C = A.outerWidth(); A = A.outerHeight(); if (!C) C = F.offsetWidth; if (!A) A = F.offsetHeight; y = C > y ? C : y; B = A > B ? A : B } y > 0 && B > 0 && k.css({ width: y + "px", height: B + "px" }) } n.pause && k.hover(function() { this.cyclePause++ }, function() { this.cyclePause-- }); if (g(n) === false) return false; var D = false; s.requeueAttempts = s.requeueAttempts || 0; l.each(function() {
    var E =
a(this); this.cycleH = n.fit && n.height ? n.height : E.height(); this.cycleW = n.fit && n.width ? n.width : E.width(); if (E.is("img")) {
        E = a.browser.mozilla && this.cycleW == 34 && this.cycleH == 19 && !this.complete; var H = a.browser.opera && (this.cycleW == 42 && this.cycleH == 19 || this.cycleW == 37 && this.cycleH == 17) && !this.complete, I = this.cycleH == 0 && this.cycleW == 0 && !this.complete; if (a.browser.msie && this.cycleW == 28 && this.cycleH == 30 && !this.complete || E || H || I) if (t.s && n.requeueOnImageNotLoaded && ++s.requeueAttempts < 100) {
            f(s.requeueAttempts,
" - img slide not loaded, requeuing slideshow: ", this.src, this.cycleW, this.cycleH); setTimeout(function() { a(t.s, t.c).cycle(s) }, n.requeueTimeout); D = true; return false
        } else f("could not determine size of image: " + this.src, this.cycleW, this.cycleH)
    } return true
}); if (D) return false; n.cssBefore = n.cssBefore || {}; n.animIn = n.animIn || {}; n.animOut = n.animOut || {}; l.not(":eq(" + z + ")").css(n.cssBefore); n.cssFirst && a(l[z]).css(n.cssFirst); if (n.timeout) {
                    n.timeout = parseInt(n.timeout); if (n.speed.constructor == String) n.speed =
a.fx.speeds[n.speed] || parseInt(n.speed); for (n.sync || (n.speed /= 2); n.timeout - n.speed < 250; ) n.timeout += n.speed
                } if (n.easing) n.easeIn = n.easeOut = n.easing; if (!n.speedIn) n.speedIn = n.speed; if (!n.speedOut) n.speedOut = n.speed; n.slideCount = q.length; n.currSlide = n.lastSlide = z; if (n.random) { n.nextSlide = n.currSlide; if (++n.randomIndex == q.length) n.randomIndex = 0; n.nextSlide = n.randomMap[n.randomIndex] } else n.nextSlide = n.startingSlide >= q.length - 1 ? 0 : n.startingSlide + 1; if (!n.multiFx) {
                    y = a.fn.cycle.transitions[n.fx]; if (a.isFunction(y)) y(k,
l, n); else if (n.fx != "custom" && !n.multiFx) { f("unknown transition: " + n.fx, "; slideshow terminating"); return false } 
                } k = l[z]; n.before.length && n.before[0].apply(k, [k, k, n, true]); n.after.length > 1 && n.after[1].apply(k, [k, k, n, true]); n.next && a(n.next).bind(n.prevNextEvent, function() { return r(n, n.rev ? -1 : 1) }); n.prev && a(n.prev).bind(n.prevNextEvent, function() { return r(n, n.rev ? 1 : -1) }); n.pager && v(q, n); m(n, q); return n
            } function d(k) {
                k.original = { before: [], after: [] }; k.original.cssBefore = a.extend({}, k.cssBefore); k.original.cssAfter =
a.extend({}, k.cssAfter); k.original.animIn = a.extend({}, k.animIn); k.original.animOut = a.extend({}, k.animOut); a.each(k.before, function() { k.original.before.push(this) }); a.each(k.after, function() { k.original.after.push(this) })
            } function g(k) {
                var l, q, s = a.fn.cycle.transitions; if (k.fx.indexOf(",") > 0) {
                    k.multiFx = true; k.fxs = k.fx.replace(/\s*/g, "").split(","); for (l = 0; l < k.fxs.length; l++) {
                        var t = k.fxs[l]; q = s[t]; if (!q || !s.hasOwnProperty(t) || !a.isFunction(q)) {
                            f("discarding unknown transition: ", t); k.fxs.splice(l, 1);
                            l--
                        } 
                    } if (!k.fxs.length) { f("No valid transitions named; slideshow terminating."); return false } 
                } else if (k.fx == "all") { k.multiFx = true; k.fxs = []; for (p in s) { q = s[p]; s.hasOwnProperty(p) && a.isFunction(q) && k.fxs.push(p) } } if (k.multiFx && k.randomizeEffects) { q = Math.floor(Math.random() * 20) + 30; for (l = 0; l < q; l++) k.fxs.push(k.fxs.splice(Math.floor(Math.random() * k.fxs.length), 1)[0]); b("randomized fx sequence: ", k.fxs) } return true
            } function m(k, l) {
                k.addSlide = function(q, s) {
                    var t = a(q), n = t[0]; k.autostopCount || k.countdown++;
                    l[s ? "unshift" : "push"](n); if (k.els) k.els[s ? "unshift" : "push"](n); k.slideCount = l.length; t.css("position", "absolute"); t[s ? "prependTo" : "appendTo"](k.$cont); if (s) { k.currSlide++; k.nextSlide++ } !a.support.opacity && k.cleartype && !k.cleartypeNoBg && w(t); k.fit && k.width && t.width(k.width); k.fit && k.height && k.height != "auto" && $slides.height(k.height); n.cycleH = k.fit && k.height ? k.height : t.height(); n.cycleW = k.fit && k.width ? k.width : t.width(); t.css(k.cssBefore); k.pager && a.fn.cycle.createPagerAnchor(l.length - 1, n, a(k.pager),
l, k); a.isFunction(k.onAddSlide) ? k.onAddSlide(t) : t.hide()
                } 
            } function o(k, l, q, s) {
                if (q && l.busy && l.manualTrump) { a(k).stop(true, true); l.busy = false } if (!l.busy) {
                    var t = l.$cont[0], n = k[l.currSlide], y = k[l.nextSlide]; if (!(t.cycleStop != l.stopCount || t.cycleTimeout === 0 && !q)) if (!q && !t.cyclePause && (l.autostop && --l.countdown <= 0 || l.nowrap && !l.random && l.nextSlide < l.currSlide)) l.end && l.end(l); else {
                        if (q || !t.cyclePause) {
                            var z = l.fx; n.cycleH = n.cycleH || a(n).height(); n.cycleW = n.cycleW || a(n).width(); y.cycleH = y.cycleH || a(y).height();
                            y.cycleW = y.cycleW || a(y).width(); if (l.multiFx) { if (l.lastFx == undefined || ++l.lastFx >= l.fxs.length) l.lastFx = 0; z = l.fxs[l.lastFx]; l.currFx = z } if (l.oneTimeFx) { z = l.oneTimeFx; l.oneTimeFx = null } a.fn.cycle.resetState(l, z); l.before.length && a.each(l.before, function(B, G) { t.cycleStop == l.stopCount && G.apply(y, [n, y, l, s]) }); z = function() { a.each(l.after, function(B, G) { t.cycleStop == l.stopCount && G.apply(y, [n, y, l, s]) }) }; if (l.nextSlide != l.currSlide) {
                                l.busy = 1; if (l.fxFn) l.fxFn(n, y, l, z, s); else a.isFunction(a.fn.cycle[l.fx]) ? a.fn.cycle[l.fx](n,
y, l, z) : a.fn.cycle.custom(n, y, l, z, q && l.fastOnEvent)
                            } l.lastSlide = l.currSlide; if (l.random) { l.currSlide = l.nextSlide; if (++l.randomIndex == k.length) l.randomIndex = 0; l.nextSlide = l.randomMap[l.randomIndex] } else { q = l.nextSlide + 1 == k.length; l.nextSlide = q ? 0 : l.nextSlide + 1; l.currSlide = q ? k.length - 1 : l.nextSlide - 1 } l.pager && a.fn.cycle.updateActivePagerLink(l.pager, l.currSlide)
                        } q = 0; if (l.timeout && !l.continuous) q = u(n, y, l, s); else if (l.continuous && t.cyclePause) q = 10; if (q > 0) t.cycleTimeout = setTimeout(function() { o(k, l, 0, !l.rev) },
q)
                    } 
                } 
            } function u(k, l, q, s) { if (q.timeoutFn) { for (k = q.timeoutFn(k, l, q, s); k - q.speed < 250; ) k += q.speed; b("calculated timeout: " + k + "; speed: " + q.speed); if (k !== false) return k } return q.timeout } function r(k, l) {
                var q = k.elements, s = k.$cont[0], t = s.cycleTimeout; if (t) { clearTimeout(t); s.cycleTimeout = 0 } if (k.random && l < 0) { k.randomIndex--; if (--k.randomIndex == -2) k.randomIndex = q.length - 2; else if (k.randomIndex == -1) k.randomIndex = q.length - 1; k.nextSlide = k.randomMap[k.randomIndex] } else if (k.random) {
                    if (++k.randomIndex == q.length) k.randomIndex =
0; k.nextSlide = k.randomMap[k.randomIndex]
                } else { k.nextSlide = k.currSlide + l; if (k.nextSlide < 0) { if (k.nowrap) return false; k.nextSlide = q.length - 1 } else if (k.nextSlide >= q.length) { if (k.nowrap) return false; k.nextSlide = 0 } } a.isFunction(k.prevNextClick) && k.prevNextClick(l > 0, k.nextSlide, q[k.nextSlide]); o(q, k, 1, l >= 0); return false
            } function v(k, l) { var q = a(l.pager); a.each(k, function(s, t) { a.fn.cycle.createPagerAnchor(s, t, q, k, l) }); a.fn.cycle.updateActivePagerLink(l.pager, l.startingSlide) } function w(k) {
                function l(s) {
                    s =
parseInt(s).toString(16); return s.length < 2 ? "0" + s : s
                } function q(s) { for (; s && s.nodeName.toLowerCase() != "html"; s = s.parentNode) { var t = a.css(s, "background-color"); if (t.indexOf("rgb") >= 0) { s = t.match(/\d+/g); return "#" + l(s[0]) + l(s[1]) + l(s[2]) } if (t && t != "transparent") return t } return "#ffffff" } k.each(function() { a(this).css("background-color", q(this)) })
            } if (a.support == undefined) a.support = { opacity: !a.browser.msie }; a.fn.cycle = function(k, l) {
                var q = { s: this.selector, c: this.context }; if (this.length === 0 && k != "stop") {
                    if (!a.isReady &&
q.s) { f("DOM not ready, queuing slideshow"); a(function() { a(q.s, q.c).cycle(k, l) }); return this } f("terminating; zero elements found by selector" + (a.isReady ? "" : " (DOM not ready)")); return this
                } return this.each(function() {
                    var s = e(this, k, l); if (s !== false) {
                        this.cycleTimeout && clearTimeout(this.cycleTimeout); this.cycleTimeout = this.cyclePause = 0; var t = a(this), n = s.slideExpr ? a(s.slideExpr, this) : t.children(), y = n.get(); if (y.length < 2) f("terminating; too few slides: " + y.length); else {
                            var z = h(t, n, y, s, q); if (z !== false) if (s =
z.continuous ? 10 : u(z.currSlide, z.nextSlide, z, !z.rev)) { s += z.delay || 0; if (s < 10) s = 10; b("first timeout: " + s); this.cycleTimeout = setTimeout(function() { o(y, z, 0, !z.rev) }, s) } 
                        } 
                    } 
                })
            }; a.fn.cycle.resetState = function(k, l) {
                l = l || k.fx; k.before = []; k.after = []; k.cssBefore = a.extend({}, k.original.cssBefore); k.cssAfter = a.extend({}, k.original.cssAfter); k.animIn = a.extend({}, k.original.animIn); k.animOut = a.extend({}, k.original.animOut); k.fxFn = null; a.each(k.original.before, function() { k.before.push(this) }); a.each(k.original.after,
function() { k.after.push(this) }); var q = a.fn.cycle.transitions[l]; a.isFunction(q) && q(k.$cont, a(k.elements), k)
            }; a.fn.cycle.updateActivePagerLink = function(k, l) { a(k).each(function() { a(this).find("a").removeClass("activeSlide").filter("a:eq(" + l + ")").addClass("activeSlide") }) }; a.fn.cycle.next = function(k) { r(k, k.rev ? -1 : 1) }; a.fn.cycle.prev = function(k) { r(k, k.rev ? 1 : -1) }; a.fn.cycle.createPagerAnchor = function(k, l, q, s, t) {
                if (l = a.isFunction(t.pagerAnchorBuilder) ? t.pagerAnchorBuilder(k, l) : '<a href="#">' + (k + 1) + "</a>") {
                    var n =
a(l); if (n.parents("body").length === 0) { var y = []; if (q.length > 1) { q.each(function() { var z = n.clone(true); a(this).append(z); y.push(z[0]) }); n = a(y) } else n.appendTo(q) } n.bind(t.pagerEvent, function(z) { z.preventDefault(); t.nextSlide = k; z = t.$cont[0]; var B = z.cycleTimeout; if (B) { clearTimeout(B); z.cycleTimeout = 0 } a.isFunction(t.pagerClick) && t.pagerClick(t.nextSlide, s[t.nextSlide]); o(s, t, 1, t.currSlide < k); return false }); t.pagerEvent != "click" && n.click(function() { return false }); t.pauseOnPagerHover && n.hover(function() { t.$cont[0].cyclePause++ },
function() { t.$cont[0].cyclePause-- })
                } 
            }; a.fn.cycle.hopsFromLast = function(k, l) { var q = k.lastSlide, s = k.currSlide; return l ? s > q ? s - q : k.slideCount - q : s < q ? q - s : q + k.slideCount - s }; a.fn.cycle.commonReset = function(k, l, q, s, t, n) {
                a(q.elements).not(k).hide(); q.cssBefore.opacity = 1; q.cssBefore.display = "block"; if (s !== false && l.cycleW > 0) q.cssBefore.width = l.cycleW; if (t !== false && l.cycleH > 0) q.cssBefore.height = l.cycleH; q.cssAfter = q.cssAfter || {}; q.cssAfter.display = "none"; a(k).css("zIndex", q.slideCount + (n === true ? 1 : 0)); a(l).css("zIndex",
q.slideCount + (n === true ? 0 : 1))
            }; a.fn.cycle.custom = function(k, l, q, s, t) { var n = a(k), y = a(l), z = q.speedIn; k = q.speedOut; var B = q.easeIn; l = q.easeOut; y.css(q.cssBefore); if (t) { z = typeof t == "number" ? k = t : k = 1; B = l = null } n.animate(q.animOut, k, l, function() { q.cssAfter && n.css(q.cssAfter); q.sync || y.animate(q.animIn, z, B, s) }); q.sync && y.animate(q.animIn, z, B, s) }; a.fn.cycle.transitions = { fade: function(k, l, q) {
                l.not(":eq(" + q.currSlide + ")").css("opacity", 0); q.before.push(function(s, t, n) {
                    a.fn.cycle.commonReset(s, t, n); n.cssBefore.opacity =
0
                }); q.animIn = { opacity: 1 }; q.animOut = { opacity: 0 }; q.cssBefore = { top: 0, left: 0}
            } 
            }; a.fn.cycle.ver = function() { return "2.73" }; a.fn.cycle.defaults = { fx: "fade", timeout: 4E3, timeoutFn: null, continuous: 0, speed: 1E3, speedIn: null, speedOut: null, next: null, prev: null, prevNextClick: null, prevNextEvent: "click", pager: null, pagerClick: null, pagerEvent: "click", pagerAnchorBuilder: null, before: null, after: null, end: null, easing: null, easeIn: null, easeOut: null, shuffle: null, animIn: null, animOut: null, cssBefore: null, cssAfter: null, fxFn: null,
                height: "auto", startingSlide: 0, sync: 1, random: 0, fit: 0, containerResize: 1, pause: 0, pauseOnPagerHover: 0, autostop: 0, autostopCount: 0, delay: 0, slideExpr: null, cleartype: !a.support.opacity, cleartypeNoBg: false, nowrap: 0, fastOnEvent: 0, randomizeEffects: 1, rev: 0, manualTrump: true, requeueOnImageNotLoaded: true, requeueTimeout: 250}
            })(jQuery);
            (function(a) {
                a.fn.cycle.transitions.none = function(b, f, e) { e.fxFn = function(c, h, d, g) { a(h).show(); a(c).hide(); g() } }; a.fn.cycle.transitions.scrollUp = function(b, f, e) { b.css("overflow", "hidden"); e.before.push(a.fn.cycle.commonReset); b = b.height(); e.cssBefore = { top: b, left: 0 }; e.cssFirst = { top: 0 }; e.animIn = { top: 0 }; e.animOut = { top: -b} }; a.fn.cycle.transitions.scrollDown = function(b, f, e) {
                    b.css("overflow", "hidden"); e.before.push(a.fn.cycle.commonReset); b = b.height(); e.cssFirst = { top: 0 }; e.cssBefore = { top: -b, left: 0 }; e.animIn =
{ top: 0 }; e.animOut = { top: b}
                }; a.fn.cycle.transitions.scrollLeft = function(b, f, e) { b.css("overflow", "hidden"); e.before.push(a.fn.cycle.commonReset); b = b.width(); e.cssFirst = { left: 0 }; e.cssBefore = { left: b, top: 0 }; e.animIn = { left: 0 }; e.animOut = { left: 0 - b} }; a.fn.cycle.transitions.scrollRight = function(b, f, e) { b.css("overflow", "hidden"); e.before.push(a.fn.cycle.commonReset); b = b.width(); e.cssFirst = { left: 0 }; e.cssBefore = { left: -b, top: 0 }; e.animIn = { left: 0 }; e.animOut = { left: b} }; a.fn.cycle.transitions.scrollHorz = function(b, f,
e) { b.css("overflow", "hidden").width(); e.before.push(function(c, h, d, g) { a.fn.cycle.commonReset(c, h, d); d.cssBefore.left = g ? h.cycleW - 1 : 1 - h.cycleW; d.animOut.left = g ? -c.cycleW : c.cycleW }); e.cssFirst = { left: 0 }; e.cssBefore = { top: 0 }; e.animIn = { left: 0 }; e.animOut = { top: 0} }; a.fn.cycle.transitions.scrollVert = function(b, f, e) {
    b.css("overflow", "hidden"); e.before.push(function(c, h, d, g) { a.fn.cycle.commonReset(c, h, d); d.cssBefore.top = g ? 1 - h.cycleH : h.cycleH - 1; d.animOut.top = g ? c.cycleH : -c.cycleH }); e.cssFirst = { top: 0 }; e.cssBefore =
{ left: 0 }; e.animIn = { top: 0 }; e.animOut = { left: 0}
}; a.fn.cycle.transitions.slideX = function(b, f, e) { e.before.push(function(c, h, d) { a(d.elements).not(c).hide(); a.fn.cycle.commonReset(c, h, d, false, true); d.animIn.width = h.cycleW }); e.cssBefore = { left: 0, top: 0, width: 0 }; e.animIn = { width: "show" }; e.animOut = { width: 0} }; a.fn.cycle.transitions.slideY = function(b, f, e) {
    e.before.push(function(c, h, d) { a(d.elements).not(c).hide(); a.fn.cycle.commonReset(c, h, d, true, false); d.animIn.height = h.cycleH }); e.cssBefore = { left: 0, top: 0, height: 0 };
    e.animIn = { height: "show" }; e.animOut = { height: 0}
}; a.fn.cycle.transitions.shuffle = function(b, f, e) {
    b = b.css("overflow", "visible").width(); f.css({ left: 0, top: 0 }); e.before.push(function(c, h, d) { a.fn.cycle.commonReset(c, h, d, true, true, true) }); if (!e.speedAdjusted) { e.speed /= 2; e.speedAdjusted = true } e.random = 0; e.shuffle = e.shuffle || { left: -b, top: 15 }; e.els = []; for (b = 0; b < f.length; b++) e.els.push(f[b]); for (b = 0; b < e.currSlide; b++) e.els.push(e.els.shift()); e.fxFn = function(c, h, d, g, m) {
        var o = m ? a(c) : a(h); a(h).css(d.cssBefore);
        var u = d.slideCount; o.animate(d.shuffle, d.speedIn, d.easeIn, function() { for (var r = a.fn.cycle.hopsFromLast(d, m), v = 0; v < r; v++) m ? d.els.push(d.els.shift()) : d.els.unshift(d.els.pop()); if (m) { r = 0; for (v = d.els.length; r < v; r++) a(d.els[r]).css("z-index", v - r + u) } else { r = a(c).css("z-index"); o.css("z-index", parseInt(r) + 1 + u) } o.animate({ left: 0, top: 0 }, d.speedOut, d.easeOut, function() { a(m ? this : c).hide(); g && g() }) })
    }; e.cssBefore = { display: "block", opacity: 1, top: 0, left: 0}
}; a.fn.cycle.transitions.turnUp = function(b, f, e) {
    e.before.push(function(c,
h, d) { a.fn.cycle.commonReset(c, h, d, true, false); d.cssBefore.top = h.cycleH; d.animIn.height = h.cycleH }); e.cssFirst = { top: 0 }; e.cssBefore = { left: 0, height: 0 }; e.animIn = { top: 0 }; e.animOut = { height: 0}
}; a.fn.cycle.transitions.turnDown = function(b, f, e) { e.before.push(function(c, h, d) { a.fn.cycle.commonReset(c, h, d, true, false); d.animIn.height = h.cycleH; d.animOut.top = c.cycleH }); e.cssFirst = { top: 0 }; e.cssBefore = { left: 0, top: 0, height: 0 }; e.animOut = { height: 0} }; a.fn.cycle.transitions.turnLeft = function(b, f, e) {
    e.before.push(function(c,
h, d) { a.fn.cycle.commonReset(c, h, d, false, true); d.cssBefore.left = h.cycleW; d.animIn.width = h.cycleW }); e.cssBefore = { top: 0, width: 0 }; e.animIn = { left: 0 }; e.animOut = { width: 0}
}; a.fn.cycle.transitions.turnRight = function(b, f, e) { e.before.push(function(c, h, d) { a.fn.cycle.commonReset(c, h, d, false, true); d.animIn.width = h.cycleW; d.animOut.left = c.cycleW }); e.cssBefore = { top: 0, left: 0, width: 0 }; e.animIn = { left: 0 }; e.animOut = { width: 0} }; a.fn.cycle.transitions.zoom = function(b, f, e) {
    e.before.push(function(c, h, d) {
        a.fn.cycle.commonReset(c,
h, d, false, false, true); d.cssBefore.top = h.cycleH / 2; d.cssBefore.left = h.cycleW / 2; d.animIn = { top: 0, left: 0, width: h.cycleW, height: h.cycleH }; d.animOut = { width: 0, height: 0, top: c.cycleH / 2, left: c.cycleW / 2}
    }); e.cssFirst = { top: 0, left: 0 }; e.cssBefore = { width: 0, height: 0}
}; a.fn.cycle.transitions.fadeZoom = function(b, f, e) {
    e.before.push(function(c, h, d) { a.fn.cycle.commonReset(c, h, d, false, false); d.cssBefore.left = h.cycleW / 2; d.cssBefore.top = h.cycleH / 2; d.animIn = { top: 0, left: 0, width: h.cycleW, height: h.cycleH} }); e.cssBefore = { width: 0,
        height: 0
    }; e.animOut = { opacity: 0}
}; a.fn.cycle.transitions.blindX = function(b, f, e) { b = b.css("overflow", "hidden").width(); e.before.push(function(c, h, d) { a.fn.cycle.commonReset(c, h, d); d.animIn.width = h.cycleW; d.animOut.left = c.cycleW }); e.cssBefore = { left: b, top: 0 }; e.animIn = { left: 0 }; e.animOut = { left: b} }; a.fn.cycle.transitions.blindY = function(b, f, e) {
    b = b.css("overflow", "hidden").height(); e.before.push(function(c, h, d) { a.fn.cycle.commonReset(c, h, d); d.animIn.height = h.cycleH; d.animOut.top = c.cycleH }); e.cssBefore = { top: b,
        left: 0
    }; e.animIn = { top: 0 }; e.animOut = { top: b}
}; a.fn.cycle.transitions.blindZ = function(b, f, e) { f = b.css("overflow", "hidden").height(); b = b.width(); e.before.push(function(c, h, d) { a.fn.cycle.commonReset(c, h, d); d.animIn.height = h.cycleH; d.animOut.top = c.cycleH }); e.cssBefore = { top: f, left: b }; e.animIn = { top: 0, left: 0 }; e.animOut = { top: f, left: b} }; a.fn.cycle.transitions.growX = function(b, f, e) {
    e.before.push(function(c, h, d) {
        a.fn.cycle.commonReset(c, h, d, false, true); d.cssBefore.left = this.cycleW / 2; d.animIn = { left: 0, width: this.cycleW };
        d.animOut = { left: 0}
    }); e.cssBefore = { width: 0, top: 0}
}; a.fn.cycle.transitions.growY = function(b, f, e) { e.before.push(function(c, h, d) { a.fn.cycle.commonReset(c, h, d, true, false); d.cssBefore.top = this.cycleH / 2; d.animIn = { top: 0, height: this.cycleH }; d.animOut = { top: 0} }); e.cssBefore = { height: 0, left: 0} }; a.fn.cycle.transitions.curtainX = function(b, f, e) {
    e.before.push(function(c, h, d) { a.fn.cycle.commonReset(c, h, d, false, true, true); d.cssBefore.left = h.cycleW / 2; d.animIn = { left: 0, width: this.cycleW }; d.animOut = { left: c.cycleW / 2, width: 0} });
    e.cssBefore = { top: 0, width: 0}
}; a.fn.cycle.transitions.curtainY = function(b, f, e) { e.before.push(function(c, h, d) { a.fn.cycle.commonReset(c, h, d, true, false, true); d.cssBefore.top = h.cycleH / 2; d.animIn = { top: 0, height: h.cycleH }; d.animOut = { top: c.cycleH / 2, height: 0} }); e.cssBefore = { left: 0, height: 0} }; a.fn.cycle.transitions.cover = function(b, f, e) {
    var c = e.direction || "left", h = b.css("overflow", "hidden").width(), d = b.height(); e.before.push(function(g, m, o) {
        a.fn.cycle.commonReset(g, m, o); if (c == "right") o.cssBefore.left = -h; else if (c ==
"up") o.cssBefore.top = d; else if (c == "down") o.cssBefore.top = -d; else o.cssBefore.left = h
    }); e.animIn = { left: 0, top: 0 }; e.animOut = { opacity: 1 }; e.cssBefore = { top: 0, left: 0}
}; a.fn.cycle.transitions.uncover = function(b, f, e) {
    var c = e.direction || "left", h = b.css("overflow", "hidden").width(), d = b.height(); e.before.push(function(g, m, o) { a.fn.cycle.commonReset(g, m, o, true, true, true); if (c == "right") o.animOut.left = h; else if (c == "up") o.animOut.top = -d; else if (c == "down") o.animOut.top = d; else o.animOut.left = -h }); e.animIn = { left: 0, top: 0 };
    e.animOut = { opacity: 1 }; e.cssBefore = { top: 0, left: 0}
}; a.fn.cycle.transitions.toss = function(b, f, e) { var c = b.css("overflow", "visible").width(), h = b.height(); e.before.push(function(d, g, m) { a.fn.cycle.commonReset(d, g, m, true, true, true); if (!m.animOut.left && !m.animOut.top) m.animOut = { left: c * 2, top: -h / 2, opacity: 0 }; else m.animOut.opacity = 0 }); e.cssBefore = { left: 0, top: 0 }; e.animIn = { left: 0} }; a.fn.cycle.transitions.wipe = function(b, f, e) {
    var c = b.css("overflow", "hidden").width(), h = b.height(); e.cssBefore = e.cssBefore || {}; var d;
    if (e.clip) if (/l2r/.test(e.clip)) d = "rect(0px 0px " + h + "px 0px)"; else if (/r2l/.test(e.clip)) d = "rect(0px " + c + "px " + h + "px " + c + "px)"; else if (/t2b/.test(e.clip)) d = "rect(0px " + c + "px 0px 0px)"; else if (/b2t/.test(e.clip)) d = "rect(" + h + "px " + c + "px " + h + "px 0px)"; else if (/zoom/.test(e.clip)) { b = parseInt(h / 2); f = parseInt(c / 2); d = "rect(" + b + "px " + f + "px " + b + "px " + f + "px)" } e.cssBefore.clip = e.cssBefore.clip || d || "rect(0px 0px 0px 0px)"; b = e.cssBefore.clip.match(/(\d+)/g); var g = parseInt(b[0]), m = parseInt(b[1]), o = parseInt(b[2]),
u = parseInt(b[3]); e.before.push(function(r, v, w) { if (r != v) { var k = a(r), l = a(v); a.fn.cycle.commonReset(r, v, w, true, true, false); w.cssAfter.display = "block"; var q = 1, s = parseInt(w.speedIn / 13) - 1; (function t() { var n = g ? g - parseInt(q * (g / s)) : 0, y = u ? u - parseInt(q * (u / s)) : 0, z = o < h ? o + parseInt(q * ((h - o) / s || 1)) : h, B = m < c ? m + parseInt(q * ((c - m) / s || 1)) : c; l.css({ clip: "rect(" + n + "px " + B + "px " + z + "px " + y + "px)" }); q++ <= s ? setTimeout(t, 13) : k.css("display", "none") })() } }); e.cssBefore = { display: "block", opacity: 1, top: 0, left: 0 }; e.animIn = { left: 0 };
    e.animOut = { left: 0}
} 
            })(jQuery);
            (function(a) {
                a.fn.charCount = function(b) {
                    function f(e) { var c = a(e).val().length; c = b.allowed - c; c <= b.warning && c >= 0 ? a(e).next().addClass(b.cssWarning) : a(e).next().removeClass(b.cssWarning); if (b.forceLimit) if (c < 0) { a(e).val(a(e).val().substring(0, b.allowed)); c = 0 } c < 0 ? a(e).next().addClass(b.cssExceeded) : a(e).next().removeClass(b.cssExceeded); a(e).next().html(b.counterText + c) } b = a.extend({ allowed: 140, warning: 25, css: "counter", counterElement: "span", cssWarning: "warning", cssExceeded: "exceeded", counterText: "" }, b);
                    this.each(function() { a(this).after("<" + b.counterElement + ' class="' + b.css + '">' + b.counterText + "</" + b.counterElement + ">"); f(this); a(this).keyup(function() { f(this) }); a(this).change(function() { f(this) }) })
                } 
            })(jQuery); (function(a) { a.fn.simpleAlerter = function(b) { var f = this; if (a(f).length) { a(f).fadeIn("fast"); if (b) var e = window.setTimeout(function() { a(f).trigger("click") }, b); a(f).click(function() { window.clearTimeout(e); a(f).fadeOut("slow") }) } } })(jQuery);
            (function(a) {
                var b = a.browser.msie && parseInt(a.browser.version) == 6 && typeof window.XMLHttpRequest != "object", f = null, e = []; a.modal = function(c, h) { return a.modal.impl.init(c, h) }; a.modal.close = function() { a.modal.impl.close() }; a.fn.modal = function(c) { return a.modal.impl.init(this, c) }; a.modal.defaults = { appendTo: "body", focus: true, opacity: 50, overlayId: "simplemodal-overlay", overlayCss: {}, containerId: "simplemodal-container", containerCss: {}, dataId: "simplemodal-data", dataCss: {}, minHeight: 200, minWidth: 300, maxHeight: null,
                    maxWidth: null, autoResize: false, autoPosition: true, zIndex: 1E3, close: true, closeHTML: '<a class="modalCloseImg" title="Close"></a>', closeClass: "simplemodal-close", escClose: true, overlayClose: true, position: null, persist: false, onOpen: null, onShow: null, onClose: null
                }; a.modal.impl = { o: null, d: {}, init: function(c, h) {
                    if (this.d.data) return false; f = a.browser.msie && !a.boxModel; this.o = a.extend({}, a.modal.defaults, h); this.zIndex = this.o.zIndex; this.occb = false; if (typeof c == "object") {
                        c = c instanceof jQuery ? c : a(c); if (c.parent().parent().size() >
0) { this.d.parentNode = c.parent(); if (!this.o.persist) this.d.orig = c.clone(true) } 
                    } else if (typeof c == "string" || typeof c == "number") c = a("<div></div>").html(c); else { alert("SimpleModal Error: Unsupported data type: " + typeof c); return this } this.create(c); this.open(); a.isFunction(this.o.onShow) && this.o.onShow.apply(this, [this.d]); return this
                }, create: function(c) {
                    e = this.getDimensions(); if (b) this.d.iframe = a('<iframe src="javascript:false;"></iframe>').css(a.extend(this.o.iframeCss, { display: "none", opacity: 0, position: "fixed",
                        height: e[0], width: e[1], zIndex: this.o.zIndex, top: 0, left: 0
                    })).appendTo(this.o.appendTo); this.d.overlay = a("<div></div>").attr("id", this.o.overlayId).addClass("simplemodal-overlay").css(a.extend(this.o.overlayCss, { display: "none", opacity: this.o.opacity / 100, height: e[0], width: e[1], position: "fixed", left: 0, top: 0, zIndex: this.o.zIndex + 1 })).appendTo(this.o.appendTo); this.d.container = a("<div></div>").attr("id", this.o.containerId).addClass("simplemodal-container").css(a.extend(this.o.containerCss, { display: "none",
                        position: "fixed", zIndex: this.o.zIndex + 2
                    })).append(this.o.close && this.o.closeHTML ? a(this.o.closeHTML).addClass(this.o.closeClass) : "").appendTo(this.o.appendTo); this.d.wrap = a("<div></div>").attr("tabIndex", -1).addClass("simplemodal-wrap").css({ height: "100%", outline: 0, width: "100%" }).appendTo(this.d.container); this.d.data = c.attr("id", c.attr("id") || this.o.dataId).addClass("simplemodal-data").css(a.extend(this.o.dataCss, { display: "none" })).appendTo("body"); this.setContainerDimensions(); this.d.data.appendTo(this.d.wrap);
                    if (b || f) this.fixIE()
                }, bindEvents: function() {
                    var c = this; a("." + c.o.closeClass).bind("click.simplemodal", function(h) { h.preventDefault(); c.close() }); c.o.close && c.o.overlayClose && c.d.overlay.bind("click.simplemodal", function(h) { h.preventDefault(); c.close() }); a(document).bind("keydown.simplemodal", function(h) { if (c.o.focus && h.keyCode == 9) c.watchTab(h); else if (c.o.close && c.o.escClose && h.keyCode == 27) { h.preventDefault(); c.close() } }); a(window).bind("resize.simplemodal", function() {
                        e = c.getDimensions(); c.setContainerDimensions(true);
                        if (b || f) c.fixIE(); else { c.d.iframe && c.d.iframe.css({ height: e[0], width: e[1] }); c.d.overlay.css({ height: e[0], width: e[1] }) } 
                    })
                }, unbindEvents: function() { a("." + this.o.closeClass).unbind("click.simplemodal"); a(document).unbind("keydown.simplemodal"); a(window).unbind("resize.simplemodal"); this.d.overlay.unbind("click.simplemodal") }, fixIE: function() {
                    var c = this.o.position; a.each([this.d.iframe || null, this.d.overlay, this.d.container], function(h, d) {
                        if (d) {
                            var g = d[0].style; g.position = "absolute"; if (h < 2) {
                                g.removeExpression("height");
                                g.removeExpression("width"); g.setExpression("height", 'document.body.scrollHeight > document.body.clientHeight ? document.body.scrollHeight : document.body.clientHeight + "px"'); g.setExpression("width", 'document.body.scrollWidth > document.body.clientWidth ? document.body.scrollWidth : document.body.clientWidth + "px"')
                            } else {
                                var m, o; if (c && c.constructor == Array) {
                                    m = c[0] ? typeof c[0] == "number" ? c[0].toString() : c[0].replace(/px/, "") : d.css("top").replace(/px/, ""); m = m.indexOf("%") == -1 ? m + ' + (t = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"' :
parseInt(m.replace(/%/, "")) + ' * ((document.documentElement.clientHeight || document.body.clientHeight) / 100) + (t = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"'; if (c[1]) { o = typeof c[1] == "number" ? c[1].toString() : c[1].replace(/px/, ""); o = o.indexOf("%") == -1 ? o + ' + (t = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft) + "px"' : parseInt(o.replace(/%/, "")) + ' * ((document.documentElement.clientWidth || document.body.clientWidth) / 100) + (t = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft) + "px"' } 
                                } else {
                                    m =
'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (t = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"'; o = '(document.documentElement.clientWidth || document.body.clientWidth) / 2 - (this.offsetWidth / 2) + (t = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft) + "px"'
                                } g.removeExpression("top"); g.removeExpression("left"); g.setExpression("top",
m); g.setExpression("left", o)
                            } 
                        } 
                    })
                }, focus: function(c) { c = a(":input:enabled:visible:" + (c || "first"), this.d.wrap); c.length > 0 ? c.focus() : this.d.wrap.focus() }, getDimensions: function() { var c = a(window); return [a.browser.opera && a.browser.version > "9.5" && a.fn.jquery <= "1.2.6" ? document.documentElement.clientHeight : a.browser.opera && a.browser.version < "9.5" && a.fn.jquery > "1.2.6" ? window.innerHeight : c.height(), c.width()] }, getVal: function(c) { return c == "auto" ? 0 : c.indexOf("%") > 0 ? c : parseInt(c.replace(/px/, "")) }, setContainerDimensions: function(c) {
                    if (!c ||
c && this.o.autoResize) {
                        c = this.getVal(this.d.container.css("height")); var h = this.getVal(this.d.container.css("width")), d = this.d.data.outerHeight(true), g = this.d.data.outerWidth(true), m = this.o.maxHeight && this.o.maxHeight < e[0] ? this.o.maxHeight : e[0], o = this.o.maxWidth && this.o.maxWidth < e[1] ? this.o.maxWidth : e[1]; c = c ? c > m ? m : c : d ? d > m ? m : d < this.o.minHeight ? this.o.minHeight : d : this.o.minHeight; h = h ? h > o ? o : h : g ? g > o ? o : g < this.o.minWidth ? this.o.minWidth : g : this.o.minWidth; this.d.container.css({ height: c, width: h }); if (d > c ||
g > h) this.d.wrap.css({ overflow: "auto" })
                    } this.o.autoPosition && this.setPosition()
                }, setPosition: function() { var c, h; c = e[0] / 2 - this.d.container.outerHeight(true) / 2; h = e[1] / 2 - this.d.container.outerWidth(true) / 2; if (this.o.position && Object.prototype.toString.call(this.o.position) === "[object Array]") { c = this.o.position[0] || c; h = this.o.position[1] || h } else { c = c; h = h } this.d.container.css({ left: h, top: c }) }, watchTab: function(c) {
                    var h = this; if (a(c.target).parents(".simplemodal-container").length > 0) {
                        h.inputs = a(":input:enabled:visible:first, :input:enabled:visible:last",
h.d.data[0]); if (!c.shiftKey && c.target == h.inputs[h.inputs.length - 1] || c.shiftKey && c.target == h.inputs[0] || h.inputs.length == 0) { c.preventDefault(); var d = c.shiftKey ? "last" : "first"; setTimeout(function() { h.focus(d) }, 10) } 
                    } else { c.preventDefault(); setTimeout(function() { h.focus() }, 10) } 
                }, open: function() { var c = this; c.d.iframe && c.d.iframe.show(); a.isFunction(c.o.onOpen) ? c.o.onOpen.apply(c, [c.d]) : c.d.overlay.fadeIn("slow", function() { c.d.container.slideDown("slow", function() { c.d.data.show() }) }); c.focus(); c.bindEvents() },
                    close: function() { if (!this.d.data) return false; this.unbindEvents(); if (a.isFunction(this.o.onClose) && !this.occb) { this.occb = true; this.o.onClose.apply(this, [this.d]) } else { if (this.d.parentNode) if (this.o.persist) this.d.data.hide().appendTo(this.d.parentNode); else { this.d.data.hide().remove(); this.d.orig.appendTo(this.d.parentNode) } else this.d.data.hide().remove(); this.d.container.hide().remove(); this.d.overlay.hide().remove(); this.d.iframe && this.d.iframe.hide().remove(); this.d = {} } } }
                })(jQuery);
                var OSX = { container: null, open: function(a) {
                    var b = this; b.container = a.container[0]; a.overlay.fadeIn("slow", function() {
                        $(b.container).attr("id") != "osx-container" ? $("#" + $(b.container).attr("id"), b.container).show() : $("#osx-modal-content", b.container).show(); var f = $("#osx-modal-title", b.container); f.show(); a.container.slideDown("slow", function() {
                            setTimeout(function() {
                                var e = $("#osx-modal-data", b.container).height() + f.height() + 20; a.container.animate({ height: e }, 200, function() {
                                    $("div.close", b.container).show();
                                    $("#osx-modal-data", b.container).show()
                                })
                            }, 300)
                        })
                    })
                }, close: function(a) { a.container.animate({ top: "-" + (a.container.height() + 20) }, 500, function() { $.modal.close() }) } 
                };
                $.fn.osxModal = function(a, b, f) {
                    if (a != null && b != null) { this.empty(); var e = $('<div id="osx-modal-title"></div>'); e.append(a); this.append(e); a = $('<div id="osx-modal-data"></div>'); a.append(b); b = $('<p><button class="simplemodal-close">Close</button> <span>(or press ESC or click the overlay)</span></p>'); a.append(b); this.append(a) } b = "osx-container"; if (this.attr("id") != "osx-modal-content") b = this.attr("id"); this.modal({ overlayId: "osx-overlay", containerId: b, closeHTML: '<div class="close"><a href="#" class="simplemodal-close">x</a></div>',
                        minHeight: 80, opacity: 65, position: ["0"], overlayClose: true, onOpen: OSX.open, onClose: f != null && f != "undefined" ? f : OSX.close
                    })
                }; (function(a) { a("input.osx, a.osx").click(function(b) { b.preventDefault(); a("#osx-modal-content").modal({ overlayId: "osx-overlay", containerId: "osx-container", closeHTML: '<div class="close"><a href="#" class="simplemodal-close">x</a></div>', minHeight: 80, opacity: 65, position: ["0"], overlayClose: true, onOpen: OSX.open, onClose: OSX.close }) }) })(jQuery);
                $(document).ready(function() {

                    function a(b) { $("li.fcsActive").removeClass("fcsActive"); var f = b.position(); $("#sliderArrow").animate({ top: f.top +10  }, "normal", "linear", function() { $(b).addClass("fcsActive") }) } $("li.fcsRightLink").click(function() { a($(this)); var b = $(this).attr("id"); b = b.substring(b.length - 1, b.length); $("#sliderContent").cycle(b - 1); $("#sliderContent").cycle("pause") }); $("li.fcsRightLink h2 a").click(function() {
                        if ($(this).parent().parent().hasClass("fcsActive")) return true; else {
                            $(this).parent().parent().click();
                            return false
                        }
                    }); $(".video-frame").click(function() { $("#sliderContent").cycle("pause") }); $("#sliderContent").cycle({ fx: "scrollLeft", timeout: 8E3, speed: 1E3, before: function(b, f) { var e = $(f).attr("id"); e = e.substring(e.length - 1, e.length); a($("#fcLink" + e)) } })
                });
                cure.displaySubscribeDialog = function() { $("#subscribe-dialog").length == 0 && $("body").append('<div id="subscribe-dialog" title="Subscribe"></div>'); $("#subscribe-dialog").html("<p>Please wait while we process your subscription.</p>").dialog({ beforeClose: function() { return false }, closeOnEscape: false, width: 400, modal: true }) };
                cure.processSubscribe = function(a) {
                    msg = a.error && a.error.length > 0 ? "<span>Error:</span> " + a.error + '<br/>Please contact <a href="mailto:' + cure.adminEmail + '">us</a>.' : "<span>Thank you for signing up!</span><br/>We'll be sending you a confirmation email to ensure you want to be opted into our email list. Follow those instructions to complete your signup."; $("#subscribe-dialog").html(msg).dialog({ title: "Subscribe", width: 400, modal: true, beforeClose: function() { return true }, buttons: { Ok: function() { $(this).dialog("close") } } });
                    typeof postProcessSave != "undefined" && typeof postProcessSave == "function" && postProcessSave(a)
                };
                cure.setupSubscribeList = function(a) {
                    var b = { success: false }; if (a.validationOptions) b = cure.mergeObjects(b, a.validationOptions); $(a.formId).validationEngine(b); $(a.formId).bind("submit", function() {
                        var f = ""; f = ""; if (a.firstNameId) { f = $(this).find(a.firstNameId); f.val() == "First Name" && f.val("") } if (a.lastNameId) { f = $(this).find(a.lastNameId); f.val() == "Last Name" && f.val("") } b = cure.mergeObjects(b, { returnIsValid: true }); if ($(this).validationEngine(b)) {
                            $(this).find(a.emailId).val($(this).find(a.emailId).val().toLowerCase());
                            cure.displaySubscribeDialog(); $(this).ajaxSubmit({ dataType: "json", iframe: true, success: cure.processSubscribe })
                        } return false
                    })
                }; $(document).ready(function() { var a = { formId: "#hpEmSubscrForm", firstNameId: "#hpEmSubscrForm-first", lastNameId: "#hpEmSubscrForm-last", emailId: "#hpEmSubscrForm-email" }; if (cure.signupmodal) a.validationOptions = { scroll: false, errorClass: "register-box-error" }; cure.setupSubscribeList(a); cure.setupSubscribeList({ formId: "#blog-feed-subscribe-form", emailId: "#blog-feed-subscribe-field" }) });
                function getBaseURL() { pathArray = window.location.href.split("/"); return "http://" + pathArray[2] }
                function bindVideoClick() {
                    $("span.video-title a, a.video-thumbnail").unbind("click"); $("span.video-title a, a.video-thumbnail").click(function(a) {
                        a.preventDefault(); $("html, body").animate({ scrollTop: 150 }, "slow"); a = $(this).closest("li"); $("#video-top-metadata span.video-title a").html(a.find("span.video-title a").text()); $("#video-top-metadata p.fb-like iframe").attr("src", "http://www.facebook.com/plugins/like.php?href=" + getBaseURL() + "/media/videos?v=" + a.find("span.video-url").text() + "&layout=button_count&show_faces=true&width=200&action=recommend&colorscheme=light");
                        $("#video-top-metadata span.video-views span.value").html(a.find("span.video-views span.value").text()); $("#video-top-metadata span.video-comments span.value").html(a.find("span.video-comments span.value").text()); $("#video-top-metadata span.video-duration span.value").html(a.find("span.video-duration span.value").text()); $("#video-top-metadata span.video-post-date").html(a.find("span.video-post-date").text()); $("#video-top-metadata span.video-description").html(a.find("span.video-description").text());
                        a = "/media/videos/embed.php?url=" + a.find("span.video-url").text() + "&size=640&autoplay=true"; $.ajax({ url: a, success: function(b) { typeof console != "undefined" && console.log(b); $("#video-top-content").html(b.html) }, error: function(b, f) { typeof console != "undefined" && console.log(f) }, dataType: "json" }); setPageTitle()
                    })
                } function playVideo(a) { typeof console != "undefined" && console.log(a); $("#video-top-content").html(a.html) } var video_count = 0;
                typeof jQuery !== "undefined" && typeof jQuery.modal !== "undefined" && jQuery(function(a) {
                    a(".smcf_link, .smcf-link").click(function(c) { c.preventDefault(); a("#smcf-content").modal({ closeHTML: "<a href='#' title='Close' class='modalCloseX simplemodal-close'>x</a>", position: ["15%"], overlayId: "smcf-overlay", containerId: "smcf-container", onOpen: e.open, onShow: e.show, onClose: e.close }) }); var b = ["cancel.png", "form_bottom.gif", "form_top.gif", "loading.gif", "send.png"]; if (a("#smcf-content form").length > 0) {
                        var f = a("#smcf-content form").attr("action").replace(/smcf_data\.php/,
"img/"); a(b).each(function() { (new Image).src = f + this })
                    } var e = { message: null, open: function(c) {
                        var h = 280; if (a("#smcf-subject").length) h += 26; if (a("#smcf-cc").length) h += 22; a.browser.safari && a("#smcf-container .smcf-input").css({ "font-size": ".9em" }); a.browser.mozilla && a("#smcf-container .smcf-button").css({ "padding-bottom": "2px" }); var d = a("#smcf-container .smcf-title").html(); a("#smcf-container .smcf-title").html(smcf_messages.loading); c.overlay.fadeIn(200, function() {
                            c.container.fadeIn(200, function() {
                                c.data.fadeIn(200,
function() {
    a("#smcf-container .smcf-content").animate({ height: h }, function() {
        a("#smcf-container .smcf-title").html(d); a("#smcf-container form").fadeIn(200, function() {
            a("#smcf-container #smcf-name").focus(); a("#smcf-container .smcf-cc").click(function() { var g = a("#smcf-container #smcf-cc"); g.is(":checked") ? g.attr("checked", "") : g.attr("checked", "checked") }); a.browser.msie && a.browser.version < 7 && a("#smcf-container .smcf-button").each(function() {
                if (a(this).css("backgroundImage").match(/^url[("']+(.*\.png)[)"']+$/i)) {
                    var g =
RegExp.$1; a(this).css({ backgroundImage: "none", filter: 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' + g + '", sizingMethod="crop")' })
                } 
            })
        })
    })
})
                            })
                        })
                    }, show: function() {
                        a("#smcf-container .smcf-send").click(function(c) {
                            c.preventDefault(); if (e.validate()) {
                                a("#smcf-container .smcf-message").fadeOut(function() { a("#smcf-container .smcf-message").removeClass("smcf-error").empty() }); a("#smcf-container .smcf-title").html(smcf_messages.sending); a("#smcf-container form").fadeOut(200); a("#smcf-container .smcf-content").animate({ height: "90px" },
function() {
    a("#smcf-container .smcf-loading").fadeIn(200, function() {
        a.ajax({ url: a("#smcf-content form").attr("action"), data: a("#smcf-container form").serialize() + "&action=send", type: "post", cache: false, dataType: "html", success: function(d) { a("#smcf-container .smcf-loading").fadeOut(200, function() { a("#smcf-container .smcf-title").html(smcf_messages.thankyou); a("#smcf-container .smcf-message").html(d).fadeIn(200) }) }, error: function(d) {
            a("#smcf-container .smcf-loading").fadeOut(200, function() {
                a("#smcf-container .smcf-title").html(smcf_messages.error);
                a("#smcf-container .smcf-message").html(d.status + ": " + d.statusText).fadeIn(200)
            })
        } 
        })
    })
})
                            } else if (a("#smcf-container .smcf-message:visible").length > 0) { var h = a("#smcf-container .smcf-message div"); h.fadeOut(200, function() { h.empty(); e.showError(); h.fadeIn(200) }) } else a("#smcf-container .smcf-message").animate({ height: "30px" }, e.showError)
                        })
                    }, close: function(c) {
                        a("#smcf-container .smcf-message").fadeOut(); a("#smcf-container .smcf-title").html(smcf_messages.goodbye); a("#smcf-container form").fadeOut(200);
                        a("#smcf-container .smcf-content").animate({ height: "40px" }, function() { c.data.fadeOut(200, function() { c.container.fadeOut(200, function() { c.overlay.fadeOut(200, function() { a.modal.close() }) }) }) })
                    }, validate: function() {
                        e.message = ""; var c = [], h = ""; a("#smcf-container #smcf-name").val() || c.push(smcf_messages.name); var d = a("#smcf-container #smcf-email").val(); if (d) { if (!e.validateEmail(d)) h = smcf_messages.emailinvalid } else c.push(smcf_messages.email); a("#smcf-container #smcf-message").val() || c.push(smcf_messages.message);
                        if (c.length > 0) { d = c.join(", "); e.message += c.length > 1 ? d.replace(/(.*),/, "$1 " + smcf_messages.and) + " " + smcf_messages.are : d + " " + smcf_messages.is; e.message += " " + smcf_messages.required } if (h.length > 0) e.message += (c.length > 0 ? " " : "") + smcf_messages.emailinvalid; return e.message.length > 0 ? false : true
                    }, validateEmail: function(c) {
                        var h = c.lastIndexOf("@"); if (h < 1 || h + 1 === c.length) return false; if (/(\.{2,})/.test(c)) return false; var d = c.substring(0, h); c = c.substring(h + 1); if (d.length < 1 || d.length > 64 || c.length < 4 || c.length >
255) return false; if (/(^\.|\.$)/.test(d) || /(^\.|\.$)/.test(c)) return false; if (!/^"(.+)"$/.test(d)) if (!/^[-a-zA-Z0-9!#$%*\/?|^{}`~&'+=_\.]*$/.test(d)) return false; if (!/^[-a-zA-Z0-9\.]*$/.test(c) || c.indexOf(".") === -1) return false; return true
                    }, showError: function() { a("#smcf-container .smcf-message").html(a("<div/>").addClass("smcf-error").append(e.message)).fadeIn(200) } }
                    });
                    (function(a) {
                        var b; a.fn.lightbox = function(f) { b = a.extend({}, a.fn.lightbox.defaults, f); a.fn.lightbox.initialize(); return this.each(function() { a(this).click(function() { a(this).lightbox.start(this); return false }) }) }; a.fn.lightbox.initialize = function() {
                            a("#overlay").remove(); a("#lightbox").remove(); b.inprogress = false; var f = '<div id="outerImageContainer"><div id="imageContainer"><img id="lightboxImage"><div id="hoverNav"><a href="javascript://" title="' + b.strings.prevLinkTitle + '" id="prevLink"></a><a href="javascript://" id="nextLink" title="' +
b.strings.nextLinkTitle + '"></a></div><div id="loading"><a href="javascript://" id="loadingLink"><img src="' + b.fileLoadingImage + '"></a></div></div></div>', e = '<div id="imageDataContainer" class="clearfix"><div id="imageData"><div id="imageDetails"><span id="caption"></span><span id="numberDisplay"></span></div><div id="bottomNav">'; if (b.displayHelp) e += '<span id="helpDisplay">' + b.strings.help + "</span>"; e += '<a href="javascript://" id="bottomNavClose" title="' + b.strings.closeTitle + '"><img src="' + b.fileBottomNavCloseImage +
'"></a></div></div></div>'; if (b.navbarOnTop) { f = '<div id="overlay"></div><div id="lightbox">' + e + f + "</div>"; a("body").append(f); a("#imageDataContainer").addClass("ontop") } else { f = '<div id="overlay"></div><div id="lightbox">' + f + e + "</div>"; a("body").append(f) } a("#overlay").click(function() { a.fn.lightbox.end() }).hide(); a("#lightbox").click(function() { a.fn.lightbox.end() }).hide(); a("#loadingLink").click(function() { a.fn.lightbox.end(); return false }); a("#bottomNavClose").click(function() {
    a.fn.lightbox.end();
    return false
}); a("#outerImageContainer").width(b.widthCurrent).height(b.heightCurrent); a("#imageDataContainer").width(b.widthCurrent)
                        }; a.fn.lightbox.getPageSize = function() {
                            var f, e; if (window.innerHeight && window.scrollMaxY) { f = window.innerWidth + window.scrollMaxX; e = window.innerHeight + window.scrollMaxY } else if (document.body.scrollHeight > document.body.offsetHeight) { f = document.body.scrollWidth; e = document.body.scrollHeight } else { f = document.body.offsetWidth; e = document.body.offsetHeight } var c, h; if (self.innerHeight) {
                                c =
document.documentElement.clientWidth ? document.documentElement.clientWidth : self.innerWidth; h = self.innerHeight
                            } else if (document.documentElement && document.documentElement.clientHeight) { c = document.documentElement.clientWidth; h = document.documentElement.clientHeight } else if (document.body) { c = document.body.clientWidth; h = document.body.clientHeight } pageHeight = e < h ? h : e; pageWidth = f < c ? f : c; return Array(pageWidth, pageHeight, c, h)
                        }; a.fn.lightbox.getPageScroll = function() {
                            var f, e; if (self.pageYOffset) {
                                e = self.pageYOffset;
                                f = self.pageXOffset
                            } else if (document.documentElement && document.documentElement.scrollTop) { e = document.documentElement.scrollTop; f = document.documentElement.scrollLeft } else if (document.body) { e = document.body.scrollTop; f = document.body.scrollLeft } return Array(f, e)
                        }; a.fn.lightbox.pause = function(f) { var e = new Date, c = null; do c = new Date; while (c - e < f) }; a.fn.lightbox.start = function(f) {
                            a("select, embed, object").hide(); var e = a.fn.lightbox.getPageSize(); a("#overlay").hide().css({ width: "100%", height: e[1] + "px", opacity: b.overlayOpacity }).fadeIn();
                            b.imageArray = []; imageNum = 0; document.getElementsByTagName(f.tagName); if (!f.rel || f.rel == "") b.imageArray.push(Array(f.href, b.displayTitle ? f.title : "")); else { a("a").each(function() { if (this.href && this.rel == f.rel) b.imageArray.push(Array(this.href, b.displayTitle ? this.title : "")) }); for (i = 0; i < b.imageArray.length; i++) for (j = b.imageArray.length - 1; j > i; j--) b.imageArray[i][0] == b.imageArray[j][0] && b.imageArray.splice(j, 1); for (; b.imageArray[imageNum][0] != f.href; ) imageNum++ } var c = a.fn.lightbox.getPageScroll(); e = c[1] +
e[3] / 10; c = c[0]; a("#lightbox").css({ top: e + "px", left: c + "px" }).show(); b.slideNavBar || a("#imageData").hide(); a.fn.lightbox.changeImage(imageNum)
                        }; a.fn.lightbox.changeImage = function(f) { if (b.inprogress == false) { b.inprogress = true; b.activeImage = f; a("#loading").show(); a("#lightboxImage").hide(); a("#hoverNav").hide(); a("#prevLink").hide(); a("#nextLink").hide(); if (b.slideNavBar) { a("#imageDataContainer").hide(); a("#imageData").hide() } a.fn.doChangeImage() } }; a.fn.doChangeImage = function() {
                            imgPreloader = new Image;
                            imgPreloader.onload = function() { var f = imgPreloader.width, e = imgPreloader.height; if (b.fitToScreen) { var c = a.fn.lightbox.getPageSize(), h = c[2] - 2 * b.borderSize; c = c[3] - 200; if (imgPreloader.height > c) { f = parseInt(c / imgPreloader.height * imgPreloader.width); e = c } else if (imgPreloader.width > h) { e = parseInt(h / imgPreloader.width * imgPreloader.height); f = h } } a("#lightboxImage").attr("src", b.imageArray[b.activeImage][0]).width(f).height(e); a.fn.lightbox.resizeImageContainer(f, e) }; imgPreloader.src = b.imageArray[b.activeImage][0]
                        };
                        a.fn.lightbox.end = function() { a.fn.lightbox.disableKeyboardNav(); a("#lightbox").hide(); a("#overlay").fadeOut(); a("select, object, embed").show() }; a.fn.lightbox.preloadNeighborImages = function() { if (b.imageArray.length - 1 > b.activeImage) { preloadNextImage = new Image; preloadNextImage.src = b.imageArray[b.activeImage + 1][0] } if (b.activeImage > 0) { preloadPrevImage = new Image; preloadPrevImage.src = b.imageArray[b.activeImage - 1][0] } }; a.fn.lightbox.keyboardAction = function(f) {
                            if (f == null) { var e = event.keyCode; f = 27 } else {
                                e =
f.keyCode; f = f.DOM_VK_ESCAPE
                            } var c = String.fromCharCode(e).toLowerCase(); if (c == "x" || c == "o" || c == "c" || e == f) a.fn.lightbox.end(); else if (c == "p" || e == 37) { if (b.activeImage != 0) { a.fn.lightbox.disableKeyboardNav(); a.fn.lightbox.changeImage(b.activeImage - 1) } } else if (c == "n" || e == 39) if (b.activeImage != b.imageArray.length - 1) { a.fn.lightbox.disableKeyboardNav(); a.fn.lightbox.changeImage(b.activeImage + 1) } 
                        }; a.fn.lightbox.resizeImageContainer = function(f, e) {
                            b.widthCurrent = document.getElementById("outerImageContainer").offsetWidth;
                            b.heightCurrent = document.getElementById("outerImageContainer").offsetHeight; var c = f + b.borderSize * 2, h = e + b.borderSize * 2; b.xScale = c / b.widthCurrent * 100; b.yScale = h / b.heightCurrent * 100; wDiff = b.widthCurrent - c; hDiff = b.heightCurrent - h; a("#imageDataContainer").animate({ width: c }, b.resizeSpeed, "linear"); a("#outerImageContainer").animate({ width: c }, b.resizeSpeed, "linear", function() { a("#outerImageContainer").animate({ height: h }, b.resizeSpeed, "linear", function() { a.fn.lightbox.showImage() }) }); if (hDiff == 0 && wDiff == 0) jQuery.browser.msie ?
a.fn.lightbox.pause(250) : a.fn.lightbox.pause(100); a("#prevLink").height(e); a("#nextLink").height(e)
                        }; a.fn.lightbox.showImage = function() { a("#loading").hide(); a("#lightboxImage").fadeIn("fast"); a.fn.lightbox.updateDetails(); a.fn.lightbox.preloadNeighborImages(); b.inprogress = false }; a.fn.lightbox.updateDetails = function() {
                            b.imageArray[b.activeImage][1] && a("#caption").html(b.imageArray[b.activeImage][1]).show(); if (b.imageArray.length > 1) {
                                var f; f = b.strings.image + (b.activeImage + 1) + b.strings.of + b.imageArray.length;
                                if (b.activeImage > 0) f = '<a title="' + b.strings.prevLinkTitle + '" href="#" id="prevLinkText">' + b.strings.prevLinkText + "</a>" + f; if (b.activeImage + 1 < b.imageArray.length) f += '<a title="' + b.strings.nextLinkTitle + '" href="#" id="nextLinkText">' + b.strings.nextLinkText + "</a>"; a("#numberDisplay").html(f).show()
                            } b.slideNavBar ? a("#imageData").slideDown(b.navBarSlideSpeed) : a("#imageData").show(); f = a.fn.lightbox.getPageSize(); a("#overlay").height(f[1]); a.fn.lightbox.updateNav()
                        }; a.fn.lightbox.updateNav = function() {
                            a("#hoverNav").show();
                            b.activeImage != 0 && a("#prevLink,#prevLinkText").show().click(function() { a.fn.lightbox.changeImage(b.activeImage - 1); return false }); b.activeImage != b.imageArray.length - 1 && a("#nextLink,#nextLinkText").show().click(function() { a.fn.lightbox.changeImage(b.activeImage + 1); return false }); a.fn.lightbox.enableKeyboardNav()
                        }; a.fn.lightbox.enableKeyboardNav = function() { document.onkeydown = a.fn.lightbox.keyboardAction }; a.fn.lightbox.disableKeyboardNav = function() { document.onkeydown = "" }; a.fn.lightbox.defaults = { fileLoadingImage: "images/loading.gif",
                            fileBottomNavCloseImage: "images/closes.png", overlayOpacity: 0.8, borderSize: 10, imageArray: [], activeImage: null, inprogress: false, resizeSpeed: 350, widthCurrent: 250, heightCurrent: 250, xScale: 1, yScale: 1, displayTitle: true, navbarOnTop: false, slideNavBar: false, navBarSlideSpeed: 350, displayHelp: false, strings: { help: " \u2190 / P - previous image\u00a0\u00a0\u00a0\u00a0\u2192 / N - next image\u00a0\u00a0\u00a0\u00a0ESC / X - close image gallery", prevLinkTitle: "previous image", nextLinkTitle: "next image", prevLinkText: "&laquo; Previous",
                                nextLinkText: "Next &raquo;", closeTitle: "close image gallery", image: "Image ", of: " of "
                            }, fitToScreen: false}
                        })(jQuery);

