
// Log all jQuery AJAX requests to Google Analytics

if (typeof _gaq !== "undefined" && _gaq !== null) {
	$(document).ajaxSend(function(event, xhr, settings){
		_gaq.push(['_trackPageview', settings.url]);
	});
}



// ColorBox v1.3.17.2 - a full featured, light-weight, customizable lightbox based on jQuery 1.3+
// Copyright (c) 2011 Jack Moore - jack@colorpowered.com
// Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
(function (a, b, c) { function bc(b) { if (!U) { P = b, _(), y = a(P), Q = 0, K.rel !== "nofollow" && (y = a("." + g).filter(function () { var b = a.data(this, e).rel || this.rel; return b === K.rel }), Q = y.index(P), Q === -1 && (y = y.add(P), Q = y.length - 1)); if (!S) { S = T = !0, r.show(); if (K.returnFocus) try { P.blur(), a(P).one(l, function () { try { this.focus() } catch (a) { } }) } catch (c) { } q.css({ opacity: +K.opacity, cursor: K.overlayClose ? "pointer" : "auto" }).show(), K.w = Z(K.initialWidth, "x"), K.h = Z(K.initialHeight, "y"), X.position(), o && z.bind("resize." + p + " scroll." + p, function () { q.css({ width: z.width(), height: z.height(), top: z.scrollTop(), left: z.scrollLeft() }) }).trigger("resize." + p), ba(h, K.onOpen), J.add(D).hide(), I.html(K.close).show() } X.load(!0) } } function bb() { var a, b = f + "Slideshow_", c = "click." + f, d, e, g; K.slideshow && y[1] ? (d = function () { F.text(K.slideshowStop).unbind(c).bind(j, function () { if (Q < y.length - 1 || K.loop) a = setTimeout(X.next, K.slideshowSpeed) }).bind(i, function () { clearTimeout(a) }).one(c + " " + k, e), r.removeClass(b + "off").addClass(b + "on"), a = setTimeout(X.next, K.slideshowSpeed) }, e = function () { clearTimeout(a), F.text(K.slideshowStart).unbind([j, i, k, c].join(" ")).one(c, d), r.removeClass(b + "on").addClass(b + "off") }, K.slideshowAuto ? d() : e()) : r.removeClass(b + "off " + b + "on") } function ba(b, c) { c && c.call(P), a.event.trigger(b) } function _(b) { K = a.extend({}, a.data(P, e)); for (b in K) a.isFunction(K[b]) && b.substring(0, 2) !== "on" && (K[b] = K[b].call(P)); K.rel = K.rel || P.rel || "nofollow", K.href = K.href || a(P).attr("href"), K.title = K.title || P.title, typeof K.href == "string" && (K.href = a.trim(K.href)) } function $(a) { return K.photo || /\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(\.*))?$/i.test(a) } function Z(a, b) { return Math.round((/%/.test(a) ? (b === "x" ? z.width() : z.height()) / 100 : 1) * parseInt(a, 10)) } function Y(c, d, e) { e = b.createElement("div"), c && (e.id = f + c), e.style.cssText = d || ""; return a(e) } var d = { transition: "elastic", speed: 300, width: !1, initialWidth: "600", innerWidth: !1, maxWidth: !1, height: !1, initialHeight: "450", innerHeight: !1, maxHeight: !1, scalePhotos: !0, scrolling: !0, inline: !1, html: !1, iframe: !1, fastIframe: !0, photo: !1, href: !1, title: !1, rel: !1, opacity: .9, preloading: !0, current: "image {current} of {total}", previous: "previous", next: "next", close: "close", open: !1, returnFocus: !0, loop: !0, slideshow: !1, slideshowAuto: !0, slideshowSpeed: 2500, slideshowStart: "start slideshow", slideshowStop: "stop slideshow", onOpen: !1, onLoad: !1, onComplete: !1, onCleanup: !1, onClosed: !1, overlayClose: !0, escKey: !0, arrowKey: !0, top: !1, bottom: !1, left: !1, right: !1, fixed: !1, data: !1 }, e = "colorbox", f = "cbox", g = f + "Element", h = f + "_open", i = f + "_load", j = f + "_complete", k = f + "_cleanup", l = f + "_closed", m = f + "_purge", n = a.browser.msie && !a.support.opacity, o = n && a.browser.version < 7, p = f + "_IE6", q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X; X = a.fn[e] = a[e] = function (b, c) { var f = this; b = b || {}; if (!f[0]) { if (f.selector) return f; f = a("<a/>"), b.open = !0 } c && (b.onComplete = c), f.each(function () { a.data(this, e, a.extend({}, a.data(this, e) || d, b)), a(this).addClass(g) }), (a.isFunction(b.open) && b.open.call(f) || b.open) && bc(f[0]); return f }, X.init = function () { z = a(c), r = Y().attr({ id: e, "class": n ? f + (o ? "IE6" : "IE") : "" }), q = Y("Overlay", o ? "position:absolute" : "").hide(), s = Y("Wrapper"), t = Y("Content").append(A = Y("LoadedContent", "width:0; height:0; overflow:hidden"), C = Y("LoadingOverlay").add(Y("LoadingGraphic")), D = Y("Title"), E = Y("Current"), G = Y("Next"), H = Y("Previous"), F = Y("Slideshow").bind(h, bb), I = Y("Close")), s.append(Y().append(Y("TopLeft"), u = Y("TopCenter"), Y("TopRight")), Y(!1, "clear:left").append(v = Y("MiddleLeft"), t, w = Y("MiddleRight")), Y(!1, "clear:left").append(Y("BottomLeft"), x = Y("BottomCenter"), Y("BottomRight"))).children().children().css({ "float": "left" }), B = Y(!1, "position:absolute; width:9999px; visibility:hidden; display:none"), a("body").prepend(q, r.append(s, B)), t.children().hover(function () { a(this).addClass("hover") }, function () { a(this).removeClass("hover") }).addClass("hover"), L = u.height() + x.height() + t.outerHeight(!0) - t.height(), M = v.width() + w.width() + t.outerWidth(!0) - t.width(), N = A.outerHeight(!0), O = A.outerWidth(!0), r.css({ "padding-bottom": L, "padding-right": M }).hide(), G.click(function () { X.next() }), H.click(function () { X.prev() }), I.click(function () { X.close() }), J = G.add(H).add(E).add(F), t.children().removeClass("hover"), q.click(function () { K.overlayClose && X.close() }), a(b).bind("keydown." + f, function (a) { var b = a.keyCode; S && K.escKey && b === 27 && (a.preventDefault(), X.close()), S && K.arrowKey && y[1] && (b === 37 ? (a.preventDefault(), H.click()) : b === 39 && (a.preventDefault(), G.click())) }) }, X.remove = function () { r.add(q).remove(), a("." + g).removeData(e).removeClass(g) }, X.position = function (a, c) { function g(a) { u[0].style.width = x[0].style.width = t[0].style.width = a.style.width, C[0].style.height = C[1].style.height = t[0].style.height = v[0].style.height = w[0].style.height = a.style.height } var d = 0, e = 0; z.unbind("resize." + f), r.hide(), K.fixed && !o ? r.css({ position: "fixed" }) : (d = z.scrollTop(), e = z.scrollLeft(), r.css({ position: "absolute" })), K.right !== !1 ? e += Math.max(z.width() - K.w - O - M - Z(K.right, "x"), 0) : K.left !== !1 ? e += Z(K.left, "x") : e += Math.round(Math.max(z.width() - K.w - O - M, 0) / 2), K.bottom !== !1 ? d += Math.max(b.documentElement.clientHeight - K.h - N - L - Z(K.bottom, "y"), 0) : K.top !== !1 ? d += Z(K.top, "y") : d += Math.round(Math.max(b.documentElement.clientHeight - K.h - N - L, 0) / 2), r.show(), a = r.width() === K.w + O && r.height() === K.h + N ? 0 : a || 0, s[0].style.width = s[0].style.height = "9999px", r.dequeue().animate({ width: K.w + O, height: K.h + N, top: d, left: e }, { duration: a, complete: function () { g(this), T = !1, s[0].style.width = K.w + O + M + "px", s[0].style.height = K.h + N + L + "px", c && c(), setTimeout(function () { z.bind("resize." + f, X.position) }, 1) }, step: function () { g(this) } }) }, X.resize = function (a) { if (S) { a = a || {}, a.width && (K.w = Z(a.width, "x") - O - M), a.innerWidth && (K.w = Z(a.innerWidth, "x")), A.css({ width: K.w }), a.height && (K.h = Z(a.height, "y") - N - L), a.innerHeight && (K.h = Z(a.innerHeight, "y")); if (!a.innerHeight && !a.height) { var b = A.wrapInner("<div style='overflow:auto'></div>").children(); K.h = b.height(), b.replaceWith(b.children()) } A.css({ height: K.h }), X.position(K.transition === "none" ? 0 : K.speed) } }, X.prep = function (b) { function h() { K.h = K.h || A.height(), K.h = K.mh && K.mh < K.h ? K.mh : K.h; return K.h } function g() { K.w = K.w || A.width(), K.w = K.mw && K.mw < K.w ? K.mw : K.w; return K.w } if (!!S) { var c, d = K.transition === "none" ? 0 : K.speed; A.remove(), A = Y("LoadedContent").append(b), A.hide().appendTo(B.show()).css({ width: g(), overflow: K.scrolling ? "auto" : "hidden" }).css({ height: h() }).prependTo(t), B.hide(), a(R).css({ "float": "none" }), o && a("select").not(r.find("select")).filter(function () { return this.style.visibility !== "hidden" }).css({ visibility: "hidden" }).one(k, function () { this.style.visibility = "inherit" }), c = function () { function o() { n && r[0].style.removeAttribute("filter") } var b, c, g, h, i = y.length, k, l; !S || (l = function () { clearTimeout(W), C.hide(), ba(j, K.onComplete) }, n && R && A.fadeIn(100), D.html(K.title).add(A).show(), i > 1 ? (typeof K.current == "string" && E.html(K.current.replace("{current}", Q + 1).replace("{total}", i)).show(), G[K.loop || Q < i - 1 ? "show" : "hide"]().html(K.next), H[K.loop || Q ? "show" : "hide"]().html(K.previous), b = Q ? y[Q - 1] : y[i - 1], g = Q < i - 1 ? y[Q + 1] : y[0], K.slideshow && F.show(), K.preloading && (h = a.data(g, e).href || g.href, c = a.data(b, e).href || b.href, h = a.isFunction(h) ? h.call(g) : h, c = a.isFunction(c) ? c.call(b) : c, $(h) && (a("<img/>")[0].src = h), $(c) && (a("<img/>")[0].src = c))) : J.hide(), K.iframe ? (k = a("<iframe/>").addClass(f + "Iframe")[0], K.fastIframe ? l() : a(k).one("load", l), k.name = f + +(new Date), k.src = K.href, K.scrolling || (k.scrolling = "no"), n && (k.frameBorder = 0, k.allowTransparency = "true"), a(k).appendTo(A).one(m, function () { k.src = "//about:blank" })) : l(), K.transition === "fade" ? r.fadeTo(d, 1, o) : o()) }, K.transition === "fade" ? r.fadeTo(d, 0, function () { X.position(0, c) }) : X.position(d, c) } }, X.load = function (b) { var c, d, e = X.prep; T = !0, R = !1, P = y[Q], b || _(), ba(m), ba(i, K.onLoad), K.h = K.height ? Z(K.height, "y") - N - L : K.innerHeight && Z(K.innerHeight, "y"), K.w = K.width ? Z(K.width, "x") - O - M : K.innerWidth && Z(K.innerWidth, "x"), K.mw = K.w, K.mh = K.h, K.maxWidth && (K.mw = Z(K.maxWidth, "x") - O - M, K.mw = K.w && K.w < K.mw ? K.w : K.mw), K.maxHeight && (K.mh = Z(K.maxHeight, "y") - N - L, K.mh = K.h && K.h < K.mh ? K.h : K.mh), c = K.href, W = setTimeout(function () { C.show() }, 100), K.inline ? (Y().hide().insertBefore(a(c)[0]).one(m, function () { a(this).replaceWith(A.children()) }), e(a(c))) : K.iframe ? e(" ") : K.html ? e(K.html) : $(c) ? (a(R = new Image).addClass(f + "Photo").error(function () { K.title = !1, e(Y("Error").text("This image could not be loaded")) }).load(function () { var a; R.onload = null, K.scalePhotos && (d = function () { R.height -= R.height * a, R.width -= R.width * a }, K.mw && R.width > K.mw && (a = (R.width - K.mw) / R.width, d()), K.mh && R.height > K.mh && (a = (R.height - K.mh) / R.height, d())), K.h && (R.style.marginTop = Math.max(K.h - R.height, 0) / 2 + "px"), y[1] && (Q < y.length - 1 || K.loop) && (R.style.cursor = "pointer", R.onclick = function () { X.next() }), n && (R.style.msInterpolationMode = "bicubic"), setTimeout(function () { e(R) }, 1) }), setTimeout(function () { R.src = c }, 1)) : c && B.load(c, K.data, function (b, c, d) { e(c === "error" ? Y("Error").text("Request unsuccessful: " + d.statusText) : a(this).contents()) }) }, X.next = function () { !T && y[1] && (Q < y.length - 1 || K.loop) && (Q = Q < y.length - 1 ? Q + 1 : 0, X.load()) }, X.prev = function () { !T && y[1] && (Q || K.loop) && (Q = Q ? Q - 1 : y.length - 1, X.load()) }, X.close = function () { S && !U && (U = !0, S = !1, ba(k, K.onCleanup), z.unbind("." + f + " ." + p), q.fadeTo(200, 0), r.stop().fadeTo(300, 0, function () { r.add(q).css({ opacity: 1, cursor: "auto" }).hide(), ba(m), A.remove(), setTimeout(function () { U = !1, ba(l, K.onClosed) }, 1) })) }, X.element = function () { return a(P) }, X.settings = d, V = function (a) { a.button !== 0 && typeof a.button != "undefined" || a.ctrlKey || a.shiftKey || a.altKey || (a.preventDefault(), bc(this)) }, a.fn.delegate ? a(b).delegate("." + g, "click", V) : a("." + g).live("click", V), a(X.init) })(jQuery, document, this);


