if(typeof(ns_)=="undefined"){ns_=new Object()}ns_.extend=function(e,f){for(var d in f){e[d]=f[d]}return e};ns_.b={};ns_.b.ie=
/*@cc_on!@*/
false;ns_.b.sf=navigator.vendor?/apple/i.test(navigator.vendor):false;ns_.b.ff=/firefox/i.test(navigator.userAgent);ns_.b.op=window.opera?true:false;if(typeof(ns_)=="undefined"){ns_=new Object()}ns_.dt={initDate:new Date().getTime(),lastRun:new Date().getTime(),delta:0,intervalID:null,intervalTime:1000,intervalRuns:0,timedObserver:function(){var d=ns_.dt.getTime();ns_.dt.intervalID=setTimeout(ns_.dt.timedObserver,ns_.dt.intervalTime);ns_.dt.intervalRuns++;var c=d-ns_.dt.lastRun-ns_.dt.intervalTime;if(c>(ns_.dt.intervalTime*2)||c<-(ns_.dt.intervalTime*2)){ns_.dt.delta+=c;d-=c}ns_.dt.lastRun=d},getTime:function(){var b=new Date().getTime();return b-ns_.dt.delta}};ns_.dt.timedObserver();ns_.extend(Function.prototype,(function(){var n=Array.prototype.slice;function s(d,c){var a=d.length,b=c.length;while(b--){d[a+b]=c[b]}return d}function o(a,b){a=n.call(a,0);return s(a,b)}function k(){return this.STargumentIsSuper()?["$super"]:[""]}function l(){return/^[\s\(]*function[^(]*\(\s*\$super/.test(this.toString())}function m(a){if(arguments.length<2&&typeof arguments[0]=="undefined"){return this}var c=this,b=n.call(arguments,1);return function(){var d=o(b,arguments);return c.apply(a,d)}}function p(a){var b=this;return function(){var c=s([b.STbind(this)],arguments);return a.apply(this,c)}}function q(){var b=ns_.ar.create();var a=this;while(a){b.push(a.STsignature());a=a.caller}return b}function t(){var a={name:this.STgetName(),params:ns_.ar.create(),toString:function(){var c=this.params.length>0?"'"+this.params.join("', '")+"'":"";return this.name+"("+c+")"}};if(this.arguments){for(var b=0;b<this.arguments.length;b++){a.params.push(this.arguments[b])}}return a}function r(){if(this.name){return this.name}var b=this.toString().split("\n")[0];var a=/^function ([^\s(]+).+/;if(a.test(b)){return b.split("\n")[0].replace(a,"$1")||"anonymous"}return"anonymous"}return{STargumentNames:k,STargumentIsSuper:l,STbind:m,STwrap:p,STtrace:q,STsignature:t,STgetName:r}})());ns_.Class={extend:function(f,e){if(arguments.length==1){e=f,f=null}if(typeof(f)=="function"){var d=function(){return this.initialize.apply(this,arguments)};d.prototype=new f()}else{var d=function(){}}if(e){ns_.Class.inherit(d.prototype,e)}return d},inherit:function(n,f,l){if(arguments.length==3){var p=n[l],o=f[l],m=o;var j;if(n&&m.STargumentIsSuper()){o=(function(a){return function(){return a.apply(this,arguments)}})(p).STwrap(m)}else{o=function(){var a=this.parent;this.parent=p;var b=m.apply(this,arguments);a?this.parent=a:delete this.parent;return b}}o.valueOf=function(){return m};o.toString=function(){return m.toString()};n[l]=o}else{for(var k in f){if(n[k]&&typeof(f[k])=="function"){ns_.Class.inherit(n,f,k)}else{n[k]=f[k]}}}return n}};if(typeof(ns_.ar)=="undefined"){ns_.ar={push:(Array.prototype.push?Array.prototype.push:function(){for(var c=0,d=arguments.length;c<d;c++){this[this.length]=arguments[c]}}),splice:(Array.prototype.splice?Array.prototype.splice:function(){var i=ns_.ar.create(),o=arguments;if(o.length<=1){return i}else{if(o.length>2){for(var m=2,p=o.length;m<p;m++){i.push(o[m])}}}var a=this.slice(0,o[0]);var n=this.slice(o[0],o[0]+o[1]);var k=this.slice(o[0]+o[1]);var l=a.concat(i,k);this.length=0;for(var m=0,p=l.length;m<p;m++){this.push(l[m])}return n}),shift:(Array.prototype.shift?Array.prototype.shift:function(){for(var e=0,b=this[0],f=this.length-1;e<f;e++){this[e]=this[e+1]}this.length--;return b})}}ns_.ar.create=function(){var h=[];for(var f in h){delete h[f]}for(var g=0,e=arguments.length;g<e;g++){h[h.length]=arguments[g]}return h};ns_.ar.indexOf=function(g,h){if(typeof g!="undefined"){for(var e=0,f=g.length;e<f;e++){if(g[e]==h){return e}}}return -1};if(typeof(ns_.dom)=="undefined"){ns_.dom={cache:{},addEvent:(document.addEventListener)?(function(e,f,d){e.addEventListener(f,d,false);if(ns_.dom.cache){ns_.dom.cache.add(e,f,d,false)}return true}):(document.attachEvent)?(function(f,h,e){var g;if(typeof f.addEventListener!="undefined"){g=f.addEventListener(h,e)}else{h=(h.substring(0,1)==h.substring(0,1).toUpperCase()?h:"on"+h);g=f.attachEvent(h,e)}if(g&&ns_.dom.cache){ns_.dom.cache.add(f,h,e,false)}return g}):(function(h,e,f){if(document.layers&&h==document&&e.toLowerCase()=="click"){e="mouseup";h.captureEvents(Event.MOUSEUP)}var g=h["on"+e];if(typeof g!="function"){h["on"+e]=f}else{h["on"+e]=function(a){if(g){g(a)}f(a)}}if(ns_.dom.cache){ns_.dom.cache.add(h,e,f,false)}return true}),removeEvent:function(e,f,d){ns_.dom.cache.del(e,f,d)}}}ns_.dom.cache={_events:ns_.ar.create(),add:function(e,g,h,f){this._events.push(arguments)},del:function(j,h,i){var g;for(var f in this._events){g=this._events[f];if(!!!i&&g[0]==j&&g[1]==h){this.detach(g[0],g[1],g[2],g[3]);this._events.splice(f,1);return}else{if(!!i&&g[0]==j&&g[1]==h&&g[2]==i){this.detach(g[0],g[1],g[2],g[3]);this._events.splice(f,1);return}}}},detach:function(e,g,h,f){if(typeof e.removeEventListener!="undefined"){if(ns_.b.ie){e.removeEventListener(g,h)}else{e.removeEventListener(g,h,f)}}else{if(e.detachEvent){e.detachEvent(g,h)}}},flush:function(){var d;for(var c=this._events.length-1;c>=0;c=c-1){d=this._events[c];this.detach(d[0],d[1],d[2],d[3]);this._events.splice(c,1)}}};ns_.dom.addEvent(window,"unload",ns_.dom.cache.flush.STbind(ns_.dom.cache));ns_.Error={};ns_.Class.extend((function(){var t=ns_.ar.create();var o=false;function r(a){o=!!a}function s(b){var a=[new Date()];a=a.concat([("0"+a[0].getHours()).slice(-2),("0"+a[0].getMinutes()).slice(-2),("0"+a[0].getSeconds()).slice(-2),("00"+a[0].getMilliseconds()).slice(-3)]);b=s.caller[0]="["+a[1]+":"+a[2]+":"+a[3]+"."+a[4]+"] "+b;t.push(b);return true}function n(b){var a=t.slice(0);if(b){t=ns_.ar.create()}return a}function m(){var a=n();console.log(a.join("\n"))}function v(b){for(var c=0,a=arguments.length;c<a;c++){s(arguments[c])}l()}function u(b){for(var c=0,a=arguments.length;c<a;c++){s(arguments[c])}l()}function q(b){for(var c=0,a=arguments.length;c<a;c++){s(arguments[c])}l()}function p(b){for(var c=0,a=arguments.length;c<a;c++){s(arguments[c])}l();return false}function l(){if(o&&typeof(console)=="object"){if(console[l.caller.name]){console[l.caller.name](l.caller.arguments)}else{if(console.log){for(var b=0,a=l.caller.arguments.length;b<a;b++){console.log(l.caller.arguments[b])}}}}else{if(o){for(var b=0,a=l.caller.arguments.length;b<a;b++){alert(l.caller.arguments[b])}}}}ns_.Class.inherit(ns_.Error,{log:v,debug:v,info:u,warn:q,error:p,dumpLog:n,viewLog:m,setDebug:r})})());ns_.MediaEvents={STREAM_START:"onStart",STREAM_PAUSE:"onPause",STREAM_STOP:"onStop",STREAM_RESUME:"onResume",STREAM_METADATA:"onReceiveMetaData",STREAM_SEND_DATA:"onSendData",STREAM_CHANGE:"onChange",STREAM_ERROR:"onError",STREAM_LOADING:"onLoading",STREAM_LOADED:"onLoaded",STREAM_UNLOAD:"onUnload",STREAM_VOLUME:"onVolume",STREAM_SEEK:"onSeek",PLAYHEAD_UPDATE:"onPlayHeadUpdate"};ns_.MediaEvent=function(h){if(typeof(h)!="string"){return null}var f={type:h,target:null,created:ns_.dt.getTime(),_attributes:{playHeadPosition:0}};if(arguments.length>1){for(var i=1,g=arguments.length;i<g;i++){for(var j in arguments[i]){if(j=="target"){f[j]=arguments[i][j]}else{f._attributes[j]=arguments[i][j]}}}}return f};ns_.DispatcherEvents={STREAM_START:"stream:start",STREAM_PAUSE:"stream:pause",STREAM_STOP:"stream:stop",STREAM_RESUME:"stream:resume",STREAM_METADATA:"stream:metadata",STREAM_SEND_DATA:"stream:senddata",STREAM_CHANGE:"stream:change",STREAM_ERROR:"stream:error",STREAM_LOADING:"stream:loading",STREAM_LOADED:"stream:loaded",STREAM_UNLOAD:"stream:unload",STREAM_VOLUME:"stream:volume",STREAM_SEEK:"stream:change",PLAYHEAD_UPDATE:"stream:change",MEDIA_CHANGE:"media:change"};ns_.StreamSenseEvents={PLAYLIST_END:"ss:playlistend",SHUTDOWN:"ss:shutdown",PLAY:"ss:play",PAUSE:"ss:pause",END:"ss:end",KEEP_ALIVE:"ss:keep-alive",DISPATCH:"ss:dispatch",MEASURE:"ss:measure"};if(typeof(ns_.dict)=="undefined"){ns_.dict={}}ns_.dict.Labels=function(){return{measurementType:{name:"type",value:"hidden",prefix:false},measurementDate:{name:"_t"},scriptVersion:{name:"st_sv",value:null},urlContainer:{name:"jspageurl"},eventCounter:{name:"st_ec"},error:{name:"st_er",value:null},eventType:{name:"st_ev",value:null},indexOfClipInPlaylist:{name:"st_cn"},programTitle:{name:"st_pr"},episodeTitle:{name:"st_ep"},episodePart:{name:"st_pn"},episodeTotalLength:{name:"st_el"},productionDate:{name:"st_dt"},type:{name:"st_ty"},bitrate:{name:"st_br"},stationName:{name:"st_st"},length:{name:"st_cl"},bandwidth:{name:"st_ub"},buffering:{name:"st_bt"},playerType:{name:"st_mp"},playerVersion:{name:"st_mv"},fee:{name:"st_fee"},totalPlayedTimeOfClip:{name:"st_pt"},playSequenceOfClip:{name:"st_sq"},playHeadPosition:{name:"st_po"},pausesSequenceOfClip:{name:"st_pc"},resolution:{name:"st_cs"},volume:{name:"st_vo"},windowState:{name:"st_ws"},playlistTitle:{name:"st_pl"},episodeParts:{name:"st_tp"},playlistLengthOfClips:{name:"st_ca"},playlistBufferTimeOfClips:{name:"st_bp"},playlistTotalPlayedTimeOfClips:{name:"st_pa"},playlistId:{name:"st_id"},playlistSequence:{name:"st_sp"},playlistPausesOfClips:{name:"st_pp"},playlistFirstPlay:{name:"st_pb",value:1},playlistLastEnd:{name:"st_pe",value:1},playlistNumberOfClips:{name:"st_cp"}}};ns_.EventDispatcher=ns_.Class.extend({_chain:null,_events:null,buildChain:function(){if(!this._chain){this._chain=ns_.ar.create();if(this._events){for(var b in this._events){this._chain[b]=null}}}},listen:function(c,d){if(!d instanceof Function){throw {message:"Listener isn't a function"}}this.buildChain();if(!this._chain[c]){this._chain[c]=ns_.ar.create(d)}else{this._chain[c].push(d)}},listened:function(b){if(((typeof this._chain[b]=="undefined")||(this._chain[b]==null)||(this._chain[b].length<=0))){return false}else{return true}},unlisten:function(f,d){if(!this.listened(f)){return false}for(var e=0;e<this._chain[f].length;e++){if(this._chain[f][e]===d){this._chain[f].splice(e,1)}}},fire:function(g,h){this.buildChain();h=[{target:this,type:g}].concat(h);for(var e in this._events){if(e==g&&typeof(this[g])=="function"){if(this[g].apply(this,h)==false){return false}}}if(!this.listened(g)){return false}for(var e=0,f=this._chain[g].length;e<f;e++){if(this._chain[g][e].apply(this,h)==false){return false}}}});ns_.Component=ns_.Class.extend(ns_.EventDispatcher,{_streamsense:null,_attributes:null,_userdefined:null,initialize:function(b){this._attributes={};this._userdefined=ns_.ar.create();if(b){this._streamsense=b}else{this._streamsense=this}},set:function(f,d,e){if(!f||(ns_.ar.indexOf(this._userdefined,f)!=-1&&!!!e)){return false}else{if(e){if(ns_.ar.indexOf(this._userdefined,f)==-1){this._userdefined.push(f)}}}this._attributes[f]=d;return true},get:function(b){if(b&&typeof this._attributes[b]!="undefined"){return this._attributes[b]}else{return null}},setAttribute:function(c,d){return this.set(c,d,true)},setAttributes:function(c){for(var d in c){this.set(d,c[d],true)}},getAttribute:function(b){return this.get(b)},getAttributes:function(f){var e={};for(var d in f){e[d]=this.get(d)}return e},getAllAttributes:function(){var d={};for(var c in this._attributes){d[c]=this._attributes[c]}return d}});ns_.Dispatcher=ns_.Class.extend(ns_.Component,(function(){this._ssEventQueue;this.last;function p($super,a){$super(a);this._ssEventQueue=ns_.ar.create();this._events={"ss:play":null,"ss:pause":null,"ss:end":null,"ss:keep-alive":null,"ss:playlistend":null,"ss:dispatch":null,"ss:measure":null}}function r(a){if(!a){return false}this._ssEventQueue.push(a)}function m(c){var a=false;for(var d=0,b=this._ssEventQueue.length;d<b;d++){if(this._ssEventQueue[d]===c){a=this._ssEventQueue.splice(d,1)}}return a}function l(d,e){var a,b,f;var c=ns_.ar.indexOf(this._ssEventQueue,d);f=c>-1?this._ssEventQueue[c]:false;e=f?f.type:e;if(d&&f==d){if(c>0){a=this._ssEventQueue[ns_.ar.indexOf(this._ssEventQueue,d)-1]}b=this._ssEventQueue[ns_.ar.indexOf(this._ssEventQueue,d)+1]}else{f=d;a=this._ssEventQueue[this._ssEventQueue.length-1]}if(!a){a=this.last}try{if(e&&(a||e=="play")&&(!a||e!=a.type)&&(!a||!(e=="pause"&&a.type=="end"))&&(!a||!(e=="pause"&&a.type=="play"&&!a.sent))){return true}else{return false}}catch(g){return false}}function n(d,b){var c=false;var a=d.substring(d.indexOf(":")+1);if(this.semaphore(false,a)||b._attributes.forced){c=new ns_.Measurement(this._streamsense,a,b)}return c}function s(c,b){var a=this.dispatch(c.type,b);if(a){if(!b._attributes.forced){if(!b.target.isBuffering()&&this.semaphore(a,a.type)){a.send()}else{a.cancel()}}else{a.send(true)}}}function k(c,b){var a=this.dispatch(c.type,b);if(a){if(!b._attributes.forced){if(this.semaphore(a,a.type)){a.send()}else{a.cancel()}}else{a.send(true)}}}function t(c,b){var a=this.dispatch(c.type,b);if(a){if(!b._attributes.forced){if(this.semaphore(a,a.type)){a.send()}else{a.cancel()}}else{a.send(true)}}}function q(c,b){var a=this.dispatch(c.type,b);if(a){a.send()}}function o(b,a){this._streamsense.fire(ns_.StreamSenseEvents.DISPATCH,a)}return{"ss:play":s,"ss:pause":k,"ss:end":t,"ss:keep-alive":q,"ss:dispatch":o,semaphore:l,enqueue:r,dequeue:m,dispatch:n,initialize:p}})());ns_.MediaComponent=ns_.Class.extend(ns_.Component,{initialize:function($super,b){if(b){$super(b)}}});ns_.Measurement=ns_.Class.extend(ns_.Component,{type:"",date:0,prefix:"ns_",succeeded:true,sent:false,pixel:null,initialize:function($super,e,g,h){$super(e);this.labels=new ns_.dict.Labels();this.custom={};this.date=h.created;if(g&&typeof this.eventTypes[g]!="undefined"){this.type=this.labels.eventType.value=g;if(h&&h._attributes){for(var f in h._attributes){if(typeof this.labels[f]!="undefined"){this.labels[f].value=h._attributes[f]}}}this.measure()}this.labels.measurementDate.value=this.date;this.custom.ns_ts=this.date},labels:{},eventTypes:{play:{mandatory:["measurementDate","measurementType","scriptVersion","eventCounter","eventType","indexOfClipInPlaylist","episodeTitle","episodePart","buffering","playerType","playerVersion","playSequenceOfClip","playHeadPosition","episodeParts","playlistId","playlistSequence","bandwidth"],playlist:["playlistFirstPlay"],optionals:["programTitle","episodeTotalLength","productionDate","type","length","fee","resolution","bitrate","volume","windowState","playlistTitle","playlistLengthOfClips","error","stationName","urlContainer"]},pause:{mandatory:["measurementType","eventCounter","eventType","indexOfClipInPlaylist","episodeTitle","episodePart","episodeParts","playlistId","measurementDate"],optionals:["programTitle","episodeTotalLength","productionDate","playHeadPosition","volume","windowState","playlistTitle","stationName"]},end:{mandatory:["measurementDate","measurementType","scriptVersion","eventCounter","eventType","indexOfClipInPlaylist","episodeTitle","episodePart","length","buffering","playerType","playerVersion","playHeadPosition","pausesSequenceOfClip","totalPlayedTimeOfClip","volume","episodeParts","playlistId","playlistSequence","bandwidth"],playlist:["playlistBufferTimeOfClips","playlistTotalPlayedTimeOfClips","playlistPausesOfClips","playlistLastEnd","playlistLengthOfClips"],optionals:["programTitle","episodeTotalLength","productionDate","type","fee","resolution","windowState","playlistTitle","bitrate","stationName","error","urlContainer"]},"keep-alive":{mandatory:["measurementDate","measurementType","eventCounter","eventType","episodeTitle","playHeadPosition","playlistId"],optionals:["programTitle","playlistTitle"]}},bulkSet:function(c){for(var d in c){if(typeof this.labels[d]!="undefined"){this.labels[d].value=c[d]}else{this.custom[d]=c[d]}}},measure:function(){if(!!!this.type||!!!this.labels.eventType.value){return}this._streamsense.fire(ns_.StreamSenseEvents.MEASURE,this);this._streamsense._dispatcher.enqueue(this)},send:function(c){var d=this._streamsense._dispatcher.last?this._streamsense._dispatcher.last.type=="end":false;this._streamsense._dispatcher.last=this;if(((this.type=="end"&&this._streamsense._playlist._ended)||(d&&this.type=="play"))){if(!this._streamsense._shutdown){window.setTimeout(this.preprocessPlaylistLabels.STbind(this,this.getPixelURL(),c),this._streamsense.cfg.PLAYLIST_END_TIMER)}else{this.request(this.getPixelURL(),c)}}else{this.request(this.getPixelURL(),c)}this._streamsense._dispatcher.dequeue(this);this._streamsense._dispatcher.fire(ns_.StreamSenseEvents.DISPATCH,this)},preprocessPlaylistLabels:function(j,i){if(!(((this.type=="play"&&this._streamsense._playlist._sequence==1&&this._streamsense._playlist._eventCounter<=2))||(this.type=="end"&&this._streamsense._playlist._ended))){if(this.type=="play"){j=this.getPixelURL()}var h=this.eventTypes[this.type].playlist;for(var g in h){if(typeof this.labels[h[g]]!="undefined"){var f=[((typeof this.labels[h[g]].prefix=="undefined"||this.labels[h[g]].prefix)?this.prefix:""),this.labels[h[g]].name].join("");j=j.replace(new RegExp(f+"=[^&]*&","gi"),"")}}}this.request(j,i)},request:function(d,c){this.pixel=(ns_.b.ie)?new Image():(c&&this.type=="end"&&this._streamsense._shutdown&&this.labels.playlistLastEnd.value)?document.body.appendChild(document.createElement("img")):new Image();if(c&&!this._streamsense._shutdown){this.pixel.style.display="none"}if(!this._streamsense._shutdown){this.pixel.onload=(function(a){return function(h){if(!h){h=event;var b=this}else{var b=h.target}var g=a._streamsense;a.sent=true}})(this);this.pixel.onerror=this.pixel.onload}if(ns_.b.ie||!(this.type=="end"&&this._streamsense._shutdown)){this.pixel.src=d}else{document.write(["<h","tml><h","ead><me","ta http",'-equiv="refresh" content="0;url=',document.location.href,'"/></h',"ead>","<bo","dy><scr",'ipt>var date = "',this.date,'"; if ((new Date().getTime()-date) < 500){ var p = new Image(); p.src ="',d,'"}</scr',"ipt></b","ody></h","tml>"].join(""))}},cancel:function(){this.sent=false;this.succeeded=false;this._streamsense._dispatcher.dequeue(this)},serialize:function(){var p=ns_.ar.create();var n=this.eventTypes[this.type];for(var s in n){var i=n[s];if(s=="playlist"&&!((this.type=="play"&&!this._streamsense._playlist._started&&this._streamsense._playlist._sequence==1)||(this.type=="end"&&this._streamsense._playlist._ended))){continue}for(var o=0,q=i.length;o<q;o++){var m=this.labels[i[o]];var r=typeof(m.value);if((r=="undefined"||m.value==="")&&s=="optionals"){continue}else{if(r=="undefined"){m.value=this._streamsense.cfg.DEFAULT_VALUE_STR}}var t=[((typeof m.prefix=="undefined"||m.prefix)?this.prefix:""),m.name].join("");var l=r=="number"?Math.round(m.value*Math.pow(10,2))/Math.pow(10,2):m.value;p.push([t,"=",escape(typeof l=="string"?l:String(l))].join(""))}}for(var m in this.custom){var l=this.custom[m];if(l&&l!=""){p.push([m,"=",escape(l)].join(""))}}return p.join("&")},getPixelURL:function(){return[this._streamsense.getPixelURL(),"&",this.serialize()].join("")}});ns_.Playlist=ns_.Class.extend(ns_.Component,{isClipActive:function(b){if(!!b&&!!this._clip&&this._clip===b){return true}else{return false}},addNewClip:function(d){var c=new ns_.Clip(this._streamsense,this,!d);this.addClip(c,!d);return c},addClip:function(c,d){if(ns_.ar.indexOf(this._clips,c)==-1){this._clips.push(c);if(!c.get("episodeTitle")){this._indexes.push(c)}}if(!!d){this.setClip(c)}this.fire(ns_.DispatcherEvents.MEDIA_CHANGE,[this,c]);return this._clips.length},setClip:function(b){if(ns_.ar.indexOf(this._clips,b)==-1){this.addClip(b,false)}if(this._clip){this._clip.deactivate()}this._clip=b;this._clip.activate();return this._clip},getNativeClip:function(d){try{if(!d){return this._clip._nativeClip}else{return this.getPlaylist()._clips[d]._nativeClip}}catch(c){return null}},getBufferTimeOfClips:function(){for(var d=0,f=0,e=this._clips.length;f<e;f++){d+=Number(this._clips[f]._bufferingTime)}return d},getPausesOfClips:function(){for(var d=0,f=0,e=this._clips.length;f<e;f++){d+=Number(this._clips[f]._pauses)}return d},getTotalPlaybackTime:function(g){for(var e=0,h=0,f=this._clips.length;h<f;h++){if(this._clips[h]==this._clip){e+=Number(g.labels.totalPlayedTimeOfClip.value)}else{e+=Number(this._clips[h]._playbackTime)}}return e},getTotalLength:function(){for(var d=0,f=0,e=this._clips.length;f<e;f++){d+=Number(this._clips[f].get("length"))}return d},buildEpisode:function(){var j=ns_.ar.create();var h=this._clip.get("programTitle");var i=this._clip.get("episodeTitle");if(h&&i){for(var f=0,g=this._clips.length;f<g;f++){if(this._clips[f].get("programTitle")==h&&this._clips[f].get("episodeTitle")==i){j.push(this._clips[f])}}}if(!j.length){j.push(this._clip)}return j},getEpisodeTotalLength:function(){var i=0;if(!!this._clip.get("episodeTotalLength")){return this._clip.get("episodeTotalLength")}else{var h=this.buildEpisode();for(var j=0,f=h.length;j<f;j++){var g=Number(h[j].get("length"));i=i+g}}return i},getEpisodePart:function(){var d=this.buildEpisode();var c=ns_.ar.indexOf(d,this._clip);if(c==-1){return 1}return c+1},getEpisodeParts:function(){var b=this.buildEpisode();return b.length},getClipIndex:function(){var b=ns_.ar.indexOf(this._indexes,this._clip);if(b==-1){return 1}return b+1},getNumberOfClips:function(){return this._clips.length},getID:function(){return ns_.dt.getTime()+"_"+this._index},initialize:function($super,c,d){$super(c);this._events={"media:change":null,"ss:dispatch":null,"ss:measure":null,onReceiveMetaData:null};this._index=++this._streamsense._playlistCount;this._id=this.getID();this._clip=null;this._clips=ns_.ar.create();this._started=false;this._sequence=1;this._eventCounter=1;this._pauses=0;this._ended=false;this._indexes=ns_.ar.create();this["onReceiveMetaData_cb"]=this["onReceiveMetaData"].STbind(this);this["onStreamChange_cb"]=this["stream:change"].STbind(this);this["onMeasure_cb"]=this["ss:measure"].STbind(this);this["onDispatch_cb"]=this["ss:dispatch"].STbind(this);if(d){this.activate()}},reset:function(){this._started=false;this._pauses=0;this._sequence=1;this._ended=false;this._id=this.getID();this._eventCounter=1;for(var c=0,d=this._clips.length;c<d;c++){this._clips[c].reset()}},loop:function(){this._sequence++},activate:function(){this._streamsense.listen("ss:measure",this["onMeasure_cb"]);this._streamsense.listen("ss:dispatch",this["onDispatch_cb"])},deactivate:function(){this._streamsense.unlisten("ss:measure",this["onMeasure_cb"]);this._streamsense.unlisten("ss:dispatch",this["onDispatch_cb"])},listenClip:function(b){b.listen("onReceiveMetaData",this["onReceiveMetaData_cb"])},unlistenClip:function(b){b.unlisten("onReceiveMetaData",this["onReceiveMetaData_cb"])},onReceiveMetaData:function(e,f){for(var d in f._attributes){switch(d){case"playlistTitle":this.set(d,f._attributes[d]);break}}},"stream:change":function(d,c){this._ended=false},"media:change":function(d,e,f){this._ended=false;this.listenClip(f)},"ss:measure":function(d,c){this.set("playlistLengthOfClips",this.getTotalLength());this.set("indexOfClipInPlaylist",ns_.ar.indexOf(this._clips,this._clip)+1);this.set("playlistBufferTimeOfClips",this.getBufferTimeOfClips());this.set("playlistPausesOfClips",this.getPausesOfClips());this.set("playlistTotalPlayedTimeOfClips",this.getTotalPlaybackTime(c));this.set("playlistSequence",this._sequence);this.set("episodeTitle",this.getClipIndex());this.set("episodeParts",this.getEpisodeParts());this.set("episodePart",this.getEpisodePart());if(this.get("episodeParts")>1){this.set("episodeTotalLength",this.getEpisodeTotalLength())}if(!!this.get("playlistTitle")&&this.get("playlistTitle")!=""){this.set("programTitle",this.get("playlistTitle"))}this.set("playlistFirstPlay",1);this.set("playlistLastEnd",1);this.set("playlistId",this._id);this.set("eventCounter",this._eventCounter);c.bulkSet(this.getAllAttributes())},"ss:dispatch":function(d,c){this._eventCounter++;switch(c.type){case"play":this._started=true;break;case"pause":this._pauses++;break;case"end":window.setTimeout((function(){if(this._ended){this.reset()}}).STbind(this),this._streamsense.cfg.PLAYLIST_END_TIMER);break}}});ns_.Clip=ns_.Class.extend(ns_.Component,{_nativeClip:null,reset:function(){this._bufferingStart=this._bufferingTime=this._playbackStartPos=this._playbackStartTime=this._playbackTime=0;this._starts=this._pauses=0;this._states={isPlaying:false,isBuffering:false,isSeeking:false,isStopped:false,isPaused:false}},setPlaylistIndex:function(b){this._playlistIndex=Number(b)},initialize:function($super,g,f,h){if(g){$super(g)}this._events={};for(var e in ns_.MediaEvents){this._events[ns_.MediaEvents[e]]=null}this._events.onBufferStart=null;this._events.onBufferEnd=null;this._playlist=f;this.listen(ns_.MediaEvents.STREAM_CHANGE,this._playlist.onStreamChange_cb);this.reset();this._states={isPlaying:false,isBuffering:false,isSeeking:false,isStopped:false,isPaused:false};if(!!h){this.activate()}},activate:function(){this.deactivate();if(!this.onMeasure_cb){this.onMeasure_cb=this.onMeasure.STbind(this)}this._streamsense.listen(ns_.StreamSenseEvents.MEASURE,this.onMeasure_cb);if(!this.onDispatch_cb){this.onDispatch_cb=this.onDispatch.STbind(this)}this._streamsense.listen(ns_.StreamSenseEvents.DISPATCH,this.onDispatch_cb);this.fire(ns_.MediaEvents.STREAM_CHANGE,this)},deactivate:function(){if(!this._playlist.isClipActive(this)){return}this._streamsense.unlisten(ns_.StreamSenseEvents.MEASURE,this.onMeasure_cb);this._streamsense.unlisten(ns_.StreamSenseEvents.DISPATCH,this.onDispatch_cb)},isPlaying:function(){return this._states.isPlaying&&this._playlist.isClipActive(this)},isBuffering:function(){return this._states.isBuffering&&this._playlist.isClipActive(this)},isStopped:function(){return this._states.isStopped},isPaused:function(){return this._states.isPaused&&this._playlist.isClipActive(this)},onStart:function(d,c){this.reset();if(c._attributes.length>0){this.set("length",c._attributes.length)}this._streamsense.fire(ns_.DispatcherEvents.STREAM_START,c)},onPause:function(d,c){c._attributes.totalPlayedTimeOfClip=this._playbackTime+(c.created-this._playbackStartTime);this._streamsense.fire(ns_.DispatcherEvents.STREAM_PAUSE,c)},onResume:function(d,c){this._streamsense.fire(ns_.DispatcherEvents.STREAM_RESUME,c)},onBufferStart:function(d,c){this._states.isBuffering=true;this._bufferingStart=c.created},onBufferEnd:function(d,c){this._states.isBuffering=false;if(c.created<this._bufferingStart){this._bufferingTime+=this._bufferingStart-c.created}else{this._bufferingTime+=c.created-this._bufferingStart}},onStop:function(d,c){this._streamsense._playlist._ended=true;if(this._streamsense._dispatcher.last&&this._streamsense._dispatcher.last.type=="play"){c._attributes.totalPlayedTimeOfClip=this._playbackTime+(c.created-this._playbackStartTime)}else{c._attributes.totalPlayedTimeOfClip=this._playbackTime}this._streamsense.fire(ns_.DispatcherEvents.STREAM_STOP,c)},onSeek:function(d,c){this._states.isSeeking=true;if((typeof c._attributes.seekStart!="undefined")&&(typeof c._attributes.seekEnd!="undefined")){c._attributes.playHeadPosition=c._attributes.seekStart;if(this.isPlaying()){this.fire(ns_.MediaEvents.STREAM_PAUSE,c);c._attributes.playHeadPosition=c._attributes.seekEnd;c.created=ns_.dt.getTime();this.fire(ns_.MediaEvents.STREAM_RESUME,c)}}this._states.isSeeking=false},onReceiveMetaData:function(e,f){for(var d in f._attributes){switch(d){case"length":this.set(d,f._attributes[d]);break}}},onError:function(d,c){this._streamsense.fire(ns_.DispatcherEvents.STREAM_ERROR,c)},onMeasure:function(d,c){this.set("playSequenceOfClip",this._starts+1);this.set("pausesSequenceOfClip",this._pauses);this.set("buffering",this._bufferingTime);c.bulkSet(this.getAllAttributes());if(Number(c.labels.totalPlayedTimeOfClip.value)>0){this._playbackTime=Number(c.labels.totalPlayedTimeOfClip.value)}},onDispatch:function(d,c){switch(c.type){case"play":this._playbackStartTime=c.date;this._playbackStartPos=c.labels.playHeadPosition.value;this._states.isPlaying=true;this._states.isPaused=false;this._states.isStopped=false;this._starts++;break;case"pause":this._states.isPlaying=false;this._states.isPaused=true;this._states.isStopped=false;this._playbackStartTime=c.date;this._playbackStartPos=c.labels.playHeadPosition.value;this._pauses++;this._playbackTime=Number(c.labels.totalPlayedTimeOfClip.value);break}}});if(typeof(ns_)=="undefined"){ns_=new Object()}if(typeof(ns_.dt)=="undefined"){ns_.dt={getTime:function(){return new Date().getTime()}}}if(typeof(ns_.cookie)=="undefined"){ns_.cookie={}}ns_.cookie.create=function(p,m,o,k,n,l){if(o){var i=new Date();if(typeof(o)=="number"){i.setTime(ns_.dt.getTime()+(o*1000))}else{if(o.getTime){i.setTime(o.getTime())}}var j="; expires="+i.toGMTString()}else{var j=""}document.cookie=[p,"=",m,j,"; path=",k?k:"/",n?"; domain="+n:"",l?"; secure":""].join("")};ns_.cookie.read=function(c){var i=c+"=";var g=document.cookie.split(";");for(var j=0;j<g.length;j++){var h=g[j];while(h.charAt(0)==" "){h=h.substring(1,h.length)}if(h.indexOf(i)==0){return h.substring(i.length,h.length)}}return null};ns_.cookie.erase=function(b){ns_.cookie.create(b,"",-1)};if(typeof(ns_)=="undefined"){ns_=new Object()}if(typeof(ns_.Loader)=="undefined"){ns_.Loader={config:{}}}ns_.Loader.setup=function(c){for(var d in c){switch(d){case"type":case"attributes":ns_.Loader.config[d]=c[d]}}};ns_.Loader.load=function(h){try{var j=document.getElementsByTagName("HEAD").item(0);var g=document.createElement("SCRIPT");g.type=ns_.Loader.config.type||"text/javascript";g.src=h;if(ns_.Loader.config.attributes){for(var e in ns_.Loader.config.attributes){g.setAttribute(e,ns_.Loader.config.attributes[e])}}j.appendChild(g)}catch(i){}};ns_.Loader.loadFromScriptSource=function(o,l){if(!l||!o||!document.getElementsByTagName){return}var s=new RegExp(o+"(?:\\.min)?\\.js(?:\\?.*"+l+"=([^&]*))+","i");var i=document.getElementsByTagName("SCRIPT");for(var m=0,q=i.length;m<q;m++){if(s.test(i[m].src)){var t=i[m].src.match(s)[1].split(",");var j=i[m].src.replace(s,"");for(var p=0,r=t.length;p<r;p++){ns_.Loader.load(j+t[p]+(/\.min\./i.test(i[m].src)?".min.js":".js"))}}}};ns_.Loader.loadFromScriptSource("streamsense","load");ns_.StreamSense=ns_.Class.extend(ns_.Component,(function(){var V={TIMER_DELAY:500,KEEP_ALIVE_DELAY:20*60*1000,DEFAULT_ERROR_STR:"STREAMSENSE_ERROR_UNKNOWN",DEFAULT_VALUE_STR:"%STATICTEXT_UNKNOWN%",DEBUG:false,PLAYLIST_END_TIMER:500,LOAD_COMPONENTS:ns_.ar.create()};var ab="4.0.1";var D=0;var S=ns_.ar.create();this._shutdown;this._counterName;this._errors;this._bounces;this._events;this._dispatcher;this._player;this._playlist;this.MediaComps;this._instanceIndex;this._playlistCount;this._keepAliveTimer;function af($super,a,d,b){$super(null);this._shutdown=false;b=b||{};for(var c in this.cfg){b[c]=(typeof(b[c])!="undefined")?b[c]:this.cfg[c]}this.cfg=b;this._errors=ns_.ar.create();ns_.Error.setDebug(this.cfg.DEBUG);this._bounces=ns_.ar.create();this._events={};for(var c in ns_.DispatcherEvents){this._events[ns_.DispatcherEvents[c]]=null}for(var c in ns_.StreamSenseEvents){this._events[ns_.StreamSenseEvents[c]]=null}this.labels=new ns_.dict.Labels();D++;S.push(this);this._instanceIndex=D;this._playlistCount=0;if(!!d){this.setPixelURL(d)}this._dispatcher=new ns_.Dispatcher(this);if(this.cfg.LOAD_COMPONENTS.length>0){for(var c=0,e=this.cfg.LOAD_COMPONENTS.length;c<e;c++){this.registerMediaComponent(this.cfg.LOAD_COMPONENTS[c])}}if(ns_.b.ff){window.setTimeout(function(f,g){return function(){f.setPlayer(g)}}(this,a),this.cfg.TIMER_DELAY/2)}else{W.call(this,a)}ns_.dom.addEvent(window,"beforeunload",this.shutdown.STbind(this));ns_.dom.addEvent(window,"unload",this.shutdown.STbind(this))}function E(a){if(!!a){if(a.indexOf("?")==-1){a+="?video"}else{if(a.indexOf("?")==(a.length-1)){a+="video"}}return this._counterName=a}}function Q(){if(!!this._counterName){return this._counterName}else{if(window.ns_pixelUrl){return this.setPixelURL(window.ns_pixelUrl.replace(/&amp;/,"&").replace(/&ns__t=\d+/,""))}else{return this.setPixelURL(document.location.href.replace(/#.*/,""))}}}function W(a){if(this._player&&this._player.deactivate){this._player.deactivate()}ns_.Error.dumpLog(true);if(typeof(a)=="string"){a=document.getElementById(a)}this._player=G.call(this,a);if(!this._player){return ns_.Error.info("StreamSense.setPlayer: unable to set player ["+typeof(a)+"] = "+a)}}function O(){if(this._player){return this._player}else{return false}}function M(a){if(this._playlist){this._playlist.deactivate()}if(!a){return this._playlist=new ns_.Playlist(this,true)}else{return this._playlist=a}}function F(){if(!this._playlist){return this.setPlaylist()}else{return this._playlist}}function ad(a){if(!a){return this.getPlaylist().addNewClip()}else{return this.getPlaylist().addClip(a,true)}}function J(a){if(!a){return this.getPlaylist().addNewClip(true)}else{return this.getPlaylist().addClip(a)}}function X(){if(this.getPlaylist()._clip){return this.getPlaylist()._clip}else{return this.setClip()}}function Z(b,a,c){if(this.getPlayer()&&this.getPlayer()._nativeLabels){this.getPlayer()._nativeLabels.push(b);this.getPlayer()._realLabels.push(a)}return this.setAttribute(a,c)}function I(){return D}function H(){return this._instanceIndex}function K(a){if(typeof this.MediaComps=="undefined"){this.MediaComps=ns_.ar.create()}var d=true;for(var b=0,c=this.MediaComps.length;b<c;b++){if(this.MediaComps[b].prototype.isEligible===a.prototype.isEligible){this.MediaComps[b].prototype.deactivate();d=this.MediaComps[b]=a}}if(!a||!d){return ns_.Error.info("registerMediaComponent got a wrong reference: ["+typeof(a)+"] = "+a)}this.MediaComps.push(a);this.MediaComps[a.prototype.getNickname()]=a}function G(a){if(typeof this.MediaComps=="undefined"){return setTimeout((function(d,e){return function(){d.setPlayer.call(d,e)}})(this,a),500)}for(var b=0,c=this.MediaComps.length;b<c;b++){if(this.MediaComps[b].prototype.isEligible(a)){return new this.MediaComps[b](this,a)}}}function ae(b,a){this._dispatcher.fire(ns_.StreamSenseEvents.PLAY,a)}function ac(b,a){this._dispatcher.fire(ns_.StreamSenseEvents.PAUSE,a)}function U(b,a){this._dispatcher.fire(ns_.StreamSenseEvents.PLAY,a)}function Y(b,a){this._dispatcher.fire(ns_.StreamSenseEvents.END,a)}function aa(c,b){if(b.text){var a=/;/.test(b.text)?b.text.replace(/;/g,escape(";")):b.text;this._errors.push((a||a=="")?a:this.cfg.DEFAULT_ERROR_STR)}}function T(b,a){this.set("scriptVersion",[ab,"; ",this._player.getNickname()," ",this._player._VERSION].join(""));this.set("error",this._errors.join(";"));this.set("urlContainer",document.location.href);a.bulkSet(this.getAllAttributes())}function P(b,a){this._errors=ns_.ar.create();switch(a.type){case"play":case"keep-alive":this._keepAliveTimer=window.setTimeout((function(c){return function(){var d=c._player.snapshot();d.forced=true;c._dispatcher.fire("ss:keep-alive",new ns_.MediaEvent("keep-alive",d))}})(this),this.cfg.KEEP_ALIVE_DELAY);break;case"pause":case"end":window.clearTimeout(this._keepAliveTimer);this._keepAliveTimer=null;break}}function N(d,e){try{if(this._dispatcher.last&&this._dispatcher.last.type!="end"){var c=this.getPlayer().snapshot();c.forced=true;var a=new ns_.MediaEvent(ns_.MediaEvents.STREAM_STOP,c);this.getClip().fire(ns_.MediaEvents.STREAM_STOP,a)}this.getClip().deactivate();this.getPlaylist().deactivate();this.getPlayer().deactivate()}catch(b){}}function L(a){if(!this._shutdown){this._shutdown=true;this.fire(ns_.StreamSenseEvents.SHUTDOWN,a)}}function R(c){if(typeof c=="undefined"){c=0}for(var a=0,b=S.length;a<b;a++){if(S[a]._instanceIndex==c+1){return S[a]}}return this.prototype}return{registerMediaComponent:K,"stream:start":ae,"stream:pause":ac,"stream:resume":U,"stream:stop":Y,"stream:error":aa,"ss:measure":T,"ss:dispatch":P,"ss:shutdown":N,shutdown:L,initialize:af,setPixelURL:E,getPixelURL:Q,setPlayer:W,getPlayer:O,setPlaylist:M,getPlaylist:F,getClip:X,setClip:ad,setAttributeASX:Z,getCount:I,getIndex:H,getStreamSense:R,cfg:V}})());ns_.StreamSense.getStreamSense=ns_.StreamSense.prototype.getStreamSense;if(typeof(ns_)=="undefined"){ns_=new Object()}ns_.WMPMediaComponent=ns_.Class.extend(ns_.MediaComponent,{_VERSION:"0.1.0",_nickName:"wmp",_clip:null,_wmptypes:["video","audio","radio"],_player:null,_playlist:null,_indexes:null,_events:{},_nativeLabels:["date","station","streamtype","part","totalparts","episode","program","fee"],_realLabels:["productionDate","stationName","type","episodePart","episodeParts","episodeTitle","programTitle","fee"],_wasBuffering:false,_wasTransitioning:false,_playheadCache:{time:ns_.dt.getTime(),position:0,interval:0,jitter:0},_playheadUpdate:function(){this._playheadCache.interval=window.setTimeout(this._playheadUpdate,this._streamsense.cfg.WMP_PHEAD_TIMER);var h=this.getPosition();if(!!!h&&h!=0){return}var f=ns_.dt.getTime();var g=this._streamsense.cfg.WMP_PHEAD_TIMER;var i=(h-this._playheadCache.position)>(g-(g*0.5));var j=((h-this._playheadCache.position)>(g*2)||(h-this._playheadCache.position)<-(g*2));if(this.getClip().isPlaying()&&(!i&&!j)){this._playheadCache.jitter++}else{if(this.getClip().isPaused()&&i){this._clip.fire("onResume",new ns_.MediaEvent("onResume",this.snapshot()))}else{this._playheadCache.jitter=0}}if(this._playheadCache.jitter>3||(h>1000&&j)){this._clip.fire("onPause",new ns_.MediaEvent("onPause",this.snapshot()));this._playheadCache.jitter=0}this._playheadCache.time=f;if(h>0){this._playheadCache.position=h}},_listeners:{PlayStateChange:function(c){switch(c){case 1:case 9:this._wasTransitioning=true;case 10:if(!this._wasTransitioning){break}case 8:var d=this.snapshot();clearTimeout(this._playheadCache.interval);this._playheadCache.interval=null;this.getClip().fire(ns_.MediaEvents.STREAM_STOP,new ns_.MediaEvent(ns_.MediaEvents.STREAM_STOP,d));break;case 2:var d=this.snapshot();clearTimeout(this._playheadCache.interval);this._playheadCache.interval=null;this.getClip().fire(ns_.MediaEvents.STREAM_PAUSE,new ns_.MediaEvent(ns_.MediaEvents.STREAM_PAUSE,d));break;case 3:var d=this.snapshot();if(this.getClip().isPaused()){this.getClip().fire(ns_.MediaEvents.STREAM_RESUME,new ns_.MediaEvent(ns_.MediaEvents.STREAM_RESUME,d));this._playheadCache.position=this.getPosition();if(!!!this._playheadCache.interval){this._playheadCache.interval=window.setTimeout(this._playheadUpdate,this._streamsense.cfg.WMP_PHEAD_TIMER)}}else{if(this._wasTransitioning){this.monitorClip();this._wasTransitioning=false}if(!this.getClip().isPlaying()){this.getClip().fire(ns_.MediaEvents.STREAM_START,new ns_.MediaEvent(ns_.MediaEvents.STREAM_START,d));this._playheadCache.position=this.getPosition();if(!!!this._playheadCache.interval){this._playheadCache.interval=window.setTimeout(this._playheadUpdate,this._streamsense.cfg.WMP_PHEAD_TIMER)}}}break}if(c!=6){this._wasBuffering=false}else{this._wasBuffering=true}},PositionChange:function(d,f){var e=this.snapshot();e.seekStart=Math.floor(Math.round(Number(d)*1000));e.seekEnd=Math.floor(Math.round(Number(f)*1000));clearTimeout(this._playheadCache.interval);this.getClip().fire(ns_.MediaEvents.STREAM_SEEK,new ns_.MediaEvent(ns_.MediaEvents.STREAM_SEEK,e));this._playheadCache.position=e.seekEnd;this._playheadCache.interval=window.setTimeout(this._playheadUpdate,this._streamsense.cfg.WMP_PHEAD_TIMER)},Buffering:function(c){var d=this.snapshot();if(c){this.getClip().fire("onBufferStart",new ns_.MediaEvent("onBufferStart",d));clearTimeout(this._playheadCache.interval);this._playheadCache.interval=null;this.getClip().fire("onPause",new ns_.MediaEvent("onPause",d))}else{this.getClip().fire("onBufferEnd",new ns_.MediaEvent("onBufferEnd",d));this._playheadCache.position=this.getPosition();if(!!!this._playheadCache.interval){this._playheadCache.interval=window.setTimeout(this._playheadUpdate,this._streamsense.cfg.WMP_PHEAD_TIMER)}this.getClip().fire("onResume",new ns_.MediaEvent("onResume",d))}},PlaylistChange:function(e,g){switch(g){case 1:break;case 2:if(this._clip){var h=this.snapshot()}else{var h={}}if(e.name){h.playlistTitle=e.name}var f=this.getLength();if(f>0){h.length=f}if(this._clip){this.getClip().fire("onReceiveMetaData",new ns_.MediaEvent("onReceiveMetaData",h))}else{this.getPlaylist().fire("onReceiveMetaData",new ns_.MediaEvent("onReceiveMetaData",h))}this.populatePlaylist();break}},Error:function(k){var g=this.snapshot();var j=this.getClip();var h=this._player.object.error.errorCount;for(var l=0;l<h;l++){var i=[this._player.object.error.item(l).errorDescription," [",this._player.object.error.item(l).errorCode,"]"].join("");j.fire("onError",new ns_.MediaEvent("onError",{text:i,snapshot:g}))}this._player.object.error.clearErrorQueue()},CurrentItemChange:function(){var b=this.getIndex(this._player.currentMedia.getItemInfo("sourceURL"));if(this._wasTransitioning&&(ns_.ar.indexOf(b,0)==-1||(this._player.object.settings.playCount!=0&&this.getPlaylist()._sequence<=this._player.object.settings.playCount&&(ns_.ar.indexOf(this.getPlaylist()._clips,this._clip)<(this.getPlaylist()._clips.length-1)||(this.getPlaylist()._clips.length==1&&this._player.object.settings.playCount>1))))){if(this.getPlaylist()._started&&ns_.ar.indexOf(b,0)!=-1){this.getPlaylist().loop()}this.getPlaylist()._ended=false}if(ns_.ar.indexOf(this._wmptypes,this._player.object.currentMedia.getItemInfo("MediaType"))>=0){this.monitorClip()}},MediaChange:function(d){try{this.populatePlaylist()}catch(c){}}},fulfillOldAttributes:function(k,j){for(var m=0,i=this._nativeLabels.length;m<i;m++){var l=k.getItemInfo(this._nativeLabels[m]);if(!!l&&l!=""){j.setAttribute(this._realLabels[m],l)}}if(k.getItemInfo("custom")){var h,n=k.getItemInfo("custom").replace(/&amp;/g,"&").split("&");for(var m=0,i=n.length;m<i;m++){h=n[m].split("=");if(String(h[0]).length>1&&String(h[1]).length>0){j.setAttribute(h[0],h[1])}}}},populatePlaylist:function(){try{var g=this._player.object.currentPlaylist.count;for(var e=0;e<g;e++){var h=this._player.object.currentPlaylist.item(e);if((ns_.ar.indexOf(this._wmptypes,h.getItemInfo("MediaType"))<0)&&(e<1)){continue}if(e<this.getPlaylist()._clips.length){var j=this.getPlaylist()._clips[e]}else{var j=new ns_.Clip(this._streamsense,this.getPlaylist(),false)}this.setIndex(e,h.getItemInfo("sourceURL"));this.fulfillOldAttributes(this._player.object.currentPlaylist,j);this.fulfillOldAttributes(h,j);if(j!==this.getPlaylist()._clips[e]){this.getPlaylist().addClip(j,false)}}}catch(i){}},initialize:function($super,f,d){$super(f);this._indexes=ns_.ar.create();this.listeners={};for(var e in this._listeners){this.listeners[e]=this._listeners[e].STbind(this)}this._playheadUpdate=this._playheadUpdate.STbind(this);for(var e in ns_.DispatcherEvents){this._events[ns_.DispatcherEvents[e]]=null}this._streamsense.cfg.WMP_PHEAD_TIMER=250;this._streamsense.registerMediaComponent(ns_.WMPMediaComponent);if(d){this.activate(d)}},activate:function(b){this._player=b;this._streamsense.registerMediaComponent(ns_.WMPMediaComponent);this.bindEvents();if(!this["onMeasure_cb"]){this["onMeasure_cb"]=this.onMeasure.STbind(this)}this._streamsense.listen("ss:measure",this["onMeasure_cb"]);if(!this["onMediaChange_cb"]){this["onMediaChange_cb"]=this.onMediaChange.STbind(this)}this.getPlaylist().listen(ns_.DispatcherEvents.MEDIA_CHANGE,this["onMediaChange_cb"]);this.setIndex(0,this.getItemInfo("sourceURL"))},deactivate:function(){if(!this._player){return false}this.unbindEvents();this._streamsense.unlisten("ss:measure",this["onMeasure_cb"]);this.getPlaylist().unlisten(ns_.DispatcherEvents.MEDIA_CHANGE,this["onMediaChange_cb"])},bindEvents:function(){for(var b in this.listeners){ns_.dom.addEvent(this._player,b,this.listeners[b])}},unbindEvents:function(){for(var b in this.listeners){ns_.dom.removeEvent(this._player,b)}},listenClip:function(){if(!this._clip){return false}var c;for(var d in ns_.MediaEvents){c=ns_.MediaEvents[d];if(typeof this[c]!="undefined"&&typeof this[c].STbind!="undefined"){if(!this[c+"_cb"]){this[c+"_cb"]=this[c].STbind(this)}this._clip.listen(c,this[c+"_cb"])}}},unlistenClip:function(){if(!this._clip){return false}var c;for(var d in ns_.MediaEvents){c=ns_.MediaEvents[d];if(typeof this[c]!="undefined"&&typeof this[c].STbind!="undefined"){this._clip.unlisten(c,this[c+"_cb"])}}},getNickname:function(){return this._nickName},monitorClip:function(){try{var r=this._clip;var i=ns_.ar.indexOf(this.getPlaylist()._clips,this._clip);var n=this._player.object.controls.currentItem;var p;var e=this.getPlaylist();if(!r){var o=ns_.ar.indexOf(e._clips,r)+1;if(e._clips[o]){this.setClip(e._clips[o])}else{this.setClip()}}else{var m=this.getIndex(this.getItemInfo("sourceURL"));var p;for(var q=m.length-1;q>=0;q--){if(typeof m[q]=="number"){p=m[q];break}}if(typeof p!="undefined"&&p!=i){this.setClip(e._clips[p])}}}catch(l){}return this._clip},setIndex:function(){var j=ns_.ar.create();for(var h=arguments.length-1;h>=0;h--){if(arguments[h]===""||typeof arguments[h]=="boolean"||typeof arguments[h]=="undefined"){continue}if(ns_.ar.indexOf(j,arguments[h])==-1){j.push(arguments[h])}var g=this.getIndex(arguments[h]);for(var f=g.length-1;f>=0;f--){if(ns_.ar.indexOf(j,g[f])==-1){j.push(g[f])}}}for(var i=j.length-1;i>=0;i--){this._indexes[j[i]]=j}},getIndex:function(f){var e=ns_.ar.create();for(var d=this._indexes.length-1;d>=0;d--){if(ns_.ar.indexOf(this._indexes[d],f)>=0){return this._indexes[d]}}return e},setClip:function(c){if(typeof c=="undefined"){c=this.getPlaylist().addNewClip(true)}if(this._clip){if(this._clip==c){return}clearTimeout(this._playheadCache.interval);this._playheadCache.interval=null;var d=this.snapshot();d.playHeadPosition=this._playheadCache.position;if(this._clip.isPlaying()||this._clip.isPaused()){this._clip.fire("onStop",new ns_.MediaEvent("onStop",d))}this.unlistenClip()}this.getPlaylist().setClip(c);this._clip=c;this.listenClip()},getClip:function(){if(!!this._clip){return this._clip}else{return this.monitorClip()}},setPlaylist:function(){return this._streamsense.setPlaylist()},getPlaylist:function(){return this._streamsense.getPlaylist()},isPlaying:function(){var d=false;try{switch(this._player.object.playState){case 3:d=true;break}}catch(c){}return d},isPaused:function(){var d=false;try{switch(this._player.object.playState){case 2:case 6:d=true;break}}catch(c){}return d},isEligible:function(d){try{if(!ns_.b.ie){return false}d.controls.currentPosition;d.controls.currentItem.duration;d.settings.volume}catch(c){return false}return true},snapshot:function(){var d={};d.target=this.getClip();d.playHeadPosition=this.getPosition();if(this.getLength()>0){d.length=this.getLength()}d.volume=this.getVolume();try{d.playState=this._player.object.playState;d.openState=this._player.object.openState}catch(c){}if(d.playHeadPosition==0&&(d.playState==1||d.playState==8)){if(d.length-d.playHeadPosition<=this._streamsense.cfg.WMP_PHEAD_TIMER&&d.length-d.playHeadPosition>=-(this._streamsense.cfg.WMP_PHEAD_TIMER)){d.playHeadPosition=d.length}else{d.playHeadPosition=this._playheadCache.position}}return d},isLooping:function(){var d=null;try{d=this._player.object.settings.getMode("loop")}catch(c){}return d},getPosition:function(){var d=null;try{d=Math.floor(Math.round(this._player.object.controls.currentPosition*1000))}catch(c){}return d},getLength:function(){var d=null;try{d=Math.floor(Math.round(this._player.object.controls.currentItem.duration*1000))}catch(c){}return d},getVolume:function(){var d=null;try{if(!this._player.object.settings.mute){d=Math.floor(Math.round(this._player.object.settings.volume))}else{d=0}}catch(c){}return d},getPlaylistName:function(){var d="";try{d=this._player.object.currentPlaylist.name}catch(c){}return d},getPlayerVersion:function(){var d="";try{d=this._player.object.versionInfo}catch(c){}return d},getBandWidth:function(){var d="";try{d=this._player.object.network.bandWidth}catch(c){}return d},getResolution:function(){var d="";try{d=[this._player.object.currentMedia.imageSourceWidth,"x",this._player.object.currentMedia.imageSourceHeight].join("")}catch(c){}return d},getItemInfo:function(f){var e="";if(f&&f!=""){try{e=this._player.object.currentMedia.getItemInfo(f)}catch(d){}}return e},onStart:function(d,c){this.setIndex(ns_.ar.indexOf(this.getPlaylist()._clips,this._clip),this.getItemInfo("sourceURL"))},onMeasure:function(d,c){this.setAttribute("bitrate",this.getItemInfo("bitrate"));this.setAttribute("playerType","MediaPlayer");this.setAttribute("playerVersion",this.getPlayerVersion());this.setAttribute("bandwidth",this.getBandWidth());this.setAttribute("resolution",this.getResolution());this.fulfillOldAttributes(this._player.object.currentPlaylist,this);this.fulfillOldAttributes(this,this._clip);c.bulkSet(this.getAllAttributes());if(c.type=="play"&&this._streamsense._dispatcher.last&&this._streamsense._dispatcher.last.type=="pause"&&c.labels.playHeadPosition.value==0){c.labels.playHeadPosition.value=this._streamsense._dispatcher.last.labels.playHeadPosition.value}},onMediaChange:function(d,e,f){this._playheadCache.position=0;this.monitorClip()}});(function(){if(typeof(ns_)!="undefined"&&typeof(ns_.StreamSense)!="undefined"){ns_.StreamSense.getStreamSense().registerMediaComponent(ns_.WMPMediaComponent)}else{setTimeout(arguments.callee,500)}})();if(typeof(ns_)=="undefined"){ns_=new Object()}ns_.WMPOCXMediaComponent=ns_.Class.extend(ns_.MediaComponent,{_VERSION:"0.0.9",_nickName:"wmp6.4-ocx",_clip:null,_wmptypes:["video","audio","radio"],_player:null,_playlist:null,_indexes:null,_events:{},_nativeLabels:["date","station","streamtype","part","totalparts","episode","program","fee","playlistTitle"],_realLabels:["productionDate","stationName","type","episodePart","episodeParts","episodeTitle","programTitle","fee","playlistTitle"],_populated:false,_wasBuffering:false,_playheadCache:{time:ns_.dt.getTime(),position:0,interval:0,jitter:0},_playheadUpdate:function(){this._playheadCache.interval=window.setTimeout(this._playheadUpdate,this._streamsense.cfg.WMP_PHEAD_TIMER);var j=this.getPosition();if(!!!j&&j!=0){return}var n=ns_.dt.getTime();var h=this._streamsense.cfg.WMP_PHEAD_TIMER;var m=((j-this._playheadCache.position)<(h-(h*0.25)));var k=((j-this._playheadCache.position)<0);var l=((j-this._playheadCache.position)>(h*2));if(l||k){var i=this.snapshot();i.seekStart=this._playheadCache.position;i.seekEnd=j;clearTimeout(this._playheadCache.interval);this.getClip().fire(ns_.MediaEvents.STREAM_SEEK,new ns_.MediaEvent(ns_.MediaEvents.STREAM_SEEK,i));this._playheadCache.position=i.seekEnd;this._playheadCache.interval=window.setTimeout(this._playheadUpdate,this._streamsense.cfg.WMP_PHEAD_TIMER)}if(this.getClip().isPlaying()&&m){this._playheadCache.jitter++}else{if(this.getClip().isPaused()&&!m){var i=this.snapshot();this.snapshot.created=this.snapshot.created-this._streamsense.cfg.WMP_PHEAD_TIMER;this.snapshot.playHeadPosition=this.snapshot.playHeadPosition-this._streamsense.cfg.WMP_PHEAD_TIMER;this._clip.fire("onResume",new ns_.MediaEvent("onResume",this.snapshot()))}else{if(!m){this._playheadCache.jitter=0}}}this._playheadCache.time=n;if(j>0){this._playheadCache.position=j}if(this._playheadCache.jitter>3){this._clip.fire("onPause",new ns_.MediaEvent("onPause",this.snapshot()));this._playheadCache.jitter=0}},_listeners:{PlayStateChange:function(d,f){this.monitorClip();switch(f){case 0:case 8:var e=this.snapshot();clearTimeout(this._playheadCache.interval);this._playheadCache.interval=null;this.getClip().fire(ns_.MediaEvents.STREAM_STOP,new ns_.MediaEvent(ns_.MediaEvents.STREAM_STOP,e));break;case 1:var e=this.snapshot();clearTimeout(this._playheadCache.interval);this._playheadCache.interval=null;this.getClip().fire(ns_.MediaEvents.STREAM_PAUSE,new ns_.MediaEvent(ns_.MediaEvents.STREAM_PAUSE,e));break;case 2:if(!this.isPlaying()){return}var e=this.snapshot();if(this.getClip().isPaused()){this.getClip().fire(ns_.MediaEvents.STREAM_RESUME,new ns_.MediaEvent(ns_.MediaEvents.STREAM_RESUME,e));this._playheadCache.position=this.getPosition();if(!!!this._playheadCache.interval){this._playheadCache.interval=window.setTimeout(this._playheadUpdate,this._streamsense.cfg.WMP_PHEAD_TIMER)}}else{window.setTimeout((function(){if(!this.getClip().isPlaying()){this.getClip().fire(ns_.MediaEvents.STREAM_START,new ns_.MediaEvent(ns_.MediaEvents.STREAM_START,e));this._playheadCache.position=this.getPosition();if(!!!this._playheadCache.interval){this._playheadCache.interval=window.setTimeout(this._playheadUpdate,this._streamsense.cfg.WMP_PHEAD_TIMER)}}}).STbind(this),this._streamsense.cfg.WMP_PHEAD_TIMER)}break}if(f!=6){this._wasBuffering=false}else{this._wasBuffering=true}},Buffering:function(f){var d=this.snapshot();if(f){this.getClip().fire("onBufferStart",new ns_.MediaEvent("onBufferStart",d));clearTimeout(this._playheadCache.interval);this._playheadCache.interval=null;d.playHeadPosition=this._playheadCache.position;this.getClip().fire("onPause",new ns_.MediaEvent("onPause",d))}else{this.getClip().fire("onBufferEnd",new ns_.MediaEvent("onBufferEnd",d));this._playheadCache.position=this.getPosition();if(!!!this._playheadCache.interval){this._playheadCache.interval=window.setTimeout(this._playheadUpdate,this._streamsense.cfg.WMP_PHEAD_TIMER)}var e=this.getClip().isPaused()?"onResume":"onStart";this.getClip().fire(e,new ns_.MediaEvent(e,d))}},OpenStateChange:function(b){switch(b){case 5:case 6:this.monitorClip();break}if(b==6&&!this._populated){this.populatePlaylist()}},Error:function(){var e=this.snapshot();var d=this.getClip();var f=[this._player.object.ErrorDescription," [",this._player.object.ErrorCode,"]"].join("");d.fire("onError",new ns_.MediaEvent("onError",{text:f,snapshot:e}))}},fulfillOldAttributes:function(k,j){for(var m=0,i=this._nativeLabels.length;m<i;m++){var l=this.getItemInfo(this._nativeLabels[m]);if(!!l&&l!=""){j.setAttribute(this._realLabels[m],l)}}if(k.getItemInfo("custom")){var h,n=k.getItemInfo("custom").replace(/&amp;/g,"&").split("&");for(var m=0,i=n.length;m<i;m++){h=n[m].split("=");if(String(h[0]).length>1&&String(h[1]).length>0){j.setAttribute(h[0],h[1])}}}},populatePlaylist:function(){try{for(var e=0,f=this._player.object.EntryCount;e<f;e++){if(this.getPlaylist()._clips.length<f){var h=new ns_.Clip(this._streamsense,this.getPlaylist(),false)}this.fulfillOldAttributes(this._player.object,h);if(this.getPlaylist()._clips.length<f){this.getPlaylist().addClip(h,false)}}this._populated=true}catch(g){}},initialize:function($super,f,d){$super(f);this._indexes=ns_.ar.create();d.object.SendPlayStateChangeEvents=true;this.listeners={};for(var e in this._listeners){this.listeners[e]=this._listeners[e].STbind(this)}this._playheadUpdate=this._playheadUpdate.STbind(this);for(var e in ns_.DispatcherEvents){this._events[ns_.DispatcherEvents[e]]=null}this._streamsense.cfg.WMP_PHEAD_TIMER=250;this._streamsense.registerMediaComponent(ns_.WMPOCXMediaComponent);if(d){this.activate(d)}},activate:function(b){this._player=b;this._streamsense.registerMediaComponent(ns_.WMPOCXMediaComponent);this.bindEvents();if(!this["onMeasure_cb"]){this["onMeasure_cb"]=this.onMeasure.STbind(this)}this._streamsense.listen("ss:measure",this["onMeasure_cb"]);if(!this["onMediaChange_cb"]){this["onMediaChange_cb"]=this.onMediaChange.STbind(this)}this.getPlaylist().listen(ns_.DispatcherEvents.MEDIA_CHANGE,this["onMediaChange_cb"])},deactivate:function(){if(!this._player){return false}this.unbindEvents();this._streamsense.unlisten("ss:measure",this["onMeasure_cb"]);this.getPlaylist().unlisten(ns_.DispatcherEvents.MEDIA_CHANGE,this["onMediaChange_cb"])},bindEvents:function(){if(!ns_.b.ie||this._streamsense.cfg.DEBUG){var g="";if(ns_.b.ie){g+="Nedstat StreamSense event declaration should be: \n\n"}for(var h in this._listeners){var e=this._listeners[h].STargumentNames();var f=e.join(",")!=","?e.join(","):"\n";g+=["<SCRIPT EVENT='",h,"(",f,")","' FOR='",this._player.getAttribute("id"),"'>","\n"].join("");g+="// <[CDATA[\n";g+=["ns_.StreamSense.getStreamSense(",this._streamsense._instanceIndex-1,")._player._listeners['",h,"'].call(ns_.StreamSense.getStreamSense(",this._streamsense._instanceIndex-1,")._player",f!=""?", ":"",f,");\n"].join("");g+="// ]]>\n";g+="</SCRIPT>\n";g+="\n"}if(ns_.b.ie){ns_.Error.info(g)}else{document.body.innerHTML+=["\n<div id='container",this.getPlaylist()._id,"'>",g,"</div>"].join("\n")}}},unbindEvents:function(){},listenClip:function(){if(!this._clip){return false}var c;for(var d in ns_.MediaEvents){c=ns_.MediaEvents[d];if(typeof this[c]!="undefined"&&typeof this[c].STbind!="undefined"){if(!this[c+"_cb"]){this[c+"_cb"]=this[c].STbind(this)}this._clip.listen(c,this[c+"_cb"])}}},unlistenClip:function(){if(!this._clip){return false}var c;for(var d in ns_.MediaEvents){c=ns_.MediaEvents[d];if(typeof this[c]!="undefined"&&typeof this[c].STbind!="undefined"){this._clip.unlisten(c,this[c+"_cb"])}}},getNickname:function(){return this._nickName},monitorClip:function(){try{var m=this._clip;var e=ns_.ar.indexOf(this.getPlaylist()._clips,this._clip);var j=this._player.object.currentMedia;var n=this._player.object.GetCurrentEntry()-1;var k=this.getPlaylist();if(!m){var i=ns_.ar.indexOf(k._clips,m)+1;if(k._clips[i]){this.setClip(k._clips[i])}else{this.setClip()}}else{if(typeof n=="undefined"||n<0||(typeof n!="undefined"&&n>=0&&n!=e)){if(typeof n!="undefined"&&n>=0){this.setClip(k._clips[n])}else{if(n!=-1){this.setClip()}}}}}catch(l){}return this._clip},setIndex:function(){var j=ns_.ar.create();for(var h=arguments.length-1;h>=0;h--){if(arguments[h]===""||typeof arguments[h]=="boolean"||typeof arguments[h]=="undefined"){continue}if(ns_.ar.indexOf(j,arguments[h])==-1){j.push(arguments[h])}var g=this.getIndex(arguments[h]);for(var f=g.length-1;f>=0;f--){if(ns_.ar.indexOf(j,g[f])==-1){j.push(g[f])}}}for(var i=j.length-1;i>=0;i--){this._indexes[j[i]]=j}},getIndex:function(f){var e=ns_.ar.create();for(var d=this._indexes.length-1;d>=0;d--){if(ns_.ar.indexOf(this._indexes[d],f)>=0){return this._indexes[d]}}return e},setClip:function(c){if(typeof c=="undefined"){c=this.getPlaylist().addNewClip(true)}if(this._clip){if(this._clip==c){return}clearTimeout(this._playheadCache.interval);this._playheadCache.interval=null;var d=this.snapshot();d.playHeadPosition=this._playheadCache.position;if(this._clip.isPlaying()||this._clip.isPaused()){this._clip.fire("onStop",new ns_.MediaEvent("onStop",d))}this.unlistenClip()}this.getPlaylist().setClip(c);this._clip=c;this.listenClip()},getClip:function(){if(!!this._clip){return this._clip}else{return this.monitorClip()}},setPlaylist:function(){return this._streamsense.setPlaylist()},getPlaylist:function(){return this._streamsense.getPlaylist()},isPlaying:function(){var d=false;try{switch(this._player.object.PlayState){case 2:d=true;break}}catch(c){}return d},isPaused:function(){var d=false;try{switch(this._player.object.PlayState){case 1:d=true;break}}catch(c){}return d},isEligible:function(d){try{d.object.CurrentPosition;d.object.Duration;d.object.Volume;if(d.object.currentPlaylist){return false}}catch(c){return false}return true},snapshot:function(){var d={};d.target=this.getClip();d.playHeadPosition=this.getPosition();if(this.getLength()>0){d.length=this.getLength()}d.volume=this.getVolume();try{d.playState=this._player.object.PlayState;d.openState=this._player.object.OpenState}catch(c){}if(d.playHeadPosition==0&&(d.playState==0)){if(d.length-d.playHeadPosition<=this._streamsense.cfg.WMP_PHEAD_TIMER&&d.length-d.playHeadPosition>=-(this._streamsense.cfg.WMP_PHEAD_TIMER)){d.playHeadPosition=d.length}else{d.playHeadPosition=this._playheadCache.position}}return d},getPosition:function(){var d=null;try{d=Math.floor(Math.round(this._player.object.CurrentPosition*1000))}catch(c){}return d},getLength:function(){var d=null;try{d=Math.floor(Math.round(this._player.object.Duration*1000))}catch(c){}return d},getVolume:function(){var d=null;try{if(!this._player.object.Mute){d=Math.floor(Math.round(-((100*(this._player.object.Volume))/(-10000))+100))}else{d=0}}catch(c){}return d},getPlaylistName:function(){var d="";try{d=this._player.object.getMediaParameter(this._player.object.getCurrentEntry(),"playlistTitle")}catch(c){}return d},getPlayerVersion:function(){return this.getNickname()},getBandWidth:function(){var d="";try{d=this._player.object.Bandwidth}catch(c){}return d},getResolution:function(){var d="";try{d=[this._player.object.ImageSourceWidth,"x",this._player.object.ImageSourceHeight].join("")}catch(c){}return d},getItemInfo:function(f){var e="";if(f&&f!=""){try{e=this._player.object.currentMedia.getMediaParameter(this._player.object.getCurrentEntry(),f)}catch(d){}}return e},onStart:function(d,c){this.setIndex(ns_.ar.indexOf(this.getPlaylist()._clips,this._clip),this._player.object.getCurrentEntry()-1)},onMeasure:function(d,c){this.setAttribute("bitrate",this.getItemInfo("bitrate"));this.setAttribute("playerType","MediaPlayer");this.setAttribute("playerVersion",this.getPlayerVersion());this.setAttribute("bandwidth",this.getBandWidth());this.setAttribute("resolution",this.getResolution());this.fulfillOldAttributes(this,this._clip);c.bulkSet(this.getAllAttributes());if(c.type=="play"&&this._streamsense._dispatcher.last&&this._streamsense._dispatcher.last.type=="pause"&&c.labels.playHeadPosition.value==0){c.labels.playHeadPosition.value=this._streamsense._dispatcher.last.labels.playHeadPosition.value}},onMediaChange:function(d,e,f){this._playheadCache.position=0;this.monitorClip()}});(function(){if(typeof(ns_)!="undefined"&&typeof(ns_.StreamSense)!="undefined"){ns_.StreamSense.getStreamSense().registerMediaComponent(ns_.WMPOCXMediaComponent)}else{setTimeout(arguments.callee,500)}})();if(typeof(ns_)=="undefined"){ns_=new Object()}ns_.FirefoxPort25MediaComponent=ns_.Class.extend(ns_.MediaComponent,{_VERSION:"0.1.0",_nickName:"wmpp25",_clip:null,_wmptypes:["video","audio","radio"],_player:null,_playlist:null,_indexes:null,_events:{},_nativeLabels:["date","station","streamtype","part","totalparts","episode","program","fee"],_realLabels:["productionDate","stationName","type","episodePart","episodeParts","episodeTitle","programTitle","fee"],_wasBuffering:false,_wasTransitioning:false,_playheadCache:{time:ns_.dt.getTime(),position:0,interval:0,jitter:0},_playheadUpdate:function(){this._playheadCache.interval=window.setTimeout(this._playheadUpdate,this._streamsense.cfg.WMP_PHEAD_TIMER);var h=this.getPosition();if(!!!h&&h!=0&&this._playheadUpdate.position==0){return}var f=ns_.dt.getTime();var g=this._streamsense.cfg.WMP_PHEAD_TIMER;var i=(h-this._playheadCache.position)>(g-(g*0.5));var j=((h-this._playheadCache.position)>(g*2)||(h-this._playheadCache.position)<-(g*2));if(this.getClip().isPlaying()&&(!i&&!j)){this._playheadCache.jitter++}else{if(this.getClip().isPaused()&&i){this._clip.fire("onResume",new ns_.MediaEvent("onResume",this.snapshot()))}else{this._playheadCache.jitter=0}}if(this._playheadCache.jitter>3||(h>1000&&j)){this._clip.fire("onPause",new ns_.MediaEvent("onPause",this.snapshot()));this._playheadCache.jitter=0}this._playheadCache.time=f;if(h>0){this._playheadCache.position=h}},_listeners:{PlayStateChange:function(c){switch(c){case 1:case 9:this._wasTransitioning=true;case 10:if(!this._wasTransitioning){break}case 8:var d=this.snapshot();clearTimeout(this._playheadCache.interval);this._playheadCache.interval=null;this.getClip().fire(ns_.MediaEvents.STREAM_STOP,new ns_.MediaEvent(ns_.MediaEvents.STREAM_STOP,d));break;case 2:var d=this.snapshot();clearTimeout(this._playheadCache.interval);this._playheadCache.interval=null;this.getClip().fire(ns_.MediaEvents.STREAM_PAUSE,new ns_.MediaEvent(ns_.MediaEvents.STREAM_PAUSE,d));break;case 3:var d=this.snapshot();if(this.getClip().isPaused()){this.getClip().fire(ns_.MediaEvents.STREAM_RESUME,new ns_.MediaEvent(ns_.MediaEvents.STREAM_RESUME,d));this._playheadCache.position=this.getPosition();if(!!!this._playheadCache.interval){this._playheadCache.interval=window.setTimeout(this._playheadUpdate,this._streamsense.cfg.WMP_PHEAD_TIMER)}}else{if(this._wasTransitioning){this.monitorClip();this._wasTransitioning=false}if(!this.getClip().isPlaying()){this.getClip().fire(ns_.MediaEvents.STREAM_START,new ns_.MediaEvent(ns_.MediaEvents.STREAM_START,d));this._playheadCache.position=this.getPosition();if(!!!this._playheadCache.interval){this._playheadCache.interval=window.setTimeout(this._playheadUpdate,this._streamsense.cfg.WMP_PHEAD_TIMER)}}}break}if(c!=6){this._wasBuffering=false}else{this._wasBuffering=true}},PositionChange:function(d,f){var e=this.snapshot();e.seekStart=Math.floor(Math.round(Number(d)*1000));e.seekEnd=Math.floor(Math.round(Number(f)*1000));clearTimeout(this._playheadCache.interval);this.getClip().fire(ns_.MediaEvents.STREAM_SEEK,new ns_.MediaEvent(ns_.MediaEvents.STREAM_SEEK,e));this._playheadCache.position=e.seekEnd;this._playheadCache.interval=window.setTimeout(this._playheadUpdate,this._streamsense.cfg.WMP_PHEAD_TIMER)},Buffering:function(c){var d=this.snapshot();if(c){this.getClip().fire("onBufferStart",new ns_.MediaEvent("onBufferStart",d));clearTimeout(this._playheadCache.interval);this._playheadCache.interval=null;this.getClip().fire("onPause",new ns_.MediaEvent("onPause",d))}else{this.getClip().fire("onBufferEnd",new ns_.MediaEvent("onBufferEnd",d));this._playheadCache.position=this.getPosition();if(!!!this._playheadCache.interval){this._playheadCache.interval=window.setTimeout(this._playheadUpdate,this._streamsense.cfg.WMP_PHEAD_TIMER)}this.getClip().fire("onResume",new ns_.MediaEvent("onResume",d))}},PlaylistChange:function(e,g){switch(g){case 1:break;case 2:if(this._clip){var h=this.snapshot()}else{var h={}}if(e.name){h.playlistTitle=e.name}var f=this.getLength();if(f>0){h.length=f}if(this._clip){this.getClip().fire("onReceiveMetaData",new ns_.MediaEvent("onReceiveMetaData",h))}else{this.getPlaylist().fire("onReceiveMetaData",new ns_.MediaEvent("onReceiveMetaData",h))}this.populatePlaylist();break}},Error:function(k){var g=this.snapshot();var j=this.getClip();var h=this._player.error.errorCount;for(var l=0;l<h;l++){var i=[this._player.error.item(l).errorDescription," [",this._player.error.item(l).errorCode,"]"].join("");j.fire("onError",new ns_.MediaEvent("onError",{text:i,snapshot:g}))}this._player.error.clearErrorQueue()},CurrentItemChange:function(){var b=this.getIndex(this._player.currentMedia.getItemInfo("sourceURL"));if(this._wasTransitioning&&(ns_.ar.indexOf(b,0)==-1||(this._player.settings.playCount!=0&&this.getPlaylist()._sequence<=this._player.settings.playCount&&(ns_.ar.indexOf(this.getPlaylist()._clips,this._clip)<(this.getPlaylist()._clips.length-1)||(this.getPlaylist()._clips.length==1&&this._player.settings.playCount>1))))){if(this.getPlaylist()._started&&ns_.ar.indexOf(b,0)!=-1){this.getPlaylist().loop()}this.getPlaylist()._ended=false}if(ns_.ar.indexOf(this._wmptypes,this._player.currentMedia.getItemInfo("MediaType"))>=0){this.monitorClip()}},MediaChange:function(d){try{this.populatePlaylist()}catch(c){}}},fulfillOldAttributes:function(k,j){for(var m=0,i=this._nativeLabels.length;m<i;m++){var l=k.getItemInfo(this._nativeLabels[m]);if(!!l&&l!=""){j.setAttribute(this._realLabels[m],l)}}if(k.getItemInfo("custom")){var h,n=k.getItemInfo("custom").replace(/&amp;/g,"&").split("&");for(var m=0,i=n.length;m<i;m++){h=n[m].split("=");if(String(h[0]).length>1&&String(h[1]).length>0){j.setAttribute(h[0],h[1])}}}},populatePlaylist:function(){try{var g=this._player.currentPlaylist.count;for(var e=0;e<g;e++){var h=this._player.currentPlaylist.item(e);if((ns_.ar.indexOf(this._wmptypes,h.getItemInfo("MediaType"))<0)&&(e<1)){continue}if(e<this.getPlaylist()._clips.length){var j=this.getPlaylist()._clips[e]}else{var j=new ns_.Clip(this._streamsense,this.getPlaylist(),false)}this.setIndex(e,h.getItemInfo("sourceURL"));this.fulfillOldAttributes(this._player.currentPlaylist,j);this.fulfillOldAttributes(h,j);if(j!==this.getPlaylist()._clips[e]){this.getPlaylist().addClip(j,false)}}}catch(i){}},initialize:function($super,f,d){$super(f);this._indexes=ns_.ar.create();this.listeners={};for(var e in this._listeners){this.listeners[e]=this._listeners[e].STbind(this)}this._playheadUpdate=this._playheadUpdate.STbind(this);for(var e in ns_.DispatcherEvents){this._events[ns_.DispatcherEvents[e]]=null}this._streamsense.cfg.WMP_PHEAD_TIMER=500;this._streamsense.registerMediaComponent(ns_.FirefoxPort25MediaComponent);if(d){this.activate(d)}},activate:function(b){this._player=b;this._streamsense.registerMediaComponent(ns_.FirefoxPort25MediaComponent);this.bindEvents();if(!this["onMeasure_cb"]){this["onMeasure_cb"]=this.onMeasure.STbind(this)}this._streamsense.listen("ss:measure",this["onMeasure_cb"]);if(!this["onDispatch_cb"]){this["onDispatch_cb"]=this.onDispatch.STbind(this)}this._streamsense.listen("ss:dispatch",this["onDispatch_cb"]);if(!this["onMediaChange_cb"]){this["onMediaChange_cb"]=this.onMediaChange.STbind(this)}this.getPlaylist().listen(ns_.DispatcherEvents.MEDIA_CHANGE,this["onMediaChange_cb"]);this.setIndex(0,this.getItemInfo("sourceURL"))},deactivate:function(){if(!this._player){return false}this.unbindEvents();this._streamsense.unlisten("ss:measure",this["onMeasure_cb"]);this._streamsense.unlisten("ss:dispatch",this["onDispatch_cb"]);this.getPlaylist().unlisten(ns_.DispatcherEvents.MEDIA_CHANGE,this["onMediaChange_cb"])},bindEvents:function(){for(var b in this.listeners){window["OnDS"+b+"Evt"]=this.listeners[b]}},unbindEvents:function(){for(var b in this.listeners){window["OnDS"+b+"Evt"]=null}},listenClip:function(){if(!this._clip){return false}var c;for(var d in ns_.MediaEvents){c=ns_.MediaEvents[d];if(typeof this[c]!="undefined"&&typeof this[c].STbind!="undefined"){if(!this[c+"_cb"]){this[c+"_cb"]=this[c].STbind(this)}this._clip.listen(c,this[c+"_cb"])}}},unlistenClip:function(){if(!this._clip){return false}var c;for(var d in ns_.MediaEvents){c=ns_.MediaEvents[d];if(typeof this[c]!="undefined"&&typeof this[c].STbind!="undefined"){this._clip.unlisten(c,this[c+"_cb"])}}},getNickname:function(){return this._nickName},monitorClip:function(){try{var r=this._clip;var i=ns_.ar.indexOf(this.getPlaylist()._clips,this._clip);var n=this._player.controls.currentItem;var p;var e=this.getPlaylist();if(!r){var o=ns_.ar.indexOf(e._clips,r)+1;if(e._clips[o]){this.setClip(e._clips[o])}else{this.setClip()}}else{var m=this.getIndex(this.getItemInfo("sourceURL"));var p;for(var q=m.length-1;q>=0;q--){if(typeof m[q]=="number"){p=m[q];break}}if(typeof p=="undefined"||(typeof p!="undefined"&&p!=i)){if(typeof p!="undefined"){this.setClip(e._clips[p])}else{this.setClip()}}}}catch(l){}return this._clip},setIndex:function(){var j=ns_.ar.create();for(var h=arguments.length-1;h>=0;h--){if(arguments[h]===""||typeof arguments[h]=="boolean"||typeof arguments[h]=="undefined"){continue}if(ns_.ar.indexOf(j,arguments[h])==-1){j.push(arguments[h])}var g=this.getIndex(arguments[h]);for(var f=g.length-1;f>=0;f--){if(ns_.ar.indexOf(j,g[f])==-1){j.push(g[f])}}}for(var i=j.length-1;i>=0;i--){this._indexes[j[i]]=j}},getIndex:function(f){var e=ns_.ar.create();for(var d=this._indexes.length-1;d>=0;d--){if(ns_.ar.indexOf(this._indexes[d],f)>=0){return this._indexes[d]}}return e},setClip:function(c){if(typeof c=="undefined"){c=this.getPlaylist().addNewClip(true)}if(this._clip){clearTimeout(this._playheadCache.interval);this._playheadCache.interval=null;var d=this.snapshot();d.playHeadPosition=this._playheadCache.position;if(this._clip.isPlaying()||this._clip.isPaused()){this._clip.fire("onStop",new ns_.MediaEvent("onStop",d))}this.unlistenClip()}this.getPlaylist().setClip(c);this._clip=c;this.listenClip()},getClip:function(){if(!!this._clip){return this._clip}else{return this.monitorClip()}},setPlaylist:function(){return this._streamsense.setPlaylist()},getPlaylist:function(){return this._streamsense.getPlaylist()},isPlaying:function(){var d=false;try{switch(this._player.playState){case 3:d=true;break}}catch(c){}return d},isPaused:function(){var d=false;try{switch(this._player.playState){case 2:case 6:d=true;break}}catch(c){}return d},isEligible:function(d){try{if(ns_.b.ie){return false}d.controls.currentPosition;d.controls.currentItem.duration;d.settings.volume}catch(c){return false}return true},snapshot:function(){var d={};d.target=this.getClip();d.playHeadPosition=this.getPosition();if(this.getLength()>0){d.length=this.getLength()}d.volume=this.getVolume();try{d.playState=this._player.playState;d.openState=this._player.openState}catch(c){}if(d.playHeadPosition==0&&(d.playState==1||d.playState==8)){if(d.length-d.playHeadPosition<=this._streamsense.cfg.WMP_PHEAD_TIMER&&d.length-d.playHeadPosition>=-(this._streamsense.cfg.WMP_PHEAD_TIMER)){d.playHeadPosition=d.length}else{d.playHeadPosition=this._playheadCache.position}}return d},getPosition:function(){var d=null;try{d=Math.floor(Math.round(this._player.controls.currentPosition*1000))}catch(c){}return d},getLength:function(){var d=null;try{d=Math.floor(Math.round(this._player.controls.currentItem.duration*1000))}catch(c){}return d},getVolume:function(){var d=null;try{if(!this._player.settings.mute){d=Math.floor(Math.round(this._player.settings.volume))}else{d=0}}catch(c){}return d},getPlaylistName:function(){var d="";try{d=this._player.currentPlaylist.name}catch(c){}return d},getPlayerVersion:function(){var d="";try{d=this._player.versionInfo}catch(c){}return d},getBandWidth:function(){var d="";try{d=this._player.network.bandWidth}catch(c){}return d},getResolution:function(){var d="";try{d=[this._player.currentMedia.imageSourceWidth,"x",this._player.currentMedia.imageSourceHeight].join("")}catch(c){}return d},getItemInfo:function(f){var e="";if(f&&f!=""){try{e=this._player.currentMedia.getItemInfo(f)}catch(d){}}return e},onMeasure:function(d,c){this.setAttribute("bitrate",this.getItemInfo("bitrate"));this.setAttribute("playerType","MediaPlayer");this.setAttribute("playerVersion",this.getPlayerVersion());this.setAttribute("bandwidth",this.getBandWidth());this.setAttribute("resolution",this.getResolution());this.fulfillOldAttributes(this,this._clip);c.bulkSet(this.getAllAttributes());if(c.type=="play"&&this._streamsense._dispatcher.last&&this._streamsense._dispatcher.last.type=="pause"&&c.labels.playHeadPosition.value==0){c.labels.playHeadPosition.value=this._streamsense._dispatcher.last.labels.playHeadPosition.value}},onStart:function(d,c){this.setIndex(ns_.ar.indexOf(this.getPlaylist()._clips,this._clip),this.getItemInfo("sourceURL"))},onDispatch:function(d,c){switch(c.type){case"pause":break}},onMediaChange:function(d,e,f){this._playheadCache.position=0;this.monitorClip()}});(function(){if(typeof(ns_)!="undefined"&&typeof(ns_.StreamSense)!="undefined"){ns_.StreamSense.getStreamSense().registerMediaComponent(ns_.FirefoxPort25MediaComponent)}else{setTimeout(arguments.callee,500)}})();if(typeof(ns_)=="undefined"){ns_=new Object()}ns_.SilverlightMediaComponent=ns_.Class.extend(ns_.MediaComponent,{_VERSION:"0.0.4",_nickName:"silver",_clip:null,_wmptypes:["video","audio","radio"],_player:null,_playlist:null,_indexes:null,_events:{},_nativeLabels:["date","station","streamtype","part","totalparts","episode","program","fee"],_realLabels:["productionDate","stationName","type","episodePart","episodeParts","episodeTitle","programTitle","fee"],_slightVersion:"0.0",_wasBuffering:false,_playheadCache:{time:ns_.dt.getTime(),position:0,interval:0,jitter:0},_playheadUpdate:function(){this._playheadCache.interval=window.setTimeout(this._playheadUpdate,this._streamsense.cfg.WMP_PHEAD_TIMER);var j=this.getPosition();if(!!!j&&j!=0){return}var n=ns_.dt.getTime();var h=this._streamsense.cfg.WMP_PHEAD_TIMER;var m=((j-this._playheadCache.position)<(h-(h/5)));var k=((j-this._playheadCache.position)<0);var l=((j-this._playheadCache.position)>(h*2));if(l||k){var i=this.snapshot();i.seekStart=this._playheadCache.position;i.seekEnd=j;clearTimeout(this._playheadCache.interval);this.getClip().fire(ns_.MediaEvents.STREAM_SEEK,new ns_.MediaEvent(ns_.MediaEvents.STREAM_SEEK,i));this._playheadCache.position=i.seekEnd;this._playheadCache.interval=window.setTimeout(this._playheadUpdate,this._streamsense.cfg.WMP_PHEAD_TIMER)}if(this.getClip().isPlaying()&&m){this._playheadCache.jitter++}else{if(this.getClip().isPaused()&&!m){this._clip.fire("onResume",new ns_.MediaEvent("onResume",this.snapshot()))}else{if(!m){this._playheadCache.jitter=0}}}this._playheadCache.time=n;if(j>0){this._playheadCache.position=j}if(this._playheadCache.jitter>1){this._clip.fire("onPause",new ns_.MediaEvent("onPause",this.snapshot()));this._playheadCache.jitter=0}},_listeners:{MediaOpened:function(f,d){var e=this.getIndex(this._player.source);if(ns_.ar.indexOf(e,0)==-1||((ns_.ar.indexOf(this.getPlaylist()._clips,this._clip)<(this.getPlaylist()._clips.length-1)||this.getPlaylist()._clips.length==1))){if(this.getPlaylist()._started&&ns_.ar.indexOf(e,0)!=-1){this.getPlaylist().loop()}this.getPlaylist()._ended=false}this.monitorClip()},MediaEnded:function(c,d){if(this.getClip().isPlaying()||this.getClip().isPaused()){clearTimeout(this._playheadCache.interval);this._playheadCache.interval=null;this.getClip().fire(ns_.MediaEvents.STREAM_STOP,new ns_.MediaEvent(ns_.MediaEvents.STREAM_STOP,this.snapshot()))}},CurrentStateChanged:function(f,d){this.monitorClip();var e=this.snapshot();switch(this._player.currentState.toLowerCase()){case"playing":if(this.getClip().isPaused()){this.getClip().fire(ns_.MediaEvents.STREAM_RESUME,new ns_.MediaEvent(ns_.MediaEvents.STREAM_RESUME,e))}else{this.getClip().fire(ns_.MediaEvents.STREAM_START,new ns_.MediaEvent(ns_.MediaEvents.STREAM_START,e))}this._playheadCache.position=this.getPosition();if(!!!this._playheadCache.interval){this._playheadCache.interval=window.setTimeout(this._playheadUpdate,this._streamsense.cfg.WMP_PHEAD_TIMER)}if(this._wasBuffering){this.getClip().fire("onBufferEnd",new ns_.MediaEvent("onBufferEnd",e));this._wasBuffering=false}break;case"paused":clearTimeout(this._playheadCache.interval);this._playheadCache.interval=null;if(this.getClip().isPlaying()&&(this.getPosition()!=this.getLength())){this.getClip().fire(ns_.MediaEvents.STREAM_PAUSE,new ns_.MediaEvent(ns_.MediaEvents.STREAM_PAUSE,e))}else{if((this.getPosition()!=this.getLength())&&(this._clip.isPlaying()||this._clip.isPaused())){this.getClip().fire(ns_.MediaEvents.STREAM_STOP,new ns_.MediaEvent(ns_.MediaEvents.STREAM_STOP,e))}}break;case"buffering":clearTimeout(this._playheadCache.interval);this._playheadCache.interval=null;this._wasBuffering=true;this.getClip().fire("onBufferStart",new ns_.MediaEvent("onBufferStart",e));break;case"error":this.getClip().fire("onError",new ns_.MediaEvent("onError",{text:"silverlight_error",snapshot:e}));case"closed":case"stopped":if(this.getClip().isPlaying()||this.getClip().isPaused()){clearTimeout(this._playheadCache.interval);this._playheadCache.interval=null;this.getClip().fire(ns_.MediaEvents.STREAM_STOP,new ns_.MediaEvent(ns_.MediaEvents.STREAM_STOP,e))}break}},MediaFailed:function(c,d){this.getClip().fire("onError",new ns_.MediaEvent("onError",{text:"silverlight_error",snapshot:this.snapshot()}))}},fulfillOldAttributes:function(){for(var i=0,g=this._nativeLabels.length;i<g;i++){var h=this.getItemInfo(this._nativeLabels[i]);if(!!h&&h!=""){this._clip.setAttribute(this._realLabels[i],h)}}if(this.getItemInfo("custom")){var f,j=this.getItemInfo("custom").replace(/&amp;/g,"&").split("&");for(var i=0,g=j.length;i<g;i++){f=j[i].split("=");if(String(f[0]).length>1&&String(f[1]).length>0){this._clip.setAttribute(f[0],f[1])}}}},populatePlaylist:function(){try{}catch(b){}},initialize:function($super,f,d){$super(f);this._indexes=ns_.ar.create();this.listeners={};for(var e in this._listeners){this.listeners[e]=this._listeners[e].STbind(this)}this._playheadUpdate=this._playheadUpdate.STbind(this);for(var e in ns_.DispatcherEvents){this._events[ns_.DispatcherEvents[e]]=null}this._streamsense.cfg.WMP_PHEAD_TIMER=250;this._streamsense.cfg.PLAYLIST_END_TIMER=1000;this._streamsense.registerMediaComponent(ns_.SilverlightMediaComponent);if(d){this.activate(d)}},activate:function(b){this._player=b;this._streamsense.registerMediaComponent(ns_.SilverlightMediaComponent);this.bindEvents();if(!this["onMeasure_cb"]){this["onMeasure_cb"]=this.onMeasure.STbind(this)}this._streamsense.listen("ss:measure",this["onMeasure_cb"]);if(!this["onMediaChange_cb"]){this["onMediaChange_cb"]=this.onMediaChange.STbind(this)}this.getPlaylist().listen(ns_.DispatcherEvents.MEDIA_CHANGE,this["onMediaChange_cb"])},deactivate:function(){if(!this._player){return false}this.unbindEvents();this._streamsense.unlisten("ss:measure",this["onMeasure_cb"]);this.getPlaylist().unlisten(ns_.DispatcherEvents.MEDIA_CHANGE,this["onMediaChange_cb"])},bindEvents:function(){for(var b in this.listeners){this._player.addEventListener(b,this.listeners[b])}},unbindEvents:function(){for(var b in this.listeners){ns_.dom.removeEvent(this._player,b)}},listenClip:function(){if(!this._clip){return false}var c;for(var d in ns_.MediaEvents){c=ns_.MediaEvents[d];if(typeof this[c]!="undefined"&&typeof this[c].STbind!="undefined"){if(!this[c+"_cb"]){this[c+"_cb"]=this[c].STbind(this)}this._clip.listen(c,this[c+"_cb"])}}},unlistenClip:function(){if(!this._clip){return false}var c;for(var d in ns_.MediaEvents){c=ns_.MediaEvents[d];if(typeof this[c]!="undefined"&&typeof this[c].STbind!="undefined"){this._clip.unlisten(c,this[c+"_cb"])}}},getNickname:function(){return this._nickName},monitorClip:function(){try{var m=this._clip;var e=ns_.ar.indexOf(this.getPlaylist()._clips,this._clip);var n;var k=this.getPlaylist();var p=this.getIndex(this._player.source);for(var o=p.length-1;o>=0;o--){if(typeof p[o]=="number"){n=p[o];break}}if(!m||typeof n=="undefined"){var i=ns_.ar.indexOf(k._clips,m)+1;if(k._clips[i]){this.setClip(k._clips[i])}else{this.setClip()}}else{if(typeof n=="undefined"||(typeof n!="undefined"&&n!=e)){if(typeof n!="undefined"){this.setClip(k._clips[n])}else{this.setClip()}}}}catch(l){}return this._clip},setIndex:function(){var j=ns_.ar.create();for(var h=arguments.length-1;h>=0;h--){if(arguments[h]===""||typeof arguments[h]=="boolean"||typeof arguments[h]=="undefined"){continue}if(ns_.ar.indexOf(j,arguments[h])==-1){j.push(arguments[h])}var g=this.getIndex(arguments[h]);for(var f=g.length-1;f>=0;f--){if(ns_.ar.indexOf(j,g[f])==-1){j.push(g[f])}}}for(var i=j.length-1;i>=0;i--){this._indexes[j[i]]=j}},getIndex:function(f){var e=ns_.ar.create();for(var d=this._indexes.length-1;d>=0;d--){if(ns_.ar.indexOf(this._indexes[d],f)>=0){return this._indexes[d]}}return e},setClip:function(b){if(typeof b=="undefined"){b=this.getPlaylist().addNewClip(true)}if(this._clip){if(this._clip==b){return}clearTimeout(this._playheadCache.interval);this._playheadCache.interval=null;if(this._clip.isPlaying()||this._clip.isPaused()){this.getClip().fire(ns_.MediaEvents.STREAM_STOP,new ns_.MediaEvent(ns_.MediaEvents.STREAM_STOP,this.snapshot()))}this.unlistenClip()}this.getPlaylist().setClip(b);this._clip=b;this.listenClip();this.setIndex(ns_.ar.indexOf(this.getPlaylist()._clips,this._clip),this._player.source)},getClip:function(){if(!!this._clip){return this._clip}else{return this.monitorClip()}},setPlaylist:function(){return this._streamsense.setPlaylist()},getPlaylist:function(){return this._streamsense.getPlaylist()},isPlaying:function(){var d=false;try{if(this._player.currentState.toLowerCase()=="playing"){d=true}}catch(c){}return d},isPaused:function(){var d=false;try{if(this._player.currentState.toLowerCase()=="paused"){d=true}}catch(c){}return d},isEligible:function(d){try{if(d.toString()!="MediaElement"){return false}}catch(c){return false}return true},snapshot:function(){var b={};b.target=this.getClip();b.playHeadPosition=this.getPosition();b.length=this.getLength();b.volume=this.getVolume();return b},isLooping:function(){var b=null;return b},getPosition:function(){var d=null;try{d=(this._player.position.seconds*1000).toFixed(0)}catch(c){}return d},getLength:function(){var d=null;try{d=(this._player.NaturalDuration.seconds*1000).toFixed(0)}catch(c){d=0}return d},getVolume:function(){var d=null;try{if(!this._player.IsMuted){d=(this._player.volume*100).toFixed(0)}else{d="0"}}catch(c){}return d},getPlaylistName:function(){var d="";try{d=document.title}catch(c){}return d},getPlayerVersion:function(){var e="0.0";try{var h=0;for(var f=20;h<f;h++){if(!Silverlight.isInstalled((h/2).toFixed(1))){break}}e=((h-1)/2).toFixed(1)}catch(g){}return e},getBandWidth:function(){var b=0;return b},getResolution:function(){var d="";try{d=[this._player.Width,"x",this._player.Height].join("");if(d=="NaNxNaN"){d=[this._player.NaturalVideoWidth,"x",this._player.NaturalVideoHeight].join("")}}catch(c){d="0x0"}return d},getItemInfo:function(f){var e="";if(f&&f!=""){try{e=this._player.Attributes.GetItemByName(f).value}catch(d){}}return e},onMeasure:function(d,c){this.setAttribute("bitrate","0");this.setAttribute("playerType","Silverlight");this.setAttribute("playerVersion",this.getPlayerVersion());this.setAttribute("bandwidth",this.getBandWidth());this.setAttribute("resolution",this.getResolution());this.fulfillOldAttributes();c.bulkSet(this.getAllAttributes())},onMediaChange:function(d,e,f){}});(function(){if(typeof(ns_)!="undefined"&&typeof(ns_.StreamSense)!="undefined"){ns_.StreamSense.getStreamSense().registerMediaComponent(ns_.SilverlightMediaComponent)}else{setTimeout(arguments.callee,500)}})();this.document&&(function(a,b,c){if(a===c){throw new Error("Problème à l'initialisation de Streamstat")}if(!/^(france(televisions|[2345]|tvod)|leclubfrancetelevisions)$/.test(b)){b="francetelevisions"}ns_pixelUrl="http://fr.sitestat.com/ftvi/"+b+"/s?video&ns__t="+(+new Date);new Image().src=ns_pixelUrl+"&ns_c="+(a.characterSet||a.defaultCharset)+"&ns_ti="+escape(a.title)+"&ns_jspageurl="+escape(""+a.location)+"&ns_referrer="+escape(a.referrer)})(this.document,this.ftvi_portail);(function(b,a){b.functionsQueue=b.functionsQueue||function(f){var e=[],h=-1,g=function(){var j=arguments,i;h++;if(e.length===h){h=-1;return}if(e[h] instanceof Array){e[h][1]--;i=e[h][0];if(e[h][1]==0){c(h--)}}else{i=e[h]}if(typeof i==="function"){i.continuer=(function(){var k=false;return function(){if(!k){k=true;g.apply(f,j)}}})();if(i.apply(f,j)!==false){g.apply(f,j)}}else{c(h--);g.apply(f,j)}},c=function(j){if(e.length===1){e=[]}else{if(j===e.length-1){e.length=e.length-1}else{var k,l=[];for(k=0;k<e.length;k++){if(k!==j){l[l.length]=e[k]}}e=l}}},d=function(j,l){if(arguments.length===0){if(h!==-1){return}g()}else{if(j!==a){if(j instanceof Array){if(j.length<=2&&typeof j[0]==="function"&&(j[1]===a||typeof j[1]==="number")){arguments.callee(j[0],j[1]||l)}else{for(var k=0;k<j.length;k++){arguments.callee(j[k],l)}}}else{if(typeof j!=="function"){throw new Error("Impossible de mettre en attente autre chose qu'une fonction")}if(typeof l==="number"){j=[j,l]}e[e.length]=j}}}};d.run=function(){if(h!==-1){return}g.apply(f,arguments)};return d};b.callbacksManager=b.callbacksManager||function(d){var f,e,h=[],g=function(i){if(arguments.length===1){if(typeof i==="object"){for(var j in i){g(j,i[j])}}else{if(h[i]!==a){return h[i]()}}}else{if(arguments.length>1){if(h[i]===a){h[i]=b.functionsQueue(d)}h[i].apply(d,[].slice.call(arguments,1))}}},c=function(i){return function(){if(typeof this[i]==="function"){return this[i].apply(this,arguments)}}};g.handleMethods=function(k,j){if(typeof k==="string"){g(j,c(k))}else{if(typeof k==="object"){for(var l in k){arguments.callee(l,k[l])}}}};g.run=function(i){if(h[i]!==a){return h[i].run.apply(this,[].slice.call(arguments,1))}};for(f=1;f<arguments.length;f++){if(typeof arguments[f]==="object"){for(e in arguments[f]){g(e,arguments[f][e])}}}return g}})(this);(function(d,c){function e(r,x,q,g){var j=this,u,f=0,t=false,n=false,h;this.addListener=function o(y){if(!t){q.push(y)}else{w(y)}};function w(y){if(y[1]===0){return}if(y[1]!==c){y[1]--}try{y[0].apply(r,u)}catch(z){d.setTimeout(function(){throw z},0)}}this.whenFinished=function v(y){delete (this.whenFinished);h=y;p()};function p(){if(n&&typeof h==="function"){var y=h;h=c;d.setTimeout(function(){y.call(r)},0)}}function i(){if(t&&f===0){n=true;p()}}function m(){f++}function k(){if(!n){f--;i()}}function l(){for(var y=0;y<q.length;y++){w(q[y])}t=true;i()}function s(){u=[{type:x,wait:m,continuer:k}];for(var y=0;y<g.length;y++){u.push(g[y])}d.setTimeout(l,0)}s()}function b(h,g){var l=this,m=[],k;function j(r){if(r===m.length-1){m.length--}else{var s,q=m.slice(0,r);for(s=r+1;s<m.length;s++){q.push(m[s])}m=q}}this.addListener=function f(r){var q=r[2]&&(k!==c);r.length=2;if(!(q&&r[1]===1)){m.push(r)}if(q){k.addListener(r)}};this.trigger=function i(){var q=m.length;while(q--){if(m[q][1]<=0){j(q)}}k=new e(h,g,m.slice(),m.slice.call(arguments));return k};this.unbind=function o(s){if(s===c){m=[]}else{var q=l.listenerIndexes(s);for(var r=q.length-1;r>=0;r--){if(s===m[q[r]][0]){j(r)}}}};this.resetTriggeredState=function n(){k=c};this.listenerIndexes=function p(s){var q=[];for(var r=0;r<m.length;r++){if(s===m[r][0]){q.push(r)}}return q}}function a(f){if(!(this instanceof a)){throw new Error('Must be called with the "new" keyword.')}var k=this,o={};this.addEventListeners=function h(q){for(var p in q){if(q[p]){k.addEventListener(p,q[p])}}};this.addEventListener=function i(p,t,r,s){var q;if(p.indexOf(" ")!==-1){p=p.split(" ")}if(p instanceof Array){for(q=0;q<p.length;q++){k.addEventListener(p[q],t,r,s)}return}if(t instanceof Array){if(typeof t[0]==="function"&&((t[1]===c)||((typeof t[1])==="number"))&&((t[2]===c)||((typeof t[2])==="boolean"))&&t.length<=3){if(t[1]===c){t[1]=r}if(t[2]===c){t[2]=s!==false}k.getEvent(p).addListener(t)}else{for(q=0;q<t.length;q++){if(t[q]===c){continue}else{if(!(t[q] instanceof Array||typeof t[q]==="function")){throw new Error("Invalid Event listener format")}}k.addEventListener(p,t[q],r,s)}}}else{if(typeof t!=="function"){throw new Error("Event listener must be a function")}if(s===c&&typeof r==="boolean"){s=r;r=c}if(r!==c&&typeof r!=="number"){throw new Error("Event listener's iterations must be undefined or a number")}if(s!==c&&typeof s!=="boolean"){throw new Error("Event listener's rattrapage must be undefined or a boolean")}k.addEventListener(p,[t,r,s!==false])}};this.trigger=function g(p){return k.getEvent(p).trigger.apply(f,[].slice.call(arguments,1))};this.unbind=function n(p,q){if(o[p] instanceof b){o[p].unbind(q)}};this.resetTriggeredState=function l(p){if(o[p] instanceof b){o[p].resetTriggeredState()}};this.getEvent=function j(p){if(o[p]===c){o[p]=new b(f,p)}return o[p]};function m(p){f=f||k;f.addEventListener=k.addEventListener;f.addEventListeners=k.addEventListeners;f.unbind=k.unbind;for(var q=1;q<p.length;q++){k.addEventListeners(p[q])}}m(arguments)}d.EventsManager=d.EventsManager||a}(this));(function(e,a){if(!e.EventsManager){throw new Error("Dépendence non satisfaite : EventsManager")}function f(m,p,r){if(!(this instanceof f)){return new f(m,p,r)}var o=this,j;this.resetStateEvents=function l(){r.each(function(){if(this.event!==a){m.resetTriggeredState(this.event)}})};this.setState=function n(v){if(!(v instanceof h)){v=r[v]}if(v===a||r[v.name]===a){throw new Error("invalide state value")}else{if(j===v){throw new Error("StatesManager : Etat déjà en cours")}}var t,w=j,s=[p,v.name,w.name],u;o.resetStateEvents();j=v;for(t=1;t<arguments.length;t++){s.push(arguments[t])}if(j.event){u=s.slice(2);u[0]=j.event;m.trigger.apply(o,u)}return m.trigger.apply(o,s)};this.toString=function k(){return j.name};function q(){p=p||"readyStateChanged";r=r||b;j=r.getInitial()}q()}function h(j,k){this.name=j;this.event=k}h.prototype={toString:function(){return this.name}};function c(j){for(var k in j){this.createState(k,j[k].event,j[k].initial)}}c.prototype={createState:function i(k,m,j){var n=this[k]=new h(k,m);if(j===true){this.getInitial=function l(){return n}}},each:function g(k){for(var j in this){if(c.prototype[j]!==a){continue}k.call(this[j],j)}},getInitial:function d(){for(var j in this){if(c.prototype[j]!==a){continue}return this[j]}}};f.StateList=c;var b=new c({ERROR:{event:"error"},INSTANCIATING:{initial:true},READY:{event:"ready"}});e.StatesManager=e.StatesManager||f}(this));(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].jquery){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)){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(f,g,d){if(g===d){throw new Error("Dépendence non satisfaite : jQuery")}var a={position:"relative",overflow:"hidden",background:"black","text-align":"center","font-size":"12px","font-family":"Arial, sans-serif",color:"white"},c={margin:"20px 20px 10px",padding:"70px 0 0",background:"transparent url(/layoutftv/arches/common/images/video/warning.png) no-repeat center 0"},e={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"},b={position:"absolute",top:0,right:0,cursor:"pointer"};f.dialog=function(n,k){if(!(this instanceof arguments.callee)){return new arguments.callee(n,k)}var l=this,m=[],i,h={},j;this.setDefaultAction=function(o){i=o||function(){}};this.setAnswer=function(o,p){m.push({txt:o,action:p})};this.setDefaultAnswer=function(o){l.setAnswer(o,function(){i.call(l)})};this.setSize=function(o){if(o===d){return}h.height=((o.height||0)<300)?300:o.height;h.width=((o.width||0)<380)?380:o.width;if(j!==d){j.height(h.height);j.width(h.width)}};this.createNode=function(){j=g('<div class="pluginErrorMsg">').css(a).width(h.width).height(h.height).append(g('<p class="alerte" />').css(c).append(n)).append(g('<div class="closeBtn"><img src="/layoutftv/arches/common/stylesheets/img/buttons/closedialog.png" alt="Fermer" /></div>').css(b).click(function(){l.remove();if(m.length!==0){i.call(l)}}));if(m.length===0){i.call(l)}else{for(var o=0;o<m.length;o++){(function(p){g('<p class="bouton">'+p.txt+"</p>").css(e).click(function(){l.remove();p.action.call(l)}).appendTo(j)})(m[o])}}};this.getNode=function(){if(j===d){l.createNode()}return j};this.remove=function(){if(j!==d){j.remove()}};this.setDefaultAction(k)}})(this,this.jQuery);(function(c,b){function a(){var f={};function d(m){if(arguments.length>0){if(m instanceof Array){var o,l,h,p,n=[];for(o=0;o<m.length;o++){if(f[m[o]]===b){continue}for(l=0;l<f[m[o]].length;l++){p=false;for(h=0;h<n.length;h++){if(n[h]===f[m[o]][l]){p=true;break}}if(!p){n.push(f[m[o]][l])}}}return(n.length>0)?n:b}return f[m]}return f}function g(j,h){var k,l;if(arguments.length===1){for(k in j){g(k,j[k])}}else{if(j instanceof Array){for(k=0;k<j.length;k++){g(j[k],h)}}else{if(h instanceof Array){for(k=h.length-1;k>=0;k--){g(j,h[k])}}else{if(j!==b&&h!==b){l=[h];if(f[j] instanceof Array){for(k=0;k<f[j].length;k++){if(f[j][k]!==h){l.push(f[j][k])}}}f[j]=l}}}}}function e(m){var n,l,h,o;for(n in f){for(l=0;l<f[n].length;l++){if(f[n][l]===m){o=f[n].slice(0,l-1);for(h=l+1;h<f[n].length;h++){o.push(f[n][h])}f[n]=o;l--}}}}d.set=g;d.remove=e;return d}c.relationObject=c.relationObject||a}(this));(function(f,a){(function(l){for(var k in l){if(!l[k]){throw new Error("Dépendence non satisfaite : "+k)}}})({dynamicOptionsManager:!!f.dynamicOptionsManager,callbacksManager:!!f.callbacksManager,RelationObject:!!f.relationObject,Dialog:!!f.dialog,"MediaObject already exists":!f.MediaObject});var c={attrs:{style:{}},params:{},events:{}},e=function(o,t){var p=this,m=-1,k=0,n,r={},s=function(){p.options=t=f.dynamicOptionsManager.call(p,t);p.callbacks=n=f.callbacksManager(p);if(t.defined("excludeBuilders")){var v,u=t("excludeBuilders");if(!(u instanceof Array)){u=[u]}for(v=0;v<u.length;v++){r[u[v]]=true}}p.add(o)},l=function(){var w,u;if(++m>=k){if(k==0){w="Aucun constructeur trouvé pour ce média"}else{w={};for(var v=0;v<k;v++){w[p[v].name]=p[v].result}}q(false,w,t);return}u=new d(p[m],t);u.callbacks("finish",function(){p[m]=this;if(!this.success){l()}else{q(true,this.result,this.resultOptions)}});u.callbacks("unsync",function(){n("unsync")});u.callbacks("interact",function(){p.interactData=this.interactData;n("interact")});u.execute()},q=function(w,v,u){p.success=w;p.result=v;p.resultOptions=u;p.resultBuilder=w?p[m]:a;if(w){n("finish",function(){n("success",arguments.callee.continuer);n("success");return false})}n("finish")};this.add=function(v){if(v instanceof Array){for(var u=0;u<v.length;u++){p.add(v[u])}}else{if(typeof v==="string"&&e.builders[v]!==a&&!r[v]){p[k++]=e.builders[v]}}};this.execute=function(){delete (p.execute);l()};this.current=function(){return m};this.length=function(){return k};s()},d=function(p,u){if(p instanceof Array){return new e(p,u)}var r=this,n=false,l={},q,o={},t=function(){r.name=p.builderName;r.callbacks=q=f.callbacksManager(r);r.options=u=f.dynamicOptionsManager.call(r,c,p.options,u);u.transfert=function(z,v,y){var w,x;y=y||{};v=u(v);u(z,{});for(w in v){x=v[w];if(y[w]!==a){w=y[w]}if(!u.defined(z,w)){u(z,w,x)}}}},k=function(){if(n){return}n=true;q("unsync")},s=function(x,w,v){delete (r.setResult);delete (r.abort);delete (r.createDialog);delete (r.build);delete (r.buildAndReturn);delete (r.wait);r.success=x;r.result=w;r.resultOptions=v||r.options;q("finish");m()},m=function(){if(!n){throw l}};this.execute=function(){delete (r.execute);delete (r.callbacks);var v,x;for(v in o){r[v]=o[v]}try{x=p.call(r);if(x!==a&&r.result===a&&!n){r.setResult(x)}}catch(w){if(w!==l){throw w}}};o.setResult=function(x,w,v){if(typeof x==="boolean"){s(x,w,v)}else{s(true,x,w)}};o.abort=function(w,v){s(false,w,v)};o.createDialog=function(w){var v=new f.dialog(w);v.setSize(r.options(["height","width"]));return v};o.build=function(v,w){w=f.dynamicOptionsManager(r.options,w);var x=(!v)?f.MediaObject(w("url"),w):new e(v,w);x.callbacks("unsync",k);x.callbacks("interact",function(){r.interactData=this.interactData;q("interact")});r[r.length++]=x;return x};o.buildAndReturn=function(v,x){var w=r.build(v,x);w.callbacks("finish",function(){s(this.success,this.result,this.resultOptions)});w.execute();m()};o.wait=function(y,x){var v=r.options("quiet"),w=function(){if(typeof x==="function"){x.call(r)}};if(y.readyState!==a){k()}else{if(typeof y==="number"){k();f.setTimeout(w,y*1000)}else{if(!v){k();if(y instanceof f.dialog){y.setDefaultAction(w)}r.interactData=y;q("interact")}else{w()}}}};o.length=0;t()},g=function(k){return function(){this.buildAndReturn(k)}},j={extension:null,type:null,builder:null},h={extensions:null,types:null},b=/\.([a-z0-9]+)(\?|$)/i,i=f.MediaObject=function(l,k){var n=[],p=function(q){o(i.extensionsTypes(q))},o=function(s){var q,r;if(s instanceof Array){for(q=s.length-1;q>=0;q--){o(s[q])}}else{if(typeof s==="string"){r=[s];for(q=0;q<n.length;q++){r.push(n[q])}n=r}}},m=function(q){if(e.builders[q]===a){return}i.typesBuilders.set("constructeur/specifique",q);o("constructeur/specifique")};k=f.dynamicOptionsManager(k,{url:l});p((b.exec(l)||[])[1]);p(k("extension"));o(k("type"));m(k("builder"));k(j);return new e(i.typesBuilders(n),k)};e.builders={};i.setBuilder=function(l,m,k){if(typeof m!=="function"){m=g(m)}m.builderName=l;m.options=f.dynamicOptionsManager();e.builders[l]=m;i.typesBuilders.remove(l);i.setBuilderOptions(l,k)};i.setBuilderOptions=function(m,l){var k=e.builders[m];if(k!==a){k.options(l);i.setExtensionBuilder(k.options("extensions"),m);i.typesBuilders.set(k.options("types"),m);k.options(h)}};i.extensionsTypes=f.relationObject();i.typesBuilders=f.relationObject();i.setExtensionBuilder=function(n,k){var m,l;if(n instanceof Array){for(m=0;m<n.length;m++){arguments.callee(n[m],k)}}else{if(typeof n==="string"&&typeof k==="string"){l=i.extensionsTypes(n);if(l===a){l="extension/"+n;i.extensionsTypes.set(n,l)}i.typesBuilders.set(l,k)}}};i.getPluginByType=(function(){try{if(f.navigator.plugins===a||f.navigator.mimeTypes===a||f.navigator.plugins.length===a||f.navigator.plugins.refresh===a){throw"no plugins infos"}}catch(k){return function(){}}return function(l){f.navigator.plugins.refresh();if(f.navigator.mimeTypes[l]!==a&&f.navigator.mimeTypes[l].enabledPlugin){return f.navigator.mimeTypes[l].enabledPlugin}}})();i.pluginRefreshTime=2000})(this);(function(b,a){if(!(a&&a.extensionsTypes&&a.extensionsTypes.set)){throw new Error("Dépendence non satisfaite : MediaObject")}a.extensionsTypes.set({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"]})})(this,this.MediaObject);(function(b){if(!(b.MediaObject&&b.MediaObject.setBuilder)){throw new Error("Dépendence non satisfaite : MediaObject")}var a=function(c,g){var f=[],e;g=g||arguments.callee.pattern;g.elements=g.elements||[];for(var d in c){e=[g.elements[1],d,g.elements[2]];if((g.children||{})[d]&&typeof c[d]==="object"){e.push(arguments.callee(c[d],g.children[d]))}else{e.push(""+c[d])}if(e[3]===""){continue}e.push(g.elements[3]);f.push(e.join(""))}return f.join(g.elements[0])};a.pattern={elements:[" ","",'="','"'],children:{style:{elements:[";","",":",""]},flashvars:{elements:["&amp;","","=",""]}}};a.patternParams={elements:["",'<param name="','" value="','" />'],children:a.pattern.children};a.setPatterns=function(c){for(key in c){a.pattern.children[key]=c[key]}};b.MediaObject.setBuilder("generateObject",function(){this.options.transfert("attrs",["width","height"]);if(!this.options.defined("attrs","id")){this.options("attrs","id","MediaObject"+(+new Date))}a.setPatterns(this.options("objectToStringPatterns"));return"<object "+a(this.options("attrs"))+">"+a(this.options("params"),a.patternParams)+"</object>"+(this.options("handleMediaObjectDOMInsert")?'<script type="text/javascript">window.setTimeout(function() {jQuery && jQuery(\'#'+this.options("attrs","id")+"').trigger('MediaObjectDOMInsert');}, 200);<\/script>":"")});b.MediaObject.setBuilder("generateEmbed",function(){this.options.transfert("attrs",["width","height"]);this.options("attrs",this.options("params")||{});a.setPatterns(this.options("objectToStringPatterns"));return"<embed "+a(this.options("attrs"))+"></embed>"});b.MediaObject.setBuilder("iframe",function(){this.options.transfert("attrs",["url","width","height","border"],{url:"src",border:"frameBorder"});if(this.options.defined("bgColor")){this.options("attrs","style","background-color",this.options("bgColor"))}a.setPatterns(this.options("objectToStringPatterns"));return"<iframe "+a(this.options("attrs"))+" />"},{width:400,height:400,attrs:{allowTransparency:"allowTransparency",frameBorder:0},types:["text/html","application/xhtml+xml","application/pdf"]})})(this);(function(a){if(!(a.MediaObject&&a.MediaObject.setBuilder)){throw new Error("Dépendence non satisfaite : MediaObject")}a.MediaObject.setBuilder("quicktimePlayer",function(){var b=this.options("url");this.options("attrs",{data:b});if(a.ActiveXObject){this.options("attrs",{classid:"clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B",codeBase:"http://www.apple.com/qtactivex/qtplugin.cab"})}this.options("params",{src:b,wmode:null});if(this.options.defined("autostart")){this.options("params","autoplay",this.options("autostart"))}this.buildAndReturn("generateObject")},{width:388,height:288,autostart:false,extensions:["mp4","mov"]});a.MediaObject.setBuilder("quicktimePlayerAudio","quicktimePlayer",{height:18,extensions:["au","aac","aif"]})})(this);(function(b,a){if(!(b.MediaObject&&b.MediaObject.setBuilder)){throw new Error("Dépendence non satisfaite : MediaObject")}b.MediaObject.setBuilder("realPlayerObject",(function(){var c=function(){var d;if(b.ActiveXObject!==a){return true}if((d=b.MediaObject.getPluginByType("audio/x-pn-realaudio-plugin"))){return true}return false};return function(){if(!c()){this.abort("Plugin RealPlayer non disponible")}if(b.ActiveXObject!==a){this.options("attrs",{classid:"clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA"})}else{this.options("attrs",{type:"audio/x-pn-realaudio-plugin"})}this.options("params",{src:this.options("url")});this.options("params",{wmode:null});this.options("params","console","video");this.options("params","autostart",this.options("autostart"));this.buildAndReturn((b.ActiveXObject!==a)?"generateObject":"generateEmbed")}})(),{width:388,height:288,autostart:true});b.MediaObject.setBuilder("realPlayerControls","realPlayerObject",{height:25,params:{controls:"controlpanel"}});b.MediaObject.setBuilder("realPlayerImageWindow","realPlayerObject",{params:{controls:"ImageWindow"}});b.MediaObject.setBuilder("realPlayerVideo",function(){var e=this,d,c;if(this.options.defined("height")){d={height:this.options("height")-25}}c=this.build("realPlayerImageWindow",d);c.callbacks("finish",function(){if(!this.success){e.abort(this.result,this.resultOptions);return}if(e.options.defined("height")){d={height:25}}var f=e.build("realPlayerControls",d);f.callbacks("finish",function(){if(!this.success){e.abort(this.result,this.resultOptions);return}e.setResult("<div><div>"+c.result+"</div><div>"+this.result+"</div></div>",e.options)});f.execute()});c.execute()},{extensions:["ram","rm","rpm","rv"]});b.MediaObject.setBuilder("realPlayerAudio","realPlayerControls",{extensions:"ra"})})(this);(function(d,f,c){(function(h){for(var g in h){if(!h[g]){throw new Error("Dépendence non satisfaite : "+g)}}})({dynamicOptionsManager:!!d.dynamicOptionsManager,callbacksManager:!!d.callbacksManager,jQuery:!!f,MediaObject:!!d.MediaObject,"jQuery.mediaObject already exists":!!(f&&f.fn&&!f.fn.mediaObject)});var b=/(height|width)((=|:)([^ ]+))?/i,a=function(g){if(typeof g!="string"){return{}}var i,j,h={},k=g.split(" ");for(i=0;i<k.length;i++){j=k[i].match(b);if(!j){continue}h[j[1]]=j[4]}return h},e=function(n,j){var l={};l.language=d.navigator.language||d.navigator.userLanguage||d.navigator.systemLanguage;l.userAgent=d.navigator.userAgent;l.appCodeName=d.navigator.appCodeName;l.appName=d.navigator.appName;l.appVersion=d.navigator.appVersion;l.platform=d.navigator.platform;l.cpuClass=d.navigator.cpuClass;l.cookieEnabled=d.navigator.cookieEnabled;if(typeof d.navigator.javaEnabled==="function"){l.javaEnabled=d.navigator.javaEnabled()}l.plugins={};try{d.navigator.plugins.refresh();for(var h=0;h<d.navigator.plugins.length;h++){l.plugins[d.navigator.plugins[h].name]=d.navigator.plugins[h].description.substr(0,50)}}catch(m){}l.location=d.location.toString();l.mediaUrl=n.resultOptions("url");l.builders=n.result;l=(function(r,q){var o=[],p;q=q||"";for(var i in r){if(typeof r[i]==="object"){p="\n"+arguments.callee(r[i],q?" "+q+" ":" - ")+"\n"}else{p=r[i]}o.push(q+i+" : "+p)}return o.join("\n")})(l);var k=function(){j.show()},g=new d.dialog("<strong>Aucune solution n'a été trouvée pour afficher <a href=\""+n.options("url")+'">ce contenu</a>.</strong><br />Vous pouvez nous envoyer le rapport ci-après qui nous aidera à améliorer notre service.<br /><br /><textarea style="width:100%;height:3em">'+l+'</textarea><br /><br />e-mail (facultatif) : <input type="text" />',k);g.setSize(n.resultOptions(["width","height"]));g.setAnswer("Envoyer le rapport",function(){f.ajax({url:"/appftv/mediatools/rapport.php",type:"POST",data:{rapport:this.getNode().find("textarea").val(),email:this.getNode().find("input").val()}});d.alert("Merci de votre aide");k()});g.setDefaultAnswer("Ne pas envoyer le rapport");j.hide().after(g.getNode())};f.fn.mediaObject=function(h){var g=f([]),i=false;h=d.dynamicOptionsManager(h);this.each(function(){if(!(this.nodeName==="A"||this.nodeName==="IMG")||(this.nodeName==="IMG"&&!(/\.(swf|xap)(\?.*)?(#.*)?$/.test(this.src)||this.type==="application/x-shockwave-flash"||this.type==="application/x-silverlight"||this.type==="application/x-silverlight-2"))){g=g.add(this);return}var n,l=this.nodeName==="IMG"?this.src:this.href,k=f("<span />").insertBefore(this),j=f(this).appendTo(f('<div style="display: none;" />')),m=function(){k.after(j).remove()};g=g.add(this);h.reset();if(this.nodeName==="IMG"){if(!h.defined("width")){h("width",j.attr("width")||null)}if(!h.defined("height")){h("height",j.attr("height")||null)}}h(a(this.className));h("attrs","class",this.className||c);h("attrs","id",this.id||c);h("type",[h.raw("type"),this.type||c]);n=d.MediaObject(l,h);if(j.data!==c){j.data("mediaObject",{instance:n})}n.callbacks("finish",function(){if(!this.success){m();if(!this.resultOptions("quiet")){e(this,j)}}else{this.result=f(this.result);this.result.not("script").appendTo('<div style="display:none;" />');try{this.result.each(function(){if(f(this).is("object, embed, iframe")){f(this).append(j);return false}return !f(this).find("object, embed, iframe").eq(0).append(j).length})}catch(o){}this.callbacks("finish",function(){k.after(this.result).remove();if(!i){g=g.not(j).add(this.result)}})}});n.callbacks("interact",function(){if(this.interactData instanceof d.dialog){k.after(this.interactData.getNode())}});n.callbacks(h.raw("callbacks"));n.execute()});i=true;return g}})(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(c,a){var e=["(\\?|&amp;|&)(",")(=([^&#]*))?(?=(&amp;|&|#|$))"],d=function(j,i){if(!(j instanceof Array)){throw"La liste de paramètre doit être un tableau"}i=(i||c.location.toString());var f,g={},h=new RegExp(e[0]+j.join("|")+e[1],"g");while(f=h.exec(i)){g[f[2]]=f[4]||""}return g},b=function(j,l,h,i){h=(h+""||c.location+"");var g,f=h.match(new RegExp("^(.*)"+e[0]+j+e[1]+"(.*)$")),k=(l===null);if(!f){if(k){return h}g=((h.indexOf("?")!=-1)?(i?"&amp;":"&"):"?")+j+(l?"="+l:"");return h.replace(/(#.*)?$/,g+"$1")}if(k){if(f[7]===""){return f[1]}if(f[6]==="#"){return f[1]+f[7]}return f[1]+f[2]+f[7].substr(1)}return f[1]+f[2]+f[3]+(l?"="+l:"")+f[7]};String.prototype.getQueryStringValue=function(f){return d([f],this)[f]};String.prototype.getQueryStringValues=function(f){return d(f,this)};String.prototype.setQueryStringValue=function(g,h,f){return b(g,h,this+"",f)}})(this);(function(k,g,d){(function(x){for(var w in x){if(!x[w]){throw new Error("Dépendence non satisfaite : "+w)}}}({jQuery:!!g,MediaObject:!!k.MediaObject}));var f=/^(play|pause|stop|fastForward|fastReverse)$/,s=/^(current(Position(Timecode)?|Item|Marker|AudioLanguage(Index)?))$/i,o=function(w,x){g(this).each(function(){try{if(f.test(w.type)){this.controls[w.type]()}else{if(s.test(w.type)){this.controls[w.type]=x}else{if(w.type==="kill"){this.controls.stop();this.close();g(this).remove()}else{if(w.type==="hide"){this.controls.stop();g(this).hide()}else{if(w.type==="show"){g(this).show()}else{if(w.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(w.type==="playItem"){x=parseInt(x);if(isNaN(x)||this.currentPlaylist.count<=x){this.controls.playItem(this.currentPlaylist.item(0))}else{this.controls.playItem(this.currentPlaylist.item(x))}}}}}}}}}catch(y){}})},t="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6",b="Constructeurs non adaptés aux Mac",i="Pas de plugin WMP pour IE dispo",q="Le navigateur ne semble pas être un Firefox sous Windows",h="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)",j="Plugin WMP spécial Firefox non dispo",r="Télécharger ce plugin",m="Attente du plugin Windows Media Player pour Firefox",u="Ne pas le télécharger",e=[],p={},a=[],n={OpenStateChange:function(x){for(var w=0;w<e.length;w++){if(e[w].object.openState!==d&&e[w].object.openState!==e[w].openState&&e[w].object.openState==x){e[w].openState=x;g(e[w].object).trigger("OpenStateChange")}}},PlayStateChange:function(x){for(var w=0;w<e.length;w++){if(e[w].object.playState!==d&&e[w].object.playState!==e[w].playState&&e[w].object.playState==x){e[w].playState=x;g(e[w].object).trigger("PlayStateChange")}}},PlaylistChange:function(x){for(var w=0;w<e.length;w++){try{if(e[w].object.currentPlaylist!==d&&e[w].object.currentPlaylist.isIdentical(x)){g(e[w].object).trigger("PlaylistChange")}}catch(y){}}},CurrentItemChange:function(x){for(var w=0;w<e.length;w++){try{if(e[w].object.currentMedia!==d&&e[w].object.currentMedia.isIdentical(x)){g(e[w].object).trigger("CurrentItemChange")}}catch(y){}}},MediaChange:function(x){for(var w=0;w<e.length;w++){try{if(e[w].object.currentMedia!==d&&e[w].object.currentMedia.isIdentical(x)){g(e[w].object).trigger("MediaChange")}}catch(y){}}},PositionChange:function(y,x){for(var w=0;w<e.length;w++){if(e[w].object.controls!==d&&Math.floor(e[w].object.controls.currentPosition*10)===Math.floor(x*10)){g(e[w].object).trigger("PositionChange")}}},MediaError:function(x){for(var w=0;w<e.length;w++){try{if(e[w].object.currentMedia!==d&&e[w].object.currentMedia.isIdentical(x)){g(e[w].object).trigger("MediaError")}}catch(y){}}},Error:function(){for(var w=0;w<e.length;w++){if(e[w].object.error.errorCount!==e[w].errorCount){e[w].errorCount=e[w].object.error.errorCount;g(e[w].object).trigger("Error")}}}};k.WMPRegisterPlayer=function(w){if(w.controls){w.controls.stop();g(w).bind("MediaObjectDOMInsert",function(){g(this).trigger("load");if(this.settings.autoStart){this.controls.play()}})}else{e.push({object:w,playState:w.playState,openState:w.openState,errorCount:0})}};function c(){for(var w in n){l(w)}}function l(x){var w="OnDS"+x+"Evt";if(!p[x]){p[x]={handlers:[k[w]],handleFunction:function(){for(var z=0;z<p[x].handlers.length;z++){if(typeof p[x].handlers[z]==="function"){p[x].handlers[z].apply(this,arguments)}}}}}if(typeof n[x]==="function"){p[x].handlers.push(n[x]);n[x]=false}for(var y=1;y<arguments.length;y++){if(typeof arguments[y]==="function"){p[x].handlers.push(arguments[y])}}if(k[w]!==p[x].handleFunction){if(typeof k[w]==="function"){for(var y=0;y<p[x].handlers.length;y++){if(p[x].handlers[y]===k[w]){break}}if(y===p[x].handlers.length){p[x].handlers.push(k[w])}}k[w]=p[x].handleFunction}}function v(z,w,y){if(y instanceof Array){for(var x=0;x<y.length;x++){v(z,w,y[x])}}else{if(typeof y==="function"){if(w==="load"&&z.openState===d){for(var x=0;x<a.length;x++){if(a[x]===z){break}}if(x===a.length){var A=(function(){var B=false;return function(){if(!B){B=true;g(this).trigger("load")}}}());v(z,"OpenStateChange",A);a.push(z)}}else{if(w==="MediaError"){y=(function(B){return function(){var D=this,C=arguments;k.setTimeout(function(){B.apply(D,C)},0)}}(y))}}if(z.attachEvent){z.attachEvent(w,function(){g(z).trigger(w)})}else{l(w)}g(z).bind(w,y)}}}k.MediaObject.setBuilder("WMVFamily",["MediaPlayerFamily","videoFlip4MacFamily"],{width:384,autostart:true,extensions:["asx","wmv","asf","wsx"]});k.MediaObject.setBuilder("WMAFamily",["audioMediaPlayerFamily","audioFlip4MacFamily"],{width:384,autostart:true,extensions:"wma"});k.MediaObject.setBuilder("MediaPlayerFamily",function(){if(k.navigator.appVersion.indexOf("Mac")!==-1){this.abort(b);return}this.buildAndReturn(["mediaPlayerMozillaWin","mediaPlayerIE","mediaPlayerOthers"])},{height:288,soustitre:d,soustitreNode:d,soustitreId:"soustitres",soustitreNodeReturn:d});k.MediaObject.setBuilder("audioMediaPlayerFamily","MediaPlayerFamily",{height:45});k.MediaObject.setBuilder("videoFlip4MacFamily","Flip4Mac",{height:232});k.MediaObject.setBuilder("audioFlip4MacFamily","Flip4Mac",{height:16});k.MediaObject.setBuilder("mediaPlayerCommon",function(){var B=this,z,y=(this.options("soustitre")||"").match(/^(sami):(.*)$/i),E,F,D,C,x,w=this.options("cappuid"),A=this.options("streamsense","clipAttrs");if(w!==d){this.options("events","PlayStateChange",[this.options.raw("events","PlayStateChange"),function(){if(this.playState===3&&x!==this.currentMedia.sourceURL){k.ObjetCappu.registerPlayCount(w);x=this.currentMedia.sourceURL}}])}if(A!==d){this.options("events","load",[this.options.raw("events","load"),function(){var I=this,H;function G(){c();if(I.settings.autoStart){I.controls.stop();I.controls.play()}}if(k.watch){k.watch("OnDSPlayStateChangeEvt",function(K,J,L){k.setTimeout(G,0);return L})}else{k.setTimeout(G,500)}this.controls.stop();H=new ns_.StreamSense(this);H.getClip().setAttributes(A)}])}this.options.transfert("params",["url","autostart"]);this.options("params",{wmode:null});if(y){E=g(this.options("soustitreNode")||[]);if(E.length===0){E=g("<div />");this.options("soustitreNodeReturn",true)}if(!(F=E.attr("id"))){F=this.options("soustitreId")||"soustitres";z=-1;while(g("#"+F+(++z||"")).length!==0){}F=F+(z||"");E.attr("id",F)}switch(y[1]){case"sami":this.options("params",{SAMIFileName:y[2],captioningID:F});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}}this.options("handleMediaObjectDOMInsert",true);C=this.build("generateObject");C.callbacks("finish",function(){if(!this.success){B.abort(this.result,this.resultOptions);return}this.result=g(this.result);k.WMPRegisterPlayer(this.result.get(0));var H=this.resultOptions.raw("events"),G;for(G in H){v(this.result.get(0),G,H[G])}this.result.not("script").bind("play",o).bind("pause",o).bind("stop",o).bind("fastForward",o).bind("fastReverse",o).bind("currentPosition",o).bind("fullscreen",o).bind("playItem",o).bind("kill",o).bind("hide",o).bind("show",o);if(B.options("soustitreNodeReturn")&&E){this.result=this.result.add(E)}B.setResult(this.result,this.resultOptions)});C.execute()},{params:{uiMode:"full",enableContextMenu:true,stretchToFit:1},events:{}});k.MediaObject.setBuilder("mediaPlayerIE",(function(){var w=function(){var x;g('<object classid="'+t+'" />').each(function(){x=!!this.controls});return x};return function(){if(!w()){this.abort(i);return}this.buildAndReturn("mediaPlayerCommon")}})(),{attrs:{classid:t}});k.MediaObject.setBuilder("mediaPlayerMozillaWin",(function(){var w=function(){if(k.navigator.plugins!==d&&k.navigator.mimeTypes!==d){k.navigator.plugins.refresh();return(k.navigator.mimeTypes["application/x-ms-wmp"]!==d&&k.navigator.mimeTypes["application/x-ms-wmp"].enabledPlugin&&k.navigator.mimeTypes["application/x-ms-wmp"].enabledPlugin.description==="np-mswmp")}return false};return function(){if(!(g.browser.mozilla&&k.navigator.appVersion.indexOf("Win")!=-1)){this.abort(q);return}if(!w()){var A=this,z,y=this.createDialog(h),x=function(){k.clearTimeout(z);this.abort(j)};y.setAnswer(r,function(){y=A.createDialog("Attente du plugin Windows Media Player pour Firefox");y.setDefaultAnswer("Stopper l'attente");A.wait(y,x);k.open("http://medias2.francetv.fr/videosread/externe/wmv-firefox-plugin/WindowsMedia-Firefox-Plugin.exe")});y.setDefaultAnswer("Ne pas le télécharger");this.wait(y,x);z=k.setTimeout(function(){if(!w()){z=k.setTimeout(arguments.callee,k.MediaObject.pluginRefreshTime)}else{y.remove();A.buildAndReturn("mediaPlayerCommon")}},k.MediaObject.pluginRefreshTime);return}this.buildAndReturn("mediaPlayerCommon")}})(),{attrs:{type:"video/x-ms-wmv"}});k.MediaObject.setBuilder("mediaPlayerOthers",(function(){var w=function(x){if(k.navigator.plugins!==d&&k.navigator.mimeTypes!==d){k.navigator.plugins.refresh();return(k.navigator.mimeTypes[x]!==d&&k.navigator.mimeTypes[x].enabledPlugin)}};return function(){if(!w(this.options("attrs","type"))){this.abort("Aucun plugin adapté n'a été trouvé.");return}this.options("attrs","data",this.options("url"));this.buildAndReturn("mediaPlayerCommon")}})(),{attrs:{type:"video/x-ms-wmv"}});k.MediaObject.setBuilder("Flip4Mac",(function(){var x=/flip4mac.*?((2\.\d*[3-9]|\d*[3-9])(\.\d+)*)/i,y=function(){var B=0,C,z=[2,2.1,2.2,2.3],A=0;if(k.navigator.plugins!==d&&k.navigator.mimeTypes!==d){k.navigator.plugins.refresh();if(k.navigator.mimeTypes["application/x-mplayer2"]!==d&&k.navigator.mimeTypes["application/x-mplayer2"].enabledPlugin&&(C=k.navigator.mimeTypes["application/x-mplayer2"].enabledPlugin.name.match(x))){A=parseFloat(C[1]);while(z[++B]<=A){}A=z[B-1]}}return A||0},w=function(){this.options.transfert("attrs",["url","autostart"],{url:"src",autostart:"AutoStart"});this.options("params",{wmode:null});var A=this,z=this.build("generateEmbed");z.callbacks("finish",function(){if(!this.success){A.abort(this.result,this.resultOptions);return}A.setResult(g(this.result).bind("play",o).bind("pause",o).bind("stop",o).bind("kill",o).bind("hide",o).bind("show",o),this.resultOptions)});z.execute()};return function(){if(k.navigator.appVersion.indexOf("Mac")===-1){this.abort("Constructeur non adapté à la plateforme");return}var z=2.3,A=y(),D="http://www.apple.com/downloads/macosx/video/flip4macwindowsmediacomponentsforquicktime.html";if(A<z){var C=this,B,E,H=function(){B=C.createDialog("Un redémarage de votre navigateur sera nécéssaire");B.setDefaultAnswer("Fermer ce message");C.wait(B,F);k.open(D);G="Installation plugin Flip4Mac"},F=function(){k.clearTimeout(E);C.abort(G)},G;if(A===0){B=this.createDialog("Le plugin Flip4Mac n'est pas disponible sur votre navigateur");B.setAnswer("Télécharger ce plugin",H);G="Le plugin Flip4Mac ne semble pas disponible (refus install)"}else{B=this.createDialog("Le plug-in Flip4Mac disponible sur votre navigateur ne semble pas suffisemment à jour");B.setAnswer("Mettre à jour ce plugin",H);G="Le plugin Flip4Mac ne semble pas à jour (refus install). Version dispo : "+A}E=k.setTimeout(function(){var I=y();if(I===A){E=k.setTimeout(arguments.callee,k.MediaObject.pluginRefreshTime)}else{if(I<C.options("minVersion")){B.remove();B=C.createDialog("La version de Flash installée ne semble pas assez récente");B.setDefaultAnswer("Ok");G="echec mise à jour de Flash. Version dispo : "+A;C.wait(B,F);k.open(D)}else{B.remove();w.call(C)}}},k.MediaObject.pluginRefreshTime);B.setDefaultAnswer("Ne pas utiliser Flip4Mac");this.wait(B,F);return}w.call(this)}})(),{attrs:{type:"application/x-mplayer2",showControls:true,showStatusBar:false,scale:"ASPECT",kioskmode:true}})}(this,this.jQuery));(function(j,g,e){(function(r){for(var q in r){if(!r[q]){throw new Error("Dépendence non satisfaite : "+q)}}})({jQuery:!!g,MediaObject:!!j.MediaObject});var h="Un redémarage de votre navigateur sera probablement nécessaire",m="Fermer ce message",c="Installation plugin Flash",l="Le plugin Flash n'est pas disponible sur votre navigateur",p="Télécharger ce plugin",f="Le plugin Flash ne semble pas disponible (refus install)",d="Le plug-in Flash disponible sur votre navigateur ne semble pas suffisemment à jour",n="Mettre à jour ce plugin",k="Le plugin Flash ne semble pas à jour (refus install). Version dispo : [VERSION]",a="La version de Flash installée ne semble pas assez récente",b="Ok",i="echec mise à jour de Flash. Version dispo : [VERSION]",o="Ne pas utiliser Flash";j.MediaObject.setBuilder("flashObject",(function(){var r=function(){var v,t,u=0,s=[1,9,10];if(j.ActiveXObject!==e){try{v=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");t=parseFloat(v.GetVariable("$version").replace(/^[^\d]+/,""));v=null}catch(w){}}if(t===e&&(v=j.MediaObject.getPluginByType("application/x-shockwave-flash"))){t=parseFloat(v.description.replace(/^[^\d]+/,""))}if(!t){return 0}while(t>=s[++u]){}return s[u-1]},q=function(){var s=this.options("url");this.options("params",{movie:s});this.options("attrs",{data:s});if(!this.options.defined("attrs","id")){this.options("attrs","id","flashObject"+(+new Date))}this.buildAndReturn("generateObject")};return function(){var t=r(),u="http://get.adobe.com/flashplayer/";if(t<this.options("minVersion")){var y=this,v,x,w=function(){v=y.createDialog(h);v.setDefaultAnswer(m);y.wait(v,s);j.open(u);z=c},s=function(){j.clearTimeout(x);y.abort(z)},z;if(t===0){v=this.createDialog(l);v.setAnswer(p,w);z=f}else{v=this.createDialog(d);v.setAnswer(n,w);z=k.replace("[VERSION]",t)}x=j.setTimeout(function(){var A=r();if(A===t){x=j.setTimeout(arguments.callee,j.MediaObject.pluginRefreshTime)}else{if(A<y.options("minVersion")){v.remove();v=y.createDialog(a);v.setDefaultAnswer(b);z=i.replace("[VERSION]",t);y.wait(v,s);j.open(u)}else{v.remove();q.call(y)}}},j.MediaObject.pluginRefreshTime);v.setDefaultAnswer(o);this.wait(v,s);return}q.call(this)}})(),{width:400,height:400,minVersion:10,attrs:{type:"application/x-shockwave-flash",classid:(j.ActiveXObject!==e)?"clsid:D27CDB6E-AE6D-11CF-96B8-444553540000":e},params:{wmode:"transparent"},extensions:"swf"});j.MediaObject.setBuilder("flashPlayer",function(){this.options("params","flashvars",{});this.options("params","flashvars",this.options("fileKeyName"),this.options("url"));if(this.options.defined("autostart")){this.options("params","flashvars","autostart",this.options("autostart"))}this.options("url",this.options("player"));this.buildAndReturn("flashObject")},{player:"/layoutftv/players/jw_player/mediaplayer.swf",fileKeyName:"file",autostart:true,extensions:["mp4","flv"],types:"video/x-flv"});j.MediaObject.setBuilder("flashPlayerAudio","flashPlayer",{height:20,extensions:"mp3"})})(this,this.jQuery);(function(k,e,d){(function(x){for(var w in x){if(!x[w]){throw new Error("Dépendence non satisfaite : "+w)}}})({jQuery:!!e,MediaObject:!!k.MediaObject,"jQuery.cookie":!!e.cookie});var i="Silverlight non dispo et cookie noInstall",v="Le plugin Silverlight n'est pas disponible sur votre navigateur",l="Télécharger ce plugin",n="Attente de l'installation du plugin Silverlight",p="Stopper l'attente",s="Annulation de l'attente du plugin Silverlight",b="La version de Silverlight installée ne semble pas assez récente (installé : [VERSION], requis : [REQUIS])",t="version installée pas à jour",j="Le plugin Silverlight de votre navigateur ne semble pas à jour (installé : [VERSION], requis : [REQUIS])",o="Mettre à jour ce plugin",c="Après la mise à jour de Silverlight, vous devrez relancer votre navigateur pour que cette mise à jour soit prise en compte",h="Ne pas utiliser Silverlight",g="Refus téléchargement Silverlight",m="Identifiant Cappucino non disponible",q=[],a=[],f={load:"onLoad"};function r(x){var w=a.length;a[w]=x;q[w]={};return w}function u(w,x,A){if(q[w]===d){throw new Error("Impossible d'enregistrer cet événement : Objet non identifié")}var z,B=f[x]||x,y="SL_Event_"+w+"_"+B;if(q[w][B]===d){q[w][B]=[]}if(A instanceof Array){for(z=0;z<A.length;z++){if(typeof A[z]==="function"){q[w][B].push(A[z])}}}else{if(typeof A==="function"){q[w][B].push(A)}}k[y]=function(){for(var C=0;C<q[w][B].length;C++){q[w][B][C].apply(document.getElementById(a[w]+"")||this,arguments)}};return{eventName:B,handlerName:y}}k.MediaObject.setBuilder("SilverlightObject",(function(){var x=function(){var A,B,z,y=[1,2,3,4];if(k.ActiveXObject){try{B=new ActiveXObject("AgControl.AgControl");for(A=y.length;A>0;A--){if(B.IsVersionSupported((""+y[A-1]).replace(/^([^\.]*)$/,"$1.0"))){z=y[A-1];break}}B=null}catch(C){}}if(z===d&&(B=k.MediaObject.getPluginByType("application/x-silverlight"))){z=parseFloat(B.description);if(/\.so$/.test(B.filename)){if(z>=3&&z<3.1){z=2}}A=0;while(z>=y[++A]){}z=y[A-1]}if(!z){return 0}else{return z}},w=function(){this.options.transfert("params",["url","maxFramerate","framerate","windowless","isWindowless","background"],{url:"source",framerate:"maxFramerate",isWindowless:"windowless"});if(!this.options.defined("attrs","id")){this.options("attrs","id","Objet_Silverlight_"+(+(new Date)))}var B=this.options.raw("events"),z,A,y=r(this.options("attrs","id"));for(z in B){A=u(y,z,B[z]);this.options("params",A.eventName,A.handlerName)}this.buildAndReturn("generateObject")};return function(){var y=x(),B=this,z,A;if(y<this.options("minVersion")){if(e.cookie("noSilverlightDownload")||(e.cookie("silverlightInstallTries")>1)){this.abort(i);return}if(y===0){z=this.createDialog(v);z.setAnswer(l,function(){e.cookie("silverlightInstallTries",(parseInt(e.cookie("silverlightInstallTries"))||0)+1);z=B.createDialog(n);z.setDefaultAnswer(p);B.wait(z,function(){k.clearTimeout(A);B.abort(s)});k.open("http://go2.microsoft.com/fwlink/?LinkID=114576")});A=k.setTimeout(function(){k.clearTimeout(A);var C=x();if(C===y){A=k.setTimeout(arguments.callee,k.MediaObject.pluginRefreshTime)}else{if(C<B.options("minVersion")){z.remove();z=B.createDialog(b.replace("[VERSION]",C).replace("[REQUIS]",B.options("minVersion")));B.wait(z,function(){z.remove();k.clearTimeout(A);B.abort(t)});k.open("http://go2.microsoft.com/fwlink/?LinkID=114576")}else{z.remove();w.call(B)}}},k.MediaObject.pluginRefreshTime)}else{z=this.createDialog(j.replace("[VERSION]",y).replace("[REQUIS]",B.options("minVersion")));z.setAnswer(o,function(){z=B.createDialog(c);B.wait(z);k.open("http://go2.microsoft.com/fwlink/?LinkID=114576")})}z.setDefaultAnswer(h);this.wait(z,function(){e.cookie("noSilverlightDownload","true");k.clearTimeout(A);B.abort(g)});return}e.cookie("silverlightInstallTries",null);e.cookie("noSilverlightDownload",null);w.call(this)}})(),{width:400,height:400,background:"transparent",minVersion:3,paramsSeparator:",",maxFramerate:d,attrs:{data:"data:application/x-silverlight,",type:"application/x-silverlight"},params:{autoUpgrade:false,minRuntimeVersion:"3.0.40624.0",EnableGPUAcceleration:true},extensions:["xap","xaml"]});k.MediaObject.setBuilder("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"});if(this.options.defined("streamsense")){var w=this.options("streamsense","clipAttrs");this.options("events","load",[this.options("events","load"),function(x){var y=new ns_.StreamSense(x.findName("mediaElement"));y.getClip().setAttributes(w)}])}this.options("url",this.options("player"));this.buildAndReturn("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});k.MediaObject.setBuilder("SilverlightPlayerVideo",function(){this.options.transfert("params",["url","cappuid"],{url:"videourl",cappuid:"videoid"});this.buildAndReturn("SilverlightPlayer")},{extensions:["asx","wmv","wsx","mp4"]});k.MediaObject.setBuilder("SilverlightPlayerAudio","SilverlightPlayerVideo",{height:100,autohidebuttons:false,extensions:["wma","mp3"]})})(this,this.jQuery);(function(l,e,b){(function(D){for(var C in D){if(!D[C]){throw new Error("Dépendence non satisfaite : "+C)}}}({jQuery:!!e,EventsManager:!!l.EventsManager,StatesManager:!!l.StatesManager,DynamicOptionsManager:!!l.dynamicOptionsManager}));var B="/appftv/webservices/video/getInfosVideo.php?src=cappuccino&video-type=liste&template=ftvi&template-format=vignette&id-externe=",A="/appftv/webservices/video/getInfosVideo.php?src=cappuccino&video-type=simple&template=ftvi&template-format=complet&id-externe=",v="/appftv/webservices/video/lecture.php?id-video-ext=",p={"":"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"},w={"":"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/",m="http://info.francetelevisions.fr/?id-video=",r=/^\/geoloc(\/([^\/]*)\/.*)$/,h=40,g=false,n=false,s={},t={},c={},i=new l.StatesManager.StateList({INSTANCIATING:{initial:true},REQUESTING:{event:"requesting"},ERROR:{event:"requestError"},SUCCESS:{event:"requestSuccess"}});function o(ah,aB,E){var N=this,ad,ai=3,ax=e([]),R,ak,X;function D(aD){try{ad.setState("REQUESTING").whenFinished(aD)}catch(aC){}}function aA(aC){ax=aC;R=ax.length!==0;if(R){ak=ax.children("statut").text()==="online";ax.children().each(function(){if(this.childNodes.length===1&&this.childNodes[0].nodeType===4){N[this.nodeName]=e(this).text()}});X.trigger("objetCappuReady")}else{X.trigger("noObjetCappu")}ad.setState("SUCCESS")}function P(){try{ad.setState("ERROR")}catch(aC){}if(ai--){l.setTimeout(aj,500)}else{ai=3}}function aj(){k(N)}function ao(){N.requestState=ad.toString()}function at(){X=new l.EventsManager(N,E);ad=new l.StatesManager(X,"requestState",i);ao();ad.onStateChange=ao;aB=!!aB;c[ah]={setRequesting:D,setRequestSuccess:aA,setRequestError:P};aj()}this.getRawData=function az(){return ax?ax.clone():ax};this.exists=function C(){return R};this.isPublished=function S(){return ak};this.isDirect=function U(){return ax.find("> type > libelle").text()==="LIEN_EXTERNE"&&N.duree!=="00:00:00"};this.isDirectFinished=function ar(){var aF=N.getDatesDiffusions(),aE,aD,aC;if(aF.length){aE=N.getDuree().split(":");aD=(aF[aF.length-1]*1)+(aE[0]*3600)+(aE[1]*60)+(aE[2]*1);aC=Math.floor(new Date/1000);return aC>=aD}return true};this.isComplet=function af(){return aB};this.setComplet=function av(){if(!aB){aB=true;ad.resetStateEvents();X.resetTriggeredState("objetCappuReady");X.resetTriggeredState("noObjetCappu");N.refreshData()}};this.refreshData=function H(){aj()};this.getIdExterne=this.getId=function O(){return ah};this.getType=function W(){return ax.children("type").children("libelle").text()};this.getTypeEditorial=function K(){return ax.children("type-editorial").children("libelle").text()};this.getTitreCourt=function L(){return ax.children("titre-public").text()};this.getTitreLong=function aa(){return ax.children("accroche").text()};this.getCategories=function G(){return ax.children("categories").children("categorie").map(function(){return{id:e(this).children("id").text(),"nom-public":e(this).children("nom-public").text()}}).get()};this.getCategorie=function F(){return N.getCategories()[0]};this.getDuree=function Q(){return ax.children("duree").text()};this.getChaines=function ay(){return ax.children("chaines").children("chaine").map(function(){return e(this).children("libelle").text()}).get()};this.getImages=function ae(){return ax.children("images").children("image").map(function(){return d+e(this).children("url").text()}).get()};this.getDatePublication=function ab(){return ax.children("dates").children("publication").text()};this.getDateDepublication=function V(){return ax.children("dates").children("depublication").text()};this.getDatesDiffusions=function ac(){return ax.children("dates").children("diffusions").children("diffusion").children("date").map(function(){return e(this).text()}).get()};this.getGeolocalisation=function M(){return ax.children("geolocalisation").text()};this.getRegion=function Y(){return ax.children("region").text()};this.getMotsCles=function au(){return ax.children("mots-cles").children("mot-cle").map(function(){return e(this).children("libelle").text()}).get()};this.getSources=function J(){return ax.children("sources").children("source").map(function(){return e(this).children("nom").text()}).get()};this.getAuteurs=function ap(){return ax.children("auteurs").children("auteur").map(function(){return e(this).children("nom-prenom").text()}).get()};this.getVignette=function Z(){return N.getImages()[0]};this.getURL=function al(){return m+ah};this.getFichiers=function(aC){aC=aC!==false;if(ax.find("> type > libelle").text()==="LIEN_EXTERNE"){aC=false}return ax.children("fichiers").children("fichier").map(function(){var aH,aE,aG,aD="",aF=e(this).children("chemin").text();if(aC){aE=r.exec(aF);aG=aE?aE[2]:"";if(e(this).children("extension").text()==="MP4"){aH=w}else{aH=p;aF=aE?aE[1]:aF}aD=aH[aG]||aH[""]}return{position:e(this).children("position").text(),url:aD+aF+e(this).children("nom").text()}}).get()};this.getUrlFlux=function am(){return(N.getFichiers()[0]||{}).url};this.getUrlSmooth=function aq(){return(N.isDirect()&&ax.children("sites").children("site").filter(function(){return !!e(this).children("libelle:contains(URL_SMOOTH)").length}).eq(0).children("url").text())||b};this.getExtensions=function(aC){return ax.children("fichiers").children("fichier").map(function(){var aD=e(this).children("extension").text();if(aC===true){aD=aD.toLowerCase()}return aD}).get()};this.getChapitres=function aw(){return ax.children("sequences").children("sequence").map(function(){return{position:e(this).children("position").text(),titre:e(this).children("titre").text(),resume:e(this).children("resume").text(),debut:e(this).children("timecode-debut").text(),fin:e(this).children("timecode-fin").text()}}).get()};this.getLiens=function ag(){return ax.children("sites").children("site").map(function(){return{position:e(this).children("position").text(),libelle:e(this).children("libelle").text(),url:e(this).children("url").text()}}).get()};this.getSignaletiqueCSA=function T(){return ax.children("signaletique-csa").text()};this.getResume=function an(){return ax.children("resume").text()};this.getSousTitres=function I(){return ax.children("sous-titrage").children("fichier-sous-titres").filter(function(){return !!e(this).children("nom:contains(synthe)").length}).map(function(){return"sami:http://cappuccino.francetv.fr/ref/soustitres/"+e(this).children("url").text()}).get()};at()}function k(C){var D=C.getId();if(s[D]!==b){return}s[D]=C;c[D].setRequesting(q)}function q(){if(g||n){return}var E,D=[],C=false;n={};for(E in s){if(s[E].isComplet()){if(D.length!==0){continue}C=true}n[E]=s[E];D.push(E);delete (s[E]);if(C||D.length>=h){break}}if(!D.length){n=false;return}if(D.length===1&&!D[0]){y(e([]));return}D=(C?A:B)+D.join("+OR+");e.ajax({url:D,dataType:"xml",timeout:15000,success:y,error:f,complete:x})}function y(D){var E,C=e("video",D.documentElement||D);for(E in n){c[E].setRequestSuccess(C.filter(function(){return(e(this).children("id-externe").text()===E)}))}}function f(D,C){for(var E in n){c[E].setRequestError(D,C)}}function x(){n=false;q()}l.ObjetCappu=l.ObjetCappu||{get:function j(G,E,F){if(G instanceof Array){var D,C=[];for(D=0;D<G.length;D++){C.push(l.ObjetCappu.get(G[D],E,F))}return C}if(typeof E==="boolean"){F=E;E=b}else{F=F===true}if(t[G]===b){t[G]=new o(G,F,E)}else{if(E!==b){t[G].addEventListeners(E)}if(F){t[G].setComplet()}}return t[G]},pauseRequests:function u(C){g=C!==false;q()},playRequests:function a(){l.ObjetCappu.pauseRequests(false)},registerPlayCount:function z(C){if(t[C]===b){throw new Error("ObjetCappu non instancié, impossible de décompter une lecture")}e.ajax({url:v+C,dataType:"text",timeout:4000})}}}(this,this.jQuery));(function(d,e,b){(function(j){for(var h in j){if(!j[h]){throw new Error("Dépendence non satisfaite : "+h)}}})({jQuery:!!e,MediaObject:!!d.MediaObject,getQueryStringValue:!!(String&&String.prototype.getQueryStringValue),ObjetCappu:!!d.ObjetCappu});var a="Impossible d'obtenir les infos dans le temps imparti pour l'identifiant \"[CAPPUID]\"",g="Impossible d'obtenir les infos pour l'identifiant \"[CAPPUID]\"",c="Identifiant Cappucino non disponible",f="noinfo";d.MediaObject.setBuilder("cappuccino",function(){var j=this,i=(this.options("url")||"").getQueryStringValue("id-video"),l=false;function h(n){j.options("cappuid",i);j.options("streamsense","clipAttrs",{ftvi_site:d.ftvi_section||f,playlistTitle:d.ftvi_section||f,ftvi_channel:d.ftvi_portail||f,ftvi_region:n.getRegion(),stationName:n.getChaines()[0],ftvi_videotype:n.getTypeEditorial(),episodeTitle:n.getTitreCourt(),length:n.getDuree(),programTitle:(n.getCategorie()||{})["nom-public"],productionDate:n.getDatesDiffusions()[0],ftvi_genre:f,episodePart:f,streamType:f,ftvi_publicite:f,ftvi_publicite_cible:f});var m=new Date(parseInt(n.getDatesDiffusions()[0])*1000);j.options("streamsense","clipAttrs","productionDate",m.getFullYear()+("-"+(m.getMonth()+1)).replace(/^-(\d)$/,"-0$1")+("-"+(m.getDay()+1)).replace(/^-(\d)$/,"-0$1"));j.options("url",(n.getFichiers()[0]||{}).url);j.options("extension",n.getExtensions(true)[0]);j.options("soustitre",n.getSousTitres()[0]);j.buildAndReturn()}function k(m){if(!l){l=true;j.abort(m)}}d.ObjetCappu.get(i,{objetCappuReady:[function(){if(this.isPublished()){l=true;h(this)}else{k("Object Cappuccino non publié")}},1],noObjetCappu:[function(){k("Object Cappuccino n'existe pas")},1],requestError:[function(){k("Echec de récupération des données Cappuccino")},1]},true);this.wait(15,function(){k("Echec de récupération des données Cappu dans le temps imparti")})},{types:"video/cappuccino"})})(this,this.jQuery);(function(c,d,b){(function(f){for(var e in f){if(!f[e]){throw new Error("Dépendence non satisfaite : "+e)}}})({dynamicOptionsManager:!!c.dynamicOptionsManager,callbacksManager:!!c.callbacksManager,jQuery:!!d,"jQuery.mediaObject":!!(d&&d.fn&&d.fn.mediaObject)});var a=c.PreRoll=function(h,k){if(!(this instanceof a)){return new a(h,k)}this.uid=+new Date;this.options=c.dynamicOptionsManager.call(this,a.defaultOptions,k);var e=d(h||[]),z=function(){m.options("preFinish",null);m.options("postFinish",null);l.bind("click",u).bind("dblclick",u).bind("mousedown",u);d(c).unload(C);p()},B=function(){if(g()){l.after(h).remove()}},r=function(){if(!g()){e.after(l).appendTo(d('<div style="display:none;" />'))}else{t()}},g=function(){if((l.parents("body").length===0)){if(e.parents("body").length===0){C();throw f}return false}return true},t=function(){c.clearTimeout(o);l.empty()},p=function(){if(m.options("playButtonVisible")){try{r();l.append(n)}catch(G){if(G!==f){throw G}}}else{y()}},y=function(){var G=false;v=m.pub=v.add(d('<div style="display: none;" />').append(!d.browser.msie?d(m.options("pubSelector")).children().not("script").clone():(function(){var J=d(m.options("pubSelector")),I=J.html()||"",H=J.find("param").filter(function(){return/^flashvars$/i.test(this.name)}).attr("value");return I.replace(/<script(.|\s)*?\/script>/ig,"").replace(/<param( name="flashvars"| value="[^"]*"){2}(\s*\/?>)/ig,'<param name="flashvars" value="'+H+'"$2')})()).find("object").each(function(){G=true;return false}).end().contents().filter(function(){return this.nodeType==1}).css({position:"relative","z-index":1}).filter(function(){return this.id==="FinContentMiddle31"&&d(this).children().length===0}).css("display","none").end().filter(function(){return G&&this.tagName==="IMG"}).css("display","none").end().end().add(s));if(m.options("pubVisible")){if(m.options("logoVisible")){q()}else{i()}}else{F()}},q=function(){try{r();l.append(j);if(d.browser.msie){j.css(m.options("logoCss"))}o=c.setTimeout(i,m.options("logoTime")*1000)}catch(G){if(G!==f){throw G}}},i=function(){try{r();l.hide().append(v).show();A=c.setInterval(w,1000);w()}catch(G){if(G!==f){throw G}}},w=function(){try{if(!g()){return}else{if(--x>0){s.html(m.options("rebourText"))}else{c.clearInterval(A);F()}}}catch(G){if(G!==f){throw G}}},F=function(){t();E("preFinish",D,1);E("preFinish")},D=function(){B();E("postFinish",C,1);E("postFinish")},u=(function(){var G=0;return function(H){if(H.type==="mousedown"||(H.type==="dblclick"&&!d.browser.msie)||!d(s).add(j).add(n).add(n.children()).add(l).filter(function(){return this===H.target}).length){return false}if(++G===4){F()}c.setTimeout(function(){G--},450);return false}})(),C=function(){c.clearTimeout(o);c.clearInterval(A);n.find("."+m.options("playButtonClickCls")).unbind();j.unbind();l.unbind();delete (m.chrono);delete (m.logo);delete (m.pub);delete (m.wrapper);delete (n);delete (j);delete (s);delete (v);delete (l);delete (e);delete (h);delete (m)},m=this,A,o,f={},E=c.callbacksManager(this,{preFinish:this.options.raw("preFinish"),postFinish:this.options.raw("postFinish")}),x=m.options("pubTime")+1,n=d("<div />").append(d(m.options("playButton"))).find("."+m.options("playButtonClickCls")).one("click",y).end().contents(),j=this.logo=d('<img src="'+m.options("logoUrl")+'" alt="'+m.options("logoAlt")+'" />').load(function(){if(d.browser.msie){return}d(this).css(m.options("logoCss"))}),s=d("<div />").css(m.options("rebourCss")),v=this.pub=d([]),l=this.wrapper=d("<div />").css(m.options("wrapperCss"));this.chrono=function(){return x};z()};a.defaultOptions={pubWidth:300,pubHeight:250,minWidth:function(){return this.options("pubWidth")},minHeight:function(){return this.options("pubHeight")},wrapperCss:function(){var g=+(this.options("width")||0),e=+(this.options("height")||0),f=+this.options("pubHeight"),h;if(this.options("pubVisible")){h=this.options(["minHeight","minWidth"]);g=(g<h.minWidth)?+h.minWidth:g;e=(e<h.minHeight)?+h.minHeight:e}else{f=e}this.options("height",e);this.options("width",g);return{display:"block",position:"relative",width:g+"px",height:(f+((e-f)/2))+"px","padding-top":((e-f)/2)+"px",background:"black",overflow:"hidden","text-align":"center",color:"white"}},playButtonVisible:true,playButtonClickCls:"preRollPlay",playButton:function(){return d([]).add(this.options("playButtonBg")||d([])).add(this.options("playButtonMasqueBg")||d([])).add(this.options("playButtonFg")||d([])).add(this.options("playButtonMasqueFg")||d([]))},playButtonBg:function(){return d(this.options("playButtonBgObject")).css(this.options("playButtonBgCss"))},playButtonBgObject:function(){return d('<img src="'+this.options("playButtonBgSrc")+'" />').mediaObject({quiet:true})},playButtonBgSrc:"/layoutftv/arches/common/images/video/playButtonBg.swf",playButtonBgCss:{position:"absolute",top:0,left:0,height:"100%",width:"100%"},playButtonMasqueBgVisible:function(){return this.options.raw("playButtonBgSrc")!==a.defaultOptions.playButtonBgSrc||this.options.raw("playButtonBgObject")!==a.defaultOptions.playButtonBgObject},playButtonMasqueBg:function(){if(!this.options("playButtonMasqueBgVisible")){return}return d("<div />").css(this.options("playButtonMasqueBgCss"))},playButtonMasqueBgCss:{position:"absolute","z-index":"1",top:"0",left:"0",width:"100%",height:"100%",background:"black",opacity:"0.2"},playButtonFg:(function(){var e={};return function(){if(e[this.uid]===b){e[this.uid]=d('<img src="'+this.options("playButtonFgSrc")+'" alt="Cliquez pour voir la vidéo" />').mediaObject({quiet:true}).css(this.options("playButtonFgCss"))}return e[this.uid]}})(),playButtonFgSrc:"/layoutftv/arches/common/images/video/playButton.swf",playButtonFgCss:{position:"absolute","z-index":"2",top:"50%",left:"50%","margin-top":"-40px","margin-left":"-90px",height:"80px",width:"180px"},playButtonMasqueFg:function(){var e=this.options("playButtonFg").get(0);return d('<div class="'+this.options("playButtonClickCls")+'" />').css(this.options("playButtonMasqueFgCss")).bind("mouseover",function(){if(typeof e.mouseover==="function"){e.mouseover()}})},playButtonMasqueFgCss:{position:"absolute","z-index":"3",top:"0",left:"0",width:"100%",height:"100%",background:"black",opacity:"0",cursor:"pointer"},logoVisible:true,logoTime:2,logoUrl:function(){return"/layoutftv/arches/common/images/video/ecran-"+this.options("portail")+".jpg"},logoAlt:function(){return"Publicité "+this.options("portail")},logoCss:{position:"absolute",top:function(){return(+this.options("height")-this.logo.get(0).height)/2},left:function(){return(+this.options("width")-this.logo.get(0).width)/2}},pubVisible:function(){var e=((c.forceactivepub===true)||(c.activepub===true&&(d(this.options("pubSelector")).children().not("script").length>0)));this.options("pubVisible",e);return e},pubSelector:"#adMiddle03,#eGetPubMiddle3",pubTime:function(){return(typeof timepub==="number")?timepub:5},rebourCss:{position:"absolute","z-index":2,bottom:"2px",left:"0",width:"100%","font-weight":"bold","line-height":"1em",cursor:"default"},rebourText:function(){return this.chrono()+" seconde"+(this.chrono()>1?"s":"")+" avant votre vidéo"},portail:typeof ftvi_portail=="string"?ftvi_portail:"france2",preFinish:b,postFinish:b};d.fn.preRoll=function(e){var f=this;e=c.dynamicOptionsManager.call(this,e);this.each(function(){if(d(this).is("a")&&!e.defined("playButtonBgSrc")&&!e.defined("playButtonBgObject")){if(d(this).children("object").length){e("playButtonBgObject",d(this).children("object"))}else{if(d(this).children("img").length){e("playButtonBgSrc",d(this).children("img").attr("src"))}}}var g=new a(this,e);f=f.add(g.wrapper||[])});return f}})(this,this.jQuery);(function(c,d,b){(function(f){for(var e in f){if(!f[e]){throw new Error("Dépendence non satisfaite : "+e)}}})({dynamicOptionsManager:!!c.dynamicOptionsManager,jQuery:!!d,"jQuery.mediaObject":!!(d&&d.fn&&d.fn.mediaObject),"jQuery.preRoll":!!(d&&d.fn&&d.fn.preRoll),"jQuery.mediaObjectPreRoll already exists":!!(d&&d.fn&&!d.fn.mediaObjectPreRoll)});var a=function(){var g=c.dynamicOptionsManager(),e=this.result,f=d("<span/>");this.result=f;g(this.resultOptions(["width","height"]));g(this.resultOptions.raw("preRollOptions"));g("postFinish",[function(){f.after(e).remove()},g.raw("postFinish")]);this.callbacks("finish",function(){this.result.preRoll(g)})};d.fn.mediaObjectPreRoll=function(f){var e=d([]);f=c.dynamicOptionsManager(f);f("callbacks","success",[f.raw("callbacks","success"),a]);this.each(function(){var h=c.dynamicOptionsManager(f),g=d(this);if(g.is("a")&&!h.defined("preRollOptions","playButtonBgSrc")&&!h.defined("preRollOptions","playButtonBgObject")){if(g.children("object").length){h("preRollOptions","playButtonBgObject",g.children("object"))}else{if(g.children("img").length){h("preRollOptions","playButtonBgSrc",g.children("img").attr("src"))}}}if(!h.defined("autostart")){h("autostart",true)}e=e.add(g.mediaObject(h))});return e}})(this,this.jQuery);