(function(e,c){var d="prototype",b="constructor",a="callee";e.dynamicOptionsManager=e.dynamicOptionsManager||function(){var k,j,n=arguments[a],h=this,g={},f=function(){return function(){for(var o in this){if(typeof this[o]==="function"){this[o]=this[o].call(h)}}}},l=f(),m=function(t,s){if(arguments.length===0){return new l()}var q=arguments,o=[].slice.call(q,1),p,r;if(q.length===1){if(typeof t==="string"){return q[a]([t])[t]}else{if(typeof t==="object"){if(t instanceof Array){p=f();for(r=0;r<t.length;r++){if(l[d][t[r]]!==c){p[d][t[r]]=l[d][t[r]]}}return new p()}else{for(r in t){q[a](r,t[r])}}}else{if((t||{})[b]===n){q[a](t.raw())}}}}else{if(typeof t==="string"){if(s===c){if(g[t]===c){delete (l[d][t])}else{l[d][t]=g[t]}}else{if(s===null){delete (l[d][t])}else{if((l[d][t]||{})[b]===n){return l[d][t].apply(h,o)}else{if(typeof s==="object"&&!(s instanceof Array||(e.jQuery&&s instanceof e.jQuery)||s.nodeType!==c||(e.MediaInfos&&s instanceof e.MediaInfos))){l[d][t]=n.apply(h,o)}else{if(o.length>1){l[d][t]=n.apply(h);l[d][t].apply(h,o)}else{l[d][t]=s}}}}}}}};m.defined=function(q){var o=arguments;if(q instanceof Array){for(var p=0;p<q.length;p++){if(!o[a](q[p])){return false}}return true}if(o.length>1){if((l[d][q]||{})[b]===n){return l[d][q].defined.apply(h,[].slice.call(o,1))}return}return l[d][q]!==c};m.raw=function(q){if(arguments.length===0){var p,o,r=function(){};r[d]=l[d];o=new r();for(p in o){if(o[p][b]===n){o[p]=o[p].raw()}}return o}if((l[d][q]||{})[b]===n){return l[d][q].raw.apply(h,[].slice.call(arguments,1))}return l[d][q]};m.reset=function(){l[d]={};for(var o in g){m(o,g[o])}};m[b]=n;if(arguments.length){j=n();for(k=0;k<arguments.length;k++){j(arguments[k])}g=j.raw()}m.reset();return m}})(this);(function(o,w,F,b){function q(K,J){var I;function L(M){return function(){return M.apply(K,arguments)}}for(I in J.prototype){if(typeof J.prototype[I]==="function"){K[I]=L(J.prototype[I])}}}function h(I){o.setTimeout(function(){throw I},0)}function C(I){return function(K){var J=I[K];if(J===b){if(typeof I._others==="function"){return I._others(K)}J=I._others}if(J===true){J=K}return J}}function x(J){var I=J.length,K={};while(I--){if(typeof J[I]!=="string"){continue}K[J[I]]=true}return K}function D(L,J,K,I){if(typeof L!=="function"){throw new F("Event listener must be a function")}if(K===b&&typeof J==="boolean"){I=K;K=J;J=b}if(J!==b&&typeof J!=="number"){throw new F("Event listener's iterations must be undefined or a number")}if(K!==b&&typeof K!=="boolean"){throw new F("Event listener's rattrapage must be undefined or a boolean")}if(I!==b&&typeof I!=="function"){throw new F("Event listener's reseter must be undefined or a function")}this.action=L;this.iterations=J;this.rattrapage=K!==false;this.reseter=I;q(this,D)}D.prototype={match:function n(I){return I===this||I===this.action||(I instanceof w&&(I.indexOf(this)!==-1||I.indexOf(this.action)!==-1))},toString:function z(){return"EventListener"}};function e(M,J,L,I){var K;this._name=J;this._event=M;this._listeners=L;this._waiting=0;this._allListenerTriggered=false;this._finished=false;q(this,e);this._params=[{type:J,wait:this._onListenerWait,continuer:this._onListenerContinuer}];for(K=0;K<I.length;K++){this._params.push(I[K])}o.setTimeout(this._execute,0)}e.prototype={_execListener:function G(I){if(I.iterations===0){return}if(I.iterations!==b){I.iterations--}try{I.action.apply(this._event.manager._subject,this._params)}catch(J){h(J)}},addListener:function r(I){if(!this._allListenerTriggered){this._listeners.push(I)}else{this._execListener(I)}},_execCallback:function s(){if(this._finished&&typeof this._callback==="function"){var I=this._callback,J=this._event.manager._subject;this._callback=b;o.setTimeout(function(){I.call(J)},0)}},whenFinished:function E(I){delete (this.whenFinished);this._callback=I;this._execCallback()},_checkFinished:function j(){if(this._allListenerTriggered&&this._waiting===0){this._finished=true;this._execCallback()}},_onListenerWait:function m(){this._waiting++},_onListenerContinuer:function k(){if(!this._finished){this._waiting--;this._checkFinished()}},_execute:function l(){var I;for(I=0;I<this._listeners.length;I++){this._execListener(this._listeners[I])}this._allListenerTriggered=true;this._checkFinished()},toString:function z(){return"EventExecution"}};function H(J,I){this.name=I;this.manager=J;this._listeners=[];q(this,H)}H.prototype={_removeListener:function f(I){var J;if(I===this._listeners.length-1){this._listeners.length--}else{for(J=I+1;J<this._listeners.length;J++){this._listeners[J-1]=this._listeners[J]}this._listeners.length--}if(!this._listeners.length&&this.manager.whenEventHasNoListener){this.manager.whenEventHasNoListener(this.name)}},addListener:function r(J){var I=J.rattrapage&&(this._lastExecution!==b);if(!(I&&J.iterations===1)){if(this._listeners.push(J)===1&&this.manager.whenEventHasListener){this.manager.whenEventHasListener(this.name)}}if(I){this._lastExecution.addListener(J)}},trigger:function u(){var I=this._listeners.length;while(I--){if(this._listeners[I].iterations<=0){this._removeListener(I)}}this._lastExecution=new e(this,this.name,this._listeners.slice(),arguments);return this._lastExecution},unbind:function g(J){var I;if(J===b){this._listeners=[];if(this.manager.whenEventHasNoListener){this.manager.whenEventHasNoListener(this.name)}}else{I=this._listeners.length;while(I--){if(this._listeners[I].match(J)){this._removeListener(I)}}}},resetTriggeredState:function a(){var I=this._listeners.length;this._lastExecution=b;while(I--){if(this._listeners[I].reseter!==b){try{this._listeners[I].reseter(this.name)}catch(J){h(J)}}}},listenerIndexes:function c(K){var I=[],J=this._listeners.length;while(J--){if(this._listeners[J].match(K)){I.push(J)}}return I.reverse()},toString:function z(){return'Event "'+this.name+'"'}};function A(J){var I;if(!(this instanceof A)){throw new F('Must be called with the "new" keyword.')}this._events={};this._extending=[];this._globalListeners=[];q(this,A);if(J!==b){J.addEventListener=this.addEventListener;J.addEventListeners=this.addEventListeners;J.unbind=this.unbind}this._subject=J||this;for(I=1;I<arguments.length;I++){if(typeof arguments[I]==="function"||arguments[I] instanceof D||arguments[I] instanceof w){this.addEventListener("*",arguments[I])}else{this.addEventListeners(arguments[I])}}}A.prototype={_registerGlobalListener:function t(I){this._globalListeners.push(I)},getEvent:function d(I,J){var K;if(this._events[I]===b){this._events[I]=new H(this,I);K=this._globalListeners.length;while(K--){if(this._globalListeners[K].match(J)){continue}this._events[I].addListener(this._globalListeners[K])}}return this._events[I]},addEventListeners:function p(J){var I;for(I in J){if(J[I]){this.addEventListener(I,J[I])}}},addEventListener:function v(J,N,L,M,I){var K;if(!(N instanceof D)){if(N instanceof w){if(N.length<=4&&typeof N[1]==="number"){N=new D(N[0],N[1],N[2],N[3])}else{for(K=0;K<N.length;K++){if(N[K]===b){continue}this.addEventListener(J,N[K],L,M,I)}return}}else{N=new D(N,L,M,I)}}if(J==="*"){this._registerGlobalListener(N);J=[];for(K in this._events){J.push(K)}}else{if(J.indexOf(" ")!==-1){J=J.split(" ")}}if(J instanceof w){K=J.length;while(K--){this.addEventListener(J[K],N)}return}this.getEvent(J).addListener(N)},trigger:function u(I){return this.getEvent(I).trigger.apply(this,[].slice.call(arguments,1))},resetTriggeredState:function a(I){if(I===b){for(I in this._events){this._events[I].resetTriggeredState()}}else{if(this._events[I] instanceof H){this._events[I].resetTriggeredState()}}},unbind:function g(I,L){var K,J;if((I||"*")==="*"){if(L===b){this._globalListeners.length=0}else{K=this._globalListeners.length;while(K--){if(this._globalListeners[K].match(L)){for(J=K+1;J<this._globalListeners.length;J++){this._globalListeners[J-1]=this._globalListeners[J]}this._globalListeners.length--}}}for(I in this._events){this._events[I].unbind(L)}}else{if(I.indexOf(" ")!==-1){I=I.split(" ")}if(I instanceof w){K=I.length;while(K--){this.unbind(I[K],L)}}else{if(this._events[I] instanceof H){this._events[I].unbind(L)}else{if(L===b){this.getEvent(I).unbind()}else{K=this._globalListeners.length;while(K--){if(this._globalListeners[K].match(L)){this.getEvent(I,L);break}}}}}}},extend:function B(I,N){var P=this,K,M,L;if(typeof N!=="function"){if(typeof N==="string"){N=N.split(" ")}if(N instanceof w){N=x(N)}if(typeof N==="object"){M=N;N=C(N)}else{N=b}}function J(Q){var T=N?N.call(this._subject,Q.type,arguments):Q.type,R=[T],S=arguments.length;if(!T){return}if(typeof T!=="string"||T.indexOf(" ")!==-1){throw new F("nom d'événement invalide")}while(S-->1){R[S]=arguments[S]}Q.wait();P.trigger.apply(P,R).whenFinished(Q.continuer)}function O(Q){Q=N?N.call(this._subject,Q):Q;if(!Q){return}P.resetTriggeredState(Q)}if(M&&!M._others){K=[];for(L in M){K.push(L)}K=K.join(" ")}else{K="*"}I.addEventListener(K,J,b,b,O);this._extending.push([I,K,J,O])},unextend:function y(I){var J=this._extending.length;while(J--){if(this._extending[J][0]===I){I.unbind(this._extending[J][1],this._extending[J][2]);break}}},toString:function z(){return"EventsManager"}};o.EventsManager=o.EventsManager||A}(this,this.Array,this.Error));(function(g,f,c){if(!g.EventsManager){throw new f("Dépendence non satisfaite : EventsManager")}var h={onChange:"changed",onTrue:"toTrue",onFalse:"toFalse"};function j(p,o){function q(r){return function(){return r.apply(p,arguments)}}for(var n in o.prototype){p[n]=q(o.prototype[n])}}function m(n){if(!(this instanceof m)){throw new f('Must use "new" keyword to create BinaryState instance')}this._events=new g.EventsManager(this);this._changing=false;this.value=(arguments.length===1&&n===c)?c:n===true;j(this,m)}m.prototype={_onChangeDone:function k(){this._events.trigger(h.onChange,this.value).whenFinished(this._changeCallback);delete (this._changeCallback);this._changing=false},setTrue:function l(n){this.setValue(true,n)},setFalse:function d(n){this.setValue(false,n)},toggle:function e(n){this.setValue(!this.value,n)},setValue:function b(n,o){n=n==true;if(this.value!==n){this._events.resetTriggeredState(h.onChange);if(this._changing){this._events.addEventListener(h.onChange,function(){this[n?"setTrue":"setFalse"](o)},1)}else{this._changing=true;this.value=n;this._events.resetTriggeredState(h[n?"onFalse":"onTrue"]);this._changeCallback=o;this._events.trigger(h[n?"onTrue":"onFalse"]).whenFinished(this._onChangeDone)}}},toString:function a(){return this.value}};g.BinaryState=g.BinaryState||m}(this,this.Error));(function(j,h,c){(function(o){for(var n in o){if(!o[n]){throw new h("Dépendence non satisfaite : "+n)}}}({EventsManager:!!j.EventsManager,BinaryState:!!j.BinaryState}));var e={AND:function(o,n){return o&&n},OR:function(o,n){return o||n},XOR:function(o,n){return(o||n)&&!(o&&n)}};function b(p,o){function q(r){return function(){return r.apply(p,arguments)}}for(var n in o.prototype){p[n]=q(o.prototype[n])}}function k(){var n;if(!(this instanceof k)){throw new h('Must use "new" keyword to create DerivedBinaryState instance')}this._events=new j.EventsManager(this);switch(typeof arguments[0]){case"string":if(e[arguments[0]]===c){throw new h("operateur inconnu")}arguments[0]=e[arguments[0]];case"function":this._operator=arguments[0];n=[].slice.call(arguments,1);break;default:this._operator=e.AND;n=arguments;break}b(this,k);this._childStates=[];this._defaultAffirmation=true;this._affirmations=[];for(var o=0;o<n.length;o++){if(typeof n[o]==="boolean"){if(this._childStates.length===0){this._defaultAffirmation=n[o]}else{this._affirmations[this._childStates.length-1]=n[o]}}else{this._affirmations[this._childStates.length]=this._defaultAffirmation;n[o].addEventListener("changed",this._onChildChanged,false);this._childStates.push(n[o])}}this.value=this._getValue();this._resultState=new j.BinaryState(this.value);this._events.extend(this._resultState)}k.prototype={_operate:function g(o,n){return(o===c)?n:this._operator(o,n)},_getValue:function d(){var n=this._childStates.length,o;while(n--){if(this._childStates[n].value===c){continue}o=this._operate(o,this._childStates[n].value==this._affirmations[n])}return o},_onChildChanged:function l(){this.value=this._getValue();this._resultState.setValue(this.value)},add:function m(n,o){if(o===c){o=this._defaultAffirmation}else{o=!!o}if(this._childStates.length===0){this._defaultAffirmation=o}this._affirmations[this._childStates.length]=o;n.addEventListener("changed",this._onChildChanged);this._childStates.push(n);this._onChildChanged()},remove:function f(n){var p,o=[],r=[],q;for(p=0;p<this._childStates.length;p++){if(this._childStates[p]===n){continue}o.push(this._childStates[p]);r.push(this._affirmations[p]);if(this._childStates[p].value!==c){q=this._operate(q,this._childStates[p].value==this._affirmations[p])}}this._childStates=o;this._affirmations=r;this.value=q;this._resultState.setValue(this.value)},toString:function a(){return this.value}};j.DerivedBinaryState=j.DerivedBinaryState||k}(this,this.Error));(function(e,a){if(!e.EventsManager){throw new Error("Dépendence non satisfaite : EventsManager")}function f(n,q,s){if(!(this instanceof f)){return new f(n,q,s)}var p=this,k;this.resetStateEvents=function m(){s.each(function(){if(this.event!==a){n.resetTriggeredState(this.event)}})};this.setState=function o(w){if(!(w instanceof h)){w=s[w]}if(w===a||s[w.name]===a){throw new Error("invalide state value")}else{if(k===w){throw new Error("StatesManager : Etat déjà en cours")}}var u,x=k,t=[q+"Changed",w.name,x.name],v;p.resetStateEvents();k=w;if(typeof this.onStateChange==="function"){this.onStateChange()}for(u=1;u<arguments.length;u++){t.push(arguments[u])}if(k.event){v=t.slice(2);v[0]=k.event;n.trigger.apply(p,v)}return n.trigger.apply(p,t)};this.toString=function l(){return k.name};function r(){q=q||"readyState";s=s||b;k=s.getInitial()}r()}function h(k,l){this.name=k;this.event=l}h.prototype={toString:function(){return this.name}};function c(k){for(var l in k){this.createState(l,k[l].event,k[l].initial)}}c.prototype={createState:function j(l,n,k){var o=this[l]=new h(l,n);if(k===true){this.getInitial=function m(){return o}}},each:function g(l){for(var k in this){if(c.prototype[k]!==a){continue}l.call(this[k],k)}},getInitial:function d(){for(var k in this){if(c.prototype[k]!==a){continue}return this[k]}}};f.StateList=c;var b=new c({ERROR:{event:"error"},INSTANCIATING:{initial:true},READY:{event:"ready"}});e.StatesManager=e.StatesManager||f}(this));(function(f,e){var d=/<(div|p|pre|[uod]l|h[1-6r]|address|blockquote|form|table)\s/,c;function g(m,j,l,h){if(!c){c=$('<style type="text/css">div.warning { position: relative; overflow: hidden; background: black; color: white; text-align: center; font-size: 12px; font-family: Arial, sans-serif; }div.warning .closeBtn { position: absolute; top: 0; right: 0; cursor: pointer; }div.warning .message { position: relative; margin: 20px 20px 10px; padding: 70px 0 0; background: transparent url(/layoutftv/arches/common/images/video/warning.png) no-repeat center 0; }div.warning .reponse { margin: 0 auto; width: 219px; height: 28px; background: transparent url(/layoutftv/arches/common/images/video/bouton-continue.png) no-repeat center 0; color: black; line-height: 26px; cursor: pointer; }</style>').appendTo("head")}var k=$('<div class="closeBtn"><img src="/layoutftv/arches/common/stylesheets/img/buttons/closedialog.png" alt="Fermer" /></div>').click(j);return m.addClass("warning").width(l).height(h).append(k)}function b(h,k,m,u){var n=this,v,l=[];this.done=false;function s(){if(n.done){throw new Error("Message clos")}}this.setAnswer=function q(w){s();if(w===e){w=u}if(!l[w]){throw new Error("Réponse incorrecte")}v.trigger("answered",w,l[w]).whenFinished(j)};this.destroy=function r(){s();v.trigger("destroyed").whenFinished(j)};function j(){n.done=true;v.trigger("done")}function t(){v=new f.EventsManager(n);u=u||0;n.message=k;n.answers=[];for(var w in m){n.answers.push(w);l.push(m[w])}}this.toWarningBox=function p(x,w){return g(n.toHtml(),h.setQuiet,x,w)};this.toHtml=function o(){var x=n.answers.length,w=d.test(n.message)?"div":"p",B=$('<div class="DialogMessageBox">'),y=$("<"+w+' class="message" />').append(n.message);function A(C){$('<p class="reponse">'+n.answers[C]+"</p>").click(function(){n.setAnswer(C)}).appendTo(B)}while(x--){A(x)}B.prepend(y);function z(C){B.remove()}n.addEventListener("done",z);return B};t()}function a(w,v,n){if(!this instanceof a){return new a(n)}var r=this,n=(n===true),j=0,q;function l(y,z,x){x.call(w,this.message,this.answers[z]);y.wait();v.trigger("dialogMessageAnswered",r[q],z).whenFinished(y.continuer)}function m(x){x.wait();v.trigger("dialogMessageDestroyed",r[q]).whenFinished(x.continuer)}function k(){v.trigger("dialogMessageDone",r[q]);p()}function h(y){for(var x=0;x<j;x++){if(r[x]===y){return x}}throw new Error("objet inconnu")}function p(){if(q===e){if(j){u(0)}}else{if(q+1===j){for(var x=0;x<j;x++){if(!r[x].done){u(x);break}}if(x===j){v.trigger("dialogNoMoreMessages");q=e}return}else{u(q+1)}}}function u(x){if(x instanceof b){q=h(x)}else{if(x!==e){q=x}else{if(q===e){return}}}if(n){r[q].setAnswer()}else{v.trigger("dialogShowMessage",r[q])}}w.setQuiet=function t(){n=true;u()};w.createDialogMessage=function o(A,z,y){var x=j++;r[x]=new b(w,A,z,y);r[x].addEventListener("answered",l);r[x].addEventListener("destroyed",m);r[x].addEventListener("done",k);if(q===e){u(x)}return r[x]};w.destroyDialogMessage=function s(x){if(x instanceof b){x=h(x)}else{if(x===e){x=q}}r[x].destroy()}}f.DialogBox=f.DialogBox||a}(this));(function(h,b,k,d,e,q,a){(function(u){for(var t in u){if(!u[t]){throw new Error("Dépendence non satisfaite : "+t)}}})({jQuery:!!d,EventsManager:!!h.EventsManager,BinaryState:!!e,DerivedBinaryState:!!q});var s=3,c={};function m(v,u){function w(x){return function(){return x.apply(v,arguments)}}for(var t in u.prototype){v[t]=w(u.prototype[t])}}function f(t){this._syncUrl=t||"/staticftv/syncDate/syncDateGetter";if(c[this._syncUrl]!==a){h.setTimeout(c[this._syncUrl].sync,0);return c[this._syncUrl]}c[this._syncUrl]=this;m(this,f);this._events=new h.EventsManager(this);this.synching=new e();this.gotResult=new e();this.maxTriesReached=new e();this.lastRequestError=new e(a);this.ready=new h.DerivedBinaryState(false,this.synching,this.lastRequestError,this.gotResult,true);this.error=new h.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()}f.prototype={_onBeforeSend:function g(){this._syncSendTime=+new b},_correctData:function n(){var t=this._xhr.getResponseHeader("Date");return t?+new b(t):+new b()},_onRequestSuccess:function r(t){if(k(t)){this.lastRequestError.setTrue();throw new Error("données de synchronisation invalide")}this.delta=t-Math.round((+new b+this._syncSendTime)/2);this.lastRequestError.setFalse();this.gotResult.setTrue();this._tries=0},_onRequestError:function o(t){if(!k(this._xhr.status)){this._onRequestSuccess(this._correctData());return}if(this._tries++<s){h.setTimeout(this.sync,1000)}else{this._tries=0;this.maxTriesReached.setTrue()}this.lastRequestError.setTrue()},sync:function j(){if(this.synching.value){return}this.synching.setTrue();this._xhr=d.ajax({url:this._syncUrl,dataType:"text",beforeSend:this._onBeforeSend,dataFilter:this._correctData,success:this._onRequestSuccess,error:this._onRequestError,complete:this.synching.setFalse})},getDate:function l(){return new b(+new b+(this.delta||0))},toString:function p(){return"SyncDate"}};h.SyncDate=h.SyncDate||f}(this,this.Date,this.isNaN,this.jQuery,this.BinaryState,this.DerivedBinaryState));(function(K,F,C){(function(W){for(var V in W){if(!W[V]){throw new Error("Dépendence non satisfaite : "+V)}}}({jQuery:!!F,EventsManager:!!K.EventsManager,SyncDate:!!K.SyncDate,StatesManager:!!K.StatesManager,DynamicOptionsManager:!!K.dynamicOptionsManager}));var G="/appftv/webservices/video/getInfosVideo.php?src=cappuccino&video-type=liste&template=ftvi&template-format=vignette&id-externe=",e="/appftv/webservices/video/getInfosVideo.php?src=cappuccino&video-type=simple&template=ftvi&template-format=complet&id-externe=",l="/appftv/webservices/video/lecture.php?id-video-ext=",u={"":"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"},R={"":"rtmp://video-rtmp.francetv.fr/ondemand/mp4:cappuccino/publication","france-dom-tom":"rtmp://videozones-rtmp.francetv.fr/ondemand/mp4:cappuccino/publication"},d="http://info.francetelevisions.fr/ref/images/",A="http://info.francetelevisions.fr/?id-video=",s=/^\/geoloc(\/([^\/]*)\/.*)$/,g=40,I=3,T=500,b=false,z=false,f={},o={},U={},J=new K.SyncDate(),E=new K.StatesManager.StateList({INSTANCIATING:{initial:true},REQUESTING:{event:"requesting"},ERROR:{event:"requestError"},SUCCESS:{event:"requestSuccess"}});function q(V,X){function W(){return(F(this).children("id-externe").text()===X)}return V.filter(W)}function H(W){var X,V=F("video",W.documentElement||W);for(X in z){U[X].setRequestSuccess(q(V,X))}}function j(W,V){for(var X in z){U[X].setRequestError(W,V)}}function S(){z=false;r()}function r(){if(b||z){return}var X,W=[],V=false;z={};for(X in f){if(f[X].isComplet()){if(W.length!==0){continue}V=true}z[X]=f[X];W.push(X);delete (f[X]);if(V||W.length>=g){break}}if(!W.length){z=false;return}if(W.length===1&&!W[0]){H(F([]));return}W=(V?e:G)+W.join("+OR+");F.ajax({url:W,dataType:"xml",timeout:15000,success:H,error:j,complete:S})}function N(V){var W=V.getId();if(f[W]!==C){return}f[W]=V;U[W].setRequesting(r)}function w(){return{id:F(this).children("id").text(),"nom-public":F(this).children("nom-public").text()}}function L(){return +F(this).children("id").text()}function y(){return F(this).children("libelle").text()}function B(){return d+F(this).children("url").text()}function k(){return F(this).text()}function O(){return F(this).children("libelle").text()}function P(){return F(this).children("nom").text()}function t(){return F(this).children("nom-prenom").text()}function c(){return !!F(this).children("libelle:contains(URL_SMOOTH)").length}function x(){return F(this).children("extension").text()}function a(){return x().toLowerCase()}function Q(){return{position:F(this).children("position").text(),titre:F(this).children("titre").text(),resume:F(this).children("resume").text(),debut:F(this).children("timecode-debut").text(),fin:F(this).children("timecode-fin").text()}}function v(){return{position:F(this).children("position").text(),libelle:F(this).children("libelle").text(),url:F(this).children("url").text()}}function n(){return"sami:http://"+K.location.hostname+"/appftv/webservices/video/getFichierSmi.php?smi="+F(this).children("url").text()}function p(aE,aZ,X){var ai=this,aB,aF=3,aV=F([]),am,aH,at;function W(a1){try{aB.setState("REQUESTING").whenFinished(a1)}catch(a0){}}function aY(a0){aV=a0;am=aV.length!==0;if(am){aH=aV.children("statut").text()==="online";aV.children().each(function(){if(this.childNodes.length===1&&this.childNodes[0].nodeType===4){ai[this.nodeName]=F(this).text()}});at.trigger("objetCappuReady")}else{at.trigger("noObjetCappu")}aB.setState("SUCCESS")}function ak(){try{aB.setState("ERROR")}catch(a0){}if(aF--){K.setTimeout(aG,500)}else{aF=3}}function aG(){N(ai)}function aM(){ai.requestState=aB.toString()}function aQ(){at=new K.EventsManager(ai,X);aB=new K.StatesManager(at,"requestState",E);aM();aB.onStateChange=aM;aZ=!!aZ;U[aE]={setRequesting:W,setRequestSuccess:aY,setRequestError:ak};aG()}this.toString=function ac(){return aE};this.getRawData=function aX(){return aV?aV.clone():aV};this.exists=function V(){return am};this.isPublished=function ao(){return aH};this.isDirect=(function(){var a1;function a0(){if(aV!==C){a1=aV.find("> type > libelle").text()==="LIEN_EXTERNE"&&ai.duree!=="00:00:00"}return a1}return function a2(){return(a1===C)?a0():a1}}());this.isDirectFinished=function aP(){if(!ai.isDirect()){return}var a1=J.getDate(),a3=ai.getDatesDiffusions(),a2,a0;if(a3.length){a2=ai.getDuree().split(":");a0=(a3[a3.length-1]*1)+(a2[0]*3600)+(a2[1]*60)+(a2[2]*1);a1=K.Math.floor(a1/1000);return a1>=a0}return true};this.isComplet=function aC(){return aZ};this.setComplet=function aT(){if(!aZ){aZ=true;aB.resetStateEvents();at.resetTriggeredState("objetCappuReady");at.resetTriggeredState("noObjetCappu");ai.refreshData()}};this.refreshData=function aa(){aG()};this.registerPlayCount=function af(){K.ObjetCappu.registerPlayCount(aE)};this.getIdExterne=this.getId=function aj(){return aE};this.getType=function ar(){return aV.children("type").children("libelle").text()};this.getTypeEditorial=function ae(){return aV.children("type-editorial").children("libelle").text()};this.getTitreCourt=function ag(){return aV.children("titre-public").text()};this.getTitreLong=function ax(){return aV.children("accroche").text()};this.getCategories=function Z(){return aV.children("categories").children("categorie").map(w).get()};this.getCategorie=function Y(){return ai.getCategories()[0]};this.getDuree=function al(){return aV.children("duree").text()};this.getChaines=function aW(a0){a0=a0===true;return aV.children("chaines").children("chaine").map(a0?L:y).get()};this.getChainesIds=function an(){return ai.getChaines(true)};this.getImages=function aA(){return aV.children("images").children("image").map(B).get()};this.getDatePublication=function ay(){return aV.children("dates").children("publication").text()};this.getDateDepublication=function aq(){return aV.children("dates").children("depublication").text()};this.getDateProduction=function aS(){return aV.children("dates").children("creation").text()};this.getDatesDiffusions=function az(){return aV.children("dates").children("diffusions").children("diffusion").children("date").map(k).get()};this.getGeolocalisation=function ah(){return aV.children("geolocalisation").text()};this.getRegion=function au(){return aV.children("region").text()};this.getMotsCles=function aR(){return aV.children("mots-cles").children("mot-cle").map(O).get()};this.getSources=function ad(){return aV.children("sources").children("source").map(P).get()};this.getAuteurs=function aN(){return aV.children("auteurs").children("auteur").map(t).get()};this.getVignette=function aw(){return ai.getImages()[0]};this.getURL=function aI(){return A+aE};this.getFichiers=function aJ(a0){a0=a0!==false;if(aV.find("> type > libelle").text()==="LIEN_EXTERNE"){a0=false}return aV.children("fichiers").children("fichier").map(function(){var a5,a2,a4,a1="",a3=F(this).children("chemin").text();if(a0){a2=s.exec(a3);a4=a2?a2[2]:"";if(F(this).children("extension").text()==="MP4"){a5=R}else{a5=u;a3=a2?a2[1]:a3}a1=a5[a4]||a5[""]}return{position:F(this).children("position").text(),url:a1+a3+F(this).children("nom").text(),hauteur:F(this).children("hauteur").text(),largeur:F(this).children("largeur").text()}}).get()};this.getUrlFlux=function aK(){if(!aZ){throw new Error("Impossible de récupérer l'URL du flux vidéo. Objet cappu pas en mode complet.")}return(ai.getFichiers()[0]||{}).url};this.getUrlSmooth=function aO(){return(ai.isDirect()&&aV.children("sites").children("site").filter(c).eq(0).children("url").text())||C};this.getExtensions=function av(a0){return aV.children("fichiers").children("fichier").map(a0?a:x).get()};this.getChapitres=function aU(){return aV.children("sequences").children("sequence").map(Q).get()};this.getLiens=function aD(){return aV.children("sites").children("site").map(v).get()};this.getSignaletiqueCSA=function ap(){return aV.children("signaletique-csa").text()};this.getResume=function aL(){return aV.children("resume").text()};this.getSousTitres=function ab(a0){a0=(typeof a0==="string")?a0.toLowerCase():C;return aV.children("sous-titrage").children("fichier-sous-titres").filter(function(){return !a0||(F(this).children("nom").text().indexOf(a0)!==-1)}).map(n).get()};aQ()}K.ObjetCappu=K.ObjetCappu||{get:function D(aa,Y,Z){if(aa instanceof Array){var X=aa.length,V=[],W=b;K.ObjetCappu.pauseRequests();while(X--){V[X]=K.ObjetCappu.get(aa[X],Y,Z)}K.ObjetCappu.pauseRequests(W);return V}if(typeof Y==="boolean"){Z=Y;Y=C}else{Z=Z===true}if(o[aa]===C){o[aa]=new p(aa,Z,Y)}else{if(Y!==C){o[aa].addEventListeners(Y)}if(Z){o[aa].setComplet()}}return o[aa]},pauseRequests:function M(V){b=V!==false;r()},playRequests:function m(){K.ObjetCappu.pauseRequests(false)},registerPlayCount:function h(V){if(o[V]===C){throw new Error("ObjetCappu non instancié, impossible de décompter une lecture")}F.ajax({url:l+V,dataType:"text",timeout:4000})}}}(this,this.jQuery));(function(j,d){(function(p){for(var o in p){if(!p[o]){throw new Error("Dépendence non satisfaite : "+o)}}}({EventsManager:!!j.EventsManager,StatesManager:!!j.StatesManager,ObjetCappu:!!j.ObjetCappu}));var c=/\.([a-z0-9]+)(\?|$)/i,h=/^([a-z]+):\/\//i,e=/http:\/\/(?:(?:local|intg|pp|dev)\.)?info.francetelevisions.fr(?:\/video-info)?(?:\/(?:index-fr.php)?)?\?id-video=([a-z0-9_]*)($|&.*)/i,k=/http:\/\/.*\/Manifest$/i,l=/^[a-z0-9\.+-]+\/[a-z0-9\.+-]+$/i,b={simpleUrl:"URL classique",urlCappu:"URL Cappuccino"},g=new j.StatesManager.StateList({INSTANCIATING:{initial:true},WAITING:{event:"waiting"},ERROR:{event:"error"},READY:{event:"ready"}}),m={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",xap:["application/x-silverlight","application/x-silverlight-2"],xaml:["application/x-silverlight","application/x-silverlight-2"]},a={};function n(o){return(h.exec(o)||[])[1]||j.location.protocol.slice(0,-1)}function f(y){if(a[y]!==d){return a[y]}if(!(this instanceof f)){return new f(y)}var C=this,p,q,w=0;function B(){if(w===0){q.trigger("childReady")}}function z(P){var Q=new f(P);C.child.push(Q);w++;Q.addEventListener("ready error",[function(){w--;B()},1])}function I(P){C.protocol=P}function N(P){if(!(P===d||P instanceof Array)){throw new Error("MediaInfos : Types invalide")}C.types=P||[]}function r(R){var P,Q;if(R instanceof Array){for(P=R.length-1;P>=0;P--){r(R[P])}}else{if(typeof R==="string"&&l.test(R)){Q=[R];for(P=0;P<C.types.length;P++){if(C.types[P]!==R){Q.push(C.types[P])}}try{N(Q)}catch(S){throw S}}else{if(R!==d){throw new Error("MediaInfos : Type invalide")}}}}function u(Q,P){C.lastErrorMessage={message:Q,object:P};if(p.toString()!=="ERROR"){p.setState("ERROR",Q,P)}}function J(P){C.url=P;var Q;if(Q=e.exec(C.url)){I("http");s("urlCappu");C.extraData.id=Q[1];C.extraData.objetCappu=j.ObjetCappu.get(C.extraData.id,true);C.extraData.objetCappu.addEventListener("objetCappuReady",A);C.extraData.objetCappu.addEventListener("noObjetCappu",o);C.extraData.objetCappu.addEventListener("requestError",G);try{p.setState("WAITING");r("video/cappuccino")}catch(R){u("Erreur d'enregistrement des données Cappuccino",R)}}else{if(Q=k.exec(C.url)){I("smooth");try{r("video/smoothhd")}catch(R){u("Erreur d'enregistrement des données du media Smooth HD",R)}}else{if(Q=/info\.francetelevisions\.fr\/appftv\/akamai\/flash-permanent\/asx\.php/.exec(C.url)){I("http");try{r(m.asx)}catch(R){u("Erreur de définition du type de media",R)}}else{I(n(C.url));Q=c.exec(C.url);if(Q){try{r(m[Q[1]])}catch(R){u("Erreur de définition du type de media",R)}}}}}}function A(){var P=this.getUrlSmooth();if(P){z(P)}z(this.getUrlFlux());C.addEventListener("childReady",function(){if(C.readyState==="WAITING"){p.setState("READY")}})}function o(){u("Objet Cappuccino non disponible")}function G(){u("Erreur de requête webservice Cappuccino")}function s(P){if(b[P]===d){throw new Error("Metatype inconnu")}C.metaType=P}function t(){C.readyState=p.toString()}function K(){a[y]=C;C.metaType="simpleUrl";C.protocol=d;C.types=[];C.extraData={};C.child=[];q=new j.EventsManager(C);p=new StatesManager(q,"readyState",g);p.onStateChange=t;t();J(y);if(C.readyState==="INSTANCIATING"){p.setState("READY")}}function E(Q,R){if(Q instanceof Array){for(var P=0;P<Q.length;P++){if(E(Q[P],R)){return true}}return false}return R(Q)}function M(Q){if(Q){for(var P=0;P<C.types.length;P++){if(Q===C.types[P]){return true}}return false}return true}function L(P){return(P===C.protocol)||(P==="*")||(P===d)}function x(P){if(P&&(P.protocol||P.type)){return C.protocolMatch(P.protocol)&&C.typeMatch(P.type)}return false}this.typeMatch=function O(P){return E(P,M)};this.protocolMatch=function v(P){return E(P,L)};this.definitionMatch=function D(R,P){P=P===true;if(E(R,x)){return true}if(!P){for(var Q=0;Q<C.child.length;Q++){if(C.child[Q].definitionMatch(R)){return true}}}return false};this.getFirstDefinitionMatch=function F(R){if(C.definitionMatch(R,true)){return C}var Q,P;for(Q=0;Q<C.child.length;Q++){P=C.child[Q].getFirstDefinitionMatch(R);if(P){return P}}};this.toMediaObject=function(P){return new j.MediaObject(C,P)};this.toString=function H(){return C.url+" ["+C.types.join(", ")+"]"};K()}j.MediaInfos=j.MediaInfos||f}(this));(function(f,b){(function(m){for(var l in m){if(!m[l]){throw new Error("Dépendence non satisfaite : "+l)}}})({dynamicOptionsManager:!!f.dynamicOptionsManager,EventsManager:!!f.EventsManager,StatesManager:!!f.StatesManager,DialogBox:!!f.DialogBox,MediaInfos:!!f.MediaInfos});var c={attrs:{style:{}},params:{},events:{}},a={};function d(l){return function(){this.setResultBuilder(l)}}function k(n,o,l,m){if(typeof o!=="function"){o=d(o)}this.builderName=n;this.defaultOptions=l;a[n]=function p(z,G){var A=this,F,w,y,C;function v(L,H,K){var I,J;K=K||{};H=A.options(H);A.options(L,{});for(I in H){J=H[I];if(K[I]!==b){I=K[I]}if(!A.options.defined(L,I)){A.options(L,I,J)}else{}}}function x(){A.readyState=w.toString()}function u(){A.options("quiet",true);for(var H=0;H<A.length;H++){A[H].setQuiet()}C()}function E(){A.length=0;A.options=f.dynamicOptionsManager.call(A,A.defaultOptions,G);A.options.transfert=v;A.mediaInfos=z;F=new f.EventsManager(A);w=new f.StatesManager(F);x();w.onStateChange=x;y=new f.DialogBox(A,F,A.options("quiet"));C=A.setQuiet;A.setQuiet=u;o.call(A)}function q(H,J,I){F.trigger("dialogShowMessage",J,I)}function s(){F.trigger("dialogNoMoreMessages")}this.setResult=function B(H,I){w.setState("READY",H,I||A.options)};this.abort=function t(I,H){if(A.readyState!=="ERROR"){w.setState("ERROR",I,H||A.options)}};this.build=function D(I,J){J=f.dynamicOptionsManager(A.options,J);var H=A.length++;A[H]=new e(I,z,J);A[H].addEventListener("dialogShowMessage",q);A[H].addEventListener("dialogNoMoreMessages",s);return A[H]};this.setResultBuilder=function r(H,I){var J=A.build(H,I);J.addEventListener("ready",function(L,K,M){A.setResult(K,M)});J.addEventListener("error",function(K,M,L){A.abort(M,L)})};E()};a[n].definition=m;a[n].prototype=this}k.prototype={toString:function(){return"Builder "+this.builderName}};function e(v,q,B){var s=this,A,m,t={};this.current=0;this.length=0;this.setQuiet=function u(){B("quiet",true);for(var C=0;C<=s.current;C++){if(s[C] instanceof k){s[C].setQuiet()}}};function z(D){if(D instanceof Array){for(var C=0;C<D.length;C++){z(D[C])}}else{if(a[D]&&!t[D]){s[s.length++]=a[D]}}}function o(){if(s.current>=s.length){if(s.length===0){m.setState("ERROR","Aucune solution n'a été trouvée pour afficher ce media",B)}else{m.setState("ERROR","Aucune solution n'a permis d'afficher ce media",B)}}else{s[s.current]=new s[s.current](q,B);s[s.current].addEventListener("dialogShowMessage",w);s[s.current].addEventListener("dialogNoMoreMessages",y);s[s.current].addEventListener("ready",r);s[s.current].addEventListener("error",p)}}function r(D,C,E){m.setState("READY",C,E)}function p(C,E,D){s.current++;o()}function w(C,E,D){A.trigger("dialogShowMessage",E,D||this.options)}function y(){A.trigger("dialogNoMoreMessages")}function l(C){if(C instanceof Array){var D=C.length;while(D--){l(C[D])}}else{if(typeof C==="string"){t[C]=true}}}function n(){s.readyState=m.toString()}function x(){A=new f.EventsManager(s);m=new f.StatesManager(A);n();m.onStateChange=n;B=f.dynamicOptionsManager.call(s,c,B);l(B("excludeBuilders"));z(v);o()}x()}e.prototype={toString:function(){return"BuilderCollection"}};function h(l){var m,n=[];for(m in a){if(l.definitionMatch(a[m].definition)){n.push(m)}}return n.reverse()}function j(l,y){var u=this,x,p;function v(A,z,B){p.setState("READY",z,B)}function s(z,B,A){p.setState("ERROR",B,A)}function n(z,B,A){x.trigger("dialogShowMessage",B,A)}function t(){x.trigger("dialogNoMoreMessages")}function o(){r()}function m(z,B,A){p.setState("ERROR",B,A)}function q(){u.readyState=p.toString()}function r(){u.builderCollection=new e(h(u.mediaInfos),u.mediaInfos,y);u.setQuiet=u.builderCollection.setQuiet;u.builderCollection.addEventListener("ready",v);u.builderCollection.addEventListener("error",s);u.builderCollection.addEventListener("dialogShowMessage",n);u.builderCollection.addEventListener("dialogNoMoreMessages",t)}function w(){x=new f.EventsManager(u);p=new f.StatesManager(x);q();p.onStateChange=q;u.mediaInfos=(l instanceof f.MediaInfos)?l:new f.MediaInfos(l);u.mediaInfos.addEventListener("ready",o);u.mediaInfos.addEventListener("error",m)}w()}j.prototype={toString:function(){return"MediaObject "+this.mediaInfos.url}};function g(l){f.navigator.plugins.refresh();if(f.navigator.mimeTypes[l]!==b&&f.navigator.mimeTypes[l].enabledPlugin){return f.navigator.mimeTypes[l].enabledPlugin}}j.getPluginByType=(function(){if(f.navigator.plugins===b||f.navigator.mimeTypes===b||f.navigator.plugins.length===b||typeof f.navigator.plugins.refresh==="undefined"){return function(){}}return g}());j.pluginRefreshTime=2000;j.Builder=k;j.BuilderCollection=e;f.MediaObject=f.MediaObject||j}(this));(function(d,e,c){(function(h){for(var g in h){if(!h[g]){throw new Error("Dépendence non satisfaite : "+g)}}})({jQuery:!!e,dynamicOptionsManager:!!d.dynamicOptionsManager,MediaObject:!!d.MediaObject});var b=/(height|width)((=|:)([^ ]+))?/i;function a(g){if(typeof g!="string"){return{}}var j,k,h={},l=g.split(" ");for(j=0;j<l.length;j++){k=l[j].match(b);if(!k){continue}h[k[1]]=k[4]}return h}function f(g){return g.nodeName==="A"||(g.nodeName==="IMG"&&(/\.(swf|xap)(\?.*)?(#.*)?$/.test(g.src)||/^application\/x-(?:shockwave-flash|silverlight(?:-2)?)$/.test(g.type)))}e.fn.mediaObject=function(h){var g=this,j=false;h=d.dynamicOptionsManager(h);this.each(function(){if(!f(this)){return}function r(){s.after(l).remove();s=l}function p(v,u,w){function x(){s.after(u).remove();s=u;if(!j){g=g.not(l).add(u)}}u=e(u);if(e.fn.data){u.data("mediaObject",{instance:this})}u.not("script").appendTo('<div style="display:none;" />');try{u.each(function(){if(e(this).is("object, embed, iframe")){e(this).append(l);return false}return !e(this).find("object, embed, iframe").eq(0).append(l).length})}catch(y){}t.trigger("ready",u,w,s).whenFinished(x)}function m(u,w,v){if(typeof v==="function"&&!v("quiet")){}else{}t.trigger("error",w,v,s).whenFinished(r)}function n(u,w,v){w.toWarningBox(v("width"),v("height")).insertBefore(s)}h.reset();var q,o=this.nodeName==="IMG",k=o?this.src:this.href,s=e("<span />").insertBefore(this),l=e(this).appendTo(e('<div style="display: none;" />')),t=new d.EventsManager(c,h.raw("jQueryMediaObjectEvents"));h("jQueryMediaObjectEvents",null);if(o){h("width",l.attr("width")||c);h("height",l.attr("height")||c)}h(a(this.className));h("attrs","class",this.className||c);h("attrs","id",this.id||c);h("type",[h.raw("type"),this.type||c]);q=new d.MediaObject(k,h);if(e.fn.data!==c){l.data("mediaObject",{instance:q})}q.addEventListeners(h.raw("MediaObjectEvents"));h("MediaObjectEvents",null);q.addEventListener("dialogShowMessage",n);q.addEventListener("error",m);q.addEventListener("ready",p)});j=true;return g}}(this,this.jQuery));(function(c){if(!c.MediaObject){throw new Error("Dépendence non satisfaite : MediaObject")}function b(e,l){l=b.patterns[l]||l||b.patterns.htmlAttr;var g,k,j=[],h=l.elements||[],f=l.children||{};for(g in e){if(f[g]&&typeof e[g]==="object"){k=b(e[g],f[g])}else{k=e[g]+""}if(k===""){continue}j.push([h[1],g,h[2],k,h[3]].join(""))}return j.join(h[0])}b.patternsDefaultChildren={style:{elements:[";","",":",""]},flashvars:{elements:["&amp;","","=",""]}};b.patterns={htmlAttr:{elements:[" ","",'="','"'],children:b.patternsDefaultChildren},objectParams:{elements:["",'<param name="','" value="','" />'],children:b.patternsDefaultChildren}};b.patternsDefaultChildren.add=function d(e){for(key in e){b.patternsDefaultChildren[key]=e[key]}};function a(){this.options.transfert("attrs",["width","height","style"]);if(!this.options.defined("attrs","id")){this.options("attrs","id","MediaObject"+(+new Date))}b.patternsDefaultChildren.add(this.options("objectToStringPatterns"))}new c.MediaObject.Builder("generateObject",function(){a.call(this);this.setResult("<object "+b(this.options("attrs"))+">"+b(this.options("params"),"objectParams")+"</object>")});new c.MediaObject.Builder("generateEmbed",function(){a.call(this);this.options("attrs",this.options("params")||{});this.setResult("<embed "+b(this.options("attrs"))+"></embed>")});new c.MediaObject.Builder("iframe",function(){this.options("attrs","src",this.mediaInfos.url);this.options.transfert("attrs",["width","height","border"],{border:"frameBorder"});if(this.options.defined("bgColor")){this.options("attrs","style","background-color",this.options("bgColor"))}if(!this.options.defined("attrs","id")){this.options("attrs","id","Iframe"+(+new Date))}b.patternsDefaultChildren.add(this.options("objectToStringPatterns"));this.setResult("<iframe "+b(this.options("attrs"))+" />")},{width:400,height:400,attrs:{allowTransparency:"allowTransparency",frameBorder:0}},{protocol:"http",type:["text/html","application/xhtml+xml","application/pdf"]})}(this));(function(k,g,f,d){if(f===d){throw new g("Dépendence non satisfaite : jQuery")}var h={},e=0,a;function n(p){if(h[p]!==d){delete (h[p]);if(!--e){k.clearInterval(a);a=d}}}function l(q){var p=h[q];k.setTimeout(function(){var r=p.length;while(r--){f("#"+q).trigger(p[r])}},0);n(q)}function m(){for(var p in h){if(document.getElementById(p)){l(p)}}}function j(q,p){if(h[q]===d){h[q]=[p];e++;if(!a){a=k.setInterval(m,50)}}else{h[q].push(p)}}function b(s,p){if(h[s]!==d){var q,r=h[s].length;while(r--){if(h[s][r]===p){for(q=r;q<h[s].length;q++){h[s][q]=h[s][q+1]}if(!--h[s].length){n(s)}}}}}function o(p){f.event.special[p]=f.event.special[p]||{setup:function(){f(this).each(function(){if(this.id!==d){j(this.id,p)}})},teardown:function(){f(this).each(function(){b(this.id,p)})}}}f.registerWatchForDomInsertEvent=f.registerWatchForDomInsertEvent||o;f.fn.watchForDomInsert=function c(p){return this.each(function(){if(this.id!==d){var q=this.id+"WatchForDomInsert";o(q);f(this).bind(q,p)}})}}(this,this.Error,this.jQuery));(function(D,x,r){(function(V){for(var U in V){if(!V[U]){throw new Error("Dépendence non satisfaite : "+U)}}}({jQuery:!!x,MediaObject:!!D.MediaObject}));function n(U,V){x(this).each(function(){try{if(H.test(U.type)){this.controls[U.type]()}else{if(k.test(U.type)){this.controls[U.type]=V}else{if(U.type==="kill"){this.controls.stop();this.close();x(this).remove()}else{if(U.type==="hide"){this.controls.stop();x(this).hide()}else{if(U.type==="show"){x(this).show()}else{if(U.type==="fullscreen"){if(this.fullScreen===true){this.fullScreen=false}else{if(this.playState!==3&&this.playState!==2){this.controls.play();this.controls.pause();this.fullScreen=true}if(this.playState===3||this.playState===2){this.fullScreen=true}else{alert("Vous ne pouvez passer en plein écran que si la vidéo est en cours de lecture ou en pause.")}}}else{if(U.type==="playItem"){V=parseInt(V);if(isNaN(V)||this.currentPlaylist.count<=V){this.controls.playItem(this.currentPlaylist.item(0))}else{this.controls.playItem(this.currentPlaylist.item(V))}}}}}}}}}catch(W){}})}var H=/^(play|pause|stop|fastForward|fastReverse)$/,k=/^(current(Position(Timecode)?|Item|Marker|AudioLanguage(Index)?))$/i,p="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6",Q="Constructeurs non adaptés aux Mac",w="Pas de plugin WMP pour IE dispo",l="Le navigateur ne semble pas être un Firefox sous Windows",M="Vous ne possédez pas le plugin permettant de profiter au maximum des vidéos Windows Media Player avec Firefox.<br /><br />(Windows XP SP2 ou supérieur necésaire)",E="Plugin WMP spécial Firefox non dispo",o="Télécharger ce plugin",N="Attente du plugin Windows Media Player pour Firefox",A="Ne pas le télécharger",O=[{protocol:["http","mms"],type:["application/asx","video/x-ms-asf","audio/x-ms-wmv","video/x-ms-wmv","application/asf","video/wsx"]},{protocol:["http","mms"],type:"audio/x-ms-wma"}],b=[],j=new D.EventsManager(),L={OpenStateChange:function(U,W){var V=b.length;if(W===1){while(V--){if(b[V].object.openState===r&&b[V].openState===13){b[V].openState=1}}}else{while(V--){if(b[V].object.openState!==r&&b[V].object.openState!==b[V].openState&&b[V].object.openState==W){b[V].openState=W;x(b[V].object).trigger("OpenStateChange")}}}},PlayStateChange:function(U,W){var V=b.length;while(V--){if(b[V].object.playState!==r&&b[V].object.playState!==b[V].playState&&b[V].object.playState==W){b[V].playState=W;x(b[V].object).trigger("PlayStateChange")}}},PlaylistChange:function(U,W){var V=b.length;while(V--){try{if(b[V].object.currentPlaylist!==r&&b[V].object.currentPlaylist.isIdentical(W)){x(b[V].object).trigger("PlaylistChange")}}catch(X){}}},CurrentItemChange:function(U,W){var V=b.length;while(V--){try{if(b[V].object.currentMedia!==r&&b[V].object.currentMedia.isIdentical(W)){x(b[V].object).trigger("CurrentItemChange")}}catch(X){}}},MediaChange:function(U,W){var V=b.length;while(V--){try{if(b[V].object.currentMedia!==r&&b[V].object.currentMedia.isIdentical(W)){x(b[V].object).trigger("MediaChange")}}catch(X){}}},PositionChange:function(U,X,W){var V=b.length;while(V--){if(b[V].object.controls!==r&&Math.floor(b[V].object.controls.currentPosition*10)===Math.floor(W*10)){x(b[V].object).trigger("PositionChange")}}},MediaError:function(U,W){var V=b.length;while(V--){try{if(b[V].object.currentMedia!==r&&b[V].object.currentMedia.isIdentical(W)){x(b[V].object).trigger("MediaError")}}catch(X){}}},Error:function(){var U=b.length;while(U--){if(b[U].object.error.errorCount!==b[U].errorCount){b[U].errorCount=b[U].object.error.errorCount;x(b[U].object).trigger("Error")}}}};D.WMPRegisterPlayer=function m(V){if(V.controls){V.controls.stop();x(V).watchForDomInsert(function(){x(this).trigger("load");if(this.settings.autoStart){this.controls.play()}})}else{for(var U=0;U<b.length;U++){if(b[U].object===V){return}}b.push({object:V,playState:V.playState,openState:V.openState,errorCount:0,loadEventAttached:false})}};function R(){for(var U in L){F(U)}}function F(V){var U="OnDS"+V+"Evt",X=j.getEvent(V);if(L[V]){if(typeof D[U]==="function"){j.addEventListener(V,D[U],false)}j.addEventListener(V,L[V],false);L[V]=false}for(var W=1;W<arguments.length;W++){if(typeof arguments[W]==="function"){j.addEventListener(V,arguments[W],false)}}if(D[U]!==X.trigger){if((typeof D[U]==="function")&&!X.listenerIndexes(D[U]).length){j.addEventListener(V,D[U],false)}D[U]=X.trigger}}function S(Y,U,X){var V,W=false;if(X instanceof Array){V=X.reverse().length;while(V--){S(Y,U,X[V])}}else{if(typeof X==="function"){if(U==="load"&&Y.openState===r){V=b.length;while(!W&&V--){W=b[V].object===Y}if(W&&!b[V].loadEventAttached){S(Y,"OpenStateChange",(function(){var Z=false;return function(){if(!Z){Z=true;x(this).trigger("load")}}}()));b[V].loadEventAttached=true}}else{if(U==="MediaError"){X=(function(Z){return function(){var ab=this,aa=arguments;D.setTimeout(function(){Z.apply(ab,aa)},0)}}(X))}}if(Y.attachEvent){Y.attachEvent(U,function(){x(Y).trigger(U,arguments)})}else{F(U)}x(Y).bind(U,X)}}}function B(){var U;x('<object classid="'+p+'" />').each(function(){U=!!this.controls});return U}function v(){return(MediaObject.getPluginByType("application/x-ms-wmp")||{}).description==="np-mswmp"}function G(U){return !!MediaObject.getPluginByType(U)}new D.MediaObject.Builder("WMVFamily",["MediaPlayerFamily","videoFlip4MacFamily"],{width:384,autostart:true},O[0]);new D.MediaObject.Builder("WMAFamily",["audioMediaPlayerFamily","audioFlip4MacFamily"],{width:384,autostart:true},O[1]);new D.MediaObject.Builder("MediaPlayerFamily",function(){if(D.navigator.appVersion.indexOf("Mac")!==-1){this.abort(Q);return}this.setResultBuilder(["mediaPlayerMozillaWin","mediaPlayerIE","mediaPlayerOthers"])},{height:288,soustitre:r,soustitreNode:r,soustitreId:"soustitres",soustitreNodeReturn:r});new D.MediaObject.Builder("audioMediaPlayerFamily","MediaPlayerFamily",{height:45});new D.MediaObject.Builder("videoFlip4MacFamily","Flip4Mac",{height:232});new D.MediaObject.Builder("audioFlip4MacFamily","Flip4Mac",{height:16});new D.MediaObject.Builder("mediaPlayerCommon",function(){var Z=this,X,W=(this.options("soustitre")||"").match(/^(sami):(.*)$/i),ac,ad,ab,aa,V,U=this.mediaInfos.metaType==="urlCappu"?this.mediaInfos.extraData.id:r;if(U!==r){this.options("events","PlayStateChange",[this.options.raw("events","PlayStateChange"),function(){if(this.playState===3&&V!==this.currentMedia.sourceURL){D.ObjetCappu.registerPlayCount(U);V=this.currentMedia.sourceURL}}])}var Y=this.mediaInfos.getFirstDefinitionMatch(O);if(!Y){this.abort("Aucune url de flux trouvée pour lire ce média avec WMP");return}this.options("params","url",Y.url);this.options.transfert("params",["autostart"]);if(W){ac=x(this.options("soustitreNode")||[]);if(ac.length===0){ac=x("<div />");this.options("soustitreNodeReturn",true)}if(!(ad=ac.attr("id"))){ad=this.options("soustitreId")||"soustitres";X=-1;while(x("#"+ad+(++X||"")).length!==0){}ad=ad+(X||"");ac.attr("id",ad)}switch(W[1]){case"sami":this.options("params",{SAMIFileName:W[2],captioningID:ad});if(!this.options.defined("params","SAMIStyle")){this.options("params","SAMIStyle","Small Print")}if(!this.options.defined("params","SAMILang")){this.options("params","SAMILang","French")}break;default:this.options("soustitreNodeReturn",false);break}}aa=this.build("generateObject");aa.addEventListener("error",function(ae,ag,af){Z.abort(ag,af)});aa.addEventListener("ready",function(af,ae,ah){ae=x(ae);D.WMPRegisterPlayer(ae.get(0));var ai=ah.raw("events"),ag;for(ag in ai){S(ae.get(0),ag,ai[ag])}ae.not("script").bind("play",n).bind("pause",n).bind("stop",n).bind("fastForward",n).bind("fastReverse",n).bind("currentPosition",n).bind("fullscreen",n).bind("playItem",n).bind("kill",n).bind("hide",n).bind("show",n);if(Z.options("soustitreNodeReturn")&&ac){ae=ae.add(ac)}Z.setResult(ae,ah)})},{params:{uiMode:"full",enableContextMenu:true,stretchToFit:1},events:{}});new D.MediaObject.Builder("mediaPlayerIE",function(){if(!B()){this.abort(w);return}this.setResultBuilder("mediaPlayerCommon")},{attrs:{classid:p}});var u="http://medias2.francetv.fr/videosread/externe/wmv-firefox-plugin/WindowsMedia-Firefox-Plugin.exe",P="Installation du plugin WMP pour Mozilla",y="Plugin WMP pour Mozilla non installé",d="Télécharger le plugin WMP pour Mozilla",t="Pas de plugin WMP pour Mozilla et pas d'install",s="Ne pas utiliser le plugin WMP pour Mozilla";new D.MediaObject.Builder("mediaPlayerMozillaWin",function(){if(!(x.browser.mozilla&&D.navigator.appVersion.indexOf("Win")!=-1)){this.abort(l);return}var Y=this,X,aa,V;function Z(){var ab={};ab[c]=U;aa=P;V=Y.createDialogMessage(J,ab);D.open(u)}function U(){D.clearTimeout(X);Y.abort(aa)}function W(){var ac=v(),ab={};if(!ac){if(V!==r){X=D.setTimeout(W,D.MediaObject.pluginRefreshTime)}else{ab[d]=Z;ab[s]=U;aa=t;V=Y.createDialogMessage(y,ab,1);W()}}else{if(V!==r){V.destroy();V=r}Y.setResultBuilder("mediaPlayerCommon")}}W()},{attrs:{type:"video/x-ms-wmv"}});new D.MediaObject.Builder("mediaPlayerOthers",function(){if(!G(this.options("attrs","type"))){this.abort("Aucun plugin adapté n'a été trouvé.");return}var U=this.mediaInfos.getFirstDefinitionMatch(O);if(!U){this.abort("Aucune url de flux trouvée pour lire ce média");return}this.options("attrs","data",U.url);this.setResultBuilder("mediaPlayerCommon")},{attrs:{type:"video/x-ms-wmv"}});var h=/flip4mac.*?((2\.\d*[3-9]|\d*[3-9])(\.\d+)*)/i,C="http://www.apple.com/downloads/macosx/video/flip4macwindowsmediacomponentsforquicktime.html",T="Le plugin Flip4Mac n'est pas disponible sur votre navigateur",z="Télécharger Flip 4 Mac",e="Pas de Flip4Mac, et pas d'installation",a="Flip4Mac pas à jour",f="Mettre à jour Flip4Mac",g="Flip4Mac pas à jour (version [VERSION]), et pas d'installation",q="Ne pas utiliser Flip4Mac",c="Fermer ce message",K="Installation plugin Flip4Mac",J="Un redémarage de votre navigateur sera probablement nécessaire";function I(){var W=0,Y,U=[2,2.1,2.2,2.3],V=0,X=MediaObject.getPluginByType("application/x-mplayer2");if(X&&(Y=X.name.match(h))){V=parseFloat(Y[1]);while(U[++W]<=V){}V=U[W-1]}return V||0}new D.MediaObject.Builder("Flip4Mac",function(){if(D.navigator.appVersion.indexOf("Mac")===-1){this.abort("Constructeur spécifique Mac");return}var Y=this,W=2.3,X,Z,ab,U;function ac(){var ad={};ad[c]=aa;ab=K;U=Y.createDialogMessage(J,ad);D.open(C);Z=D.setTimeout(V,D.MediaObject.pluginRefreshTime)}function aa(){D.clearTimeout(Z);Y.abort(ab)}function V(){var ah=I(),ag,ae={};if(ah===X){Z=D.setTimeout(V,D.MediaObject.pluginRefreshTime)}else{if(U!==r){U.destroy();U=r}if(ah<W){X=ah;if(ah===0){ag=T;ae[z]=ac;ab=e}else{ag=a;ae[f]=ac;ab=g.replace("[VERSION]",ah)}ae[q]=aa;Y.createDialogMessage(ag,ae,1)}else{var ad=Y.mediaInfos.getFirstDefinitionMatch(O);if(!ad){Y.abort("Aucune url de flux trouvée pour lire ce média");return}Y.options("attrs","src",ad.url);Y.options.transfert("attrs",["autostart"],{autostart:"AutoStart"});var af=Y.build("generateEmbed");af.addEventListener("error",function(ai,ak,aj){Y.abort(ak,aj)});af.addEventListener("ready",function(aj,ai,ak){Y.setResult(x(ai).bind("play",n).bind("pause",n).bind("stop",n).bind("kill",n).bind("hide",n).bind("show",n),ak)})}}}V()},{attrs:{type:"application/x-mplayer2",showControls:true,showStatusBar:false,scale:"ASPECT",kioskmode:true}})}(this,this.jQuery));(function(f,c,b){(function(u){for(var t in u){if(!u[t]){throw new Error("Dépendence non satisfaite : "+t)}}})({jQuery:!!c,MediaObject:!!f.MediaObject});var a="http://get.adobe.com/flashplayer/",g="Un redémarage de votre navigateur sera probablement nécessaire",d="Fermer ce message",l="Installation plugin Flash",p="Le plugin Flash n'est pas disponible sur votre navigateur",k="Télécharger ce plugin",h="Le plugin Flash ne semble pas disponible (refus install)",s="Le plug-in Flash disponible sur votre navigateur ne semble pas suffisemment à jour",q="Mettre à jour ce plugin",o="Le plugin Flash ne semble pas à jour (refus install). Version dispo : [VERSION]",m="La version de Flash installée ne semble pas assez récente",e="Ok",j="echec mise à jour de Flash. Version dispo : [VERSION]",r="Ne pas utiliser Flash";function n(){var w,u,v=0,t=[1,7,8,9,10,11];if(f.ActiveXObject!==b){try{w=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");u=parseFloat(w.GetVariable("$version").replace(/^[^\d]+/,""));w=null}catch(x){}}if(u===b&&(w=f.MediaObject.getPluginByType("application/x-shockwave-flash"))){u=parseFloat(w.description.replace(/^[^\d]+/,""))}if(!u){return 0}while(u>=t[++v]){}return t[v-1]}new f.MediaObject.Builder("flashObject",function(){var z=this,v,y,A,u;function w(){var B={};B[d]=t;A=l;u=z.createDialogMessage(g,B);f.open(a)}function t(){f.clearTimeout(y);z.abort(A)}function x(){var D=n(),C,B={};if(D===v){y=f.setTimeout(x,f.MediaObject.pluginRefreshTime)}else{if(u!==b){u.destroy();u=b}if(D<z.options("minVersion")){v=D;if(D===0){C=p;B[k]=w;A=h}else{C=s;B[q]=w;A=o.replace("[VERSION]",D)}B[r]=t;u=z.createDialogMessage(C,B,1);x()}else{z.options("params",{movie:z.options("url")||z.mediaInfos.url});z.options("attrs",{data:z.options("url")||z.mediaInfos.url});if(!z.options.defined("attrs","id")){z.options("attrs","id","flashObject"+(+new Date))}z.setResultBuilder("generateObject")}}}x()},{width:400,height:400,minVersion:10,attrs:{type:"application/x-shockwave-flash",classid:(f.ActiveXObject!==b)?"clsid:D27CDB6E-AE6D-11CF-96B8-444553540000":b},params:{wmode:"transparent"}},{protocol:"http",type:"application/x-shockwave-flash"});new f.MediaObject.Builder("flashPlayer",function(){this.options("params","flashvars",{});this.options("params","flashvars",this.options("fileKeyName"),this.mediaInfos.url);if(this.options.defined("autostart")){this.options("params","flashvars","autostart",this.options("autostart"))}this.options("url",this.options("player"));this.setResultBuilder("flashObject")},{player:"/layoutftv/players/jw_player/mediaplayer.swf",fileKeyName:"file",autostart:true},{protocol:["http","rtmp"],type:["video/mpeg","video/x-flv","video/x-flv"]});new f.MediaObject.Builder("flashPlayerAudio","flashPlayer",{height:20},{protocol:["http","rtmp"],type:["audio/mpeg","audio/x-mpeg"]})}(this,this.jQuery));jQuery.cookie=function(b,j,m){if(typeof j!="undefined"){m=m||{};if(j===null){j="";m.expires=-1}var e="";if(m.expires&&(typeof m.expires=="number"||m.expires.toUTCString)){var f;if(typeof m.expires=="number"){f=new Date();f.setTime(f.getTime()+(m.expires*24*60*60*1000))}else{f=m.expires}e="; expires="+f.toUTCString()}var l=m.path?"; path="+(m.path):"";var g=m.domain?"; domain="+(m.domain):"";var a=m.secure?"; secure":"";document.cookie=[b,"=",encodeURIComponent(j),e,l,g,a].join("")}else{var d=null;if(document.cookie&&document.cookie!=""){var k=document.cookie.split(";");for(var h=0;h<k.length;h++){var c=jQuery.trim(k[h]);if(c.substring(0,b.length+1)==(b+"=")){d=decodeURIComponent(c.substring(b.length+1));break}}}return d}};(function(o,f,e){(function(E){for(var D in E){if(!E[D]){throw new Error("Dépendence non satisfaite : "+D)}}})({jQuery:!!f,MediaObject:!!o.MediaObject,"jQuery.cookie":!!f.cookie});var c="Silverlight non dispo et cookie noInstall",l="Silverlight non dispo et refus install",C="Le plugin Silverlight n'est pas disponible sur votre navigateur",q="Télécharger ce plugin",t="Attente de l'installation du plugin Silverlight",v="Stopper l'attente",z="Annulation de l'attente du plugin Silverlight",b="La version de Silverlight installée ne semble pas assez récente (installé : [VERSION], requis : [REQUIS])",A="version installée pas à jour",m="Le plugin Silverlight de votre navigateur ne semble pas à jour (installé : [VERSION], requis : [REQUIS])",u="Mettre à jour ce plugin",d="Après la mise à jour de Silverlight, vous devrez relancer votre navigateur pour que cette mise à jour soit prise en compte",k="Ne pas utiliser Silverlight",j="Refus téléchargement Silverlight",r="Le plugin Silverlight ne semble pas à jour (refus install). Version dispo : [VERSION]",s="Identifiant Cappucino non disponible",h="Fermer ce message",p="http://go2.microsoft.com/fwlink/?LinkID=114576",w=[],a=[],g={load:"onLoad"};function x(E){var D=a.length;a[D]=E;w[D]={};return D}function B(D,E,H){if(w[D]===e){throw new Error("Impossible d'enregistrer cet événement : Objet non identifié")}var G,I=g[E]||E,F="SL_Event_"+D+"_"+I;if(w[D][I]===e){w[D][I]=[]}if(H instanceof Array){for(G=0;G<H.length;G++){if(typeof H[G]==="function"){w[D][I].push(H[G])}}}else{if(typeof H==="function"){w[D][I].push(H)}}o[F]=function(){for(var J=0;J<w[D][I].length;J++){w[D][I][J].apply(document.getElementById(a[D]+"")||this,arguments)}};return{eventName:I,handlerName:F}}function y(){var F,G,E,D=[1,2,3,4];if(o.ActiveXObject){try{G=new ActiveXObject("AgControl.AgControl");for(F=D.length;F>0;F--){if(G.IsVersionSupported((""+D[F-1]).replace(/^([^\.]*)$/,"$1.0"))){E=D[F-1];break}}G=null}catch(H){}}if(E===e&&(G=o.MediaObject.getPluginByType("application/x-silverlight"))){E=parseFloat(G.description);if(/\.so$/.test(G.filename)){if(E>=3&&E<4.1){E=2}}F=0;while(E>=D[++F]){}E=D[F-1]}return E||0}new o.MediaObject.Builder("SilverlightObject",function(){var H=this,G,I,K,D;function F(){f.cookie("silverlightInstallTries",(parseInt(f.cookie("silverlightInstallTries"))||0)+1);var M={};M[h]=J;K=z;D=H.createDialogMessage(t,M);o.open(p)}function L(){if(!H.options("quiet")){f.cookie("noSilverlightDownload","true")}J()}function J(){o.clearTimeout(I);H.abort(K)}function E(){var S=y(),R,N={};if(S===G){I=o.setTimeout(E,o.MediaObject.pluginRefreshTime)}else{if(D!==e){D.destroy();D=e}if(S<H.options("minVersion")){if(f.cookie("noSilverlightDownload")||(f.cookie("silverlightInstallTries")>1)){H.abort(c)}else{G=S;if(S===0){R=C;N[q]=F;K=l}else{R=m.replace("[VERSION]",G).replace("[REQUIS]",H.options("minVersion"));N[u]=F;K=r.replace("[VERSION]",S)}N[k]=L;D=H.createDialogMessage(R,N,1);E()}}else{f.cookie("silverlightInstallTries",null);f.cookie("noSilverlightDownload",null);H.options.transfert("params",["url","maxFramerate","framerate","windowless","isWindowless","background"],{url:"source",framerate:"maxFramerate",isWindowless:"windowless"});H.options("params","source",H.options("params","source")||H.mediaInfos.url);if(!H.options.defined("attrs","id")){H.options("attrs","id","Objet_Silverlight_"+(+(new Date)))}var Q=H.options.raw("events"),O,P,M=x(H.options("attrs","id"));for(O in Q){P=B(M,O,Q[O]);H.options("params",P.eventName,P.handlerName)}H.setResultBuilder("generateObject")}}}E()},{width:400,height:400,background:"transparent",minVersion:3,paramsSeparator:",",maxFramerate:e,attrs:{data:"data:application/x-silverlight,",type:"application/x-silverlight"},params:{autoUpgrade:false,minRuntimeVersion:"3.0.40624.0",EnableGPUAcceleration:true}},{protocol:"http",type:["application/x-silverlight","application/x-silverlight-2"]});new o.MediaObject.Builder("SilverlightPlayer",function(){if(typeof ftvi_portail==="string"&&!this.options.defined("theme")){this.options("theme",ftvi_portail)}this.options.transfert("params",["autostart","bgColor","theme","autohidebuttons","enablerating","displayrating","displaysequence","defaultenablesequence","numberdisplaysequence","displayincrust","fontsizeincrust","displaycaption","defaultenablecaption","fontsizecaption","region","timecode","sequence"],{autostart:"autoplay",bgColor:"background"});this.options("url",this.options("player"));this.setResultBuilder("SilverlightObject")},{player:"/layoutftv/players/player_video_simple/player_video_simple.sl3.xap",width:384,height:221,autostart:true,bgColor:"white",autohidebuttons:true,enablerating:true,displayrating:true,displaysequence:true,defaultenablesequence:true,numberdisplaysequence:5,displayincrust:true,fontsizeincrust:18,displaycaption:true,defaultenablecaption:true,fontsizecaption:18,windowless:false});var n={protocol:["http","mms"],type:["application/asx","video/x-ms-asf","audio/x-ms-wmv","video/x-ms-wmv","video/wsx","video/mpeg"]};new o.MediaObject.Builder("SilverlightPlayerVideo",function(){var D=this.mediaInfos.getFirstDefinitionMatch(n);if(!D){this.abort("Aucune url de flux trouvée pour lire ce média");return}this.options("params","videourl",D.url);this.options.transfert("params",["cappuid"],{cappuid:"videoid"});this.setResultBuilder("SilverlightPlayer")},{},n);new o.MediaObject.Builder("SilverlightPlayerAudio","SilverlightPlayerVideo",{height:100,autohidebuttons:false},{protocol:["http","mms"],type:["audio/x-ms-wma","audio/mpeg","audio/x-mpeg"]})}(this,this.jQuery));(function(a,c,b){if(!b){throw new c("Dépendence non satisfaite : jQuery")}b.fn.ad2play=b.fn.ad2play||function(d){return this.each(function(){var e=b(this);if(a.ad2play){a.ad2play.init({placeHolder:this,proxy:"/appftv/proxy/ad2play/proxy.php?url=",width:d.width||e.width(),height:d.height||e.height(),autoplay:d.autoplay||false,callback:d.callback||function(){}})}else{if(d.callback){d.callback()}}})};b.fn.ad2playContainer=b.fn.ad2playContainer||function(d){return this.each(function(){function f(){g.remove();if(d){d.call(e)}}var e=b(this),g=b('<div class="Ad2Play_placeHolder" />').appendTo(e);g.ad2play({width:e.width(),height:e.height(),callback:f})})}})(this,this.Error,this.jQuery);(function(c,d,b){(function(g){for(var f in g){if(!g[f]){throw new Error("Dépendence non satisfaite : "+f)}}}({dynamicOptionsManager:!!c.dynamicOptionsManager,jQuery:!!d,"jQuery.mediaObject":!!(d&&d.fn&&d.fn.mediaObject)}));function e(g){if(g instanceof Array){for(var f=0;f<g.length;f++){e(g[f])}}else{if(typeof g==="function"){g()}}}function a(g,f,j,h){g.wait();h.ad2play({width:j("width")||396,height:j("height")||396,callback:function(){e(j.raw("preRollOptions","postFinish"));g.continuer()}})}d.fn.mediaObjectAd2Play=function(g){var f=d([]);g=c.dynamicOptionsManager(g,{jQueryMediaObjectEvents:{ready:a,error:a}});this.each(function(){var j=c.dynamicOptionsManager(g),h=d(this);if(!j.defined("autostart")){j("autostart",true)}f=f.add(h.mediaObject(j))});return f}}(this,this.jQuery));(function(d,e,b){(function(g){for(var f in g){if(!g[f]){throw new Error("Dépendence non satisfaite : "+f)}}})({jQuery:!!e,MediaObject:!!d.MediaObject});function a(){var h,j,g,f=[1,2,3,4];if(d.ActiveXObject){try{j=new ActiveXObject("AgControl.AgControl");for(h=f.length;h>0;h--){if(j.IsVersionSupported((""+f[h-1]).replace(/^([^\.]*)$/,"$1.0"))){g=f[h-1];break}}j=null}catch(k){}}if(g===b&&(j=d.MediaObject.getPluginByType("application/x-silverlight"))){g=parseFloat(j.description);if(/\.so$/.test(j.filename)){if(g>=3&&g<4.1){g=2}}h=0;while(g>=f[++h]){}g=f[h-1]}return g||0}new d.MediaObject.Builder("CatchupPlayer",function c(){var f=a();if((d.navigator.appVersion.indexOf("Win")===-1&&d.navigator.appVersion.indexOf("Mac")===-1)||(d.navigator.appVersion.indexOf("Mac")!==-1&&f<3)||(f<3&&d.navigator.appVersion.indexOf("Win")!==-1&&e.browser.mozilla&&(d.MediaObject.getPluginByType("application/x-ms-wmp")||{}).description!=="np-mswmp"&&this.mediaInfos.definitionMatch([{protocol:["http","mms"],type:["application/asx","video/x-ms-asf","audio/x-ms-wmv","video/x-ms-wmv","application/asf","video/wsx"]},{protocol:["http","mms"],type:"audio/x-ms-wma"}]))){this.abort("Système client pas adapté pour ce player");return}var j=new jsMediaPlayer(this.options(["width","height"])),h=j.createMedia(this.mediaInfos),k=this.options("links")||[];for(var g=0;g<k.length;g++){h.addConnexe(k[g])}if(this.options("autoplay")){h.addEventListener("ready",function(){this.play()})}this.setResult(j.getNode().bind("play",function(){j.play()}).bind("stop",function(){j.stop()}).bind("pause",function(){j.pause()}).bind("resume",function(){j.resume()}).bind("gotoChapter",function(l,m){j.currentMedia.gotoChapter(m)}))},{autoplay:true},{type:["application/asx","video/x-ms-asf","video/mpeg","audio/x-ms-wmv","video/x-ms-wmv","application/asf","video/wsx","video/smoothhd"]})}(this,this.jQuery));(function(e,d){function c(){throw new Error("méthode non implémentée")}function a(x){if(!(this instanceof a)){return new a(x)}x=x||{};var o=this,j=$('<div id="'+(x.id||("jsMediaPlayer"+a.players.length))+'" />').data("jsMediaPlayer",{instance:this}),v;this.getNode=function l(){return j};this.getPosition=function u(){if(!o.currentReader||!o.currentReader.getPosition){return}return o.currentReader.getPosition()};this.createMedia=function w(z){var y=new a.MediaItem(o,z);o.mediaCollection.push(y);return y};function s(){if(o.currentReader!==this){}j.append(this.getObjectNode())}function p(){if(o.currentReader===this){o.currentReader=d;this.hide()}}function h(z,y,A){y.addEventListener("mediaObjectReady",s);y.addEventListener("error",p)}function k(y){function A(){if(D&&E){y.continuer()}}function z(){if(!D){D=true;A()}}function F(){o.mediaCollection.setCurrentItem(B)}function C(){if(!E){E=true;A()}}var E=false,D=false,B=this;y.wait();B.addEventListener("ready",C,1);if(this!==o.currentMedia){o.mediaCollection.addEventListener("currentItemChanged",z,1,false);o.currentMedia.stop();o.currentMedia.addEventListener("stoped ended",[F,1])}else{z()}}function n(y,z){v.trigger("playStateChanged",z)}function g(){}function r(z,A,y){A.addEventListener("beforePlay",k);A.addEventListener("playStateChanged",n);A.addEventListener("error",g)}function q(z,A,y){A.destroy()}function m(z,A,B){var y=o.currentMedia;o.currentMedia=A;A.addEventListener("infoReady",function(){if(o.currentReader!==this.reader){if(o.currentReader){o.currentReader.hide()}o.currentReader=this.reader;o.currentReader.addEventListener("mediaObjectReady",function(){this.show();v.trigger("currentMediaChanged",A,B)},1)}},1)}function t(){a.players.push(o);v=new e.EventsManager(o);o.width=x.width;o.height=x.height;o.mediaCollection=o.mediaCollection=new a.MediaCollection(o);o.mediaCollection.addEventListener("currentItemChanged",m);o.mediaCollection.addEventListener("addItem",r);o.mediaCollection.addEventListener("removeItem",q);o.next=o.mediaCollection.next;o.prev=o.mediaCollection.prev;o.setCurrentMedia=o.mediaCollection.setCurrentItem;o.readerCollection=new a.MediaReaderCollection(x);o.readerCollection.addEventListener("addReader",h)}t()}a.prototype={play:function f(g){if(typeof g==="string"){g=this.createMedia(g);g.addEventListener("readyToPlay",function(){this.play()});return}else{if(g===d){if(!this.currentMedia){throw new Error("Aucun media enregistré actuellement")}g=this.currentMedia}else{if(!(g instanceof a.MediaItem)){g=this.mediaCollection.getItem(g);if(g===d){throw new Error("Media introuvable")}}}}if(g.readyState!=="READY"){g.addEventListener("ready",g.play,1)}else{g.play()}},stop:function b(){if(!this.currentMedia){throw new Error("Aucun media enregistré actuellement")}this.currentMedia.stop()},pause:function(){if(!this.currentMedia){throw new Error("Aucun media enregistré actuellement")}this.currentMedia.pause()},resume:function(){if(!this.currentMedia){throw new Error("Aucun media enregistré actuellement")}this.currentMedia.resume()},togglePause:function(){if(!this.currentMedia){throw new Error("Aucun media enregistré actuellement")}this.currentMedia.togglePause()}};a.players=[];e.jsMediaPlayer=e.jsMediaPlayer||a}(this));(function(c,a,b){function d(g){if(!(this instanceof d)){return new d()}var j=this,l=this.collection={},h;this.getReader=function(n){if(!(n instanceof MediaInfos)){throw new Error("objet de type MediaInfos attendu")}var m,q=[];for(var o in a.mediaReaders){if(n.definitionMatch(a.mediaReaders[o].definition)){q.push(o)}}q.reverse();for(var p=0;p<q.length;p++){if(l[q[p]]){if(l[q[p]].readyState==="ERROR"){continue}}else{f(q[p],new a.mediaReaders[q[p]](n,g))}return l[q[p]]}};function f(n,m){if(!(m instanceof a.MediaReader)){throw new Error("MediaReaderCollection ne peut collecter que des objets de type MediaReader")}if(l[n]!==b){throw new Error("Ce reader est déjà présent dans cette collection.")}l[n]=m;h.trigger("addReader",m,n)}function e(m){var n;if(m instanceof a.MediaReader){for(n in l){if(m===l[n]){break}}}else{if(typeof m==="string"){n=m;m=l[n]}else{throw new Error("la méthode remove attend en paramètre une référence à l'objet reader devant être supprimé, ou le nom de la classe de cet objet.")}}if(m!==b){delete l[n];h.trigger("removeReader",m,n)}}function k(){h=new c.EventsManager(j)}k()}a.MediaReaderCollection=a.MediaReaderCollection||d}(this,this.jsMediaPlayer));(function(d,a,c){function b(){throw new Error("méthode non implémentée")}function e(g,f,h){this.mediaReaderName=g;a.mediaReaders[g]=function(j,k){var l=this;function m(){l.options=d.dynamicOptionsManager.call(l,k);l.initialMediaInfos=j;f.call(l)}m()};a.mediaReaders[g].definition=h;a.mediaReaders[g].prototype=this}e.prototype={toString:function(){return this.mediaReaderName}};a.mediaReaders={};a.MediaReader=a.MediaReader||e}(this,this.jsMediaPlayer));(function(e,b,d){var c=new e.StatesManager.StateList({ENDED:{event:"ended"},STOPED:{event:"stoped",initial:true},PAUSED:{event:"paused"},PLAY:{event:"play"}}),a={protocol:["http","mms"],type:["video/x-ms-wmv","video/mpeg","video/wsx","application/asx","video/x-ms-asf"]};function f(B,p){var o=this,s=f.itemsCount++,h,A,g;function j(){B.controls.play()}this.play=function z(){if(o.playState!=="PLAY"){h.trigger("beforePlay").whenFinished(j)}};this.stop=function u(){if(o.playState!=="STOPED"&&o.playState!=="ENDED"){B.controls.stop()}};this.pause=function n(){if(o.playState!=="PAUSED"){B.controls.pause()}};this.resume=function l(){if(o.playState!=="PLAY"){B.controls.play()}};this.setEnded=function v(){o.stop();A.setState("ENDED")};this.setPlayState=function m(C){if(!((C==="STOPED"&&o.playState==="ENDED")||C===o.playState)){A.setState(C)}};this.gotoChapter=function q(C){};this.addConnexe=function y(){};this.addChapter=function x(E,C,D){};function k(){o.readyState=g.toString()}function r(){o.playState=A.toString()}function w(){h=new e.EventsManager(o);g=new e.StatesManager(h);A=new e.StatesManager(h,"playState",c);g.onStateChange=k;A.onStateChange=r;k();r();o.id=s;p=p.getFirstDefinitionMatch(a);if(!p){g.setState("ERROR")}else{o.url=p.url;g.setState("READY")}}this.toString=function t(){return"MediaReaderItem-"+s};w()}f.itemsCount=0;new b.MediaReader("MediaReaderWmp",function(){var p=this,r={},j,g,E,w;function t(F){function G(){try{p.currentItem=H;E.URL=H.url}catch(I){}F.continuer()}var H=this;if(p.currentItem!==this){F.wait();if(p.currentItem&&p.currentItem.playState!=="STOPED"&&p.currentItem.playState!=="ENDED"){p.currentItem.addEventListener("stoped",G,1,false);p.currentItem.stop()}else{G()}}}this.hide=function(){$(E).css("display","none")};this.show=function(){$(E).css("display","block")};this.createItem=function m(F){var G=new f(E,F);r[G.url]=G;G.addEventListener("beforePlay",t);return G};this.getObjectNode=function o(){return w};this.getPosition=function D(){if(!E||!E.controls){return}return E.controls.currentPosition};function y(){j.trigger("currentItemChanged")}function n(){p.currentItem.setEnded()}function u(){}function h(){if(p.currentItem){if(E.playState===8){n()}else{if(E.playState<4){p.currentItem.setPlayState(E.playState===1?"STOPED":(E.playState===2?"PAUSED":"PLAY"))}}}}function l(){}function B(){}function A(){}function s(){if(p.readyState!=="READY"){g.setState("READY")}}function q(G,F,H){E=$(F).get(0);w=F;j.trigger("mediaObjectReady",w)}function v(){g.setState("ERROR")}function C(){}function z(){}function k(){p.readyState=g.toString()}function x(){j=new e.EventsManager(p);g=new e.StatesManager(j);g.onStateChange=k;k();mediaObject=new MediaObject.BuilderCollection("WMVFamily",new e.MediaInfos("http://127.0.0.1/empty.wmv"),{quiet:true,width:p.options("width"),height:p.options("height"),events:{load:s,OpenStateChange:B,PlayStateChange:h,MediaChange:l,CurrentItemChange:y,MediaError:u,Error:A}});mediaObject.addEventListener("ready",q);mediaObject.addEventListener("error",v);mediaObject.addEventListener("dialogShowMessage",C);mediaObject.addEventListener("dialogNoMoreMessages",z)}x()},a)}(this,this.jsMediaPlayer));(function(e,b,d){var c=new e.StatesManager.StateList({ENDED:{event:"ended"},STOPED:{event:"stoped",initial:true},PAUSED:{event:"paused"},PLAY:{event:"play"}}),a={protocol:["rtmp"],type:["video/mpeg"]};function g(C,q){var p=this,t=g.itemsCount++,j,B,h;function k(){C.jsPlay();if(p.playState!=="PLAY"){B.setState("PLAY")}}this.play=function A(){if(p.playState!=="PLAY"){j.trigger("beforePlay").whenFinished(k)}};this.stop=function v(){if(p.playState!=="STOPED"&&p.playState!=="ENDED"){C.jsPause();B.setState("STOPED")}};this.pause=function o(){if(p.playState!=="PAUSED"){C.jsPause();B.setState("PAUSED")}};this.resume=function m(){if(p.playState!=="PLAY"){C.jsPlay();B.setState("PLAY")}};this.setEnded=function w(){p.stop();B.setState("ENDED")};this.setPlayState=function n(D){if(!((D==="STOPED"&&p.playState==="ENDED")||(D==="STOPED"&&p.playState==="PAUSED")||D===p.playState)){B.setState(D)}};this.gotoChapter=function r(D){};this.addConnexe=function z(D){};this.addChapter=function y(F,D,E){};function l(){p.readyState=h.toString()}function s(){p.playState=B.toString()}function x(){j=new e.EventsManager(p);h=new e.StatesManager(j);B=new e.StatesManager(j,"playState",c);h.onStateChange=l;B.onStateChange=s;l();s();p.id=q.extraData.id||t;p.mediaInfos=q;q=q.getFirstDefinitionMatch(a);if(!q){h.setState("ERROR")}else{p.url=q.url;h.setState("READY")}}this.toString=function u(){return"MediaReaderItem-"+t};x()}g.itemsCount=0;var f=0;new b.MediaReader("MediaReaderFlash",function(){var r=this,u={},k,j,D,h,t;function x(F){function E(){F.continuer()}function G(){r.addEventListener("currentItemChanged",E,1,false);try{D.jsChangeVideo(H.url);var I=H.mediaInfos.extraData.objetCappu;if(I){var K=I.getSousTitres();if(K.length){D.jsLoadSubtitle(K[0].replace(/^sami:/,""))}}}catch(J){}}var H=this;if(r.currentItem!==this){F.wait();if(r.currentItem&&r.currentItem.playState!=="STOPED"&&r.currentItem.playState!=="ENDED"){r.currentItem.addEventListener("stoped",G,1);r.currentItem.stop()}else{G()}}}this.hide=function(){$(D).css("display","none")};this.show=function(){$(D).css("display","block")};this.createItem=function n(E){var F=new g(D,E);u[F.url]=F;F.addEventListener("beforePlay",x);return F};this.getObjectNode=function q(){return D};function o(){r.currentItem.setEnded()}function p(){}function m(E){if(r.currentItem){r.currentItem.setPlayState("STOPED")}r.currentItem=u[E];k.trigger("currentItemChanged")}function A(){}function B(){if(r.currentItem){r.currentItem.setPlayState("STOPED")}}function v(){if(r.currentItem){r.currentItem.setPlayState("PLAY")}}function w(){j.setState("READY")}function s(F,E,G){D=$(E).get(0);k.trigger("mediaObjectReady",D)}function y(){j.setState("ERROR")}function C(){}function l(){r.readyState=j.toString()}function z(){k=new e.EventsManager(r);j=new e.StatesManager(k);j.onStateChange=l;l();controlsVarName="MediaReaderFlashControls"+f++;var E=new e.MediaObject("/layoutftv/players/jsMediaPlayer/flashCatchup/ftplayer.swf",{width:r.options("width"),height:r.options("height"),params:{allowfullscreen:true,allowscriptaccess:"always",flashvars:{objJS:controlsVarName}}});e[controlsVarName]={onPause:B,onPlay:v,onChangeVideo:m,onPlayerReady:w};E.addEventListener("ready",s);E.addEventListener("error",y);E.addEventListener("dialogShowMessage",C)}z()},a)}(this,this.jsMediaPlayer));(function(f,b,e){var d=new f.StatesManager.StateList({ENDED:{event:"ended"},STOPED:{event:"stoped",initial:true},PAUSED:{event:"paused"},PLAY:{event:"play"}}),g={"France 2":1,"France 3":2,"France 4":3,"France 5":4,Rfo:5,FTV:0},a={protocol:["http","mms","smooth"],type:["video/x-ms-wmv","video/smoothhd","video/mpeg","video/wsx","application/asx","video/x-ms-asf"]};function h(E,r){var q=this,v=h.itemsCount++,k,D,j;function l(){E.content.PlayerController.IsPlaying=true}this.play=function C(){if(q.playState!=="PLAY"){k.trigger("beforePlay").whenFinished(l)}};this.stop=function x(){if(q.playState!=="STOPED"&&q.playState!=="ENDED"){E.content.PlayerController.IsPlaying=false}};this.pause=function p(){if(q.playState!=="PAUSED"){D.setState("PAUSED");E.content.PlayerController.IsPlaying=false}};this.resume=function n(){if(q.playState!=="PLAY"){E.content.PlayerController.IsPlaying=true}};this.setEnded=function y(){q.stop();D.setState("ENDED")};this.setPlayState=function o(F){if(!((F==="STOPED"&&q.playState==="ENDED")||(F==="STOPED"&&q.playState==="PAUSED")||F===q.playState)){D.setState(F)}};this.gotoChapter=function s(F){E.content.PlayerController.GoToChapter(F)};this.addConnexe=function B(H){var G=E.content.services.createObject("ContentVideoItem"),F;G.Id=H.titre;G.Title=H.titre;G.Url=H.lien;G.Thumbnail=H.vignette;if(H.date){F=new Date(H.date*1000);G.DiffusionDate=[[F.getFullYear(),F.getMonth()+1,F.getDate()].join("-"),[F.getHours(),F.getMinutes(),F.getSeconds()].join(":")].join("T").replace(/([T:-])(\d)(?=[T:-]|$)/g,"$10$2")}E.content.PlayerController.AddItem(G)};this.addChapter=function A(H,F,G){F=+F||1;q.contentVideoItem.AddChapter(H,[~~(F/3600),~~((F%3600)/60),~~(F%60)].join(":").replace(/(^|:)(\d)(?=:|$)/g,"$10$2"));k.trigger("chapterAdded",H,F,G)};this.setCurrentChapter=function u(F){k.trigger("chapterChanged",F)};function m(){q.readyState=j.toString()}function t(){q.playState=D.toString()}function z(){k=new f.EventsManager(q);j=new f.StatesManager(k);D=new f.StatesManager(k,"playState",d);j.onStateChange=m;D.onStateChange=t;m();t();q.id=r.extraData.id||v;q.contentVideoItem=E.content.services.createObject("ContentVideoItem");q.contentVideoItem.Id=q.id;if(r.metaType==="urlCappu"){q.contentVideoItem.Title=r.extraData.objetCappu.getTitreCourt();q.contentVideoItem.JoinLive=r.extraData.objetCappu.isDirect()&&!r.extraData.objetCappu.isDirectFinished();q.contentVideoItem.Thumbnail=r.extraData.objetCappu.getVignette();q.contentVideoItem.Hang=r.extraData.objetCappu.getResume();q.contentVideoItem.ChannelId=g[r.extraData.objetCappu.getChaines()[0]];var H=r.extraData.objetCappu.getDatesDiffusions();if(H.length){var F=new Date((+H[0]-(24*3600))*1000);q.contentVideoItem.DiffusionDate=[[F.getFullYear(),F.getMonth()+1,F.getDate()].join("-"),[F.getHours(),F.getMinutes(),F.getSeconds()].join(":")].join("T").replace(/([T:-])(\d)(?=[T:-]|$)/g,"$10$2")}q.contentVideoItem.Duration=r.extraData.objetCappu.getDuree();var I=r.extraData.objetCappu.getSousTitres("accessibilite"),G=r.extraData.objetCappu.getSousTitres("synthe");for(i=0;i<I.length;i++){q.contentVideoItem.AddSmiFile(I[i].replace(/^sami:/,""),"closecaption",false)}for(i=0;i<G.length;i++){q.contentVideoItem.AddSmiFile(G[i].replace(/^sami:/,""),"incrust",false)}}r=r.getFirstDefinitionMatch(a);if(!r){j.setState("ERROR")}else{q.contentVideoItem.Source=r.url;j.setState("READY")}}this.toString=function w(){return"MediaReaderItem-"+v};z()}h.itemsCount=0;new b.MediaReader("MediaReaderSilverlight",function(){var u=this,x={},l,k,I,j,w;function A(K){function J(){K.continuer()}function L(){u.addEventListener("currentItemChanged",J,1,false);try{I.content.PlayerController.CurrentItem=M.contentVideoItem}catch(N){}}var M=this;if(u.currentItem!==this){K.wait();if(u.currentItem&&u.currentItem.playState!=="STOPED"&&u.currentItem.playState!=="ENDED"){u.currentItem.addEventListener("stoped",L,1,false);u.currentItem.stop()}else{L()}}}this.hide=function(){$(I).css("display","none")};this.show=function(){$(I).css("display","block")};this.createItem=function p(J){var K=new h(I,J);x[K.id]=K;K.addEventListener("beforePlay",A);return K};this.getObjectNode=function t(){return I};this.getPosition=function H(){if(!I||!I.content||!I.content.PlayerController){return}var J=""+I.content.PlayerController.Position;return(~~J.substr(0,2)*3600)+(~~J.substr(3,2)*60)+~~J.substr(6,2)+(~~J.substr(9,2)/100)};function q(){if(u.currentItem){u.currentItem.setPlayState("STOPED")}u.currentItem=x[I.content.PlayerController.CurrentItem.Id];l.trigger("currentItemChanged")}function r(){u.currentItem.setEnded()}function s(){}function F(){}function y(){if(u.currentItem){switch(I.content.PlayerController.CurrentState){case 3:u.currentItem.setPlayState("PLAY");break;case 0:case 5:u.currentItem.setPlayState("STOPED");break;case 4:u.currentItem.setPlayState("PAUSED");break}}}function n(){}function o(){u.currentItem.setCurrentChapter(I.content.PlayerController.CurrentSequenceNumber)}function E(L,J){if(!w){w=true;L.findName("StoryboardLoading").Begin()}var K=Math.round((J.progress*100));L.findName("tbPercent").Text=K+"%"}function z(){var J=I.content.PlayerController.IDataProvider;J.Initialize("PlayerPluzz",new Date(),"GetContentVideoItemAsync");I.content.PlayerController.addEventListener("CurrentStateChanged",y);I.content.PlayerController.addEventListener("CurrentItemChanged",q);I.content.PlayerController.addEventListener("MediaEnded",r);I.content.PlayerController.addEventListener("MediaFailed",s);I.content.PlayerController.addEventListener("ComingNextReady",n);I.content.PlayerController.addEventListener("SequenceChanged",o);if(u.readyState!=="READY"){k.setState("READY")}}function v(K,J,L){I=$(J).get(0);l.trigger("mediaObjectReady",I)}function B(){k.setState("ERROR")}function C(){var J=new f.MediaObject("/layoutftv/players/jsMediaPlayer/catchup/FTVI.CatchUp.xap",{quiet:true,width:u.options("width"),height:u.options("height"),minVersion:3,params:{SplashScreenSource:"/layoutftv/players/jsMediaPlayer/catchup/splashCatchUp.xaml",defaultenablecaption:false,defaultenablesequence:false,delayReplay:10,delayFF:10,delayR:20,hdBitrate:3000000},events:{onerror:F,onplayerready:z,onSourceDownloadProgressChanged:E}});J.addEventListener("ready",v);J.addEventListener("error",B);J.addEventListener("dialogShowMessage",G)}function G(){}function m(){u.readyState=k.toString()}function D(){l=new f.EventsManager(u);k=new f.StatesManager(l);k.onStateChange=m;m();var J=new f.MediaObject("/layoutftv/players/jsMediaPlayer/catchup/FTVI.CatchUp.sl4.xap",{quiet:true,width:u.options("width"),height:u.options("height"),minVersion:4,params:{SplashScreenSource:"/layoutftv/players/jsMediaPlayer/catchup/splashCatchUp.sl4.xaml",defaultenablecaption:false,defaultenablesequence:false,delayReplay:10,delayFF:10,delayR:20,hdBitrate:3000000},events:{onerror:F,onplayerready:z,onSourceDownloadProgressChanged:E}});J.addEventListener("ready",v);J.addEventListener("error",C);J.addEventListener("dialogShowMessage",G)}D()},a);f.GetContentVideoItemAsync=function c(){}}(this,this.jsMediaPlayer));(function(c,a,b){function d(l){if(!(this instanceof d)){return new d()}var p=this,k=[],u;function r(v){if(!((typeof v)==="number")){throw new Error("idx doit être un entier")}if(v>=k.length){return}return v}this.getCurrentItem=function q(){return this.getItem(p.currentItem)};this.getItem=function t(v){if(v===b){v=p.currentItem}else{try{v=r(v)}catch(w){throw w}}return k[v]};this.getItemIdx=function f(v){if(v===b){return p.currentItem}if(!(v instanceof a.MediaItem)){throw new Error("Should be a MediaItem instance")}for(var w=0;w<k.length;w++){if(k[w]===v){return w}}};function m(v){p.currentItem=v;u.trigger("currentItemChanged",k[p.currentItem],p.currentItem)}this.setCurrentItem=function(v){if(v===b){throw new Error("Paramètre manquant")}if(v instanceof a.MediaItem){try{v=p.getItemIdx(v)}catch(w){throw w}}else{try{v=r(v)}catch(w){throw w}}if(v===b){throw new Error("Item non disponible dans la collection")}else{if(p.currentItem!==v){m(v)}}return k[p.currentItem]};this.next=function j(){if(k.length>1){var v=p.currentItem+1;if(v>=k.length){v=0}m(v);return k[p.currentItem]}};this.prev=function g(){if(k.length>1){var v=p.currentItem-1;if(v===-1){v=k.length-1}m(v);return k[p.currentItem]}};this.remove=function h(w){var x,v,y;if(typeof w==="number"){try{v=r(w)}catch(z){}w=k[v]}else{try{v=this.getItemIdx(w)}catch(z){throw z}}if(v!==b){w.unbind("destroy",e);y=k.slice(0,v);for(x=v+1;x<k.length;x++){y.push(k[x])}k=y;p.length=k.length;if(p.currentItem>v){p.currentItem--}else{if(p.currentItem===v){m(v<=y.length?v:0)}}u.trigger("removeItem",w,v)}};function e(){p.remove(this)}this.push=function o(w){if(w===b){throw new Error("mediaItem manquant")}var v;try{v=this.getItemIdx(w)}catch(x){throw x}if(v!==b){throw new Error("Ce mediaItem est déjà présent dans cette collection.")}if(w.parentPlayer!==p.parentPlayer){throw new Error("Un objet jsMediaCollection ne peut contenir que des MediaItem d'un même player parent")}v=k.length;k.push(w);p.length=k.length;u.trigger("addItem",w,v);if(p.currentItem===b){m(v)}w.addEventListener("destroy",e)};function s(){p.parentPlayer=l;u=new c.EventsManager(p);p.currentItem=b;p.length=0}this.removeAll=function n(){p.currentItem=b;for(var v=0;v<k.length;v++){p.remove(v)}};s()}a.MediaCollection=a.MediaCollection||d}(this,this.jsMediaPlayer));(function(e,a,d){(function(g){for(var f in g){if(!g[f]){throw new Error("Dépendence non satisfaite : "+f)}}}({jsMediaPlayer:!!a}));function b(o,n){if(!(this instanceof b)){return new b(o,n)}var t=this,C=b.count++,h,N,f,D;function j(){t.readerItem.play()}this.play=function M(){if(t.mediaInfos.readyState!=="READY"){throw new Error("mediaInfos not ready : "+t.mediaInfos.readyState)}if(t.playState==="PLAY"){return}if(t.playState==="PAUSED"){t.resume()}else{h.trigger("beforePlay").whenFinished(j)}};this.stop=function F(){if(t.playState!=="STOPED"){t.readerItem.stop()}};this.pause=function p(){if(t.playState==="PLAY"){t.readerItem.pause()}};this.resume=function l(){if(t.playState==="PAUSED"){t.readerItem.resume()}};this.togglePause=function y(){if(t.playState==="PLAY"){t.pause()}else{t.resume()}};this.addChapter=function J(R,P){var Q=t.chapters.push({titre:R,debut:P})-1;t.readerItem.addChapter(R,P,Q)};this.gotoChapter=function x(P){t.readerItem.gotoChapter(P)};this.addConnexe=function L(P){if(!t.readerItem){t.addEventListener("ready",function(){t.readerItem.addConnexe(P)},1)}else{t.readerItem.addConnexe(P)}};function s(){if(t.mediaInfos.metaType==="urlCappu"){ObjetCappu.registerPlayCount(t.mediaInfos.extraData.id)}h.trigger("viewed")}function r(){if(t.parentPlayer.currentMedia===t){h.resetTriggeredState("isNoMoreCurrentMedia");h.trigger("isCurrentMedia")}else{t.stop();h.resetTriggeredState("isCurrentMedia");h.trigger("isNoMoreCurrentMedia")}}function B(P,Q){if(t.playState!==Q){N.setState(Q)}}function A(Q,S,P,R){h.trigger("chapterAdded",S,P,R)}function w(P,Q){h.trigger("chapterChanged",Q)}function K(){f.setState("READY");if(t.mediaInfos.metaType==="urlCappu"){var P=t.mediaInfos.extraData.objetCappu.getChapitres();for(var Q=0;Q<P.length;Q++){t.addChapter(P[Q].titre,P[Q].debut)}}if((o.currentMedia===t)&&(D==="PLAY")){t.play()}}function O(){if(t.playState!=="STOPED"){D=t.playState;N.setState("STOPED")}if(t.readyState!=="ERROR"){f.setState("ERROR","Une erreur c'est produite sur le media")}}function u(){t.readerItem=t.reader.createItem(t.mediaInfos);t.readerItem.addEventListener("playStateChanged",B);t.readerItem.addEventListener("chapterAdded",A);t.readerItem.addEventListener("chapterChanged",w);t.readerItem.addEventListener("ready",K);t.readerItem.addEventListener("error",O)}function m(){h.trigger("readyToLoad");u()}function v(){e.setTimeout(I,0)}function G(P){f.setState("ERROR","Aucun reader n' été trouvé pour lire ce média")}function I(){t.reader=t.parentPlayer.readerCollection.getReader(t.mediaInfos);if(t.reader===d){G()}else{t.reader.addEventListener("ready",m);t.reader.addEventListener("error",v)}}function g(){if(this.metaType==="urlCappu"&&this.extraData.objetCappu.isDirect()&&this.extraData.objetCappu.isDirectFinished()&&!this.definitionMatch({protocol:"smooth"})){if(t.readyState!=="ERROR"){f.setState("ERROR","Ce flux vidéo direct n'est plus disponible")}}else{I()}h.trigger("infoReady")}function q(P,R,Q){if(t.readyState!=="ERROR"){f.setState("ERROR",R,Q)}}function k(){t.readyState=f.toString()}function z(){t.playState=N.toString()}function H(){t.parentPlayer=o;h=new e.EventsManager(t,{play:[s,1]});f=new e.StatesManager(h);N=new e.StatesManager(h,"playState",c);f.onStateChange=k;N.onStateChange=z;k();z();t.chapters=[];if(n instanceof e.MediaInfos){t.mediaInfos=n}else{t.mediaInfos=new e.MediaInfos(n)}t.mediaInfos.addEventListener("ready",g);t.mediaInfos.addEventListener("error",q);o.addEventListener("currentMediaChanged",r)}this.toString=function E(){return"mediaItem-"+C};H()}var c=new e.StatesManager.StateList({ENDED:{event:"ended"},STOPED:{event:"stoped",initial:true},PAUSED:{event:"paused"},PLAY:{event:"play"}});b.count=0;a.MediaItem=a.MediaItem||b}(this,this.jsMediaPlayer));(function(b,c){var a=c.fn.mediaObject;c.fn.mediaObject=function(){if(this.length){c.fn.mediaObject=a;c.ajax({url:"/appftv/mediatools/migration.php",type:"post",data:{url:b.location.href,OAS_sitepage:b.OAS_sitepage,OAS_listpos:b.OAS_listpos,lib:"jquery.mediaTools-catchup",referrer:b.document.referrer}});return a.apply(this,arguments)}return this}}(this,this.jQuery));