/*
* jQuery Nivo Slider v2.6
* http://nivo.dev7studios.com
*
* Copyright 2011, Gilbert Pellegrom
* Free to use and abuse under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
* 
* March 2010
*/

(function ($) {
	var NivoSlider = function (element, options) {
		var settings = $.extend({}, $.fn.nivoSlider.defaults, options); var vars = { currentSlide: 0, currentImage: '', totalSlides: 0, randAnim: '', running: false, paused: false, stop: false }; var slider = $(element); slider.data('nivo:vars', vars); slider.css('position', 'relative'); slider.addClass('nivoSlider'); var kids = slider.children(); kids.each(function () {
			var child = $(this); var link = ''; if (!child.is('img')) {
				if (child.is('a')) { child.addClass('nivo-imageLink'); link = child; }
				child = child.find('img:first');
			}
			var childWidth = child.width(); if (childWidth == 0) childWidth = child.attr('width'); var childHeight = child.height(); if (childHeight == 0) childHeight = child.attr('height'); if (childWidth > slider.width()) { slider.width(childWidth); }
			if (childHeight > slider.height()) { slider.height(childHeight); }
			if (link != '') { link.css('display', 'none'); }
			child.css('display', 'none'); vars.totalSlides++;
		}); if (settings.startSlide > 0) { if (settings.startSlide >= vars.totalSlides) settings.startSlide = vars.totalSlides - 1; vars.currentSlide = settings.startSlide; }
		if ($(kids[vars.currentSlide]).is('img')) { vars.currentImage = $(kids[vars.currentSlide]); } else { vars.currentImage = $(kids[vars.currentSlide]).find('img:first'); }
		if ($(kids[vars.currentSlide]).is('a')) { $(kids[vars.currentSlide]).css('display', 'block'); }
		slider.css('background', 'url("' + vars.currentImage.attr('src') + '") no-repeat'); slider.append($('<div class="nivo-caption"><p></p></div>').css({ display: 'none', opacity: settings.captionOpacity })); var processCaption = function (settings) {
			var nivoCaption = $('.nivo-caption', slider); if (vars.currentImage.attr('title') != '' && vars.currentImage.attr('title') != undefined) {
				var title = vars.currentImage.attr('title'); if (title.substr(0, 1) == '#') title = $(title).html(); if (nivoCaption.css('display') == 'block') { nivoCaption.find('p').fadeOut(settings.animSpeed, function () { $(this).html(title); $(this).fadeIn(settings.animSpeed); }); } else { nivoCaption.find('p').html(title); }
				nivoCaption.fadeIn(settings.animSpeed);
			} else { nivoCaption.fadeOut(settings.animSpeed); } 
		}
		processCaption(settings); var timer = 0; if (!settings.manualAdvance && kids.length > 1) { timer = setInterval(function () { nivoRun(slider, kids, settings, false); }, settings.pauseTime); }
		if (settings.directionNav) {
			slider.append('<div class="nivo-directionNav"><a class="nivo-prevNav">' + settings.prevText + '</a><a class="nivo-nextNav">' + settings.nextText + '</a></div>'); if (settings.directionNavHide) { $('.nivo-directionNav', slider).hide(); slider.hover(function () { $('.nivo-directionNav', slider).show(); }, function () { $('.nivo-directionNav', slider).hide(); }); }
			$('a.nivo-prevNav', slider).live('click', function () { if (vars.running) return false; clearInterval(timer); timer = ''; vars.currentSlide -= 2; nivoRun(slider, kids, settings, 'prev'); }); $('a.nivo-nextNav', slider).live('click', function () { if (vars.running) return false; clearInterval(timer); timer = ''; nivoRun(slider, kids, settings, 'next'); });
		}
		if (settings.controlNav) {
			var nivoControl = $('<div class="nivo-controlNav"></div>'); slider.append(nivoControl); for (var i = 0; i < kids.length; i++) {
				if (settings.controlNavThumbs) {
					var child = kids.eq(i); if (!child.is('img')) { child = child.find('img:first'); }
					if (settings.controlNavThumbsFromRel) { nivoControl.append('<a class="nivo-control" rel="' + i + '"><img src="' + child.attr('rel') + '" alt="" /></a>'); } else { nivoControl.append('<a class="nivo-control" rel="' + i + '"><img src="' + child.attr('src').replace(settings.controlNavThumbsSearch, settings.controlNavThumbsReplace) + '" alt="" /></a>'); } 
				} else { nivoControl.append('<a class="nivo-control" rel="' + i + '">' + (i + 1) + '</a>'); } 
			}
			$('.nivo-controlNav a:eq(' + vars.currentSlide + ')', slider).addClass('active'); $('.nivo-controlNav a', slider).live('click', function () { if (vars.running) return false; if ($(this).hasClass('active')) return false; clearInterval(timer); timer = ''; slider.css('background', 'url("' + vars.currentImage.attr('src') + '") no-repeat'); vars.currentSlide = $(this).attr('rel') - 1; nivoRun(slider, kids, settings, 'control'); });
		}
		if (settings.keyboardNav) {
			$(window).keypress(function (event) {
				if (event.keyCode == '37') { if (vars.running) return false; clearInterval(timer); timer = ''; vars.currentSlide -= 2; nivoRun(slider, kids, settings, 'prev'); }
				if (event.keyCode == '39') { if (vars.running) return false; clearInterval(timer); timer = ''; nivoRun(slider, kids, settings, 'next'); } 
			});
		}
		if (settings.pauseOnHover) { slider.hover(function () { vars.paused = true; clearInterval(timer); timer = ''; }, function () { vars.paused = false; if (timer == '' && !settings.manualAdvance) { timer = setInterval(function () { nivoRun(slider, kids, settings, false); }, settings.pauseTime); } }); }
		slider.bind('nivo:animFinished', function () {
			vars.running = false; $(kids).each(function () { if ($(this).is('a')) { $(this).css('display', 'none'); } }); if ($(kids[vars.currentSlide]).is('a')) { $(kids[vars.currentSlide]).css('display', 'block'); }
			if (timer == '' && !vars.paused && !settings.manualAdvance) { timer = setInterval(function () { nivoRun(slider, kids, settings, false); }, settings.pauseTime); }
			settings.afterChange.call(this);
		}); var createSlices = function (slider, settings, vars) { for (var i = 0; i < settings.slices; i++) { var sliceWidth = Math.round(slider.width() / settings.slices); if (i == settings.slices - 1) { slider.append($('<div class="nivo-slice"></div>').css({ left: (sliceWidth * i) + 'px', width: (slider.width() - (sliceWidth * i)) + 'px', height: '0px', opacity: '0', background: 'url("' + vars.currentImage.attr('src') + '") no-repeat -' + ((sliceWidth + (i * sliceWidth)) - sliceWidth) + 'px 0%' })); } else { slider.append($('<div class="nivo-slice"></div>').css({ left: (sliceWidth * i) + 'px', width: sliceWidth + 'px', height: '0px', opacity: '0', background: 'url("' + vars.currentImage.attr('src') + '") no-repeat -' + ((sliceWidth + (i * sliceWidth)) - sliceWidth) + 'px 0%' })); } } }
		var createBoxes = function (slider, settings, vars) { var boxWidth = Math.round(slider.width() / settings.boxCols); var boxHeight = Math.round(slider.height() / settings.boxRows); for (var rows = 0; rows < settings.boxRows; rows++) { for (var cols = 0; cols < settings.boxCols; cols++) { if (cols == settings.boxCols - 1) { slider.append($('<div class="nivo-box"></div>').css({ opacity: 0, left: (boxWidth * cols) + 'px', top: (boxHeight * rows) + 'px', width: (slider.width() - (boxWidth * cols)) + 'px', height: boxHeight + 'px', background: 'url("' + vars.currentImage.attr('src') + '") no-repeat -' + ((boxWidth + (cols * boxWidth)) - boxWidth) + 'px -' + ((boxHeight + (rows * boxHeight)) - boxHeight) + 'px' })); } else { slider.append($('<div class="nivo-box"></div>').css({ opacity: 0, left: (boxWidth * cols) + 'px', top: (boxHeight * rows) + 'px', width: boxWidth + 'px', height: boxHeight + 'px', background: 'url("' + vars.currentImage.attr('src') + '") no-repeat -' + ((boxWidth + (cols * boxWidth)) - boxWidth) + 'px -' + ((boxHeight + (rows * boxHeight)) - boxHeight) + 'px' })); } } } }
		var nivoRun = function (slider, kids, settings, nudge) {
			var vars = slider.data('nivo:vars'); if (vars && (vars.currentSlide == vars.totalSlides - 1)) { settings.lastSlide.call(this); }
			if ((!vars || vars.stop) && !nudge) return false; settings.beforeChange.call(this); if (!nudge) { slider.css('background', 'url("' + vars.currentImage.attr('src') + '") no-repeat'); } else {
				if (nudge == 'prev') { slider.css('background', 'url("' + vars.currentImage.attr('src') + '") no-repeat'); }
				if (nudge == 'next') { slider.css('background', 'url("' + vars.currentImage.attr('src') + '") no-repeat'); } 
			}
			vars.currentSlide++; if (vars.currentSlide == vars.totalSlides) { vars.currentSlide = 0; settings.slideshowEnd.call(this); }
			if (vars.currentSlide < 0) vars.currentSlide = (vars.totalSlides - 1); if ($(kids[vars.currentSlide]).is('img')) { vars.currentImage = $(kids[vars.currentSlide]); } else { vars.currentImage = $(kids[vars.currentSlide]).find('img:first'); }
			if (settings.controlNav) { $('.nivo-controlNav a', slider).removeClass('active'); $('.nivo-controlNav a:eq(' + vars.currentSlide + ')', slider).addClass('active'); }
			processCaption(settings); $('.nivo-slice', slider).remove(); $('.nivo-box', slider).remove(); if (settings.effect == 'random') { var anims = new Array('sliceDownRight', 'sliceDownLeft', 'sliceUpRight', 'sliceUpLeft', 'sliceUpDown', 'sliceUpDownLeft', 'fold', 'fade', 'boxRandom', 'boxRain', 'boxRainReverse', 'boxRainGrow', 'boxRainGrowReverse'); vars.randAnim = anims[Math.floor(Math.random() * (anims.length + 1))]; if (vars.randAnim == undefined) vars.randAnim = 'fade'; }
			if (settings.effect.indexOf(',') != -1) { var anims = settings.effect.split(','); vars.randAnim = anims[Math.floor(Math.random() * (anims.length))]; if (vars.randAnim == undefined) vars.randAnim = 'fade'; }
			vars.running = true; if (settings.effect == 'sliceDown' || settings.effect == 'sliceDownRight' || vars.randAnim == 'sliceDownRight' || settings.effect == 'sliceDownLeft' || vars.randAnim == 'sliceDownLeft') {
				createSlices(slider, settings, vars); var timeBuff = 0; var i = 0; var slices = $('.nivo-slice', slider); if (settings.effect == 'sliceDownLeft' || vars.randAnim == 'sliceDownLeft') slices = $('.nivo-slice', slider)._reverse(); slices.each(function () {
					var slice = $(this); slice.css({ 'top': '0px' }); if (i == settings.slices - 1) { setTimeout(function () { slice.animate({ height: '100%', opacity: '1.0' }, settings.animSpeed, '', function () { slider.trigger('nivo:animFinished'); }); }, (100 + timeBuff)); } else { setTimeout(function () { slice.animate({ height: '100%', opacity: '1.0' }, settings.animSpeed); }, (100 + timeBuff)); }
					timeBuff += 50; i++;
				});
			}
			else if (settings.effect == 'sliceUp' || settings.effect == 'sliceUpRight' || vars.randAnim == 'sliceUpRight' || settings.effect == 'sliceUpLeft' || vars.randAnim == 'sliceUpLeft') {
				createSlices(slider, settings, vars); var timeBuff = 0; var i = 0; var slices = $('.nivo-slice', slider); if (settings.effect == 'sliceUpLeft' || vars.randAnim == 'sliceUpLeft') slices = $('.nivo-slice', slider)._reverse(); slices.each(function () {
					var slice = $(this); slice.css({ 'bottom': '0px' }); if (i == settings.slices - 1) { setTimeout(function () { slice.animate({ height: '100%', opacity: '1.0' }, settings.animSpeed, '', function () { slider.trigger('nivo:animFinished'); }); }, (100 + timeBuff)); } else { setTimeout(function () { slice.animate({ height: '100%', opacity: '1.0' }, settings.animSpeed); }, (100 + timeBuff)); }
					timeBuff += 50; i++;
				});
			}
			else if (settings.effect == 'sliceUpDown' || settings.effect == 'sliceUpDownRight' || vars.randAnim == 'sliceUpDown' || settings.effect == 'sliceUpDownLeft' || vars.randAnim == 'sliceUpDownLeft') {
				createSlices(slider, settings, vars); var timeBuff = 0; var i = 0; var v = 0; var slices = $('.nivo-slice', slider); if (settings.effect == 'sliceUpDownLeft' || vars.randAnim == 'sliceUpDownLeft') slices = $('.nivo-slice', slider)._reverse(); slices.each(function () {
					var slice = $(this); if (i == 0) { slice.css('top', '0px'); i++; } else { slice.css('bottom', '0px'); i = 0; }
					if (v == settings.slices - 1) { setTimeout(function () { slice.animate({ height: '100%', opacity: '1.0' }, settings.animSpeed, '', function () { slider.trigger('nivo:animFinished'); }); }, (100 + timeBuff)); } else { setTimeout(function () { slice.animate({ height: '100%', opacity: '1.0' }, settings.animSpeed); }, (100 + timeBuff)); }
					timeBuff += 50; v++;
				});
			}
			else if (settings.effect == 'fold' || vars.randAnim == 'fold') {
				createSlices(slider, settings, vars); var timeBuff = 0; var i = 0; $('.nivo-slice', slider).each(function () {
					var slice = $(this); var origWidth = slice.width(); slice.css({ top: '0px', height: '100%', width: '0px' }); if (i == settings.slices - 1) { setTimeout(function () { slice.animate({ width: origWidth, opacity: '1.0' }, settings.animSpeed, '', function () { slider.trigger('nivo:animFinished'); }); }, (100 + timeBuff)); } else { setTimeout(function () { slice.animate({ width: origWidth, opacity: '1.0' }, settings.animSpeed); }, (100 + timeBuff)); }
					timeBuff += 50; i++;
				});
			}
			else if (settings.effect == 'fade' || vars.randAnim == 'fade') { createSlices(slider, settings, vars); var firstSlice = $('.nivo-slice:first', slider); firstSlice.css({ 'height': '100%', 'width': slider.width() + 'px' }); firstSlice.animate({ opacity: '1.0' }, (settings.animSpeed * 2), '', function () { slider.trigger('nivo:animFinished'); }); }
			else if (settings.effect == 'slideInRight' || vars.randAnim == 'slideInRight') { createSlices(slider, settings, vars); var firstSlice = $('.nivo-slice:first', slider); firstSlice.css({ 'height': '100%', 'width': '0px', 'opacity': '1' }); firstSlice.animate({ width: slider.width() + 'px' }, (settings.animSpeed * 2), '', function () { slider.trigger('nivo:animFinished'); }); }
			else if (settings.effect == 'slideInLeft' || vars.randAnim == 'slideInLeft') { createSlices(slider, settings, vars); var firstSlice = $('.nivo-slice:first', slider); firstSlice.css({ 'height': '100%', 'width': '0px', 'opacity': '1', 'left': '', 'right': '0px' }); firstSlice.animate({ width: slider.width() + 'px' }, (settings.animSpeed * 2), '', function () { firstSlice.css({ 'left': '0px', 'right': '' }); slider.trigger('nivo:animFinished'); }); }
			else if (settings.effect == 'boxRandom' || vars.randAnim == 'boxRandom') {
				createBoxes(slider, settings, vars); var totalBoxes = settings.boxCols * settings.boxRows; var i = 0; var timeBuff = 0; var boxes = shuffle($('.nivo-box', slider)); boxes.each(function () {
					var box = $(this); if (i == totalBoxes - 1) { setTimeout(function () { box.animate({ opacity: '1' }, settings.animSpeed, '', function () { slider.trigger('nivo:animFinished'); }); }, (100 + timeBuff)); } else { setTimeout(function () { box.animate({ opacity: '1' }, settings.animSpeed); }, (100 + timeBuff)); }
					timeBuff += 20; i++;
				});
			}
			else if (settings.effect == 'boxRain' || vars.randAnim == 'boxRain' || settings.effect == 'boxRainReverse' || vars.randAnim == 'boxRainReverse' || settings.effect == 'boxRainGrow' || vars.randAnim == 'boxRainGrow' || settings.effect == 'boxRainGrowReverse' || vars.randAnim == 'boxRainGrowReverse') {
				createBoxes(slider, settings, vars); var totalBoxes = settings.boxCols * settings.boxRows; var i = 0; var timeBuff = 0; var rowIndex = 0; var colIndex = 0; var box2Darr = new Array(); box2Darr[rowIndex] = new Array(); var boxes = $('.nivo-box', slider); if (settings.effect == 'boxRainReverse' || vars.randAnim == 'boxRainReverse' || settings.effect == 'boxRainGrowReverse' || vars.randAnim == 'boxRainGrowReverse') { boxes = $('.nivo-box', slider)._reverse(); }
				boxes.each(function () { box2Darr[rowIndex][colIndex] = $(this); colIndex++; if (colIndex == settings.boxCols) { rowIndex++; colIndex = 0; box2Darr[rowIndex] = new Array(); } }); for (var cols = 0; cols < (settings.boxCols * 2); cols++) {
					var prevCol = cols; for (var rows = 0; rows < settings.boxRows; rows++) {
						if (prevCol >= 0 && prevCol < settings.boxCols) {
							(function (row, col, time, i, totalBoxes) {
								var box = $(box2Darr[row][col]); var w = box.width(); var h = box.height(); if (settings.effect == 'boxRainGrow' || vars.randAnim == 'boxRainGrow' || settings.effect == 'boxRainGrowReverse' || vars.randAnim == 'boxRainGrowReverse') { box.width(0).height(0); }
								if (i == totalBoxes - 1) { setTimeout(function () { box.animate({ opacity: '1', width: w, height: h }, settings.animSpeed / 1.3, '', function () { slider.trigger('nivo:animFinished'); }); }, (100 + time)); } else { setTimeout(function () { box.animate({ opacity: '1', width: w, height: h }, settings.animSpeed / 1.3); }, (100 + time)); } 
							})(rows, prevCol, timeBuff, i, totalBoxes); i++;
						}
						prevCol--;
					}
					timeBuff += 100;
				} 
			} 
		}
		var shuffle = function (arr) { for (var j, x, i = arr.length; i; j = parseInt(Math.random() * i), x = arr[--i], arr[i] = arr[j], arr[j] = x); return arr; }
		var trace = function (msg) {
			if (this.console && typeof console.log != "undefined")
				console.log(msg);
		}
		this.stop = function () { if (!$(element).data('nivo:vars').stop) { $(element).data('nivo:vars').stop = true; trace('Stop Slider'); } }
		this.start = function () { if ($(element).data('nivo:vars').stop) { $(element).data('nivo:vars').stop = false; trace('Start Slider'); } }
		settings.afterLoad.call(this); return this;
	}; $.fn.nivoSlider = function (options) { return this.each(function (key, value) { var element = $(this); if (element.data('nivoslider')) return element.data('nivoslider'); var nivoslider = new NivoSlider(this, options); element.data('nivoslider', nivoslider); }); }; $.fn.nivoSlider.defaults = { effect: 'random', slices: 15, boxCols: 8, boxRows: 4, animSpeed: 500, pauseTime: 3000, startSlide: 0, directionNav: true, directionNavHide: true, controlNav: true, controlNavThumbs: false, controlNavThumbsFromRel: false, controlNavThumbsSearch: '.jpg', controlNavThumbsReplace: '_thumb.jpg', keyboardNav: true, pauseOnHover: true, manualAdvance: false, captionOpacity: 0.8, prevText: 'Prev', nextText: 'Next', beforeChange: function () { }, afterChange: function () { }, slideshowEnd: function () { }, lastSlide: function () { }, afterLoad: function () { } }; $.fn._reverse = [].reverse;
})(jQuery);


