(function(e){var t=Function.prototype.call,n=Array.prototype,r=Object.prototype,i=n.slice,s,o;Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if(typeof t!="function")throw new TypeError;var n=i.call(arguments,1),r=function(){if(this instanceof r){var s=function(){};s.prototype=t.prototype;var o=new s,u=t.apply(o,n.concat(i.call(arguments)));return u!==null&&Object(u)===u?u:o}return t.apply(e,n.concat(i.call(arguments)))};return r}),o=t.bind(r.toString),s=t.bind(r.hasOwnProperty),Array.isArray||(Array.isArray=function(e){return o(e)=="[object Array]"}),Array.prototype.forEach||(Array.prototype.forEach=function(e){var t=b(this),n=arguments[1],r=0,i=t.length>>>0;if(o(e)!="[object Function]")throw new TypeError;while(r>>0,r=Array(n),i=arguments[1];if(o(e)!="[object Function]")throw new TypeError;for(var s=0;s>>0,r=[],i=arguments[1];if(o(e)!="[object Function]")throw new TypeError;for(var s=0;s>>0,r=arguments[1];if(o(e)!="[object Function]")throw new TypeError;for(var i=0;i>>0,r=arguments[1];if(o(e)!="[object Function]")throw new TypeError;for(var i=0;i>>0;if(o(e)!="[object Function]")throw new TypeError;if(!n&&arguments.length==1)throw new TypeError;var r=0,i;if(arguments.length>=2)i=arguments[1];else do{if(r in t){i=t[r++];break}if(++r>=n)throw new TypeError}while(!0);for(;r>>0;if(o(e)!="[object Function]")throw new TypeError;if(!n&&arguments.length==1)throw new TypeError;var r,i=n-1;if(arguments.length>=2)r=arguments[1];else do{if(i in t){r=t[i--];break}if(--i<0)throw new TypeError}while(!0);do i in this&&(r=e.call(void 0,r,t[i],i,t));while(i--);return r}),Array.prototype.indexOf||(Array.prototype.indexOf=function(e){var t=b(this),n=t.length>>>0;if(!n)return-1;var r=0;arguments.length>1&&(r=g(arguments[1])),r=r>=0?r:n-Math.abs(r);for(;r>>0;if(!n)return-1;var r=n-1;arguments.length>1&&(r=g(arguments[1])),r=r>=0?r:n-Math.abs(r);for(;r>=0;r--)if(r in t&&e===t[r])return r;return-1});if([1,2].splice(0).length!=2){var u=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?u.apply(this,[e===void 0?0:e,t===void 0?this.length-e:t].concat(i.call(arguments,2))):[]}}if(!Object.keys){var a=!0,f=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=f.length;for(var c in{toString:null})a=!1;Object.keys=function w(e){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError("Object.keys called on a non-object");var w=[];for(var t in e)s(e,t)&&w.push(t);if(a)for(var n=0,r=l;n0||-1)*Math.floor(Math.abs(e))),e},y="a"[0]!="a",b=function(e){if(e==null)throw new TypeError;return y&&typeof e=="string"&&e?e.split(""):Object(e)}})(),function(e,t){var n="defineProperty",r=!!(Object.create&&Object.defineProperties&&Object.getOwnPropertyDescriptor);r&&!e.browser.msie&&Object[n]&&Object.prototype.__defineGetter__&&function(){try{var e=document.createElement("foo");Object[n](e,"bar",{get:function(){return!0}}),r=!!e.bar}catch(t){r=!1}e=null}(),Modernizr.objectAccessor=!!(r||Object.prototype.__defineGetter__&&Object.prototype.__lookupSetter__)&&(!e.browser.opera||t.browserVersion>=11),Modernizr.advancedObjectProperties=r;if(!r||!Object.create||!Object.defineProperties||!Object.getOwnPropertyDescriptor||!Object.defineProperty){var i=Function.prototype.call,s=Object.prototype,o=i.bind(s.hasOwnProperty);t.objectCreate=function(e,n,r,i){var s,o=function(){};return o.prototype=e,s=new o,!i&&!("__proto__"in s)&&!Modernizr.objectAccessor&&(s.__proto__=e),n&&t.defineProperties(s,n),r&&(s.options=jQuery.extend(!0,{},s.options||{},r),r=s.options),s._create&&jQuery.isFunction(s._create)&&s._create(r),s},t.defineProperties=function(e,n){for(var r in n)o(n,r)&&t.defineProperty(e,r,n[r]);return e};var u=["configurable","enumerable","writable"];t.defineProperty=function(e,t,n){return typeof n!="object"||n===null?e:o(n,"value")?(e[t]=n.value,e):(e.__defineGetter__&&(typeof n.get=="function"&&e.__defineGetter__(t,n.get),typeof n.set=="function"&&e.__defineSetter__(t,n.set)),e)},t.getPrototypeOf=function(e){return Object.getPrototypeOf&&Object.getPrototypeOf(e)||e.__proto__||e.constructor&&e.constructor.prototype},t.getOwnPropertyDescriptor=function(e,t){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError("Object.getOwnPropertyDescriptor called on a non-object");var n;if(Object.defineProperty&&Object.getOwnPropertyDescriptor)try{return n=Object.getOwnPropertyDescriptor(e,t),n}catch(r){}n={configurable:!0,enumerable:!0,writable:!0,value:undefined};var i=e.__lookupGetter__&&e.__lookupGetter__(t),s=e.__lookupSetter__&&e.__lookupSetter__(t);if(!i&&!s){if(!o(e,t))return;return n.value=e[t],n}return delete n.writable,delete n.value,n.get=n.set=undefined,i&&(n.get=i),s&&(n.set=s),n}}}(jQuery,jQuery.webshims),jQuery.webshims.register("dom-extend",function(e,t,n,r,i){"use strict";var s=t.modules,o=/\s*,\s*/,u={},a={},f={},l={},c={},h=e.fn.val,p=function(t,n,r,i,s){return s?h.call(e(t)):h.call(e(t),r)};e.fn.val=function(t){var n=this[0];arguments.length&&t==null&&(t="");if(!arguments.length)return!n||n.nodeType!==1?h.call(this):e.prop(n,"value",t,"val",!0);if(e.isArray(t))return h.apply(this,arguments);var r=e.isFunction(t);return this.each(function(s){n=this;if(n.nodeType===1)if(r){var o=t.call(n,s,e.prop(n,"value",i,"val",!0));o==null&&(o=""),e.prop(n,"value",o,"val")}else e.prop(n,"value",t,"val")})};var d="_webshimsLib"+Math.round(Math.random()*1e3),v=function(t,n,r){t=t.jquery?t[0]:t;if(!t)return r||{};var s=e.data(t,d);return r!==i&&(s||(s=e.data(t,d,{})),n&&(s[n]=r)),n?s&&s[n]:s};[{name:"getNativeElement",prop:"nativeElement"},{name:"getShadowElement",prop:"shadowElement"},{name:"getShadowFocusElement",prop:"shadowFocusElement"}].forEach(function(t){e.fn[t.name]=function(){return this.map(function(){var e=v(this,"shadowData");return e&&e[t.prop]||this})}}),["removeAttr","prop","attr"].forEach(function(n){u[n]=e[n],e[n]=function(t,r,s,o,l){var h=o=="val",d=h?p:u[n];if(!t||!a[r]||t.nodeType!==1||!h&&o&&n=="attr"&&e.attrFn[r])return d(t,r,s,o,l);var v=(t.nodeName||"").toLowerCase(),m=f[v],g=n!="attr"||s!==!1&&s!==null?n:"removeAttr",y,b,w;m||(m=f["*"]),m&&(m=m[r]),m&&(y=m[g]);if(y){r=="value"&&(b=y.isVal,y.isVal=h);if(g==="removeAttr")return y.value.call(t);if(s===i)return y.get?y.get.call(t):y.value;y.set&&(n=="attr"&&s===!0&&(s=r),w=y.set.call(t,s)),r=="value"&&(y.isVal=b)}else w=d(t,r,s,o,l);if((s!==i||g==="removeAttr")&&c[v]&&c[v][r]){var E;g=="removeAttr"?E=!1:g=="prop"?E=!!s:E=!0,c[v][r].forEach(function(e){(!e.only||(e.only=n=="prop")||e.only=="attr"&&n!="prop")&&e.call(t,s,E,h?"val":g,n)})}return w},l[n]=function(r,s,o){f[r]||(f[r]={}),f[r][s]||(f[r][s]={});var a=f[r][s][n],l=function(e,t,r){return t&&t[e]?t[e]:r&&r[e]?r[e]:n=="prop"&&s=="value"?function(e){var t=this;return o.isVal?p(t,s,e,!1,arguments.length===0):u[n](t,s,e)}:n=="prop"&&e=="value"&&o.value.apply?function(e){var t=u[n](this,s);return t&&t.apply&&(t=t.apply(this,arguments)),t}:function(e){return u[n](this,s,e)}};f[r][s][n]=o,o.value===i&&(o.set||(o.set=o.writeable?l("set",o,a):t.cfg.useStrict&&s=="prop"?function(){throw s+" is readonly on "+r}:e.noop),o.get||(o.get=l("get",o,a))),["value","get","set"].forEach(function(e){o[e]&&(o["_sup"+e]=l(e,a))})}});var m=!e.browser.msie||parseInt(e.browser.version,10)>8,g=function(){var e=t.getPrototypeOf(r.createElement("foobar")),n=Object.prototype.hasOwnProperty;return function(i,s,o){var u=r.createElement(i),a=t.getPrototypeOf(u);if(m&&a&&e!==a&&(!u[s]||!n.call(u,s))){var f=u[s];o._supvalue=function(){return f&&f.apply?f.apply(this,arguments):f},a[s]=o.value}else o._supvalue=function(){var e=v(this,"propValue");return e&&e[s]&&e[s].apply?e[s].apply(this,arguments):e&&e[s]},y.extendValue(i,s,o.value);o.value._supvalue=o._supvalue}}(),y=function(){var n={};t.addReady(function(r,i){var s={},o=function(t){s[t]||(s[t]=e(r.getElementsByTagName(t)),i[0]&&e.nodeName(i[0],t)&&(s[t]=s[t].add(i)))};e.each(n,function(e,n){o(e);if(!n||!n.forEach){t.warn("Error: with "+e+"-property. methods: "+n);return}n.forEach(function(t){s[e].each(t)})}),s=null});var i,s=e([]),o=function(t,s){n[t]?n[t].push(s):n[t]=[s],e.isDOMReady&&(i||e(r.getElementsByTagName(t))).each(s)},u={};return{createTmpCache:function(t){return e.isDOMReady&&(i=i||e(r.getElementsByTagName(t))),i||s},flushTmpCache:function(){i=null},content:function(t,n){o(t,function(){var t=e.attr(this,n);t!=null&&e.attr(this,n,t)})},createElement:function(e,t){o(e,t)},extendValue:function(t,n,r){o(t,function(){e(this).each(function(){var e=v(this,"propValue",{});e[n]=this[n],this[n]=r})})}}}(),b=function(e,t){e.defaultValue===i&&(e.defaultValue=""),e.removeAttr||(e.removeAttr={value:function(){e[t||"prop"].set.call(this,e.defaultValue),e.removeAttr._supvalue.call(this)}}),e.attr||(e.attr={})};e.extend(t,{getID:function(){var t=(new Date).getTime();return function(n){n=e(n);var r=n.attr("id");return r||(t++,r="ID-"+t,n.attr("id",r)),r}}(),extendUNDEFProp:function(t,n){e.each(n,function(e,n){e in t||(t[e]=n)})},createPropDefault:b,data:v,moveToFirstEvent:function(t,n,r){var i=(e._data(t,"events")||{})[n],s;i&&i.length>1&&(s=i.pop(),r||(r="bind"),r=="bind"&&i.delegateCount?i.splice(i.delegateCount,0,s):i.unshift(s)),t=null},addShadowDom:function(){var i,s,o,u={init:!1,runs:0,test:function(){var e=u.getHeight(),t=u.getWidth();e!=u.height||t!=u.width?(u.height=e,u.width=t,u.handler({type:"docresize"}),u.runs++,u.runs<9&&setTimeout(u.test,90)):u.runs=0},handler:function(t){clearTimeout(i),i=setTimeout(function(){if(t.type=="resize"){var r=e(n).width(),i=e(n).width();if(i==s&&r==o)return;s=i,o=r,u.height=u.getHeight(),u.width=u.getWidth()}e.event.trigger("updateshadowdom")},t.type=="resize"?50:9)},_create:function(){e.each({Height:"getHeight",Width:"getWidth"},function(e,t){var n=r.body,i=r.documentElement;u[t]=function(){return Math.max(n["scroll"+e],i["scroll"+e],n["offset"+e],i["offset"+e],i["client"+e])}})},start:function(){!this.init&&r.body&&(this.init=!0,this._create(),this.height=u.getHeight(),this.width=u.getWidth(),setInterval(this.test,600),e(this.test),t.ready("WINDOWLOAD",this.test),e(n).bind("resize",this.handler),function(){var t=e.fn.animate,n;e.fn.animate=function(){return clearTimeout(n),n=setTimeout(function(){u.test()},99),t.apply(this,arguments)}}())}};return e.event.customEvent.updateshadowdom=!0,t.docObserve=function(){t.ready("DOM",function(){u.start()})},function(n,r,i){i=i||{},n.jquery&&(n=n[0]),r.jquery&&(r=r[0]);var s=e.data(n,d)||e.data(n,d,{}),o=e.data(r,d)||e.data(r,d,{}),u={};i.shadowFocusElement?i.shadowFocusElement&&(i.shadowFocusElement.jquery&&(i.shadowFocusElement=i.shadowFocusElement[0]),u=e.data(i.shadowFocusElement,d)||e.data(i.shadowFocusElement,d,u)):i.shadowFocusElement=r,s.hasShadow=r,u.nativeElement=o.nativeElement=n,u.shadowData=o.shadowData=s.shadowData={nativeElement:n,shadowElement:r,shadowFocusElement:i.shadowFocusElement},i.shadowChilds&&i.shadowChilds.each(function(){v(this,"shadowData",o.shadowData)}),i.data&&(u.shadowData.data=o.shadowData.data=s.shadowData.data=i.data),i=null,t.docObserve()}}(),propTypes:{standard:function(e,t){b(e);if(e.prop)return;e.prop={set:function(t){e.attr.set.call(this,""+t)},get:function(){return e.attr.get.call(this)||e.defaultValue}}},"boolean":function(e,t){b(e);if(e.prop)return;e.prop={set:function(t){t?e.attr.set.call(this,""):e.removeAttr.value.call(this)},get:function(){return e.attr.get.call(this)!=null}}},src:function(){var t=r.createElement("a");return t.style.display="none",function(n,r){b(n);if(n.prop)return;n.prop={set:function(e){n.attr.set.call(this,e)},get:function(){var n=this.getAttribute(r),i;if(n==null)return"";t.setAttribute("href",n+"");if(!e.support.hrefNormalized){try{e(t).insertAfter(this),i=t.getAttribute("href",4)}catch(s){i=t.getAttribute("href",4)}e(t).detach()}return i||t.href}}}}(),enumarated:function(e,t){b(e);if(e.prop)return;e.prop={set:function(t){e.attr.set.call(this,t)},get:function(){var t=(e.attr.get.call(this)||"").toLowerCase();if(!t||e.limitedTo.indexOf(t)==-1)t=e.defaultValue;return t}}}},reflectProperties:function(n,r){typeof r=="string"&&(r=r.split(o)),r.forEach(function(r){t.defineNodeNamesProperty(n,r,{prop:{set:function(t){e.attr(this,r,t)},get:function(){return e.attr(this,r)||""}}})})},defineNodeNameProperty:function(n,r,i){return a[r]=!0,i.reflect&&t.propTypes[i.propType||"standard"](i,r),["prop","attr","removeAttr"].forEach(function(s){var o=i[s];o&&(s==="prop"?o=e.extend({writeable:!0},o):o=e.extend({},o,{writeable:!0}),l[s](n,r,o),n!="*"&&t.cfg.extendNative&&s=="prop"&&o.value&&e.isFunction(o.value)&&g(n,r,o),i[s]=o)}),i.initAttr&&y.content(n,r),i},defineNodeNameProperties:function(e,n,r,i){var s;for(var o in n)!i&&n[o].initAttr&&y.createTmpCache(e),r&&(n[o][r]||(n[o][r]={},["value","set","get"].forEach(function(e){e in n[o]&&(n[o][r][e]=n[o][e],delete n[o][e])}))),n[o]=t.defineNodeNameProperty(e,o,n[o]);return i||y.flushTmpCache(),n},createElement:function(n,r,i){var s;return e.isFunction(r)&&(r={after:r}),y.createTmpCache(n),r.before&&y.createElement(n,r.before),i&&(s=t.defineNodeNameProperties(n,i,!1,!0)),r.after&&y.createElement(n,r.after),y.flushTmpCache(),s},onNodeNamesPropertyModify:function(t,n,r,i){typeof t=="string"&&(t=t.split(o)),e.isFunction(r)&&(r={set:r}),t.forEach(function(e){c[e]||(c[e]={}),typeof n=="string"&&(n=n.split(o)),r.initAttr&&y.createTmpCache(e),n.forEach(function(t){c[e][t]||(c[e][t]=[],a[t]=!0),r.set&&(i&&(r.set.only=i),c[e][t].push(r.set)),r.initAttr&&y.content(e,t)}),y.flushTmpCache()})},defineNodeNamesBooleanProperty:function(n,r,s){s||(s={}),e.isFunction(s)&&(s.set=s),t.defineNodeNamesProperty(n,r,{attr:{set:function(e){this.setAttribute(r,e),s.set&&s.set.call(this,!0)},get:function(){var e=this.getAttribute(r);return e==null?i:r}},removeAttr:{value:function(){this.removeAttribute(r),s.set&&s.set.call(this,!1)}},reflect:!0,propType:"boolean",initAttr:s.initAttr||!1})},contentAttr:function(e,t,n){if(!e.nodeName)return;var r;if(n===i)return r=e.attributes[t]||{},n=r.specified?r.value:null,n==null?i:n;typeof n=="boolean"?n?e.setAttribute(t,t):e.removeAttribute(t):e.setAttribute(t,n)},activeLang:function(){var n=[],r={},i,o,u=/:\/\/|^\.*\//,a=function(n,r,i){var s;return r&&i&&e.inArray(r,i.availabeLangs||[])!==-1?(n.loading=!0,s=i.langSrc,u.test(s)||(s=t.cfg.basePath+s),t.loader.loadScript(s+r+".js",function(){n.langObj[r]?(n.loading=!1,l(n,!0)):e(function(){n.langObj[r]&&l(n,!0),n.loading=!1})}),!0):!1},f=function(e){r[e]&&r[e].forEach(function(e){e.callback()})},l=function(e,t){if(e.activeLang!=i&&e.activeLang!==o){var n=s[e.module].options;e.langObj[i]||o&&e.langObj[o]?(e.activeLang=i,e.callback(e.langObj[i]||e.langObj[o],i),f(e.module)):!t&&!a(e,i,n)&&!a(e,o,n)&&e.langObj[""]&&e.activeLang!==""&&(e.activeLang="",e.callback(e.langObj[""],i),f(e.module))}},c=function(t){return typeof t=="string"&&t!==i?(i=t,o=i.split("-")[0],i==o&&(o=!1),e.each(n,function(e,t){l(t)})):typeof t=="object"&&(t.register?(r[t.register]||(r[t.register]=[]),r[t.register].push(t),t.callback()):(t.activeLang||(t.activeLang=""),n.push(t),l(t))),i};return c}()}),e.each({defineNodeNamesProperty:"defineNodeNameProperty",defineNodeNamesProperties:"defineNodeNameProperties",createElements:"createElement"},function(e,n){t[e]=function(e,r,i,s){typeof e=="string"&&(e=e.split(o));var u={};return e.forEach(function(e){u[e]=t[n](e,r,i,s)}),u}}),t.isReady("webshimLocalization",!0)}),function(e,t){var n=e.webshims.browserVersion;if(e.browser.mozilla&&n>5)return;if(!e.browser.msie||n<12&&n>7){var r={article:"article",aside:"complementary",section:"region",nav:"navigation",address:"contentinfo"},i=function(e,t){var n=e.getAttribute("role");n||e.setAttribute("role",t)};e.webshims.addReady(function(n,s){e.each(r,function(t,r){var o=e(t,n).add(s.filter(t));for(var u=0,a=o.length;u")[0].readyState!="number");if(!s.track)try{new TextTrackCue(2,3,"")}catch(t){s.track=!0}var r=n.cfg.track,i=function(t){e(t.target).filter("track").each(o)},o=function(){if(s.track||!r.override&&e.prop(this,"readyState")==3)r.override=!0,n.reTest("track"),document.removeEventListener("error",i,!0),this&&e.nodeName(this,"track")?n.error("track support was overwritten. Please check your vtt including your vtt mime-type"):n.info("track support was overwritten. due to bad browser support")},u=function(){document.addEventListener("error",i,!0),s.track?o():e("track").each(o)};r.override||(n.isReady("track")?u():e(u))}(),n.register("mediaelement-core",function(e,n,l,c,h){f=swfobject.hasFlashPlayerVersion("9.0.115"),e("html").addClass(f?"swf":"no-swf");var p=n.mediaelement;p.parseRtmp=function(e){var t=e.src.split("://"),r=t[1].split("/"),i,s,o;e.server=t[0]+"://"+r[0]+"/",e.streamId=[];for(i=1,s=r.length;i8&&e.prop(this,"paused")&&!e.prop(this,"readyState")&&e(this).is('audio[preload="none"][controls]:not([autoplay])')?e(this).prop("preload","metadata").mediaLoad():x(this);if(r){var t,i,s=this,o=function(){var t=e.prop(s,"buffered");if(!t)return;var n="";for(var r=0,i=t.length;r0)return;try{t.duration=t.jwapi.getPlaylist()[0].duration;if(!t.duration||t.duration<=0||t.duration===t._lastDuration)t.duration=r}catch(i){}t.duration&&t.duration!=t._lastDuration?(w(t._elem,"durationchange"),(t._elemNodeName=="audio"||t._callMeta)&&u.jwEvents.Model.META(e.extend({duration:t.duration},n),t),t._durationCalcs--):t._durationCalcs++},T=function(e,t){e<3&&clearTimeout(t._canplaythroughTimer),e>=3&&t.readyState<3&&(t.readyState=e,w(t._elem,"canplay"),clearTimeout(t._canplaythroughTimer),t._canplaythroughTimer=setTimeout(function(){T(4,t)},4e3)),e>=4&&t.readyState<4&&(t.readyState=e,w(t._elem,"canplaythrough")),t.readyState=e};e.extend(e.event.customEvent,{updatemediaelementdimensions:!0,flashblocker:!0,swfstageresize:!0,mediaelementapichange:!0}),u.jwEvents={View:{PLAY:function(e){var t=y(e.id);if(!t||t.stopPlayPause)return;t._ppFlag=!0,t.paused==e.state&&(t.paused=!e.state,t.ended&&(t.ended=!1),w(t._elem,e.state?"play":"pause"))}},Model:{BUFFER:function(t){var n=y(t.id);if(!n||!("percentage"in t)||n._bufferedEnd==t.percentage)return;n.networkState=t.percentage==100?1:2,(isNaN(n.duration)||t.percentage>5&&t.percentage<25||t.percentage===100)&&x(n,t),n.ended&&(n.ended=!1);if(!n.duration)return;t.percentage>2&&t.percentage<20?T(3,n):t.percentage>20&&T(4,n),n._bufferedEnd&&n._bufferedEnd>t.percentage&&(n._bufferedStart=n.currentTime||0),n._bufferedEnd=t.percentage,n.buffered.length=1,t.percentage==100&&(n.networkState=1,T(4,n)),e.event.trigger("progress",i,n._elem,!0)},META:function(e,t){t=t&&t.networkState?t:y(e.id);if(!t)return;if(!("duration"in e)){t._callMeta=!0;return}if(t._metadata&&(!e.height||t.videoHeight==e.height)&&e.duration===t.duration)return;t._metadata=!0;var n=t.duration;e.duration&&(t.duration=e.duration),t._lastDuration=t.duration;if(e.height||e.width)t.videoHeight=e.height||0,t.videoWidth=e.width||0;t.networkState||(t.networkState=2),t.readyState<1&&T(1,t),t.duration&&n!==t.duration&&w(t._elem,"durationchange"),w(t._elem,"loadedmetadata")},TIME:function(e){var t=y(e.id);if(!t||t.currentTime===e.position)return;t.currentTime=e.position,t.duration&&t.durationn)n++,r=e.actionQueue.shift(),e.jwapi[r.fn].apply(e.jwapi,r.args);e.actionQueue.length&&(e.actionQueue=[])},k=function(t){if(!t)return;(t._ppFlag===i&&e.prop(t._elem,"autoplay")||!t.paused)&&setTimeout(function(){if(t.isActive=="third"&&(t._ppFlag===i||!t.paused))try{e(t._elem).play()}catch(n){}},1)};u.playerResize=function(t){if(!t)return;var n=r.getElementById(t.replace(g,""));n&&e(n).triggerHandler("swfstageresize"),n=null},e(r).on("emptied",function(e){var t=b(e.target);k(t)});var L;u.jwPlayerReady=function(n){var r=y(n.id),i=!0,s=0,o=function(){if(s>9)return;s++;if(N(r)){if(!r.wasSwfReady){var i=parseFloat(n.version,10);(i<5.1||i>=6)&&t.warn("mediaelement-swf is only testet with jwplayer 5.6+")}else e(r._elem).mediaLoad();r.wasSwfReady=!0,r.tryedReframeing=0,C(r),k(r)}else clearTimeout(r.reframeTimer),r.reframeTimer=setTimeout(o,9*s),s>2&&r.tryedReframeing<9&&(r.tryedReframeing++,r.shadowElem.css({overflow:"visible"}),setTimeout(function(){r.shadowElem.css({overflow:"hidden"})},16))};if(!r||!r.jwapi)return;r.tryedReframeing||(r.tryedReframeing=0),clearTimeout(L),r.jwData=n,r.shadowElem.removeClass("flashblocker-assumed"),e.prop(r._elem,"volume",r.volume),e.prop(r._elem,"muted",r.muted),o()};var A=e.noop;if(f){var O={play:1,playing:1},M=["play","pause","playing","canplay","progress","waiting","ended","loadedmetadata","durationchange","emptied"],_=M.map(function(e){return e+".webshimspolyfill"}).join(" "),D=function(n){var r=t.data(n.target,"mediaelement");if(!r)return;var i=n.originalEvent&&n.originalEvent.type===n.type;i==(r.activating=="third")&&(n.stopImmediatePropagation(),O[n.type]&&r.isActive!=r.activating&&e(n.target).pause())};A=function(n){e(n).off(_).on(_,D),M.forEach(function(e){t.moveToFirstEvent(n,e)})},A(r)}u.setActive=function(n,r,i){i||(i=t.data(n,"mediaelement"));if(!i||i.isActive==r)return;r!="html5"&&r!="third"&&t.warn("wrong type for mediaelement activating: "+r);var s=t.data(n,"shadowData");i.activating=r,e(n).pause(),i.isActive=r,r=="third"?(s.shadowElement=s.shadowFocusElement=i.shadowElem[0],e(n).addClass("swf-api-active nonnative-api-active").hide().getShadowElement().show()):(e(n).removeClass("swf-api-active nonnative-api-active").show().getShadowElement().hide(),s.shadowElement=s.shadowFocusElement=!1),e(n).trigger("mediaelementapichange")};var P=function(){var e=["_bufferedEnd","_bufferedStart","_metadata","_ppFlag","currentSrc","currentTime","duration","ended","networkState","paused","videoHeight","videoWidth","_callMeta","_durationCalcs"],t=e.length;return function(n){if(!n)return;var r=t,i=n.networkState;T(0,n);while(--r)delete n[e[r]];n.actionQueue=[],n.buffered.length=0,i&&w(n._elem,"emptied")}}(),H=function(t,n){var r=t._elem,i=t.shadowElem;e(r)[n?"addClass":"removeClass"]("webshims-controls"),t._elemNodeName=="audio"&&!n?i.css({width:0,height:0}):i.css({width:r.style.width||e(r).width(),height:r.style.height||e(r).height()})};u.createSWF=function(n,r,i){if(!l){setTimeout(function(){e(n).mediaLoad()},1);return}c<1?c=1:c++;var h=e.extend({},s.vars,{image:e.prop(n,"poster")||"",file:r.streamId||r.srcProp}),p=e(n).data("vars")||{};r.server&&(h.streamer=r.server),i||(i=t.data(n,"mediaelement"));if(i&&i.swfCreated){u.setActive(n,"third",i),P(i),i.currentSrc=r.srcProp,e.extend(h,p),s.changeSWF(h,n,r,i,"load"),B(n,o,["LOAD",h]);return}var d=e.prop(n,"controls"),v="jwplayer-"+t.getID(n),g=e.extend({},s.params,e(n).data("params")),y=n.nodeName.toLowerCase(),b=e.extend({},s.attrs,{name:v,id:v},e(n).data("attrs")),w=e('
').css({position:"relative",overflow:"hidden"});i=t.data(n,"mediaelement",t.objectCreate(m,{actionQueue:{value:[]},shadowElem:{value:w},_elemNodeName:{value:y},_elem:{value:n},currentSrc:{value:r.srcProp},swfCreated:{value:!0},buffered:{value:{start:function(e){if(e>=i.buffered.length){t.error("buffered index size error");return}return 0},end:function(e){if(e>=i.buffered.length){t.error("buffered index size error");return}return(i.duration-i._bufferedStart)*i._bufferedEnd/100+i._bufferedStart},length:0}}})),H(i,d),w.insertBefore(n),f&&e.extend(i,{volume:e.prop(n,"volume"),muted:e.prop(n,"muted")}),e.extend(h,{id:v,controlbar:d?s.vars.controlbar||(y=="video"?"over":"bottom"):y=="video"?"none":"bottom",icons:""+(d&&y=="video")},p,{playerready:"jQuery.webshims.mediaelement.jwPlayerReady"}),h.plugins?h.plugins+=","+S:h.plugins=S,t.addShadowDom(n,w),A(n),u.setActive(n,"third",i),s.changeSWF(h,n,r,i,"embed"),e(n).on("updatemediaelementdimensions updateshadowdom",function(){H(i,e.prop(n,"controls"))}),a.embedSWF(E,v,"100%","100%","9.0.0",!1,h,g,b,function(r){r.success&&(i.jwapi=r.ref,d||e(r.ref).attr("tabindex","-1").css("outline","none"),setTimeout(function(){if(!r.ref.parentNode&&w[0].parentNode||r.ref.style.display=="none")w.addClass("flashblocker-assumed"),e(n).trigger("flashblocker"),t.warn("flashblocker assumed");e(r.ref).css({minHeight:"2px",minWidth:"2px",display:"block"})},9),L||(clearTimeout(L),L=setTimeout(function(){var n=e(r.ref);n[0].offsetWidth>1&&n[0].offsetHeight>1&&location.protocol.indexOf("file:")===0?t.error("Add your local development-directory to the local-trusted security sandbox: http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html"):(n[0].offsetWidth<2||n[0].offsetHeight<2)&&t.warn("JS-SWF connection can't be established on hidden or unconnected flash objects"),n=null},8e3)))})};var B=function(e,t,n,r){return r=r||b(e),r?(r.jwapi&&r.jwapi[t]?r.jwapi[t].apply(r.jwapi,n||[]):(r.actionQueue.push({fn:t,args:n}),r.actionQueue.length>10&&setTimeout(function(){r.actionQueue.length>5&&r.actionQueue.shift()},99)),r):!1};["audio","video"].forEach(function(n){var r={},i,s=function(e){if(n=="audio"&&(e=="videoHeight"||e=="videoWidth"))return;r[e]={get:function(){var t=b(this);return t?t[e]:f&&i[e].prop._supget?i[e].prop._supget.apply(this):m[e]},writeable:!1}},u=function(e,t){s(e),delete r[e].writeable,r[e].set=t};u("volume",function(e){var n=b(this);if(n){e*=100;if(!isNaN(e)){var r=n.muted;(e<0||e>100)&&t.error("volume greater or less than allowed "+e/100),B(this,o,["VOLUME",e],n);if(r)try{n.jwapi.sendEvent("mute","true")}catch(s){}e/=100;if(n.volume==e||n.isActive!="third")return;n.volume=e,w(n._elem,"volumechange"),n=null}}else if(i.volume.prop._supset)return i.volume.prop._supset.apply(this,arguments)}),u("muted",function(e){var t=b(this);if(t){e=!!e,B(this,o,["mute",""+e],t);if(t.muted==e||t.isActive!="third")return;t.muted=e,w(t._elem,"volumechange"),t=null}else if(i.muted.prop._supset)return i.muted.prop._supset.apply(this,arguments)}),u("currentTime",function(e){var t=b(this);if(t){e*=1;if(!isNaN(e)){t.paused&&(clearTimeout(t.stopPlayPause),t.stopPlayPause=setTimeout(function(){t.paused=!0,t.stopPlayPause=!1},50)),B(this,o,["SEEK",""+e],t);if(t.paused){t.readyState>0&&(t.currentTime=e,w(t._elem,"timeupdate"));try{t.jwapi[o]("play","false")}catch(n){}}}}else if(i.currentTime.prop._supset)return i.currentTime.prop._supset.apply(this,arguments)}),["play","pause"].forEach(function(e){r[e]={value:function(){var t=b(this);if(t)t.stopPlayPause&&clearTimeout(t.stopPlayPause),B(this,o,["play",e=="play"],t),setTimeout(function(){t.isActive=="third"&&(t._ppFlag=!0,t.paused!=(e!="play")&&(t.paused=e!="play",w(t._elem,e)))},1);else if(i[e].prop._supvalue)return i[e].prop._supvalue.apply(this,arguments)}}}),p.forEach(s),t.onNodeNamesPropertyModify(n,"controls",function(r,i){var s=b(this);e(this)[i?"addClass":"removeClass"]("webshims-controls");if(s){try{B(this,i?"showControls":"hideControls",[n],s)}catch(o){t.warn("you need to generate a crossdomain.xml")}n=="audio"&&H(s,i),e(s.jwapi).attr("tabindex",i?"0":"-1")}}),i=t.defineNodeNameProperties(n,r,"prop")});if(l){var j=e.cleanData,F=e.browser.msie&&t.browserVersion<9,I={object:1,OBJECT:1};e.cleanData=function(e){var t,n,r;if(e&&(n=e.length)&&c)for(t=0;t"),l=Modernizr.ES5&&Modernizr.objectAccessor,c=function(e){var n={};return e.addEventListener=function(e,r){n[e]&&t.error("always use $.on to the shimed event: "+e+" already bound fn was: "+n[e]+" your fn was: "+r),n[e]=r},e.removeEventListener=function(e,r){n[e]&&n[e]!=r&&t.error("always use $.on/$.off to the shimed event: "+e+" already bound fn was: "+n[e]+" your fn was: "+r),n[e]&&delete n[e]},e},h={getCueById:function(e){var t=null;for(var n=0,r=this.length;ne.startTime&&t.error("cue startTime higher than previous cue's startTime")}e.track&&e.track.removeCue&&e.track.removeCue(e),e.track=this,this.cues.push(e)},removeCue:function(e){var n=this.cues||[],r=0,i=n.length;if(e.track!=this){t.error("cue not part of track");return}for(;r")[0];n.TextTrackCue=function(e,n,r){arguments.length!=3&&t.error("wrong arguments.length for TextTrackCue.constructor"),this.startTime=e,this.endTime=n,this.text=r,this.id="",this.pauseOnExit=!1,c(this)},n.TextTrackCue.prototype={onenter:null,onexit:null,pauseOnExit:!1,getCueAsHTML:function(){var e="",t="",n=r.createDocumentFragment(),i;return g(this,"getCueAsHTML")||(i=this.getCueAsHTML=function(){var r,i;if(e!=this.text){e=this.text,t=s.parseCueTextToHTML(e),w.innerHTML=t;for(r=0,i=w.childNodes.length;r]+>)/ig,t=/^(?:c|v|ruby|rt|b|i|u)/,n=/\<\s*\//,r=function(e,t,r,i){var s;return n.test(i)?s="":(r.splice(0,1),s="<"+e+" "+t+'="'+r.join(" ").replace(/\"/g,""")+'">'),s},i=function(e){var n=e.replace(/[<\/>]+/ig,"").split(/[\s\.]+/);return n[0]&&(n[0]=n[0].toLowerCase(),t.test(n[0])?n[0]=="c"?e=r("span","class",n,e):n[0]=="v"&&(e=r("q","title",n,e)):e=""),e};return function(t){return t.replace(e,i)}}(),s.loadTextTrack=function(n,r,i,o){var a="play playing timeupdate updatetrackdisplay",f=i.track,l=function(){var i=e.prop(r,"src"),o,u;if(f.mode!="disabled"&&i&&e.attr(r,"src")){e(n).unbind(a,l),e(r).unbind("checktrackmode",l);if(!f.readyState){o=function(){f.readyState=3,f.cues=null,f.activeCues=f.shimActiveCues=f._shimActiveCues=null,e(r).triggerHandler("error")},f.readyState=1;try{f.cues=s.createCueList(),f.activeCues=f.shimActiveCues=f._shimActiveCues=s.createCueList(),u=e.ajax({dataType:"text",url:i,success:function(i){u.getResponseHeader("content-type")!="text/vtt"&&t.error("set the mime-type of your WebVTT files to text/vtt. see: http://dev.w3.org/html5/webvtt/#text/vtt"),s.parseCaptions(i,f,function(t){t&&"length"in t?(f.readyState=2,e(r).triggerHandler("load"),e(n).triggerHandler("updatetrackdisplay")):o()})},error:o})}catch(c){o(),t.warn(c)}}}};f.readyState=0,f.shimActiveCues=null,f._shimActiveCues=null,f.activeCues=null,f.cues=null,e(n).unbind(a,l),e(r).unbind("checktrackmode",l),e(n).on(a,l),e(r).on("checktrackmode",l),o&&(f.mode=u[f.kind]?"showing":"hidden",l())},s.createTextTrack=function(n,r){var i,o;return r.nodeName&&(o=t.data(r,"trackData"),o&&(b(r,o),i=o.track)),i||(i=c(t.objectCreate(d)),l||v.forEach(function(t){var n=e.prop(r,t);n&&(i[m[t]||t]=n)}),r.nodeName?(l&&v.forEach(function(n){t.defineProperty(i,m[n]||n,{get:function(){return e.prop(r,n)}})}),o=t.data(r,"trackData",{track:i}),s.loadTextTrack(n,r,o,e.prop(r,"default")&&e(r).siblings("track[default]").andSelf()[0]==r)):(l&&v.forEach(function(e){t.defineProperty(i,m[e]||e,{value:r[e],writeable:!1})}),i.cues=s.createCueList(),i.activeCues=i._shimActiveCues=i.shimActiveCues=s.createCueList(),i.mode="hidden",i.readyState=2)),i},s.parseCaptionChunk=function(){var e=/^(\d{2})?:?(\d{2}):(\d{2})\.(\d+)\s+\-\-\>\s+(\d{2})?:?(\d{2}):(\d{2})\.(\d+)\s*(.*)/,n=/^([\d\.]+)\s+\+([\d\.]+)\s*(.*)/,r=/^(DEFAULTS|DEFAULT)\s+\-\-\>\s+(.*)/g,i=/^(STYLE|STYLES)\s+\-\-\>\s*\n([\s\S]*)/g,s=/^(COMMENT|COMMENTS)\s+\-\-\>\s+(.*)/g;return function(n,o){var u=[],a,f,l,c,h,p,d="",v,m,g,y;if(m=r.exec(n))return null;if(m=i.exec(n))return null;if(m=s.exec(n))return null;a=n.split(/\n/g);while(!a[0].replace(/\s+/ig,"").length&&a.length>0)a.shift();a[0].match(/^\s*[a-z0-9-\_]+\s*$/ig)&&(v=String(a.shift().replace(/\s*/ig,"")));for(p=0;p=c&&(l||t.error("please use WebVTT format. This is the standard"),r(n.cues))},e=e.replace(/\r\n/g,"\n"),setTimeout(function(){e=e.replace(/\r/g,"\n"),setTimeout(function(){f=(new Date).getTime(),e=e.split(/\n\n+/g),u(0,e.length)},9)},9)):t.error("Required parameter captionData not supplied.")},s.createTrackList=function(e,n){return n=n||t.data(e,"mediaelementBase")||t.data(e,"mediaelementBase",{}),n.textTracks||(n.textTracks=[],t.defineProperties(n.textTracks,{onaddtrack:{value:null},onremovetrack:{value:null}}),c(n.textTracks)),n.textTracks},Modernizr.track||(t.defineNodeNamesBooleanProperty(["track"],"default"),t.reflectProperties(["track"],["srclang","label"]),t.defineNodeNameProperties("track",{src:{reflect:!0,propType:"src"}})),t.defineNodeNameProperties("track",{kind:{attr:Modernizr.track?{set:function(e){var n=t.data(this,"trackData");this.setAttribute("data-kind",e),n&&(n.attrKind=e)},get:function(){var e=t.data(this,"trackData");return e&&"attrKind"in e?e.attrKind:this.getAttribute("kind")}}:{},reflect:!0,propType:"enumarated",defaultValue:"subtitles",limitedTo:["subtitles","captions","descriptions","chapters","metadata"]}}),e.each(v,function(n,r){var i=m[r]||r;t.onNodeNamesPropertyModify("track",r,function(){var n=t.data(this,"trackData"),s=this;n&&(r=="kind"&&b(this,n),l||(n.track[i]=e.prop(this,r)),clearTimeout(n.changedTrackPropTimer),n.changedTrackPropTimer=setTimeout(function(){e(s).trigger("updatesubtitlestate")},1))})}),t.onNodeNamesPropertyModify("track","src",function(n){if(n){var r=t.data(this,"trackData"),i;r&&(i=e(this).closest("video, audio"),i[0]&&s.loadTextTrack(i,this,r))}}),t.defineNodeNamesProperties(["track"],{ERROR:{value:3},LOADED:{value:2},LOADING:{value:1},NONE:{value:0},readyState:{get:function(){return(e.prop(this,"track")||{readyState:0}).readyState},writeable:!1},track:{get:function(){return s.createTextTrack(e(this).closest("audio, video")[0],this)},writeable:!1}},"prop"),t.defineNodeNamesProperties(["audio","video"],{textTracks:{get:function(){var e=this,n=t.data(e,"mediaelementBase")||t.data(e,"mediaelementBase",{}),r=s.createTrackList(e,n);return n.blockTrackListUpdate||y.call(e,n,r),r},writeable:!1},addTextTrack:{value:function(e,n,r){var i=s.createTextTrack(this,{kind:f.prop("kind",e||"").prop("kind"),label:n||"",srclang:r||""}),o=t.data(this,"mediaelementBase")||t.data(this,"mediaelementBase",{});return o.scriptedTextTracks||(o.scriptedTextTracks=[]),o.scriptedTextTracks.push(i),y.call(this),i}}},"prop"),e(r).on("emptied ended updatetracklist",function(n){if(e(n.target).is("audio, video")){var r=t.data(n.target,"mediaelementBase");r&&(clearTimeout(r.updateTrackListTimer),r.updateTrackListTimer=setTimeout(function(){y.call(n.target,r)},0))}});var E=function(e,t){return t.readyState||e.readyState};t.addReady(function(n,r){var i=r.filter("video, audio, track").closest("audio, video");e("video, audio",n).add(i).each(function(){y.call(this)}).each(function(){if(Modernizr.track){var n=e.prop(this,"textTracks"),r=this.textTracks;n.length!=r.length&&t.error("textTracks couldn't be copied"),e("track",this).each(function(){var t=e.prop(this,"track"),n=this.track,r,i;if(n){r=e.prop(this,"kind"),i=E(this,n);if(n.mode||i)t.mode=p[n.mode]||n.mode;r!="descriptions"&&(n.mode=typeof n.mode=="string"?"disabled":0,this.kind="metadata",e(this).attr({kind:r}))}}).on("load error",function(e){e.originalEvent&&e.stopImmediatePropagation()})}}),i.each(function(){var e=this,n=t.data(e,"mediaelementBase");n&&(clearTimeout(n.updateTrackListTimer),n.updateTrackListTimer=setTimeout(function(){y.call(e,n)},9))})}),Modernizr.track&&e("video, audio").trigger("trackapichange")});