plugins.js 65 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626
  1. window.log = function(){
  2. log.history = log.history || [];
  3. log.history.push(arguments);
  4. arguments.callee = arguments.callee.caller;
  5. if(this.console) console.log( Array.prototype.slice.call(arguments) );
  6. };
  7. (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||{});
  8. /*
  9. * jQuery Nivo Gallery v0.7
  10. * http://dev7studios.com
  11. *
  12. * Copyright 2011, Gilbert Pellegrom
  13. * Free to use and abuse under the MIT license.
  14. * http://www.opensource.org/licenses/mit-license.php
  15. *
  16. * October 2011
  17. */
  18. (function($) {
  19. $.nivoGallery = function(element, options){
  20. var defaults = {
  21. pauseTime: 3000,
  22. animSpeed: 300,
  23. effect: 'fade',
  24. startPaused: false,
  25. directionNav: true,
  26. progressBar: true,
  27. galleryLoaded: function(){},
  28. beforeChange: function(index, slide, paused){},
  29. afterChange: function(index, slide, paused){},
  30. galleryEnd: function(){}
  31. }
  32. var global = {
  33. slides: [],
  34. currentSlide: 0,
  35. totalSlides: 0,
  36. animating: false,
  37. paused: false,
  38. timer: null,
  39. progressTimer: null
  40. }
  41. var plugin = this;
  42. plugin.settings = {}
  43. var $element = $(element),
  44. element = element;
  45. plugin.init = function(){
  46. plugin.settings = $.extend({}, defaults, options);
  47. setupGallery();
  48. }
  49. /* Private Funcs */
  50. var setupGallery = function(){
  51. global.slides = $element.find('ul li').remove();
  52. global.totalSlides = global.slides.length;
  53. $element.find('ul').addClass('nivoGallery-slides');
  54. if(plugin.settings.progressBar){
  55. $element.append('<div class="nivoGallery-progress"></div>');
  56. }
  57. if(plugin.settings.directionNav){
  58. $element.append('<div class="nivoGallery-directionNav">' +
  59. '<a class="nivoGallery-prev">Prev</a> <a class="nivoGallery-next">Next</a>' +
  60. '</div>');
  61. }
  62. $element.append('<div class="nivoGallery-bar">' +
  63. '<a class="nivoGallery-play playing" title="Play / Pause"></a>' +
  64. '<div class="nivoGallery-count">'+ setCount() +'</div>' +
  65. '<div class="nivoGallery-caption">'+ setCaption() +'</div>' +
  66. '<a class="nivoGallery-fullscreen" title="Toggle Fullscreen"></a>' +
  67. '</div>').fadeIn(200);
  68. loadSlide(global.currentSlide);
  69. }
  70. var setCount = function(){
  71. return (global.currentSlide + 1) +' / '+ global.totalSlides;
  72. }
  73. var setCaption = function(){
  74. var title = $(global.slides[global.currentSlide]).attr('data-title');
  75. var caption = $(global.slides[global.currentSlide]).attr('data-caption');
  76. var output = '';
  77. if(title) output += '<span class="nivoGallery-captionTitle">'+ title +'</span>';
  78. if(caption) output += caption;
  79. return output;
  80. }
  81. var runTimeout = function(){
  82. clearTimeout(global.timer);
  83. if(plugin.settings.progressBar){
  84. clearInterval(global.progressTimer);
  85. $element.find('.nivoGallery-progress').width('0%');
  86. }
  87. if(!global.paused){
  88. global.timer = setTimeout(function(){ $element.trigger('nextslide'); }, plugin.settings.pauseTime);
  89. if(plugin.settings.progressBar){
  90. var progressStart = new Date();
  91. global.progressTimer = setInterval(function(){
  92. var ellapsed = new Date() - progressStart;
  93. var perc = (ellapsed / plugin.settings.pauseTime) * 100;
  94. $element.find('.nivoGallery-progress').width(perc + '%');
  95. if(perc > 100){
  96. clearInterval(global.progressTimer);
  97. $element.find('.nivoGallery-progress').width('0%');
  98. }
  99. }, 10);
  100. }
  101. }
  102. }
  103. var loadSlide = function(idx, callbackFn){
  104. if($(global.slides[idx]).data('loaded')){
  105. if(typeof callbackFn == 'function') callbackFn.call(this);
  106. return;
  107. }
  108. if($(global.slides[idx]).find('img').length > 0 && ($(global.slides[idx]).attr('data-type') != 'html' && $(global.slides[idx]).attr('data-type') != 'video')){
  109. $element.removeClass('loaded');
  110. var img = new Image();
  111. $(img).load(function(){
  112. $element.find('.nivoGallery-slides').append(global.slides[idx]);
  113. $(global.slides[idx]).fadeIn(plugin.settings.animSpeed);
  114. if(idx == 0){
  115. $element.trigger('galleryloaded');
  116. }
  117. $element.addClass('loaded');
  118. $(global.slides[idx]).data('loaded', true);
  119. $(global.slides[idx]).addClass('slide-'+ (idx + 1));
  120. if(typeof callbackFn == 'function') callbackFn.call(this);
  121. })
  122. .attr('src', $(global.slides[idx]).find('img:first').attr('src'))
  123. .attr('alt', ($(global.slides[idx]).find('img:first').attr('alt') != undefined) ? $(global.slides[idx]).find('img:first').attr('alt') : '')
  124. .attr('title', ($(global.slides[idx]).find('img:first').attr('title') != undefined) ? $(global.slides[idx]).find('img:first').attr('title') : '');
  125. } else {
  126. $element.find('.nivoGallery-slides').append(global.slides[idx]);
  127. if(idx == 0){
  128. $element.trigger('galleryloaded');
  129. }
  130. $element.addClass('loaded');
  131. $(global.slides[idx]).data('loaded', true);
  132. $(global.slides[idx]).addClass('slide-'+ (idx + 1));
  133. if($(global.slides[idx]).attr('data-type') == 'html') $(global.slides[idx]).wrapInner('<div class="nivoGallery-htmlwrap"></div>');
  134. if($(global.slides[idx]).attr('data-type') == 'video') $(global.slides[idx]).wrapInner('<div class="nivoGallery-videowrap"></div>');
  135. if(typeof callbackFn == 'function') callbackFn.call(this);
  136. }
  137. }
  138. var runTransition = function(direction){
  139. if(global.animating) return;
  140. plugin.settings.beforeChange.call(this, global.currentSlide, $(global.slides[global.currentSlide]), global.paused);
  141. if(plugin.settings.effect == 'fade'){
  142. var galleryEnd = false;
  143. global.animating = true;
  144. $(global.slides[global.currentSlide]).fadeOut(plugin.settings.animSpeed, function(){
  145. if(direction == 'prev'){
  146. global.currentSlide--;
  147. if(global.currentSlide < 0){
  148. global.currentSlide = global.totalSlides - 1;
  149. galleryEnd = true;
  150. }
  151. } else {
  152. global.currentSlide++;
  153. if(global.currentSlide >= global.totalSlides){
  154. global.currentSlide = 0;
  155. galleryEnd = true;
  156. }
  157. }
  158. loadSlide(global.currentSlide, function(){
  159. $element.find('.nivoGallery-count').text(setCount());
  160. $element.find('.nivoGallery-caption').html(setCaption());
  161. $(global.slides[global.currentSlide]).fadeIn(plugin.settings.animSpeed, function(){
  162. global.animating = false;
  163. runTimeout();
  164. plugin.settings.afterChange.call(this, global.currentSlide, $(global.slides[global.currentSlide]), global.paused);
  165. if(galleryEnd) plugin.settings.galleryEnd.call(this);
  166. });
  167. });
  168. });
  169. }
  170. }
  171. /* Public Funcs */
  172. plugin.play = function(){
  173. $element.find('.nivoGallery-play').addClass('playing');
  174. global.paused = false;
  175. runTimeout();
  176. }
  177. plugin.pause = function(){
  178. $element.find('.nivoGallery-play').removeClass('playing');
  179. global.paused = true;
  180. runTimeout();
  181. }
  182. plugin.nextSlide = function(){
  183. plugin.pause();
  184. runTransition('next');
  185. }
  186. plugin.prevSlide = function(){
  187. plugin.pause();
  188. runTransition('prev');
  189. }
  190. plugin.goTo = function(idx){
  191. if(idx == global.currentSlide || global.animating) return;
  192. $(global.slides[global.currentSlide]).fadeOut(plugin.settings.animSpeed);
  193. global.currentSlide = (idx - 1);
  194. if(global.currentSlide < 0) global.currentSlide = global.totalSlides - 1;
  195. if(global.currentSlide >= global.totalSlides - 1) global.currentSlide = global.totalSlides - 2;
  196. plugin.pause();
  197. runTransition('next');
  198. }
  199. /* Events */
  200. $element.bind('galleryloaded', function(){
  201. $(global.slides[global.currentSlide]).fadeIn(200);
  202. if(plugin.settings.startPaused){
  203. plugin.pause();
  204. } else {
  205. runTimeout();
  206. }
  207. plugin.settings.galleryLoaded.call(this);
  208. });
  209. $element.find('.nivoGallery-play').live('click', function(){
  210. $(this).toggleClass('playing');
  211. global.paused = !global.paused;
  212. runTimeout();
  213. return false;
  214. });
  215. $element.bind('nextslide', function(){
  216. runTransition('next');
  217. });
  218. $element.find('.nivoGallery-prev').live('click', function(){
  219. plugin.prevSlide();
  220. });
  221. $element.find('.nivoGallery-next').live('click', function(){
  222. plugin.nextSlide();
  223. });
  224. $element.find('.nivoGallery-fullscreen').live('click', function(){
  225. $element.toggleClass('fullscreen');
  226. });
  227. $(document).keyup(function(e){
  228. if(e.keyCode == 27){
  229. $element.removeClass('fullscreen');
  230. }
  231. });
  232. plugin.init();
  233. }
  234. $.fn.nivoGallery = function(options){
  235. return this.each(function() {
  236. if (undefined == $(this).data('nivoGallery')){
  237. var plugin = new $.nivoGallery(this, options);
  238. $(this).data('nivoGallery', plugin);
  239. }
  240. });
  241. }
  242. })(jQuery);
  243. /*
  244. * Superfish v1.4.8 - jQuery menu widget
  245. * Copyright (c) 2008 Joel Birch
  246. *
  247. * Dual licensed under the MIT and GPL licenses:
  248. * http://www.opensource.org/licenses/mit-license.php
  249. * http://www.gnu.org/licenses/gpl.html
  250. *
  251. * CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt
  252. */
  253. ;(function($){
  254. $.fn.superfish = function(op){
  255. var sf = $.fn.superfish,
  256. c = sf.c,
  257. $arrow = $(['<span class="',c.arrowClass,'"> &#187;</span>'].join('')),
  258. over = function(){
  259. var $$ = $(this), menu = getMenu($$);
  260. clearTimeout(menu.sfTimer);
  261. $$.showSuperfishUl().siblings().hideSuperfishUl();
  262. },
  263. out = function(){
  264. var $$ = $(this), menu = getMenu($$), o = sf.op;
  265. clearTimeout(menu.sfTimer);
  266. menu.sfTimer=setTimeout(function(){
  267. o.retainPath=($.inArray($$[0],o.$path)>-1);
  268. $$.hideSuperfishUl();
  269. if (o.$path.length && $$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);}
  270. },o.delay);
  271. },
  272. getMenu = function($menu){
  273. var menu = $menu.parents(['ul.',c.menuClass,':first'].join(''))[0];
  274. sf.op = sf.o[menu.serial];
  275. return menu;
  276. },
  277. addArrow = function($a){ $a.addClass(c.anchorClass).append($arrow.clone()); };
  278. return this.each(function() {
  279. var s = this.serial = sf.o.length;
  280. var o = $.extend({},sf.defaults,op);
  281. o.$path = $('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){
  282. $(this).addClass([o.hoverClass,c.bcClass].join(' '))
  283. .filter('li:has(ul)').removeClass(o.pathClass);
  284. });
  285. sf.o[s] = sf.op = o;
  286. $('li:has(ul)',this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out).each(function() {
  287. if (o.autoArrows) addArrow( $('>a:first-child',this) );
  288. })
  289. .not('.'+c.bcClass)
  290. .hideSuperfishUl();
  291. var $a = $('a',this);
  292. $a.each(function(i){
  293. var $li = $a.eq(i).parents('li');
  294. $a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});
  295. });
  296. o.onInit.call(this);
  297. }).each(function() {
  298. var menuClasses = [c.menuClass];
  299. if (sf.op.dropShadows && !($.browser.msie && $.browser.version < 7)) menuClasses.push(c.shadowClass);
  300. $(this).addClass(menuClasses.join(' '));
  301. });
  302. };
  303. var sf = $.fn.superfish;
  304. sf.o = [];
  305. sf.op = {};
  306. sf.IE7fix = function(){
  307. var o = sf.op;
  308. if ($.browser.msie && $.browser.version > 6 && o.dropShadows && o.animation.opacity!=undefined)
  309. this.toggleClass(sf.c.shadowClass+'-off');
  310. };
  311. sf.c = {
  312. bcClass : 'sf-breadcrumb',
  313. menuClass : 'sf-js-enabled',
  314. anchorClass : 'sf-with-ul',
  315. arrowClass : 'sf-sub-indicator',
  316. shadowClass : 'sf-shadow'
  317. };
  318. sf.defaults = {
  319. hoverClass : 'sfHover',
  320. pathClass : 'overideThisToUse',
  321. pathLevels : 1,
  322. delay : 800,
  323. animation : {opacity:'show'},
  324. speed : 'normal',
  325. autoArrows : true,
  326. dropShadows : true,
  327. disableHI : false, // true disables hoverIntent detection
  328. onInit : function(){}, // callback functions
  329. onBeforeShow: function(){},
  330. onShow : function(){},
  331. onHide : function(){}
  332. };
  333. $.fn.extend({
  334. hideSuperfishUl : function(){
  335. var o = sf.op,
  336. not = (o.retainPath===true) ? o.$path : '';
  337. o.retainPath = false;
  338. var $ul = $(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass)
  339. .find('>ul').hide().css('visibility','hidden');
  340. o.onHide.call($ul);
  341. return this;
  342. },
  343. showSuperfishUl : function(){
  344. var o = sf.op,
  345. sh = sf.c.shadowClass+'-off',
  346. $ul = this.addClass(o.hoverClass)
  347. .find('>ul:hidden').css('visibility','visible');
  348. sf.IE7fix.call($ul);
  349. o.onBeforeShow.call($ul);
  350. $ul.animate(o.animation,o.speed,function(){ sf.IE7fix.call($ul); o.onShow.call($ul); });
  351. return this;
  352. }
  353. });
  354. })(jQuery);
  355. (function($){
  356. /* hoverIntent by Brian Cherne */
  357. $.fn.hoverIntent = function(f,g) {
  358. // default configuration options
  359. var cfg = {
  360. sensitivity: 7,
  361. interval: 100,
  362. timeout: 0
  363. };
  364. // override configuration options with user supplied object
  365. cfg = $.extend(cfg, g ? { over: f, out: g } : f );
  366. // instantiate variables
  367. // cX, cY = current X and Y position of mouse, updated by mousemove event
  368. // pX, pY = previous X and Y position of mouse, set by mouseover and polling interval
  369. var cX, cY, pX, pY;
  370. // A private function for getting mouse position
  371. var track = function(ev) {
  372. cX = ev.pageX;
  373. cY = ev.pageY;
  374. };
  375. // A private function for comparing current and previous mouse position
  376. var compare = function(ev,ob) {
  377. ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t);
  378. // compare mouse positions to see if they've crossed the threshold
  379. if ( ( Math.abs(pX-cX) + Math.abs(pY-cY) ) < cfg.sensitivity ) {
  380. $(ob).unbind("mousemove",track);
  381. // set hoverIntent state to true (so mouseOut can be called)
  382. ob.hoverIntent_s = 1;
  383. return cfg.over.apply(ob,[ev]);
  384. } else {
  385. // set previous coordinates for next time
  386. pX = cX; pY = cY;
  387. // use self-calling timeout, guarantees intervals are spaced out properly (avoids JavaScript timer bugs)
  388. ob.hoverIntent_t = setTimeout( function(){compare(ev, ob);} , cfg.interval );
  389. }
  390. };
  391. // A private function for delaying the mouseOut function
  392. var delay = function(ev,ob) {
  393. ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t);
  394. ob.hoverIntent_s = 0;
  395. return cfg.out.apply(ob,[ev]);
  396. };
  397. // A private function for handling mouse 'hovering'
  398. var handleHover = function(e) {
  399. // next three lines copied from jQuery.hover, ignore children onMouseOver/onMouseOut
  400. var p = (e.type == "mouseover" ? e.fromElement : e.toElement) || e.relatedTarget;
  401. while ( p && p != this ) { try { p = p.parentNode; } catch(e) { p = this; } }
  402. if ( p == this ) { return false; }
  403. // copy objects to be passed into t (required for event object to be passed in IE)
  404. var ev = jQuery.extend({},e);
  405. var ob = this;
  406. // cancel hoverIntent timer if it exists
  407. if (ob.hoverIntent_t) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); }
  408. // else e.type == "onmouseover"
  409. if (e.type == "mouseover") {
  410. // set "previous" X and Y position based on initial entry point
  411. pX = ev.pageX; pY = ev.pageY;
  412. // update "current" X and Y position based on mousemove
  413. $(ob).bind("mousemove",track);
  414. // start polling interval (self-calling timeout) to compare mouse coordinates over time
  415. if (ob.hoverIntent_s != 1) { ob.hoverIntent_t = setTimeout( function(){compare(ev,ob);} , cfg.interval );}
  416. // else e.type == "onmouseout"
  417. } else {
  418. // unbind expensive mousemove event
  419. $(ob).unbind("mousemove",track);
  420. // if hoverIntent state is true, then call the mouseOut function after the specified delay
  421. if (ob.hoverIntent_s == 1) { ob.hoverIntent_t = setTimeout( function(){delay(ev,ob);} , cfg.timeout );}
  422. }
  423. };
  424. // bind the function to the two event listeners
  425. return this.mouseover(handleHover).mouseout(handleHover);
  426. };
  427. })(jQuery);
  428. /*!
  429. * MediaElement.js
  430. * HTML5 <video> and <audio> shim and player
  431. * http://mediaelementjs.com/
  432. *
  433. * Creates a JavaScript object that mimics HTML5 MediaElement API
  434. * for browsers that don't understand HTML5 or can't play the provided codec
  435. * Can play MP4 (H.264), Ogg, WebM, FLV, WMV, WMA, ACC, and MP3
  436. *
  437. * Copyright 2010-2011, John Dyer (http://j.hn)
  438. * Dual licensed under the MIT or GPL Version 2 licenses.
  439. *
  440. */var mejs=mejs||{};mejs.version="2.3.0";mejs.meIndex=0;mejs.plugins={silverlight:[{version:[3,0],types:["video/mp4","video/m4v","video/mov","video/wmv","audio/wma","audio/m4a","audio/mp3","audio/wav","audio/mpeg"]}],flash:[{version:[9,0,124],types:["video/mp4","video/m4v","video/mov","video/flv","video/x-flv","audio/flv","audio/x-flv","audio/mp3","audio/m4a","audio/mpeg"]}]};
  441. mejs.Utility={encodeUrl:function(a){return encodeURIComponent(a)},escapeHTML:function(a){return a.toString().split("&").join("&amp;").split("<").join("&lt;").split('"').join("&quot;")},absolutizeUrl:function(a){var b=document.createElement("div");b.innerHTML='<a href="'+this.escapeHTML(a)+'">x</a>';return b.firstChild.href},getScriptPath:function(a){for(var b=0,c,d="",e="",g,f=document.getElementsByTagName("script");b<f.length;b++){g=f[b].src;for(c=0;c<a.length;c++){e=a[c];if(g.indexOf(e)>-1){d=g.substring(0,
  442. g.indexOf(e));break}}if(d!=="")break}return d},secondsToTimeCode:function(a,b,c,d){if(typeof c=="undefined")c=false;else if(typeof d=="undefined")d=25;var e=Math.floor(a/3600)%24,g=Math.floor(a/60)%60,f=Math.floor(a%60);a=Math.floor((a%1*d).toFixed(3));return(b||e>0?(e<10?"0"+e:e)+":":"")+(g<10?"0"+g:g)+":"+(f<10?"0"+f:f)+(c?":"+(a<10?"0"+a:a):"")},timeCodeToSeconds:function(a,b,c,d){if(typeof c=="undefined")c=false;else if(typeof d=="undefined")d=25;a=a.split(":");b=parseInt(a[0]);var e=parseInt(a[1]),
  443. g=parseInt(a[2]),f=0,j=0;if(c)f=parseInt(a[3])/d;return j=b*3600+e*60+g+f}};
  444. mejs.PluginDetector={hasPluginVersion:function(a,b){var c=this.plugins[a];b[1]=b[1]||0;b[2]=b[2]||0;return c[0]>b[0]||c[0]==b[0]&&c[1]>b[1]||c[0]==b[0]&&c[1]==b[1]&&c[2]>=b[2]?true:false},nav:window.navigator,ua:window.navigator.userAgent.toLowerCase(),plugins:[],addPlugin:function(a,b,c,d,e){this.plugins[a]=this.detectPlugin(b,c,d,e)},detectPlugin:function(a,b,c,d){var e=[0,0,0],g;if(typeof this.nav.plugins!="undefined"&&typeof this.nav.plugins[a]=="object"){if((c=this.nav.plugins[a].description)&&
  445. !(typeof this.nav.mimeTypes!="undefined"&&this.nav.mimeTypes[b]&&!this.nav.mimeTypes[b].enabledPlugin)){e=c.replace(a,"").replace(/^\s+/,"").replace(/\sr/gi,".").split(".");for(a=0;a<e.length;a++)e[a]=parseInt(e[a].match(/\d+/),10)}}else if(typeof window.ActiveXObject!="undefined")try{if(g=new ActiveXObject(c))e=d(g)}catch(f){}return e}};
  446. mejs.PluginDetector.addPlugin("flash","Shockwave Flash","application/x-shockwave-flash","ShockwaveFlash.ShockwaveFlash",function(a){var b=[];if(a=a.GetVariable("$version")){a=a.split(" ")[1].split(",");b=[parseInt(a[0],10),parseInt(a[1],10),parseInt(a[2],10)]}return b});
  447. mejs.PluginDetector.addPlugin("silverlight","Silverlight Plug-In","application/x-silverlight-2","AgControl.AgControl",function(a){var b=[0,0,0,0],c=function(d,e,g,f){for(;d.isVersionSupported(e[0]+"."+e[1]+"."+e[2]+"."+e[3]);)e[g]+=f;e[g]-=f};c(a,b,0,1);c(a,b,1,1);c(a,b,2,1E4);c(a,b,2,1E3);c(a,b,2,100);c(a,b,2,10);c(a,b,2,1);c(a,b,3,1);return b});
  448. mejs.MediaFeatures={init:function(){var a=this,b=document,c=mejs.PluginDetector.nav,d=mejs.PluginDetector.ua.toLowerCase(),e,g=["source","track","audio","video"];a.isiPad=d.match(/ipad/i)!==null;a.isiPhone=d.match(/iphone/i)!==null;a.isiOS=a.isiPhone||a.isiPad;a.isAndroid=d.match(/android/i)!==null;a.isBustedAndroid=d.match(/android 2\.[12]/)!==null;a.isIE=c.appName.toLowerCase().indexOf("microsoft")!=-1;a.isChrome=d.match(/chrome/gi)!==null;a.isFirefox=d.match(/firefox/gi)!==null;a.isGecko=d.match(/gecko/gi)!==
  449. null;a.isWebkit=d.match(/webkit/gi)!==null;for(c=0;c<g.length;c++)e=document.createElement(g[c]);a.supportsMediaTag=typeof e.canPlayType!=="undefined"||a.isBustedAndroid;a.hasSemiNativeFullScreen=typeof e.webkitEnterFullscreen!=="undefined";a.hasWebkitNativeFullScreen=typeof e.webkitRequestFullScreen!=="undefined";a.hasMozNativeFullScreen=typeof e.mozRequestFullScreen!=="undefined";a.hasTrueNativeFullScreen=a.hasWebkitNativeFullScreen||a.hasMozNativeFullScreen;if(this.isChrome)a.hasSemiNativeFullScreen=
  450. false;if(a.hasTrueNativeFullScreen){a.fullScreenEventName=a.hasWebkitNativeFullScreen?"webkitfullscreenchange":"mozfullscreenchange";a.isFullScreen=function(){if(e.mozRequestFullScreen)return b.mozFullScreen;else if(e.webkitRequestFullScreen)return b.webkitIsFullScreen};a.requestFullScreen=function(f){if(a.hasWebkitNativeFullScreen)f.webkitRequestFullScreen();else a.hasMozNativeFullScreen&&f.mozRequestFullScreen()};a.cancelFullScreen=function(){if(a.hasWebkitNativeFullScreen)document.webkitCancelFullScreen();
  451. else a.hasMozNativeFullScreen&&document.mozCancelFullScreen()}}if(a.hasSemiNativeFullScreen&&d.match(/mac os x 10_5/i)){a.hasNativeFullScreen=false;a.hasSemiNativeFullScreen=false}}};mejs.MediaFeatures.init();
  452. mejs.HtmlMediaElement={pluginType:"native",isFullScreen:false,setCurrentTime:function(a){this.currentTime=a},setMuted:function(a){this.muted=a},setVolume:function(a){this.volume=a},stop:function(){this.pause()},setSrc:function(a){for(var b=this.getElementsByTagName("source");b.length>0;)this.removeChild(b[0]);if(typeof a=="string")this.src=a;else{var c;for(b=0;b<a.length;b++){c=a[b];if(this.canPlayType(c.type))this.src=c.src}}},setVideoSize:function(a,b){this.width=a;this.height=b}};
  453. mejs.PluginMediaElement=function(a,b,c){this.id=a;this.pluginType=b;this.src=c;this.events={}};
  454. mejs.PluginMediaElement.prototype={pluginElement:null,pluginType:"",isFullScreen:false,playbackRate:-1,defaultPlaybackRate:-1,seekable:[],played:[],paused:true,ended:false,seeking:false,duration:0,error:null,muted:false,volume:1,currentTime:0,play:function(){if(this.pluginApi!=null){this.pluginApi.playMedia();this.paused=false}},load:function(){if(this.pluginApi!=null){this.pluginApi.loadMedia();this.paused=false}},pause:function(){if(this.pluginApi!=null){this.pluginApi.pauseMedia();this.paused=
  455. true}},stop:function(){if(this.pluginApi!=null){this.pluginApi.stopMedia();this.paused=true}},canPlayType:function(a){var b,c,d,e=mejs.plugins[this.pluginType];for(b=0;b<e.length;b++){d=e[b];if(mejs.PluginDetector.hasPluginVersion(this.pluginType,d.version))for(c=0;c<d.types.length;c++)if(a==d.types[c])return true}return false},setSrc:function(a){if(typeof a=="string"){this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(a));this.src=mejs.Utility.absolutizeUrl(a)}else{var b,c;for(b=0;b<a.length;b++){c=
  456. a[b];if(this.canPlayType(c.type)){this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(c.src));this.src=mejs.Utility.absolutizeUrl(a)}}}},setCurrentTime:function(a){if(this.pluginApi!=null){this.pluginApi.setCurrentTime(a);this.currentTime=a}},setVolume:function(a){if(this.pluginApi!=null){this.pluginApi.setVolume(a);this.volume=a}},setMuted:function(a){if(this.pluginApi!=null){this.pluginApi.setMuted(a);this.muted=a}},setVideoSize:function(a,b){if(this.pluginElement.style){this.pluginElement.style.width=
  457. a+"px";this.pluginElement.style.height=b+"px"}this.pluginApi!=null&&this.pluginApi.setVideoSize(a,b)},setFullscreen:function(a){this.pluginApi!=null&&this.pluginApi.setFullscreen(a)},enterFullScreen:function(){this.setFullscreen(true)},enterFullScreen:function(){this.setFullscreen(false)},addEventListener:function(a,b){this.events[a]=this.events[a]||[];this.events[a].push(b)},removeEventListener:function(a,b){if(!a){this.events={};return true}var c=this.events[a];if(!c)return true;if(!b){this.events[a]=
  458. [];return true}for(i=0;i<c.length;i++)if(c[i]===b){this.events[a].splice(i,1);return true}return false},dispatchEvent:function(a){var b,c,d=this.events[a];if(d){c=Array.prototype.slice.call(arguments,1);for(b=0;b<d.length;b++)d[b].apply(null,c)}}};
  459. mejs.MediaPluginBridge={pluginMediaElements:{},htmlMediaElements:{},registerPluginElement:function(a,b,c){this.pluginMediaElements[a]=b;this.htmlMediaElements[a]=c},initPlugin:function(a){var b=this.pluginMediaElements[a],c=this.htmlMediaElements[a];switch(b.pluginType){case "flash":b.pluginElement=b.pluginApi=document.getElementById(a);break;case "silverlight":b.pluginElement=document.getElementById(b.id);b.pluginApi=b.pluginElement.Content.MediaElementJS}b.pluginApi!=null&&b.success&&b.success(b,
  460. c)},fireEvent:function(a,b,c){var d,e;a=this.pluginMediaElements[a];a.ended=false;a.paused=true;b={type:b,target:a};for(d in c){a[d]=c[d];b[d]=c[d]}e=c.bufferedTime||0;b.target.buffered=b.buffered={start:function(){return 0},end:function(){return e},length:1};a.dispatchEvent(b.type,b)}};
  461. mejs.MediaElementDefaults={mode:"auto",plugins:["flash","silverlight"],enablePluginDebug:false,type:"",pluginPath:mejs.Utility.getScriptPath(["mediaelement.js","mediaelement.min.js","mediaelement-and-player.js","mediaelement-and-player.min.js"]),flashName:"flashmediaelement.swf",enablePluginSmoothing:false,silverlightName:"silverlightmediaelement.xap",defaultVideoWidth:480,defaultVideoHeight:270,pluginWidth:-1,pluginHeight:-1,timerRate:250,startVolume:0.8,success:function(){},error:function(){}};
  462. mejs.MediaElement=function(a,b){return mejs.HtmlMediaElementShim.create(a,b)};
  463. mejs.HtmlMediaElementShim={create:function(a,b){var c=mejs.MediaElementDefaults,d=typeof a=="string"?document.getElementById(a):a,e=d.tagName.toLowerCase(),g=e==="audio"||e==="video",f=g?d.getAttribute("src"):d.getAttribute("href");e=d.getAttribute("poster");var j=d.getAttribute("autoplay"),h=d.getAttribute("preload"),l=d.getAttribute("controls"),k;for(k in b)c[k]=b[k];f=f=="undefined"||f==""||f===null?null:f;e=typeof e=="undefined"||e===null?"":e;h=typeof h=="undefined"||h===null||h==="false"?"none":
  464. h;j=!(typeof j=="undefined"||j===null||j==="false");l=!(typeof l=="undefined"||l===null||l==="false");k=this.determinePlayback(d,c,mejs.MediaFeatures.supportsMediaTag,g,f);k.url=k.url!==null?mejs.Utility.absolutizeUrl(k.url):"";if(k.method=="native"){if(mejs.MediaFeatures.isBustedAndroid){d.src=k.url;d.addEventListener("click",function(){d.play()},true)}return this.updateNative(k,c,j,h)}else if(k.method!=="")return this.createPlugin(k,c,e,j,h,l);else this.createErrorMessage(k,c,e)},determinePlayback:function(a,
  465. b,c,d,e){var g=[],f,j,h={method:"",url:"",htmlMediaElement:a,isVideo:a.tagName.toLowerCase()!="audio"},l,k;if(typeof b.type!="undefined"&&b.type!=="")if(typeof b.type=="string")g.push({type:b.type,url:e});else for(f=0;f<b.type.length;f++)g.push({type:b.type[f],url:e});else if(e!==null){j=this.formatType(e,a.getAttribute("type"));g.push({type:j,url:e})}else for(f=0;f<a.childNodes.length;f++){j=a.childNodes[f];if(j.nodeType==1&&j.tagName.toLowerCase()=="source"){e=j.getAttribute("src");j=this.formatType(e,
  466. j.getAttribute("type"));g.push({type:j,url:e})}}if(!d&&g.length>0&&g[0].url!==null&&this.getTypeFromFile(g[0].url).indexOf("audio")>-1)h.isVideo=false;if(mejs.MediaFeatures.isBustedAndroid)a.canPlayType=function(m){return m.match(/video\/(mp4|m4v)/gi)!==null?"maybe":""};if(c&&(b.mode==="auto"||b.mode==="native")){if(!d){f=document.createElement(h.isVideo?"video":"audio");a.parentNode.insertBefore(f,a);a.style.display="none";h.htmlMediaElement=a=f}for(f=0;f<g.length;f++)if(a.canPlayType(g[f].type).replace(/no/,
  467. "")!==""||a.canPlayType(g[f].type.replace(/mp3/,"mpeg")).replace(/no/,"")!==""){h.method="native";h.url=g[f].url;break}if(h.method==="native"){if(h.url!==null)a.src=h.url;return h}}if(b.mode==="auto"||b.mode==="shim")for(f=0;f<g.length;f++){j=g[f].type;for(a=0;a<b.plugins.length;a++){e=b.plugins[a];l=mejs.plugins[e];for(c=0;c<l.length;c++){k=l[c];if(mejs.PluginDetector.hasPluginVersion(e,k.version))for(d=0;d<k.types.length;d++)if(j==k.types[d]){h.method=e;h.url=g[f].url;return h}}}}if(h.method===
  468. "")h.url=g[0].url;return h},formatType:function(a,b){return a&&!b?this.getTypeFromFile(a):b&&~b.indexOf(";")?b.substr(0,b.indexOf(";")):b},getTypeFromFile:function(a){a=a.substring(a.lastIndexOf(".")+1);return(/(mp4|m4v|ogg|ogv|webm|flv|wmv|mpeg|mov)/gi.test(a)?"video":"audio")+"/"+a},createErrorMessage:function(a,b,c){var d=a.htmlMediaElement,e=document.createElement("div");e.className="me-cannotplay";try{e.style.width=d.width+"px";e.style.height=d.height+"px"}catch(g){}e.innerHTML=c!==""?'<a href="'+
  469. a.url+'"><img src="'+c+'" /></a>':'<a href="'+a.url+'"><span>Download File</span></a>';d.parentNode.insertBefore(e,d);d.style.display="none";b.error(d)},createPlugin:function(a,b,c,d,e,g){c=a.htmlMediaElement;var f=1,j=1,h="me_"+a.method+"_"+mejs.meIndex++,l=new mejs.PluginMediaElement(h,a.method,a.url),k=document.createElement("div"),m;for(m=c.parentNode;m!==null&&m.tagName.toLowerCase()!="body";){if(m.parentNode.tagName.toLowerCase()=="p"){m.parentNode.parentNode.insertBefore(m,m.parentNode);break}m=
  470. m.parentNode}if(a.isVideo){f=b.videoWidth>0?b.videoWidth:c.getAttribute("width")!==null?c.getAttribute("width"):b.defaultVideoWidth;j=b.videoHeight>0?b.videoHeight:c.getAttribute("height")!==null?c.getAttribute("height"):b.defaultVideoHeight;f=mejs.Utility.encodeUrl(f);j=mejs.Utility.encodeUrl(j)}else if(b.enablePluginDebug){f=320;j=240}l.success=b.success;mejs.MediaPluginBridge.registerPluginElement(h,l,c);k.className="me-plugin";c.parentNode.insertBefore(k,c);d=["id="+h,"isvideo="+(a.isVideo?"true":
  471. "false"),"autoplay="+(d?"true":"false"),"preload="+e,"width="+f,"startvolume="+b.startVolume,"timerrate="+b.timerRate,"height="+j];if(a.url!==null)a.method=="flash"?d.push("file="+mejs.Utility.encodeUrl(a.url)):d.push("file="+a.url);b.enablePluginDebug&&d.push("debug=true");b.enablePluginSmoothing&&d.push("smoothing=true");g&&d.push("controls=true");switch(a.method){case "silverlight":k.innerHTML='<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" id="'+h+'" name="'+
  472. h+'" width="'+f+'" height="'+j+'"><param name="initParams" value="'+d.join(",")+'" /><param name="windowless" value="true" /><param name="background" value="black" /><param name="minRuntimeVersion" value="3.0.0.0" /><param name="autoUpgrade" value="true" /><param name="source" value="'+b.pluginPath+b.silverlightName+'" /></object>';break;case "flash":if(mejs.MediaFeatures.isIE){a=document.createElement("div");k.appendChild(a);a.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="'+
  473. h+'" width="'+f+'" height="'+j+'"><param name="movie" value="'+b.pluginPath+b.flashName+"?x="+new Date+'" /><param name="flashvars" value="'+d.join("&amp;")+'" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /></object>'}else k.innerHTML='<embed id="'+h+'" name="'+h+'" play="true" loop="false" quality="high" bgcolor="#000000" wmode="transparent" allowScriptAccess="always" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" src="'+
  474. b.pluginPath+b.flashName+'" flashvars="'+d.join("&")+'" width="'+f+'" height="'+j+'"></embed>'}c.style.display="none";return l},updateNative:function(a,b){var c=a.htmlMediaElement,d;for(d in mejs.HtmlMediaElement)c[d]=mejs.HtmlMediaElement[d];b.success(c,c);return c}};window.mejs=mejs;window.MediaElement=mejs.MediaElement;
  475. /*!
  476. * MediaElementPlayer
  477. * http://mediaelementjs.com/
  478. *
  479. * Creates a controller bar for HTML5 <video> add <audio> tags
  480. * using jQuery and MediaElement.js (HTML5 Flash/Silverlight wrapper)
  481. *
  482. * Copyright 2010-2011, John Dyer (http://j.hn/)
  483. * Dual licensed under the MIT or GPL Version 2 licenses.
  484. *
  485. */if(typeof jQuery!="undefined")mejs.$=jQuery;else if(typeof ender!="undefined")mejs.$=ender;
  486. (function(f){mejs.MepDefaults={poster:"",defaultVideoWidth:480,defaultVideoHeight:270,videoWidth:-1,videoHeight:-1,audioWidth:400,audioHeight:30,startVolume:0.8,loop:false,enableAutosize:true,alwaysShowHours:false,showTimecodeFrameCount:false,framesPerSecond:25,alwaysShowControls:false,iPadUseNativeControls:false,iPhoneUseNativeControls:false,AndroidUseNativeControls:false,features:["playpause","current","progress","duration","tracks","volume","fullscreen"],isVideo:true};mejs.mepIndex=0;mejs.MediaElementPlayer=
  487. function(a,c){if(!(this instanceof mejs.MediaElementPlayer))return new mejs.MediaElementPlayer(a,c);this.$media=this.$node=f(a);this.node=this.media=this.$media[0];if(typeof this.node.player!="undefined")return this.node.player;else this.node.player=this;this.options=f.extend({},mejs.MepDefaults,c);this.init();return this};mejs.MediaElementPlayer.prototype={init:function(){var a=this,c=mejs.MediaFeatures,b=f.extend(true,{},a.options,{success:function(e,h){a.meReady(e,h)},error:function(e){a.handleError(e)}}),
  488. d=a.media.tagName.toLowerCase();a.isDynamic=d!=="audio"&&d!=="video";a.isVideo=a.isDynamic?a.options.isVideo:d!=="audio"&&a.options.isVideo;if(c.isiPad&&a.options.iPadUseNativeControls||c.isiPhone&&a.options.iPhoneUseNativeControls){a.$media.attr("controls","controls");a.$media.removeAttr("poster");if(c.isiPad&&a.media.getAttribute("autoplay")!==null){a.media.load();a.media.play()}}else if(!(c.isAndroid&&a.AndroidUseNativeControls)){a.$media.removeAttr("controls");a.id="mep_"+mejs.mepIndex++;a.container=
  489. f('<div id="'+a.id+'" class="mejs-container"><div class="mejs-inner"><div class="mejs-mediaelement"></div><div class="mejs-layers"></div><div class="mejs-controls"></div><div class="mejs-clear"></div></div></div>').addClass(a.$media[0].className).insertBefore(a.$media);a.container.addClass((c.isAndroid?"mejs-android ":"")+(c.isiOS?"mejs-ios ":"")+(c.isiPad?"mejs-ipad ":"")+(c.isiPhone?"mejs-iphone ":"")+(a.isVideo?"mejs-video ":"mejs-audio "));if(c.isiOS){c=a.$media.clone();a.container.find(".mejs-mediaelement").append(c);
  490. a.$media.remove();a.$node=a.$media=c;a.node=a.media=c[0]}else a.container.find(".mejs-mediaelement").append(a.$media);a.controls=a.container.find(".mejs-controls");a.layers=a.container.find(".mejs-layers");if(a.isVideo){a.width=a.options.videoWidth>0||a.options.videoWidth.toString().indexOf("%")>-1?a.options.videoWidth:a.media.style.width!==""&&a.media.style.width!==null?a.media.style.width:a.media.getAttribute("width")!==null?a.$media.attr("width"):a.options.defaultVideoWidth;a.height=a.options.videoHeight>
  491. 0||a.options.videoHeight.toString().indexOf("%")>-1?a.options.videoHeight:a.media.style.height!==""&&a.media.style.height!==null?a.media.style.height:a.$media[0].getAttribute("height")!==null?a.$media.attr("height"):a.options.defaultVideoHeight}else{a.width=a.options.audioWidth;a.height=a.options.audioHeight}a.setPlayerSize(a.width,a.height);b.pluginWidth=a.height;b.pluginHeight=a.width}mejs.MediaElement(a.$media[0],b)},controlsAreVisible:true,showControls:function(a){var c=this;a=typeof a=="undefined"||
  492. a;if(!c.controlsAreVisible){if(a){c.controls.css("visibility","visible").stop(true,true).fadeIn(200,function(){c.controlsAreVisible=true});c.container.find(".mejs-control").css("visibility","visible").stop(true,true).fadeIn(200,function(){c.controlsAreVisible=true})}else{c.controls.css("visibility","visible").css("display","block");c.container.find(".mejs-control").css("visibility","visible").css("display","block");c.controlsAreVisible=true}c.setControlsSize()}},hideControls:function(a){var c=this;
  493. a=typeof a=="undefined"||a;if(c.controlsAreVisible)if(a){c.controls.stop(true,true).fadeOut(200,function(){f(this).css("visibility","hidden").css("display","block");c.controlsAreVisible=false});c.container.find(".mejs-control").stop(true,true).fadeOut(200,function(){f(this).css("visibility","hidden").css("display","block")})}else{c.controls.css("visibility","hidden").css("display","block");c.container.find(".mejs-control").css("visibility","hidden").css("display","block");c.controlsAreVisible=false}},
  494. controlsTimer:null,startControlsTimer:function(a){var c=this;a=typeof a!="undefined"?a:500;c.killControlsTimer("start");c.controlsTimer=setTimeout(function(){c.hideControls();c.killControlsTimer("hide")},a)},killControlsTimer:function(){if(this.controlsTimer!==null){clearTimeout(this.controlsTimer);delete this.controlsTimer;this.controlsTimer=null}},controlsEnabled:true,disableControls:function(){this.killControlsTimer();this.hideControls(false);this.controlsEnabled=false},enableControls:function(){this.showControls(false);
  495. this.controlsEnabled=true},meReady:function(a,c){var b=this,d=mejs.MediaFeatures,e=c.getAttribute("autoplay");e=!(typeof e=="undefined"||e===null||e==="false");var h;if(!b.created){b.created=true;b.media=a;b.domNode=c;if(!(d.isAndroid&&b.options.AndroidUseNativeControls)&&!(d.isiPad&&b.options.iPadUseNativeControls)&&!(d.isiPhone&&b.options.iPhoneUseNativeControls)){b.buildposter(b,b.controls,b.layers,b.media);b.buildoverlays(b,b.controls,b.layers,b.media);b.findTracks();for(h in b.options.features){d=
  496. b.options.features[h];if(b["build"+d])try{b["build"+d](b,b.controls,b.layers,b.media)}catch(j){}}b.container.trigger("controlsready");b.setPlayerSize(b.width,b.height);b.setControlsSize();if(b.isVideo){b.media.pluginType=="native"?b.$media.click(function(){a.paused?a.play():a.pause()}):f(b.media.pluginElement).click(function(){a.paused?a.play():a.pause()});b.container.bind("mouseenter mouseover",function(){if(b.controlsEnabled)if(!b.options.alwaysShowControls){b.killControlsTimer("enter");b.showControls();
  497. b.startControlsTimer(2500)}}).bind("mousemove",function(){if(b.controlsEnabled){b.controlsAreVisible||b.showControls();b.startControlsTimer(2500)}}).bind("mouseleave",function(){b.controlsEnabled&&!b.media.paused&&!b.options.alwaysShowControls&&b.startControlsTimer(1E3)});e&&!b.options.alwaysShowControls&&b.hideControls();b.options.enableAutosize&&b.media.addEventListener("loadedmetadata",function(i){if(b.options.videoHeight<=0&&b.domNode.getAttribute("height")===null&&!isNaN(i.target.videoHeight)){b.setPlayerSize(i.target.videoWidth,
  498. i.target.videoHeight);b.setControlsSize();b.media.setVideoSize(i.target.videoWidth,i.target.videoHeight)}},false)}b.media.addEventListener("ended",function(){b.media.setCurrentTime(0);b.media.pause();b.setProgressRail&&b.setProgressRail();b.setCurrentRail&&b.setCurrentRail();if(b.options.loop)b.media.play();else!b.options.alwaysShowControls&&b.controlsEnabled&&b.showControls()},true);b.media.addEventListener("loadedmetadata",function(){b.updateDuration&&b.updateDuration();b.updateCurrent&&b.updateCurrent();
  499. if(!b.isFullScreen){b.setPlayerSize(b.width,b.height);b.setControlsSize()}},true);setTimeout(function(){b.setPlayerSize(b.width,b.height);b.setControlsSize()},50);f(window).resize(function(){b.isFullScreen||mejs.MediaFeatures.hasTrueNativeFullScreen&&document.webkitIsFullScreen||b.setPlayerSize(b.width,b.height);b.setControlsSize()})}if(e&&a.pluginType=="native"){a.load();a.play()}b.options.success&&b.options.success(b.media,b.domNode,b)}},handleError:function(a){this.controls.hide();this.options.error&&
  500. this.options.error(a)},setPlayerSize:function(){if(this.height.toString().indexOf("%")>0){var a=this.media.videoWidth&&this.media.videoWidth>0?this.media.videoWidth:this.options.defaultVideoWidth,c=this.media.videoHeight&&this.media.videoHeight>0?this.media.videoHeight:this.options.defaultVideoHeight,b=this.container.parent().width();a=parseInt(b*c/a,10);if(this.container.parent()[0].tagName.toLowerCase()==="body"){b=f(window).width();a=f(window).height()}this.container.width(b).height(a);this.$media.width("100%").height("100%");
  501. this.container.find("object embed").width("100%").height("100%");this.media.setVideoSize&&this.media.setVideoSize(b,a);this.layers.children(".mejs-layer").width("100%").height("100%")}else{this.container.width(this.width).height(this.height);this.layers.children(".mejs-layer").width(this.width).height(this.height)}},setControlsSize:function(){var a=0,c=0,b=this.controls.find(".mejs-time-rail"),d=this.controls.find(".mejs-time-total");this.controls.find(".mejs-time-current");this.controls.find(".mejs-time-loaded");
  502. others=b.siblings();others.each(function(){if(f(this).css("position")!="absolute")a+=f(this).outerWidth(true)});c=this.controls.width()-a-(b.outerWidth(true)-b.outerWidth(false));b.width(c);d.width(c-(d.outerWidth(true)-d.width()));this.setProgressRail&&this.setProgressRail();this.setCurrentRail&&this.setCurrentRail()},buildposter:function(a,c,b,d){var e=f('<div class="mejs-poster mejs-layer"></div>').appendTo(b);c=a.$media.attr("poster");if(a.options.poster!=="")c=a.options.poster;c!==""&&c!=null?
  503. this.setPoster(c):e.hide();d.addEventListener("play",function(){e.hide()},false)},setPoster:function(a){var c=this.container.find(".mejs-poster"),b=c.find("img");if(b.length==0)b=f('<img width="100%" height="100%" />').appendTo(c);b.attr("src",a)},buildoverlays:function(a,c,b,d){if(a.isVideo){var e=f('<div class="mejs-overlay mejs-layer"><div class="mejs-overlay-loading"><span></span></div></div>').hide().appendTo(b),h=f('<div class="mejs-overlay mejs-layer"><div class="mejs-overlay-error"></div></div>').hide().appendTo(b),
  504. j=f('<div class="mejs-overlay mejs-layer mejs-overlay-play"><div class="mejs-overlay-button"></div></div>').appendTo(b).click(function(){d.paused?d.play():d.pause()});d.addEventListener("play",function(){j.hide();e.hide();h.hide()},false);d.addEventListener("playing",function(){j.hide();e.hide();h.hide()},false);d.addEventListener("pause",function(){mejs.MediaFeatures.isiPhone||j.show()},false);d.addEventListener("waiting",function(){e.show()},false);d.addEventListener("loadeddata",function(){e.show()},
  505. false);d.addEventListener("canplay",function(){e.hide()},false);d.addEventListener("error",function(){e.hide();h.show();h.find("mejs-overlay-error").html("Error loading this resource")},false)}},findTracks:function(){var a=this,c=a.$media.find("track");a.tracks=[];c.each(function(){a.tracks.push({srclang:f(this).attr("srclang").toLowerCase(),src:f(this).attr("src"),kind:f(this).attr("kind"),entries:[],isLoaded:false})})},changeSkin:function(a){this.container[0].className="mejs-container "+a;this.setPlayerSize();
  506. this.setControlsSize()},play:function(){this.media.play()},pause:function(){this.media.pause()},load:function(){this.media.load()},setMuted:function(a){this.media.setMuted(a)},setCurrentTime:function(a){this.media.setCurrentTime(a)},getCurrentTime:function(){return this.media.currentTime},setVolume:function(a){this.media.setVolume(a)},getVolume:function(){return this.media.volume},setSrc:function(a){this.media.setSrc(a)}};if(typeof jQuery!="undefined")jQuery.fn.mediaelementplayer=function(a){return this.each(function(){new mejs.MediaElementPlayer(this,
  507. a)})};window.MediaElementPlayer=mejs.MediaElementPlayer})(mejs.$);
  508. (function(f){f.extend(mejs.MepDefaults,{playpauseText:"Play/Pause"});f.extend(MediaElementPlayer.prototype,{buildplaypause:function(a,c,b,d){var e=f('<div class="mejs-button mejs-playpause-button mejs-play" ><button type="button" aria-controls="'+this.id+'" title="'+this.options.playpauseText+'"></button></div>').appendTo(c).click(function(h){h.preventDefault();d.paused?d.play():d.pause();return false});d.addEventListener("play",function(){e.removeClass("mejs-play").addClass("mejs-pause")},false);
  509. d.addEventListener("playing",function(){e.removeClass("mejs-play").addClass("mejs-pause")},false);d.addEventListener("pause",function(){e.removeClass("mejs-pause").addClass("mejs-play")},false);d.addEventListener("paused",function(){e.removeClass("mejs-pause").addClass("mejs-play")},false)}})})(mejs.$);
  510. (function(f){f.extend(mejs.MepDefaults,{stopText:"Stop"});f.extend(MediaElementPlayer.prototype,{buildstop:function(a,c,b,d){f('<div class="mejs-button mejs-stop-button mejs-stop"><button type="button" aria-controls="'+this.id+'" title="'+this.options.stopText+"></button></div>").appendTo(c).click(function(){d.paused||d.pause();if(d.currentTime>0){d.setCurrentTime(0);c.find(".mejs-time-current").width("0px");c.find(".mejs-time-handle").css("left","0px");c.find(".mejs-time-float-current").html(mejs.Utility.secondsToTimeCode(0));
  511. c.find(".mejs-currenttime").html(mejs.Utility.secondsToTimeCode(0));b.find(".mejs-poster").show()}})}})})(mejs.$);
  512. (function(f){f.extend(MediaElementPlayer.prototype,{buildprogress:function(a,c,b,d){f('<div class="mejs-time-rail"><span class="mejs-time-total"><span class="mejs-time-loaded"></span><span class="mejs-time-current"></span><span class="mejs-time-handle"></span><span class="mejs-time-float"><span class="mejs-time-float-current">00:00</span><span class="mejs-time-float-corner"></span></span></span></div>').appendTo(c);var e=c.find(".mejs-time-total");b=c.find(".mejs-time-loaded");var h=c.find(".mejs-time-current"),
  513. j=c.find(".mejs-time-handle"),i=c.find(".mejs-time-float"),k=c.find(".mejs-time-float-current"),n=function(g){g=g.pageX;var m=e.offset(),q=e.outerWidth(),o=0;o=0;if(g>m.left&&g<=q+m.left&&d.duration){o=(g-m.left)/q;o=o<=0.02?0:o*d.duration;l&&d.setCurrentTime(o);i.css("left",g-m.left);k.html(mejs.Utility.secondsToTimeCode(o))}},l=false,r=false;e.bind("mousedown",function(g){if(g.which===1){l=true;n(g);return false}});c.find(".mejs-time-total").bind("mouseenter",function(){r=true}).bind("mouseleave",
  514. function(){r=false});f(document).bind("mouseup",function(){l=false}).bind("mousemove",function(g){if(l||r)n(g)});d.addEventListener("progress",function(g){a.setProgressRail(g);a.setCurrentRail(g)},false);d.addEventListener("timeupdate",function(g){a.setProgressRail(g);a.setCurrentRail(g)},false);this.loaded=b;this.total=e;this.current=h;this.handle=j},setProgressRail:function(a){var c=a!=undefined?a.target:this.media,b=null;if(c&&c.buffered&&c.buffered.length>0&&c.buffered.end&&c.duration)b=c.buffered.end(0)/
  515. c.duration;else if(c&&c.bytesTotal!=undefined&&c.bytesTotal>0&&c.bufferedBytes!=undefined)b=c.bufferedBytes/c.bytesTotal;else if(a&&a.lengthComputable&&a.total!=0)b=a.loaded/a.total;if(b!==null){b=Math.min(1,Math.max(0,b));this.loaded&&this.total&&this.loaded.width(this.total.width()*b)}},setCurrentRail:function(){if(this.media.currentTime!=undefined&&this.media.duration)if(this.total&&this.handle){var a=this.total.width()*this.media.currentTime/this.media.duration,c=a-this.handle.outerWidth(true)/
  516. 2;this.current.width(a);this.handle.css("left",c)}}})})(mejs.$);
  517. (function(f){f.extend(mejs.MepDefaults,{duration:-1});f.extend(MediaElementPlayer.prototype,{buildcurrent:function(a,c,b,d){f('<div class="mejs-time"><span class="mejs-currenttime">'+(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00")+"</span></div>").appendTo(c);this.currenttime=this.controls.find(".mejs-currenttime");d.addEventListener("timeupdate",function(){a.updateCurrent()},false)},buildduration:function(a,c,b,d){if(c.children().last().find(".mejs-currenttime").length>
  518. 0)f(' <span> | </span> <span class="mejs-duration">'+(this.options.duration>0?mejs.Utility.secondsToTimeCode(this.options.duration,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25):(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00"))+"</span>").appendTo(c.find(".mejs-time"));else{c.find(".mejs-currenttime").parent().addClass("mejs-currenttime-container");f('<div class="mejs-time mejs-duration-container"><span class="mejs-duration">'+
  519. (this.options.duration>0?mejs.Utility.secondsToTimeCode(this.options.duration,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25):(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00"))+"</span></div>").appendTo(c)}this.durationD=this.controls.find(".mejs-duration");d.addEventListener("timeupdate",function(){a.updateDuration()},false)},updateCurrent:function(){if(this.currenttime)this.currenttime.html(mejs.Utility.secondsToTimeCode(this.media.currentTime,
  520. this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25))},updateDuration:function(){if(this.media.duration&&this.durationD)this.durationD.html(mejs.Utility.secondsToTimeCode(this.media.duration,this.options.alwaysShowHours,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25))}})})(mejs.$);
  521. (function(f){f.extend(mejs.MepDefaults,{muteText:"Mute Toggle"});f.extend(MediaElementPlayer.prototype,{buildvolume:function(a,c,b,d){var e=f('<div class="mejs-button mejs-volume-button mejs-mute"><button type="button" aria-controls="'+this.id+'" title="'+this.options.muteText+'"></button><div class="mejs-volume-slider"><div class="mejs-volume-total"></div><div class="mejs-volume-current"></div><div class="mejs-volume-handle"></div></div></div>').appendTo(c),h=e.find(".mejs-volume-slider"),j=e.find(".mejs-volume-total"),
  522. i=e.find(".mejs-volume-current"),k=e.find(".mejs-volume-handle"),n=function(g){if(h.is(":visible")){var m=j.height(),q=j.position();g=m-m*g;k.css("top",q.top+g-k.height()/2);i.height(m-g);i.css("top",q.top+g)}else{h.show();n(g);h.hide()}},l=function(g){var m=j.height(),q=j.offset(),o=parseInt(j.css("top").replace(/px/,""),10);g=g.pageY-q.top;var p=(m-g)/m;if(q.top!=0){p=Math.max(0,p);p=Math.min(p,1);if(g<0)g=0;else if(g>m)g=m;k.css("top",g-k.height()/2+o);i.height(m-g);i.css("top",g+o);if(p==0){d.setMuted(true);
  523. e.removeClass("mejs-mute").addClass("mejs-unmute")}else{d.setMuted(false);e.removeClass("mejs-unmute").addClass("mejs-mute")}p=Math.max(0,p);p=Math.min(p,1);d.setVolume(p)}},r=false;e.hover(function(){h.show()},function(){h.hide()});h.bind("mousedown",function(g){l(g);r=true;return false});f(document).bind("mouseup",function(){r=false}).bind("mousemove",function(g){r&&l(g)});e.find("button").click(function(){d.setMuted(!d.muted)});d.addEventListener("volumechange",function(g){if(!r)if(d.muted){n(0);
  524. e.removeClass("mejs-mute").addClass("mejs-unmute")}else{n(g.target.volume);e.removeClass("mejs-unmute").addClass("mejs-mute")}},true);n(a.options.startVolume);d.pluginType==="native"&&d.setVolume(a.options.startVolume)}})})(mejs.$);
  525. (function(f){f.extend(mejs.MepDefaults,{forcePluginFullScreen:false,newWindowCallback:function(){return""},fullscreenText:"Fullscreen"});f.extend(MediaElementPlayer.prototype,{isFullScreen:false,docStyleOverflow:null,isInIframe:false,buildfullscreen:function(a,c){if(a.isVideo){a.isInIframe=window.location!=window.parent.location;mejs.MediaFeatures.hasTrueNativeFullScreen&&a.container.bind("webkitfullscreenchange",function(){mejs.MediaFeatures.isFullScreen()?a.setControlsSize():a.exitFullScreen()});
  526. var b=this,d=f('<div class="mejs-button mejs-fullscreen-button"><button type="button" aria-controls="'+b.id+'" title="'+b.options.fullscreenText+'"></button></div>').appendTo(c).click(function(){mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen()||a.isFullScreen?a.exitFullScreen():a.enterFullScreen()});a.fullscreenBtn=d;f(document).bind("keydown",function(e){if((mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen()||b.isFullScreen)&&e.keyCode==27)a.exitFullScreen()})}},
  527. enterFullScreen:function(){var a=this;if(a.media.pluginType!=="native"&&(mejs.MediaFeatures.isGecko||a.options.forcePluginFullScreen))a.media.setFullscreen(true);else{docStyleOverflow=document.documentElement.style.overflow;document.documentElement.style.overflow="hidden";normalHeight=a.container.height();normalWidth=a.container.width();if(mejs.MediaFeatures.hasTrueNativeFullScreen)mejs.MediaFeatures.requestFullScreen(a.container[0]);else if(mejs.MediaFeatures.hasSemiNativeFullScreen){a.media.webkitEnterFullscreen();
  528. return}if(a.isInIframe&&a.options.newWindowUrl!==""){a.pause();var c=a.options.newWindowCallback(this);c!==""&&window.open(c,a.id,"top=0,left=0,width="+screen.availWidth+",height="+screen.availHeight+",resizable=yes,scrollbars=no,status=no,toolbar=no")}else{a.container.addClass("mejs-container-fullscreen").width("100%").height("100%");mejs.MediaFeatures.hasTrueNativeFullScreen&&setTimeout(function(){a.container.css({width:"100%",height:"100%"})},500);if(a.pluginType==="native")a.$media.width("100%").height("100%");
  529. else{a.container.find("object embed").width("100%").height("100%");a.media.setVideoSize(f(window).width(),f(window).height())}a.layers.children("div").width("100%").height("100%");a.fullscreenBtn&&a.fullscreenBtn.removeClass("mejs-fullscreen").addClass("mejs-unfullscreen");a.setControlsSize();a.isFullScreen=true}}},exitFullScreen:function(){if(this.media.pluginType!=="native"&&mejs.MediaFeatures.isFirefox)this.media.setFullscreen(false);else{if(mejs.MediaFeatures.hasTrueNativeFullScreen&&(mejs.MediaFeatures.isFullScreen()||
  530. this.isFullScreen))mejs.MediaFeatures.cancelFullScreen();document.documentElement.style.overflow=docStyleOverflow;this.container.removeClass("mejs-container-fullscreen").width(normalWidth).height(normalHeight);if(this.pluginType==="native")this.$media.width(normalWidth).height(normalHeight);else{this.container.find("object embed").width(normalWidth).height(normalHeight);this.media.setVideoSize(normalWidth,normalHeight)}this.layers.children("div").width(normalWidth).height(normalHeight);this.fullscreenBtn.removeClass("mejs-unfullscreen").addClass("mejs-fullscreen");
  531. this.setControlsSize();this.isFullScreen=false}}})})(mejs.$);
  532. (function(f){f.extend(mejs.MepDefaults,{startLanguage:"",translations:[],translationSelector:false,googleApiKey:"",tracksText:"Captions/Subtitles"});f.extend(MediaElementPlayer.prototype,{hasChapters:false,buildtracks:function(a,c,b,d){if(a.isVideo)if(a.tracks.length!=0){var e,h="";a.chapters=f('<div class="mejs-chapters mejs-layer"></div>').prependTo(b).hide();a.captions=f('<div class="mejs-captions-layer mejs-layer"><div class="mejs-captions-position"><span class="mejs-captions-text"></span></div></div>').prependTo(b).hide();a.captionsText=
  533. a.captions.find(".mejs-captions-text");a.captionsButton=f('<div class="mejs-button mejs-captions-button"><button type="button" aria-controls="'+this.id+'" title="'+this.options.tracksText+'"></button><div class="mejs-captions-selector"><ul><li><input type="radio" name="'+a.id+'_captions" id="'+a.id+'_captions_none" value="none" checked="checked" /><label for="'+a.id+'_captions_none">None</label></li></ul></div></div>').appendTo(c).hover(function(){f(this).find(".mejs-captions-selector").css("visibility",
  534. "visible")},function(){f(this).find(".mejs-captions-selector").css("visibility","hidden")}).delegate("input[type=radio]","click",function(){lang=this.value;if(lang=="none")a.selectedTrack=null;else for(e=0;e<a.tracks.length;e++)if(a.tracks[e].srclang==lang){a.selectedTrack=a.tracks[e];a.captions.attr("lang",a.selectedTrack.srclang);a.displayCaptions();break}});a.options.alwaysShowControls?a.container.find(".mejs-captions-position").addClass("mejs-captions-position-hover"):a.container.bind("mouseenter",
  535. function(){a.container.find(".mejs-captions-position").addClass("mejs-captions-position-hover")}).bind("mouseleave",function(){d.paused||a.container.find(".mejs-captions-position").removeClass("mejs-captions-position-hover")});a.trackToLoad=-1;a.selectedTrack=null;a.isLoadingTrack=false;if(a.tracks.length>0&&a.options.translations.length>0)for(e=0;e<a.options.translations.length;e++)a.tracks.push({srclang:a.options.translations[e].toLowerCase(),src:null,kind:"subtitles",entries:[],isLoaded:false,
  536. isTranslation:true});for(e=0;e<a.tracks.length;e++)a.tracks[e].kind=="subtitles"&&a.addTrackButton(a.tracks[e].srclang,a.tracks[e].isTranslation);a.loadNextTrack();d.addEventListener("timeupdate",function(){a.displayCaptions()},false);d.addEventListener("loadedmetadata",function(){a.displayChapters()},false);a.container.hover(function(){if(a.hasChapters){a.chapters.css("visibility","visible");a.chapters.fadeIn(200)}},function(){a.hasChapters&&!d.paused&&a.chapters.fadeOut(200,function(){f(this).css("visibility",
  537. "hidden");f(this).css("display","block")})});a.node.getAttribute("autoplay")!==null&&a.chapters.css("visibility","hidden");if(a.options.translationSelector){for(e in mejs.language.codes)h+='<option value="'+e+'">'+mejs.language.codes[e]+"</option>";a.container.find(".mejs-captions-selector ul").before(f('<select class="mejs-captions-translations"><option value="">--Add Translation--</option>'+h+"</select>"));a.container.find(".mejs-captions-translations").change(function(){lang=f(this).val();if(lang!=
  538. ""){a.tracks.push({srclang:lang,src:null,entries:[],isLoaded:false,isTranslation:true});if(!a.isLoadingTrack){a.trackToLoad--;a.addTrackButton(lang,true);a.options.startLanguage=lang;a.loadNextTrack()}}})}}},loadNextTrack:function(){this.trackToLoad++;if(this.trackToLoad<this.tracks.length){this.isLoadingTrack=true;this.loadTrack(this.trackToLoad)}else this.isLoadingTrack=false},loadTrack:function(a){var c=this,b=c.tracks[a],d=function(){b.isLoaded=true;c.enableTrackButton(b.srclang);c.loadNextTrack()};
  539. b.isTranslation?mejs.TrackFormatParser.translateTrackText(c.tracks[0].entries,c.tracks[0].srclang,b.srclang,c.options.googleApiKey,function(e){b.entries=e;d()}):f.ajax({url:b.src,success:function(e){b.entries=mejs.TrackFormatParser.parse(e);d();b.kind=="chapters"&&c.media.duration>0&&c.drawChapters(b)},error:function(){c.loadNextTrack()}})},enableTrackButton:function(a){this.captionsButton.find("input[value="+a+"]").prop("disabled",false).siblings("label").html(mejs.language.codes[a]||a);this.options.startLanguage==
  540. a&&f("#"+this.id+"_captions_"+a).click();this.adjustLanguageBox()},addTrackButton:function(a,c){var b=mejs.language.codes[a]||a;this.captionsButton.find("ul").append(f('<li><input type="radio" name="'+this.id+'_captions" id="'+this.id+"_captions_"+a+'" value="'+a+'" disabled="disabled" /><label for="'+this.id+"_captions_"+a+'">'+b+(c?" (translating)":" (loading)")+"</label></li>"));this.adjustLanguageBox();this.container.find(".mejs-captions-translations option[value="+a+"]").remove()},adjustLanguageBox:function(){this.captionsButton.find(".mejs-captions-selector").height(this.captionsButton.find(".mejs-captions-selector ul").outerHeight(true)+
  541. this.captionsButton.find(".mejs-captions-translations").outerHeight(true))},displayCaptions:function(){if(typeof this.tracks!="undefined"){var a,c=this.selectedTrack;if(c!=null&&c.isLoaded)for(a=0;a<c.entries.times.length;a++)if(this.media.currentTime>=c.entries.times[a].start&&this.media.currentTime<=c.entries.times[a].stop){this.captionsText.html(c.entries.text[a]);this.captions.show();return}this.captions.hide()}},displayChapters:function(){var a;for(a=0;a<this.tracks.length;a++)if(this.tracks[a].kind==
  542. "chapters"&&this.tracks[a].isLoaded){this.drawChapters(this.tracks[a]);this.hasChapters=true;break}},drawChapters:function(a){var c=this,b,d,e=d=0;c.chapters.empty();for(b=0;b<a.entries.times.length;b++){d=a.entries.times[b].stop-a.entries.times[b].start;d=Math.floor(d/c.media.duration*100);if(d+e>100||b==a.entries.times.length-1&&d+e<100)d=100-e;c.chapters.append(f('<div class="mejs-chapter" rel="'+a.entries.times[b].start+'" style="left: '+e.toString()+"%;width: "+d.toString()+'%;"><div class="mejs-chapter-block'+
  543. (b==a.entries.times.length-1?" mejs-chapter-block-last":"")+'"><span class="ch-title">'+a.entries.text[b]+'</span><span class="ch-time">'+mejs.Utility.secondsToTimeCode(a.entries.times[b].start)+"&ndash;"+mejs.Utility.secondsToTimeCode(a.entries.times[b].stop)+"</span></div></div>"));e+=d}c.chapters.find("div.mejs-chapter").click(function(){c.media.setCurrentTime(parseFloat(f(this).attr("rel")));c.media.paused&&c.media.play()});c.chapters.show()}});mejs.language={codes:{af:"Afrikaans",sq:"Albanian",
  544. ar:"Arabic",be:"Belarusian",bg:"Bulgarian",ca:"Catalan",zh:"Chinese","zh-cn":"Chinese Simplified","zh-tw":"Chinese Traditional",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch",en:"English",et:"Estonian",tl:"Filipino",fi:"Finnish",fr:"French",gl:"Galician",de:"German",el:"Greek",ht:"Haitian Creole",iw:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",ga:"Irish",it:"Italian",ja:"Japanese",ko:"Korean",lv:"Latvian",lt:"Lithuanian",mk:"Macedonian",ms:"Malay",mt:"Maltese",no:"Norwegian",
  545. fa:"Persian",pl:"Polish",pt:"Portuguese",ro:"Romanian",ru:"Russian",sr:"Serbian",sk:"Slovak",sl:"Slovenian",es:"Spanish",sw:"Swahili",sv:"Swedish",tl:"Tagalog",th:"Thai",tr:"Turkish",uk:"Ukrainian",vi:"Vietnamese",cy:"Welsh",yi:"Yiddish"}};mejs.TrackFormatParser={pattern_identifier:/^([a-zA-z]+-)?[0-9]+$/,pattern_timecode:/^([0-9]{2}:[0-9]{2}:[0-9]{2}([,.][0-9]{1,3})?) --\> ([0-9]{2}:[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/,split2:function(a,c){return a.split(c)},parse:function(a){var c=0;a=this.split2(a,
  546. /\r?\n/);for(var b={text:[],times:[]},d,e;c<a.length;c++)if(this.pattern_identifier.exec(a[c])){c++;if((d=this.pattern_timecode.exec(a[c]))&&c<a.length){c++;e=a[c];for(c++;a[c]!==""&&c<a.length;){e=e+"\n"+a[c];c++}b.text.push(e);b.times.push({start:mejs.Utility.timeCodeToSeconds(d[1]),stop:mejs.Utility.timeCodeToSeconds(d[3]),settings:d[5]})}}return b},translateTrackText:function(a,c,b,d,e){var h={text:[],times:[]},j,i;this.translateText(a.text.join(" <a></a>"),c,b,d,function(k){j=k.split("<a></a>");
  547. for(i=0;i<a.text.length;i++){h.text[i]=j[i];h.times[i]={start:a.times[i].start,stop:a.times[i].stop,settings:a.times[i].settings}}e(h)})},translateText:function(a,c,b,d,e){for(var h,j=[],i,k="",n=function(){if(j.length>0){i=j.shift();mejs.TrackFormatParser.translateChunk(i,c,b,d,function(l){if(l!="undefined")k+=l;n()})}else e(k)};a.length>0;)if(a.length>1E3){h=a.lastIndexOf(".",1E3);j.push(a.substring(0,h));a=a.substring(h+1)}else{j.push(a);a=""}n()},translateChunk:function(a,c,b,d,e){a={q:a,langpair:c+
  548. "|"+b,v:"1.0"};if(d!==""&&d!==null)a.key=d;f.ajax({url:"https://ajax.googleapis.com/ajax/services/language/translate",data:a,type:"GET",dataType:"jsonp",success:function(h){e(h.responseData.translatedText)},error:function(){e(null)}})}};if("x\n\ny".split(/\n/gi).length!=3)mejs.TrackFormatParser.split2=function(a,c){var b=[],d="",e;for(e=0;e<a.length;e++){d+=a.substring(e,e+1);if(c.test(d)){b.push(d.replace(c,""));d=""}}b.push(d);return b}})(mejs.$);
  549. (function(f){f.extend(mejs.MepDefaults,contextMenuItems=[{render:function(a){if(typeof a.enterFullScreen=="undefined")return null;return a.isFullScreen?"Turn off Fullscreen":"Go Fullscreen"},click:function(a){a.isFullScreen?a.exitFullScreen():a.enterFullScreen()}},{render:function(a){return a.media.muted?"Unmute":"Mute"},click:function(a){a.media.muted?a.setMuted(false):a.setMuted(true)}},{isSeparator:true},{render:function(){return"Download Video"},click:function(a){window.location.href=a.media.currentSrc}}]);
  550. f.extend(MediaElementPlayer.prototype,{buildcontextmenu:function(a){a.contextMenu=f('<div class="mejs-contextmenu"></div>').appendTo(f("body")).hide();a.container.bind("contextmenu",function(c){if(a.isContextMenuEnabled){c.preventDefault();a.renderContextMenu(c.clientX-1,c.clientY-1);return false}});a.container.bind("click",function(){a.contextMenu.hide()});a.contextMenu.bind("mouseleave",function(){a.startContextMenuTimer()})},isContextMenuEnabled:true,enableContextMenu:function(){this.isContextMenuEnabled=
  551. true},disableContextMenu:function(){this.isContextMenuEnabled=false},contextMenuTimeout:null,startContextMenuTimer:function(){var a=this;a.killContextMenuTimer();a.contextMenuTimer=setTimeout(function(){a.hideContextMenu();a.killContextMenuTimer()},750)},killContextMenuTimer:function(){var a=this.contextMenuTimer;if(a!=null){clearTimeout(a);delete a}},hideContextMenu:function(){this.contextMenu.hide()},renderContextMenu:function(a,c){for(var b=this,d="",e=b.options.contextMenuItems,h=0,j=e.length;h<
  552. j;h++)if(e[h].isSeparator)d+='<div class="mejs-contextmenu-separator"></div>';else{var i=e[h].render(b);if(i!=null)d+='<div class="mejs-contextmenu-item" data-itemindex="'+h+'" id="element-'+Math.random()*1E6+'">'+i+"</div>"}b.contextMenu.empty().append(f(d)).css({top:c,left:a}).show();b.contextMenu.find(".mejs-contextmenu-item").each(function(){var k=f(this),n=parseInt(k.data("itemindex"),10),l=b.options.contextMenuItems[n];typeof l.show!="undefined"&&l.show(k,b);k.click(function(){typeof l.click!=
  553. "undefined"&&l.click(b);b.contextMenu.hide()})});setTimeout(function(){b.killControlsTimer("rev3")},100)}})})(mejs.$);