// Popup Window

(function ($) {
	$.fn.popupWindow = function (instanceSettings) {

		return this.each(function () {

			$(this).click(function () {

				$.fn.popupWindow.defaultSettings = {
					centerBrowser: 1, // center window over browser window? {1 (YES) or 0 (NO)}. overrides top and left
					centerScreen: 0, // center window over entire screen? {1 (YES) or 0 (NO)}. overrides top and left
					height: 500, // sets the height in pixels of the window.
					left: 0, // left position when the window appears.
					location: 0, // determines whether the address bar is displayed {1 (YES) or 0 (NO)}.
					menubar: 0, // determines whether the menu bar is displayed {1 (YES) or 0 (NO)}.
					resizable: 1, // whether the window can be resized {1 (YES) or 0 (NO)}. Can also be overloaded using resizable.
					scrollbars: 1, // determines whether scrollbars appear on the w indow {1 (YES) or 0 (NO)}.
					status: 0, // whether a status line appears at the bottom of the window {1 (YES) or 0 (NO)}.
					width: 500, // sets the width in pixels of the window.
					windowName: null, // name of window set from the name attribute of the element that invokes the click
					windowURL: null, // url used for the popup
					top: 0, // top position when the window appears.
					toolbar: 0 // determines whether a toolbar (includes the forward and back buttons) is displayed {1 (YES) or 0 (NO)}.
				};

				settings = $.extend({}, $.fn.popupWindow.defaultSettings, instanceSettings || {});

				var windowFeatures = 'height=' + settings.height +
								',width=' + settings.width +
								',toolbar=' + settings.toolbar +
								',scrollbars=' + settings.scrollbars +
								',status=' + settings.status +
								',resizable=' + settings.resizable +
								',location=' + settings.location +
								',menuBar=' + settings.menubar;

				settings.windowName = this.name || settings.windowName;
				settings.windowURL = this.href || settings.windowURL;
				var centeredY, centeredX;

				if (settings.centerBrowser) {

					if ($.browser.msie) {//hacked together for IE browsers
						centeredY = (window.screenTop - 120) + ((((document.documentElement.clientHeight + 120) / 2) - (settings.height / 2)));
						centeredX = window.screenLeft + ((((document.body.offsetWidth + 20) / 2) - (settings.width / 2)));
					} else {
						centeredY = window.screenY + (((window.outerHeight / 2) - (settings.height / 2)));
						centeredX = window.screenX + (((window.outerWidth / 2) - (settings.width / 2)));
					}
					window.open(settings.windowURL, settings.windowName, windowFeatures + ',left=' + centeredX + ',top=' + centeredY).focus();
				} else if (settings.centerScreen) {
					centeredY = (screen.height - settings.height) / 2;
					centeredX = (screen.width - settings.width) / 2;
					window.open(settings.windowURL, settings.windowName, windowFeatures + ',left=' + centeredX + ',top=' + centeredY).focus();
				} else {
					window.open(settings.windowURL, settings.windowName, windowFeatures + ',left=' + settings.left + ',top=' + settings.top).focus();
				}
				return false;
			});

		});
	};
})(jQuery);


