html5media.min.js 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576
  1. (function() {
  2. function B(a) { console.log("$f.fireEvent", [].slice.call(a)) }
  3. function y(a) { if (!a || typeof a != "object") return a; var d = new a.constructor; for (var c in a)
  4. if (a.hasOwnProperty(c)) d[c] = y(a[c]);
  5. return d }
  6. function o(a, d) { if (a) { var c, p = 0,
  7. f = a.length; if (f === undefined)
  8. for (c in a) { if (d.call(a[c], c, a[c]) === false) break } else
  9. for (c = a[0]; p < f && d.call(c, p, c) !== false; c = a[++p]); return a } }
  10. function s(a) { return document.getElementById(a) }
  11. function w(a, d, c) {
  12. if (typeof d != "object") return a;
  13. a && d && o(d, function(p, f) {
  14. if (!c ||
  15. typeof f != "function") a[p] = f
  16. });
  17. return a
  18. }
  19. function z(a) { var d = a.indexOf("."); if (d != -1) { var c = a.substring(0, d) || "*",
  20. p = a.substring(d + 1, a.length),
  21. f = [];
  22. o(document.getElementsByTagName(c), function() { this.className && this.className.indexOf(p) != -1 && f.push(this) }); return f } }
  23. function E(a) { a = a || window.event; if (a.preventDefault) { a.stopPropagation();
  24. a.preventDefault() } else { a.returnValue = false;
  25. a.cancelBubble = true } return false }
  26. function i(a, d, c) { a[d] = a[d] || [];
  27. a[d].push(c) }
  28. function v() {
  29. return "_" + ("" + Math.random()).substring(2,
  30. 10)
  31. }
  32. function n(a, d, c) {
  33. function p() {
  34. function g(k) {!f.isLoaded() && f._fireEvent("onBeforeClick") !== false && f.load(); return E(k) }
  35. if ($f(a)) { $f(a).getParent().innerHTML = "";
  36. F = $f(a).getIndex();
  37. t[F] = f } else { t.push(f);
  38. F = t.length - 1 }
  39. L = parseInt(a.style.height, 10) || a.clientHeight;
  40. if (typeof d == "string") d = { src: d };
  41. A = a.id || "fp" + v();
  42. G = d.id || A + "_api";
  43. d.id = G;
  44. c.playerId = A;
  45. if (typeof c == "string") c = { clip: { url: c } };
  46. if (typeof c.clip == "string") c.clip = { url: c.clip };
  47. c.clip = c.clip || {};
  48. if (a.getAttribute("href", 2) && !c.clip.url) c.clip.url =
  49. a.getAttribute("href", 2);
  50. h = new e(c.clip, -1, f);
  51. c.playlist = c.playlist || [c.clip];
  52. var q = 0;
  53. o(c.playlist, function() { var k = this; if (typeof k == "object" && k.length) k = { url: "" + k };
  54. o(c.clip, function(u, C) { if (C !== undefined && k[u] === undefined && typeof C != "function") k[u] = C });
  55. c.playlist[q] = k;
  56. k = new e(k, q, f);
  57. j.push(k);
  58. q++ });
  59. o(c, function(k, u) { if (typeof u == "function") { h[k] ? h[k](u) : i(x, k, u);
  60. delete c[k] } });
  61. o(c.plugins, function(k, u) { if (u) r[k] = new l(k, u, f) });
  62. if (!c.plugins || c.plugins.controls === undefined) r.controls = new l("controls",
  63. null, f);
  64. r.canvas = new l("canvas", null, f);
  65. d.bgcolor = d.bgcolor || "#000000";
  66. d.version = d.version || [9, 0];
  67. d.expressInstall = "http://www.flowplayer.org/swf/expressinstall.swf";
  68. D = a.innerHTML;
  69. if (D.replace(/\s/g, "") !== "")
  70. if (a.addEventListener) a.addEventListener("click", g, false);
  71. else a.attachEvent && a.attachEvent("onclick", g);
  72. else { a.addEventListener && a.addEventListener("click", E, false);
  73. f.load() }
  74. }
  75. var f = this,
  76. m = null,
  77. D, h, j = [],
  78. r = {},
  79. x = {},
  80. A, G, F, J, M, L;
  81. w(f, {
  82. id: function() { return A },
  83. isLoaded: function() { return m !== null },
  84. getParent: function() { return a },
  85. hide: function(g) { if (g) a.style.height = "0px"; if (m) m.style.height = "0px"; return f },
  86. show: function() { a.style.height = L + "px"; if (m) m.style.height = M + "px"; return f },
  87. isHidden: function() { return m && parseInt(m.style.height, 10) === 0 },
  88. load: function(g) { if (!m && f._fireEvent("onBeforeLoad") !== false) { o(t, function() { this.unload() }); if ((D = a.innerHTML) && !flashembed.isSupported(d.version)) a.innerHTML = "";
  89. flashembed(a, d, { config: c }); if (g) { g.cached = true;
  90. i(x, "onLoad", g) } } return f },
  91. unload: function() {
  92. if (D.replace(/\s/g, "") !== "") {
  93. if (f._fireEvent("onBeforeUnload") ===
  94. false) return f;
  95. try { if (m) { m.fp_close();
  96. f._fireEvent("onUnload") } } catch (g) {}
  97. m = null;
  98. a.innerHTML = D
  99. }
  100. return f
  101. },
  102. getClip: function(g) { if (g === undefined) g = J; return j[g] },
  103. getCommonClip: function() { return h },
  104. getPlaylist: function() { return j },
  105. getPlugin: function(g) { var q = r[g]; if (!q && f.isLoaded()) { var k = f._api().fp_getPlugin(g); if (k) { q = new l(g, k, f);
  106. r[g] = q } } return q },
  107. getScreen: function() { return f.getPlugin("screen") },
  108. getControls: function() { return f.getPlugin("controls") },
  109. getConfig: function(g) { return g ? y(c) : c },
  110. getFlashParams: function() { return d },
  111. loadPlugin: function(g, q, k, u) { if (typeof k == "function") { u = k;
  112. k = {} } var C = u ? v() : "_";
  113. f._api().fp_loadPlugin(g, q, k, C);
  114. q = {};
  115. q[C] = u;
  116. u = new l(g, null, f, q); return r[g] = u },
  117. getState: function() { return m ? m.fp_getState() : -1 },
  118. play: function(g, q) {
  119. function k() { g !== undefined ? f._api().fp_play(g, q) : f._api().fp_play() }
  120. m ? k() : f.load(function() { k() }); return f },
  121. getVersion: function() { if (m) { var g = m.fp_getVersion();
  122. g.push("flowplayer.js 3.1.4"); return g } return "flowplayer.js 3.1.4" },
  123. _api: function() {
  124. if (!m) throw "Flowplayer " + f.id() +
  125. " not loaded when calling an API method";
  126. return m
  127. },
  128. setClip: function(g) { f.setPlaylist([g]); return f },
  129. getIndex: function() { return F }
  130. });
  131. 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);
  132. f[q] = function(k) { i(x, q, k); return f } }
  133. f[g] = function(k) { i(x, g, k); return f } });
  134. o("pause,resume,mute,unmute,stop,toggle,seek,getStatus,getVolume,setVolume,getTime,isPaused,isPlaying,startBuffering,stopBuffering,isFullscreen,toggleFullscreen,reset,close,setPlaylist,addClip,playFeed".split(","),
  135. function() { var g = this;
  136. f[g] = function(q, k) { if (!m) return f; var u = null;
  137. u = q !== undefined && k !== undefined ? m["fp_" + g](q, k) : q === undefined ? m["fp_" + g]() : m["fp_" + g](q); return u === "undefined" || u === undefined ? f : u } });
  138. f._fireEvent = function(g) {
  139. if (typeof g == "string") g = [g];
  140. var q = g[0],
  141. k = g[1],
  142. u = g[2],
  143. C = g[3],
  144. H = 0;
  145. c.debug && B(g);
  146. if (!m && q == "onLoad" && k == "player") { m = m || s(G);
  147. M = m.clientHeight;
  148. o(j, function() { this._fireEvent("onLoad") });
  149. o(r, function(N, K) { K._fireEvent("onUpdate") });
  150. h._fireEvent("onLoad") }
  151. if (!(q == "onLoad" && k != "player")) {
  152. if (q ==
  153. "onError")
  154. if (typeof k == "string" || typeof k == "number" && typeof u == "number") { k = u;
  155. u = C }
  156. if (q == "onContextMenu") o(c.contextMenu[k], function(N, K) { K.call(f) });
  157. else if (q == "onPluginEvent") { if (C = r[k.name || k]) { C._fireEvent("onUpdate", k);
  158. C._fireEvent(u, g.slice(3)) } } else {
  159. if (q == "onPlaylistReplace") { j = []; var O = 0;
  160. o(k, function() { j.push(new e(this, O++, f)) }) }
  161. if (q == "onClipAdd") { if (k.isInStream) return;
  162. k = new e(k, u, f);
  163. j.splice(u, 0, k); for (H = u + 1; H < j.length; H++) j[H].index++ }
  164. var I = true;
  165. if (typeof k == "number" && k < j.length) {
  166. J = k;
  167. if (g =
  168. j[k]) I = g._fireEvent(q, u, C);
  169. if (!g || I !== false) I = h._fireEvent(q, u, C, g)
  170. }
  171. o(x[q], function() { I = this.call(f, k, u);
  172. this.cached && x[q].splice(H, 1); if (I === false) return false;
  173. H++ });
  174. return I
  175. }
  176. }
  177. };
  178. typeof a == "string" ? flashembed.domReady(function() { var g = s(a); if (g) { a = g;
  179. p() } else throw "Flowplayer cannot access element: " + a; }) : p()
  180. }
  181. function b(a) { this.length = a.length;
  182. this.each = function(d) { o(a, d) };
  183. this.size = function() { return a.length } }
  184. var e = function(a, d, c) {
  185. var p = this,
  186. f = {},
  187. m = {};
  188. p.index = d;
  189. if (typeof a == "string") a = { url: a };
  190. w(this,
  191. a, true);
  192. o("Begin*,Start,Pause*,Resume*,Seek*,Stop*,Finish*,LastSecond,Update,BufferFull,BufferEmpty,BufferStop".split(","), function() { var h = "on" + this; if (h.indexOf("*") != -1) { h = h.substring(0, h.length - 1); var j = "onBefore" + h.substring(2);
  193. p[j] = function(r) { i(m, j, r); return p } }
  194. p[h] = function(r) { i(m, h, r); return p }; if (d == -1) { if (p[j]) c[j] = p[j]; if (p[h]) c[h] = p[h] } });
  195. w(this, {
  196. onCuepoint: function(h, j) {
  197. if (arguments.length == 1) { f.embedded = [null, h]; return p }
  198. if (typeof h == "number") h = [h];
  199. var r = v();
  200. f[r] = [h, j];
  201. c.isLoaded() &&
  202. c._api().fp_addCuepoints(h, d, r);
  203. return p
  204. },
  205. update: function(h) { w(p, h);
  206. c.isLoaded() && c._api().fp_updateClip(h, d); var j = c.getConfig();
  207. w(d == -1 ? j.clip : j.playlist[d], h, true) },
  208. _fireEvent: function(h, j, r, x) {
  209. if (h == "onLoad") { o(f, function(F, J) { J[0] && c._api().fp_addCuepoints(J[0], d, F) }); return false }
  210. x = x || p;
  211. if (h == "onCuepoint") { var A = f[j]; if (A) return A[1].call(c, x, r) }
  212. if (j && "onBeforeBegin,onMetaData,onStart,onUpdate,onResume".indexOf(h) != -1) {
  213. w(x, j);
  214. if (j.metaData)
  215. if (x.duration) x.fullDuration = j.metaData.duration;
  216. else x.duration =
  217. j.metaData.duration
  218. }
  219. var G = true;
  220. o(m[h], function() { G = this.call(c, x, j, r) });
  221. return G
  222. }
  223. });
  224. if (a.onCuepoint) { var D = a.onCuepoint;
  225. p.onCuepoint.apply(p, typeof D == "function" ? [D] : D);
  226. delete a.onCuepoint }
  227. o(a, function(h, j) { if (typeof j == "function") { i(m, h, j);
  228. delete a[h] } });
  229. if (d == -1) c.onCuepoint = this.onCuepoint
  230. },
  231. l = function(a, d, c, p) {
  232. var f = {},
  233. m = this,
  234. D = false;
  235. p && w(f, p);
  236. o(d, function(h, j) { if (typeof j == "function") { f[h] = j;
  237. delete d[h] } });
  238. w(this, {
  239. animate: function(h, j, r) {
  240. if (!h) return m;
  241. if (typeof j == "function") { r = j;
  242. j = 500 }
  243. if (typeof h ==
  244. "string") { var x = h;
  245. h = {};
  246. h[x] = j;
  247. j = 500 }
  248. if (r) { var A = v();
  249. f[A] = r }
  250. if (j === undefined) j = 500;
  251. d = c._api().fp_animate(a, h, j, A);
  252. return m
  253. },
  254. css: function(h, j) { if (j !== undefined) { var r = {};
  255. r[h] = j;
  256. h = r }
  257. d = c._api().fp_css(a, h);
  258. w(m, d); return m },
  259. show: function() { this.display = "block";
  260. c._api().fp_showPlugin(a); return m },
  261. hide: function() { this.display = "none";
  262. c._api().fp_hidePlugin(a); return m },
  263. toggle: function() { this.display = c._api().fp_togglePlugin(a); return m },
  264. fadeTo: function(h, j, r) {
  265. if (typeof j == "function") { r = j;
  266. j = 500 }
  267. if (r) {
  268. var x =
  269. v();
  270. f[x] = r
  271. }
  272. this.display = c._api().fp_fadeTo(a, h, j, x);
  273. this.opacity = h;
  274. return m
  275. },
  276. fadeIn: function(h, j) { return m.fadeTo(1, h, j) },
  277. fadeOut: function(h, j) { return m.fadeTo(0, h, j) },
  278. getName: function() { return a },
  279. getPlayer: function() { return c },
  280. _fireEvent: function(h, j) {
  281. if (h == "onUpdate") {
  282. var r = c._api().fp_getPlugin(a);
  283. if (!r) return;
  284. w(m, r);
  285. delete m.methods;
  286. if (!D) {
  287. o(r.methods, function() { var x = "" + this;
  288. m[x] = function() { var A = [].slice.call(arguments);
  289. A = c._api().fp_invoke(a, x, A); return A === "undefined" || A === undefined ? m : A } });
  290. D = true
  291. }
  292. }
  293. if (r = f[h]) { r.apply(m, j);
  294. h.substring(0, 1) == "_" && delete f[h] }
  295. }
  296. })
  297. },
  298. t = [];
  299. window.flowplayer = window.$f = function() {
  300. var a = null,
  301. d = arguments[0];
  302. if (!arguments.length) { o(t, function() { if (this.isLoaded()) { a = this; return false } }); return a || t[0] }
  303. if (arguments.length == 1)
  304. if (typeof d == "number") return t[d];
  305. else { if (d == "*") return new b(t);
  306. o(t, function() { if (this.id() == d.id || this.id() == d || this.getParent() == d) { a = this; return false } }); return a }
  307. if (arguments.length > 1) {
  308. var c = arguments[1],
  309. p = arguments.length == 3 ? arguments[2] : {};
  310. if (typeof d == "string")
  311. if (d.indexOf(".") != -1) { var f = [];
  312. o(z(d), function() { f.push(new n(this, y(c), y(p))) }); return new b(f) } else { var m = s(d); return new n(m !== null ? m : d, c, p) }
  313. else if (d) return new n(d, c, p)
  314. }
  315. return null
  316. };
  317. w(window.$f, { fireEvent: function() { var a = [].slice.call(arguments),
  318. d = $f(a[0]); return d ? d._fireEvent(a.slice(1)) : null }, addPlugin: function(a, d) { n.prototype[a] = d; return $f }, each: o, extend: w });
  319. if (typeof jQuery == "function") jQuery.prototype.flowplayer = function(a, d) {
  320. if (!arguments.length || typeof arguments[0] ==
  321. "number") { var c = [];
  322. this.each(function() { var p = $f(this);
  323. p && c.push(p) }); return arguments.length ? c[arguments[0]] : new b(c) }
  324. return this.each(function() { $f(this, y(a), d ? y(d) : {}) })
  325. }
  326. })();
  327. (function() {
  328. function B() { if (n.done) return false; var b = document; if (b && b.getElementsByTagName && b.getElementById && b.body) { clearInterval(n.timer);
  329. n.timer = null; for (b = 0; b < n.ready.length; b++) n.ready[b].call();
  330. n.ready = null;
  331. n.done = true } }
  332. function y(b, e) { if (e)
  333. for (key in e)
  334. if (e.hasOwnProperty(key)) b[key] = e[key];
  335. return b }
  336. function o(b) {
  337. switch (s(b)) {
  338. case "string":
  339. b = b.replace(new RegExp('(["\\\\])', "g"), "\\$1");
  340. b = b.replace(/^\s?(\d+)%/, "$1pct");
  341. return '"' + b + '"';
  342. case "array":
  343. return "[" + w(b, function(t) { return o(t) }).join(",") +
  344. "]";
  345. case "function":
  346. return '"function()"';
  347. case "object":
  348. var e = [];
  349. for (var l in b) b.hasOwnProperty(l) && e.push('"' + l + '":' + o(b[l]));
  350. return "{" + e.join(",") + "}"
  351. }
  352. return String(b).replace(/\s/g, " ").replace(/\'/g, '"')
  353. }
  354. function s(b) { if (b === null || b === undefined) return false; var e = typeof b; return e == "object" && b.push ? "array" : e }
  355. function w(b, e) { var l = []; for (var t in b)
  356. if (b.hasOwnProperty(t)) l[t] = e(b[t]);
  357. return l }
  358. function z(b, e) {
  359. var l = y({}, b),
  360. t = document.all;
  361. b = '<object width="' + l.width + '" height="' + l.height + '"';
  362. if (t &&
  363. !l.id) l.id = "_" + ("" + Math.random()).substring(9);
  364. if (l.id) b += ' id="' + l.id + '"';
  365. if (l.cachebusting) l.src += (l.src.indexOf("?") != -1 ? "&" : "?") + Math.random();
  366. b += l.w3c || !t ? ' data="' + l.src + '" type="application/x-shockwave-flash"' : ' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';
  367. b += ">";
  368. if (l.w3c || t) b += '<param name="movie" value="' + l.src + '" />';
  369. l.width = l.height = l.id = l.w3c = l.src = null;
  370. for (var a in l)
  371. if (l[a] !== null) b += '<param name="' + a + '" value="' + l[a] + '" />';
  372. a = "";
  373. if (e) {
  374. for (var d in e)
  375. if (e[d] !== null) a += d + "=" +
  376. (typeof e[d] == "object" ? o(e[d]) : e[d]) + "&";
  377. a = a.substring(0, a.length - 1);
  378. b += '<param name="flashvars" value=\'' + a + "' />"
  379. }
  380. b += "</object>";
  381. return b
  382. }
  383. function E(b, e, l) {
  384. var t = flashembed.getVersion();
  385. y(this, { getContainer: function() { return b }, getConf: function() { return e }, getVersion: function() { return t }, getFlashvars: function() { return l }, getApi: function() { return b.firstChild }, getHTML: function() { return z(e, l) } });
  386. var a = e.version,
  387. d = e.expressInstall,
  388. c = !a || flashembed.isSupported(a);
  389. if (c) {
  390. e.onFail = e.version = e.expressInstall =
  391. null;
  392. b.innerHTML = z(e, l)
  393. } else if (a && d && flashembed.isSupported([6, 65])) { y(e, { src: d });
  394. l = { MMredirectURL: location.href, MMplayerType: "PlugIn", MMdoctitle: document.title };
  395. b.innerHTML = z(e, l) } else if (b.innerHTML.replace(/\s/g, "") === "") {
  396. b.innerHTML = "<h2>Flash version " + a + " or greater is required</h2><h3>" + (t[0] > 0 ? "Your version is " + t : "You have no flash plugin installed") + "</h3>" + (b.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>");
  397. if (b.tagName == "A") b.onclick = function() { location.href = "http://www.adobe.com/go/getflashplayer" }
  398. }
  399. if (!c && e.onFail) { a = e.onFail.call(this); if (typeof a == "string") b.innerHTML = a }
  400. if (document.all) window[e.id] = document.getElementById(e.id)
  401. }
  402. var i = typeof jQuery == "function",
  403. v = { width: "100%", height: "100%", allowfullscreen: true, allowscriptaccess: "always", quality: "high", version: null, onFail: null, expressInstall: null, w3c: false, cachebusting: false };
  404. if (i) {
  405. jQuery.tools = jQuery.tools || {};
  406. jQuery.tools.flashembed = {
  407. version: "1.0.4",
  408. conf: v
  409. }
  410. }
  411. var n = i ? jQuery : function(b) { if (n.done) return b(); if (n.timer) n.ready.push(b);
  412. else { n.ready = [b];
  413. n.timer = setInterval(B, 13) } };
  414. window.attachEvent && window.attachEvent("onbeforeunload", function() { __flash_unloadHandler = function() {};
  415. __flash_savedUnloadHandler = function() {} });
  416. window.flashembed = function(b, e, l) { if (typeof b == "string") { var t = document.getElementById(b); if (t) b = t;
  417. else { n(function() { flashembed(b, e, l) }); return } } if (b) { if (typeof e == "string") e = { src: e };
  418. t = y({}, v);
  419. y(t, e); return new E(b, t, l) } };
  420. y(window.flashembed, {
  421. getVersion: function() {
  422. var b = [0, 0];
  423. if (navigator.plugins && typeof navigator.plugins["Shockwave Flash"] == "object") { var e = navigator.plugins["Shockwave Flash"].description; if (typeof e != "undefined") { e = e.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
  424. b = parseInt(e.replace(/^(.*)\..*$/, "$1"), 10);
  425. e = /r/.test(e) ? parseInt(e.replace(/^.*r(.*)$/, "$1"), 10) : 0;
  426. b = [b, e] } } else if (window.ActiveXObject) {
  427. try { e = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7") } catch (l) {
  428. try {
  429. e = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
  430. b = [6, 0];
  431. e.AllowScriptAccess = "always"
  432. } catch (t) { if (b[0] == 6) return b }
  433. try { e = new ActiveXObject("ShockwaveFlash.ShockwaveFlash") } catch (a) {}
  434. }
  435. if (typeof e == "object") { e = e.GetVariable("$version"); if (typeof e != "undefined") { e = e.replace(/^\S+\s+(.*)$/, "$1").split(",");
  436. b = [parseInt(e[0], 10), parseInt(e[2], 10)] } }
  437. }
  438. return b
  439. },
  440. isSupported: function(b) { var e = flashembed.getVersion(); return e[0] > b[0] || e[0] == b[0] && e[1] >= b[1] },
  441. domReady: n,
  442. asString: o,
  443. getHTML: z
  444. });
  445. if (i) jQuery.fn.flashembed = function(b, e) {
  446. var l = null;
  447. this.each(function() {
  448. l =
  449. flashembed(this, b, e)
  450. });
  451. return b.api === false ? this : l
  452. }
  453. })();
  454. (function() {
  455. function B() { if (!i) { i = true; if (v) { for (var n = 0; n < v.length; n++) v[n].call(window, []);
  456. v = [] } } }
  457. function y(n) { var b = window.onload;
  458. window.onload = typeof window.onload != "function" ? n : function() { b && b();
  459. n() } }
  460. function o() {
  461. if (!E) {
  462. E = true;
  463. document.addEventListener && !z.opera && document.addEventListener("DOMContentLoaded", B, false);
  464. z.msie && window == top && function() { if (!i) { try { document.documentElement.doScroll("left") } catch (b) { setTimeout(arguments.callee, 0); return }
  465. B() } }();
  466. z.opera && document.addEventListener("DOMContentLoaded",
  467. function() { if (!i) { for (var b = 0; b < document.styleSheets.length; b++)
  468. if (document.styleSheets[b].disabled) { setTimeout(arguments.callee, 0); return }
  469. B() } }, false);
  470. if (z.safari) {
  471. var n;
  472. (function() {
  473. if (!i)
  474. if (document.readyState != "loaded" && document.readyState != "complete") setTimeout(arguments.callee, 0);
  475. else {
  476. if (n === undefined) { for (var b = document.getElementsByTagName("link"), e = 0; e < b.length; e++) b[e].getAttribute("rel") == "stylesheet" && n++;
  477. b = document.getElementsByTagName("style");
  478. n += b.length }
  479. document.styleSheets.length !=
  480. n ? setTimeout(arguments.callee, 0) : B()
  481. }
  482. })()
  483. }
  484. y(B)
  485. }
  486. }
  487. var s = window.DomReady = {},
  488. w = navigator.userAgent.toLowerCase(),
  489. z = { version: (w.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/) || [])[1], safari: /webkit/.test(w), opera: /opera/.test(w), msie: /msie/.test(w) && !/opera/.test(w), mozilla: /mozilla/.test(w) && !/(compatible|webkit)/.test(w) },
  490. E = false,
  491. i = false,
  492. v = [];
  493. s.ready = function(n) { o();
  494. i ? n.call(window, []) : v.push(function() { return n.call(window, []) }) };
  495. o()
  496. })();
  497. (function(B, y) {
  498. function o(i, v) { for (var n = [], b = 0; b < i.length; b++) n.push(i[b]); for (b = 0; b < n.length; b++) v(n[b]) }
  499. function s() { o(y.getElementsByTagName("video"), function(i) { var v = true; if (i.canPlayType)
  500. if (i.src && i.canPlayType(w(i.src))) v = false;
  501. else o(i.getElementsByTagName("source"), function(n) { if (i.canPlayType(w(n.src, n.type))) v = false });
  502. v && s.createVideoFallback(i) }) }
  503. function w(i, v) {
  504. if (v) return v;
  505. return {
  506. avi: s.H264_FORMAT,
  507. mp4: s.H264_FORMAT,
  508. mkv: s.H264_FORMAT,
  509. h264: s.H264_FORMAT,
  510. "264": s.H264_FORMAT,
  511. avc: s.H264_FORMAT,
  512. m4v: s.H264_FORMAT,
  513. "3gp": s.H264_FORMAT,
  514. "3gpp": s.H264_FORMAT,
  515. "3g2": s.H264_FORMAT,
  516. ogg: s.THEORA_FORMAT,
  517. ogv: s.THEORA_FORMAT
  518. }[i.split(".").slice(-1)[0]] || s.assumedFormat
  519. }
  520. function z(i, v) { i = i.getAttribute(v); return i == true || typeof i == "string" }
  521. y.createElement("video").canPlayType || o(["abbr", "article", "aside", "audio", "canvas", "details", "figcaption", "figure", "footer", "header", "hgroup", "mark", "menu", "meter", "nav", "output", "progress", "section", "summary", "time", "video", "source"], function(i) { y.createElement(i) });
  522. var E = "";
  523. o(y.getElementsByTagName("script"), function(i) { i = i.src; if (i.substr(i.length - 17) == "html5media.min.js") E = i.split("/").slice(0, -1).join("/") + "/" });
  524. s.flowplayerSwf = E + "flowplayer.swf";
  525. s.flowplayerControlsSwf = E + "flowplayer.controls.swf";
  526. s.H264_FORMAT = 'video/mp4; codecs="avc1.42E01E, mp4a.40.2"';
  527. s.THEORA_FORMAT = 'video/ogg; codecs="theora, vorbis"';
  528. s.assumedFormat = s.H264_FORMAT;
  529. s.createVideoFallback = function(i) {
  530. function v(c) { if (c.substr(0, 1) == "/") return n + c; return c }
  531. var n = B.location.protocol + "//" +
  532. B.location.host,
  533. b = v(i.getAttribute("poster") || ""),
  534. e = i.getAttribute("src");
  535. e || o(i.getElementsByTagName("source"), function(c) { if (w(c.getAttribute("src"), c.getAttribute("type")).substr(0, 9) == "video/mp4") e = c.getAttribute("src") });
  536. e = v(e || "");
  537. var l = y.createElement("span");
  538. l.id = i.id;
  539. l.className = i.className;
  540. l.title = i.title;
  541. l.style.display = "block";
  542. l.style.width = i.getAttribute("width") + "px";
  543. l.style.height = i.getAttribute("height") + "px";
  544. i.parentNode.replaceChild(l, i);
  545. var t = (i.getAttribute("preload") || "").toLowerCase(),
  546. a = null;
  547. if (z(i, "controls")) a = { url: s.flowplayerControlsSwf, fullscreen: false, autoHide: "always" };
  548. var d = [];
  549. b && d.push({ url: b });
  550. if (e) d.push({ url: e, autoPlay: z(i, "autoplay"), autoBuffering: z(i, "autobuffer") || z(i, "preload") && (t == "" || t == "auto"), onBeforeFinish: function() { return !z(i, "loop") } });
  551. flowplayer(l, s.flowplayerSwf, { play: null, playlist: d, clip: { scaling: "fit", fadeInSpeed: 0, fadeOutSpeed: 0 }, plugins: { controls: a } })
  552. };
  553. DomReady.ready(s);
  554. B.html5media = s
  555. })(this, document);