(function(g){g.html5={};g.html5.version="6.8.4616"})(jwplayer); (function(g){var h=document;g.parseDimension=function(a){return"string"==typeof a?""===a?0:-1e?"0":"")+e+":"+(10>a?"0":"")+a}return"00:00"};g.bounds=function(a){var c={left:0,right:0,width:0,height:0,top:0,bottom:0};if(!a||!h.body.contains(a))return c;if(a.getBoundingClientRect){a=a.getBoundingClientRect(a);var e=window.pageYOffset, b=window.pageXOffset;if(!a.width&&!a.height&&!a.left&&!a.top)return c;c.left=a.left+b;c.right=a.right+b;c.top=a.top+e;c.bottom=a.bottom+e;c.width=a.right-a.left;c.height=a.bottom-a.top}else{c.width=a.offsetWidth|0;c.height=a.offsetHeight|0;do c.left+=a.offsetLeft|0,c.top+=a.offsetTop|0;while(a=a.offsetParent);c.right=c.left+c.width;c.bottom=c.top+c.height}return c};g.empty=function(a){if(a)for(;0b.indexOf("url")?"url("+b+")":b+c:0===b||"z-index"===a||"opacity"===a?""+b+c:/color/i.test(a)?"#"+e.pad(b.toString(16).replace(/^0x/i,""),6)+c:Math.ceil(b)+"px"+c}function a(a,b){for(var c=0;cu.elements.indexOf(b)&&u.elements.push(b)}else a(b,e)}};m.block=function(a){null===u&&(u={id:a,styleSheets:{},elements:[]})};m.unblock=function(b){if(u&& (!b||u.id===b)){for(var d in u.styleSheets)c(d);for(b=0;bl?l=u:u=l;r=!0;break; case h.NONE:u=l=1;case h.EXACTFIT:r=!0;break;default:u>l?0.95p)){var b=v.getContext("2d");b.clearRect(0,0,d,f);w(b,0,0,d,f,5,c,e,e);w(b,0,0,d,f,5,e,c,e);b.fillStyle="#979797";b.globalAlpha=1;var k=v.width/2,j=v.height/2;b.textAlign="center";b.font="Bold 11px Sans-Serif";b.fillText(m.replace(/xx/gi,Math.ceil(p-a)),k,j+4)}}function g(a,b){if("number"==h.typeOf(F))p=F;else if("%"==F.slice(-1)){var c=parseFloat(F.slice(0,-1));b&&!isNaN(c)&& (p=b*c/100)}else"string"==h.typeOf(F)?p=h.seconds(F):isNaN(F)||(p=F)}function j(){k&&x.sendEvent(b.JWPLAYER_AD_SKIPPED)}function q(){if(k){var a=v.getContext("2d");a.clearRect(0,0,d,f);w(a,0,0,d,f,5,c,e,c);w(a,0,0,d,f,5,e,c,c);a.fillStyle="#FFFFFF";a.globalAlpha=1;var b=v.height/2,j=v.width/2;a.textAlign="center";a.font="Bold 12px Sans-Serif";a.fillText(r+" ",j,b+4);a.drawImage(A,v.width-(v.width-a.measureText(r).width)/2-4,(f-s.height)/2)}}function C(){if(k){var a=v.getContext("2d");a.clearRect(0, 0,d,f);w(a,0,0,d,f,5,c,e,e);w(a,0,0,d,f,5,e,c,e);a.fillStyle="#979797";a.globalAlpha=1;var b=v.height/2,j=v.width/2;a.textAlign="center";a.font="Bold 12px Sans-Serif";a.fillText(r+" ",j,b+4);a.drawImage(s,v.width-(v.width-a.measureText(r).width)/2-4,(f-s.height)/2)}}function w(a,b,d,e,k,j,f,h,r){"undefined"==typeof h&&(h=c);"undefined"===typeof j&&(j=5);a.beginPath();a.moveTo(b+j,d);a.lineTo(b+e-j,d);a.quadraticCurveTo(b+e,d,b+e,d+j);a.lineTo(b+e,d+k-j);a.quadraticCurveTo(b+e,d+k,b+e-j,d+k);a.lineTo(b+ j,d+k);a.quadraticCurveTo(b,d+k,b,d+k-j);a.lineTo(b,d+j);a.quadraticCurveTo(b,d,b+j,d);a.closePath();h&&(a.strokeStyle="white",a.globalAlpha=r?1:0.25,a.stroke());f&&(a.fillStyle="#000000",a.globalAlpha=0.5,a.fill())}function t(a,b){var c=document.createElement(a);b&&(c.className=b);return c}var D,v,x=new b.eventdispatcher,p=-1,k=e,B,F=0,s,A;h.extend(this,x);this.updateSkipTime=function(b,l){var u=v.getContext("2d");g(b,l);if(0<=p)if(a.style(D,{visibility:B?"visible":"hidden"}),0=A.length||(A[s].data?B.populate(A[s].data):K==A.length?(m("file not loaded: "+A[s].file),0!=G&&D(a.JWPLAYER_CAPTIONS_CHANGED,A,0),G=0):I=b,C(!1))):(G=0,C(!1))}function D(a,b,c){P.sendEvent(a,{type:a,tracks:b,track:c})}function v(){for(var a=[{label:"Off"}],b=0;b=j)){a=c;break}-1==a?b(""):a!=g&&(g=a,b(l[c].text))}function u(a,b,c){c=h.hexToRgba("#000000",c);"dropshadow"===a?b.textShadow="0 2px 1px "+c:"raised"===a?b.textShadow="0 0 5px "+c+", 0 1px 5px "+c+", 0 2px 5px "+c:"depressed"===a?b.textShadow="0 -2px 1px "+c:"uniform"===a&&(b.textShadow="-2px 0 1px "+c+",2px 0 1px "+c+",0 -2px 1px "+c+",0 2px 1px "+c+",-1px 1px 1px "+c+",1px 1px 1px "+c+",1px -1px 1px "+ c+",1px 1px 1px "+c)}var l,m,r,n,g,j,q="visible",C=-1;this.hide=function(){clearInterval(C);a(m,{display:"none"})};this.populate=function(a){g=-1;l=a;f()};this.resize=function(){d()};this.show=function(){a(m,{display:"block"});d();clearInterval(C);C=setInterval(d,250)};this.update=function(a){j=a;l&&f()};var w=c.fontOpacity,t=c.windowOpacity,D=c.edgeStyle,v=c.backgroundColor,x={display:"inline-block"},p={color:h.hexToRgba(h.rgbHex(c.color),w),display:"inline-block",fontFamily:c.fontFamily,fontStyle:c.fontStyle, fontWeight:c.fontWeight,textAlign:"center",textDecoration:c.textDecoration,wordWrap:"break-word"};t&&(x.backgroundColor=h.hexToRgba(h.rgbHex(c.windowColor),t));u(D,p,w);c.back?p.backgroundColor=h.hexToRgba(h.rgbHex(v),c.backgroundOpacity):null===D&&u("uniform",p);m=document.createElement("div");r=document.createElement("div");n=document.createElement("span");a(m,{display:"block",height:"auto",position:"absolute",bottom:"20px",textAlign:"center",width:"100%"});a(r,x);a(n,p);r.appendChild(n);m.appendChild(r); e.appendChild(m)}})(jwplayer); (function(g){var h=g.html5,a=g.utils,c=g.events,e=c.state,b=a.css,d=a.transitionStyle,f=a.isMobile(),u=a.isAndroid(4)&&!a.isChrome(),l="button",m="text",r="slider",n="none",z="100%",j={display:n},q={display:"block"},C={display:x},w="array",t=!1,D=!0,v=null,x,p=window,k=document;h.controlbar=function(d,F){function s(a,b,c){return{name:a,type:b,className:c}}function A(c){b.block($);if(c.duration==Number.POSITIVE_INFINITY||!c.duration&&a.isSafari()&&!f)Z.setText(J.jwGetPlaylist()[J.jwGetPlaylistIndex()].title||"Live broadcast"); else{var d;E.elapsed&&(d=a.timeFormat(c.position),E.elapsed.innerHTML=d);E.duration&&(d=a.timeFormat(c.duration),E.duration.innerHTML=d);0a&&(a=0);0.9d+(la.margin|0)?d:"");b.style(W,c);ia=a.bounds(W);W&&E.alt&&(W.parentNode&&320<=W.parentNode.clientWidth?b.style(pb,C):b.style(pb,j));b.block($);K();sa();clearTimeout(Wa);Wa=-1;Wa=setTimeout(function(){b.style(W,{opacity:1})},0)}};Z.showTemp=function(){this.visible||(W.style.opacity=0,W.style.display="inline-block")};Z.hideTemp=function(){this.visible||(W.style.display=n)};Z.addCues= function(b){a.foreach(b,function(a,b){if(b.text){var c=b.begin,d=b.text;if(0<=c.toString().search(/^[\d\.]+%?$/)){var e=y("timeSliderCue"),j=E.timeSliderRail,k={position:c,text:d,element:e};e&&j&&(j.appendChild(e),e.addEventListener("mouseover",function(){Ua=k},!1),e.addEventListener("mouseout",function(){Ua=v},!1),db.push(k))}Aa()}})};Z.hide=function(){Z.visible&&(Z.visible=!1,b.style(W,{opacity:0}),clearTimeout(Wa),Wa=-1,Wa=setTimeout(function(){b.style(W,{display:n})},250))};E={};J=d;$=J.id+"_controlbar"; va=0;W=M();W.id=$;W.className="jwcontrolbar";oa=J.skin;Ga=oa.getComponentLayout("controlbar");Ga||(Ga=Xa.layout);a.clearCss(Q());b.block($+"build");P();var ub=y("capLeft"),vb=y("capRight"),wb=y("background",{position:"absolute",left:N("capLeft").width,right:N("capRight").width,"background-repeat":"repeat-x"},D);wb&&W.appendChild(wb);ub&&W.appendChild(ub);Va("left");Va("center");Va("right");W.appendChild(Fa.left);W.appendChild(Fa.center);W.appendChild(Fa.right);E.hd&&(ma=new h.menu("hd",$+"_hd",oa, da),f?eb(ma,E.hd,Y,"hd"):ra(ma,E.hd,Y,ja),gb.hd=ma);E.cc&&(na=new h.menu("cc",$+"_cc",oa,Ra),f?eb(na,E.cc,qa,"cc"):ra(na,E.cc,qa,nb),gb.cc=na);E.mute&&(E.volume&&E.volume.vertical)&&(Ha=new h.overlay($+"_volumeoverlay",oa),Ha.setContents(E.volume),ra(Ha,E.mute,ba),gb.volume=Ha);b.style(Fa.right,{right:N("capRight").width});vb&&W.appendChild(vb);b.unblock($+"build");J.jwAddEventListener(c.JWPLAYER_MEDIA_TIME,A);J.jwAddEventListener(c.JWPLAYER_PLAYER_STATE,function(a){switch(a.newstate){case e.BUFFERING:case e.PLAYING:E.timeSliderThumb&& b.style(E.timeSliderThumb,{opacity:1});S("play",D);break;case e.PAUSED:ya||S("play",t);break;case e.IDLE:S("play",t),E.timeSliderThumb&&b.style(E.timeSliderThumb,{opacity:0}),E.timeRail&&(E.timeRail.className="jwrail",setTimeout(function(){E.timeRail.className+=" jwsmooth"},100)),Ja(0),A({position:0,duration:0})}});J.jwAddEventListener(c.JWPLAYER_PLAYLIST_ITEM,function(b){if(!wa){b=J.jwGetPlaylist()[b.index].tracks;var c=t,d=E.timeSliderRail;a.foreach(db,function(a,b){d.removeChild(b.element)});db.length= 0;if(a.typeOf(b)==w&&!f)for(var e=0;ej-Y?(r.jwSetFullscreen(),Y=void 0):Y=(new Date).getTime();var k=a.bounds(p.parentNode.querySelector(".jwcontrolbar")),f=a.bounds(p),j=k.left-10-f.left,h=k.left+30- f.left,g=f.bottom-40,l=f.bottom,n=k.right-30-f.left,k=k.right+10-f.left;if(d&&!(b.x>=j&&b.x<=h&&b.y>=g&&b.y<=l)){if(b.x>=n&&b.x<=k&&b.y>=g&&b.y<=l){r.jwSetFullscreen();return}S.sendEvent(c.JWPLAYER_DISPLAY_CLICK);if(M)return}switch(r.jwGetState()){case e.PLAYING:case e.BUFFERING:r.jwPause();break;default:r.jwPlay()}}}function j(a,b){ba.showicons&&(a||b?(R.setRotation("buffer"==a?parseInt(ba.bufferrotation,10):0,parseInt(ba.bufferinterval,10)),R.setIcon(a),R.setText(b)):R.hide())}function q(a){s!= a?(s&&x(u,m),(s=a)?(a=new Image,a.addEventListener("load",t,m),a.src=s):(b("#"+p.id+" "+u,{"background-image":void 0}),x(u,m),A=K=0)):s&&!M&&x(u,l);w(r.jwGetState())}function C(a){clearTimeout(qa);qa=setTimeout(function(){w(a.newstate)},100)}function w(a){a=T?T:r?r.jwGetState():e.IDLE;if(a!=ca)switch(ca=a,R&&R.setRotation(0),a){case e.IDLE:!H&&!P&&(s&&!I&&x(u,l),a=!0,r._model&&!1===r._model.config.displaytitle&&(a=!1),j("play",F&&a?F.title:""));break;case e.BUFFERING:H=m;G.error&&G.error.setText(); P=m;j("buffer");break;case e.PLAYING:j();break;case e.PAUSED:j("play")}}function t(){A=this.width;K=this.height;w(r.jwGetState());v();s&&b("#"+p.id+" "+u,{"background-image":"url("+s+")"})}function D(a){H=l;j("error",a.message)}function v(){0d.left&&b.offsetX(j.left-d.left+8);q.show();a.foreach(p, function(a,b){a!=g&&b.hide()})},!1);l.addEventListener("mouseout",function(){m=setTimeout(q.hide,100)},!1);k.appendChild(q.element());p[g]=q}}v++;C()}};s.removeButton=function(a){if(x[a]){B.removeChild(x[a].element);B.removeChild(x[a].divider);var b=document.getElementById(""+t+"_"+a+"_tooltip");b&&k.removeChild(b);delete x[a];v--;C()}};s.numButtons=function(){return v};s.visible=!1;k=j("div","jwdock");B=j("div","jwdockbuttons");k.appendChild(B);k.id=t;var A=q("button"),K=q("buttonOver"),I=q("buttonActive"); A&&(c(z(),{height:A.height,padding:w.margin}),c(b,{height:A.height}),c(z("button"),a.extend(r(A),{width:A.width,cursor:"pointer",border:f})),c(z("button:hover"),r(K)),c(z("button:active"),r(I)),c(z("button\x3ediv"),{opacity:w.iconalpha}),c(z("button:hover\x3ediv"),{opacity:w.iconalphaover}),c(z("button:active\x3ediv"),{opacity:w.iconalphaactive}),c(z(".jwoverlay"),{top:w.margin+A.height}),n("capLeft",B),n("capRight",B),n("divider"));setTimeout(function(){e(k)})};c(".jwdock",{opacity:0,display:f}); c(".jwdock \x3e *",{height:"100%","float":"left"});c(".jwdock \x3e .jwoverlay",{height:"auto","float":f,"z-index":99});c(b+" button",{position:"relative"});c(b+" \x3e *",{height:"100%","float":"left"});c(b+" .divider",{display:f});c(b+" button ~ .divider",{display:u});c(b+" .capLeft, "+b+" .capRight",{display:f});c(b+" .capRight",{"float":"right"});c(b+" button \x3e div",{left:0,right:0,top:0,bottom:0,margin:5,position:"absolute","background-position":"center","background-repeat":"no-repeat"});a.transitionStyle(".jwdock", "background .25s, opacity .25s");a.transitionStyle(".jwdock .jwoverlay","opacity .25s");a.transitionStyle(b+" button div","opacity .25s")})(jwplayer); (function(g){var h=g.html5,a=g.utils,c=g.events,e=c.state,b=g.playlist;h.instream=function(d,f,g,l){function m(a){C(a.type,a);M&&d.jwInstreamDestroy(!1,y)}function r(a){C(a.type,a);j(null)}function n(a){C(a.type,a)}function z(){H&&H.releaseState(y.jwGetState());I.play()}function j(){if(v&&x+1a&&y.jwInstreamSeek(a)}};y.jwSeekDrag=function(a){M.seekDrag(a)};y.jwGetPosition=function(){};y.jwGetDuration=function(){};y.jwGetWidth=d.jwGetWidth;y.jwGetHeight=d.jwGetHeight;y.jwGetFullscreen=d.jwGetFullscreen;y.jwSetFullscreen=d.jwSetFullscreen; y.jwGetVolume=function(){return f.volume};y.jwSetVolume=function(a){M.setVolume(a);d.jwSetVolume(a)};y.jwGetMute=function(){return f.mute};y.jwSetMute=function(a){M.setMute(a);d.jwSetMute(a)};y.jwGetState=function(){return!M?e.IDLE:M.state};y.jwGetPlaylist=function(){return[D]};y.jwGetPlaylistIndex=function(){return 0};y.jwGetStretching=function(){return f.config.stretching};y.jwAddEventListener=function(a,b){P.addEventListener(a,b)};y.jwRemoveEventListener=function(a,b){P.removeEventListener(a,b)}; y.jwSetCurrentQuality=function(){};y.jwGetQualityLevels=function(){return[]};y.jwGetControls=function(){return d.jwGetControls()};y.skin=d.skin;y.id=d.id+"_instream";return y}})(window.jwplayer); (function(g){var h=g.utils,a=h.css,c=g.events.state,e=g.html5.logo=function(b,d){function f(a){h.exists(a)&&a.stopPropagation&&a.stopPropagation();if(!z||!m.link)u.jwGetState()==c.IDLE||u.jwGetState()==c.PAUSED?u.jwPlay():u.jwPause();z&&m.link&&(u.jwPause(),u.jwSetFullscreen(!1),window.open(m.link,m.linktarget))}var u=b,l=u.id+"_logo",m,r,n=e.defaults,z=!1;this.resize=function(){};this.element=function(){return r};this.offset=function(b){a("#"+l+" ",{"margin-bottom":b})};this.position=function(){return m.position}; this.margin=function(){return parseInt(m.margin)};this.hide=function(a){if(m.hide||a)z=!1,r.style.visibility="hidden",r.style.opacity=0};this.show=function(){z=!0;r.style.visibility="visible";r.style.opacity=1};var j="o";u.edition&&(j=u.edition(),j="pro"==j?"p":"premium"==j?"r":"ads"==j?"a":"free"==j?"f":"o");if("o"==j||"f"==j)n.link="http://www.longtailvideo.com/jwpabout/?a\x3dl\x26v\x3d"+g.version+"\x26m\x3dh\x26e\x3d"+j;m=h.extend({},n,d);m.hide="true"==m.hide.toString();r=document.createElement("img"); r.className="jwlogo";r.id=l;if(m.file){var n=/(\w+)-(\w+)/.exec(m.position),j={},q=m.margin;3==n.length?(j[n[1]]=q,j[n[2]]=q):j.top=j.right=q;a("#"+l+" ",j);r.src=(m.prefix?m.prefix:"")+m.file;h.isMobile()?(new h.touch(r)).addEventListener(h.touchEvents.TAP,f):r.onclick=f}else r.style.display="none";return this};e.defaults={prefix:h.repo(),file:"logo.png",linktarget:"_top",margin:8,hide:!1,position:"top-right"};a(".jwlogo",{cursor:"pointer",position:"absolute","z-index":100,opacity:0});h.transitionStyle(".jwlogo", "visibility .25s, opacity .25s")})(jwplayer); (function(g){var h=g.html5,a=g.utils,c=a.css;h.menu=function(e,b,d,f){function g(a){return!a||!a.src?{}:{background:"url("+a.src+") no-repeat left","background-size":a.width+"px "+a.height+"px"}}function l(a,b){return function(){C(a);n&&n(b)}}function m(a,b){var c=document.createElement("div");a&&(c.className=a);b&&b.appendChild(c);return c}function r(a){return(a=d.getSkinElement("tooltip",a))?a:{width:0,height:0,src:void 0}}var n=f,z=new h.overlay(b+"_overlay",d);f=a.extend({fontcase:void 0,fontcolor:"#cccccc", fontsize:11,fontweight:void 0,activecolor:"#ffffff",overcolor:"#ffffff"},d.getComponentSettings("tooltip"));var j,q=[];this.element=function(){return z.element()};this.addOption=function(c,d){var e=m("jwoption",j);e.id=b+"_option_"+d;e.innerHTML=c;a.isMobile()?(new a.touch(e)).addEventListener(a.touchEvents.TAP,l(q.length,d)):e.addEventListener("click",l(q.length,d));q.push(e)};this.clearOptions=function(){for(;0b?(b=0,c=!0):b=-1==b||b>d.playlist.length?d.playlist.length- 1:b;if(c||b!=d.item)d.item=b,d.sendEvent(a.JWPLAYER_PLAYLIST_ITEM,{index:d.item})};d.setVolume=function(c){d.mute&&0b.right?t.offsetX(b.right-d.right):d.lefta&&(a=0);1parseFloat(jwplayer.version))&&q("Incompatible player version"); if(0===a.length)j(z);else for(c=0;cl[c].end;)c++;c===l.length&&c--;c=l[c].text;a:{var e=c;if(e&&e!==n){n=e;0>e.indexOf("://")&&(e=m?m+"/"+e:e);var h={display:"block",margin:"0 auto", "background-position":"0 0",width:0,height:0};if(0K)&&da(K);l()}},emptied:g, ended:function(){y&&G!=c.IDLE&&(T=-1,Y=e,f(a.JWPLAYER_MEDIA_BEFORECOMPLETE),y&&(w(c.IDLE),Y=b,f(a.JWPLAYER_MEDIA_COMPLETE)))},error:function(){y&&(h.log("Error playing media: %o",k.error),M.sendEvent(a.JWPLAYER_MEDIA_ERROR,{message:"Error loading media: File could not be played"}),w(c.IDLE))},loadeddata:g,loadedmetadata:m,loadstart:g,pause:z,play:z,playing:z,progress:r,ratechange:g,readystatechange:g,seeked:function(){!I&&G!=c.PAUSED&&w(c.PLAYING)},seeking:D?j:g,stalled:g,suspend:g,timeupdate:l,volumechange:function(){f(a.JWPLAYER_MEDIA_VOLUME, {volume:Math.round(100*k.volume)});f(a.JWPLAYER_MEDIA_MUTE,{mute:k.muted})},waiting:j},x,p,k,B,F,s,A,K,I=b,G=c.IDLE,H,P=-1,Q=-1,M=new a.eventdispatcher,y=b,R,T=-1,ca=h.isAndroid(b,e),ba=h.isIOS(7),S=this,aa=[],Y=b;h.extend(S,M);S.load=function(b){if(y){x=b;K=0;B=b.duration?b.duration:-1;F=0;R=x.sources;0>T&&(T=0);for(b=0;bb)&&(T=b,h.saveCookie("qualityLabel",R[b].label),f(a.JWPLAYER_MEDIA_LEVEL_CHANGED, {currentQuality:b,levels:q(R)}),b=k.currentTime,C(),S.seek(b)))};S.getCurrentQuality=function(){return T};S.getQualityLevels=function(){return q(R)};d||(d=document.createElement("video"));k=d;h.foreach(v,function(a,c){k.addEventListener(a,c,b)});ba||(k.controls=e,k.controls=b);k.setAttribute("x-webkit-airplay","allow");y=e}})(jwplayer); (function(g){var h=g.html5,a=g.utils,c=g.events,e=c.state,b=a.css,d=a.bounds,f=a.isMobile(),u=a.isIPad(),l=a.isIPod(),m=a.isAndroid(),r=a.isIOS(),n=document,z="aspectMode",j=!0,q=!1,C="hidden",w="none",t="block";h.view=function(D,v){function x(){var a=d(O),b=Math.round(a.width),e=Math.round(a.height);if(n.body.contains(O)){if(b&&e&&(b!==eb||e!==Va))eb=b,Va=e,X&&X.redraw(),clearTimeout(xa),xa=setTimeout(P,50),va.sendEvent(c.JWPLAYER_RESIZE,{width:b,height:e})}else window.removeEventListener("resize", x),f&&window.removeEventListener("orientationchange",x);return a}function p(a){a&&(a.element().addEventListener("mousemove",A,q),a.element().addEventListener("mouseout",K,q))}function k(){}function B(a,b){var c=n.createElement(a);b&&(c.className=b);return c}function F(){clearTimeout(Aa);Aa=setTimeout(Y,nb)}function s(){clearTimeout(Aa);if(U.jwGetState()==e.PAUSED||U.jwGetState()==e.PLAYING)qa(),W||(Aa=setTimeout(Y,nb))}function A(){clearTimeout(Aa);W=j}function K(){W=q}function I(a){va.sendEvent(a.type, a)}function G(c,d,e){var f=O.className,g,h,k=U.id+"_view";b.block(k);if(e=!!e)f=f.replace(/\s*aspectMode/,""),O.className!==f&&(O.className=f),b.style(O,{display:t},e);a.exists(c)&&a.exists(d)&&(L.width=c,L.height=d);e={width:c};-1==f.indexOf(z)&&(e.height=d);b.style(O,e,!0);X&&X.redraw();V&&V.redraw(j);ea&&(ea.offset(V&&0<=ea.position().indexOf("bottom")?V.height()+V.margin():0),setTimeout(function(){N&&N.offset("top-left"==ea.position()?ea.element().clientWidth+ea.margin():0)},500));H(d);g=L.playlistsize; h=L.playlistposition;if(oa&&g&&("right"==h||"bottom"==h))oa.redraw(),f={display:t},e={},f[h]=0,e[h]=g,"right"==h?f.width=g:f.height=g,b.style(Oa,f),b.style(za,e);P(c,d);b.unblock(k)}function H(a){var b=d(O);ka=0=b.height;V&&(ka?(V.audioMode(j),qa(),X.hidePreview(j),X&&X.hide(),da(q)):(V.audioMode(q),Sa(U.jwGetState())));ea&&ka&&S();O.style.backgroundColor=ka?"transparent":"#000"}function P(b,c){if(ja){if(!b|| isNaN(Number(b)))b=ra.clientWidth;if(!c||isNaN(Number(c)))c=ra.clientHeight;a.stretch(L.stretching,ja,b,c,ja.videoWidth,ja.videoHeight)&&(clearTimeout(xa),xa=setTimeout(P,250))}}function Q(a){if(L.fullscreen)switch(a.keyCode){case 27:fa(q)}}function M(a){r||(a?(O.className+=" jwfullscreen",n.getElementsByTagName("body")[0].style["overflow-y"]=C):(O.className=O.className.replace(/\s+jwfullscreen/,""),n.getElementsByTagName("body")[0].style["overflow-y"]=""))}function y(){var a;a=n.mozFullScreenElement|| n.webkitCurrentFullScreenElement||n.msFullscreenElement||ja.webkitDisplayingFullscreen;a=!(!a||a.id&&a.id!=U.id);L.fullscreen!=a&&fa(a)}function R(){V&&(!ka&&!L.getVideo().audioMode())&&V.hide()}function T(){N&&(!ka&&L.controls)&&N.show()}function ca(){N&&(!Ga&&!L.getVideo().audioMode())&&N.hide()}function ba(){ea&&!ka&&ea.show()}function S(){ea&&!L.getVideo().audioMode()&&ea.hide(ka)}function aa(){X&&L.controls&&!ka&&(!l||U.jwGetState()==e.IDLE)&&X.show();if(!f||!L.fullscreen)ja.controls=q}function Y(){clearTimeout(Aa); la=q;var a=U.jwGetState();(!v.controls||a!=e.PAUSED)&&R();v.controls||ca();a!=e.IDLE&&a!=e.PAUSED&&(ca(),S())}function qa(){la=j;if((L.controls||ka)&&!(l&&$==e.PAUSED))(!l||ka)&&V&&V.show(),T();fb.hide&&ba()}function da(a){(a=a&&!ka)||m?b.style(ra,{visibility:"visible",opacity:1}):b.style(ra,{visibility:C,opacity:0})}function Ra(){Ga=j;fa(q);L.controls&&T()}function ha(){}function kb(){}function Ia(a){Ga=q;clearTimeout(ga);ga=setTimeout(function(){Sa(a.newstate)},100)}function Ya(){R()}function Sa(a){$= a;switch(a){case e.PLAYING:(Ba?Ja:L).getVideo().audioMode()?(da(q),X.hidePreview(ka),X.setHiding(j),V&&(qa(),V.hideFullscreen(j)),T(),ba()):(da(j),P(),X.hidePreview(j),V&&V.hideFullscreen(q),Y());break;case e.IDLE:da(q);ka||(X.hidePreview(q),aa(),T(),ba(),V&&V.hideFullscreen(q));break;case e.BUFFERING:aa();Y();f&&da(j);break;case e.PAUSED:aa(),qa()}}function Ta(a){return"#"+U.id+(a?" ."+a:"")}function Na(a,c){b(a,{display:c?t:w})}var U=D,L=v,O,za,ua,Za,Oa,Aa=-1,nb=f?4E3:2E3,ja,ra,eb,Va,sa,Pa,Ca,Ja, Ba=q,V,X,N,ea,fb=a.extend({},L.componentConfig("logo")),J,oa,ka,Xa=q,la=q,Ga,E,xa=-1,W=q,$,va=new c.eventdispatcher;a.extend(this,va);this.getCurrentCaptions=function(){return J.getCurrentCaptions()};this.setCurrentCaptions=function(a){J.setCurrentCaptions(a)};this.getCaptionsList=function(){return J.getCaptionsList()};this.setup=function(d){if(!Xa){U.skin=d;za=B("span","jwmain");za.id=U.id+"_view";ra=B("span","jwvideo");ja=L.getVideo().getTag();ra.appendChild(ja);ua=B("span","jwcontrols");sa=B("span", "jwinstream");Oa=B("span","jwplaylistcontainer");Za=B("span","jwaspect");d=L.height;var g=L.componentConfig("controlbar"),m=L.componentConfig("display");H(d);J=new h.captions(U,L.captions);J.addEventListener(c.JWPLAYER_CAPTIONS_LIST,I);J.addEventListener(c.JWPLAYER_CAPTIONS_CHANGED,I);J.addEventListener(c.JWPLAYER_CAPTIONS_LOADED,k);ua.appendChild(J.element());X=new h.display(U,m);X.addEventListener(c.JWPLAYER_DISPLAY_CLICK,function(a){I(a);f?la?Y():qa():Ia(U.jwGetState());la&&F()});ka&&X.hidePreview(j); ua.appendChild(X.element());ea=new h.logo(U,fb);ua.appendChild(ea.element());N=new h.dock(U,L.componentConfig("dock"));ua.appendChild(N.element());U.edition&&!f?E=new h.rightclick(U,{abouttext:L.abouttext,aboutlink:L.aboutlink}):f||(E=new h.rightclick(U,{}));L.playlistsize&&(L.playlistposition&&L.playlistposition!=w)&&(oa=new h.playlistcomponent(U,{}),Oa.appendChild(oa.element()));V=new h.controlbar(U,g);V.addEventListener(c.JWPLAYER_USER_ACTION,F);ua.appendChild(V.element());l&&R();za.appendChild(ra); za.appendChild(ua);za.appendChild(sa);O.appendChild(za);O.appendChild(Za);O.appendChild(Oa);n.addEventListener("webkitfullscreenchange",y,q);ja.addEventListener("webkitbeginfullscreen",y,q);ja.addEventListener("webkitendfullscreen",y,q);n.addEventListener("mozfullscreenchange",y,q);n.addEventListener("MSFullscreenChange",y,q);n.addEventListener("keydown",Q,q);window.removeEventListener("resize",x);window.addEventListener("resize",x,!1);f&&(window.removeEventListener("orientationchange",x),window.addEventListener("orientationchange", x,!1));U.jwAddEventListener(c.JWPLAYER_PLAYER_READY,kb);U.jwAddEventListener(c.JWPLAYER_PLAYER_STATE,Ia);U.jwAddEventListener(c.JWPLAYER_MEDIA_ERROR,Ya);U.jwAddEventListener(c.JWPLAYER_PLAYLIST_COMPLETE,Ra);U.jwAddEventListener(c.JWPLAYER_PLAYLIST_ITEM,ha);Ia({newstate:e.IDLE});f||(ua.addEventListener("mouseout",function(){clearTimeout(Aa);Aa=setTimeout(Y,10)},q),ua.addEventListener("mousemove",s,q),a.isIE()&&(ra.addEventListener("mousemove",s,q),ra.addEventListener("click",X.clickHandler)));p(V); p(N);p(ea);b("#"+O.id+"."+z+" .jwaspect",{"margin-top":L.aspectratio,display:t});d=a.exists(L.aspectratio)?parseFloat(L.aspectratio):100;g=L.playlistsize;b("#"+O.id+".playlist-right .jwaspect",{"margin-bottom":-1*g*(d/100)+"px"});b("#"+O.id+".playlist-right .jwplaylistcontainer",{width:g+"px",right:0,top:0,height:"100%"});b("#"+O.id+".playlist-bottom .jwaspect",{"padding-bottom":g+"px"});b("#"+O.id+".playlist-bottom .jwplaylistcontainer",{width:"100%",height:g+"px",bottom:0});b("#"+O.id+".playlist-right .jwmain", {right:g+"px"});b("#"+O.id+".playlist-bottom .jwmain",{bottom:g+"px"});setTimeout(function(){G(L.width,L.height)},0)}};var fa=this.fullscreen=function(b){a.exists(b)||(b=!L.fullscreen);if(b){if((Ba?Ja:L).getVideo().audioMode())return;if(f)try{ja.webkitEnterFullScreen(),L.setFullscreen(j)}catch(c){return}else L.fullscreen||(M(j),O.requestFullScreen?O.requestFullScreen():O.mozRequestFullScreen?O.mozRequestFullScreen():O.webkitRequestFullScreen?O.webkitRequestFullScreen():O.msRequestFullscreen&&O.msRequestFullscreen(), L.setFullscreen(j))}else f?(ja.webkitExitFullScreen(),L.setFullscreen(q),u&&(ja.controls=q)):L.fullscreen&&(M(q),L.setFullscreen(q),n.cancelFullScreen?n.cancelFullScreen():n.mozCancelFullScreen?n.mozCancelFullScreen():n.webkitCancelFullScreen?n.webkitCancelFullScreen():n.msExitFullscreen&&n.msExitFullscreen()),u&&U.jwGetState()==e.PAUSED&&setTimeout(aa,500);V&&V.redraw();X&&X.redraw();N&&N.redraw();P();L.fullscreen&&(clearTimeout(xa),xa=setTimeout(P,200))};this.resize=function(a,b){G(a,b,!0);x()}; this.resizeMedia=P;var Qa=this.completeSetup=function(){b.style(O,{opacity:1})},ga;this.setupInstream=function(a,c,d,f){b.unblock();Na(Ta("jwinstream"),j);Na(Ta("jwcontrols"),q);sa.appendChild(a);Pa=c;Ca=d;Ja=f;Ia({newstate:e.PLAYING});Ba=j};this.destroyInstream=function(){b.unblock();Na(Ta("jwinstream"),q);Na(Ta("jwcontrols"),j);sa.innerHTML="";Ba=q};this.setupError=function(a){Xa=j;g.embed.errorScreen(O,a,L);Qa()};this.addButton=function(a,b,c,d){N&&(N.addButton(a,b,c,d),U.jwGetState()==e.IDLE&& T())};this.removeButton=function(a){N&&N.removeButton(a)};this.setControls=function(a){var b=L.controls,d=a?j:q;L.controls=d;d!=b&&(Ba?a?(Pa.show(),Ca.show()):(Pa.hide(),Ca.hide()):d?Ia({newstate:U.jwGetState()}):(Y(),X&&X.hide()),va.sendEvent(c.JWPLAYER_CONTROLS,{controls:d}))};this.addCues=function(a){V&&V.addCues(a)};this.forceState=function(a){X.forceState(a)};this.releaseState=function(){X.releaseState(U.jwGetState())};this.getSafeRegion=function(){var a={x:0,y:0,width:0,height:0};if(!L.controls)return a; V.showTemp();N.showTemp();var b=d(za),c=b.top,e=Ba?d(n.getElementById(U.id+"_instream_controlbar")):d(V.element()),f=Ba?!1:0