/*
* jScrollPane - v2.0.0beta10 - 2011-04-17
* http://jscrollpane.kelvinluck.com/
*
* Copyright (c) 2010 Kelvin Luck
* Dual licensed under the MIT and GPL licenses.
*/
(function (b, a, c) {
	b.fn.jScrollPane = function (f) {
		function d(E, P) {
			var aA, R = this, Z, al, w, an, U, aa, z, r, aB, aG, aw, j, J, i, k, ab, V, ar, Y, u, B, at, ag, ao, H, m, av, az, y, ax, aJ, g, M, ak = true, Q = true, aI = false, l = false, aq = E.clone(false, false).empty(), ad = b.fn.mwheelIntent ? "mwheelIntent.jsp" : "mousewheel.jsp"; aJ = E.css("paddingTop") + " " + E.css("paddingRight") + " " + E.css("paddingBottom") + " " + E.css("paddingLeft"); g = (parseInt(E.css("paddingLeft"), 10) || 0) + (parseInt(E.css("paddingRight"), 10) || 0); function au(aS) { var aN, aP, aO, aL, aK, aR, aQ = false, aM = false; aA = aS; if (Z === c) { aK = E.scrollTop(); aR = E.scrollLeft(); E.css({ overflow: "hidden", padding: 0 }); al = E.innerWidth() + g; w = E.innerHeight(); E.width(al); Z = b('<div class="jspPane" />').css("padding", aJ).append(E.children()); an = b('<div class="jspContainer" />').css({ width: al + "px", height: w + "px" }).append(Z).appendTo(E) } else { E.css("width", ""); aQ = aA.stickToBottom && L(); aM = aA.stickToRight && C(); aL = E.innerWidth() + g != al || E.outerHeight() != w; if (aL) { al = E.innerWidth() + g; w = E.innerHeight(); an.css({ width: al + "px", height: w + "px" }) } if (!aL && M == U && Z.outerHeight() == aa) { E.width(al); return } M = U; Z.css("width", ""); E.width(al); an.find(">.jspVerticalBar,>.jspHorizontalBar").remove().end() } Z.css("overflow", "auto"); if (aS.contentWidth) { U = aS.contentWidth } else { U = Z[0].scrollWidth } aa = Z[0].scrollHeight; Z.css("overflow", ""); z = U / al; r = aa / w; aB = r > 1; aG = z > 1; if (!(aG || aB)) { E.removeClass("jspScrollable"); Z.css({ top: 0, width: an.width() - g }); o(); F(); S(); x(); aj() } else { E.addClass("jspScrollable"); aN = aA.maintainPosition && (J || ab); if (aN) { aP = aE(); aO = aC() } aH(); A(); G(); if (aN) { O(aM ? (U - al) : aP, false); N(aQ ? (aa - w) : aO, false) } K(); ah(); ap(); if (aA.enableKeyboardNavigation) { T() } if (aA.clickOnTrack) { q() } D(); if (aA.hijackInternalLinks) { n() } } if (aA.autoReinitialise && !ax) { ax = setInterval(function () { au(aA) }, aA.autoReinitialiseDelay) } else { if (!aA.autoReinitialise && ax) { clearInterval(ax) } } aK && E.scrollTop(0) && N(aK, false); aR && E.scrollLeft(0) && O(aR, false); E.trigger("jsp-initialised", [aG || aB]) } function aH() { if (aB) { an.append(b('<div class="jspVerticalBar" />').append(b('<div class="jspCap jspCapTop" />'), b('<div class="jspTrack" />').append(b('<div class="jspDrag" />').append(b('<div class="jspDragTop" />'), b('<div class="jspDragBottom" />'))), b('<div class="jspCap jspCapBottom" />'))); V = an.find(">.jspVerticalBar"); ar = V.find(">.jspTrack"); aw = ar.find(">.jspDrag"); if (aA.showArrows) { at = b('<a class="jspArrow jspArrowUp" />').bind("mousedown.jsp", aF(0, -1)).bind("click.jsp", aD); ag = b('<a class="jspArrow jspArrowDown" />').bind("mousedown.jsp", aF(0, 1)).bind("click.jsp", aD); if (aA.arrowScrollOnHover) { at.bind("mouseover.jsp", aF(0, -1, at)); ag.bind("mouseover.jsp", aF(0, 1, ag)) } am(ar, aA.verticalArrowPositions, at, ag) } u = w; an.find(">.jspVerticalBar>.jspCap:visible,>.jspVerticalBar>.jspArrow").each(function () { u -= b(this).outerHeight() }); aw.hover(function () { aw.addClass("jspHover") }, function () { aw.removeClass("jspHover") }).bind("mousedown.jsp", function (aK) { b("html").bind("dragstart.jsp selectstart.jsp", aD); aw.addClass("jspActive"); var s = aK.pageY - aw.position().top; b("html").bind("mousemove.jsp", function (aL) { W(aL.pageY - s, false) }).bind("mouseup.jsp mouseleave.jsp", ay); return false }); p() } } function p() { ar.height(u + "px"); J = 0; Y = aA.verticalGutter + ar.outerWidth(); Z.width(al - Y - g); try { if (V.position().left === 0) { Z.css("margin-left", Y + "px") } } catch (s) { } } function A() {
				if (aG) {
					an.append(b('<div class="jspHorizontalBar" />').append(b('<div class="jspCap jspCapLeft" />'), b('<div class="jspTrack" />').append(b('<div class="jspDrag" />').append(b('<div class="jspDragLeft" />'), b('<div class="jspDragRight" />'))), b('<div class="jspCap jspCapRight" />'))); ao = an.find(">.jspHorizontalBar"); H = ao.find(">.jspTrack"); i = H.find(">.jspDrag"); if (aA.showArrows) {
						az = b('<a class="jspArrow jspArrowLeft" />').bind("mousedown.jsp", aF(-1, 0)).bind("click.jsp", aD); y = b('<a class="jspArrow jspArrowRight" />').bind("mousedown.jsp", aF(1, 0)).bind("click.jsp", aD);
						if (aA.arrowScrollOnHover) { az.bind("mouseover.jsp", aF(-1, 0, az)); y.bind("mouseover.jsp", aF(1, 0, y)) } am(H, aA.horizontalArrowPositions, az, y)
					} i.hover(function () { i.addClass("jspHover") }, function () { i.removeClass("jspHover") }).bind("mousedown.jsp", function (aK) { b("html").bind("dragstart.jsp selectstart.jsp", aD); i.addClass("jspActive"); var s = aK.pageX - i.position().left; b("html").bind("mousemove.jsp", function (aL) { X(aL.pageX - s, false) }).bind("mouseup.jsp mouseleave.jsp", ay); return false }); m = an.innerWidth(); ai()
				} 
			} function ai() { an.find(">.jspHorizontalBar>.jspCap:visible,>.jspHorizontalBar>.jspArrow").each(function () { m -= b(this).outerWidth() }); H.width(m + "px"); ab = 0 } function G() { if (aG && aB) { var aK = H.outerHeight(), s = ar.outerWidth(); u -= aK; b(ao).find(">.jspCap:visible,>.jspArrow").each(function () { m += b(this).outerWidth() }); m -= s; w -= s; al -= aK; H.parent().append(b('<div class="jspCorner" />').css("width", aK + "px")); p(); ai() } if (aG) { Z.width((an.outerWidth() - g) + "px") } aa = Z.outerHeight(); r = aa / w; if (aG) { av = Math.ceil(1 / z * m); if (av > aA.horizontalDragMaxWidth) { av = aA.horizontalDragMaxWidth } else { if (av < aA.horizontalDragMinWidth) { av = aA.horizontalDragMinWidth } } i.width(av + "px"); k = m - av; af(ab) } if (aB) { B = Math.ceil(1 / r * u); if (B > aA.verticalDragMaxHeight) { B = aA.verticalDragMaxHeight } else { if (B < aA.verticalDragMinHeight) { B = aA.verticalDragMinHeight } } aw.height(B + "px"); j = u - B; ae(J) } } function am(aL, aN, aK, s) { var aP = "before", aM = "after", aO; if (aN == "os") { aN = /Mac/.test(navigator.platform) ? "after" : "split" } if (aN == aP) { aM = aN } else { if (aN == aM) { aP = aN; aO = aK; aK = s; s = aO } } aL[aP](aK)[aM](s) } function aF(aK, s, aL) { return function () { I(aK, s, this, aL); this.blur(); return false } } function I(aN, aM, aQ, aP) { aQ = b(aQ).addClass("jspActive"); var aO, aL, aK = true, s = function () { if (aN !== 0) { R.scrollByX(aN * aA.arrowButtonSpeed) } if (aM !== 0) { R.scrollByY(aM * aA.arrowButtonSpeed) } aL = setTimeout(s, aK ? aA.initialDelay : aA.arrowRepeatFreq); aK = false }; s(); aO = aP ? "mouseout.jsp" : "mouseup.jsp"; aP = aP || b("html"); aP.bind(aO, function () { aQ.removeClass("jspActive"); aL && clearTimeout(aL); aL = null; aP.unbind(aO) }) } function q() { x(); if (aB) { ar.bind("mousedown.jsp", function (aP) { if (aP.originalTarget === c || aP.originalTarget == aP.currentTarget) { var aN = b(this), aQ = aN.offset(), aO = aP.pageY - aQ.top - J, aL, aK = true, s = function () { var aT = aN.offset(), aU = aP.pageY - aT.top - B / 2, aR = w * aA.scrollPagePercent, aS = j * aR / (aa - w); if (aO < 0) { if (J - aS > aU) { R.scrollByY(-aR) } else { W(aU) } } else { if (aO > 0) { if (J + aS < aU) { R.scrollByY(aR) } else { W(aU) } } else { aM(); return } } aL = setTimeout(s, aK ? aA.initialDelay : aA.trackClickRepeatFreq); aK = false }, aM = function () { aL && clearTimeout(aL); aL = null; b(document).unbind("mouseup.jsp", aM) }; s(); b(document).bind("mouseup.jsp", aM); return false } }) } if (aG) { H.bind("mousedown.jsp", function (aP) { if (aP.originalTarget === c || aP.originalTarget == aP.currentTarget) { var aN = b(this), aQ = aN.offset(), aO = aP.pageX - aQ.left - ab, aL, aK = true, s = function () { var aT = aN.offset(), aU = aP.pageX - aT.left - av / 2, aR = al * aA.scrollPagePercent, aS = k * aR / (U - al); if (aO < 0) { if (ab - aS > aU) { R.scrollByX(-aR) } else { X(aU) } } else { if (aO > 0) { if (ab + aS < aU) { R.scrollByX(aR) } else { X(aU) } } else { aM(); return } } aL = setTimeout(s, aK ? aA.initialDelay : aA.trackClickRepeatFreq); aK = false }, aM = function () { aL && clearTimeout(aL); aL = null; b(document).unbind("mouseup.jsp", aM) }; s(); b(document).bind("mouseup.jsp", aM); return false } }) } } function x() { if (H) { H.unbind("mousedown.jsp") } if (ar) { ar.unbind("mousedown.jsp") } } function ay() { b("html").unbind("dragstart.jsp selectstart.jsp mousemove.jsp mouseup.jsp mouseleave.jsp"); if (aw) { aw.removeClass("jspActive") } if (i) { i.removeClass("jspActive") } } function W(s, aK) { if (!aB) { return } if (s < 0) { s = 0 } else { if (s > j) { s = j } } if (aK === c) { aK = aA.animateScroll } if (aK) { R.animate(aw, "top", s, ae) } else { aw.css("top", s); ae(s) } } function ae(aK) { if (aK === c) { aK = aw.position().top } an.scrollTop(0); J = aK; var aN = J === 0, aL = J == j, aM = aK / j, s = -aM * (aa - w); if (ak != aN || aI != aL) { ak = aN; aI = aL; E.trigger("jsp-arrow-change", [ak, aI, Q, l]) } v(aN, aL); Z.css("top", s); E.trigger("jsp-scroll-y", [-s, aN, aL]).trigger("scroll") } function X(aK, s) {
				if (!aG) { return } if (aK < 0) { aK = 0 } else { if (aK > k) { aK = k } } if (s === c) { s = aA.animateScroll } if (s) {
					R.animate(i, "left", aK, af)
				} else { i.css("left", aK); af(aK) } 
			} function af(aK) { if (aK === c) { aK = i.position().left } an.scrollTop(0); ab = aK; var aN = ab === 0, aM = ab == k, aL = aK / k, s = -aL * (U - al); if (Q != aN || l != aM) { Q = aN; l = aM; E.trigger("jsp-arrow-change", [ak, aI, Q, l]) } t(aN, aM); Z.css("left", s); E.trigger("jsp-scroll-x", [-s, aN, aM]).trigger("scroll") } function v(aK, s) { if (aA.showArrows) { at[aK ? "addClass" : "removeClass"]("jspDisabled"); ag[s ? "addClass" : "removeClass"]("jspDisabled") } } function t(aK, s) { if (aA.showArrows) { az[aK ? "addClass" : "removeClass"]("jspDisabled"); y[s ? "addClass" : "removeClass"]("jspDisabled") } } function N(s, aK) { var aL = s / (aa - w); W(aL * j, aK) } function O(aK, s) { var aL = aK / (U - al); X(aL * k, s) } function ac(aX, aS, aL) { var aP, aM, aN, s = 0, aW = 0, aK, aR, aQ, aU, aT, aV; try { aP = b(aX) } catch (aO) { return } aM = aP.outerHeight(); aN = aP.outerWidth(); an.scrollTop(0); an.scrollLeft(0); while (!aP.is(".jspPane")) { s += aP.position().top; aW += aP.position().left; aP = aP.offsetParent(); if (/^body|html$/i.test(aP[0].nodeName)) { return } } aK = aC(); aQ = aK + w; if (s < aK || aS) { aT = s - aA.verticalGutter } else { if (s + aM > aQ) { aT = s - w + aM + aA.verticalGutter } } if (aT) { N(aT, aL) } aR = aE(); aU = aR + al; if (aW < aR || aS) { aV = aW - aA.horizontalGutter } else { if (aW + aN > aU) { aV = aW - al + aN + aA.horizontalGutter } } if (aV) { O(aV, aL) } } function aE() { return -Z.position().left } function aC() { return -Z.position().top } function L() { var s = aa - w; return (s > 20) && (s - aC() < 10) } function C() { var s = U - al; return (s > 20) && (s - aE() < 10) } function ah() { an.unbind(ad).bind(ad, function (aN, aO, aM, aK) { var aL = ab, s = J; R.scrollBy(aM * aA.mouseWheelSpeed, -aK * aA.mouseWheelSpeed, false); return aL == ab && s == J }) } function o() { an.unbind(ad) } function aD() { return false } function K() { Z.find(":input,a").unbind("focus.jsp").bind("focus.jsp", function (s) { ac(s.target, false) }) } function F() { Z.find(":input,a").unbind("focus.jsp") } function T() { var s, aK, aM = []; aG && aM.push(ao[0]); aB && aM.push(V[0]); Z.focus(function () { E.focus() }); E.attr("tabindex", 0).unbind("keydown.jsp keypress.jsp").bind("keydown.jsp", function (aP) { if (aP.target !== this && !(aM.length && b(aP.target).closest(aM).length)) { return } var aO = ab, aN = J; switch (aP.keyCode) { case 40: case 38: case 34: case 32: case 33: case 39: case 37: s = aP.keyCode; aL(); break; case 35: N(aa - w); s = null; break; case 36: N(0); s = null; break } aK = aP.keyCode == s && aO != ab || aN != J; return !aK }).bind("keypress.jsp", function (aN) { if (aN.keyCode == s) { aL() } return !aK }); if (aA.hideFocus) { E.css("outline", "none"); if ("hideFocus" in an[0]) { E.attr("hideFocus", true) } } else { E.css("outline", ""); if ("hideFocus" in an[0]) { E.attr("hideFocus", false) } } function aL() { var aO = ab, aN = J; switch (s) { case 40: R.scrollByY(aA.keyboardSpeed, false); break; case 38: R.scrollByY(-aA.keyboardSpeed, false); break; case 34: case 32: R.scrollByY(w * aA.scrollPagePercent, false); break; case 33: R.scrollByY(-w * aA.scrollPagePercent, false); break; case 39: R.scrollByX(aA.keyboardSpeed, false); break; case 37: R.scrollByX(-aA.keyboardSpeed, false); break } aK = aO != ab || aN != J; return aK } } function S() { E.attr("tabindex", "-1").removeAttr("tabindex").unbind("keydown.jsp keypress.jsp") } function D() { if (location.hash && location.hash.length > 1) { var aL, aK; try { aL = b(location.hash) } catch (s) { return } if (aL.length && Z.find(location.hash)) { if (an.scrollTop() === 0) { aK = setInterval(function () { if (an.scrollTop() > 0) { ac(location.hash, true); b(document).scrollTop(an.position().top); clearInterval(aK) } }, 50) } else { ac(location.hash, true); b(document).scrollTop(an.position().top) } } } } function aj() { b("a.jspHijack").unbind("click.jsp-hijack").removeClass("jspHijack") } function n() { aj(); b("a[href^=#]").addClass("jspHijack").bind("click.jsp-hijack", function () { var s = this.href.split("#"), aK; if (s.length > 1) { aK = s[1]; if (aK.length > 0 && Z.find("#" + aK).length > 0) { ac("#" + aK, true); return false } } }) } function ap() {
				var aL, aK, aN, aM, aO, s = false; an.unbind("touchstart.jsp touchmove.jsp touchend.jsp click.jsp-touchclick").bind("touchstart.jsp", function (aP) { var aQ = aP.originalEvent.touches[0]; aL = aE(); aK = aC(); aN = aQ.pageX; aM = aQ.pageY; aO = false; s = true }).bind("touchmove.jsp", function (aS) {
					if (!s) { return } var aR = aS.originalEvent.touches[0], aQ = ab, aP = J; R.scrollTo(aL + aN - aR.pageX, aK + aM - aR.pageY); aO = aO || Math.abs(aN - aR.pageX) > 5 || Math.abs(aM - aR.pageY) > 5;
					return aQ == ab && aP == J
				}).bind("touchend.jsp", function (aP) { s = false }).bind("click.jsp-touchclick", function (aP) { if (aO) { aO = false; return false } })
			} function h() { var s = aC(), aK = aE(); E.removeClass("jspScrollable").unbind(".jsp"); E.replaceWith(aq.append(Z.children())); aq.scrollTop(s); aq.scrollLeft(aK) } b.extend(R, { reinitialise: function (aK) { aK = b.extend({}, aA, aK); au(aK) }, scrollToElement: function (aL, aK, s) { ac(aL, aK, s) }, scrollTo: function (aL, s, aK) { O(aL, aK); N(s, aK) }, scrollToX: function (aK, s) { O(aK, s) }, scrollToY: function (s, aK) { N(s, aK) }, scrollToPercentX: function (aK, s) { O(aK * (U - al), s) }, scrollToPercentY: function (aK, s) { N(aK * (aa - w), s) }, scrollBy: function (aK, s, aL) { R.scrollByX(aK, aL); R.scrollByY(s, aL) }, scrollByX: function (s, aL) { var aK = aE() + s, aM = aK / (U - al); X(aM * k, aL) }, scrollByY: function (s, aL) { var aK = aC() + s, aM = aK / (aa - w); W(aM * j, aL) }, positionDragX: function (s, aK) { X(s, aK) }, positionDragY: function (aK, s) { W(aK, s) }, animate: function (aK, aN, s, aM) { var aL = {}; aL[aN] = s; aK.animate(aL, { duration: aA.animateDuration, ease: aA.animateEase, queue: false, step: aM }) }, getContentPositionX: function () { return aE() }, getContentPositionY: function () { return aC() }, getContentWidth: function () { return U }, getContentHeight: function () { return aa }, getPercentScrolledX: function () { return aE() / (U - al) }, getPercentScrolledY: function () { return aC() / (aa - w) }, getIsScrollableH: function () { return aG }, getIsScrollableV: function () { return aB }, getContentPane: function () { return Z }, scrollToBottom: function (s) { W(j, s) }, hijackInternalLinks: function () { n() }, destroy: function () { h() } }); au(P)
		} f = b.extend({}, b.fn.jScrollPane.defaults, f); b.each(["mouseWheelSpeed", "arrowButtonSpeed", "trackClickSpeed", "keyboardSpeed"], function () { f[this] = f[this] || f.speed }); var e; this.each(function () { var g = b(this), h = g.data("jsp"); if (h) { h.reinitialise(f) } else { h = new d(g, f); g.data("jsp", h) } e = e ? e.add(g) : g }); return e
	}; b.fn.jScrollPane.defaults = { showArrows: false, maintainPosition: true, stickToBottom: false, stickToRight: false, clickOnTrack: true, autoReinitialise: false, autoReinitialiseDelay: 500, verticalDragMinHeight: 0, verticalDragMaxHeight: 99999, horizontalDragMinWidth: 0, horizontalDragMaxWidth: 99999, contentWidth: c, animateScroll: false, animateDuration: 300, animateEase: "linear", hijackInternalLinks: false, verticalGutter: 4, horizontalGutter: 4, mouseWheelSpeed: 0, arrowButtonSpeed: 0, arrowRepeatFreq: 50, arrowScrollOnHover: false, trackClickSpeed: 0, trackClickRepeatFreq: 70, verticalArrowPositions: "split", horizontalArrowPositions: "split", enableKeyboardNavigation: true, hideFocus: false, keyboardSpeed: 0, initialDelay: 300, speed: 30, scrollPagePercent: 0.8}
})(jQuery, this);


