var ZeroClipboard={version:"1.0.7",clients:{},moviePath:"ZeroClipboard.swf",nextId:1,$:function(a){if(typeof(a)=="string"){a=document.getElementById(a)}if(!a.addClass){a.hide=function(){this.style.display="none"};a.show=function(){this.style.display=""};a.addClass=function(b){this.removeClass(b);this.className+=" "+b};a.removeClass=function(d){var e=this.className.split(/\s+/);var b=-1;for(var c=0;c<e.length;c++){if(e[c]==d){b=c;c=e.length}}if(b>-1){e.splice(b,1);this.className=e.join(" ")}return this};a.hasClass=function(b){return !!this.className.match(new RegExp("\\s*"+b+"\\s*"))}}return a},setMoviePath:function(a){this.moviePath=a},dispatch:function(d,b,c){var a=this.clients[d];if(a){a.receiveEvent(b,c)}},register:function(b,a){this.clients[b]=a},getDOMObjectPosition:function(c,a){var b={left:0,top:0,width:c.width?c.width:c.offsetWidth,height:c.height?c.height:c.offsetHeight};while(c&&(c!=a)){b.left+=c.offsetLeft;b.top+=c.offsetTop;c=c.offsetParent}return b},Client:function(a){this.handlers={};this.id=ZeroClipboard.nextId++;this.movieId="ZeroClipboardMovie_"+this.id;ZeroClipboard.register(this.id,this);if(a){this.glue(a)}}};ZeroClipboard.Client.prototype={id:0,ready:false,movie:null,clipText:"",handCursorEnabled:true,cssEffects:true,handlers:null,glue:function(d,b,e){this.domElement=ZeroClipboard.$(d);var f=99;if(this.domElement.style.zIndex){f=parseInt(this.domElement.style.zIndex,10)+1}if(typeof(b)=="string"){b=ZeroClipboard.$(b)}else{if(typeof(b)=="undefined"){b=document.getElementsByTagName("body")[0]}}var c=ZeroClipboard.getDOMObjectPosition(this.domElement,b);this.div=document.createElement("div");var a=this.div.style;a.position="absolute";a.left=""+c.left+"px";a.top=""+c.top+"px";a.width=""+c.width+"px";a.height=""+c.height+"px";a.zIndex=f;if(typeof(e)=="object"){for(addedStyle in e){a[addedStyle]=e[addedStyle]}}b.appendChild(this.div);this.div.innerHTML=this.getHTML(c.width,c.height)},getHTML:function(d,a){var c="";var b="id="+this.id+"&width="+d+"&height="+a;if(navigator.userAgent.match(/MSIE/)){var e=location.href.match(/^https/i)?"https://":"http://";c+='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="'+e+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+d+'" height="'+a+'" id="'+this.movieId+'" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+ZeroClipboard.moviePath+'" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="'+b+'"/><param name="wmode" value="transparent"/></object>'}else{c+='<embed id="'+this.movieId+'" src="'+ZeroClipboard.moviePath+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="'+d+'" height="'+a+'" name="'+this.movieId+'" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+b+'" wmode="transparent" />'}return c},hide:function(){if(this.div){this.div.style.left="-2000px"}},show:function(){this.reposition()},destroy:function(){if(this.domElement&&this.div){this.hide();this.div.innerHTML="";var a=document.getElementsByTagName("body")[0];try{a.removeChild(this.div)}catch(b){}this.domElement=null;this.div=null}},reposition:function(c){if(c){this.domElement=ZeroClipboard.$(c);if(!this.domElement){this.hide()}}if(this.domElement&&this.div){var b=ZeroClipboard.getDOMObjectPosition(this.domElement);var a=this.div.style;a.left=""+b.left+"px";a.top=""+b.top+"px"}},setText:function(a){this.clipText=a;if(this.ready){this.movie.setText(a)}},addEventListener:function(a,b){a=a.toString().toLowerCase().replace(/^on/,"");if(!this.handlers[a]){this.handlers[a]=[]}this.handlers[a].push(b)},setHandCursor:function(a){this.handCursorEnabled=a;if(this.ready){this.movie.setHandCursor(a)}},setCSSEffects:function(a){this.cssEffects=!!a},receiveEvent:function(d,e){d=d.toString().toLowerCase().replace(/^on/,"");switch(d){case"load":this.movie=document.getElementById(this.movieId);if(!this.movie){var c=this;setTimeout(function(){c.receiveEvent("load",null)},1);return}if(!this.ready&&navigator.userAgent.match(/Firefox/)&&navigator.userAgent.match(/Windows/)){var c=this;setTimeout(function(){c.receiveEvent("load",null)},100);this.ready=true;return}this.ready=true;this.movie.setText(this.clipText);this.movie.setHandCursor(this.handCursorEnabled);break;case"mouseover":if(this.domElement&&this.cssEffects){this.domElement.addClass("hover");if(this.recoverActive){this.domElement.addClass("active")}}break;case"mouseout":if(this.domElement&&this.cssEffects){this.recoverActive=false;if(this.domElement.hasClass("active")){this.domElement.removeClass("active");this.recoverActive=true}this.domElement.removeClass("hover")}break;case"mousedown":if(this.domElement&&this.cssEffects){this.domElement.addClass("active")}break;case"mouseup":if(this.domElement&&this.cssEffects){this.domElement.removeClass("active");this.recoverActive=false}break}if(this.handlers[d]){for(var b=0,a=this.handlers[d].length;b<a;b++){var f=this.handlers[d][b];if(typeof(f)=="function"){f(this,e)}else{if((typeof(f)=="object")&&(f.length==2)){f[0][f[1]](this,e)}else{if(typeof(f)=="string"){window[f](this,e)}}}}}}};(function(i,b){function c(y,v){var u={},x=false,w=true,z;for(z in y){if(z==="constructor"||v&&z in v&&v[z]===y[z]){w=false;continue}u[z]=y[z];x=true}if(y.toString&&y.toString!==({}).toString){if(!(v&&v.toString===y.toString)){u.toString=y.toString;x=true}else{w=false}}return w?y:x?u:b}function p(x){if(!x||x===m.prototype){return[]}var w="constructor" in x&&x.constructor!==({}).constructor&&x.constructor.prototype!==x&&x.constructor.prototype,v=p(w),u=c(x,w);if(u){v.push(u)}return v}function g(){var C=arguments,B,w,z,y,v,F=[],A=[],E,D,u,x=C.length;while(x--){D=typeof C[x];if(D==="string"){B=C[x]}else{if(C[x]===null){w=null}else{if(C[x] instanceof Array){y=C[x]}else{if(z===b&&D!=="function"){z=C[x]}else{if(C[x]!==b){if(D==="function"&&w!==null){w=C[x]}A.push(C[x])}}}}}}B=B||(z&&z.className)||"unNamedClass";x=A.length;while(x--){if(typeof A[x]==="function"){if("implementList" in A[x]){A.push.apply(A,A[x].implementList);if(A[x]!==w&&A[x].implementList[A[x].implementList.length-1]===m.prototype){A.length--}}E=A[x].className;A[x]=A[x].prototype}else{if("constructor" in A[x]){if("prototype" in A[x].constructor&&"className" in A[x].constructor){A.push(A[x].constructor.prototype);if("implementList" in A[x].constructor){A.push.apply(A,A[x].constructor.implementList)}}}}if(w&&A[x]===w.prototype){continue}if(E){F.push(E);E=b}F.push.apply(F,p(A[x]))}if(w!==(w||null)){w=m;A.push(m.prototype)}if(A.length){this.implementList=A}x=F.reverse().length;while(x--){if(typeof F[x]==="string"){E=F[x]}else{w=k(B+">"+E,w,F[x])}}if(z&&"__statics__" in z){for(x in z.__statics__){if(z.__statics__[x]===true&&x in z){this[x]=z[x]}else{this[x]=z.__statics__[x]}}delete z.__statics__}if(w){w.createPrototype=true;z=new w(z)}this.prototype=z;this.contains=m.prototype.contains;this.getConstructor=m.prototype.getConstructor;this.toString=m.prototype.toString;this.className=B;return this}function r(u){var v;if(u!==b&&u!==null){for(v in u){if((!(v in this))||this[v]!==u[v]){this[v]=u[v]}}if(u.toString&&u.toString!==({}).toString&&u.toString!==this.toString){this.toString=u.toString}}}function q(){var u;this.instanceNum=this.constructor.instancesCount||0;this.constructor.instancesCount=this.instanceNum+1;u=("getInstance" in this)&&this.getInstance.apply(this,arguments);if((!u||u===this)&&"init" in this){u=this.init.apply(this,arguments)}if((!u||u===this)&&"destroy" in this){if(i.addEventListener){i.addEventListener("unload",this.callback("destroy"),false)}else{if(i.attachEvent){i.attachEvent("onunload",this.callback("destroy"))}}}return u}function a(v,u){if(!(this instanceof v)){v.argsAsArray=true;return new v(u)}this.constructor=v;if(v.argsAsArray){delete v.argsAsArray;u=u[0]}if(v.createPrototype){delete v.createPrototype;r.apply(this,u)}else{return q.apply(this,u)}}function k(){var u=function(){u.createPrototype=true;return a.call(this,u,arguments)};return g.apply(u,arguments)}function t(){var u=function(){return a.call(this,u,arguments)};g.apply(u,arguments);u.getSuper=m.prototype.getSuper;u.execSuper=m.prototype.execSuper;if("classSetup" in u.prototype){u.prototype.classSetup.call(u)}return u}function s(w,B,A,x){var u,y,v=this.getConstructor(),z;this._super=this._super||{};this._super.length=this._super.length||0;z=w in this._super?0:1;this._super[w]=A;this._super.length+=z;u=A.prototype[w].apply(this,x);if(!z){this._super[w]=B}else{delete this._super[w];this._super.length--;if(!this._super.length){delete this._super}}return u}function e(w,u,v){var y=w[u];if(typeof y!=="function"){throw new Error('The "'+u+"\" method doesn't  exist")}v=v||[];function x(){var z=v.slice(0);z.push.apply(z,arguments);if(w[u]===x){return y.apply(w,z)}return w[u].apply(w,z)}return x}function m(u){if(!(this instanceof m)){return t.apply(this,arguments)}m.createPrototype=true;a.call(this,m,arguments)}g.call(m,"EasyPrototype",null,{callback:function f(u){if(arguments.length>1){return e(this,u,[].slice.call(arguments,1))}if(!("_callbacks" in this)){this._callbacks={}}if(!(u in this._callbacks)){this._callbacks[u]=e(this,u)}return this._callbacks[u]},lazyCallback:function l(){var z=this,v=arguments,u=0,y,x;if(typeof v[1]==="number"){u=v[1];x=[].slice.call(v,2);v.length=1;x.push.apply(v,x)}y=this.callback.apply(this,v);return function w(){var A=arguments;i.setTimeout(function(){y.apply(z,A)},0)}},getSuper:function o(B,x){var y=this,C=("constructor" in this&&this.constructor!==Function)?this.constructor:this,v=this.getConstructor(B),w=v,u,z;if(C!==this&&w===C&&(!("_super" in this&&B in this._super))&&w.prototype[B]!==this[B]){z=w}while(!z){u="constructor" in w.prototype&&w.prototype.constructor!==w&&w.prototype.constructor;if(u){if(!(B in u.prototype)||u.prototype[B].is_abstract){break}if(u.prototype[B]!==w.prototype[B]){z=u}w=u}}if(z){return function A(){return s.call(y,B,v,z,x||arguments)}}return function A(){}},execSuper:function d(u,v){return this.getSuper(u).apply(this,v||[])},getConstructor:function j(v,w){var u;if(w!==b){if(v in this.prototype&&this.prototype[v]===w.prototype[v]){if("constructor" in this.prototype&&this.prototype.constructor!==this&&"getConstructor" in this.prototype.constructor){return this.prototype.constructor.getConstructor(v,this)}return this}return w}if(v&&"_super" in this&&this._super[v]){u=this._super[v]}else{u=("constructor" in this&&this.constructor!==Function)?this.constructor:this}if(v&&"constructor" in u.prototype&&u.prototype.constructor!==u&&"getConstructor" in u.prototype.constructor){return u.prototype.constructor.getConstructor(v,u)}return u},contains:function h(v){var u=this.getConstructor(),w=("implementList" in u&&u.implementList.length)||0;if(v===this||v===u||v===u.prototype){return true}if(typeof v==="function"){v=v.prototype}while(w--&&u.implementList[w]!==v){}return w!==-1},toString:function n(){return this.getConstructor().className}});m.prototype.constructor=m;m.createProtoClass=k;m.createClass=t;i.EasyPrototype=i.EasyPrototype||m}(this));(function(m,u,E,b){if(m.EasyPrototype===b){throw new E("Dépendence non satisfaite : EasyPrototype")}function B(H){return function(J){var I=H[J];if(I===b){if(typeof H._others==="function"){return H._others(J)}I=H._others}if(I===true){I=J}return I}}function v(I){var H=I.length,J={};while(H--){if(typeof I[H]!=="string"){continue}J[I[H]]=true}return J}if(!u.prototype.indexOf){u.prototype.indexOf=function(I){var H=this.length;while(H--&&I!==this[H]){}return H}}var C=EasyPrototype.createClass("EventListener",{init:function x(K,I,J,H){if(typeof K!=="function"){throw new E("Event listener must be a function")}if(J===b&&typeof I==="boolean"){H=J;J=I;I=b}if(I!==b&&typeof I!=="number"){throw new E("Event listener's iterations must be undefined or a number")}if(J!==b&&typeof J!=="boolean"){throw new E("Event listener's rattrapage must be undefined or a boolean")}if(H!==b&&typeof H!=="function"){throw new E("Event listener's reseter must be undefined or a function")}this.action=K;this.iterations=I;this.rattrapage=J!==false;this.reseter=H},match:function k(H){return H===this||H===this.action||(H instanceof u&&(H.indexOf(this)!==-1||H.indexOf(this.action)!==-1))}}),e=EasyPrototype.createClass("EventExecution",{init:function x(L,I,K,H){var J;this._name=I;this._event=L;this._listeners=K;this._waiting=0;this._allListenerTriggered=false;this._finished=false;this._params=[{type:I,wait:this.callback("_onListenerWait"),continuer:this.callback("_onListenerContinuer")}];for(J=0;J<H.length;J++){this._params.push(H[J])}m.setTimeout(this.callback("_execute"),0)},_execListener:function F(H){if(H.iterations===0){return}if(H.iterations!==b){H.iterations--}try{H.action.apply(this._event.manager._subject,this._params)}catch(I){console.error(I)}},addListener:function o(H){if(!this._allListenerTriggered){this._listeners.push(H)}else{this._execListener(H)}},_execCallback:function p(){if(this._finished&&typeof this._callback==="function"){var H=this._callback,I=this._event.manager._subject;this._callback=b;m.setTimeout(function(){H.call(I)},0)}},whenFinished:function D(H){delete (this.whenFinished);this._callback=H;this._execCallback()},_checkFinished:function h(){if(this._allListenerTriggered&&this._waiting===0){this._finished=true;this._execCallback()}},_onListenerWait:function l(){this._waiting++},_onListenerContinuer:function i(){if(!this._finished){this._waiting--;this._checkFinished()}},_execute:function j(){var H;for(H=0;H<this._listeners.length;H++){this._execListener(this._listeners[H])}this._allListenerTriggered=true;this._checkFinished()}}),G=EasyPrototype.createClass("Event",{init:function x(I,H){this.name=H;this.manager=I;this._listeners=[]},_removeListener:function f(H){var I=this._listeners.slice(H+1);this._listeners.length=H;this._listeners.push.apply(this._listeners,I);if(!this._listeners.length&&this.manager.whenEventHasNoListener){this.manager.whenEventHasNoListener(this.name)}},addListener:function o(I){var H=I.rattrapage&&(this._lastExecution!==b);if(!(H&&I.iterations===1)){if(this._listeners.push(I)===1&&this.manager.whenEventHasListener){this.manager.whenEventHasListener(this.name)}}if(H){this._lastExecution.addListener(I)}},trigger:function s(){var H=this._listeners.length;while(H--){if(this._listeners[H].iterations<=0){this._removeListener(H)}}this._lastExecution=new e(this,this.name,this._listeners.slice(),arguments);return this._lastExecution},unbind:function g(I){var H;if(I===b){this._listeners=[];if(this.manager.whenEventHasNoListener){this.manager.whenEventHasNoListener(this.name)}}else{H=this._listeners.length;while(H--){if(this._listeners[H].match(I)){this._removeListener(H)}}}},resetTriggeredState:function a(){var H=this._listeners.length;this._lastExecution=b;while(H--){if(this._listeners[H].reseter!==b){try{this._listeners[H].reseter(this.name)}catch(I){console.error(I)}}}},listenerIndexes:function c(J){var H=[],I=this._listeners.length;while(I--){if(this._listeners[I].match(J)){H.push(I)}}return H.reverse()}}),q=EasyPrototype.createClass("EventsManagerInterface",{getInstance:function z(){if(this.constructor===q){y.argsAsArray=true;return new y(arguments)}this.execSuper("getInstance",arguments)},init:function x(){this.events=new y(this);this.execSuper("init",arguments)},addEventListener:function t(){return this.events.addEventListener.apply(this.events,arguments)},addEventListeners:function n(){return this.events.addEventListeners.apply(this.events,arguments)},unbind:function g(){return this.events.unbind.apply(this.events,arguments)}}),y=EasyPrototype.createClass("EventsManager",q,{getInstance:function z(){},init:function x(I){var H;this._events={};this._extending=[];this._globalListeners=[];if(I!==b&&(!("contains" in I)||!I.contains(q))){I.addEventListener=this.callback("addEventListener");I.addEventListeners=this.callback("addEventListeners");I.unbind=this.callback("unbind")}this._subject=I||this;for(H=1;H<arguments.length;H++){if(typeof arguments[H]==="function"||arguments[H] instanceof C||arguments[H] instanceof u){this.addEventListener("*",arguments[H])}else{this.addEventListeners(arguments[H])}}},_registerGlobalListener:function r(H){this._globalListeners.push(H)},getEvent:function d(H,I){var J;if(this._events[H]===b){this._events[H]=new G(this,H);J=this._globalListeners.length;while(J--){if(this._globalListeners[J].match(I)){continue}this._events[H].addListener(this._globalListeners[J])}}return this._events[H]},addEventListeners:function n(I){var H;for(H in I){if(I[H]){this.addEventListener(H,I[H])}}},addEventListener:function t(I,M,K,L,H){var J;if(!(M instanceof C)){if(M instanceof u){if(M.length<=4&&typeof M[1]==="number"){M=new C(M[0],M[1],M[2],M[3])}else{for(J=0;J<M.length;J++){if(M[J]===b){continue}this.addEventListener(I,M[J],K,L,H)}return}}else{M=new C(M,K,L,H)}}if(I==="*"){this._registerGlobalListener(M);I=[];for(J in this._events){I.push(J)}}else{if(I.indexOf(" ")!==-1){I=I.split(" ")}}if(I instanceof u){J=I.length;while(J--){this.addEventListener(I[J],M)}return}this.getEvent(I).addListener(M)},trigger:function s(H){return this.getEvent(H).callback("trigger").apply(this,[].slice.call(arguments,1))},resetTriggeredState:function a(H){if(H===b){for(H in this._events){this._events[H].resetTriggeredState()}}else{if(this._events[H] instanceof G){this._events[H].resetTriggeredState()}}},unbind:function g(H,K){var I,J;if((H||"*")==="*"){if(K===b){this._globalListeners.length=0}else{I=this._globalListeners.length;while(I--){if(this._globalListeners[I].match(K)){J=this._globalListeners.slice(I+1);this._globalListeners.length=I;this._globalListeners.push.apply(this._globalListeners,J)}}}for(H in this._events){this._events[H].unbind(K)}}else{if(H.indexOf(" ")!==-1){H=H.split(" ")}if(H instanceof u){I=H.length;while(I--){this.unbind(H[I],K)}}else{if(this._events[H] instanceof G){this._events[H].unbind(K)}else{if(K===b){this.getEvent(H).unbind()}else{I=this._globalListeners.length;while(I--){if(this._globalListeners[I].match(K)){this.getEvent(H,K);break}}}}}}},extend:function A(H,M){var O=this,J,L,K;if(typeof M!=="function"){if(typeof M==="string"){M=M.split(" ")}if(M instanceof u){M=v(M)}if(typeof M==="object"){L=M;M=B(M)}else{M=b}}function I(P){var S=M?M.call(this._subject,P.type,arguments):P.type,Q=[S],R=arguments.length;if(!S){return}if(typeof S!=="string"||S.indexOf(" ")!==-1){throw new E("nom d'événement invalide")}while(R-->1){Q[R]=arguments[R]}P.wait();O.callback("trigger").apply(O,Q).whenFinished(P.continuer)}function N(P){P=M?M.call(this._subject,P):P;if(!P){return}O.resetTriggeredState(P)}if(L&&!L._others){J=[];for(K in L){J.push(K)}J=J.join(" ")}else{J="*"}H.addEventListener(J,I,b,b,N);this._extending.push([H,J,I,N])},unextend:function w(H){var I=this._extending.length;while(I--){if(this._extending[I][0]===H){H.unbind(this._extending[I][1],this._extending[I][2]);break}}}});y.EventListener=C;m.EventsManager=m.EventsManager||q}(this,this.Array,this.Error));(function(k,n,i){var c=n.location.hostname.replace(/^((?:pp|dev|intg)(\.|$))?.*$/,"$1"),b=k.EasyPrototype.createProtoClass("FileInjection",k.EventsManager,{instances:{},injectTimeout:2000,defaultLoadSupposition:false,env:c,staticDomain:{dev:"http://dev.static.francetelevisions.fr"}[c]||"http://"+c+"www.francetelevisions.fr",getUid:function(r){return(r.type||this.type)+r.url+r.charset+(r.document||n).location.href},getInstance:function j(s){if("multiload" in s&&s.multiload===true){return}var r=this.instances[this.getUid(s)];if(r){if("onload" in s&&typeof s.onload==="function"){r.addEventListener("load",s.onload)}if("onerror" in s&&typeof s.onerror==="function"){r.addEventListener("error",s.onerror)}if("loadControl" in s&&typeof s.loadControl==="function"){r.registerLoadControl(s.loadControl)}}return r},init:function p(s){this.execSuper("init");this.multiload=s.multiload===true;if(!this.multiload){this.instances[this.getUid(s)]=this}this.url=s.url;this.document=s.document||n;try{this.document.getElementsByTagName("BODY")}catch(r){this.document=n}if("type" in s){this.type=s.type}if("charset" in s){this.charset=s.charset}if("timeout" in s){this.injectTimeout=s.timeout}if(this.url.substr(0,1)==="/"){this.url=this.staticDomain+this.url}if("onload" in s&&typeof s.onload==="function"){this.addEventListener("load",s.onload)}if("onerror" in s&&typeof s.onerror==="function"){this.addEventListener("error",s.onerror)}if("loadControl" in s&&typeof s.loadControl==="function"){this.registerLoadControl(s.loadControl)}this.createNode();this.loadTimer=k.setTimeout(this.callback("loadHandler",this.defaultLoadSupposition),this.injectTimeout);this.injectNode()},injectNode:function f(){if(!this.controlLoad(false)){this.injectElement(this.node)}else{throw new Error("Tentative de double chargement du fichier : "+this.url)}},injectElement:function m(r){(this.document.getElementsByTagName("HEAD")[0]||this.document.getElementsByTagName("BODY")[0]||this.document.documentElement).appendChild(r)},registerLoadControl:function h(r){var t=true,s;if(!("loadControls" in this)){this.loadControls=[r]}else{s=this.loadControls.length;while(t&&s--){t=this.loadControls!==r}if(t){this.loadControls.push(r)}}},controlLoad:function e(t){if(!("loadControls" in this)){return t}var r=true,s=this.loadControls.length;while(r&&s--){r=!!this.loadControls[s].call(this)}return r},loadHandler:function q(r){if("loadTimer" in this){k.clearTimeout(this.loadTimer);delete this.loadTimer}if(!("loaded" in this)||this.loaded!==true){this.loaded=this.controlLoad(r);this.events.trigger(this.loaded?"load":"error")}},__statics__:{patternSelfPath:/^(https?:\/\/[^\/]+)?\/layoutftv\/arches\/common\/javascripts\//,searchStaticDomain:function l(t,s){var v=n.getElementsByTagName(t),u,r=v.length;while(r--){u=b.patternSelfPath.exec(v[r].getAttribute(s));if(u){b.prototype.staticDomain=k.staticDomain=u[1]||n.location.protocol+"//"+n.location.hostname;return true}}return false},onWindowLoad:function a(){if(k.staticDomain){return}var s={script:"src",link:"href"},r;for(r in s){if(b.searchStaticDomain(r,s[r])){break}}}}},["createNode"]);if(k.addEventListener){k.addEventListener("load",b.onWindowLoad,false)}else{if(k.attachEvent){k.attachEvent("onload",b.onWindowLoad)}}b.onWindowLoad();k.ScriptInjection=k.ScriptInjection||k.EasyPrototype.createClass("ScriptInjection",b,{type:"text/javascript",createNode:function o(){this.node=this.document.createElement("script");this.node.type=this.type;this.node.async=true;if("charset" in this){this.node.charset=this.charset}this.node.src=this.url;if(this.multiload){if(this.node.src.indexOf("?")===-1){this.node.src+="?"}else{this.node.src+="&"}this.node.src+="_="+parseInt(Math.random()*10000000)}this.node.onload=this.node.onreadystatechange=this.callback("loadCatcher");this.node.onerror=this.callback("loadHandler",false)},loadCatcher:function d(){if("readyState" in this.node&&this.node.readyState!=="complete"&&this.node.readyState!=="loaded"){return}this.loadHandler(true)}});k.StyleInjection=k.StyleInjection||k.EasyPrototype.createClass("StyleInjection",b,{type:"text/css",injectTimeout:1000,defaultLoadSupposition:true,createNode:function o(){this.node=this.document.createElement("link");this.node.type=this.type;this.node.rel="stylesheet";this.node.media="all";if("charset" in this){this.node.charset=this.charset}this.node.href=this.url},injectNode:function f(){this.execSuper("injectNode");this.checkLoadTimer=k.setTimeout(this.callback("checkLoad"),100)},checkLoad:function g(){if("loadControls" in this){if(this.controlLoad(false)){this.loadHandler(true)}else{if("loadTimer" in this){this.checkLoadTimer=k.setTimeout(this.callback("checkLoad"),100)}}}},loadHandler:function q(){k.clearTimeout(this.checkLoadTimer);this.execSuper("loadHandler",arguments)}})}(this,this.document));(function(window,$,EasyPrototype,undef){if(EasyPrototype===undef){throw new Error("Dépendence non satisfaite : EasyPrototype")}var framework={register:function(){var args=[].slice.call(arguments).reverse();args.push(FrameworkLoader);EasyPrototype.createClass.apply(this,args.reverse())}},FrameworkLoader=EasyPrototype.createProtoClass("FrameworkLoader",{autoLoad:false,classSetup:function classSetup(){var name=this.className;if(framework[name]){throw new Error("Double chargement du framework "+name)}framework[name]=new this();if($!==undef){$[name]=framework[name].callback("exec")}},init:function init(){if(this.autoLoad){this.askLoad()}},exec:function exec(action){action=action||function(){};FrameworkLoader.events.addEventListener(this.constructor.className,action)},askLoad:function askLoad(){if("_loadAsked" in this){return}this._loadAsked=true;FrameworkLoader.onStartLoading(this.callback("startLoading"))},startLoading:function startLoading(){this.load()},load:function load(onload,onerror,checkloaded){var file={url:this.scriptSrc};if(onload===undef){onload=this.callback("onReady")}if(onerror===undef){onerror="onError" in this&&this.callback("onError")}if(checkloaded===undef){checkloaded="checkloaded" in this&&this.callback("checkloaded")}if(typeof onload==="function"){file.onload=onload}if(typeof onerror==="function"){file.onerror=onerror}if(typeof checkloaded==="function"){file.loadControl=checkloaded}if(this.scriptCharset){file.charset=this.scriptCharset}new window.ScriptInjection(file)},onReady:function onReady(){FrameworkLoader.events.trigger(this.constructor.className)},__statics__:{loadingDelay:100,paramsControl:/^\s*\{\s*frameworkParams\s*:\s*\{(.|\s)*\}\s*\}\s*$/,events:new window.EventsManager(),mergeRecursive:function mergeRecursive(obj1,obj2){var p;if(typeof obj1!=="object"){obj1={}}for(p in obj2){if(p in obj2){obj1[p]=typeof obj2[p]==="object"?mergeRecursive(obj1[p],obj2[p]):obj2[p]}}return obj1},collectScriptParams:function collectScriptParams(){var txt=$(this).text().replace("//<![CDATA[","").replace("//]]>",""),params,frameworkName;if(txt&&FrameworkLoader.paramsControl.test(txt)){try{eval("FrameworkLoader.paramsReceiver = "+txt);if("frameworkParams" in FrameworkLoader.paramsReceiver){params=FrameworkLoader.paramsReceiver.frameworkParams}}catch(e){console.error(e);return}delete FrameworkLoader.paramsReceiver;for(frameworkName in params){if(frameworkName!=="LoaderPrototype"&&frameworkName!=="register"){if(!(frameworkName in framework)){framework[frameworkName]={}}framework[frameworkName].inlineParams=FrameworkLoader.mergeRecursive(framework[frameworkName].inlineParams,params[frameworkName])}}}},onWindowLoad:function onWindowLoad(){if($){$("script[src]").map(FrameworkLoader.collectScriptParams).get()}window.setTimeout(FrameworkLoader.events.callback("trigger","windowLoaded"),FrameworkLoader.loadingDelay)},onFrameworkNeeded:function onFrameworkNeeded(FrameworkName){if(FrameworkName!=="windowLoaded"&&FrameworkName in framework){framework[FrameworkName].askLoad()}}}});FrameworkLoader.onStartLoading=FrameworkLoader.events.callback("addEventListener","windowLoaded");FrameworkLoader.events.whenEventHasListener=FrameworkLoader.onFrameworkNeeded;if("addEventListener" in window){window.addEventListener("load",FrameworkLoader.onWindowLoad,false)}else{if("attachEvent" in window){window.attachEvent("onload",FrameworkLoader.onWindowLoad)}}framework.LoaderPrototype=FrameworkLoader;window.framework=window.framework||framework}(this,this.jQuery,this.EasyPrototype));(function(g,f,d){(function(m){for(var l in m){if(!m[l]){throw new f("Dépendence non satisfaite : "+l)}}}({EasyPrototype:!!g.EasyPrototype,EventsManager:!!g.EventsManager}));var h={onChange:"changed",onTrue:"toTrue",onFalse:"toFalse"},b=EasyPrototype.createProtoClass("BinaryStatePrototype",g.EventsManager,{init:function j(l){this.changing=false;this.value=(arguments.length===1&&l===d)?d:l===true;this.execSuper("init")},onChangeDone:function i(l){this.events.trigger(h.onChange,this.value).whenFinished(l);this.changing=false},setValue:function c(l,m){l=l==true;if(this.value!==l){this.events.resetTriggeredState(h.onChange);if(this.changing){this.events.addEventListener(h.onChange,this.callback("setValue",l,m),1)}else{this.changing=true;this.value=l;this.events.resetTriggeredState(h[l?"onFalse":"onTrue"]);this.events.trigger(h[l?"onTrue":"onFalse"]).whenFinished(this.callback("onChangeDone",m))}}},toString:function a(){return(this.value===d)?"undefined":(this.value===true)?"true":"false"},valueOf:function k(){return(this.value===d)?NaN:(this.value===true)?1:0}});g.BinaryState=g.BinaryState||EasyPrototype.createClass("BinaryState",b,{init:function j(){this.execSuper("init",arguments);this.setTrue=this.callback("setValue",true);this.setFalse=this.callback("setValue",false)},toggle:function e(l){this.setValue(!this.value,l)}})}(this,this.Error));(function(h,g,a){(function(l){for(var k in l){if(!l[k]){throw new g("Dépendence non satisfaite : "+k)}}}({EasyPrototype:!!h.EasyPrototype,BinaryState:!!h.BinaryState}));var d={AND:function(l,k){return l&&k},OR:function(l,k){return l||k},XOR:function(l,k){return(l||k)&&!(l&&k)}};h.DerivedBinaryState=h.DerivedBinaryState||EasyPrototype.createClass("DerivedBinaryState",BinaryState.prototype.constructor,{init:function j(){var l,k;switch(typeof arguments[0]){case"string":if(d[arguments[0]]===a){throw new g("operateur inconnu")}arguments[0]=d[arguments[0]];case"function":this.operator=arguments[0];k=[].slice.call(arguments,1);break;default:this.operator=d.AND;k=arguments;break}this.childStates=[];this.defaultAffirmation=true;this.affirmations=[];for(l=0;l<k.length;l++){if(typeof k[l]==="boolean"){if(this.childStates.length===0){this.defaultAffirmation=k[l]}else{this.affirmations[this.childStates.length-1]=k[l]}}else{this.affirmations[this.childStates.length]=this.defaultAffirmation;k[l].addEventListener("changed",this.callback("refreshValue"),false);this.childStates.push(k[l])}}this.execSuper("init",[this.getValue()])},operate:function f(l,k){return(l===a)?k:this.operator(l,k)},getValue:function c(){var k=this.childStates.length,l;while(k--){if(this.childStates[k].value===a){continue}l=this.operate(l,this.childStates[k].value==this.affirmations[k])}return l},refreshValue:function b(){this.setValue(this.getValue())},add:function i(k,l){if(l===a){l=this.defaultAffirmation}else{l=!!l}if(this.childStates.length===0){this.defaultAffirmation=l}this.affirmations[this.childStates.length]=l;k.addEventListener("changed",this.callback("refreshValue"));this.childStates.push(k);this.refreshValue()},remove:function e(k){var m,l=[],o=[],n;for(m=0;m<this.childStates.length;m++){if(this.childStates[m]===k){continue}l.push(this.childStates[m]);o.push(this.affirmations[m]);if(this.childStates[m].value!==a){n=this.operate(n,this.childStates[m].value===this.affirmations[m])}}this.childStates=l;this.affirmations=o;this.setValue(n)}})}(this,this.Error));(function(c,g,h,b){var e={Chrome:{string:g.userAgent,subString:"Chrome"},OmniWeb:{string:g.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/"},Safari:{string:g.vendor,subString:"Apple",versionSearch:"Version"},Opera:{prop:c.opera},iCab:{string:g.vendor,subString:"iCab"},Konqueror:{string:g.vendor,subString:"KDE"},Firefox:{string:g.userAgent,subString:"Firefox"},Camino:{string:g.vendor,subString:"Camino"},MSIE:{string:g.userAgent,subString:"MSIE",versionSearch:"MSIE"},Netscape:{string:g.userAgent,subString:"Netscape"},Mozilla:{string:g.userAgent,subString:"Gecko",versionSearch:"rv"},NetscapeOld:{string:g.userAgent,subString:"Mozilla",versionSearch:"Mozilla"}},f={Windows:{string:g.platform,subString:"Win"},MacOS:{string:g.platform,subString:"Mac"},iOS:{string:g.userAgent,subString:"iPhone"},Linux:{string:g.platform,subString:"Linux"}},d;function j(m){var l,k;for(var l in m){if(m[l].prop||(m[l].string&&m[l].string.indexOf(m[l].subString)!==-1)){d=m[l].versionSearch||l;k=l;break}}return k}function i(m){var l,k;if(d){k=m.indexOf(d);if(k!==-1){l=h(m.substring(k+d.length+1))}}return l}function a(n,m){var l,k;if(typeof n==="string"){k=n===m}else{if(n instanceof b){l=n.length;while(!k&&l--){k=n[l]===m}}else{if(typeof n==="object"){k=n[m]}}}return k}c.systemInfos={os:j(f),browser:{type:j(e),version:i(g.userAgent)||i(g.appVersion)},match:function(q){var l,r,s=a(q,this.os),p=!!s,m,n,o,k=true;if(p&&s!==true){m=a(s,this.browser.type);r=!!m;if(r&&m instanceof b){l=m.length;o=false;while(!o&&l--){if(m[l]===">"){k=false;continue}n=h(m[l]);o=(n===this.browser.version)||(!k&&(n>this.browser.version))}}}return p&&!(r===false||o===false)}}}(this,this.navigator,this.parseFloat,this.Array));(function(g,f,c){if(g.EasyPrototype===c){throw new Error("Dépendance non satisfaite : EasyPrototype")}function m(q,n){var o,t,s=[],p=m.restrictions[q]||[],r=m.patterns[q]||[];for(o in n){t=n[o]&&m.patterns[o]&&p.indexOf(o)===-1?m(o,n[o]):n[o]+"";if(t===""){continue}if(q==="attrs"&&o==="className"){o="class"}s.push([r[1],o,r[2],t,r[3]].join(""))}return s.join(r[0])}m.patterns={attrs:[" ","",'="','"'],params:["",'<param name="','" value="','" />'],style:[";","",":",""],flashvars:["&amp;","","=",""],InitParams:[",","","=",""]};m.restrictions={attrs:["attrs","params"],params:["attrs","params","style"],style:["attrs","params","style","flashvars","InitParams"],flashvars:["attrs","params","style","flashvars","InitParams"],InitParams:["attrs","params","style","flashvars","InitParams"]};function l(p,o){for(var n in o){if(m.patterns[n]&&typeof o[n]==="object"&&typeof p[n]==="object"){p[n]=l(p[n],o[n])}else{p[n]=o[n]}}return p}var e=EasyPrototype.createClass("ObjectSrc",g.EventsManager,{init:function k(){this.execSuper("init");this.tagName="object";this.attrs={};this.params={};if(arguments.length){this.set.apply(this,arguments)}},_createObject:function h(){var n,o=document.createElement("DIV");o.style.display="none";o.innerHTML=this.toString();n=o.childNodes[0];this.events.trigger("node_created",n);return o.childNodes[0]},set:function i(n,o){if(arguments.length===1&&typeof n==="object"){l(this,n)}else{this[n]=o}},setAttrs:function d(n,o){this.set.apply(this.attrs,arguments)},setParams:function a(n){this.set.apply(this.params,arguments)},toString:function b(){var p,o=[],n=e.patterns[this.tagName].length;if(this.id&&!this.attrs.id){this.attrs.id=this.id}if(this.className&&this.className!==this.constructor.prototype.className&&!this.attrs.className){this.attrs.className=this.className}if(!this.attrs.width){this.attrs.width=this.width||0}if(!this.attrs.height){this.attrs.height=this.height||0}while(n--){p=e.patterns[this.tagName][n];if(p instanceof f){l(this[p[0]],this[p[1]]);p=p[0]}if(m.patterns[p]){o.push(m(p,this[p]))}else{o.push(p)}}return o.reverse().join("")},getObject:function j(n){if(!this.object||n){this.object=this._createObject()}return this.object}});e.patterns={object:["<object ","attrs",">","params","</object>"],embed:["<embed ",["attrs","params"],"></embed>"],video:["<video ",["attrs","params"],"></video>"]};e.assocToString=m;g.ObjectSrc=g.ObjectSrc||e}(this,this.Array));(function(i,j,l,g,q,k,d){(function(s){for(var r in s){if(!s[r]){throw new Error("Dépendence non satisfaite : "+r)}}})({jQuery:!!g,EasyPrototype:!!i.EasyPrototype,EventsManager:!!i.EventsManager,BinaryState:!!q,DerivedBinaryState:!!k});var h=3;i.SyncDate=i.SyncDate||EasyPrototype.createClass("SyncDate",i.EventsManager,{getInstance:function f(s){var r=s||"default";if(!(r in i.SyncDate.instances)){i.SyncDate.instances[r]=this}return i.SyncDate.instances[r]},init:function o(r){this.execSuper("init");this._syncUrl=r||SyncDate.defaultUrl;this.synching=new q();this.gotResult=new q();this.maxTriesReached=new q();this.lastRequestError=new q(d);this.ready=new i.DerivedBinaryState(false,this.synching,this.lastRequestError,this.gotResult,true);this.error=new i.DerivedBinaryState(false,this.gotResult,this.synching,this.maxTriesReached,true);this.events.extend(this.ready,{toTrue:"ready"});this.events.extend(this.error,{toTrue:"error"});this.sync()},_onBeforeSend:function p(){this._syncSendTime=+new j},_correctData:function e(){this.corrected=true;var r=this._xhr.getResponseHeader("Date");return r?+new j(r):+new j()},_onRequestSuccess:function n(r){if(!this.corrected){r=this._correctData()}if(typeof r!=="number"){this.lastRequestError.setTrue();throw new Error("données de synchronisation invalide")}this.delta=r-Math.round((+new j+this._syncSendTime)/2);this.lastRequestError.setFalse();this.gotResult.setTrue();this._tries=0},_onRequestError:function c(r){if(!l(this._xhr.status)){this._onRequestSuccess(this._correctData());return}if(this._tries++<h){i.setTimeout(this.callback("sync"),1000)}else{this._tries=0;this.maxTriesReached.setTrue()}this.lastRequestError.setTrue()},sync:function m(){var r;if(this.synching.value){return}this.corrected=false;this.synching.setTrue();r=this._syncUrl;r+=(r.indexOf("?")===-1)?"?":"&";r+="_="+parseInt(Math.random()*10000000);this._xhr=g.ajax({url:r,type:"HEAD",headers:{"Cache-Control":"no-cache"},dataType:"text",beforeSend:this.callback("_onBeforeSend"),dataFilter:this.callback("_correctData"),success:this.callback("_onRequestSuccess"),error:this.callback("_onRequestError"),complete:this.synching.callback("setFalse")})},getTime:function b(){return +new j+(this.delta||0)},getDate:function a(){return new j(this.getTime())},__statics__:{defaultUrl:"/staticftv/syncDate/syncDateGetter",instances:{}}})}(this,this.Date,this.isNaN,this.jQuery,this.BinaryState,this.DerivedBinaryState));(function(aP,aA,aC,ax){(function(a4){for(var a3 in a4){if(!a4[a3]){throw new aA("Dépendence non satisfaite : "+a3)}}}({jQuery:!!aC,EasyPrototype:!!aP.EasyPrototype,EventsManager:!!aP.EventsManager,BinaryState:!!aP.BinaryState,DerivedBinaryState:!!aP.DerivedBinaryState,SyncDate:!!aP.SyncDate}));var J="/appftv/webservices/video/getInfosVideo.php?src=cappuccino&video-type=liste&template=ftvi&template-format=vignette&id-externe=",q="/appftv/webservices/video/getInfosVideo.php?src=cappuccino&video-type=simple&template=ftvi&template-format=complet&id-externe=",aH="/appftv/webservices/video/lecture.php?id-video-ext=",aL="/appftv/webservices/video/getVideosConnexes.php?id-externe=",l="/appftv/webservices/video/getFichierSmi.php?smi=",aY={"":"mms://a988.v101995.c10199.e.vm.akamaistream.net/7/988/10199/3f97c7e6/ftvigrp.download.akamai.com/10199/cappuccino/production/publication","france-dom-tom":"mms://videozones.francetv.fr"},V={"":"rtmp://video-rtmp.francetv.fr/ondemand/mp4:cappuccino/publication","france-dom-tom":"rtmp://videozones-rtmp.francetv.fr/ondemand/mp4:cappuccino/publication"},T="http://info.francetelevisions.fr/ref/images/",H="http://info.francetelevisions.fr/?id-video=",Y=/^\/geoloc(\/([^\/]*)\/.*)$/,au=40,aw=3,A=500,ab=false,i=false,c={},Q={},ah={},a0;function O(a3,a5){function a4(){return(aC(this).children("id-externe").text()===a5)}return a3.filter(a4)}function h(a4){var a5,a3=aC("video",a4.documentElement||a4);for(a5 in i){ah[a5].setRequestSuccess(O(a3,a5))}}function o(a4,a3){for(var a5 in i){ah[a5].setRequestError(a4,a3)}}function aF(){i=false;j()}function j(){if(ab||i){return}var a5,a4=[],a3=false;i={};for(a5 in c){if(c[a5].isComplet()){if(a4.length!==0){continue}a3=true}i[a5]=c[a5];a4.push(a5);delete (c[a5]);if(a3||a4.length>=au){break}}if(!a4.length){i=false;return}if(a4.length===1&&!a4[0]){h(aC([]));return}a4=(a3?q:J)+a4.join("+OR+");aC.ajax({url:a4,dataType:"xml",timeout:15000,success:h,error:o,complete:aF})}function aZ(a3){var a4=a3.getId();if(c[a4]!==ax){return}c[a4]=a3;ah[a4].setRequesting();j()}function U(){return{id:aC(this).children("id").text(),"nom-public":aC(this).children("nom-public").text()}}function aN(){return +aC(this).children("id").text()}function ad(){return aC(this).children("libelle").text()}function ar(){return T+aC(this).children("url").text()}function X(){return aC(this).text()}function aQ(){return aC(this).children("libelle").text()}function D(){return aC(this).children("nom").text()}function w(){return aC(this).children("nom-prenom").text()}function C(){return !!aC(this).children("libelle:contains(URL_SMOOTH)").length}function am(){return aC(this).children("extension").text()}function az(){return am().toLowerCase()}function a2(){return{position:aC(this).children("position").text(),titre:aC(this).children("titre").text(),resume:aC(this).children("resume").text(),debut:aC(this).children("timecode-debut").text(),fin:aC(this).children("timecode-fin").text()}}function ae(){return{position:aC(this).children("position").text(),libelle:aC(this).children("libelle").text(),url:aC(this).children("url").text()}}function f(){return"sami:http://"+aP.document.location.hostname+l+aC(this).children("url").text()}var aO=EasyPrototype.createClass("ObjetCappu",aP.EventsManager,{init:function ai(a5,a4,a3){this.execSuper("init");if(a3){this.addEventListeners(a3)}this.id=a5;this.requesting=new aP.BinaryState();this.reponseRecu=new aP.BinaryState();this.lastRequestError=new aP.BinaryState(ax);this.objetExists=new aP.BinaryState(ax);this.objetPublished=new aP.BinaryState(ax);if(a0===ax){a0=new aP.SyncDate()}this.ready=new aP.DerivedBinaryState(a0.ready,this.reponseRecu,this.objetExists);this.events.extend(this.requesting,{toTrue:"requesting",toFalse:"requestFinished"});this.events.extend(this.lastRequestError,{toTrue:"requestError",toFalse:"requestSuccess"});this.events.extend(this.reponseRecu,{toTrue:"reponseRecu"});this.events.extend(this.objetExists,{toFalse:"noObjetCappu"});this.events.extend(this.ready,{toTrue:"objetCappuReady"});this.complet=!!a4;ah[this.id]={setRequesting:this.callback("_setRequesting"),setRequestSuccess:this.callback("_setRequestSuccess"),setRequestError:this.callback("_setRequestError")};this._getCappuData()},_setRequesting:function P(){this.lastRequestError.value=ax;this.requesting.setTrue()},_onRequestSuccess:function af(){var a3=this;this.lastRequestError.setFalse();this.reponseRecu.setTrue();this.objetExists.setValue(this.data!==ax);if(this.objetExists.value){this.data.children().each(function(){if(this.childNodes.length===1&&this.childNodes[0].nodeType===4){a3[this.nodeName]=aC(this).text()}});this.objetPublished.setValue(this.data.children("statut").text()==="online");if(this.isDirect()){a0.addEventListener("ready",function(){if(!a3.isDirectStarted()){a3.objetPublished.setValue(false)}})}}},_setRequestSuccess:function z(a3){this.data=(a3.length!==0)?a3:ax;this.requesting.setFalse(this.callback("_onRequestSuccess"))},_getCappuData:function v(){aZ(this)},_setRequestError:function L(){this.requesting.setFalse();this.lastRequestError.setTrue();if(this.tries<aw){this.tries+=1;aP.setTimeout(this.callback("_getCappuData"),A)}else{this.tries=aw}},getRawData:function N(){return this.data?this.data.clone():this.data},exists:function aI(){return this.objetExists.value},isPublished:function at(){return this.objetPublished.value&&(this.isDirectStarted()!==false)},isDirect:(function(){var a4;function a3(){if(this.data!==ax){a4=this.data.find("> type > libelle").text()==="LIEN_EXTERNE"&&this.duree!=="00:00:00"}return a4}return function a5(){return(a4===ax)?a3.call(this):a4}}()),getDateNearestDiffusion:function aB(){if(!a0){return}if(!this._nearestDiffusion){var a3=aP.Math.floor(a0.getDate()/1000),a5=this.getDatesDiffusions(),a8,a4=a5.length,a6,a7;while(a4--){a6=+a5[a4];a7=Math.abs(a6-a3);if(a8===ax||a7<a8){a8=a7;this._nearestDiffusion=a6}}}return this._nearestDiffusion},getDirectStartDelay:function K(){if(!this.isDirect()){return}var a3=this.getDateNearestDiffusion();if(a3){return a3-aP.Math.floor(a0.getDate()/1000)}return},isDirectStarted:function aR(){var a3=this.getDirectStartDelay();if(a3!==ax){return a3<=0}return},isDirectFinished:function ap(){if(!this.isDirect()){return}var a4=aP.Math.floor(a0.getDate()/1000),a6=this.getDateNearestDiffusion(),a5,a3;if(a6){a5=this.getDuree().split(":");a3=a6+(a5[0]*3600)+(a5[1]*60)+(a5[2]*1);return a4>=a3}return true},isComplet:function k(){return this.complet},setComplet:function ao(){if(!this.complet){this.complet=true;this.refreshData()}},refreshData:function g(){this.tries=aw;this._getCappuData()},registerPlayCount:function S(){aP.ObjetCappu.registerPlayCount(this.id)},getIdExterne:function a(){return this.id},getId:function m(){return this.id},getType:function p(){return this.getTypeEditorial().replace(/^TYPE_/,"")},getTypeEditorial:function a1(){return this.data.children("type-editorial").children("libelle").text()},getTitre:function I(){return this.getTitreCourt()},getTitreCourt:function n(){return this.data.children("titre-public").text()},getTitreLong:function x(){return this.data.children("accroche").text()},getCategories:function F(){return this.data.children("categories").children("categorie").map(U).get()},getCategorie:function aV(){return this.getCategories()[0]},getDuree:function aU(){return this.data.children("duree").text()},getChaines:function s(a3){a3=a3===true;return this.data.children("chaines").children("chaine").map(a3?aN:ad).get()},getChainesIds:function u(){return this.getChaines(true)},getImages:function aK(){return this.data.children("images").children("image").map(ar).get()},getDatePublication:function av(){return this.data.children("dates").children("publication").text()},getDateDepublication:function aa(){return this.data.children("dates").children("depublication").text()},getDateProduction:function M(){return this.data.children("dates").children("creation").text()},getDatesDiffusions:function al(){return this.data.children("dates").children("diffusions").children("diffusion").children("date").map(X).get()},getDiffusionsProches:function aE(){var a5=a0.getTime(),a7=this.getDatesDiffusions(),a9,a3,a8,a6=a7.length,a4=[ax,ax];while(a6--){a8=((a7[a6]*1000)-a5)||1;if(a8>0){a9=Math.min(a9||a8,a8);if(a9===a8){a4[1]=a7[a6]}}else{a3=Math.max(a3||a8,a8);if(a3===a8){a4[0]=a7[a6]}}}return a4},getLastDiffusion:function aT(){return this.getDiffusionsProches()[0]},getNextDiffusion:function ak(){return this.getDiffusionsProches()[1]},getNearestDiffusion:function aJ(){var a3=this.getDiffusionsProches();if(a3[0]===ax||a3[1]===ax){return a3[0]||a3[1]}return((a3[0]+a3[1])/2)<a0.getTime()?a3[0]:a3[1]},isDirectRunning:function W(){var a3;if(this.isDirect()){a3=this.getLastDiffusion();if(a3){return a0.getTime()<=a3+this.getDureeMs()}return false}},getGeolocalisation:function aS(){return this.data.children("geolocalisation").text()},getRegion:function r(){return this.data.children("region").text()},getMotsCles:function E(){return this.data.children("mots-cles").children("mot-cle").map(aQ).get()},getSources:function t(){return this.data.children("sources").children("source").map(D).get()},getAuteurs:function Z(){return this.data.children("auteurs").children("auteur").map(w).get()},getVignette:function aG(){return this.getImages()[0]},getURL:function an(){return H+this.id},getFichiers:function aq(a3){a3=a3!==false;if(this.data.find("> type > libelle").text()==="LIEN_EXTERNE"){a3=false}return this.data.children("fichiers").children("fichier").map(function(){var a8,a5,a7,a4="",a6=aC(this).children("chemin").text();if(a3){a5=Y.exec(a6);a7=a5?a5[2]:"";if(aC(this).children("extension").text()==="MP4"){a8=V}else{a8=aY;a6=a5?a5[1]:a6}a4=a8[a7]||a8[""]}return{position:aC(this).children("position").text(),url:a4+a6+aC(this).children("nom").text(),hauteur:aC(this).children("hauteur").text(),largeur:aC(this).children("largeur").text()}}).get()},getUrlFlux:function b(){if(!this.complet){throw new aA("Impossible de récupérer l'URL du flux vidéo. Objet cappu pas en mode complet.")}return(this.getFichiers()[0]||{}).url},getUrlSmooth:function e(){var a3=a0.getDate(),a5,a4,a6;if(!this.isDirect()){a4=this.getDateNearestDiffusion();if(a4&&((a4-aP.Math.floor(a3/1000))>-(18*60*60))){a6=this.getTitreCourt();a5=a3.getMinutes();if(a5<10){a5=[0,a5].join("")}a5=~~([a3.getHours(),a5].join(""));if(a6.indexOf("JT 12-13")===0&&a5>1230&&a5<1845){return"http://ftvislhd-s.smooth.francetv.fr/live/218466_218467/journal_le_1214.isml/Manifest"}if(a6.indexOf("JT 13h")===0&&a5>1330&&a5<1945){return"http://ftvislhd-s.smooth.francetv.fr/live/218466_218467/journal_de_13h.isml/Manifest"}if(a6.indexOf("JT 20h")===0&&(a5>2030||a5<1245)){return"http://ftvislhd-s.smooth.francetv.fr/live/218466_218467/journal_de_20h.isml/Manifest"}if(a6.indexOf("JT 19-20")===0&&(a5>1930||a5<1145)){return"http://ftvislhd-s.smooth.francetv.fr/live/218466_218467/journal_le_1920.isml/Manifest"}}}return this.data.children("sites").children("site").filter(C).eq(0).children("url").text()||ax},getExtensions:function ag(a3){return this.data.children("fichiers").children("fichier").map(a3?az:am).get()},getChapitres:function aj(){return this.data.children("sequences").children("sequence").map(a2).get()},getLiens:function aW(){return this.data.children("sites").children("site").map(ae).get()},getSignaletiqueCSA:function aD(){return this.data.children("signaletique-csa").text()},getResume:function ac(){return this.data.children("resume").text()},getSousTitres:function B(a3){a3=(typeof a3==="string")?a3.toLowerCase():ax;return this.data.children("sous-titrage").children("fichier-sous-titres").filter(function(){return !a3||(aC(this).children("nom").text().indexOf(a3)!==-1)}).map(f).get()},hasDRM:function d(){return this.data.children("informations-secondaires").text()==="DRM"},getNote:function ay(){return aP.parseFloat(this.data.children("note").text())},getLectures:function aX(){return aP.parseInt(this.data.children("lectures").text())},onGotVideoConnexes:function R(a3,a4){this._videoConnexes=aC("video_connexe",a4).map(function(){return{url:H+aC(this).children("id_externe").text(),titre:aC(this).children("titre").text(),date_diffusion:aC(this).children("date_diffusion").text(),visuel:aC(this).children("visuel").text()}}).get();a3&&a3(this._videoConnexes)},getVideoConnexes:function(a3){var a4=this;if(!("_videoConnexes" in this)){aC.ajax({url:aL+this.id,dataType:"xml",success:this.callback("onGotVideoConnexes",a3),error:function(){a3&&a3([])}})}else{a3(this._videoConnexes)}}});aP.ObjetCappu=aP.ObjetCappu||{get:function G(a8,a6,a7){if(a8 instanceof aP.Array){var a5=a8.length,a3=[],a4=ab;aP.ObjetCappu.pauseRequests();while(a5--){a3[a5]=aP.ObjetCappu.get(a8[a5],a6,a7)}aP.ObjetCappu.pauseRequests(a4);return a3}if(typeof a6==="boolean"){a7=a6;a6=ax}else{a7=a7===true}if(Q[a8]===ax){Q[a8]=new aO(a8,a7,a6)}else{if(a6!==ax){Q[a8].addEventListeners(a6)}if(a7){Q[a8].setComplet()}}return Q[a8]},pauseRequests:function y(a3){ab=a3!==false;j()},playRequests:function aM(){aP.ObjetCappu.pauseRequests(false)},registerPlayCount:function S(a3){if(Q[a3]===ax){throw new aA("ObjetCappu non instancié, impossible de décompter une lecture")}aC.ajax({url:aH+a3,dataType:"text",timeout:4000})},prototype:aO.prototype}}(this,this.Error,this.jQuery));(function(j,g,f,d){if(f===d){throw new g("Dépendence non satisfaite : jQuery")}var h={},e=0,a;function m(o){if(h[o]!==d){delete (h[o]);if(!--e){j.clearInterval(a);a=d}}}function k(p){var o=h[p];j.setTimeout(function(){var q=o.length;while(q--){f("#"+p).trigger(o[q])}},0);m(p)}function l(){for(var o in h){if(document.getElementById(o)){k(o)}}}function i(p,o){if(h[p]===d){h[p]=[o];e++;if(!a){a=j.setInterval(l,50)}}else{h[p].push(o)}}function b(r,o){if(h[r]!==d){var p,q=h[r].length;while(q--){if(h[r][q]===o){for(p=q;p<h[r].length;p++){h[r][p]=h[r][p+1]}if(!--h[r].length){m(r)}}}}}function n(o){f.event.special[o]=f.event.special[o]||{setup:function(){f(this).each(function(){if(this.id!==d){i(this.id,o)}})},teardown:function(){f(this).each(function(){b(this.id,o)})}}}f.registerWatchForDomInsertEvent=f.registerWatchForDomInsertEvent||n;f.fn.watchForDomInsert=function c(o){return this.each(function(){if(this.id!==d){var p=this.id+"WatchForDomInsert";n(p);f(this).bind(p,o)}})}}(this,this.Error,this.jQuery));(function(m,v,G,e){(function(J){for(var I in J){if(!J[I]){throw new G("Dépendence non satisfaite : "+I)}}}({EasyPrototype:!!m.EasyPrototype,EventsManager:!!m.EventsManager,BinaryState:!!m.BinaryState,DerivedBinaryState:!!m.DerivedBinaryState}));var r=/\.([a-z0-9]+)(\?|$)/i,A=/^([a-z]+):\/\//i,w=[],B=EasyPrototype.createClass("MediaInfos",m.EventsManager,{getInstance:function C(J,I){return(I===e||e)&&B.instances[J]},init:function z(J,I){this.execSuper("init");if(I===e){B.instances[J]=this}this.url=J;this.metaType="simpleUrl";this.types=[];this.metaData={};this.extraData={};this.children=[];if(I){this.parent=I}this.errors=[];this._childrenBuildingNbr=0;this.parsing=new m.BinaryState(true);this.childing=new m.BinaryState();this.building=new m.DerivedBinaryState("OR",this.parsing,this.childing);this.error=new m.BinaryState();this.ready=new m.DerivedBinaryState(false,this.building,this.error);this.events.extend(this.parsing,{toFalse:"parsingFinished"});this.events.extend(this.childing,{toTrue:"childingStarted",toFalse:"childingFinished"});this.events.extend(this.building,{toFalse:"buildingFinished"});this.events.extend(this.error,{toTrue:"error"});this.events.extend(this.ready,{toTrue:"ready"});var K=w.length;while(K--){if(w[K].match.call(this)){w[K].call(this);break}}},_onChildBuildingFinished:function p(){this._childrenBuildingNbr--;if(this._childrenBuildingNbr===0){this.childing.setFalse()}},_addChild:function h(I){this.childing.setTrue();var J=new B(I,this);this.children.push(J);this._childrenBuildingNbr++;J.addEventListener("buildingFinished",this.callback("_onChildBuildingFinished"),1);return J},_setError:function f(J,I){this.lastErrorMessage={message:J,object:I};if(!this.errors){this.errors=[]}this.errors.push(this.lastErrorMessage);this.error.setTrue()},_addDef:function i(K){var J,I=true;if(K instanceof v){J=K.length;while(J--){this._addDef(K[J])}}else{J=this.definition.length;while(I&&J--){I=!n(K,this.definition[J])}if(I){this.definition.push(K)}}},typeMatch:function F(I){return B.typeMatch(this.types,I)},protocolMatch:function g(I){return B.protocolMatch(this.protocol,I)},definitionMatch:function l(J,I){return B.definitionMatch(this[I?"getSelfDefinition":"getDefinition"](),J)},getFirstDefinitionMatch:function q(K){if(this.definitionMatch(K,true)){return this}var I,J=this.children.length;while(I===e&&J--){I=this.children[J].getFirstDefinitionMatch(K)}return I},getUrlMatch:function o(K,J){var M=this.url,I,L=this.children.length;if(J===false){M=M.replace(/#.*$/,"");K=K.replace(/#.*$/,"");if(!/[a-z]+:\/\//.test(M)){if(M.substr(0,1)!=="/"){var N=m.document.location.pathname.split("/");N.length--;while(M.substr(0,3)==="../"){M=M.substr(3);N.length--}N.push(M);M=N.join("/")}M="http://"+m.document.location.hostname+M}if(M.indexOf(K)!==-1){return this}}else{if(M===K){return this}}while(I===e&&L--){I=this.children[L].getUrlMatch(K,J)}return I},getSelfDefinition:function t(){var I=this.selfDefinition||{protocol:this.protocol,type:this.types};if(!this.parsing.value){this.selfDefinition=I}return I},getDefinition:function s(){var J,I;if(!this.definition){this.definition=[this.getSelfDefinition()];I=this.children.length;while(I--){this._addDef(this.children[I].getDefinition())}}J=this.definition;if(!this.ready.value){delete (this.definition)}return J},getMeta:function b(K){var I,J;if(K instanceof v){for(I=0;!J&&I<K.length;I++){J=this.metaData[K[I]]}}else{J=this.metaData[K]}return J},getMetaFlux:function E(I){if(I){this.waitMetaReady("flux",I)}else{return this.getMeta("flux")}},getMetaLive:function D(I){if(I){this.addEventListener("ready error",this.callback("waitMetaReady",["live","flux"],I))}else{return this.getMeta(["live","flux"])}},waitMetaReady:function a(K,J){var I=K&&this.getMeta(K);if(I){if(I.constructor.className==="ObjetCappu"){I.addEventListener("objetCappuReady",this.callback("onMetaReady",I,J));I.addEventListener("noObjetCappu requestError",this.callback("onMetaReady",e,J))}else{if("WebService" in m&&I instanceof WebService){I.addEventListener("ready",this.callback("onMetaReady",I,J));I.addEventListener("abort",this.callback("onMetaReady",e,J))}else{this.onMetaReady(I,J)}}}else{this.onMetaReady(e,J)}},onMetaReady:function k(I,J){J(I)}});function j(J,I){return I&&B.typeMatch(J.type,I.type)&&B.protocolMatch(J.protocol,I.protocol)}function d(I,J){return(J===I)||!J}function y(I,J){return(J===I)||(J==="*")||(J===e)}function c(L,J,M){var K=false,I;if(L instanceof v){I=L.length;while(!K&&I--){K=c(L[I],J,M)}}else{if(J instanceof v){I=J.length;while(!K&&I--){K=c(L,J[I],M)}}else{K=M(L,J)}}return K}B.protocolMatch=function g(I,J){return c(I,J,y)};B.typeMatch=function F(I,J){return c(I,J,d)};B.definitionMatch=function l(J,I){return c(J,I,j)};function n(I,N){if(I.protocol!==N.protocol||I.type.length!==N.type.length){return false}var M=I.type.length,L,K,J=true;while(J&&M--){L=N.type.length;K=false;while(!K&&L--){K=N.type[L]===I.type[M]}J=K}return J}B.registerPlugin=function u(I,J){J.match=I;w.push(J)};B.getUrlProtocol=function x(I){return(A.exec(I)||[])[1]||m.location.protocol.slice(0,-1)};B.getUrlExtension=function H(I){return(r.exec(I)||[])[1]};B.instances={};B.extensionsTypes={html:["text/html","application/xhtml+xml"],xhtml:["text/html","application/xhtml+xml"],pdf:["application/pdf"],asx:["application/asx","video/x-ms-asf"],asf:["video/x-ms-asf","application/asf"],wma:["audio/x-ms-wma"],wmv:["audio/x-ms-wmv","video/x-ms-wmv"],wsx:["video/wsx"],swf:["application/x-shockwave-flash"],flv:["video/x-flv"],mp3:["audio/mpeg","audio/x-mpeg"],rm:["application/vnd.rn-realmedia"],rv:["video/x-pn-realvideo","video/vnd.rn-realvideo"],ra:["audio/x-pn-realaudio","audio/x-pn-realaudio"],ram:["video/x-pn-realvideo"],rpm:["audio/x-pn-realaudio-plugin"],mpg:["video/mpeg"],mpeg:["video/mpeg"],mp4:["video/mpeg"],avi:["video/x-msvideo"],mov:["video/quicktime"],qt:["video/quicktime"],au:["audio/basic"],aif:["audio/x-aiff"],aac:["audio/aac"],ogv:["video/theora"],xap:["application/x-silverlight","application/x-silverlight-2"],xaml:["application/x-silverlight","application/x-silverlight-2"],smil:["video/smil"],f4m:["video/zeri"]};m.MediaInfos=m.MediaInfos||B;B.registerPlugin(function(){return true},function(){this.protocol=B.getUrlProtocol(this.url);var I=B.getUrlExtension(this.url);if(I){this.types=B.extensionsTypes[I]||[]}this.parsing.setFalse()})}(this,this.Array,this.Error));(function(c,b){if(!c.MediaInfos){throw new Error("Dépendence non satisfaite : MediaInfos")}var d,a=/\/appftv\/akamai\/flash-permanent.*\/asx\.php/i;c.MediaInfos.registerPlugin(function(){d=a.exec(this.url);return !!d},function(){this.protocol="http";this.types=c.MediaInfos.extensionsTypes.asx||[];this.parsing.setFalse()})}(this));(function(c,b){(function(f){for(var e in f){if(!f[e]){throw new Error("Dépendence non satisfaite : "+e)}}}({MediaInfos:!!c.MediaInfos,ObjetCappu:!!c.ObjetCappu}));var d,a=/http:\/\/(?:(?:local|intg|pp|dev)\.)?(?:info|videos?).francetelevisions.fr(?:\/video(?:-info)?)?(?:(?:\/(?:index-fr.php)?)?\?(?:.*&)?(?:id-)?video=|\/)([a-z0-9_]*)(?:$|&.*)/i;c.MediaInfos.registerPlugin(function(){d=a.exec(this.url);return !!d},function(){function h(){var k=this.getUrlSmooth();if(k){g._addChild(k)}var l=g._addChild(this.getUrlFlux());if(this.hasDRM()){l.addEventListener("ready",function(){l.protocol+="-drm";g.parsing.setFalse()})}else{g.parsing.setFalse()}}function f(){g._setError("Objet Cappuccino non disponible");g.parsing.setFalse()}function j(){g._setError("Erreur de requête webservice Cappuccino");g.parsing.setFalse()}var g=this,i=d[1],e=c.ObjetCappu.get(i,true);this.protocol="http";this.metaType="urlCappu";this.types=["video/cappuccino"];e.addEventListener("objetCappuReady",h);e.addEventListener("noObjetCappu",f);e.addEventListener("requestError",j);this.metaData.flux=e;this.extraData.id=i;this.extraData.objetCappu=e})}(this));(function(l,d,A,H,e){(function(J){for(var I in J){if(!J[I]){throw new H("Dépendence non satisfaite : "+I)}}}({systemInfos:!!A,EventsManager:!!l.EventsManager}));function a(I){if(I in pluginInfos.plugins){j[I]=pluginInfos.getInstance(I).version||0;if(++w===1){c()}}}function k(I){if(I in j){delete j[I];if(--w===0){o()}}}function c(){u=l.setInterval(C,i)}function C(){var J,I;h.trigger("check");for(J in j){I=pluginInfos.getInstance(J);I.refresh();if((I.version||0)!==j[J]){j[J]=I.version||0;h.trigger(J);h.resetTriggeredState(J)}}}function o(){l.clearInterval(u)}function E(){if(!h){h=new l.EventsManager(pluginInfos);h.whenEventHasListener=a;h.whenEventHasNoListener=k}}var h,j={},w=0,u,i=1500,F,r="<p>Nous ne disposons pas des instructions d'installation pour ce plugin. Veuillez nous en excuser.</p>",p='<p class="download"><a href="[[URL]]">Installer [[NAME]]</a></p>';l.pluginInfos=l.pluginInfos||{plugins:{},instances:{},registerPlugin:function t(){var I=[pluginInfos.PluginPrototype];I.push.apply(I,arguments);EasyPrototype.createClass.apply(this,I)},getInstance:function D(J,I){if(!(J in this.instances)){if(!(J in this.plugins)){throw new H('Le plugin "'+J+"\" n'est pas pris en charge")}this.instances[J]=new this.plugins[J]()}else{if(I){this.instances[J].refresh()}}return this.instances[J]},addEventListeners:function m(){E();this.addEventListeners.apply(this,arguments)},addEventListener:function s(){E();this.addEventListener.apply(this,arguments)},unbind:function g(){},getPluginByType:function v(K){var I=+new Date,J;if(!F||(I-F>i/1.5)){d.plugins.refresh();F=I}if("mimeTypes" in d&&d.mimeTypes[K]!==e&&"enabledPlugin" in d.mimeTypes[K]){J=d.mimeTypes[K].enabledPlugin}return J},createObject:function x(K,J,I){return this.getInstance(K).createObject(J,I)}};pluginInfos.PluginPrototype=EasyPrototype.createProtoClass("PluginPrototype",{classSetup:function G(){this.config=this.prototype.config;this.prototype.name=this.className;this.compatibleSystem=this.prototype.compatibleSystem;pluginInfos.plugins[this.className]=this},init:function z(){this.refresh()},isPresent:function b(I,L){L=L!==false;if(I instanceof Array){var K,J=I.length;while(!K&&J--){if(I[J]===">"){L=false;continue}K=this.isPresent(I[J],L)}return K}return this.version!==e&&(this.version==(I||this.version)||(!L&&I<this.version))},refresh:function f(){this.version=this.getInstalledVersion()},getInstallTxt:function n(J,I){I=I||this.config[J];if(typeof I==="string"){return I.replace("[[URL]]",this.config.url)}else{if(typeof I==="object"){return this.getInstallTxt(J,I[A.os]||I[A.browser.type]||I[A.browser.version]||I.all||true)}else{if(J!=="installation"){return this.getInstallTxt("installation")}}}if(this.config.url){return this.getInstallTxt(J,p.replace("[[NAME]]",this.config.fullName||this.config.shortName||this.name))}return r},getLogo:function y(J,I){var L=["logo"],K;if(J){L.push("small")}if(I){L.push("txt")}do{K=this.config[L.join("_")]}while(!K&&--L.length);if(l.staticDomain&&K.substr(0,1)==="/"){K=l.staticDomain+K}return K},compatibleSystem:function B(){return A.match(this.config.platforms)},createObjectSrc:function q(J,I){var K=new ObjectSrc(I);if(J){K.setAttrs("data",J)}return K},createObject:function x(J,I){return this.createObjectSrc(J,I).getObject()}},["getInstalledVersion"])}(this,this.navigator,this.systemInfos,this.Error));(function(k,g,e){(function(s){for(var r in s){if(!s[r]){throw new Error("Dépendence non satisfaite : "+r)}}}({EventsManager:!!k.EventsManager,pluginInfos:!!g}));g.Getter=g.Getter||EasyPrototype.createClass("PluginInfosGetter",k.EventsManager,{init:function o(){this.execSuper("init");this._pluginListened={},this._pluginListenedLength=0;this.unavailablePlugins=[]},_onUpdateCheck:function m(){this.events.trigger("check_for_plugin")},_onPluginUpdates:function n(s){this.events.trigger("plugin_update",s.type);var r=g.getInstance(s.type),u,t,v={};for(u=0;u<this.unavailablePlugins.length;u++){if(this.unavailablePlugins[u].name===r.name&&r.isPresent(this.unavailablePlugins[u].versions)){this.events.trigger("plugin_installed",r.name,r.version);for(t=u;t<this.unavailablePlugins.length;t++){if(!v[this.unavailablePlugins[t].name]){this.stopChecking(this.unavailablePlugins[t].name)}}this.unavailablePlugins.length=u;this._onUnavailablePluginsChange();break}else{v[this.unavailablePlugins[u].name]=true}}},_onUnavailablePluginsChange:function j(){this.events.trigger("unavailable_plugins_changed")},_onLastSuccessChange:function l(){this.events.trigger("last_success_changed")},_startChecking:function b(r){if(this._pluginListened[r]||!g.getInstance(r).compatibleSystem()){return}this._pluginListened[r]=true;this._pluginListenedLength++;g.addEventListener(r,this.callback("_onPluginUpdates"));if(this._pluginListenedLength===1){g.addEventListener("check",this.callback("_onUpdateCheck"))}},stopChecking:function i(r){if(!this._pluginListened[r]){return}delete (this._pluginListened[r]);this._pluginListenedLength--;g.unbind(r,this.callback("_onPluginUpdates"));if(this._pluginListenedLength===0){g.unbind("check",this.callback("_onUpdateCheck"))}},stopAllChecks:function d(){for(var r in this._pluginListened){g.unbind(r,this.callback("_onPluginUpdates"))}g.unbind("check",this.callback("_onUpdateCheck"));this._pluginListened={};this._pluginListenedLength=0},addUnavailablePlugin:function c(r){if(typeof r==="string"){r={name:r}}this.unavailablePlugins.push(r);this._startChecking(r.name);this._onUnavailablePluginsChange()},getIfPresent:function a(t,s){if(typeof t==="string"){t={name:t}}t.versions=t.versions||[t.version];var r=g.getInstance(t.name,s);if(r.isPresent(t.versions)){this.lastSuccess=r;this._onLastSuccessChange();return r}else{this.addUnavailablePlugin(t);return false}},getAnyPresent:function h(t,s){if(t instanceof Array){t=t.slice().reverse()}else{t=[t]}var r=false,u=t.length;while(!r&&u--){r=this.getIfPresent(t[u],s)}return r},isPresent:function q(s,r){return !!this.getIfPresent(s,r)},anyPresent:function p(s,r){return !!this.getAnyPresent(s,r)},getSuggestions:function f(){if(!this.suggestions){this.suggestions=new g.Suggestions(this)}return this.suggestions}})}(this,this.pluginInfos));(function(d,c,b){(function(k){for(var j in k){if(!k[j]){throw new Error("Dépendence non satisfaite : "+j)}}}({EventsManager:!!d.EventsManager,pluginInfos:!!pluginInfos}));pluginInfos.Suggestions=pluginInfos.Suggestions||EasyPrototype.createClass("PluginSuggestions",d.EventsManager,{init:function i(l){this.execSuper("init");this.length=0;this.pluginGetter=l;this.suggestionsIndex={};this.bannedPlugins={};var k=c&&c.cookie&&c.cookie("PluginSuggestionsBanned"),j;if(typeof k==="string"){k=k.split(",");j=k.length;while(j--){if(k[j]){this.bannedPlugins[k[j]]=true}}}l.addEventListener("unavailable_plugins_changed",this.callback("updateSuggestionsList"),true);l.addEventListener("last_success_changed",this.callback("updateSuggestionsList"),true);l.addEventListener("plugin_update",this.callback("updateSuggestionsList"))},_onSuggestionsListUpdated:function e(){this.events.trigger("suggestions_list_updated")},updateSuggestionsList:function f(){while(this.length){delete (this[--this.length])}this.suggestionsIndex={};if(!this.bannedPlugins._all_){var m=this.pluginGetter.unavailablePlugins.slice().reverse(),p=this.pluginGetter.lastSuccess,o=m.length,n,l,k,q;if(p&&p.version<p.config.versionTop){m.reverse().push({name:p.name,versions:p.config.versionTop});m.reverse();o=m.length}while(o--){k=pluginInfos.getInstance(m[o].name);if(this.bannedPlugins[k.name]||!k.compatibleSystem()){continue}l=(m[o].versions instanceof Array)?m[o].versions:[m[o].versions||">"];if(this.suggestionsIndex[k.name]===b){this[this.length]={name:k.name,instance:k,versionsRequests:[],minVersion:Math.max(k.config.versionTop,+l[0]||0),maxVersion:0};this.suggestionsIndex[k.name]=this.length++}q=this[this.suggestionsIndex[k.name]];q.versionsRequests.push(m[o].versions);n=l.length;while(n--){q.maxVersion=Math.max(l[n],q.maxVersion)||k.config.versionTop;q.minVersion=Math.min(l[n],q.minVersion)||q.minVersion}}}this._onSuggestionsListUpdated()},stopSuggesting:function a(k,l){this.pluginGetter.stopChecking(k);this.bannedPlugins[k]=true;this.updateSuggestionsList();if(l&&c&&c.cookie){var j=c.cookie("PluginSuggestionsBanned");j=(typeof j==="string")?j.split(","):[];if(j.indexOf(k)===-1){j.push(k)}c.cookie("PluginSuggestionsBanned",j.join(","))}},stopAllSuggestions:function g(j){this.pluginGetter.stopAllChecks();this.bannedPlugins._all_=true;this.updateSuggestionsList();if(j&&c&&c.cookie){c.cookie("PluginSuggestionsBanned","_all_")}},getInterface:function h(k,j){if(typeof k!=="string"){j=k;k="default"}return new pluginInfos.Suggestions.interfaces[k||"default"](this,j)}})}(this,this.jQuery));(function(f,g,e){(function(k){for(var j in k){if(!k[j]){throw new Error("Dépendence non satisfaite : "+j)}}}({EventsManager:!!f.EventsManager,PluginSuggestions:!!(pluginInfos&&pluginInfos.Suggestions),jQuery:!!g}));pluginInfos.Suggestions.interfaces={};pluginInfos.Suggestions.InterfacePrototype=pluginInfos.Suggestions.InterfacePrototype||EasyPrototype.createProtoClass("PluginSuggestionsInterface",f.EventsManager,{classSetup:function b(){pluginInfos.Suggestions.interfaces[this.className]=this;if(pluginInfos.Suggestions.interfaces["default"]===e){pluginInfos.Suggestions.interfaces["default"]=this}},init:function h(i,j){this.execSuper("init");this.suggestions=i;this.options=j;this.rootNode=g("<div>").mousedown(function(){return false})},getDefaultCtnr:function a(){return f.document.body},exit:function d(){if(this.exited){return}this.exited=true;this.exiting=false;if(this.suggestions.length){this.suggestions.stopAllSuggestions(this.cookieBanAll)}if(this.rootNode.parent().length){this.rootNode.remove()}this.events.trigger("exit")}});pluginInfos.Suggestions.registerInterface=function c(i,j){EasyPrototype.createClass(i,pluginInfos.Suggestions.InterfacePrototype,j)}}(this,this.jQuery));(function(j,g,c){var e="fast";pluginInfos.Suggestions.registerInterface("default_require",{init:function r(){this.execSuper("init",arguments);this.suggestionsItems={};if(this.options.width){this.rootNode.css("width",+this.options.width)}if(this.options.height){this.rootNode.css("height",+this.options.height)}new StyleInjection({url:"/layoutftv/css/plugin_suggestion/default.css"});this.rootNode.addClass("plugin_require").css({"font-size":Math.max(((+this.options.height)||this.rootNode.height())/25,10)+"px"}).fadeIn("slow");this.header=g('<div class="header" />').appendTo(this.rootNode);g("<h2>Pour visualiser cette vidéo, nous vous suggérons les solutions suivantes</h2>").appendTo(this.header);this.undoRefus=g('<div class="undoRefus"><p>Réinitialiser toutes les suggestions</p></div>').click(this.callback("_onUndoRefusClick"));this.suggestList=g('<ul class="plugins_list" />').appendTo(this.rootNode);this.suggestions.addEventListener("suggestions_list_updated",this.callback("_onSuggestionsListUpdate"))},_onUndoRefusClick:function l(){this.suggestions.bannedPlugins={};this.suggestions.updateSuggestionsList()},_onExitClick:function o(){this.rootNode.fadeOut(this.getSuper("exit"))},exit:function p(){var u;if(!this.exited&&!this.exiting){this.exiting=true;this.suggestions.unbind("suggestions_list_updated",this.callback("_onSuggestionsListUpdate"));if(this.suggestions.pluginGetter.lastSuccess){u=g('<div class="install_ok"><h2>Plugin installé</h2><p>Cliquez pour continuer</p></div>').hide();this.rootNode.append(u).contents().fadeOut("fast");u.fadeIn("fast");u.click(this.callback("_onExitClick"))}else{this.rootNode.fadeOut(this.getSuper("exit"))}}return false},onRefusSuggest:function h(u){this.suggestions.stopSuggesting(u.data.name,this.suggestionsItems[u.data.name].cookieBan);return false},toggleRefusBan:function m(u){this.suggestionsItems[u.data.name].cookieBan=!this.suggestionsItems[u.data.name].cookieBan;return false},createItem:function f(A){var E=A.instance.config.shortName||A.name,z=A.instance.config.fullName||A.name,G=A.instance.getLogo(false,true),F=A.instance.getLogo(),x=g('<li class="plugin">'),w=g('<div class="court"><span class="pluginName '+E+'">'+(G?'<img src="'+G+'" alt="'+z+'" />':z)+"</span></div>").bind("click",{name:A.name},this.callback("onPluginButton")).appendTo(x),C=g('<div class="full" />').appendTo(x),D=g('<h3><span class="pluginName '+E+'">'+z+"</span></h3>").appendTo(C),y=F?g('<div class="logo"><img src="'+F+'" alt="'+z+'" /></div>').appendTo(C):false,v=g('<div class="process" />').appendTo(C),u=g('<div class="details" />').appendTo(C),B=g('<div class="back">« Faire un autre choix</div>').bind("click",{name:A.name},this.callback("onBackButton")).appendTo(C);if(!("firstItemCreated" in this)){this.firstItemCreated=true;C.css("display","block")}if(g.fn.live){g("a",v).live("click",function(){j.open(this.href);return false})}this.suggestionsItems[A.name]={name:A.name,currentVersion:false,cookieBan:false,node:x,court:w,full:C,titre:D,process:v,details:u,back:B};this.updateItemContent(A)},updateItemContent:function n(u){var v=this.suggestionsItems[u.name];if(v.currentVersion!==u.instance.version){v.currentVersion=u.instance.version;v.neededMaxVersion=u.maxVersion;v.neededMinVersion=u.minVersion;if(!v.currentVersion){v.process.html(u.instance.getInstallTxt("installation"));if(u.minVersion){v.details.html(u.maxVersion>u.minVersion?'<p>Version minimale attendu : <span class="version">'+u.minVersion+'</span></p><p>Version recommandée : <span class="version">'+u.maxVersion+"</span></p>":'<p>Version attendu : <span class="version">'+u.minVersion+"</span></p>")}else{v.details.remove()}v.court.contents(":not(span)").remove().end().prepend("Installer ");v.titre.contents(":not(span)").remove().end().prepend("Installation de ")}else{v.process.html(u.instance.getInstallTxt("maj"));v.details.html('<p class="current">Version actuellement installée : <span class="version">'+v.currentVersion+"</span></p>"+(u.maxVersion>u.minVersion&&v.currentVersion<u.minVersion?'<p class="min">Version minimale attendu : <span class="version">'+u.minVersion+'</span></p><p class="max">Version recommandée : <span class="version">'+u.maxVersion+"</span></p>":'<p class="min">Version attendu : <span class="version">'+u.minVersion+"</span></p>"));if(v.currentVersion>=u.minVersion){v.details.append("<p>Votre version semble trop récente, nous ne la supportons pas encore.</p>")}v.court.contents(":not(span)").remove().end().prepend("Mettre à jour ");v.titre.contents(":not(span)").remove().end().prepend("Mise à jour de ")}}else{if(v.neededMinVersion!==u.minVersion){v.neededMinVersion=u.maxVersion;v.details.find(".min > .version").text(u.minVersion)}if(v.neededMaxVersion!==u.maxVersion){v.neededMaxVersion=u.maxVersion;v.details.find(".min > .version").text(u.maxVersion)}}},updateItem:function d(u){this.updateItemContent(u);if(g.browser.msie){this.suggestionsItems[u.name].node.css({width:((100/this.suggestions.length)-11)+"%"})}else{this.suggestionsItems[u.name].node.animate({width:((100/this.suggestions.length)-11)+"%"},{duration:e})}},insertItem:function k(u){if(u.nextPosition===0){u.node.prependTo(this.suggestList)}else{u.node.insertAfter(this.suggestList.children().eq(u.nextPosition-1))}if(g.browser.msie){u.node.css({opacity:1,width:((100/this.suggestions.length)-10)+"%"})}else{u.node.animate({opacity:1,width:((100/this.suggestions.length)-10)+"%"},{duration:e})}},removeItem:function s(u){u.node.animate({opacity:0,width:0},{duration:e,complete:function(){u.node.appendTo("<div />");u.full.hide()}})},moveItem:function q(u){if(u.nextPosition===0){u.node.prependTo(this.suggestList)}else{this.suggestionsItems[this.suggestions[u.nextPosition-1].name].node.after(u.node)}},_onSuggestionsListUpdate:function t(){if(!this.suggestions.length){this.exit()}if(this.exited||this.exiting){return}var x=Math.min(this.suggestions.length,3),w=false,u,v=0;for(u in this.suggestions.bannedPlugins){w=true;break}for(u=0;u<x;u++){if(!this.suggestionsItems[this.suggestions[u].name]){this.createItem(this.suggestions[u])}else{this.updateItem(this.suggestions[u])}this.suggestionsItems[this.suggestions[u].name].nextPosition=u}for(u in this.suggestionsItems){if(this.suggestionsItems[u].position!==this.suggestionsItems[u].nextPosition){if(this.suggestionsItems[u].position===c){this.insertItem(this.suggestionsItems[u])}else{if(this.suggestionsItems[u].nextPosition===c){this.removeItem(this.suggestionsItems[u])}else{this.moveItem(this.suggestionsItems[u])}}this.suggestionsItems[u].position=this.suggestionsItems[u].nextPosition}if(this.suggestionsItems[u].nextPosition!==c){v+=1}delete (this.suggestionsItems[u].nextPosition)}if(v===1){for(u in this.suggestionsItems){if(this.suggestionsItems[u].position!==c){this.suggestionsItems[u].back.hide()}}}this.suggestList.stop().animate({width:(x*27)+"%"},{duration:e,queue:false});if(w){this.undoRefus.appendTo(this.header)}else{this.undoRefus.appendTo("<div />")}},onToggleCookieBanAll:function a(){this.cookieBanAll=!this.cookieBanAll;return false},onPluginButton:function b(u){this.suggestionsItems[u.data.name].full.fadeIn("slow")},onBackButton:function i(u){this.suggestionsItems[u.data.name].full.fadeOut("slow")}})}(this,this.jQuery));(function(e,f,d){function b(i){i.preventDefault();e.open(f(this).children("a").attr("href"))}pluginInfos.Suggestions.registerInterface("default_upgrade",{init:function h(i,j){this.execSuper("init",arguments);if(this.options.width){this.rootNode.css("width",+this.options.width)}this.topWindow=e.top;new StyleInjection({url:"/layoutftv/css/plugin_suggestion/default.css",document:this.topWindow.document});this.rootNode.addClass("plugin_upgrade").fadeIn("slow");var k=this;e.setTimeout(function(){k.initialMarginTop=~~f(k.topWindow.document.body).css("margin-top");f(k.topWindow.document.body).css("margin-top",(k.initialMarginTop+Math.min(50,k.rootNode.height()))+"px")},400);f('<p class="close">Fermer les suggestions</p>').appendTo(this.rootNode).bind("click",this.callback("exit"));this.suggestions.addEventListener("suggestions_list_updated",this.callback("updateSuggest"))},getDefaultCtnr:function a(){return this.topWindow.document.body},exit:function c(){if(this.exited||this.exiting){return}this.exiting=true;f(this.topWindow.document.body).css("margin-top",this.initialMarginTop+"px");this.rootNode.fadeOut(this.getSuper("exit"));return false},updateSuggest:function g(){var i,j,k=this.suggestions[0];if(k){if(k.instance.version){i=f('<p><span class="pluginName '+k.name+'">'+k.name+" </span> ne semble pas à jour (version "+(k.maxVersion||k.minVersion)+' attendue) <a href="'+k.instance.config.url+'">Cliquez pour le mettre à jour</a></p>')}else{i=f('<p><span class="pluginName '+k.name+'">'+k.name+" "+(k.maxVersion||k.minVersion)+"</span> améliorerait l'affichage de votre vidéo. <a href=\""+k.instance.config.url+"\">Cliquez pour l'installer</a></p>")}j=k.instance.getLogo(true);if(j){i.children("span.pluginName").css("background-image","url("+j+")")}i.click(b);if(this.suggest){this.suggest.remove();this.suggest=i.prependTo(this.rootNode)}else{this.suggest=i.prependTo(this.rootNode)}}else{this.exit()}}})}(this,this.jQuery));(function(c,d,b){d.registerPlugin("Flash",{config:{fullName:"Adobe Flash Player",platforms:["MacOS","Windows","Linux"],versionTop:11.1,url:"http://get.adobe.com/fr/flashplayer/",installation:"<p>Pour voir ce contenu vous devez installer Adobe Flash Player.</p><p>Pour l'installer, téléchargez le fichier d'installation sur le site de l'éditeur en suivant le lien ci-dessous.</p><p>Suivez ensuite les instructions qui vous seront fournies lors de l'exécution du programme d'installation.</p><p class=\"download\"><a href=\"[[URL]]\">Télécharger Flash Player</a></p>",logo:"/layoutftv/images/plugins/256-256_fp.png",logo_txt:"/layoutftv/images/plugins/256-256_fp_txt.png",logo_small:"/layoutftv/images/plugins/32-32_fp.png"},getInstalledVersion:function e(){var j,g,h=0,f=[1,6,7,8,9,10,10.1,10.2,10.3,11,11.1];if(c.ActiveXObject!==b){try{j=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");g=parseFloat(j.GetVariable("$version").replace(/^[^\d]+/,"").replace(",","."));j=b}catch(k){}}if(g===b){j=d.getPluginByType("application/x-shockwave-flash");if(j){g=parseFloat(j.description.replace(/^[^\d]+/,""))}}if(!g){return b}while(g>=f[++h]){}return f[h-1]},createObjectSrc:function a(g,f){var h=this.execSuper("createObjectSrc",arguments);h.setAttrs("type","application/x-shockwave-flash");if(!(f.params&&f.params.wmode)){h.setParams("wmode","transparent")}h.setParams("movie",g);if(!(h.id||h.attrs.id)){h.id="FlashObject"+h.instanceNum}return h}})}(this,this.pluginInfos));(function(e,f,d){f.registerPlugin("Silverlight",{config:{fullName:"Microsoft Silverlight",platforms:["MacOS","Windows"],versionTop:5,url:"http://www.microsoft.com/getsilverlight/get-started/install",installation:"<p>Télécharger et exécutez le programme d'installation à l'aide du lien ci-dessous.</p><p>Après l'installation, il vous sera peut-être necessaire de redémarer votre navigateur. Le programme d'installation devrait vous l'indiquer.</p><p class=\"download\"><a href=\"[[URL]]\">Installer Silverlight</a></p>",logo:"/layoutftv/images/plugins/256-256_sl.png",logo_txt:"/layoutftv/images/plugins/256-256_sl_txt.png",logo_small:"/layoutftv/images/plugins/32-32_sl.png"},IE_loopMatch:function a(k,i,h,j){while(this.IE_IsSupported(k,i)){i[h]+=j}i[h]-=j},IE_IsSupported:function c(i,h){return i.isVersionSupported(h.join("."))},getInstalledVersion:function g(){var l,m,k,j=[1,2,3,4,4.05,4.06,5],h;if(e.ActiveXObject){try{m=new ActiveXObject("AgControl.AgControl");k=[1,0,0,0];this.IE_loopMatch(m,k,0,1);this.IE_loopMatch(m,k,1,1);this.IE_loopMatch(m,k,2,10000);this.IE_loopMatch(m,k,2,1000);this.IE_loopMatch(m,k,2,100);this.IE_loopMatch(m,k,2,10);this.IE_loopMatch(m,k,2,1);this.IE_loopMatch(m,k,3,1);m=null}catch(n){k=d}}if(k===d&&(m=f.getPluginByType("application/x-silverlight"))){k=m.description.split(".")}if(k!==d){k=e.parseFloat(k[0]+"."+k.slice(1).join(""));l=0;while(k>=j[++l]){}k=j[l-1]}return k},createObjectSrc:function b(i,h){var j=this.execSuper("createObjectSrc",["data:application/x-silverlight-2,",h]);j.setAttrs("type","application/x-silverlight-2");j.setParams({source:i,autoUpgrade:false,enableGPUAcceleration:true,background:"white"});return j}})}(this,this.pluginInfos));(function(c,b){c.WMPPrototype=EasyPrototype.createProtoClass("WMPPrototype",null,{init:function d(){this.events=new EventsManager(this);this.instances=[];this.execSuper("init",arguments)},createObjectSrc:function a(f,e){var g=this.execSuper("createObjectSrc",arguments);g.setParams("autostart",e.autostart!==false);g.addEventListener("node_created",this.callback("registerPlayer"));return g}},["registerPlayer","addPlayerEventListener"])}(this.pluginInfos));(function(g,c,d,b){var f="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6";c.registerPlugin("WMP_AXO",c.WMPPrototype,{config:{shortName:"WMP",fullName:"Windows Media Player",platforms:{Windows:"MSIE"},url:"http://windows.microsoft.com/en-US/windows/downloads/windows-media-player",logo:"/layoutftv/images/plugins/256-256_wmp.png",logo_txt:"/layoutftv/images/plugins/256-256_wmp_txt.png",logo_small:"/layoutftv/images/plugins/32-32_wmp.png"},getInstalledVersion:function i(){var j,k=g.createElement("OBJECT");k.setAttribute("classid",f);if(k.controls){k=b;j=true}return j},createObjectSrc:function e(k,j){var l=this.execSuper("createObjectSrc",[false,j]);l.setAttrs("classid",f);l.setParams("url",k);return l},registerPlayer:function h(j,l){var m=this,k=this.instances.length,n=this.instances.length;while(k--){if(this.instances[k].node===l){return}}this.instances.push({id:n,node:l,playState:l.playState,openState:l.openState,errorCount:0,loadEventAttached:false});if(l.controls){if(!d(l).parents("body").length){l.controls.stop();d(l).watchForDomInsert(function(){m.events.trigger("load."+n);if(this.settings.autoStart){this.controls.play()}})}else{this.events.trigger("load."+n)}}},addPlayerEventListener:function a(n,k,o){var p=this,j,m=this.instances.length,l;if(k==="*"){throw new Error("Impossible actuellement d'attacher un ectoueur global à un player WMP")}else{if(k.indexOf&&(k.indexOf(" ")!==-1)){k=k.split(" ")}}if(k instanceof Array){m=k.length;while(m--){l=[].slice.call(arguments);l[1]=k[m];this.addPlayerEventListener.apply(this,l)}return}while(!j&&m--){if(this.instances[m].node===n){j=this.instances[m]}}if(!j){throw new Error("Instance de WMP non répertoriée")}if(k!=="load"){n.attachEvent(k,function(){var q=arguments;q[0]=k+"."+j.id;if(k==="MediaError"){window.setTimeout(function(){p.events.callback("trigger").apply(this,q)},0)}else{p.events.callback("trigger").apply(this,q)}})}l=[].slice.call(arguments,1);l[0]=k+"."+j.id;this.addEventListener.apply(this,l)}})}(this.document,this.pluginInfos,this.jQuery));(function(e,c){e.registerPlugin("WMP_port25",e.WMPPrototype,{config:{fullName:"Windows Media Player Firefox Plugin",platforms:{Windows:["Firefox","Mozilla"]},url:"http://port25.technet.com/pages/windows-media-player-firefox-plugin-download.aspx",logo:"/layoutftv/images/plugins/256-256_wmp.png",logo_txt:"/layoutftv/images/plugins/256-256_wmp_txt.png",logo_small:"/layoutftv/images/plugins/32-32_wmp.png"},patternEvtNs:/^(.*)\..*$/,rootHandlers:{OpenStateChange:function(j,l){var k=this.instances.length;if(l===1){while(k--){if(this.instances[k].node.openState===c&&this.instances[k].openState===13){this.instances[k].openState=1}}}else{while(k--){if(this.instances[k].node.openState!==c&&this.instances[k].node.openState!==this.instances[k].openState&&this.instances[k].node.openState==l){this.instances[k].openState=l;this.events.trigger("OpenStateChange."+this.instances[k].id,l)}}}},PlayStateChange:function(j,l){var k=this.instances.length;while(k--){if(this.instances[k].node.playState!==c&&this.instances[k].node.playState!==this.instances[k].playState&&this.instances[k].node.playState==l){this.instances[k].playState=l;this.events.trigger("PlayStateChange."+this.instances[k].id,l)}}},PlaylistChange:function(j,l){var k=this.instances.length;while(k--){try{if(this.instances[k].node.currentPlaylist!==c&&this.instances[k].node.currentPlaylist.isIdentical(l)){this.events.trigger("PlaylistChange."+this.instances[k].id,l)}}catch(m){}}},CurrentItemChange:function(j,l){var k=this.instances.length;while(k--){try{if(this.instances[k].node.currentMedia!==c&&this.instances[k].node.currentMedia.isIdentical(l)){this.events.trigger("CurrentItemChange."+this.instances[k].id,l)}}catch(m){}}},MediaChange:function(j,l){var k=this.instances.length;while(k--){try{if(this.instances[k].node.currentMedia!==c&&this.instances[k].node.currentMedia.isIdentical(l)){this.events.trigger("MediaChange."+this.instances[k].id,l)}}catch(m){}}},PositionChange:function(j,m,l){var k=this.instances.length;while(k--){if(this.instances[k].node.controls!==c&&Math.floor(this.instances[k].node.controls.currentPosition*10)===Math.floor(l*10)){this.events.trigger("PositionChange."+this.instances[k].id,m,l)}}},MediaError:function(j,l){var k=this.instances.length;while(k--){try{if(this.instances[k].node.currentMedia!==c&&this.instances[k].node.currentMedia.isIdentical(l)){this.events.trigger("MediaError."+this.instances[k].id,l)}}catch(m){}}},Error:function(){var j=this.instances.length;while(j--){if(this.instances[j].node.error.errorCount!==this.instances[j].errorCount){this.instances[j].errorCount=this.instances[j].node.error.errorCount;this.events.trigger("Error."+this.instances[j].id)}}}},init:function g(){this.execSuper("init",arguments);this.events.whenEventHasListener=this.callback("initEventHandler");this.events.whenEventHasNoListener=this.callback("onStopListenEvent")},onStopListenEvent:function(i){delete window["OnDS"+i+"Evt"]},initEventHandler:function f(l){l=l.replace(this.patternEvtNs,"$1");var k="OnDS"+l+"Evt",o=this.events.getEvent(l),m=o.callback("trigger"),j=arguments.length;if(this.rootHandlers[l]){if(typeof window[k]==="function"){this.events.addEventListener(l,window[k],false)}this.events.addEventListener(l,this.rootHandlers[l],false);this.rootHandlers[l]=false}for(var n=1;n<j;n++){if(typeof arguments[n]==="function"){this.events.addEventListener(l,arguments[n],false)}}if(window[k]!==m){if((typeof window[k]==="function")&&!o.listenerIndexes(window[k]).length){this.events.addEventListener(l,window[k],false)}window[k]=m}},registerPlayer:function d(j,l){var k=this.instances.length,m=this.instances.length;while(k--){if(this.instances[k].node===l){return}}this.instances.push({id:m,node:l,playState:l.playState,openState:l.openState,errorCount:0,loadEventAttached:false});if(l.controls){this.events.trigger("load."+m)}},addPlayerEventListener:function b(n,k,o){var j,m=this.instances.length,l;if(k==="*"){throw new Error("Impossible actuellement d'attacher un ectoueur global à un player WMP")}else{if(k.indexOf(" ")!==-1){k=k.split(" ")}}if(k instanceof Array){m=k.length;while(m--){l=[].slice.call(arguments);l[1]=k[m];this.addPlayerEventListener.apply(this,l)}return}while(!j&&m--){if(this.instances[m].node===n){j=this.instances[m]}}if(!j){throw new Error("Instance de WMP non répertoriée")}if(k==="load"&&n.openState===c&&!j.loadEventAttached){this.events.addEventListener("OpenStateChange."+j.id,function(){this.events.trigger("load."+j.id)},1);j.loadEventAttached=true}l=[].slice.call(arguments,1);l[0]=k+"."+j.id;this.addEventListener.apply(this,l)},getInstalledVersion:function h(){var i,j=e.getPluginByType("application/x-ms-wmp");if(j&&j.description==="np-mswmp"){i=true}return i},createObjectSrc:function a(j,i){var k=this.execSuper("createObjectSrc",arguments);k.setAttrs("type","video/x-ms-wmv");return k}})}(this.pluginInfos));(function(c){var b=/flip4mac.*?(\d.*)/i;c.registerPlugin("Flip4Mac",{config:{fullName:"Flip4Mac",platforms:"MacOS",versionTop:2.3,url:"http://windows.microsoft.com/en-US/windows/products/windows-media-player/wmcomponents",logo:"/layoutftv/images/plugins/256-256_f4m.png",logo_txt:"/layoutftv/images/plugins/256-256_f4m_txt.png",logo_small:"/layoutftv/images/plugins/32-32_f4m.png"},getInstalledVersion:function d(){var g=0,j,e=[2,2.1,2.2,2.3],f,h=c.getPluginByType("application/x-mplayer2");if(h&&(j=h.name.match(b))){f=parseFloat(j[1]);while(e[++g]<=f){}f=e[g-1]}return f},createObjectSrc:function a(f,e){var g=this.execSuper("createObjectSrc",[false,e]);g.set("tagName","embed");g.setAttrs("type","application/x-mplayer2");g.setAttrs("src",f);g.setAttrs("wmode","transparent");g.setAttrs("showcontrols","true");g.setAttrs("scale","tofit");g.setAttrs("autostart",e.autostart!==false);return g}})}(this.pluginInfos));(function(d,c){d.registerPlugin("Generic",{config:{},getInstalledVersion:function e(){var f,h,g;if(this.types instanceof Array){g=this.types.length;while(!h&&g--){h=d.getPluginByType(this.types[g])}}else{if(typeof this.types==="string"){h=d.getPluginByType(this.types)}}if(h&&h.filename==="npdsplay.dll"){h=c}if(h){f=parseFloat(h.description.replace(/^[^\d]*/,""))||1}return h&&f},createObjectSrc:function a(g,f){var h=this.execSuper("createObjectSrc",arguments);h.setAttrs("type",(this.types instanceof Array)?this.types[0]:this.types);return h},isPresent:function b(f){this.types=f;this.refresh();return this.execSuper("isPresent",[0.1,false])}})}(this.pluginInfos));(function(k,G,r,y,c){(function(I){for(var H in I){if(!I[H]){throw new G("Dépendence non satisfaite : "+H)}}}({EasyPrototype:!!r,"pluginInfos.Getter":!!(y&&y.Getter),MediaInfos:!!MediaInfos}));var g={types:[],instances:[],statInterfaces:[],registerPlayer:function f(){var I=arguments.length,J=false,H=arguments;while(!J&&I--){J=typeof H[I]==="function"}if(!J){H=[g.PlayerPrototype];H.push.apply(H,arguments)}return r.createClass.apply(this,H)},getPlayerIdx:function z(H){var I=this.types.length;while(I--){if(this.types[I].className===H){return I}}},removePlayer:function o(I){var H=this.getPlayerIdx(I),J=this.types.slice(H+1||this.types.length);this.types.length=H;this.types.push.apply(this.types,J)},registerStatInterface:function s(){g.statInterfaces.push(r.createClass.apply(this,arguments))}};function w(H,J){var I;for(I in J){if(!(I in H)){H[I]=J[I]}}}g.PlayerPrototype=r.createProtoClass("PlayerPrototype",{classSetup:function F(){this.config=this.prototype.config=this.prototype.config||{};var I,H=I=this.prototype;while(I.constructor&&I.constructor.prototype&&I.constructor.prototype!==I&&I.constructor.prototype.config){I=I.constructor.prototype;if(I.config!==H.config){H=I;w(this.config,I.config)}}this.supports=this.prototype.supports;g.types.push(this)},supports:function B(H){if(H instanceof MediaInfos){H=H.getDefinition()}return MediaInfos.definitionMatch(H,this.config.supported)},init:function x(H,I){if(H instanceof MediaInfos){this.initialMedia=H;this.initialUrl=this.getMediaUrl(H)}else{I=H}this.options=I||{};if("technologies" in this.config){this.getPlugin()}this.width=this.options.width;this.height=this.options.height;g.instances.push(this)},filterMedia:function l(H){return H.getFirstDefinitionMatch(this.config.supported)},getMediaUrl:function j(H){var H=this.filterMedia(H);if(!H){throw new G("Media non supporté par ce player")}return H.url},getPlugin:function d(){if(!("plugin" in this)){if(!("technologies" in this.config)){throw new G("no plugin Defined for this player")}if(!("pluginGetter" in this)){this.pluginGetter=new y.Getter()}this.plugin=this.pluginGetter.getAnyPresent(this.config.technologies)}return this.plugin},createObjectSrc:function p(){var H;if("plugin" in this){H=this.plugin.createObjectSrc(this.pluginData,this.options)}else{H=new ObjectSrc(this.options)}H.addEventListener("node_created",this.callback("onNodeCreated"));return H},getObjectSrc:function n(){if(!("objectSrc" in this)){this.objectSrc=this.createObjectSrc()}return this.objectSrc},getObject:function C(){return this.getObjectSrc().getObject()},onNodeCreated:function q(H,I){this.object=I},destroy:function D(){var H=g.instances.length,I;while(H--){if(g.instances[H]===this){var I=g.instances.slice(H+1);g.instances.length=H;g.instances.push.apply(g.instances,I)}}g.instances.push(this);if("object" in this){this.object.style.display="none";if(this.object.parentNode){this.object.parentNode.removeChild(this.object)}delete this.object}if("objectSrc" in this){this.objectSrc.unbind("node_created",this.callback("onNodeCreated"));delete this.objectSrc}if("pluginGetter" in this){delete this.pluginGetter}if("plugin" in this){delete this.plugin}if("initialMedia" in this){delete this.initialMedia}}});g.PlayerListenerPrototype=r.createProtoClass("PlayerListenerPrototype",g.PlayerPrototype,k.EventsManager,{init:function x(H,I){this.execSuper("init",arguments);if(this.initialMedia){this.nextMedia=this.initialMedia}this.playState="Closed";this.started=false;var J=g.statInterfaces.length;while(J--){new g.statInterfaces[J](this)}},destroy:function D(){this.execSuper("destroy");if("currentMedia" in this){delete this.currentMedia}},onNodeCreated:function q(H){this.execSuper("onNodeCreated",arguments);this.events.trigger("node_created",H)},onPlayerReady:function v(){this.events.trigger("playerReady")},onVideoChange:function m(I,K,H,J){if(I===this.url){return false}this.url=I;this.duration=K;this.naturalVideoWidth=H;this.naturalVideoHeight=J;if("nextMedia" in this&&this.nextMedia.getUrlMatch(I)){this.currentMedia=this.nextMedia}else{this.currentMedia=new MediaInfos(I)}delete this.nextMedia;this.playState="Opening";this.started=false;this.events.trigger("videoChange")},onStateChange:function t(J){var H=this.playState,I;this.playState=J;if(this.playState==="Playing"){if(!this.started){this.started=true;this.events.trigger("videoStart");this.overRideDuration();if(this.options.registerPlayCount!==false&&"currentMedia" in this){I=this.currentMedia.getMetaFlux();if(I&&"registerPlayCount" in I){I.registerPlayCount()}}}}this.events.trigger("playStateChange",H,J)},overRideDuration:function u(){var H,L,I,K,J;if("currentMedia" in this){J=this.currentMedia.getMetaFlux();if(J&&"InfosOeuvre" in k&&J instanceof InfosOeuvre){H=this.getDuree();if(H!==c&&!isNaN(H)){K=Math.floor(H/3600);I=Math.floor((H-(K*3600))/60);L=Math.floor(H%60);H=(K+":"+I+":"+L).replace(/(:|^)(\d)(?=:|$)/g,"$10$2");J.data.children("duree").text(H);J.removeCache("dureeMs")}}}},onPositionJump:function b(I,H){this.events.trigger("positionJump",I,H)},onVideoEnd:function a(){this.events.trigger("videoEnd")},onVideoError:function i(I,H){this.events.trigger("videoError",I,H)},onFullscreenChanged:function A(H){this.events.trigger("fullscreenChanged",H)},onMuteChanged:function e(H){this.events.trigger("muteChanged",H)},onVolumeChanged:function h(H){}},["getPosition","getDuree"]);g.PlayerControllerPrototype=r.createProtoClass("PlayerControllerPrototype",g.PlayerListenerPrototype,{destroy:function D(){this.execSuper("destroy");if("nextMedia" in this){delete this.nextMedia}},changeVideo:function E(H){if(H instanceof MediaInfos){if(H===this.currentMedia){return false}this.nextMedia=H;H=this.getMediaUrl(H)}return H}},["play","pause","stop","setPosition"]);k.players=k.players||g}(this,this.Error,this.EasyPrototype,this.pluginInfos));(function(k,j,m,b,g){(function(o){for(var n in o){if(!o[n]){throw new j("Dépendence non satisfaite : "+n)}}}({EasyPrototype:!!m,players:!!b}));b.PlayerWithChapters=m.createProtoClass("PlayerWithChapters",null,{init:function l(){this.execSuper("init",arguments);this.chapitrageState=this.options.chapitrage!==false},onVideoChange:function h(){var n=this.execSuper("onVideoChange",arguments);if(n!==false){k.setTimeout(this.callback("loadChapitres"),0)}return n},loadChapitres:function i(){var p=this.currentMedia.getMetaFlux(),n,o;if(p&&"getChapitres" in p){n=p.getChapitres().reverse();o=n.length;while(o--){this.addChapitre(n[o].titre,n[o].debut,n[o].fin,n[o].image,n[o].resume)}}},onChapitreAdded:function a(n){if(this.chapitres[n]){this.events.trigger("chapitreAdded",n,this.chapitres[n].titre,this.chapitres[n].debut,this.chapitres[n].fin)}},onChapitreChange:function c(n){this.events.trigger("chapitreChanged",n)},addChapitre:function d(t,s,v,o,p){var q={titre:t,debut:+s,fin:+v,image:o,resume:p},n,u,r;if("chapitres" in this){r=this.chapitres.length;while(r--){if((q.debut===this.chapitres[r].debut)&&(q.titre===this.chapitres[r].titre)){throw new j("Double chargement du chapitre "+q.titre+" : "+q.debut)}if(q.debut>this.chapitres[r].debut){u=r+1;n=this.chapitres.slice(u);this.chapitres.length=u;this.chapitres.push(q);this.chapitres.push.apply(this.chapitres,n);return u}}this.chapitres.reverse().push(q);this.chapitres.reverse()}else{this.chapitres=[q]}return 0},onChapitrageChange:function e(n){this.chapitrageState=n;this.events.trigger("chapitrageChanged",n)},statusChapitrage:function f(){return this.chapitrageState}},["gotoChapitre"])}(this,this.Error,this.EasyPrototype,this.players));(function(i,f,m,a,c){(function(p){for(var o in p){if(!p[o]){throw new f("Dépendence non satisfaite : "+o)}}}({EasyPrototype:!!m,players:!!a}));a.PlayerRelationel=m.createProtoClass("PlayerRelationel",null,{onVideoEnd:function n(){this.execSuper("onVideoEnd");this.showVideosConnexes()},onEnSavoirPlusClicked:function j(){this.events.trigger("enSavoirPlusClicked")},onVoirAussiClicked:function h(){this.showVideosConnexes(false)},onVideoConnexeClicked:function e(o){this.events.trigger("videoConnexeCalled",o)},onShowVideoConnexeCalled:function g(){this.showVideosConnexes()},showVideosConnexes:function k(o){o=o!==false;var p=this.currentMedia.getMetaLive();if(p&&"getVideosConnexes" in p){p.getVideosConnexes(this.callback("onVideoConnexesReceved",o))}else{this.onGotNoVideoConnexes(o)}},onVideoConnexesReceved:function d(p,o){if(o.length){this.onGotVideoConnexes(p,o)}else{this.onGotNoVideoConnexes(p)}},onGotVideoConnexes:function l(p,o){this.events.trigger("showVideosConnexesCalled",p,o)},onGotNoVideoConnexes:function b(o){this.events.trigger("gotNoVideoConnexes")}})}(this,this.Error,this.EasyPrototype,this.players));(function(f,d,i,a,b){(function(l){for(var k in l){if(!l[k]){throw new d("Dépendence non satisfaite : "+k)}}}({EasyPrototype:!!i,players:!!a}));a.PlayerSocial=i.createProtoClass("PlayerSocial",null,{onShareMailClicked:function j(){this.events.trigger("shareMailClicked")},onShareFbClicked:function c(){this.events.trigger("shareFbClicked")},onShareTwtClicked:function e(){this.events.trigger("shareTwtClicked")},onExportClicked:function h(){this.events.trigger("shareExportClicked")},onShareLinkClicked:function g(){this.events.trigger("shareLinkClicked")}})}(this,this.Error,this.EasyPrototype,this.players));(function(c,b){c.WML_prototype=EasyPrototype.createProtoClass("WML_prototype",null,{config:{technologies:[{name:"WMP_AXO"},{name:"WMP_port25"},{name:"Flip4Mac",versions:["2.3",">"]},{name:"Generic",versions:["application/x-mplayer2","audio/x-ms-wmv","video/x-ms-wmv"]}],supported:{type:["audio/x-ms-wmv","video/x-ms-wmv","application/asx","application/asf","video/x-ms-asf","audio/x-ms-wma","video/wsx"],protocol:["http","mms"]}},createObjectSrc:function a(){if("initialUrl" in this){this.pluginData=this.initialUrl}if(this.options.autostart===b){this.options.autostart=true}return this.execSuper("createObjectSrc")}});c.registerPlayer("WML_generic",c.PlayerPrototype,c.WML_prototype)}(this.players));(function(c,f){var b={0:"Closed",1:"Stopped",2:"Paused",3:"Playing",6:"Buffering",7:"Buffering",8:"Ended"};c.registerPlayer("WML_advanced",c.PlayerControllerPrototype,c.WML_prototype,{config:{technologies:[{name:"WMP_AXO"},{name:"WMP_port25"}],supported:{type:["audio/x-ms-wmv","video/x-ms-wmv","application/asx","application/asf","video/x-ms-asf","audio/x-ms-wma","video/wsx"],protocol:["http","mms"]}},init:function o(){this.lastPosCheck={};this.execSuper("init",arguments)},onNodeCreated:function m(){this.execSuper("onNodeCreated",arguments);var q=this.getPlugin();q.addPlayerEventListener("load",this.callback("onPlayerReady"));q.addPlayerEventListener("Error MediaError",this.callback("onVideoError"));q.addPlayerEventListener("PlayStateChange",this.callback("onStateChange"));q.addPlayerEventListener("PositionChange",this.callback("onPositionJump"));q.addPlayerEventListener("CurrentItemChange",this.callback("onVideoChange"));q.addPlayerEventListener("MediaChange",this.callback("onMediaChange"))},onPlayerReady:function i(){this.execSuper("onPlayerReady");if("initialMedia" in this){this.onVideoChange()}},onPositionJump:function a(){var q=this.getPosition(),r=(("lastPosCheck" in this)&&this.lastPosCheck.position)||0;this.lastPosCheck.position=q;this.lastPosCheck.time=+new Date();this.execSuper("onPositionJump",[r,q])},onVideoChange:function g(){if((!this.object.controls.currentItem)||this.object.controls.currentItem.sourceURL===this.url){return}this.execSuper("onVideoChange",[this.object.controls.currentItem.sourceURL,this.object.controls.currentItem.duration,this.object.controls.currentItem.imageSourceWidth,this.object.controls.currentItem.imageSourceHeight])},onMediaChange:function j(){this.duration=this.object.controls.currentItem.duration;this.naturalVideoWidth=this.object.controls.currentItem.imageSourceWidth;this.naturalVideoHeight=this.object.controls.currentItem.imageSourceHeight},onStateChange:function d(){var q=b[this.object.playState];if(q===f){return}if(q==="Stopped"){if(~~(this.lastPosCheck.position+((+new Date-this.lastPosCheck.time)/1000))===~~this.duration){q="Ended"}}if(q==="Ended"){this.onVideoEnd();q="Closed"}if(q!==this.playState){this.execSuper("onStateChange",[q]);if(this.playState==="Playing"){this.lastPosCheck.position=this.getPosition();this.lastPosCheck.time=+new Date()}}},onVideoError:function h(){this.execSuper("onVideoError",[this.object.controls.currentItem.error.errorCode,this.object.controls.currentItem.error.errorDescription])},getPosition:function n(){return this.object.controls&&this.object.controls.currentPosition},changeVideo:function l(){var q=this.execSuper("changeVideo",arguments);if(q){this.object.URL=q}},play:function e(){if(this.object.controls){this.object.controls.play()}},pause:function p(){if(this.object.controls){this.object.controls.pause()}},stop:function k(){if(this.object.controls){this.object.controls.stop()}}})}(this.players));(function(c,b){c.registerPlayer("Flash_generic",{config:{technologies:[{name:"Flash",versions:[9,">"]}],supported:{type:["audio/mpeg","audio/x-mpeg","video/mpeg","video/flv","video/x-flv"],protocol:["http"]}},pluginData:"/layoutftv/players/jw_player/mediaplayer.swf",createObjectSrc:function a(){var d=this.execSuper("createObjectSrc");d.setParams({flashvars:{autostart:this.options.autoplay==true,file:this.initialUrl}});return d}})}(this.players));(function(b,a){var e=0;b.registerPlayer("SL_generic",b.PlayerControllerPrototype,{config:{technologies:[{name:"Silverlight",versions:[3,">"]}],supported:[{protocol:["http","mms"],type:["audio/x-ms-wmv","video/x-ms-wmv","application/asx","application/asf","video/x-ms-asf","audio/x-ms-wma","video/wsx"]}]},pluginData:"/layoutftv/players/player_video_simple/player_video_simple.sl3.xap",init:function n(){this.pollIntervalTime=500;this.execSuper("init",arguments);this.options.registerPlayCount=false},destroy:function p(){this.stopPolling()},filterMedia:function g(u){var t=this.config.supported.reverse().length,s;while(!s&&t--){s=u.getFirstDefinitionMatch(this.config.supported[t])}this.config.supported.reverse();return s},createObjectSrc:function j(){var s="onPlayer"+e+++"Ready",t=this.execSuper("createObjectSrc");window[s]=this.callback("onPlayerReady");t.setParams({autoplay:true,autohidebuttons:true,onLoad:s,enablerating:false,displayrating:false,displaysequence:false,displayincrust:false,displaycaption:false});if(window.ftvi_portail){t.setParams("theme",window.ftvi_portail)}if("initialMedia" in this){t.setParams("videourl",this.initialUrl)}return t},onPlayerReady:function m(s){this.mediaElement=s.findName("mediaElement");this.mediaElement.AddEventListener("MediaOpened",this.callback("onVideoChange"));this.mediaElement.AddEventListener("CurrentStateChanged",this.callback("onStateChange"));this.mediaElement.AddEventListener("MediaEnded",this.callback("onVideoEnd"));this.mediaElement.AddEventListener("MediaFailed",this.callback("onVideoError"));this.execSuper("onPlayerReady")},onVideoChange:function h(){this.execSuper("onVideoChange",[this.mediaElement.Source,this.mediaElement.NaturalDuration.seconds,this.mediaElement.naturalVideoWidth,this.mediaElement.naturalVideoHeight])},startPolling:function f(){this.position=this.mediaElement.Position.seconds;window.clearInterval(this.pollInterval);this.pollInterval=window.setInterval(this.callback("poll"),this.pollIntervalTime)},stopPolling:function d(){window.clearInterval(this.pollInterval)},poll:function i(){try{var s=this.mediaElement.Position.seconds,u=(s-this.position)*1000}catch(t){this.stopPolling();this.onVideoError();return}if(u>this.pollIntervalTime*1.8||u<0){this.onPositionJump(s)}this.position=s},onStateChange:function k(){if(this.mediaElement.CurrentState==="Opening"){return}if(this.mediaElement.CurrentState!==this.playState){this.execSuper("onStateChange",[this.mediaElement.CurrentState]);if(this.playState==="Playing"){this.startPolling()}else{this.stopPolling()}}},getPosition:function q(){return this.position||0},changeVideo:function r(){var s=this.execSuper("changeVideo",arguments);if(s){this.mediaElement.Source=s}},play:function o(){this.mediaElement.play()},pause:function c(){this.mediaElement.pause()},stop:function l(){this.mediaElement.stop()}})}(this.players));(function(b,d){var m=0;b.registerPlayer("Pluzz_Ludo",b.PlayerControllerPrototype,{config:{technologies:[{name:"Flash",versions:[9,">"]}],supported:{protocol:["rtmp"],type:["video/mpeg"]}},pluginData:"/layoutftv/players/jsMediaPlayer/flashCatchup/ftplayer.swf",createObjectSrc:function g(){var o="PluzzLudoControls"+m++,p=this.execSuper("createObjectSrc",arguments);window[o]={onPause:this.callback("onPause"),onPlay:this.callback("onPlay"),onSeek:this.callback("onSeek"),onChangeVideo:this.callback("onVideoChange"),onPlayerReady:this.callback("onPlayerReady")};p.setParams({allowfullscreen:true,allowscriptaccess:"always",flashvars:{objJS:o}});return p},onPlayerReady:function f(){this.execSuper("onPlayerReady");if(this.initialMedia){this.changeVideo(this.initialMedia)}},onPause:function i(){this.onStateChange("Paused")},onPlay:function a(){if(!this.url){return}this.onStateChange("Playing")},onSeek:function n(p){var o=p;this.position=(~~o.substr(0,2)*60)+(~~o.substr(3,2))},onVideoChange:function e(o){if(!o){return}this.execSuper("onVideoChange",[o,d,this.width,this.height])},getPosition:function k(){return this.position},changeVideo:function j(p){p=this.execSuper("changeVideo",arguments);if(!p){return}this.object.jsChangeVideo(p);var r=this.nextMedia,o,s,q;while(r.parent){r=r.parent}o=r&&r.extraData.objetCappu;if(o){s=o.getSousTitres();for(q=0;q<s.length;q++){this.object.jsLoadSubtitle(s[q].replace(/^sami:/,""))}}},play:function c(){this.object.jsPlay()},pause:function l(){this.object.jsPause()},stop:function h(){this.object.jsPause()}})}(this.players));(function(h,f,a,b,g){(function(l){for(var k in l){if(!l[k]){throw new Error("Dépendence non satisfaite : "+k)}}}({players:!!a,"pluginInfos.Getter":!!(f&&f.Getter),EventsManager:!!h.EventsManager,MediaInfos:!!g}));h.PlayerSelecteur=h.PlayerSelecteur||EasyPrototype.createClass("PlayerSelecteur",h.EventsManager,{init:function j(l,k){this.execSuper("init");this.pluginGetter=new f.Getter();this.options=k;this.initialMedia=(l instanceof g)?l:new g(l);this.initialMedia.getMetaFlux(this.callback("onMetaFluxReady"));this.events.extend(this.initialMedia,{error:"invalid_media"});this.pluginGetter.addEventListener("plugin_installed",this.callback("_onPluginInstalled"));this.events.extend(this.pluginGetter,"check_for_plugins")},_onPluginInstalled:function d(){if(!this.player&&this.initialMedia.ready.value===true){this.onMediaReady()}},onMetaFluxReady:function i(k){var l=true;if(k&&"isPublished" in k){l=k.isPublished()}if(!l){this.events.trigger("invalid_media")}else{this._searchPlayer()}},_searchPlayer:function e(){var l=a.types.length,k;while(!k&&l--){if(a.types[l].supports(this.initialMedia)&&this.pluginGetter.anyPresent(a.types[l].config.technologies)){k=a.types[l]}}if(k){this.player=k;this.events.trigger("got_player",k)}else{this.events.trigger("player_not_found")}},getPluginSuggestions:function c(){return this.pluginGetter.getSuggestions()}})}(this,this.pluginInfos,this.players,this.EventsManager,this.MediaInfos));(function(e,b){(function(l){for(var k in l){if(!l[k]){throw new Error("Dépendence non satisfaite : "+k)}}}({EasyPrototype:!!e.EasyPrototype,EventsManager:!!e.EventsManager}));if(!Array.prototype.indexOf){Array.prototype.indexOf=function(l){var k=this.length;while(k--&&l!==this[k]){}return k}}var d=EasyPrototype.createClass("ScenariiPlayer",{init:function j(l,k){this._stagesDone=[];this._currentStage=0;this.context=l||this;this.nameSpace=k},_setScenario:function h(l){l=l||this.nextScenario;if(!this.scenarii[l]){return}this._currentScenario=[];var k=this.scenarii[l].length;while(k--){if(this._stagesDone.indexOf(this.scenarii[l][k])===-1){this._currentScenario.push(this.scenarii[l][k])}}this._currentScenario.reverse();this._currentStage=0;delete (this.nextScenario)},_whenStageFinished:function a(){this._stagesDone.push(this._currentScenario[this._currentStage]);if(this.nextScenario){this._setScenario()}else{this._currentStage++}this._execStage()},_execStage:function f(){if(this._currentScenario&&this._currentScenario[this._currentStage]){this._stages.trigger(this._currentScenario[this._currentStage]).whenFinished(this.callback("_whenStageFinished"))}else{this.closeScenario()}},closeScenario:function g(){this._started=false;this._stagesDone=[]},playScenario:function c(k){if(this._started){this.nextScenario=k}else{this._started=true;this._stages=new e.EventsManager(this.context,d.scenes["*"],d.scenes[this.nameSpace]);this._setScenario(k);this._execStage()}},setScenarii:function(k){this.scenarii=k}});d.scenes={};d.registerScenes=function i(l,k){if(this.scenes[l]===b){this.scenes[l]=k}else{for(var m in k){this.scenes[l][m]=k[m]}}};e.ScenariiPlayer=e.ScenariiPlayer||d}(this));(function(P,I,y){(function(ag){for(var af in ag){if(!ag[af]){throw new P.Error("Dépendence non satisfaite : "+af)}}}({EasyPrototype:!!P.EasyPrototype,jQuery:!!I,ScenariiPlayer:!!P.ScenariiPlayer,EventsManager:!!P.EventsManager,PlayerSelecteur:!!P.PlayerSelecteur,MediaInfos:!!P.MediaInfos}));var T=EasyPrototype.createProtoClass("PlayerBoxPanneau",null,{createRoot:function U(af){if(!this.panneauNode){this.panneauNode=I('<div class="panneau" />').hide().appendTo(this.playerBoxCtnr);this.panneauCloseButton=I('<button title="Retourner à la vidéo" class="close">Retourner à la vidéo</button>');this.panneauCloseButtonHover=this.panneauCloseButton.clone().addClass("hoverHandler").hover(this.callback("onHoverClose"),this.callback("onHoutClose"));this.panneauTitreNode=I("<h3 />");this.panneauContentNode=I('<div class="content" />');this.panneauNode.append(this.panneauCloseButton).append(this.panneauCloseButtonHover).append(this.panneauTitreNode).append(this.panneauContentNode);this.panneauCloseButton.add(this.panneauCloseButtonHover).click(this.callback("hidePanneau"));new StyleInjection({url:"/layoutftv/css/playerbox/panneau.css",loadControl:function(){var ah=I('<div class="playerBox"><div class="panneau" /></div>').css({position:"absolute",top:"-1000px",left:"-1000px",width:"100px",height:"100px"}).appendTo(document.body),ag=ah.children(".panneau").css("position")==="absolute";ah.remove();return ag},onload:af,onerror:this.callback("hidePanneau")})}else{af&&af()}},onPlayerEvent:function c(af){this.execSuper("onPlayerEvent",arguments);if(this.panneauVisible&&((af.type==="playStateChange"&&arguments[2]==="Playing")||af.type==="videoChange")){this.hidePanneau()}},setPanneau:function L(ai,ag,ah,af){this.createRoot(this.callback("onPanneauRootCreated",ai,ag,ah,af))},onPanneauRootCreated:function l(ai,ag,ah,af){if(this.panneauNode.is(":visible")){this.panneauOnHide&&this.panneauOnHide()}this.panneauOnHide=af;if(ai){this.panneauTitreNode.text(ai).insertBefore(this.panneauContentNode)}else{this.panneauTitreNode.remove()}this.panneauContentNode.empty().append(ag).hide();ah&&ah();this.panneauContentNode.show()},showPanneau:function h(ai,ag,af,ah){this.setPanneau(ai,ag,this.callback("onPanneauReadyToShow",ah),af)},onPanneauReadyToShow:function d(ag){if(!this.panneauVisible){this.panneauVisible=true;this.panneauWasPlaying="player" in this&&this.player.playState==="Playing";try{if("leaveFullScreen" in this.player){this.player.leaveFullScreen()}if("hideGui" in this.player){this.player.hideGui()}else{this.player.pause()}}catch(af){console.error(af)}this.panneauNode.css({display:"block",height:0}).animate({height:(this.player.height-14)+"px"},{duration:0,complete:this.callback("onPanneauShowAnimation",ag)})}},onPanneauShowAnimation:function i(af){this.panneauNode.css("height","auto");af&&af()},onHoverClose:function ad(){this.panneauCloseButtonHover.stop().animate({opacity:1},{duration:"fast"})},onHoutClose:function ad(){this.panneauCloseButtonHover.stop().animate({opacity:0},{duration:"fast"})},hidePanneau:function u(){if(this.panneauVisible){this.panneauNode.animate({height:0},{duration:0,complete:this.callback("onPanneauHidden")})}},onPanneauHidden:function a(){this.panneauNode.css("display","none");P.setTimeout(this.player.callback(("showGui" in this.player)?"showGui":"play",this.panneauWasPlaying),200);this.panneauVisible=false;this.panneauOnHide&&this.panneauOnHide();delete this.panneauOnHide}}),ab=EasyPrototype.createProtoClass("PlayerBoxSocial",null,{onPlayerEvent:function c(af){this.execSuper("onPlayerEvent",arguments);switch(af.type){case"shareMailClicked":this.shareMail();break;case"shareExportClicked":this.shareEmbed();break;case"shareLinkClicked":this.shareLink();break;case"shareFbClicked":this.shareFacebook();break;case"shareTwtClicked":this.shareTwitter();break}},shareFacebook:function Y(){var ag=this.player.currentMedia.getMetaLive();if(!(ag&&"getUrlReference" in ag&&"getTitre" in ag)){return}var af=encodeURIComponent(ag.getUrlReference()),ah=encodeURIComponent(ag.getTitre());if(!af){af=P.document.location.href}af="http://www.facebook.com/sharer.php?u="+af+"&t="+ah;this.openSharePopup("Facebook",af,"partage_facebook","width=990,height=570")},shareTwitter:function Z(){var ag=this.player.currentMedia.getMetaLive();if(!(ag&&"getUrlReference" in ag&&"getTitre" in ag)){return}var af=encodeURIComponent(ag.getUrlReference()),ah=encodeURIComponent(ag.getTitre());if(!af){af=P.document.location.href}af="http://twitter.com/home?status="+ah+" "+af;this.openSharePopup("Twitter",af,"partage_twitter","width=650,height=350")},openSharePopup:function S(af,ag,an,ah){var ai=I('<p class="alert_title">Votre navigateur a probablement bloqué le pop-up de partage '+af+".</p>"),ak=I('<p class="alert_text" />').append(I('<a href="'+ag+'">Cliquez ici pour y accéder</a>').click(am)),aj="navigator" in P&&"userAgent" in P.navigator&&P.navigator.userAgent.toLowerCase().indexOf("chrome")!==-1,al;function am(ao){var ap=an;if(aj&&al){ap+=".";al=false}if(al&&!al.closed){al.focus()}else{if(al=P.open(ag,ap,ah)){if(!aj){ai.text("Un pop-up a été ouvert pour prendre en charge le partage "+af)}}else{return}}ao&&ao.preventDefault()}am();this.showPanneau("Partage "+af,ai.add(ak))},shareMail:function C(){var ah=this.player.currentMedia.getMetaLive();if(!(ah&&"isDirect" in ah&&"getLastDiffusion" in ah&&"getUrlReference" in ah&&"getTitre" in ah&&"getChaine" in ah)){return}var ag=ah.isDirect()?"direct":ah.getLastDiffusion()/1000;var af=I('<iframe src="/appftv/envoi_mail/custom/partage_video/?url_reference='+encodeURIComponent(ah.getUrlReference())+"&titre="+encodeURIComponent(ah.getTitre())+"&date_diff="+encodeURIComponent(ag)+"&chaine="+encodeURIComponent(ah.getChaine())+"&color="+encodeURIComponent(this.options.color)+'" frameborder="0" allowtransparency="yes"></iframe>');this.showPanneau("Partager",af,function(){if(I.browser.msie&&I.browser.version<9){this.panneauNode.find(".alert_title").remove()}},function(){if(I.browser.msie&&I.browser.version<8){af.height(af.parent().height())}})},shareEmbed:function K(){this.showPanneau("Partager","L'export de player n'est pas encore possible. Merci de votre compréhension")},getZeroClipboardClip:function n(af){ZeroClipboard.setMoviePath("/layoutftv/flash/zeroClipboard/ZeroClipboard.swf");this.zeroClip=new ZeroClipboard.Client();this.zeroClip.setHandCursor(true);if(af){this.zeroClip.setText(af)}return this.zeroClip},onShareLinkVisible:function r(ai,ag){var af=ai.parent()[0],ah=this.getZeroClipboardClip(ag);ah.addEventListener("complete",function(aj,ak){ai.text("L'URL a correctement été copiée")});ah.show();ah.glue(af,af.parentNode)},shareLink:function F(){var ai=this.player.currentMedia.getMetaLive();if(!(ai&&"getUrlReference" in ai)){return}var af=ai.getUrlReference(),ag=I('<p class="url_copy">'+af+"</p>"),aj=I('<p class="confirm_copy">Cliquez pour copier l\'URL permanente de cette vidéo</p>'),ah=this;this.showPanneau("Partager",aj.add(ag),function(){if(this.zeroClip){this.zeroClip.destroy()}},this.lazyCallback("onShareLinkVisible",aj,af))}}),k=EasyPrototype.createProtoClass("PlayerBoxRelationel",null,{tradCsa:{CSA2:10,CSA3:12,CSA4:16,CSA5:18},onPlayerEvent:function c(af){this.execSuper("onPlayerEvent",arguments);switch(af.type){case"enSavoirPlusClicked":this.enSavoirPlus();break}},formatDate:function N(ag){ag=new Date(ag);var af="dimanche,lundi,mardi,mercredi,jeudi,vendredi,samedi".split(","),ah="janvier,février,mars,avril,mai,juin,juillet,août,septembre,octobre,novembre,décembre".split(",");return af[ag.getDay()]+" "+ag.getDate()+" "+ah[ag.getMonth()]+" "+ag.getFullYear()},enSavoirPlus:function t(){var an,ag={},ar=this.player.currentMedia.getMetaLive();if(!(ar&&"getTitre" in ar&&"getNearestDiffusion" in ar&&"getDateDepublication" in ar&&"getLectures" in ar&&"getDuree" in ar&&"getSousTitre" in ar&&"getActeurs" in ar&&"getSynopsis" in ar)){an="<p>Aucune méta-donnée disponible pour cette vidéo</p>"}else{an='<div class="header"><h4>'+ar.getTitre()+"</h4>";var ah=ar.getSignaletiqueCSA(),ao=ar.getLectures(),af=[],al=ar.getNearestDiffusion(),ak=ar.getDateDepublication(),ai=ar.getActeurs(),ap,aj="",aq;if(ah&&ah!=="CSA1"){an+='<p class="csa">Déconseillé aux moins de '+this.tradCsa[ah]+" ans</p>"}if(al){af.push("Diffusé le "+this.formatDate(al))}if(ak){af.push("Disponible jusqu'au "+this.formatDate(ak))}if(af.length){an+='<p class="dates">'+af.join("<br />")+"</p>"}if(ao){an+='<p class="nb_lectures">Vu '+ao+" fois</p>"}an+="</div>";try{ag["Durée"]=ar.getDuree();if(!ag["Durée"]||ag["Durée"]==="00:00:00"){delete ag["Durée"]}}catch(am){console.error(am)}ag["Présentation"]=ar.getSousTitre();if(!ag["Présentation"]){delete ag["Présentation"]}if(ai.length){ag.Acteurs="<ul><li>"+ai.join("</li><li>")+"</li></ul>"}ag["Résumé"]=ar.getSynopsis();if(!ag["Résumé"]){delete ag["Résumé"]}for(ap in ag){if(ap==="Résumé"){aq="resume"}else{aq=false}aj+="<dt"+(aq?' class="'+aq+'"':"")+">"+ap+" : </dt><dd>"+ag[ap]+"</dd>"}if(aj){an+="<dl>"+aj+"</dl>"}}this.showPanneau("En savoir plus",an)}}),b=EasyPrototype.createProtoClass("PlayerBoxWithChapitre",null,{onPlayerEvent:function c(ag,ah,aj,af,ai){this.execSuper("onPlayerEvent",arguments);if("chapitres" in this.player){switch(ag.type){case"chapitreAdded":this.addChapitrage(ah,aj,af,ai);break;case"chapitreChanged":this.onChapitreChanged(ah,aj,af,ai);break;case"chapitrageChanged":this.chapitrageVisibility(ah);break;case"videoChange":this.resetChapitrage();break}}},showWarning:function w(){this.resetChapitrage();this.execSuper("showWarning",arguments)},onChapitreChanged:function o(af){I(".current",this.chapitrageListNode).not(".id"+af).removeClass("current changing");I(".id"+af,this.chapitrageListNode).addClass("current").removeClass("changing")},chapitrageVisibility:function f(af){if(!this.chapitrageRootNode){return}if(af){this.chapitrageRootNode.show()}else{this.chapitrageRootNode.hide()}},collectChapitrage:function O(ah){var ag=ah.getMetaFlux(),af,ai;if(ag&&"getNearestDiffusion" in ag&&"getDateDepublication" in ag&&"getTitre" in ag&&"getChapitres" in ag){af=ag.getNearestDiffusion();ai=ag.getDateDepublication();return{titre:ag.getTitre(),dateDiff:af?new Date(af).toString():y,dateDepubli:ai?new Date(ai).toString():y,chapNb:ag.getChapitres().length}}},resetChapitrage:function x(){if(this.chapitrageActif){this.chapitresDelta=1;if(this.player.statusChapitrage()===false){this.chapitrageRootNode.hide()}this.chapitrageListNode.empty();this.chapitrageHeaderNode.empty();this.setChapitrageHeader(this.player.currentMedia)}},initChapitrage:function q(){if(!this.chapitrageActif){this.chapitrageActif=true;new StyleInjection({url:"/layoutftv/css/playerbox/chapitrage.css"});this.chapitresDelta=1;this.chapitrageRootNode=I('<div class="chapitrage" />');if(this.player.statusChapitrage()===false){this.chapitrageRootNode.hide()}this.chapitrageHeaderNode=I('<div class="header" />').appendTo(this.chapitrageRootNode);this.chapitrageCloseNode=I('<div class="close">Fermer</div>').click(this.callback("chapitrageVisibility",false)).appendTo(this.chapitrageRootNode);this.chapitrageListNode=I("<ul />").appendTo(this.chapitrageRootNode);this.playerBoxCtnr.append(this.chapitrageRootNode);this.setChapitrageHeader(this.player.currentMedia)}},setChapitrageHeader:function s(ah){var ag=[],af=this.collectChapitrage(ah);if(!af){this.chapitrageRootNode.hide();return}if(af.dateDiff){ag.push(af.dateDiff)}if(af.dateDepubli){ag.push(af.dateDepubli)}this.chapitrageHeaderNode.append("<h4>"+af.titre+"</h4>").append(ag.length?'<p class="dates">'+ag.join("/")+"</p>":"").append('<p class="nb_chapitres">'+af.chapNb+" chapitres</p>")},addChapitrage:function ac(ag,aj,af,ai){this.initChapitrage();if(!aj){this.chapitresDelta--;return}var ah=I('<li class="chapitre id'+ag+'">Chapitre '+(ag+this.chapitresDelta)+" : "+aj+"</li>");ah.click(this.callback("onChapitreClicked",ag,ah));this.chapitrageListNode.append(ah)},onChapitreClicked:function j(af,ag){this.player.gotoChapitre(af);ag.addClass("current changing").siblings(".current").addClass("changing")}}),m=P.EasyPrototype.createClass("PlayerBox",P.EventsManager,b,T,ab,k,{__statics__:{instances:[]},classSetup:function M(){ScenariiPlayer.registerScenes(this.className,this.prototype.scenariiScenes);delete this.prototype.scenariiScenes;this.execSuper("classSetup")},getInstance:function J(){m.instances.push(this)},init:function V(af,ag){this.execSuper("init",arguments);new StyleInjection({url:"/layoutftv/css/playerbox/default.css"});this.options=ag||{};this.options.color=this.options.color||"orange";this.playerBoxCtnr=af.addClass("playerBox "+this.options.color);this.playerCtnr=I('<div class="playerCtnr" />').appendTo(this.playerBoxCtnr);this.playerBoxCtnr.width(this.options.width||"auto").height(this.options.height||"100%");this.options.width=this.playerBoxCtnr.width();this.options.height=this.playerBoxCtnr.height();if("data" in this.playerBoxCtnr){this.playerBoxCtnr.data("PlayerBox",this)}if(this.options.enchainer===true){this.addEventListener("videoEnd",this.callback("playNext"));this.addEventListener("videoError",this.lazyCallback("playNext",2000))}},attachLink:function B(af){if(!("attachedLinks" in this)){this.attachedLinks=[]}this.attachedLinks.push(af);if(this.options.triggerLinkEvents){this.addEventListener((typeof this.options.triggerLinkEvents==="string"||this.options.triggerLinkEvents instanceof Array)?this.options.triggerLinkEvents:"*",function(ah){var ai=(this.player&&this.player.currentMedia)||this.lastVideoAsked;if(ai&&ai.getUrlMatch(af.attr("href"),false)){af.trigger(ah.type,[].slice.call(arguments,1))}})}if("data" in af){af.data("PlayerBox",this)}var ag=this;af.click(function(){ag.setVideo(this.href);return false})},playNext:function X(){var ah=(this.player&&this.player.currentMedia)||this.lastVideoAsked;if(!ah){return}if(ah.building.value===true){ah.addEventListener("buildingFinished",this.callback("playNext"));return}var ag=this.attachedLinks.length,af;while(ag--){if(ah.getUrlMatch(this.attachedLinks[ag].attr("href"))){af=ag+1;break}}if(af&&af<this.attachedLinks.length){this.attachedLinks[af].click()}},removePlayer:function p(){if(this.player.addEventListener){this.events.unextend(this.player);this.player.unbind("*",this.callback("onPlayerEvent"))}if("destroy" in this.player){this.player.destroy()}I(this.player.getObject()).hide().remove();delete this.player},setVideo:function ae(af){if(!(af instanceof MediaInfos)){this.lastVideoAsked=new MediaInfos(af);this.lastVideoAsked.addEventListener("buildingFinished",this.callback("setVideo",this.lastVideoAsked));return}this.lastVideoAsked=af;if(this.player){if("currentMedia" in this.player&&this.player.currentMedia.getUrlMatch(af.url)){return}if("changeVideo" in this.player&&this.options.preRollFever!==true){if(af.building.value){af.addEventListener("buildingFinished",this.callback("setVideo",af));return}else{if(this.player.supports(af)){this.player.changeVideo(af);return}}}this.removePlayer()}if("playerSelecteur" in this){this.events.unextend(this.playerSelecteur);this.playerSelecteur.unbind()}this.playerSelecteur=new PlayerSelecteur(af,this.options);if(!("scenariiPlayer" in this)){this.scenariiPlayer=new ScenariiPlayer(this,"PlayerBox");this.scenariiPlayer.setScenarii(this.options.scenarii)}else{this.scenariiPlayer.closeScenario();this.scenariiPlayer._stagesDone.push("show_play_button");if(this.options.preRollFever!==true){this.scenariiPlayer._stagesDone.push("show_ad")}}this.playerCtnr.empty();this.playerSelecteur.addEventListener("got_player",this.callback("onGotPlayer"));this.playerSelecteur.addEventListener("player_not_found",this.callback("onPlayerNotFound"));this.playerSelecteur.addEventListener("invalid_media",this.callback("onInvalidMedia"));this.events.extend(this.playerSelecteur)},onGotPlayer:function aa(){this.scenariiPlayer.playScenario("play");if(this.suggestInterface){this.suggestInterface.exit();delete this.suggestInterface}},onPlayerNotFound:function R(){this.scenariiPlayer.playScenario("require_plugins")},onInvalidMedia:function g(){this.scenariiPlayer.playScenario("invalid_media")},onPlayerEvent:function c(af,ag){this.playerBoxCtnr.trigger(af.type,[].slice.call(arguments,1));this.execSuper("onPlayerEvent",arguments);if(af.type==="videoConnexeCalled"){this.player.currentMedia.getMetaLive(function(ah){if(ah&&"getVideoConnexe" in ah){var ai=ah.getVideoConnexe(ag);if(ai&&ai.url_reference){P.location.href=ai.url_reference}else{this.setVideo(ag)}}})}else{if(af.type==="videoError"){this.onVideoError.apply(this,[].slice.call(arguments,1))}}},showWarning:function w(af,ag){if(this.player){this.removePlayer()}this.playerCtnr.empty();var ah=this;I('<div class="warning '+af+'">'+ag+"</div>").css({width:this.options.width,height:this.options.height,display:"none"}).appendTo(this.playerCtnr).mousedown(function(){return false}).fadeIn().find("a.video").click(function(ai){ai.preventDefault();ai.stopPropagation();ah.setVideo(this.href)})},onVideoError500:function A(){var af=(this.player&&(this.player.currentMedia||this.player.nextMedia))||this.playerSelecteur.initialMedia;this.showWarning("video",'<p>Une erreur est survenue lors de la lecture<br />de la vidéo sélectionnée</p><p><a class="video" href="'+af.url+'">Relancer le player</a></p>');this.events.trigger("videoError")},onError500:function z(){this.showWarning("invalid_media","<p>La vidéo sélectionnée est inaccessible</p>");this.events.trigger("videoError")},onError404:function G(){var af=this;this.playerSelecteur.initialMedia.getMetaFlux(function(ag){if(ag&&"exists" in ag&&ag.exists.value){af.showWarning("invalid_media","<p>La vidéo sélectionnée n'est plus disponible</p>")}else{af.showWarning("invalid_media","<p>La vidéo sélectionnée est inexistante</p>")}});this.events.trigger("videoError")},onError403:function H(){this.showWarning("geoloc","<p>Cette vidéo est inaccessible sur votre territoire<br />pour des raisons de droits de diffusion</p>");this.events.trigger("videoError")},onError503:function v(){this.showWarning("domainlock","<p>Il n'est pas autorisé d'utiliser ce player sur d'autres domaines que les domaines France&nbsp;télévisions</p>");this.events.trigger("videoError")},onVideoError:function e(af,ag){switch(af){case 404:this.onError404();break;case 403:this.onError403();break;case 503:this.onError503();break;default:this.onVideoError500();break}},scenariiScenes:{show_player:function D(af){af.wait();var ag,aj=this.playerSelecteur.player,ai=this.player=new aj(this.playerSelecteur.initialMedia,this.options),ak=this.playerSelecteur.getPluginSuggestions();if(ai.addEventListener){this.events.extend(ai);ai.addEventListener("*",this.callback("onPlayerEvent"))}this.playerBoxCtnr.bind("gotoChapter",function(al,am){ai.gotoChapitre&&ai.gotoChapitre(am)}).bind("play",function(al){ai.play&&ai.play()}).bind("pause",function(al){ai.pause&&ai.pause()}).bind("stop",function(al){ai.stop&&ai.stop()});this.playerCtnr.append(ai.getObject());if(ak.length){var ah=ak.getInterface("default_upgrade",this.options);I(this.options.suggestRoot||ah.getDefaultCtnr()).append(ah.rootNode)}},show_plugins:function E(af){var ag=this.playerSelecteur.getPluginSuggestions();if(ag.length){af.wait();this.suggestInterface=ag.getInterface(this.options);this.suggestInterface.addEventListener("exit",af.continuer);this.playerCtnr.append(this.suggestInterface.rootNode)}},no_display_solution:function W(af){af.wait();this.showWarning("no-plugin",'<p>Aucune solution d\'affichage n\'a été trouvée pour lire <a class="video" href="'+this.playerSelecteur.initialMedia.url+'">la vidéo sélectionnée</a></p>');this.events.trigger("videoError")},invalid_media:function Q(af){af.wait();if(this.playerSelecteur.initialMedia.lastErrorMessage&&this.playerSelecteur.initialMedia.lastErrorMessage.message==="Oeuvre non disponible"){this.onError404()}else{this.onError500()}}}});P.PlayerBox=P.PlayerBox||m}(this,this.jQuery));(function(c,d,b){(function(f){for(var e in f){if(!f[e]){throw new c.Error("Dépendence non satisfaite : "+e)}}}({jQuery:!!d}));d.fn.player=d.fn.player||function a(e){e=e||{};if(typeof e==="string"){return this.playerCmd.apply(this,arguments)}if(/^[0-9]+$/.test(e.width)){e.width=c.parseInt(e.width)}if(/^[0-9]+$/.test(e.height)){e.height=c.parseInt(e.height)}var f=this.filter("a");if(f.length>1&&!("hideLink" in e)){e.hideLink=false}return f.each(function(g){var j=d.extend({},d.fn.player.defaultOptions,e),m,l,i=d(this),h,k;if("data" in i&&i.data("PlayerBox")){return}if(("playerBox" in j)&&j.playerBox instanceof PlayerBox){m=j.playerBox;l=m.playerBoxCtnr}else{if("container" in j||"playerBoxId" in j){l=d(j.container||"#"+j.playerBoxId)}if(l===b||l.length===0){h=j.playerBoxId?' id="'+j.playerBoxId+'"':"";l=d("<div"+h+' class="'+j.playerBoxClass+'" />')}}if(l.parents("body").length===0){l.insertAfter(this)}if(!m){m=("data" in l)&&l.data("PlayerBox")}if(!m){k=true;m=new PlayerBox(l,j)}m.attachLink(i);if(k||f.length===1){m.setVideo(this.href)}if(j.hideLink===true){i.hide()}})};d.fn.player.defaultOptions={playerBoxClass:"ftv_player",scenarii:{play:["show_player"],require_plugins:["show_plugins","no_display_solution"],invalid_media:["invalid_media"]},hideLink:true,triggerLinkEvents:false}}(this,this.jQuery));(function(b,c,a){(function(f){for(var e in f){if(!f[e]){throw new b.Error("Dépendence non satisfaite : "+e)}}}({jQuery:!!c}));c.fn.playerCmd=c.fn.playerCmd||function d(e){if(!("data" in this)){return this}return this.each(function(){var f=c(this).data("PlayerBox");if(!f||!("player" in f)){return}switch(e){case"play":if("play" in f.player){f.player.play()}break;case"gotoChapter":if("gotoChapitre" in f.player){f.player.gotoChapitre(arguments[1])}break;case"pause":if("pause" in f.player){f.player.pause()}break;case"stop":if("stop" in f.player){f.player.stop()}break;default:break}})}}(this,this.jQuery));(function(g,d,a){g.framework.register("eStat",{scriptCharset:"utf-8",load:function l(){g._cmsJS=0;g.eStat_cmsJS=this.callback("onReady");this.portail=this.getPortail();this.serial=this.getSerial();this.scriptSrc="http://prof.estat.com/js/"+this.serial+".js";this.execSuper("load",[false])},getPortail:function b(){return g.ftvi_portail||("framework" in g&&"CM" in framework&&"inlineParams" in framework.CM&&framework.CM.inlineParams.ftvi_portail)||""},getSection:function k(){return g.ftvi_section||("framework" in g&&"CM" in framework&&"inlineParams" in framework.CM&&framework.CM.inlineParams.ftvi_section)||""},getRubrique:function j(){return g.ftvi_rubrique||("framework" in g&&"CM" in framework&&"inlineParams" in framework.CM&&framework.CM.inlineParams.ftvi_rubrique)||""},getSerial:function h(){if(/^(pp|dev|local)\./.test(document.location.hostname)){return"290090207452"}switch(this.portail){case"france2":return"266066205392";case"france3":return"210010205394";case"france4":return"233033205396";case"france5":return"217017205398";case"franceo":return"289089205002";case"rfo_fr":return"225025205400";case"francetv":default:if(document.location.hostname.indexOf("www.pluzz.fr")!==-1){if(document.location.pathname.indexOf("/direct/")===0){return"278078207454"}return"222022205402"}else{if(g.document.location.hostname.indexOf("sport.francetv.fr")!==-1){return"231031205408"}else{return"294094205410"}}}},checkLoaded:function c(){return g._cmsJS===1},onReady:function f(){g.eStat_id.serial(this.serial);g.eStat_id.pg_mq(this.serial);g.eStat_id.gp_pg_mq("Streaming");g.eStat_tag.post("cms");this.execSuper("onReady")},newPlayer:function m(n){this.exec(function(){try{g.eStat_ms.reference(n,"FTV")}catch(o){console.error(o)}})},videoHit:function i(){var n=[].slice.call(arguments);this.exec(this.callback("doVideoHit",n))},doVideoHit:function e(n){if(n[0].Obj===a){this.waitCount=(this.waitCount||0)+1;if(this.waitCount<20){g.setTimeout(this.callback("doVideoHit",n),30)}return}try{g.eStat_ms.newStream.apply(g.eStat_ms,n)}catch(o){console.error(o)}}})}(this,this.jQuery));(function(l,b,k,g){(function(r){for(var q in r){if(!r[q]){throw new Error("Dépendence non satisfaite : "+q)}}}({players:!!b,jQuery:!!k}));function m(q){if(q<10){return"0"+q}return q}b.registerStatInterface("EstatInterface",{init:function o(q){this.player=q;this.section=framework.eStat.getSection().split("_");this.rubrique=framework.eStat.getRubrique().replace("la_1ere","la1ere").split("_");q.addEventListener("node_created",this.callback("onNodeCreated"));q.addEventListener("videoChange",this.callback("onVideoChange"));framework.eStat.askLoad()},onNodeCreated:function n(){framework.eStat.newPlayer(this.player)},getTitre:function e(){var q,s,r="";if("currentMedia" in this.player){s=this.player.currentMedia.getMetaLive();if(!(typeof s.id==="string"&&s.id.length>8)){r="-"+s.id}if(s&&"getTitre" in s&&"getLastDiffusion" in s){q=s.getLastDiffusion()||"";if(q){if(typeof q==="string"&&q.length<12){q=q*1000}q=new Date(q);q="-"+m(q.getDate())+"/"+m(q.getMonth()+1)+"/"+q.getFullYear()}return s.getTitre()+q+r}}return"Sans titre"},getNiveau1:function j(){if(!("niveau1" in this)){var q=this.player.currentMedia.getMetaLive();if(q&&"getChaine" in q){this.niveau1=q.getChaine().toLowerCase().replace(/\s*/g,"")}else{if(l.document.location.hostname.indexOf("www.pluzz.fr")!==-1){this.niveau1=this.rubrique[0]}else{if(l.document.location.hostname.indexOf("sport.francetv.fr")!==-1){this.niveau1=this.section[1]}else{this.niveau1=this.section[0]}}}}return this.niveau1||""},getNiveau2:function i(){if(!("niveau2" in this)){if(l.document.location.hostname.indexOf("www.pluzz.fr")!==-1){this.niveau2=this.rubrique[2]}else{if(l.document.location.hostname.indexOf("sport.francetv.fr")!==-1){this.niveau2=this.rubrique[0]}else{this.niveau2=this.section[1]}}}return this.niveau2||""},getNiveau3:function f(){if(l.document.location.hostname.indexOf("www.pluzz.fr")!==-1){this.niveau3=this.rubrique[1]}else{if("currentMedia" in this.player){var q=this.player.currentMedia.getMetaLive();if(q&&"getGenre" in q){return q.getGenre()}}}return this.niveau3||""},getNiveau4:function d(){if("currentMedia" in this.player){var q=this.player.currentMedia.getMetaLive();if(q&&"getType" in q){return q.getType()}}return""},getNiveau5:function c(){if("currentMedia" in this.player){var q=this.player.currentMedia.getMetaLive();if(q&&"getRegion" in q){return q.getRegion()}}return""},getGenre:function a(){return"web"},onVideoChange:function h(){var q;if(this.player.currentMedia.metaType==="fluxDirect"){q=this.player.currentMedia.extraData.chaine;if(this.player.currentMedia.extraData.region){q+="_"+this.player.currentMedia.extraData.region}framework.eStat.videoHit(this.player,"direct","direct","direct",q,"direct","direct","web")}else{this.player.currentMedia.getMetaLive(this.callback("onMetaLive"))}},onMetaLive:function p(q){if(q){framework.eStat.videoHit(this.player,this.getTitre(),this.getNiveau3(),this.getNiveau2(),this.getNiveau1(),this.getNiveau4(),this.getNiveau5(),this.getGenre())}else{framework.eStat.videoHit(this.player,"","","","","","","")}}})}(this,this.players,this.jQuery));(function(c,e,b){(function(g){for(var f in g){if(!g[f]){throw new Error("Dépendence non satisfaite : "+f)}}}({jQuery:!!e,EasyPrototype:!!c.EasyPrototype}));ScenariiPlayer.registerScenes("PlayerBox",{show_play_button:function d(f){var g=this.options||{},i=this.playerCtnr;if(g.showPlayButton===false||(g.height&&+g.height<80)){return}f.wait();function j(){e(this).remove();f.continuer()}function h(){var k=e(this).children("object").get(1);if(k.mouseover){k.mouseover()}}new StyleInjection({url:"/layoutftv/css/plugin_suggestion/default.css"});e('<div class="play_button">Voir la vidéo</div>').css({width:(g.width+"px")||"100%",height:(g.height+"px")||"100%","line-height":g.height+"px"}).append(pluginInfos.createObject("Flash",(c.staticDomain||"http://www.francetelevisions.fr")+"/layoutftv/arches/common/images/video/playButtonBg.swf",{width:g.width,height:g.height,className:"background"})).append(pluginInfos.createObject("Flash",(c.staticDomain||"http://www.francetelevisions.fr")+"/layoutftv/arches/common/images/video/playButton.swf",{width:180,height:80,className:"button"})).append('<div class="click_catcher" />').appendTo(i).click(j).bind("mouseover",h)}});var a=(e.fn.player&&e.fn.player.defaultOptions.scenarii)||{};if(e.fn.player&&e.fn.player.defaultOptions.scenarii&&"play" in e.fn.player.defaultOptions.scenarii){e.fn.player.defaultOptions.scenarii.play.reverse().push("show_play_button");e.fn.player.defaultOptions.scenarii.play.reverse()}}(this,this.jQuery));(function(h,f,e,d){(function(n){for(var m in n){if(!n[m]){throw new f("Dépendence non satisfaite : "+m)}}}({jQuery:!!e,EasyPrototype:!!h.EasyPrototype}));var g={2:10,3:12,4:16,5:18},c=EasyPrototype.createClass("SignaletiqueCSA",{classSetup:function j(){if("player" in e.fn){var n=e.fn.player.defaultOptions.scenarii,q,m,o;for(q in n){m=n[q].indexOf("show_player");if(m!==-1){o=n[q].length;while(o--&&o>=m){n[q][o+1]=n[q][o]}n[q][m]="show_csa"}}}ScenariiPlayer.registerScenes("PlayerBox",{show_csa:function p(r){r.wait();var s=new c({video:this.playerSelecteur.initialMedia,options:this.options,exitCallback:r.continuer});if(s.node){this.playerCtnr.append(s.node)}}})},init:function l(m){this.exitCallback=m.exitCallback;this.video=m.video;this.options=m.options;if(m.video.metaType==="fluxDirect"){this.exit()}else{m.video.getMetaLive(this.callback("onMetaLiveReady"))}},onMetaLiveReady:function i(m){if(m&&"getSignaletiqueCSA" in m){this.categorie=m.getSignaletiqueCSA().replace(/^CSA(\d)$/i,"$1")}if(!this.categorie){this.exit();return}this.size={width:this.options.width,height:this.options.height};this.node=e('<div class="panneau_csa"></div>').css({width:(this.size.width+"px")||"100%",height:(this.size.height+"px")||"100%","line-height":this.size.height+"px",background:"black",color:"white","text-align":"center"});if(this.categorie<2){this.exit()}else{if(this.categorie>3){this.syncDate=new SyncDate();this.syncDate.addEventListener("ready",this.callback("createPanneau"))}else{this.createPanneau()}}},createPanneau:function b(){if(this.categorie>3){var o=this.syncDate.getDate(),m=o.getHours();if(m===22&&o.getMinutes()>30){m++}if(m<23||m>5){this.createPanneauStop();return}}var p=this.size.height<400?"S":this.size.height<600?"M":"L",n=g[this.categorie];e('<img src="'+(h.staticDomain||"http://www.francetelevisions.fr")+"/layoutftv/images/csa/csa"+n+p+'.png" alt="Déconseillé aux moins de '+n+' ans"/>').css("height","100%").appendTo(this.node);h.setTimeout(this.callback("exit"),5000)},createPanneauStop:function k(){var n=this.size.height<400?"S":this.size.height<600?"M":"L",m=g[this.categorie];e('<img src="'+(h.staticDomain||"http://www.francetelevisions.fr")+"/layoutftv/images/csa/csaOFF"+m+n+'.png" alt="Déconseillé aux moins de '+m+" ans. Cette vidéo ne sera visionnable qu'entre 22h30 et 5h00\"/>").css("height","100%").appendTo(this.node)},exit:function a(){if(this.node){this.node.remove();delete this.node}if(this.exitCallback){this.exitCallback()}}})}(this,this.Error,this.jQuery));(function(g,j,c,a){(function(n){for(var m in n){if(!n[m]){throw new Error("Dépendence non satisfaite : "+m)}}}({jQuery:!!c,FrameworkLoader:!!j}));j.register("Ad2Play",{options:{callback:function(){}},callbacks:[],scriptSrc:"http://playerftp.francetvplayer.fr/js/ad2play.js",scriptCharset:"utf-8",styleTestNode:c('<div class="ad2play" />').css({position:"absolute",top:"-1000px",left:"-1000px",width:"100px",height:"100px"}),exec:function b(m){var n;if(typeof m==="function"){n=m}else{m=c.extend({},this.options,m);this.callbacks.push(m.callback);n=function(){try{g.ad2play(m.placeHolder,{width:m.width,height:m.height}).ready(function(){this.on("playlist-ended",function(){c(this.element).remove();m.callback&&m.callback()})})}catch(o){console.error(o)}}}this.execSuper("exec",[n])},load:function k(){new StyleInjection({url:"/layoutftv/css/ad2play/default.css",loadControl:this.callback("checkStyleLoaded"),onload:this.getSuper("load",[]),onerror:this.getSuper("load",[])})},checkStyleLoaded:function h(){if("ad2play" in g){return true}this.styleTestNode.appendTo(document.body);var m=this.styleTestNode.css("background-image")!=="none";this.styleTestNode.remove();return m},checkLoaded:function d(){return"ad2play" in g},onReady:function f(){this.ad2PlayInit=g.ad2play;g.ad2play=this.callback("onAd2PlayInit");g.ad2play.extend=this.ad2PlayInit.extend;g.ad2play.prototype=this.ad2PlayInit.prototype;this.execSuper("onReady",arguments)},onError:function e(){var m=(this.callbacks&&this.callbacks.length)||0;while(m--){this.callbacks[m]&&this.callbacks[m]()}},onAd2PlayInit:function l(m){g.setTimeout(this.callback("checkRunning",c(m).parent()),300);return this.ad2PlayInit.apply(this,arguments)},checkRunning:function i(m){if(!c("iframe",m).is(":visible")||c("iframe",m).attr("class")){this.onError()}}})})(this,this.framework,this.jQuery);(function(c,d,b){(function(g){for(var f in g){if(!g[f]){throw new Error("Dépendence non satisfaite : "+f)}}}({jQuery:!!d,Ad2Play:!!framework.Ad2Play}));d.fn.ad2play=d.fn.ad2play||function(f){f=f||{};return this.each(function(){var g=d(this),h={placeHolder:this,width:f.width||g.width(),height:f.height||g.height()};if("callback" in f){h.callback=f.callback}framework.Ad2Play.exec(h)})};d.fn.ad2playContainer=d.fn.ad2playContainer||function(f){f=f||{};if(typeof f==="function"){f={callback:f}}return this.each(function(){var h=d(this),i=d('<div class="Ad2Play_placeHolder" />').appendTo(this);function g(){if(i[0].parentNode!==null){i.remove()}if("callback" in f&&typeof f.callback==="function"){f.callback.call(h)}}i.ad2play({width:f.width||h.width(),height:f.height||h.height(),callback:g})})};function a(j,g){if(!g.length){return false}var f=j.indexOf(g[0]),h;if(f!==-1){h=j.length;while(h--&&h>=f){j[h+1]=j[h]}j[f]="show_ad";return true}g.reverse().length--;return a(j,g.reverse())}d(function e(){if(!("ScenariiPlayer" in c&&"player" in d.fn)){return}ScenariiPlayer.registerScenes("PlayerBox",{show_ad:function g(i){var j=this.options||{},k=this.playerCtnr;if(j.showAd===false||!pluginInfos.getInstance("Flash").isPresent(10.1,false)||(d&&d.cookie&&d.cookie("noad2play")==="true")||(document.location.href.indexOf("noad2play")!==-1)){return}i.wait();k.ad2playContainer({width:j.width,height:j.height,callback:i.continuer})}});var f=d.fn.player.defaultOptions.scenarii,h;for(h in f){a(f[h],["show_csa","show_player"])}})}(this,this.jQuery));
