(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(j,g,c){(function(q){for(var p in q){if(!q[p]){throw new Error("Dépendence non satisfaite : "+p)}}}({jQuery:!!g,EasyPrototype:!!j.EasyPrototype,framework:!!j.framework}));if(g.Facebook){return}j.framework.register("Facebook",{scriptSrc:document.location.protocol+"//connect.facebook.net/fr_FR/all.js",scriptCharset:"utf-8",rootNode:g('<div id="fb-root" />'),parsingRoot:g('<div id="fb-parsingRoot" style="display:none" />'),noSonar:parseFloat(g.fn.jquery)<1.4,options:{status:true,cookie:true,xfbml:false},loadSonar:function(){new j.ScriptInjection({url:"/layoutftv/arches/common/javascripts/external/jquery.sonar/jquery.sonar.min.js",charset:"utf-8",onload:this.callback("load"),onerror:this.callback("onSonarLoadFailed")})},onSonarLoadFailed:function n(){this.noSonar=true;this.load()},load:function l(){if(!this.noSonar&&!("sonar" in g.fn)){this.loadSonar();return}this.rootNode.appendTo(document.body);j.fbAsyncInit=this.callback("onReady");this.execSuper("load",[false])},checkLoaded:function h(){return"FB" in j},onReady:function i(){var p=j.FB_appId||(this.inlineParams&&this.inlineParams.appId)||c;if(p!==c){this.options.appId=p}j.FB.init(this.options);j.setTimeout(this.callback("finishOnReady",this.getSuper("onReady")),0)},finishOnReady:function k(p){p();this.execActions()},exec:function b(p){this.askLoad();if(!("actions" in this)){this.actions=[]}this.actions.push(p);if(this.readyForAction){this.execActions()}},execActions:function m(){if("actions" in this&&this.actions.length){this.readyForAction=false;var q=10,p=this.actions.slice(0,q).reverse(),r=p.length;while(r--){p[r]()}this.actions=this.actions.slice(q);j.setTimeout(this.callback("execActions"),500)}else{this.readyForAction=true}},parse:function e(p,q){if(!this.noSonar){g(p).bind("scrollin",{distance:100},this.callback("sonarParse",p,q))}else{this.addToParseList(p,q)}},sonarParse:function a(p,q){g(p).unbind("scrollin");this.addToParseList(p,q)},addToParseList:function o(p,q){if(!("elemsToParse" in this)){this.elemsToParse=[]}if(this.elemsToParse.length===0&&!("parsingElems" in this)){j.setTimeout(this.callback("doParse"),200)}this.elemsToParse.push({elem:p,callback:q})},doParse:function d(){this.parsingElems=this.elemsToParse;this.elemsToParse=[];var p=this.parsingElems.length;while(p--){j.FB.XFBML.parse(this.parsingElems[p].elem,this.callback("onParseFinished",this.parsingElems[p].elem))}},onParseFinished:function f(r){var p=this.parsingElems.reverse().length;while(p--){if(this.parsingElems[p].elem===r){this.parsingElems[p].callback();var q=this.parsingElems.slice(p+1||this.length);this.parsingElems.length=p;this.parsingElems.push.apply(this.parsingElems,q);break}}if(this.parsingElems.length===0){delete this.parsingElems;if(this.elemsToParse.length){this.doParse()}else{if("execActions" in this&&this.readyForAction){this.execActions()}}}}})}(this,this.jQuery));(function(a,b){b.fn.FB_lienLike=function(e){e=b.extend({},b.fn.FB_lienLike.options,e);var d=this.length,c=0;function f(){if(++c>=d&&"onReady" in e){e.onReady()}}return this.each(function(){var g=this;a.framework.Facebook.exec(function(){b('<span class="FB_lienLike"><fb:like href="'+(e.url||g.href||a.document.location.href)+'" layout="'+e.layout+'" show_faces="'+(e.show_faces?"true":"false")+'" width="'+e.width+'" action="'+e.action+'" colorscheme="'+e.colorscheme+'" send="'+e.send+'" ></fb:like></span>').each(function(){switch(e.insertMode){case"append":b(this).appendTo(g);break;case"prepend":b(this).prependTo(g);break;case"before":b(this).insertBefore(g);break;default:b(this).insertAfter(g);break}a.framework.Facebook.parse(this,f)})})})};b.fn.FB_lienLike.options={layout:"button_count",width:"160",action:"like",show_faces:false,colorscheme:"light",send:false}}(this,this.jQuery));(function(g,j,n,e){g.fn.sonar=function(q,p){if(typeof q==="boolean"){p=q;q=e}return g.sonar(this[0],q,p)};var h=n.body,c=g(j),b="scrollin",o="scrollout",a=function(t,p,v){if(t){h||(h=n.body);var u=t,w=0,x=h.offsetHeight,q=j.innerHeight||n.documentElement.clientHeight||h.clientHeight||0,s=n.documentElement.scrollTop||j.pageYOffset||h.scrollTop||0,r=t.offsetHeight||0;if(!t.sonarElemTop||t.sonarBodyHeight!==x){if(u.offsetParent){do{w+=u.offsetTop}while(u=u.offsetParent)}t.sonarElemTop=w;t.sonarBodyHeight=x}p=p===e?0:p;return(!(t.sonarElemTop+(v?0:r)<s-p)&&!(t.sonarElemTop+(v?r:0)>s+q+p))}},f={},l=0,d,k=function(){d&&clearTimeout(d);d=setTimeout(function(){var u,q,v,s,r,t,p;for(v in f){q=f[v];for(t=0,p=q.length;t<p;t++){s=q[t];u=s.elem;r=a(u,s.px,s.full);if(v===o?!r:r){if(!s.tr){if(u[v]){g(u).trigger(v);s.tr=1}else{q.splice(t,1);t--;p--}}}else{s.tr=0}}}},0)},m=function(p,q){p[q]=0},i=function(u,r){var w=r.px,s=r.full,v=r.evt,t=j,q=a(u,w,s),p=0;u[v]=1;if(v===o?!q:q){setTimeout(function(){g(u).trigger(v===o?o:b)},0);p=1}f[v].push({elem:u,px:w,full:s,tr:p});if(!l){c.bind("scroll",k);l=1}};g.sonar=a;f[b]=[];g.event.special[b]={add:function(p){var r=p.data||{},q=this;if(!q[b]){i(this,{px:r.distance,full:r.full,evt:b})}},remove:function(p){m(this,b)}};f[o]=[];g.event.special[o]={add:function(p){var r=p.data||{},q=this;if(!q[o]){i(q,{px:r.distance,full:r.full,evt:o})}},remove:function(p){m(this,o)}}})(jQuery,window,document);