/*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
* Licensed under the MIT License (LICENSE.txt).
*
* Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
* Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
* Thanks to: Seamus Leahy for adding deltaX and deltaY
*
* Version: 3.0.4
* 
* Requires: 1.2.2+
*/

(function ($) {

	var types = ['DOMMouseScroll', 'mousewheel'];

	$.event.special.mousewheel = {
		setup: function () {
			if (this.addEventListener) {
				for (var i = types.length; i; ) {
					this.addEventListener(types[--i], handler, false);
				}
			} else {
				this.onmousewheel = handler;
			}
		},

		teardown: function () {
			if (this.removeEventListener) {
				for (var i = types.length; i; ) {
					this.removeEventListener(types[--i], handler, false);
				}
			} else {
				this.onmousewheel = null;
			}
		}
	};

	$.fn.extend({
		mousewheel: function (fn) {
			return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel");
		},

		unmousewheel: function (fn) {
			return this.unbind("mousewheel", fn);
		}
	});


	function handler(event) {
		var orgEvent = event || window.event, args = [].slice.call(arguments, 1), delta = 0, returnValue = true, deltaX = 0, deltaY = 0;
		event = $.event.fix(orgEvent);
		event.type = "mousewheel";

		// Old school scrollwheel delta
		if (event.wheelDelta) { delta = event.wheelDelta / 120; }
		if (event.detail) { delta = -event.detail / 3; }

		// New school multidimensional scroll (touchpads) deltas
		deltaY = delta;

		// Gecko
		if (orgEvent.axis !== undefined && orgEvent.axis === orgEvent.HORIZONTAL_AXIS) {
			deltaY = 0;
			deltaX = -1 * delta;
		}

		// Webkit
		if (orgEvent.wheelDeltaY !== undefined) { deltaY = orgEvent.wheelDeltaY / 120; }
		if (orgEvent.wheelDeltaX !== undefined) { deltaX = -1 * orgEvent.wheelDeltaX / 120; }

		// Add event and delta to the front of the arguments
		args.unshift(event, delta, deltaX, deltaY);

		return $.event.handle.apply(this, args);
	}

})(jQuery);


/**
* @author trixta
* @version 1.2
*/
(function ($) {

	var mwheelI = {
		pos: [-260, -260]
	},
	minDif = 3,
	doc = document,
	root = doc.documentElement,
	body = doc.body,
	longDelay, shortDelay
;

	function unsetPos() {
		if (this === mwheelI.elem) {
			mwheelI.pos = [-260, -260];
			mwheelI.elem = false;
			minDif = 3;
		}
	}

	$.event.special.mwheelIntent = {
		setup: function () {
			var jElm = $(this).bind('mousewheel', $.event.special.mwheelIntent.handler);
			if (this !== doc && this !== root && this !== body) {
				jElm.bind('mouseleave', unsetPos);
			}
			jElm = null;
			return true;
		},
		teardown: function () {
			$(this)
			.unbind('mousewheel', $.event.special.mwheelIntent.handler)
			.unbind('mouseleave', unsetPos)
		;
			return true;
		},
		handler: function (e, d) {
			var pos = [e.clientX, e.clientY];
			if (this === mwheelI.elem || Math.abs(mwheelI.pos[0] - pos[0]) > minDif || Math.abs(mwheelI.pos[1] - pos[1]) > minDif) {
				mwheelI.elem = this;
				mwheelI.pos = pos;
				minDif = 250;

				clearTimeout(shortDelay);
				shortDelay = setTimeout(function () {
					minDif = 10;
				}, 200);
				clearTimeout(longDelay);
				longDelay = setTimeout(function () {
					minDif = 3;
				}, 1500);
				e = $.extend({}, e, { type: 'mwheelIntent' });
				return $.event.handle.apply(this, arguments);
			}
		}
	};
	$.fn.extend({
		mwheelIntent: function (fn) {
			return fn ? this.bind("mwheelIntent", fn) : this.trigger("mwheelIntent");
		},

		unmwheelIntent: function (fn) {
			return this.unbind("mwheelIntent", fn);
		}
	});

	$(function () {
		body = doc.body;
		//assume that document is always scrollable, doesn't hurt if not
		$(doc).bind('mwheelIntent.mwheelIntentDefault', $.noop);
	});
})(jQuery);


