(function(f){f.html5={};f.html5.version="6.7.4071"})(jwplayer); (function(f){var g=document;f.parseDimension=function(a){if("string"==typeof a){if(""===a)return 0;if(!(-1d?"0":"")+d+":"+(10>a?"0":"")+a}return"00:00"};f.bounds=function(a){var c={left:0,right:0,width:0,height:0,top:0,bottom:0};if(!a||!g.body.contains(a))return c;if(a.getBoundingClientRect){a=a.getBoundingClientRect(a); var d=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+d;c.bottom=a.bottom+d;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};f.empty=function(a){if(a)for(;0d.indexOf("url")?"url("+d+")":d+j;else switch(a){case "z-index":case "opacity":b=d+j;break a;default:b=a.match(/color/i)?"#"+f.pad(d.toString(16).replace(/^0x/i,""),6)+j:0===d?0+j:Math.ceil(d)+"px"+j}}}l(e[c][a])&&!l(b)?delete e[c][a]:l(b)&&(e[c][a]=b)}); 0h?(e*=l,k*=l):(e*=h,k*=h);case g.NONE:l=h=1;case g.EXACTFIT:w=!0;break;default:l>h?0.95=x.length||(x[t].data?u.populate(x[t].data):(D=a=x[t].file,g.ajax(a,z,j)),p(!1))}function I(){var a=[];a.push({label:"Off"});for(var b=0;b=n)){a=b;break}-1==a?d(""):a!=f&&(f=a,d(l[b].text))}function k(a,b){g(b, function(b,c){a.style[b]=c})}var l,h,m,f,n,z="visible",j;this.hide=function(){k(h,{display:"none"});j&&(clearInterval(j),j=null)};this.populate=function(a){f=-1;l=a;e()};this.resize=function(){b()};h=document.createElement("div");m=document.createElement("span");h.appendChild(m);c.appendChild(h);k(h,{display:"block",height:"auto",position:"absolute",bottom:"20px",textAlign:"center",width:"100%"});k(m,{color:"#"+a.color.substr(-6),display:"inline-block",fontFamily:a.fontFamily,fontStyle:a.fontStyle, fontWeight:a.fontWeight,height:"auto",margin:"auto",position:"relative",textAlign:"center",textDecoration:a.textDecoration,wordWrap:"break-word",width:"auto"});a.back?k(m,{background:"#000"}):k(m,{textShadow:"-2px 0px 1px #000,2px 0px 1px #000,0px -2px 1px #000,0px 2px 1px #000,-1px 1px 1px #000,1px 1px 1px #000,1px -1px 1px #000,1px 1px 1px #000"});this.show=function(){k(h,{display:"block"});j||(j=setInterval(b,250));b()};this.update=function(a){n=a;l&&e()}}})(jwplayer.html5); (function(f){var g=f.html5,a=f.utils,c=f.events,d=c.state,b=a.css,e=a.transitionStyle,k=a.isMobile(),l=a.isAndroid(4)&&!a.isChrome(),h="button",m="text",w="slider",n="none",z="100%",j={display:n},r={display:"block"},p={display:q},B=!1,A=!0,I=null,q=void 0,s=window,y=document;g.controlbar=function(e,E){function t(a,b,c){return{name:a,type:b,className:c}}function x(b){var c=B,d;b.duration==Number.POSITIVE_INFINITY||!b.duration&&a.isSafari()&&!k?$.setText(M.jwGetPlaylist()[M.jwGetPlaylistIndex()].title|| "Live broadcast"):(H.elapsed&&(d=a.timeFormat(b.position),H.elapsed.innerHTML=d,c=d.length!=a.timeFormat(Ja).length),H.duration&&(d=a.timeFormat(b.duration),H.duration.innerHTML=d,c=c||d.length!=a.timeFormat(ra).length),0ua.right?b.offsetX(ua.right-c.right):c.lefta&&(a=0);0.9 S.maxwidth;d=va?0:S.margin;b(v(),{left:c?"50%":d,right:c?q:d,"margin-left":c?K.clientWidth/-2:q,width:c?z:q});c=top!==self&&a.isIE();b(v(".jwfullscreen"),{display:va||ob||c?n:q});b(v(".jwvolumeH"),{display:va?"block":n});b(v(".jwhd"),{display:!va&&ia&&1e-ka?(s.jwSetFullscreen(),ka=void 0):ka=(new Date).getTime();var j=g.bounds(y.parentNode.querySelector(".jwcontrolbar")),f=g.bounds(y),e=j.left-10-f.left,h=j.left+30-f.left,k=f.bottom-40,m=f.bottom,u=j.right- 30-f.left,j=j.right+10-f.left;if(b&&!(d.x>=e&&d.x<=h&&d.y>=k&&d.y<=m)){if(d.x>=u&&d.x<=j&&d.y>=k&&d.y<=m){s.jwSetFullscreen();return}P.sendEvent(a.JWPLAYER_DISPLAY_CLICK);if(R)return}switch(s.jwGetState()){case c.PLAYING:case c.BUFFERING:s.jwPause();break;default:s.jwPlay()}}}function z(a,b){Z.showicons&&(a||b?(O.setRotation("buffer"==a?parseInt(Z.bufferrotation):0,parseInt(Z.bufferinterval)),O.setIcon(a),O.setText(b)):O.hide())}function j(a){x!=a?(x&&q(k,h),(x=a)?(a=new Image,a.addEventListener("load", B,h),a.src=x):(d("#"+y.id+" "+k,{"background-image":void 0}),q(k,h),C=F=0)):x&&!R&&q(k,l);p(s.jwGetState())}function r(a){clearTimeout(fa);fa=setTimeout(function(){p(a.newstate)},100)}function p(a){a=X?X:s?s.jwGetState():c.IDLE;if(a!=ba)switch(ba=a,O&&O.setRotation(0),a){case c.IDLE:!Q&&!J&&(x&&!D&&q(k,l),a=!0,s._model&&!1===s._model.config.displaytitle&&(a=!1),z("play",t&&a?t.title:""));break;case c.BUFFERING:Q=h;L.error&&L.error.setText();J=h;z("buffer");break;case c.PLAYING:z();break;case c.PAUSED:z("play")}} function B(){C=this.width;F=this.height;p(s.jwGetState());I();x&&d("#"+y.id+" "+k,{"background-image":"url("+x+")"})}function A(a){Q=l;z("error",a.message)}function I(){0=L)clearInterval(D);else{L--;var c=Math.max(C.width,g.bounds(s).width-u.width-y.width);(g.isFF()||g.isIE())&&c++;g.isChrome()&&1==s.parentNode.clientWidth%2&&c++;a(w(),{"background-size":[y.width+b,c+b,u.width+b].join()},!0)}}function B(){v=(v+J)%360;g.rotate(x,v)}var A=l,I=A.skin,q=f,s,y,u,E,t,x,C,F=0,D,L;this.element=function(){return s};this.setText=function(a){var b=t.style;t.innerHTML=a?a.replace(":",":\x3cbr\x3e"):"";b.height="0";b.display= "block";if(a)for(;2d.left&&b.offsetX(e.left-d.left+8);n.show();g.foreach(s, function(a,b){a!=j&&b.hide()})},!1);k.addEventListener("mouseout",function(){p=setTimeout(n.hide,100)},!1);y.appendChild(n.element());s[j]=n}}I++;r()}};t.removeButton=function(a){if(q[a]){u.removeChild(q[a].element);u.removeChild(q[a].divider);var b=document.getElementById(""+B+"_"+a+"_tooltip");b&&y.removeChild(b);delete q[a];I--;r()}};t.numButtons=function(){return I};t.visible=!1;y=z("div","jwdock");u=z("div","jwdockbuttons");y.appendChild(u);y.id=B;var x=j("button"),C=j("buttonOver"),F=j("buttonActive"); x&&(a(n(),{height:x.height,padding:p.margin}),a(d,{height:x.height}),a(n("button"),g.extend(m(x),{width:x.width,cursor:"pointer",border:e})),a(n("button:hover"),m(C)),a(n("button:active"),m(F)),a(n("button\x3ediv"),{opacity:p.iconalpha}),a(n("button:hover\x3ediv"),{opacity:p.iconalphaover}),a(n("button:active\x3ediv"),{opacity:p.iconalphaactive}),a(n(".jwoverlay"),{top:p.margin+x.height}),w("capLeft",u),w("capRight",u),w("divider"));setTimeout(function(){c(y)})};a(".jwdock",{opacity:0,display:e}); a(".jwdock \x3e *",{height:"100%","float":"left"});a(".jwdock \x3e .jwoverlay",{height:"auto","float":e,"z-index":99});a(d+" button",{position:"relative"});a(d+" \x3e *",{height:"100%","float":"left"});a(d+" .divider",{display:e});a(d+" button ~ .divider",{display:k});a(d+" .capLeft, "+d+" .capRight",{display:e});a(d+" .capRight",{"float":"right"});a(d+" button \x3e div",{left:0,right:0,top:0,bottom:0,margin:5,position:"absolute","background-position":"center","background-repeat":"no-repeat"});g.transitionStyle(".jwdock", "background .25s, opacity .25s");g.transitionStyle(".jwdock .jwoverlay","opacity .25s");g.transitionStyle(d+" button div","opacity .25s")})(jwplayer.html5); (function(f){var g=jwplayer,a=g.utils,c=g.events,d=c.state,b=g.playlist;f.instream=function(e,g,l,h){function m(b){b.type==c.JWPLAYER_MEDIA_ERROR&&(b=a.extend({},b),b.type=c.JWPLAYER_ERROR);p(b.type,b);R=!0;v.jwInstreamDestroy(!1)}function w(){v.jwInstreamDestroy(!0)}function n(a){D&&p(a.type,a)}function z(){D&&x.play()}function j(){D&&setTimeout(function(){v.jwInstreamDestroy(!0)},10)}function r(a){a.width&&a.height&&s.resizeMedia()}function p(a,b,c){if(D||c)b=b||{},A.tag&&!b.tag&&(b.tag=A.tag), L.sendEvent(a,b)}function B(){C&&C.redraw();F&&F.redraw()}var A={controlbarseekable:"never",controlbarpausable:!0,controlbarstoppable:!0,playlistclickable:!0,skipoffset:-1,tag:null},I,q,s=l,y,u,E,t,x,C,F,D=!1,L,Q,J,v=this,R=!1,N=!0;v.load=function(l,L){a.isAndroid(2.3)?m({type:c.JWPLAYER_ERROR,message:"Error loading instream: Cannot play instream on Android 2.3"}):(R=!1,D=!0,q=a.extend(A,L),I=new b.item(l),Q=document.createElement("div"),Q.id=v.id+"_instream_container",y=h.detachMedia(),x=new f.video(y), x.addGlobalListener(n),x.addEventListener(c.JWPLAYER_MEDIA_META,r),x.addEventListener(c.JWPLAYER_MEDIA_COMPLETE,j),x.addEventListener(c.JWPLAYER_MEDIA_BUFFER_FULL,z),x.addEventListener(c.JWPLAYER_MEDIA_ERROR,m),x.attachMedia(),x.mute(g.mute),x.volume(g.volume),J=new f.model({},x),J.setVolume(g.volume),J.setMute(g.mute),J.addEventListener(c.JWPLAYER_ERROR,m),s.addEventListener(c.JWPLAYER_AD_SKIPPED,w),t=g.playlist[g.item],E=g.getVideo().checkComplete()?d.IDLE:e.jwGetState(),h.checkBeforePlay()&&(E= d.PLAYING,N=!1),u=y.currentTime,J.setPlaylist([l]),R||((E==d.BUFFERING||E==d.PLAYING)&&y.pause(),F=new f.display(v),F.setAlternateClickHandler(function(a){e.jwGetControls()?(J.state==d.PAUSED?v.jwInstreamPlay():v.jwInstreamPause(),a.hasControls=!0):a.hasControls=!1;p(c.JWPLAYER_INSTREAM_CLICK,a)}),a.isIE()&&y.parentElement.addEventListener("click",F.clickHandler),Q.appendChild(F.element()),C=new f.controlbar(v),Q.appendChild(C.element()),C.show(),e.jwGetControls()?(C.show(),F.show()):(C.hide(),F.hide()), s.setupInstream(Q,C,F,A.skipoffset),B(),x.load(J.playlist[0])))};v.jwInstreamDestroy=function(a){if(D){D=!1;E!=d.IDLE?x.load(t,!1):x.stop();L.resetEventListeners();R||F.revertAlternateClickHandler();x.detachMedia();s.destroyInstream();if(C)try{C.element().parentNode.removeChild(C.getDisplayElement())}catch(b){}p(c.JWPLAYER_INSTREAM_DESTROYED,{reason:a?"complete":"destroyed"},!0);h.attachMedia();if(E==d.BUFFERING||E==d.PLAYING)y.play(),g.playlist[g.item]==t&&N&&g.getVideo().seek(u)}};v.jwInstreamAddEventListener= function(a,b){L.addEventListener(a,b)};v.jwInstreamRemoveEventListener=function(a,b){L.removeEventListener(a,b)};v.jwInstreamPlay=function(){D&&(x.play(!0),g.state=jwplayer.events.state.PLAYING,F.show())};v.jwInstreamPause=function(){D&&(x.pause(!0),g.state=jwplayer.events.state.PAUSED,e.jwGetControls()&&F.show())};v.jwInstreamSeek=function(a){D&&x.seek(a)};v.jwInstreamSetText=function(a){C.setText(a)};v.jwInstreamUpdateSkipTime=function(a,b){s.updateSkipTime(a,b)};v.jwInstreamState=function(){if(D)return g.state}; v.jwPlay=function(){"true"==q.controlbarpausable.toString().toLowerCase()&&v.jwInstreamPlay()};v.jwPause=function(){"true"==q.controlbarpausable.toString().toLowerCase()&&v.jwInstreamPause()};v.jwStop=function(){"true"==q.controlbarstoppable.toString().toLowerCase()&&(v.jwInstreamDestroy(),e.jwStop())};v.jwSeek=function(a){switch(q.controlbarseekable.toLowerCase()){case "always":v.jwInstreamSeek(a);break;case "backwards":J.position>a&&v.jwInstreamSeek(a)}};v.jwSeekDrag=function(a){J.seekDrag(a)}; v.jwGetPosition=function(){};v.jwGetDuration=function(){};v.jwGetWidth=e.jwGetWidth;v.jwGetHeight=e.jwGetHeight;v.jwGetFullscreen=e.jwGetFullscreen;v.jwSetFullscreen=e.jwSetFullscreen;v.jwGetVolume=function(){return g.volume};v.jwSetVolume=function(a){J.setVolume(a);e.jwSetVolume(a)};v.jwGetMute=function(){return g.mute};v.jwSetMute=function(a){J.setMute(a);e.jwSetMute(a)};v.jwGetState=function(){return J.state};v.jwGetPlaylist=function(){return[I]};v.jwGetPlaylistIndex=function(){return 0};v.jwGetStretching= function(){return g.config.stretching};v.jwAddEventListener=function(a,b){L.addEventListener(a,b)};v.jwRemoveEventListener=function(a,b){L.removeEventListener(a,b)};v.jwSetCurrentQuality=function(){};v.jwGetQualityLevels=function(){return[]};v.skin=e.skin;v.id=e.id+"_instream";L=new c.eventdispatcher;e.jwAddEventListener(c.JWPLAYER_RESIZE,B);e.jwAddEventListener(c.JWPLAYER_FULLSCREEN,function(b){n(b);B();a.isIPad()&&(!b.fullscreen&&J.state==jwplayer.events.state.PAUSED)&&F.show(!0);a.isIPad()&&(!b.fullscreen&& J.state==jwplayer.events.state.PLAYING)&&F.hide()});return v}})(jwplayer.html5); (function(f){var g=f.utils,a=g.css,c=f.events.state,d=f.html5.logo=function(b,e){function k(a){g.exists(a)&&a.stopPropagation&&a.stopPropagation();if(!z||!m.link)l.jwGetState()==c.IDLE||l.jwGetState()==c.PAUSED?l.jwPlay():l.jwPause();z&&m.link&&(l.jwPause(),l.jwSetFullscreen(!1),window.open(m.link,m.linktarget))}var l=b,h=l.id+"_logo",m,w,n=d.defaults,z=!1;this.resize=function(){};this.element=function(){return w};this.offset=function(b){a("#"+h+" ",{"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,w.style.visibility="hidden",w.style.opacity=0};this.show=function(){z=!0;w.style.visibility="visible";w.style.opacity=1};var j="o";l.edition&&(j=l.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"+f.version+"\x26m\x3dh\x26e\x3d"+j;m=g.extend({},n,e);m.hide="true"==m.hide.toString();w=document.createElement("img"); w.className="jwlogo";w.id=h;if(m.file){var n=/(\w+)-(\w+)/.exec(m.position),j={},r=m.margin;3==n.length?(j[n[1]]=r,j[n[2]]=r):j.top=j.right=r;a("#"+h+" ",j);w.src=(m.prefix?m.prefix:"")+m.file;g.isMobile()?(new g.touch(w)).addEventListener(g.touchEvents.TAP,k):w.onclick=k}else w.style.display="none";return this};d.defaults={prefix:g.repo(),file:"logo.png",linktarget:"_top",margin:8,hide:!1,position:"top-right"};a(".jwlogo",{cursor:"pointer",position:"absolute","z-index":100,opacity:0});g.transitionStyle(".jwlogo", "visibility .25s, opacity .25s")})(jwplayer); (function(f){var g=f.html5,a=f.utils,c=a.css,d=void 0;g.menu=function(b,e,f,l){function h(a){return!a||!a.src?{}:{background:"url("+a.src+") no-repeat left","background-size":a.width+"px "+a.height+"px"}}function m(a,b){return function(){B(a);z&&z(b)}}function w(a,b){var c=document.createElement("div");a&&(c.className=a);b&&b.appendChild(c);return c}function n(a){return(a=f.getSkinElement("tooltip",a))?a:{width:0,height:0,src:d}}var z=l,j=new g.overlay(e+"_overlay",f);l=a.extend({fontcase:d,fontcolor:"#cccccc", fontsize:11,fontweight:d,activecolor:"#ffffff",overcolor:"#ffffff"},f.getComponentSettings("tooltip"));var r,p=[];this.element=function(){return j.element()};this.addOption=function(b,c){var d=w("jwoption",r);d.id=e+"_option_"+c;d.innerHTML=b;a.isMobile()?(new a.touch(d)).addEventListener(a.touchEvents.TAP,m(p.length,c)):d.addEventListener("click",m(p.length,c));p.push(d)};this.clearOptions=function(){for(;0b?(b=0,c=!0):b=-1==b||b>e.playlist.length?e.playlist.length- 1:b;if(c||b!=e.item)e.item=b,e.sendEvent(a.JWPLAYER_PLAYLIST_ITEM,{index:e.item})};e.setVolume=function(c){e.mute&&0a&&(a=0);1parseFloat(jwplayer.version))&&r("Incompatible player version"); if(0===a.length)j(z);else for(c=0;ch[b].end;)b++;b==h.length&&b--;if(h[b].text)if(a=h[b].text,0>a.indexOf("://")&&(a=m?m+"/"+a:a),0F)&&fa(F);h()}},emptied:l, ended:function(){N&&L!=c.IDLE&&(X=-1,Y=d,f(a.JWPLAYER_MEDIA_BEFORECOMPLETE),N&&(B(c.IDLE),Y=b,f(a.JWPLAYER_MEDIA_COMPLETE)))},error:function(){N&&(g.log("Error playing media: %o",u.error),R.sendEvent(a.JWPLAYER_MEDIA_ERROR,{message:"Error loading media: File could not be played"}),B(c.IDLE))},loadeddata:l,loadedmetadata:m,loadstart:l,pause:z,play:z,playing:z,progress:w,ratechange:l,readystatechange:l,seeked:function(){!D&&L!=c.PAUSED&&B(c.PLAYING)},seeking:I?j:l,stalled:l,suspend:l,timeupdate:h,volumechange:function(){f(a.JWPLAYER_MEDIA_VOLUME, {volume:Math.round(100*u.volume)});f(a.JWPLAYER_MEDIA_MUTE,{mute:u.muted})},waiting:j},s,y,u,E,t,x,C,F,D=b,L=c.IDLE,Q,J=-1,v=-1,R=new a.eventdispatcher,N=b,O,X=-1,ba=g.isAndroid(b,d),Z=g.isIOS(7),P=this,Y=b;g.extend(P,R);P.load=function(b){if(N){s=b;F=0;E=b.duration?b.duration:-1;t=0;O=s.sources;0>X&&(X=0);for(b=0;bb)&&(X=b,g.saveCookie("qualityLabel",O[b].label),f(a.JWPLAYER_MEDIA_LEVEL_CHANGED, {currentQuality:b,levels:r(O)}),b=u.currentTime,p(),P.seek(b)))};P.getCurrentQuality=function(){return X};P.getQualityLevels=function(){return r(O)};e||(e=document.createElement("video"));u=e;g.foreach(q,function(a,c){u.addEventListener(a,c,b)});Z||(u.controls=d,u.controls=b);u.setAttribute("x-webkit-airplay","allow");N=d}})(jwplayer); (function(f){var g=jwplayer.utils,a=jwplayer.events,c=a.state,d=g.css,b=g.isMobile(),e=g.isIPad(),k=g.isIPod(),l=g.isAndroid(),h=g.isIOS(),m=document,w="aspectMode",n="jwmain",z="jwvideo",j="jwplaylistcontainer",r=!0,p=!1,B="hidden",A="none",I="block",q=115,s=65;f.view=function(y,u){function E(a){a&&(a.element().addEventListener("mousemove",F,p),a.element().addEventListener("mouseout",D,p))}function t(a,b){var c=m.createElement(a);b&&(c.className=b);return c}function x(){clearTimeout(qa);qa=setTimeout(fa, Qa)}function C(){clearTimeout(qa);if(W.jwGetState()==c.PAUSED||W.jwGetState()==c.PLAYING)ga(),ja||(qa=setTimeout(fa,Qa))}function F(){clearTimeout(qa);ja=r}function D(){ja=p}function L(a){na.sendEvent(a.type,a)}function Q(b,c,e){g.exists(e)||(e=r);g.exists(b)&&g.exists(c)&&(G.width=b,G.height=c);T.style.width=isNaN(b)?b:b+"px";-1==T.className.indexOf(w)&&(T.style.height=isNaN(c)?c:c+"px");ca&&ca.redraw();U&&U.redraw(r);S&&(S.offset(U&&0<=S.position().indexOf("bottom")?U.height()+U.margin():0),setTimeout(function(){da&& da.offset("top-left"==S.position()?S.element().clientWidth+S.margin():0)},500));b=G.playlistsize;var f=G.playlistposition;J(c);if(Aa&&b&&("right"==f||"bottom"==f)){Aa.redraw();c={display:I};var h={};c[f]=0;h[f]=b;"right"==f?c.width=b:c.height=b;d(wa(j),c);d(wa(n),h)}v();e&&na.sendEvent(a.JWPLAYER_RESIZE)}function J(a){var b=g.bounds(T);K=0=b.height;U&&(K?(U.audioMode(r),ga(),ca.hidePreview(r),ca&& ca.hide(),la(p)):(U.audioMode(p),Ya(W.jwGetState())));S&&K&&Y();T.style.backgroundColor=K?"transparent":"#000"}function v(){ea&&-1==T.className.indexOf(w)&&g.stretch(G.stretching,ea,xa.clientWidth,xa.clientHeight,ea.videoWidth,ea.videoHeight)}function R(a){if(G.fullscreen)switch(a.keyCode){case 27:ua(p)}}function N(a){h||(a?(T.className+=" jwfullscreen",m.getElementsByTagName("body")[0].style["overflow-y"]=B):(T.className=T.className.replace(/\s+jwfullscreen/,""),m.getElementsByTagName("body")[0].style["overflow-y"]= ""))}function O(){var a;a=m.mozFullScreenElement||m.webkitCurrentFullScreenElement||m.msFullscreenElement||ea.webkitDisplayingFullscreen;a=!(!a||a.id&&a.id!=W.id);G.fullscreen!=a&&ua(a)}function X(){U&&(!K&&!G.getVideo().audioMode())&&U.hide()}function ba(){da&&(!K&&G.controls)&&da.show()}function Z(){da&&(!Ja&&!G.getVideo().audioMode())&&da.hide()}function P(){S&&!K&&S.show()}function Y(){S&&!G.getVideo().audioMode()&&S.hide(K)}function ka(){ca&&G.controls&&!K&&(!k||W.jwGetState()==c.IDLE)&&ca.show(); if(!b||!G.fullscreen)ea.controls=p}function fa(){clearTimeout(qa);qa=0;ra=p;var a=W.jwGetState();(!u.controls||a!=c.PAUSED)&&X();u.controls||Z();a!=c.IDLE&&a!=c.PAUSED&&(Z(),Y())}function ga(){ra=r;if((G.controls||K)&&!(k&&La==c.PAUSED))(!k||K)&&U&&U.show(),ba();Ia.hide&&P()}function la(a){(a=a&&!K)||l?d(wa(z),{visibility:"visible",opacity:1}):d(wa(z),{visibility:B,opacity:0})}function fb(){Ja=r;ua(p);G.controls&&ba()}function gb(){}function Ga(a){Ja=p;clearTimeout(Ha);Ha=setTimeout(function(){Ya(a.newstate)}, 100)}function nb(){X()}function Ya(a){La=a;switch(a){case c.PLAYING:G.getVideo().audioMode()?(la(p),ca.hidePreview(K),ca.setHiding(r),U&&(ga(),U.hideFullscreen(r)),ba(),P()):(la(r),v(),ca.hidePreview(r),U&&U.hideFullscreen(p),fa());break;case c.IDLE:la(p);K||(ca.hidePreview(p),ka(),ba(),P(),U&&U.hideFullscreen(p));break;case c.BUFFERING:ka();fa();b&&la(r);break;case c.PAUSED:ka(),ga()}}function wa(a){return"#"+W.id+(a?" ."+a:"")}function jb(a){var b=ha.getContext("2d");b.clearRect(0,0,q,s);b.fillStyle= "black";b.globalAlpha=0.5;b.fillRect(0,0,q,s);b.globalAlpha=1;b.strokeStyle="white";b.strokeRect(0,0,q,s);b.font="13px Arial";b.fillStyle="white";var c=ha.width/2,d=ha.height/2;b.textAlign="center";b.fillText("Skip ad in "+a,c,d+6)}function Oa(){na.sendEvent(a.JWPLAYER_AD_SKIPPED,{tag:Ta})}function Na(a,b){d(a,{display:b?I:A})}var W=y,G=u,T,za,ya,mb,Pa,qa=0,Qa=b?4E3:2E3,ea,xa,Sa,Da,aa,ha,V,cb,Ea=p,M=p,U,ca,da,S,Ia=g.extend({},G.componentConfig("logo")),H,Aa,K,ma=p,ra=p,Ja,ia,Ka,ja=p,La,Ta,na=new a.eventdispatcher; g.extend(this,na);this.getCurrentCaptions=function(){return H.getCurrentCaptions()};this.setCurrentCaptions=function(a){H.setCurrentCaptions(a)};this.getCaptionsList=function(){return H.getCaptionsList()};this.setup=function(e){if(!ma){W.skin=e;za=t("span",n);xa=t("span",z);ea=G.getVideo().getTag();xa.appendChild(ea);ya=t("span","jwcontrols");Da=t("span","jwinstream");Pa=t("span",j);mb=t("span","jwaspect");e=G.height;var h=G.componentConfig("controlbar"),l=G.componentConfig("display");J(e);H=new f.captions(W, G.captions);H.addEventListener(a.JWPLAYER_CAPTIONS_LIST,L);H.addEventListener(a.JWPLAYER_CAPTIONS_CHANGED,L);ya.appendChild(H.element());ca=new f.display(W,l);ca.addEventListener(a.JWPLAYER_DISPLAY_CLICK,function(a){L(a);b?ra?fa():ga():Ga(W.jwGetState());ra&&(clearTimeout(qa),qa=setTimeout(fa,Qa))});K&&ca.hidePreview(r);ya.appendChild(ca.element());S=new f.logo(W,Ia);ya.appendChild(S.element());da=new f.dock(W,G.componentConfig("dock"));ya.appendChild(da.element());W.edition&&!b?ia=new f.rightclick(W, {abouttext:G.abouttext,aboutlink:G.aboutlink}):b||(ia=new f.rightclick(W,{}));G.playlistsize&&(G.playlistposition&&G.playlistposition!=A)&&(Aa=new f.playlistcomponent(W,{}),Pa.appendChild(Aa.element()));U=new f.controlbar(W,h);U.addEventListener(a.JWPLAYER_USER_ACTION,x);ya.appendChild(U.element());k&&X();setTimeout(function(){Q(G.width,G.height,p)},0);za.appendChild(xa);za.appendChild(ya);za.appendChild(Da);T.appendChild(za);T.appendChild(mb);T.appendChild(Pa);m.addEventListener("webkitfullscreenchange", O,p);ea.addEventListener("webkitbeginfullscreen",O,p);ea.addEventListener("webkitendfullscreen",O,p);m.addEventListener("mozfullscreenchange",O,p);m.addEventListener("MSFullscreenChange",O,p);m.addEventListener("keydown",R,p);W.jwAddEventListener(a.JWPLAYER_PLAYER_READY,gb);W.jwAddEventListener(a.JWPLAYER_PLAYER_STATE,Ga);W.jwAddEventListener(a.JWPLAYER_MEDIA_ERROR,nb);W.jwAddEventListener(a.JWPLAYER_PLAYLIST_COMPLETE,fb);Ga({newstate:c.IDLE});b||(ya.addEventListener("mouseout",function(){clearTimeout(qa); qa=setTimeout(fa,10)},p),ya.addEventListener("mousemove",C,p),g.isIE()&&(xa.addEventListener("mousemove",C,p),xa.addEventListener("click",ca.clickHandler)));E(U);E(da);E(S);d("#"+T.id+"."+w+" .jwaspect",{"margin-top":G.aspectratio,display:I});e=g.exists(G.aspectratio)?parseFloat(G.aspectratio):100;h=G.playlistsize;d("#"+T.id+".playlist-right .jwaspect",{"margin-bottom":-1*h*(e/100)+"px"});d("#"+T.id+".playlist-right ."+j,{width:h+"px",right:0,top:0,height:"100%"});d("#"+T.id+".playlist-bottom .jwaspect", {"padding-bottom":h+"px"});d("#"+T.id+".playlist-bottom ."+j,{width:"100%",height:h+"px",bottom:0});d("#"+T.id+".playlist-right ."+n,{right:h+"px"});d("#"+T.id+".playlist-bottom ."+n,{bottom:h+"px"})}};var ua=this.fullscreen=function(d){g.exists(d)||(d=!G.fullscreen);if(d){if(G.getVideo().audioMode())return;b?(ea.webkitEnterFullScreen(),G.setFullscreen(r)):G.fullscreen||(N(r),T.requestFullScreen?T.requestFullScreen():T.mozRequestFullScreen?T.mozRequestFullScreen():T.webkitRequestFullScreen?T.webkitRequestFullScreen(): T.msRequestFullscreen&&T.msRequestFullscreen(),G.setFullscreen(r))}else b?(ea.webkitExitFullScreen(),G.setFullscreen(p),e&&(ea.controls=r,ea.controls=p)):G.fullscreen&&(N(p),G.setFullscreen(p),m.cancelFullScreen?m.cancelFullScreen():m.mozCancelFullScreen?m.mozCancelFullScreen():m.webkitCancelFullScreen?m.webkitCancelFullScreen():m.msExitFullscreen&&m.msExitFullscreen()),e&&W.jwGetState()==c.PAUSED&&setTimeout(ka,500);U&&U.redraw();ca&&ca.redraw();da&&da.redraw();v();G.fullscreen?Ka=setInterval(v, 200):clearInterval(Ka);setTimeout(function(){var b=g.bounds(za);G.width=b.width;G.height=b.height;na.sendEvent(a.JWPLAYER_RESIZE)},0);setTimeout(function(){if(Ea&&aa){var a=g.bounds(document.getElementById(W.id));aa.style.top=a.height/2-32+"px"}},1E3)};this.resize=Q;this.resizeMedia=v;var kb=this.completeSetup=function(){d(wa(),{opacity:1})},Ha;this.setupInstream=function(a,b,d,e){Na(wa("jwinstream"),r);Na(wa("jwcontrols"),p);Da.appendChild(a);V=b;cb=d;Ga({newstate:c.PLAYING});Ea=r;if(0<=e){aa||(aa= t("div","jwinstreamskip"),aa.id="skipContainer",ha=t("canvas"),aa.appendChild(ha));a=g.bounds(document.getElementById(W.id));aa.style.top=a.height/2-Math.floor(s/2)+"px";aa.style.width=q+"px";aa.style.height=s+"px";aa.style.visibility=G.controls?"visible":"hidden";ha.width=q;ha.height=s;Da.appendChild(aa);jb(e);var f=setInterval(function(){var a=m.getElementById(W.id),b=g.bounds(a).width;a!=T?clearInterval(f):0j&&(j=1);var k;d.beginPath();k=e+h/2;d.strokeStyle="white";d.lineWidth=j;d.moveTo(e-h/2,f);d.lineTo(k,f);d.stroke()}};this.addButton=function(a,b,d,e){da&&(da.addButton(a,b,d,e),W.jwGetState()==c.IDLE&&ba())};this.removeButton=function(a){da&&da.removeButton(a)};this.setControls= function(b){var c=G.controls,d=b?r:p;G.controls=d;d!=c&&(d?Ga({newstate:W.jwGetState()}):(fa(),ca&&ca.hide()),Ea&&(b?(V.show(),cb.show(),aa&&(aa.style.visibility="visible")):(V.hide(),cb.hide(),aa&&(aa.style.visibility="hidden"))),na.sendEvent(a.JWPLAYER_CONTROLS,{controls:d}))};this.forceState=function(a){ca.forceState(a)};this.releaseState=function(){ca.releaseState(W.jwGetState())};this.getSafeRegion=function(){var a={x:0,y:0,width:0,height:0};if(!G.controls)return a;U.showTemp();da.showTemp(); var b=g.bounds(za),c=b.top,d=Ea?g.bounds(m.getElementById(W.id+"_instream_controlbar")):g.bounds(U.element()),e=Ea?!1:0