(function () {
function C(a) { console.log("$f.fireEvent", [].slice.call(a)) } function A(a) { if (!a || typeof a != "object") return a; var c = new a.constructor; for (var d in a) if (a.hasOwnProperty(d)) c[d] = A(a[d]); return c } function o(a, c) { if (a) { var d, p = 0, f = a.length; if (f === undefined) for (d in a) { if (c.call(a[d], d, a[d]) === false) break } else for (d = a[0]; p < f && c.call(d, p, d) !== false; d = a[++p]); return a } } function v(a) { return document.getElementById(a) } function y(a, c, d) {
if (typeof c != "object") return a; a && c && o(c, function (p, f) {
if (!d ||
typeof f != "function") a[p] = f
}); return a
} function F(a) { var c = a.indexOf("."); if (c != -1) { var d = a.substring(0, c) || "*", p = a.substring(c + 1, a.length), f = []; o(document.getElementsByTagName(d), function () { this.className && this.className.indexOf(p) != -1 && f.push(this) }); return f } } function H(a) { a = a || window.event; if (a.preventDefault) { a.stopPropagation(); a.preventDefault() } else { a.returnValue = false; a.cancelBubble = true } return false } function z(a, c, d) { a[c] = a[c] || []; a[c].push(d) } function D() {
return "_" + ("" + Math.random()).substring(2,
10)
} function r(a, c, d) {
function p() {
function g(j) { !f.isLoaded() && f._fireEvent("onBeforeClick") !== false && f.load(); return H(j) } if ($f(a)) { $f(a).getParent().innerHTML = ""; B = $f(a).getIndex(); t[B] = f } else { t.push(f); B = t.length - 1 } K = parseInt(a.style.height, 10) || a.clientHeight; if (typeof c == "string") c = { src: c }; h = a.id || "fp" + D(); n = c.id || h + "_api"; c.id = n; d.playerId = h; if (typeof d == "string") d = { clip: { url: d } }; if (typeof d.clip == "string") d.clip = { url: d.clip }; d.clip = d.clip || {}; if (a.getAttribute("href", 2) && !d.clip.url) d.clip.url =
a.getAttribute("href", 2); i = new e(d.clip, -1, f); d.playlist = d.playlist || [d.clip]; var q = 0; o(d.playlist, function () { var j = this; if (typeof j == "object" && j.length) j = { url: "" + j }; o(d.clip, function (u, E) { if (E !== undefined && j[u] === undefined && typeof E != "function") j[u] = E }); d.playlist[q] = j; j = new e(j, q, f); k.push(j); q++ }); o(d, function (j, u) { if (typeof u == "function") { i[j] ? i[j](u) : z(w, j, u); delete d[j] } }); o(d.plugins, function (j, u) { if (u) s[j] = new m(j, u, f) }); if (!d.plugins || d.plugins.controls === undefined) s.controls = new m("controls",
null, f); s.canvas = new m("canvas", null, f); c.bgcolor = c.bgcolor || "#000000"; c.version = c.version || [9, 0]; c.expressInstall = "http://www.flowplayer.org/swf/expressinstall.swf"; G = a.innerHTML; if (G.replace(/\s/g, "") !== "") if (a.addEventListener) a.addEventListener("click", g, false); else a.attachEvent && a.attachEvent("onclick", g); else { a.addEventListener && a.addEventListener("click", H, false); f.load() }
} var f = this, l = null, G, i, k = [], s = {}, w = {}, h, n, B, x, I, K; y(f, {
id: function () { return h }, isLoaded: function () { return l !== null }, getParent: function () { return a },
hide: function (g) { if (g) a.style.height = "0px"; if (l) l.style.height = "0px"; return f }, show: function () { a.style.height = K + "px"; if (l) l.style.height = I + "px"; return f }, isHidden: function () { return l && parseInt(l.style.height, 10) === 0 }, load: function (g) { if (!l && f._fireEvent("onBeforeLoad") !== false) { o(t, function () { this.unload() }); if ((G = a.innerHTML) && !flashembed.isSupported(c.version)) a.innerHTML = ""; flashembed(a, c, { config: d }); if (g) { g.cached = true; z(w, "onLoad", g) } } return f }, unload: function () {
if (G.replace(/\s/g, "") !== "") {
if (f._fireEvent("onBeforeUnload") ===
false) return f; try { if (l) { l.fp_close(); f._fireEvent("onUnload") } } catch (g) { } l = null; a.innerHTML = G
} return f
}, getClip: function (g) { if (g === undefined) g = x; return k[g] }, getCommonClip: function () { return i }, getPlaylist: function () { return k }, getPlugin: function (g) { var q = s[g]; if (!q && f.isLoaded()) { var j = f._api().fp_getPlugin(g); if (j) { q = new m(g, j, f); s[g] = q } } return q }, getScreen: function () { return f.getPlugin("screen") }, getControls: function () { return f.getPlugin("controls") }, getConfig: function (g) { return g ? A(d) : d }, getFlashParams: function () { return c },
loadPlugin: function (g, q, j, u) { if (typeof j == "function") { u = j; j = {} } var E = u ? D() : "_"; f._api().fp_loadPlugin(g, q, j, E); q = {}; q[E] = u; u = new m(g, null, f, q); return s[g] = u }, getState: function () { return l ? l.fp_getState() : -1 }, play: function (g, q) { function j() { g !== undefined ? f._api().fp_play(g, q) : f._api().fp_play() } l ? j() : f.load(function () { j() }); return f }, getVersion: function () { if (l) { var g = l.fp_getVersion(); g.push("flowplayer.js 3.1.4"); return g } return "flowplayer.js 3.1.4" }, _api: function () {
if (!l) throw "Flowplayer " + f.id() +
" not loaded when calling an API method"; return l
}, setClip: function (g) { f.setPlaylist([g]); return f }, getIndex: function () { return B }
}); o("Click*,Load*,Unload*,Keypress*,Volume*,Mute*,Unmute*,PlaylistReplace,ClipAdd,Fullscreen*,FullscreenExit,Error,MouseOver,MouseOut".split(","), function () { var g = "on" + this; if (g.indexOf("*") != -1) { g = g.substring(0, g.length - 1); var q = "onBefore" + g.substring(2); f[q] = function (j) { z(w, q, j); return f } } f[g] = function (j) { z(w, g, j); return f } }); o("pause,resume,mute,unmute,stop,toggle,seek,getStatus,getVolume,setVolume,getTime,isPaused,isPlaying,startBuffering,stopBuffering,isFullscreen,toggleFullscreen,reset,close,setPlaylist,addClip,playFeed".split(","),
function () { var g = this; f[g] = function (q, j) { if (!l) return f; var u = null; u = q !== undefined && j !== undefined ? l["fp_" + g](q, j) : q === undefined ? l["fp_" + g]() : l["fp_" + g](q); return u === "undefined" || u === undefined ? f : u } }); f._fireEvent = function (g) {
if (typeof g == "string") g = [g]; var q = g[0], j = g[1], u = g[2], E = g[3], J = 0; d.debug && C(g); if (!l && q == "onLoad" && j == "player") { l = l || v(n); I = l.clientHeight; o(k, function () { this._fireEvent("onLoad") }); o(s, function (N, M) { M._fireEvent("onUpdate") }); i._fireEvent("onLoad") } if (!(q == "onLoad" && j != "player")) {
if (q ==
"onError") if (typeof j == "string" || typeof j == "number" && typeof u == "number") { j = u; u = E } if (q == "onContextMenu") o(d.contextMenu[j], function (N, M) { M.call(f) }); else if (q == "onPluginEvent") { if (E = s[j.name || j]) { E._fireEvent("onUpdate", j); E._fireEvent(u, g.slice(3)) } } else {
if (q == "onPlaylistReplace") { k = []; var O = 0; o(j, function () { k.push(new e(this, O++, f)) }) } if (q == "onClipAdd") { if (j.isInStream) return; j = new e(j, u, f); k.splice(u, 0, j); for (J = u + 1; J < k.length; J++) k[J].index++ } var L = true; if (typeof j == "number" && j < k.length) {
x = j; if (g =
k[j]) L = g._fireEvent(q, u, E); if (!g || L !== false) L = i._fireEvent(q, u, E, g)
} o(w[q], function () { L = this.call(f, j, u); this.cached && w[q].splice(J, 1); if (L === false) return false; J++ }); return L
}
}
}; typeof a == "string" ? flashembed.domReady(function () { var g = v(a); if (g) { a = g; p() } else throw "Flowplayer cannot access element: " + a; }) : p()
} function b(a) { this.length = a.length; this.each = function (c) { o(a, c) }; this.size = function () { return a.length } } var e = function (a, c,