/* 
* flowplayer.js 3.2.6. The Flowplayer API
* 
* Copyright 2009-2011 Flowplayer Oy
* 
* This file is part of Flowplayer.
* 
* Flowplayer is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* 
* Flowplayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
* 
* You should have received a copy of the GNU General Public License
* along with Flowplayer.  If not, see <http://www.gnu.org/licenses/>.
* 
* Date: 2011-02-04 05:45:28 -0500 (Fri, 04 Feb 2011)
* Revision: 614 
*/
(function () { function g(o) { console.log("$f.fireEvent", [].slice.call(o)) } function k(q) { if (!q || typeof q != "object") { return q } var o = new q.constructor(); for (var p in q) { if (q.hasOwnProperty(p)) { o[p] = k(q[p]) } } return o } function m(t, q) { if (!t) { return } var o, p = 0, r = t.length; if (r === undefined) { for (o in t) { if (q.call(t[o], o, t[o]) === false) { break } } } else { for (var s = t[0]; p < r && q.call(s, p, s) !== false; s = t[++p]) { } } return t } function c(o) { return document.getElementById(o) } function i(q, p, o) { if (typeof p != "object") { return q } if (q && p) { m(p, function (r, s) { if (!o || typeof s != "function") { q[r] = s } }) } return q } function n(s) { var q = s.indexOf("."); if (q != -1) { var p = s.slice(0, q) || "*"; var o = s.slice(q + 1, s.length); var r = []; m(document.getElementsByTagName(p), function () { if (this.className && this.className.indexOf(o) != -1) { r.push(this) } }); return r } } function f(o) { o = o || window.event; if (o.preventDefault) { o.stopPropagation(); o.preventDefault() } else { o.returnValue = false; o.cancelBubble = true } return false } function j(q, o, p) { q[o] = q[o] || []; q[o].push(p) } function e() { return "_" + ("" + Math.random()).slice(2, 10) } var h = function (t, r, s) { var q = this, p = {}, u = {}; q.index = r; if (typeof t == "string") { t = { url: t} } i(this, t, true); m(("Begin*,Start,Pause*,Resume*,Seek*,Stop*,Finish*,LastSecond,Update,BufferFull,BufferEmpty,BufferStop").split(","), function () { var v = "on" + this; if (v.indexOf("*") != -1) { v = v.slice(0, v.length - 1); var w = "onBefore" + v.slice(2); q[w] = function (x) { j(u, w, x); return q } } q[v] = function (x) { j(u, v, x); return q }; if (r == -1) { if (q[w]) { s[w] = q[w] } if (q[v]) { s[v] = q[v] } } }); i(this, { onCuepoint: function (x, w) { if (arguments.length == 1) { p.embedded = [null, x]; return q } if (typeof x == "number") { x = [x] } var v = e(); p[v] = [x, w]; if (s.isLoaded()) { s._api().fp_addCuepoints(x, r, v) } return q }, update: function (w) { i(q, w); if (s.isLoaded()) { s._api().fp_updateClip(w, r) } var v = s.getConfig(); var x = (r == -1) ? v.clip : v.playlist[r]; i(x, w, true) }, _fireEvent: function (v, y, w, A) { if (v == "onLoad") { m(p, function (B, C) { if (C[0]) { s._api().fp_addCuepoints(C[0], r, B) } }); return false } A = A || q; if (v == "onCuepoint") { var z = p[y]; if (z) { return z[1].call(s, A, w) } } if (y && "onBeforeBegin,onMetaData,onStart,onUpdate,onResume".indexOf(v) != -1) { i(A, y); if (y.metaData) { if (!A.duration) { A.duration = y.metaData.duration } else { A.fullDuration = y.metaData.duration } } } var x = true; m(u[v], function () { x = this.call(s, A, y, w) }); return x } }); if (t.onCuepoint) { var o = t.onCuepoint; q.onCuepoint.apply(q, typeof o == "function" ? [o] : o); delete t.onCuepoint } m(t, function (v, w) { if (typeof w == "function") { j(u, v, w); delete t[v] } }); if (r == -1) { s.onCuepoint = this.onCuepoint } }; var l = function (p, r, q, t) { var o = this, s = {}, u = false; if (t) { i(s, t) } m(r, function (v, w) { if (typeof w == "function") { s[v] = w; delete r[v] } }); i(this, { animate: function (y, z, x) { if (!y) { return o } if (typeof z == "function") { x = z; z = 500 } if (typeof y == "string") { var w = y; y = {}; y[w] = z; z = 500 } if (x) { var v = e(); s[v] = x } if (z === undefined) { z = 500 } r = q._api().fp_animate(p, y, z, v); return o }, css: function (w, x) { if (x !== undefined) { var v = {}; v[w] = x; w = v } r = q._api().fp_css(p, w); i(o, r); return o }, show: function () { this.display = "block"; q._api().fp_showPlugin(p); return o }, hide: function () { this.display = "none"; q._api().fp_hidePlugin(p); return o }, toggle: function () { this.display = q._api().fp_togglePlugin(p); return o }, fadeTo: function (y, x, w) { if (typeof x == "function") { w = x; x = 500 } if (w) { var v = e(); s[v] = w } this.display = q._api().fp_fadeTo(p, y, x, v); this.opacity = y; return o }, fadeIn: function (w, v) { return o.fadeTo(1, w, v) }, fadeOut: function (w, v) { return o.fadeTo(0, w, v) }, getName: function () { return p }, getPlayer: function () { return q }, _fireEvent: function (w, v, x) { if (w == "onUpdate") { var z = q._api().fp_getPlugin(p); if (!z) { return } i(o, z); delete o.methods; if (!u) { m(z.methods, function () { var B = "" + this; o[B] = function () { var C = [].slice.call(arguments); var D = q._api().fp_invoke(p, B, C); return D === "undefined" || D === undefined ? o : D } }); u = true } } var A = s[w]; if (A) { var y = A.apply(o, v); if (w.slice(0, 1) == "_") { delete s[w] } return y } return o } }) }; function b(q, G, t) { var w = this, v = null, D = false, u, s, F = [], y = {}, x = {}, E, r, p, C, o, A; i(w, { id: function () { return E }, isLoaded: function () { return (v !== null && v.fp_play !== undefined && !D) }, getParent: function () { return q }, hide: function (H) { if (H) { q.style.height = "0px" } if (w.isLoaded()) { v.style.height = "0px" } return w }, show: function () { q.style.height = A + "px"; if (w.isLoaded()) { v.style.height = o + "px" } return w }, isHidden: function () { return w.isLoaded() && parseInt(v.style.height, 10) === 0 }, load: function (J) { if (!w.isLoaded() && w._fireEvent("onBeforeLoad") !== false) { var H = function () { u = q.innerHTML; if (u && !flashembed.isSupported(G.version)) { q.innerHTML = "" } if (J) { J.cached = true; j(x, "onLoad", J) } flashembed(q, G, { config: t }) }; var I = 0; m(a, function () { this.unload(function (K) { if (++I == a.length) { H() } }) }) } return w }, unload: function (J) { if (this.isFullscreen() && /WebKit/i.test(navigator.userAgent)) { if (J) { J(false) } return w } if (u.replace(/\s/g, "") !== "") { if (w._fireEvent("onBeforeUnload") === false) { if (J) { J(false) } return w } D = true; try { if (v) { v.fp_close(); w._fireEvent("onUnload") } } catch (H) { } var I = function () { v = null; q.innerHTML = u; D = false; if (J) { J(true) } }; setTimeout(I, 50) } else { if (J) { J(false) } } return w }, getClip: function (H) { if (H === undefined) { H = C } return F[H] }, getCommonClip: function () { return s }, getPlaylist: function () { return F }, getPlugin: function (H) { var J = y[H]; if (!J && w.isLoaded()) { var I = w._api().fp_getPlugin(H); if (I) { J = new l(H, I, w); y[H] = J } } return J }, getScreen: function () { return w.getPlugin("screen") }, getControls: function () { return w.getPlugin("controls")._fireEvent("onUpdate") }, getLogo: function () { try { return w.getPlugin("logo")._fireEvent("onUpdate") } catch (H) { } }, getPlay: function () { return w.getPlugin("play")._fireEvent("onUpdate") }, getConfig: function (H) { return H ? k(t) : t }, getFlashParams: function () { return G }, loadPlugin: function (K, J, M, L) { if (typeof M == "function") { L = M; M = {} } var I = L ? e() : "_"; w._api().fp_loadPlugin(K, J, M, I); var H = {}; H[I] = L; var N = new l(K, null, w, H); y[K] = N; return N }, getState: function () { return w.isLoaded() ? v.fp_getState() : -1 }, play: function (I, H) { var J = function () { if (I !== undefined) { w._api().fp_play(I, H) } else { w._api().fp_play() } }; if (w.isLoaded()) { J() } else { if (D) { setTimeout(function () { w.play(I, H) }, 50) } else { w.load(function () { J() }) } } return w }, getVersion: function () { var I = "flowplayer.js 3.2.6"; if (w.isLoaded()) { var H = v.fp_getVersion(); H.push(I); return H } return I }, _api: function () { if (!w.isLoaded()) { throw "Flowplayer " + w.id() + " not loaded when calling an API method" } return v }, setClip: function (H) { w.setPlaylist([H]); return w }, getIndex: function () { return p }, _swfHeight: function () { return v.clientHeight } }); m(("Click*,Load*,Unload*,Keypress*,Volume*,Mute*,Unmute*,PlaylistReplace,ClipAdd,Fullscreen*,FullscreenExit,Error,MouseOver,MouseOut").split(","), function () { var H = "on" + this; if (H.indexOf("*") != -1) { H = H.slice(0, H.length - 1); var I = "onBefore" + H.slice(2); w[I] = function (J) { j(x, I, J); return w } } w[H] = function (J) { j(x, H, J); return w } }); m(("pause,resume,mute,unmute,stop,toggle,seek,getStatus,getVolume,setVolume,getTime,isPaused,isPlaying,startBuffering,stopBuffering,isFullscreen,toggleFullscreen,reset,close,setPlaylist,addClip,playFeed,setKeyboardShortcutsEnabled,isKeyboardShortcutsEnabled").split(","), function () { var H = this; w[H] = function (J, I) { if (!w.isLoaded()) { return w } var K = null; if (J !== undefined && I !== undefined) { K = v["fp_" + H](J, I) } else { K = (J === undefined) ? v["fp_" + H]() : v["fp_" + H](J) } return K === "undefined" || K === undefined ? w : K } }); w._fireEvent = function (Q) { if (typeof Q == "string") { Q = [Q] } var R = Q[0], O = Q[1], M = Q[2], L = Q[3], K = 0; if (t.debug) { g(Q) } if (!w.isLoaded() && R == "onLoad" && O == "player") { v = v || c(r); o = w._swfHeight(); m(F, function () { this._fireEvent("onLoad") }); m(y, function (S, T) { T._fireEvent("onUpdate") }); s._fireEvent("onLoad") } if (R == "onLoad" && O != "player") { return } if (R == "onError") { if (typeof O == "string" || (typeof O == "number" && typeof M == "number")) { O = M; M = L } } if (R == "onContextMenu") { m(t.contextMenu[O], function (S, T) { T.call(w) }); return } if (R == "onPluginEvent" || R == "onBeforePluginEvent") { var H = O.name || O; var I = y[H]; if (I) { I._fireEvent("onUpdate", O); return I._fireEvent(M, Q.slice(3)) } return } if (R == "onPlaylistReplace") { F = []; var N = 0; m(O, function () { F.push(new h(this, N++, w)) }) } if (R == "onClipAdd") { if (O.isInStream) { return } O = new h(O, M, w); F.splice(M, 0, O); for (K = M + 1; K < F.length; K++) { F[K].index++ } } var P = true; if (typeof O == "number" && O < F.length) { C = O; var J = F[O]; if (J) { P = J._fireEvent(R, M, L) } if (!J || P !== false) { P = s._fireEvent(R, M, L, J) } } m(x[R], function () { P = this.call(w, O, M); if (this.cached) { x[R].splice(K, 1) } if (P === false) { return false } K++ }); return P }; function B() { if ($f(q)) { $f(q).getParent().innerHTML = ""; p = $f(q).getIndex(); a[p] = w } else { a.push(w); p = a.length - 1 } A = parseInt(q.style.height, 10) || q.clientHeight; E = q.id || "fp" + e(); r = G.id || E + "_api"; G.id = r; t.playerId = E; if (typeof t == "string") { t = { clip: { url: t}} } if (typeof t.clip == "string") { t.clip = { url: t.clip} } t.clip = t.clip || {}; if (q.getAttribute("href", 2) && !t.clip.url) { t.clip.url = q.getAttribute("href", 2) } s = new h(t.clip, -1, w); t.playlist = t.playlist || [t.clip]; var I = 0; m(t.playlist, function () { var K = this; if (typeof K == "object" && K.length) { K = { url: "" + K} } m(t.clip, function (L, M) { if (M !== undefined && K[L] === undefined && typeof M != "function") { K[L] = M } }); t.playlist[I] = K; K = new h(K, I, w); F.push(K); I++ }); m(t, function (K, L) { if (typeof L == "function") { if (s[K]) { s[K](L) } else { j(x, K, L) } delete t[K] } }); m(t.plugins, function (K, L) { if (L) { y[K] = new l(K, L, w) } }); if (!t.plugins || t.plugins.controls === undefined) { y.controls = new l("controls", null, w) } y.canvas = new l("canvas", null, w); u = q.innerHTML; function J(L) { var K = w.hasiPadSupport && w.hasiPadSupport(); if (/iPad|iPhone|iPod/i.test(navigator.userAgent) && !/.flv$/i.test(F[0].url) && !K) { return true } if (!w.isLoaded() && w._fireEvent("onBeforeClick") !== false) { w.load() } return f(L) } function H() { if (u.replace(/\s/g, "") !== "") { if (q.addEventListener) { q.addEventListener("click", J, false) } else { if (q.attachEvent) { q.attachEvent("onclick", J) } } } else { if (q.addEventListener) { q.addEventListener("click", f, false) } w.load() } } setTimeout(H, 0) } if (typeof q == "string") { var z = c(q); if (!z) { throw "Flowplayer cannot access element: " + q } q = z; B() } else { B() } } var a = []; function d(o) { this.length = o.length; this.each = function (p) { m(o, p) }; this.size = function () { return o.length } } window.flowplayer = window.$f = function () { var p = null; var o = arguments[0]; if (!arguments.length) { m(a, function () { if (this.isLoaded()) { p = this; return false } }); return p || a[0] } if (arguments.length == 1) { if (typeof o == "number") { return a[o] } else { if (o == "*") { return new d(a) } m(a, function () { if (this.id() == o.id || this.id() == o || this.getParent() == o) { p = this; return false } }); return p } } if (arguments.length > 1) { var t = arguments[1], q = (arguments.length == 3) ? arguments[2] : {}; if (typeof t == "string") { t = { src: t} } t = i({ bgcolor: "#000000", version: [9, 0], expressInstall: "http://static.flowplayer.org/swf/expressinstall.swf", cachebusting: false }, t); if (typeof o == "string") { if (o.indexOf(".") != -1) { var s = []; m(n(o), function () { s.push(new b(this, k(t), k(q))) }); return new d(s) } else { var r = c(o); return new b(r !== null ? r : o, t, q) } } else { if (o) { return new b(o, t, q) } } } return null }; i(window.$f, { fireEvent: function () { var o = [].slice.call(arguments); var q = $f(o[0]); return q ? q._fireEvent(o.slice(1)) : null }, addPlugin: function (o, p) { b.prototype[o] = p; return $f }, each: m, extend: i }); if (typeof jQuery == "function") { jQuery.fn.flowplayer = function (q, p) { if (!arguments.length || typeof arguments[0] == "number") { var o = []; this.each(function () { var r = $f(this); if (r) { o.push(r) } }); return arguments.length ? o[arguments[0]] : new d(o) } return this.each(function () { $f(this, k(q), p ? k(p) : {}) }) } } })(); (function () { var e = typeof jQuery == "function"; var i = { width: "100%", height: "100%", allowfullscreen: true, allowscriptaccess: "always", quality: "high", version: null, onFail: null, expressInstall: null, w3c: false, cachebusting: false }; if (e) { jQuery.tools = jQuery.tools || {}; jQuery.tools.flashembed = { version: "1.0.4", conf: i} } function j() { if (c.done) { return false } var l = document; if (l && l.getElementsByTagName && l.getElementById && l.body) { clearInterval(c.timer); c.timer = null; for (var k = 0; k < c.ready.length; k++) { c.ready[k].call() } c.ready = null; c.done = true } } var c = e ? jQuery : function (k) { if (c.done) { return k() } if (c.timer) { c.ready.push(k) } else { c.ready = [k]; c.timer = setInterval(j, 13) } }; function f(l, k) { if (k) { for (key in k) { if (k.hasOwnProperty(key)) { l[key] = k[key] } } } return l } function g(k) { switch (h(k)) { case "string": k = k.replace(new RegExp('(["\\\\])', "g"), "\\$1"); k = k.replace(/^\s?(\d+)%/, "$1pct"); return '"' + k + '"'; case "array": return "[" + b(k, function (n) { return g(n) }).join(",") + "]"; case "function": return '"function()"'; case "object": var l = []; for (var m in k) { if (k.hasOwnProperty(m)) { l.push('"' + m + '":' + g(k[m])) } } return "{" + l.join(",") + "}" } return String(k).replace(/\s/g, " ").replace(/\'/g, '"') } function h(l) { if (l === null || l === undefined) { return false } var k = typeof l; return (k == "object" && l.push) ? "array" : k } if (window.attachEvent) { window.attachEvent("onbeforeunload", function () { __flash_unloadHandler = function () { }; __flash_savedUnloadHandler = function () { } }) } function b(k, n) { var m = []; for (var l in k) { if (k.hasOwnProperty(l)) { m[l] = n(k[l]) } } return m } function a(r, t) { var q = f({}, r); var s = document.all; var n = '<object width="' + q.width + '" height="' + q.height + '"'; if (s && !q.id) { q.id = "_" + ("" + Math.random()).substring(9) } if (q.id) { n += ' id="' + q.id + '"' } if (q.cachebusting) { q.src += ((q.src.indexOf("?") != -1 ? "&" : "?") + Math.random()) } if (q.w3c || !s) { n += ' data="' + q.src + '" type="application/x-shockwave-flash"' } else { n += ' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' } n += ">"; if (q.w3c || s) { n += '<param name="movie" value="' + q.src + '" />' } q.width = q.height = q.id = q.w3c = q.src = null; for (var l in q) { if (q[l] !== null) { n += '<param name="' + l + '" value="' + q[l] + '" />' } } var o = ""; if (t) { for (var m in t) { if (t[m] !== null) { o += m + "=" + (typeof t[m] == "object" ? g(t[m]) : t[m]) + "&" } } o = o.substring(0, o.length - 1); n += '<param name="flashvars" value=\'' + o + "' />" } n += "</object>"; return n } function d(m, p, l) { var k = flashembed.getVersion(); f(this, { getContainer: function () { return m }, getConf: function () { return p }, getVersion: function () { return k }, getFlashvars: function () { return l }, getApi: function () { return m.firstChild }, getHTML: function () { return a(p, l) } }); var q = p.version; var r = p.expressInstall; var o = !q || flashembed.isSupported(q); if (o) { p.onFail = p.version = p.expressInstall = null; m.innerHTML = a(p, l) } else { if (q && r && flashembed.isSupported([6, 65])) { f(p, { src: r }); l = { MMredirectURL: location.href, MMplayerType: "PlugIn", MMdoctitle: document.title }; m.innerHTML = a(p, l) } else { if (m.innerHTML.replace(/\s/g, "") !== "") { } else { m.innerHTML = "<h2>Flash version " + q + " or greater is required</h2><h3>" + (k[0] > 0 ? "Your version is " + k : "You have no flash plugin installed") + "</h3>" + (m.tagName == "A" ? "<p>Click here to download latest version</p>" : "<p>Download latest version from <a href='http://www.adobe.com/go/getflashplayer'>here</a></p>"); if (m.tagName == "A") { m.onclick = function () { location.href = "http://www.adobe.com/go/getflashplayer" } } } } } if (!o && p.onFail) { var n = p.onFail.call(this); if (typeof n == "string") { m.innerHTML = n } } if (document.all) { window[p.id] = document.getElementById(p.id) } } window.flashembed = function (l, m, k) { if (typeof l == "string") { var n = document.getElementById(l); if (n) { l = n } else { c(function () { flashembed(l, m, k) }); return } } if (!l) { return } if (typeof m == "string") { m = { src: m} } var o = f({}, i); f(o, m); return new d(l, o, k) }; f(window.flashembed, { getVersion: function () { var m = [0, 0]; if (navigator.plugins && typeof navigator.plugins["Shockwave Flash"] == "object") { var l = navigator.plugins["Shockwave Flash"].description; if (typeof l != "undefined") { l = l.replace(/^.*\s+(\S+\s+\S+$)/, "$1"); var n = parseInt(l.replace(/^(.*)\..*$/, "$1"), 10); var r = /r/.test(l) ? parseInt(l.replace(/^.*r(.*)$/, "$1"), 10) : 0; m = [n, r] } } else { if (window.ActiveXObject) { try { var p = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7") } catch (q) { try { p = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); m = [6, 0]; p.AllowScriptAccess = "always" } catch (k) { if (m[0] == 6) { return m } } try { p = new ActiveXObject("ShockwaveFlash.ShockwaveFlash") } catch (o) { } } if (typeof p == "object") { l = p.GetVariable("$version"); if (typeof l != "undefined") { l = l.replace(/^\S+\s+(.*)$/, "$1").split(","); m = [parseInt(l[0], 10), parseInt(l[2], 10)] } } } } return m }, isSupported: function (k) { var m = flashembed.getVersion(); var l = (m[0] > k[0]) || (m[0] == k[0] && m[1] >= k[1]); return l }, domReady: c, asString: g, getHTML: a }); if (e) { jQuery.fn.flashembed = function (l, k) { var m = null; this.each(function () { m = flashembed(this, l, k) }); return l.api === false ? this : m } } })();


/*
* ipad.js 3.2.2. The Flowplayer ipad/iphone fallback.
*
* Copyright 2010, 2011 Flowplayer Oy
* By Thomas Dubois <thomas@flowplayer.org>
*
* This file is part of Flowplayer.
*
* Flowplayer is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Flowplayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Flowplayer.  If not, see <http://www.gnu.org/licenses/>.
*
* Date: 2011-01-10 07:50:57 -0500 (Mon, 10 Jan 2011)
* Revision: 4901
*/
$f.addPlugin("ipad", function (t) { var L = -1; var u = 0; var v = 1; var J = 2; var z = 3; var F = 4; var g = 5; var f = this; var N = 1; var M = false; var C = false; var q = false; var o = 0; var K = []; var c = { accelerated: false, autoBuffering: false, autoPlay: true, baseUrl: null, bufferLength: 3, connectionProvider: null, cuepointMultiplier: 1000, cuepoints: [], controls: {}, duration: 0, extension: "", fadeInSpeed: 1000, fadeOutSpeed: 1000, image: false, linkUrl: null, linkWindow: "_self", live: false, metaData: {}, originalUrl: null, position: 0, playlist: [], provider: "http", scaling: "scale", seekableOnBegin: false, start: 0, url: null, urlResolvers: [] }; var s = L; var m = L; var p = /iPad|iPhone|iPod/i.test(navigator.userAgent); var b = null; function j(R, Q, O) { if (Q) { for (key in Q) { if (key) { if (Q[key] && typeof Q[key] == "function" && !O) { continue } if (Q[key] && typeof Q[key] == "object" && Q[key].length == undefined) { var P = {}; j(P, Q[key]); R[key] = P } else { R[key] = Q[key] } } } } return R } var w = { simulateiDevice: false, controlsSizeRatio: 1.5, controls: true, debug: false, validExtensions: /mov|m4v|mp4|avi/gi }; j(w, t); function e() { if (w.debug) { if (p) { var O = [].splice.call(arguments, 0).join(", "); console.log.apply(console, [O]) } else { console.log.apply(console, arguments) } } } function i(O) { switch (O) { case -1: return "UNLOADED"; case 0: return "LOADED"; case 1: return "UNSTARTED"; case 2: return "BUFFERING"; case 3: return "PLAYING"; case 4: return "PAUSED"; case 5: return "ENDED" } return "UNKOWN" } function D(O) { var P = $f.fireEvent(f.id(), "onBefore" + O, o); return P !== false } function H(O) { O.stopPropagation(); O.preventDefault(); return false } function G(P, O) { if (s == L && !O) { return } m = s; s = P; y(); if (P == z) { l() } e(i(P)) } function x() { b.fp_stop(); M = false; C = false; q = false; G(v); G(v) } var d = null; function l() { if (d) { return } console.log("starting tracker"); d = setInterval(A, 100); A() } function y() { clearInterval(d); d = null } function A() { var P = Math.floor(b.fp_getTime() * 10) * 100; var Q = Math.floor(b.duration * 10) * 100; var R = (new Date()).time; function O(U, S) { U = U >= 0 ? U : Q - Math.abs(U); for (var T = 0; T < S.length; T++) { if (S[T].lastTimeFired > R) { S[T].lastTimeFired = -1 } else { if (S[T].lastTimeFired + 500 > R) { continue } else { if (U == P || (P - 500 < U && P > U)) { S[T].lastTimeFired = R; $f.fireEvent(f.id(), "onCuepoint", o, S[T].fnId, S[T].parameters) } } } } } $f.each(f.getCommonClip()._cuepoints, O); $f.each(K[o]._cuepoints, O) } function B() { x(); q = true; b.fp_seek(0) } function I(O) { } function n() { function O(Q) { var P = {}; j(P, c); j(P, f.getCommonClip()); j(P, Q); if (P.ipadUrl) { url = decodeURIComponent(P.ipadUrl) } else { if (P.url) { url = P.url } } if (url && url.indexOf("://") == -1 && P.baseUrl) { url = P.baseUrl + "/" + url } P.originalUrl = P.url; P.completeUrl = url; P.extension = P.completeUrl.substr(P.completeUrl.lastIndexOf(".")); P.type = "video"; delete P.index; e("fixed clip", P); return P } b.fp_play = function (S, Q, U) { var P = null; var T = true; var R = true; e("Calling play() " + S, S); if (Q) { e("ERROR: inStream clips not yet supported"); return } if (S !== undefined) { if (typeof S == "number") { if (o >= K.length) { return } o = S; S = K[o] } else { if (typeof S == "string") { S = { url: S} } b.fp_setPlaylist(S.length !== undefined ? S : [S]) } if (!w.validExtensions.test(K[o].extension)) { if (K.length > 1 && o < (K.length - 1)) { e("Not last clip in the playlist, moving to next one"); b.fp_play(++o, false, true) } return } S = K[o]; P = S.completeUrl; if (S.autoBuffering !== undefined && S.autoBuffering === false) { T = false } if (S.autoPlay === undefined || S.autoPlay === true || U === true) { T = true; R = true } else { R = false } } else { e("clip was not given, simply calling video.play, if not already buffering"); if (s != J) { b.play() } return } e("about to play " + P, T, R); x(); if (P) { e("Changing SRC attribute" + P); b.setAttribute("src", P) } if (T) { if (!D("Begin")) { return false } $f.fireEvent(f.id(), "onBegin", o); e("calling video.load()"); b.load() } if (R) { e("calling video.play()"); b.play() } }; b.fp_pause = function () { e("pause called"); if (!D("Pause")) { return false } b.pause() }; b.fp_resume = function () { e("resume called"); if (!D("Resume")) { return false } b.play() }; b.fp_stop = function () { e("stop called"); if (!D("Stop")) { return false } C = true; b.pause(); try { b.currentTime = 0 } catch (P) { } }; b.fp_seek = function (P) { e("seek called " + P); if (!D("Seek")) { return false } var T = 0; var P = P + ""; if (P.charAt(P.length - 1) == "%") { var Q = parseInt(P.substr(0, P.length - 1)) / 100; var S = b.duration; T = S * Q } else { T = P } try { b.currentTime = T } catch (R) { e("Wrong seek time") } }; b.fp_getTime = function () { return b.currentTime }; b.fp_mute = function () { e("mute called"); if (!D("Mute")) { return false } N = b.volume; b.volume = 0 }; b.fp_unmute = function () { if (!D("Unmute")) { return false } b.volume = N }; b.fp_getVolume = function () { return b.volume * 100 }; b.fp_setVolume = function (P) { if (!D("Volume")) { return false } b.volume = P / 100 }; b.fp_toggle = function () { e("toggle called"); if (f.getState() == g) { B(); return } if (b.paused) { b.fp_play() } else { b.fp_pause() } }; b.fp_isPaused = function () { return b.paused }; b.fp_isPlaying = function () { return !b.paused }; b.fp_getPlugin = function (Q) { if (Q == "canvas" || Q == "controls") { var P = f.getConfig(); return P.plugins && P.plugins[Q] ? P.plugins[Q] : null } e("ERROR: no support for " + Q + " plugin on iDevices"); return null }; b.fp_close = function () { G(L); b.parentNode.removeChild(b); b = null }; b.fp_getStatus = function () { var Q = 0; var R = 0; try { Q = b.buffered.start(); R = b.buffered.end() } catch (P) { } return { bufferStart: Q, bufferEnd: R, state: s, time: b.fp_getTime(), muted: b.muted, volume: b.fp_getVolume()} }; b.fp_getState = function () { return s }; b.fp_startBuffering = function () { if (s == v) { b.load() } }; b.fp_setPlaylist = function (Q) { e("Setting playlist"); o = 0; for (var P = 0; P < Q.length; P++) { Q[P] = O(Q[P]) } K = Q; $f.fireEvent(f.id(), "onPlaylistReplace", Q) }; b.fp_addClip = function (Q, P) { Q = O(Q); K.splice(P, 0, Q); $f.fireEvent(f.id(), "onClipAdd", Q, P) }; b.fp_updateClip = function (Q, P) { j(K[P], Q); return K[P] }; b.fp_getVersion = function () { return "3.2.3" }; b.fp_isFullscreen = function () { return false }; b.fp_toggleFullscreen = function () { if (b.fp_isFullscreen()) { b.webkitExitFullscreen() } else { b.webkitEnterFullscreen() } }; b.fp_addCuepoints = function (S, Q, P) { var U = Q == -1 ? f.getCommonClip() : K[Q]; U._cuepoints = U._cuepoints || {}; S = S instanceof Array ? S : [S]; for (var R = 0; R < S.length; R++) { var V = typeof S[R] == "object" ? (S[R]["time"] || null) : S[R]; if (V == null) { continue } V = Math.floor(V / 100) * 100; var T = V; if (typeof S[R] == "object") { T = j({}, S[R], false); if (T.time != undefined) { delete T.time } if (T.parameters != undefined) { j(T, T.parameters, false); delete T.parameters } } U._cuepoints[V] = U._cuepoints[V] || []; U._cuepoints[V].push({ fnId: P, lastTimeFired: -1, parameters: T }) } }; $f.each(("toggleFullscreen,stopBuffering,reset,playFeed,setKeyboardShortcutsEnabled,isKeyboardShortcutsEnabled,css,animate,showPlugin,hidePlugin,togglePlugin,fadeTo,invoke,loadPlugin").split(","), function () { var P = this; b["fp_" + P] = function () { e("ERROR: unsupported API on iDevices " + P); return false } }) } function E() { var Z = ["abort", "canplay", "canplaythrough", "durationchange", "emptied", "ended", "error", "loadeddata", "loadedmetadata", "loadstart", "pause", "play", "playing", "progress", "ratechange", "seeked", "seeking", "stalled", "suspend", "volumechange", "waiting"]; var R = function (ab) { e("Got event " + ab.type, ab) }; for (var T = 0; T < Z.length; T++) { b.addEventListener(Z[T], R, false) } var O = function (ab) { e("got onBufferEmpty event " + ab.type); G(J); $f.fireEvent(f.id(), "onBufferEmpty", o) }; b.addEventListener("emptied", O, false); b.addEventListener("waiting", O, false); var Q = function (ab) { if (m == v || m == J) { } else { e("Restoring old state " + i(m)); G(m) } $f.fireEvent(f.id(), "onBufferFull", o) }; b.addEventListener("canplay", Q, false); b.addEventListener("canplaythrough", Q, false); var P = function (ab) { b.fp_updateClip({ duration: b.duration, metaData: { duration: b.duration} }, o); K[o].duration = b.duration; $f.fireEvent(f.id(), "onMetaData", o, K[o]) }; b.addEventListener("loadedmetadata", P, false); b.addEventListener("durationchange", P, false); var Y = function (ab) { if (s == F) { if (!D("Resume")) { e("Resume disallowed, pausing"); b.fp_pause(); return H(ab) } $f.fireEvent(f.id(), "onResume", o) } G(z); if (!M) { M = true; $f.fireEvent(f.id(), "onStart", o) } }; b.addEventListener("playing", Y, false); var V = function (ab) { if (!D("Finish")) { if (K.length == 1) { e("Active playlist only has one clip, onBeforeFinish returned false. Replaying"); B() } else { if (o != (K.length - 1)) { e("Not the last clip in the playlist, but onBeforeFinish returned false. Returning to the beginning of current clip"); b.fp_seek(0) } else { e("Last clip in playlist, but onBeforeFinish returned false, start again from the beginning"); b.fp_play(0) } } return H(ab) } G(g); $f.fireEvent(f.id(), "onFinish", o); if (K.length > 1 && o < (K.length - 1)) { e("Not last clip in the playlist, moving to next one"); b.fp_play(++o, false, true) } }; b.addEventListener("ended", V, false); var U = function (ab) { G(u, true); $f.fireEvent(f.id(), "onError", o, 201); if (w.onFail && w.onFail instanceof Function) { w.onFail.apply(f, []) } }; b.addEventListener("error", U, false); var X = function (ab) { e("got pause event from player" + f.id()); if (C) { return } if (s == J && m == v) { e("forcing play"); setTimeout(function () { b.play() }, 0); return } if (!D("Pause")) { b.fp_resume(); return H(ab) } G(F); $f.fireEvent(f.id(), "onPause", o) }; b.addEventListener("pause", X, false); var aa = function (ab) { $f.fireEvent(f.id(), "onBeforeSeek", o) }; b.addEventListener("seeking", aa, false); var S = function (ab) { if (C) { C = false; $f.fireEvent(f.id(), "onStop", o) } else { $f.fireEvent(f.id(), "onSeek", o) } e("seek done, currentState", i(s)); if (q) { q = false; b.fp_play() } else { if (s != z) { b.fp_pause() } } }; b.addEventListener("seeked", S, false); var W = function (ab) { $f.fireEvent(f.id(), "onVolume", b.fp_getVolume()) }; b.addEventListener("volumechange", W, false) } function k() { b.fp_play(0) } function r() { } if (p || w.simulateiDevice) { if (!window.flashembed.__replaced) { var h = window.flashembed; window.flashembed = function (Q, V, R) { if (typeof Q == "string") { Q = document.getElementById(Q.replace("#", "")) } if (!Q) { return } var U = window.getComputedStyle(Q, null); var T = parseInt(U.width); var O = parseInt(U.height); while (Q.firstChild) { Q.removeChild(Q.firstChild) } var P = document.createElement("div"); var S = document.createElement("video"); P.appendChild(S); Q.appendChild(P); P.style.height = O + "px"; P.style.width = T + "px"; P.style.display = "block"; P.style.position = "relative"; P.style.background = "-webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0.7)))"; P.style.cursor = "default"; P.style.webkitUserDrag = "none"; S.style.height = "100%"; S.style.width = "100%"; S.style.display = "block"; S.id = V.id; S.name = V.id; S.style.cursor = "pointer"; S.style.webkitUserDrag = "none"; S.type = "video/mp4"; S.playerConfig = R.config; $f.fireEvent(R.config.playerId, "onLoad", "player") }; flashembed.getVersion = h.getVersion; flashembed.asString = h.asString; flashembed.isSupported = function () { return true }; flashembed.__replaced = true } var a = f._fireEvent; f._fireEvent = function (O) { if (O[0] == "onLoad" && O[1] == "player") { b = f.getParent().querySelector("video"); if (w.controls) { b.controls = "controls" } n(); E(); G(u, true); b.fp_setPlaylist(b.playerConfig.playlist); k(); a.apply(f, [O]) } var P = s != L; if (s == L && typeof O == "string") { P = true } if (P) { return a.apply(f, [O]) } }; f._swfHeight = function () { return parseInt(b.style.height) }; f.hasiPadSupport = function () { return true } } return f });



/**
* hoverIntent r6 // 2011.02.26 // jQuery 1.5.1+
* <http://cherne.net/brian/resources/jquery.hoverIntent.html>
* 
* @param  f  onMouseOver function || An object with configuration options
* @param  g  onMouseOut function  || Nothing (use configuration options object)
* @author    Brian Cherne brian(at)cherne(dot)net
*/
(function ($) { $.fn.hoverIntent = function (f, g) { var cfg = { sensitivity: 7, interval: 100, timeout: 0 }; cfg = $.extend(cfg, g ? { over: f, out: g} : f); var cX, cY, pX, pY; var track = function (ev) { cX = ev.pageX; cY = ev.pageY }; var compare = function (ev, ob) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); if ((Math.abs(pX - cX) + Math.abs(pY - cY)) < cfg.sensitivity) { $(ob).unbind("mousemove", track); ob.hoverIntent_s = 1; return cfg.over.apply(ob, [ev]) } else { pX = cX; pY = cY; ob.hoverIntent_t = setTimeout(function () { compare(ev, ob) }, cfg.interval) } }; var delay = function (ev, ob) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); ob.hoverIntent_s = 0; return cfg.out.apply(ob, [ev]) }; var handleHover = function (e) { var ev = jQuery.extend({}, e); var ob = this; if (ob.hoverIntent_t) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t) } if (e.type == "mouseenter") { pX = ev.pageX; pY = ev.pageY; $(ob).bind("mousemove", track); if (ob.hoverIntent_s != 1) { ob.hoverIntent_t = setTimeout(function () { compare(ev, ob) }, cfg.interval) } } else { $(ob).unbind("mousemove", track); if (ob.hoverIntent_s == 1) { ob.hoverIntent_t = setTimeout(function () { delay(ev, ob) }, cfg.timeout) } } }; return this.bind('mouseenter', handleHover).bind('mouseleave', handleHover) } })(jQuery);


// Console.log

window.log = function () {
	log.history = log.history || [];   // store logs to an array for reference
	log.history.push(arguments);
	if (this.console) {
		arguments.callee = arguments.callee.caller;
		console.log(Array.prototype.slice.call(arguments));
	}
};

(function (b) { function c() { } for (var d = "assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn".split(","), a; a = d.pop(); ) b[a] = b[a] || c })(window.console = window.console || {});

