if(!this.JSON){this.JSON={}}(function(){function f(n){return n<10?"0"+n:n}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf()}}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+string+'"'}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key)}if(typeof rep==="function"){value=rep.call(holder,key,value)}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||"null"}v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";gap=mind;return v}if(rep&&typeof rep==="object"){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==="string"){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}v=partial.length===0?"{}":gap?"{\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";gap=mind;return v}}if(typeof JSON.stringify!=="function"){JSON.stringify=function(value,replacer,space){var i;gap="";indent="";if(typeof space==="number"){for(i=0;i<space;i+=1){indent+=" "}}else{if(typeof space==="string"){indent=space}}rep=replacer;if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number")){throw new Error("JSON.stringify")}return str("",{"":value})}}if(typeof JSON.parse!=="function"){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==="object"){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v}else{delete value[k]}}}}return reviver.call(holder,key,value)}cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})}if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j}throw new SyntaxError("JSON.parse")}}}());if(!window.DM){DM={_apiKey:null,_session:null,_userStatus:"unknown",_logging:true,_domain:{api:"https://api.dailymotion.com",www:"http://www.dailymotion.com",cdn:"//api.dmcdn.net"},copy:function(f,d,b,a){for(var c in d){if(b||typeof f[c]==="undefined"){f[c]=a?a(d[c]):d[c]}}return f},create:function(d,h){var g=window.DM,a=d?d.split("."):[],k=a.length;for(var f=0;f<k;f++){var b=a[f];var j=g[b];if(!j){j=(h&&f+1==k)?h:{};g[b]=j}g=j}return g},provide:function(c,b,a){return DM.copy(typeof c=="string"?DM.create(c):c,b,a)},guid:function(){return"f"+(Math.random()*(1<<30)).toString(16).replace(".","")},log:function(a){if(DM._logging){if(window.Debug&&window.Debug.writeln){window.Debug.writeln(a)}else{if(window.console){window.console.log(a)}}}if(DM.Event){DM.Event.fire("dm.log",a)}},error:function(a){if(window.console){window.console.error(a)}if(DM.Event){DM.Event.fire("dm.error",a)}},$:function(a){if(typeof a=="string"){a=document.getElementById(a)}return a},parseBool:function(a){if(a===true||a===false){return a}if(a===0){return false}if(typeof a=="string"){return !a.match(/^(?:|false|no|off|0)$/i)}return !!a},type:function(f){if(!DM._class2type){DM._class2type={};var d="Boolean Number String Function Array Date RegExp Object".split(" ");for(var c=0,a=d.length;c<a;c++){var b=d[c];DM._class2type["[object "+b+"]"]=b.toLowerCase()}}return f===null?String(f):DM._class2type[Object.prototype.toString.call(f)]||"object"}}}DM.provide("JSON",{stringify:function(a){if(window.Prototype&&Object.toJSON){return Object.toJSON(a)}else{return JSON.stringify(a)}},parse:function(a){return JSON.parse(a)},flatten:function(c){var d={};for(var a in c){if(c.hasOwnProperty(a)){var b=c[a];if(null===b||undefined===b){continue}else{if(typeof b=="string"){d[a]=b}else{d[a]=DM.JSON.stringify(b)}}}}return d}});DM.provide("Array",{indexOf:function(a,d){if(a.indexOf){return a.indexOf(d)}var c=a.length;if(c){for(var b=0;b<c;b++){if(a[b]===d){return b}}}return -1},merge:function(c,b){for(var a=0;a<b.length;a++){if(DM.Array.indexOf(c,b[a])<0){c.push(b[a])}}return c},filter:function(c,f){var a=[];for(var d=0;d<c.length;d++){if(f(c[d])){a.push(c[d])}}return a},keys:function(d,c){var a=[];for(var b in d){if(c||d.hasOwnProperty(b)){a.push(b)}}return a},map:function(a,c){var b=[];for(var d=0;d<a.length;d++){b.push(c(a[d]))}return b},forEach:function(g,d,f){if(!g){return}if(Object.prototype.toString.apply(g)==="[object Array]"||(!(g instanceof Function)&&typeof g.length=="number")){if(g.forEach){g.forEach(d)}else{for(var c=0,a=g.length;c<a;c++){d(g[c],c,g)}}}else{for(var b in g){if(f||g.hasOwnProperty(b)){d(g[b],b,g)}}}}});DM.provide("Cookie",{_domain:null,_enabled:false,setEnabled:function(a){DM.Cookie._enabled=a},getEnabled:function(){return DM.Cookie._enabled},load:function(){var a=document.cookie.match("\\bdms_"+DM._apiKey+'="([^;]*)\\b'),b;if(a){b=DM.QS.decode(a[1]);b.expires=parseInt(b.expires,10);DM.Cookie._domain=b.base_domain}return b},setRaw:function(c,a,b){document.cookie="dms_"+DM._apiKey+'="'+c+'"'+(c&&a==0?"":"; expires="+new Date(a*1000).toGMTString())+"; path=/"+(b?"; domain=."+b:"");DM.Cookie._domain=b},set:function(a){if(a){DM.Cookie.setRaw(DM.QS.encode(a),a.expires,a.base_domain)}else{DM.Cookie.clear()}},clear:function(){DM.Cookie.setRaw("",0,DM.Cookie._domain)}});DM.provide("EventProvider",{subscribers:function(){if(!this._subscribersMap){this._subscribersMap={}}return this._subscribersMap},subscribe:function(b,a){var c=this.subscribers();if(!c[b]){c[b]=[a]}else{c[b].push(a)}},unsubscribe:function(b,a){var c=this.subscribers()[b];DM.Array.forEach(c,function(f,d){if(f==a){c[d]=null}})},monitor:function(b,d){if(!d()){var a=this,c=function(){if(d.apply(d,arguments)){a.unsubscribe(b,c)}};this.subscribe(b,c)}},clear:function(a){delete this.subscribers()[a]},fire:function(){var b=Array.prototype.slice.call(arguments),a=b.shift();DM.Array.forEach(this.subscribers()[a],function(c){if(c){c.apply(this,b)}})}});DM.provide("Event",DM.EventProvider);DM.provide("",{init:function(a){a=DM.copy(a||{},{logging:true});DM._apiKey=a.apiKey;if(!a.logging&&window.location.toString().indexOf("dm_debug=1")<0){DM._logging=false}if(DM._apiKey){DM.Cookie.setEnabled(a.cookie);a.session=a.session||DM.Auth._receivedSession||DM.Cookie.load();DM.Auth.setSession(a.session,a.session?"connected":"unknown");if(a.status){DM.getLoginStatus()}}}});window.setTimeout(function(){if(window.dmAsyncInit){dmAsyncInit()}},0);DM.provide("QS",{encode:function(d,a,b){a=a===undefined?"&":a;b=b===false?function(f){return f}:encodeURIComponent;var c=[];DM.Array.forEach(d,function(g,f){if(g!==null&&typeof g!="undefined"){c.push(b(f)+"="+b(g))}});c.sort();return c.join(a)},decode:function(g){var c=decodeURIComponent,f={},b=g.split("&"),a,d;for(a=0;a<b.length;a++){d=b[a].split("=",2);if(d&&d[0]){f[c(d[0])]=d[1]?c(d[1].replace(/\+/g,"%20")):""}}return f}});DM.provide("",{api:function(){DM.ApiServer.call.apply(DM.ApiServer,arguments)}});DM.provide("ApiServer",{type:null,METHODS:["get","post","delete"],_callbacks:{},_calls:[],call:function(){var b=Array.prototype.slice.call(arguments),f=b.shift(),d=b.shift(),h,g,a;while(d){var c=typeof d;if(c==="string"&&!h){h=d.toLowerCase()}else{if(c==="function"&&!a){a=d}else{if(c==="object"&&!g){g=d}else{DM.log("Invalid argument passed to DM.api(): "+d);return}}}d=b.shift()}h=h||"get";g=g||{};if(f[0]==="/"){f=f.substr(1)}if(DM.Array.indexOf(DM.ApiServer.METHODS,h)<0){DM.log("Invalid method passed to DM.api(): "+h);return}DM.ApiServer.transport(f,h,g,a)},transport:function(c,f,d,a){try{DM.ApiServer.xhr();DM.ApiServer.transport=DM.ApiServer.ajax;DM.ApiServer.type="ajax"}catch(b){DM.ApiServer.transport=DM.ApiServer.jsonp;DM.ApiServer.type="jsonp"}DM.ApiServer.transport(c,f,d,a)},jsonp:function(k,a,f,d){var h=DM.guid(),j=document.createElement("script");f.method=a;f.callback="DM.ApiServer._callbacks."+h;for(var c in f){if(f.hasOwnProperty(c)){if(DM.type(f[c])=="array"){f[c]=f[c].join(",")}}}if(DM.getSession){var i=DM.getSession();if(i&&i.access_token&&!f.access_token){f.access_token=i.access_token}}var b=(DM._domain.api+"/"+k+(k.indexOf("?")>-1?"&":"?")+DM.QS.encode(f));if(b.length>2000){throw new Error("JSONP only support a maximum of 2000 bytes of input.")}DM.ApiServer._callbacks[h]=function(g){if(d){d(g)}delete DM.ApiServer._callbacks[h];j.src=null;j.parentNode.removeChild(j)};j.src=b;document.getElementsByTagName("head")[0].appendChild(j)},ajax:function(b,d,c,a){DM.ApiServer._calls.push({path:b,method:d,params:c,cb:a});DM.ApiServer.ajaxHandleQueue()},ajaxHandleQueue:function(){if(!DM.ApiServer._callTimeout&&DM.ApiServer._calls.length>0&&!DM.ApiServer._pendingCalls){DM.ApiServer._callTimeout=setTimeout(function(){DM.ApiServer.ajaxUnqueue();delete DM.ApiServer._callTimeout},0)}},ajaxUnqueue:function(){var c=[],h=DM._domain.api;for(var b=0,a=DM.ApiServer._calls.length;b<a;b++){var d=DM.ApiServer._calls[b];c.push({call:d.method.toUpperCase()+" /"+d.path,args:d.params,id:b})}DM.ApiServer._pendingCalls=DM.ApiServer._calls;DM.ApiServer._calls=[];if(DM.getSession){var f=DM.getSession();if(f&&f.access_token){h+="?access_token="+encodeURIComponent(f.access_token)}}var g=DM.ApiServer.xhr();g.open("POST",h);g.setRequestHeader("Content-type","application/x-www-form-urlencoded");g.send(DM.JSON.stringify(c));g.onreadystatechange=function(){if(g.readyState==4){var j={error:{code:500,message:"Invalid server response",type:"transport_error"}};try{var o=DM.JSON.parse(g.responseText);if(DM.type(o)=="array"){for(var n=0,k=o.length;n<k;n++){var m=o[n];d="id" in m&&DM.ApiServer._pendingCalls[m.id]?DM.ApiServer._pendingCalls[m.id]:null;if(!d){DM.error("Response with no valid call id: "+DM.JSON.stringify(m));continue}if(d.cb){d.cb(m.result?m.result:m)}DM.ApiServer._pendingCalls[m.id]=null}}else{if(DM.type(o)=="object"&&"error" in o){j=o}}}catch(p){DM.error("Cannot parse multicall response: "+g.responseText)}DM.Array.forEach(DM.ApiServer._pendingCalls,function(i){if(i&&i.cb){i.cb(j)}});delete DM.ApiServer._pendingCalls;DM.ApiServer.ajaxHandleQueue()}}},xhr:function(){var a=new window.XMLHttpRequest();if(!("withCredentials" in a)){throw new Error("Browser is not CORS capable")}return a}});DM.provide("",{getLoginStatus:function(a){if(a){a({status:DM._userStatus,session:DM._session})}},getSession:function(){if(DM._session&&"expires" in DM._session&&new Date().getTime()>DM._session.expires*1000){DM.Auth.setSession(null,"notConnected")}return DM._session},login:function(h,a){var g=typeof window.screenX!="undefined"?window.screenX:window.screenLeft,d=typeof window.screenY!="undefined"?window.screenY:window.screenTop,m=typeof window.outerWidth!="undefined"?window.outerWidth:document.documentElement.clientWidth,k=typeof window.outerHeight!="undefined"?window.outerHeight:(document.documentElement.clientHeight-22),b=600,l=420,f=parseInt(g+((m-b)/2),10),j=parseInt(d+((k-l)/2.5),10),c="width="+b+",height="+l+",left="+f+",top="+j;a=DM.copy(a||{},{client_id:DM._apiKey,response_type:"token",display:"popup",scope:"",redirect_uri:document.location.href,state:"dmauth_"+DM.guid()});if(a.display==="popup"){var i=window.open(DM.Auth.authorizeUrl+"?"+DM.QS.encode(a),"dmauth",c);if(h){DM.Auth._active[a.state]={cb:h,win:i};DM.Auth._popupMonitor()}}else{location.href=DM.Auth.authorizeUrl+"?"+DM.QS.encode(a)}},logout:function(a){DM.api("/logout",a);DM.Auth.setSession(null,"notConnected")}});DM.provide("Auth",{authorizeUrl:DM._domain.api+"/oauth/authorize",_active:{},_receivedSession:null,readFragment:function(){var b=window.location.hash.replace("%23","#"),a=b.substr(b.lastIndexOf("#")+1);if(a.indexOf("access_token=")>=0||a.indexOf("error=")>=0){var c=DM.QS.decode(a);if(window.opener&&window.opener.DM.Auth.setSession&&window.name=="dmauth"&&window.opener.name!="dmauth"){document.documentElement.style.display="none";window.opener.DM.Auth.recvSession(c)}else{if(c&&("state" in c)&&c.state.indexOf("dmauth_")==0){if("access_token" in c){DM.Auth._receivedSession=c}window.location.hash=b.substr(0,b.lastIndexOf("#"))}}}},recvSession:function(a){if(!a){DM.error("Received invalid session")}if("error" in a){DM.error("Received auth error `"+a.error+"': "+a.error_description)}if(!("state" in a)){DM.error("Received a session with not `state' field");return}if(!(a.state in DM.Auth._active)){DM.error("Received a session from an inactive window");return}DM.Auth._active[a.state].session=a},setSession:function(i,c){var f=!DM._session&&i,b=DM._session&&!i,h=false,a=f||b||(DM._session&&i&&DM._session.access_token!=i.access_token),g=c!=DM._userStatus;if(i&&"expires_in" in i){i.expires=Math.round(new Date().getTime()/1000)+parseInt(i.expires_in,10);delete i.expires_in}var d={session:i,status:c};DM._session=i;DM._userStatus=c;if(a&&DM.Cookie&&DM.Cookie.getEnabled()){DM.Cookie.set(i)}if(g){DM.Event.fire("auth.statusChange",d)}if(b||h){DM.Event.fire("auth.logout",d)}if(f||h){DM.Event.fire("auth.login",d)}if(a){DM.Event.fire("auth.sessionChange",d)}return d},_popupMonitor:function(){for(var f in DM.Auth._active){if("win" in DM.Auth._active[f]){try{if(DM.Auth._active[f].win.closed){delete DM.Auth._active[f].win;DM.Auth.recvSession({error:"access_denied",error_description:"Client closed the window",state:f})}}catch(d){}}if("session" in DM.Auth._active[f]){var a=DM.Auth._active[f];delete DM.Auth._active[f];var c=a.session;if("access_token" in c){DM.Auth.setSession(c,"connected")}else{DM.Auth.setSession(null,"notConnected")}if("win" in a){a.win.close()}if("cb" in a){a.cb({status:DM._userStatus,session:DM._session})}}}var b=false;for(var f in DM.Auth._active){b=true;break}if(b&&!DM.Auth._popupInterval){DM.Auth._popupInterval=window.setInterval(DM.Auth._popupMonitor,100)}else{if(!b&&DM.Auth._popupInterval){window.clearInterval(DM.Auth._popupInterval);DM.Auth._popupInterval=null}}}});DM.Auth.readFragment();DM.provide("XDCom",{_swfPath:"/xdcom.swf",createChannel:function(g,h){if(!DM.XDCom.capable()){return}var d="",i=DM.guid(),b="id="+i;if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){d='<embed type="application/x-shockwave-flash" id="DMXDCom" width=0 height=0 src="'+DM._domain.cdn+DM.XDCom._swfPath+'" flashvars="'+b+'" allowscriptaccess="always"></embed>'}else{d='<object id="DMXDCom" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">  <param name="movie" value="'+DM._domain.cdn+DM.XDCom._swfPath+'"></param>  <param name="flashvars" value="'+b+'"></param>  <param name="allowScriptAccess" value="always"></param></object>'}var a=document.createElement("div"),f=a.style;f.position="absolute";f.top="-10000px";f.width=f.height=0;document.body.appendChild(a);a.innerHTML=d;var c=document.getElementById("DMXDCom");c.connectionId=i;window.onDMXDComMessage=g;window.onDMXDComReady=function(){c.addListener("onDMXDComMessage");if(h){h()}};return c},capable:function(){if(!("_capable" in DM.XDCom)){DM.XDCom._capable=DM.XDCom.getFlashVersion().split(",").shift()>=9}return DM.XDCom._capable},getFlashVersion:function getFlashVersion(){try{try{var a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");try{a.AllowScriptAccess="always"}catch(b){return"6,0,0"}}catch(b){}return new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(b){try{if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){return(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}}catch(b){}}return"0,0,0"}});DM.provide("",{player:function(b,a){return DM.Player.create(b,a)}});DM.provide("Player",{_INSTANCES:{},_INTERVAL_ID:null,API_MODE:null,apiReady:false,autoplay:false,currentTime:0,bufferedTime:0,duration:NaN,seeking:false,error:null,ended:false,muted:false,volume:1,paused:true,fullscreen:false,play:function(){this.api("play")},togglePlay:function(){this.api("toggle-play")},pause:function(){this.api("pause")},seek:function(a){this.api("seek",a)},load:function(a){this.api("load",a)},setMuted:function(a){this.api("muted",a)},toggleMuted:function(){this.api("toggle-muted")},setVolume:function(a){this.api("volume",a)},setFullscreen:function(a){this.api("fullscreen",a)},watchOnSite:function(a){this.api("watch-on-site")},api:function(b,a){if(a){b+="="+a}this._send(b)},create:function(d,b){d=DM.$(d);if(!d||d.nodeType!=1){throw new Error("Invalid first argument sent to DM.player(), requires a HTML element or element id: "+d)}if(!b||typeof b!="object"){throw new Error("Missing `options' parameter for DM.player()")}if(!b.video){throw new Error("Missing `video' option parameter for DM.player()")}b=DM.copy(b,{width:480,height:270,title:"video player",params:{},events:{}});var c=document.createElement("iframe");DM.Array.forEach(["id","style","class"],function(f){var g=d.getAttribute(f);if(g){c.setAttribute(f,g)}});d.parentNode.replaceChild(c,d);c.setAttribute("frameborder","0");c.title="Dailymotion "+b.title;c.type="text/html";c.width=b.width;c.height=b.height;DM.copy(c,DM.Player);c.init(b.video,b.params);if(typeof b.events=="object"){for(var a in b.events){c.addEventListener(a,b.events[a],false)}}return c},init:function(b,c){var a=this;DM.Player._installHandlers(function(){a._send("check")});c=typeof c=="object"?c:{};c.api=DM.Player.API_MODE;if(DM.Player.API_MODE=="xdcom"){c.xdcomId=DM.Player.xdcomChannel.connectionId}this.id=c.id=this.id?this.id:DM.guid();this.src=DM._domain.www+"/embed/video/"+b+"?"+DM.QS.encode(c);if(DM.Player._INSTANCES[this.id]!=this){DM.Player._INSTANCES[this.id]=this;this.addEventListener("unload",function(){delete DM.Player._INSTANCES[this.id]})}this.autoplay=DM.parseBool(c.autoplay)},_installHandlers:function(b){if(DM.Player.API_MODE!==null){return}if(window.postMessage){DM.Player.API_MODE="postMessage";var a=function(f){if(!f.origin||f.origin.indexOf(DM._domain.www)!==0){return}var d=DM.QS.decode(f.data);if(!d.id||!d.event){return}var c=DM.$(d.id);c._recvEvent(d)};if(window.addEventListener){window.addEventListener("message",a,false)}else{if(window.attachEvent){window.attachEvent("onmessage",a)}}}else{if(DM.XDCom.capable()){DM.Player.API_MODE="xdcom";DM.Player.xdcomChannel=DM.XDCom.createChannel(function(f){var d=DM.QS.decode(f);if(!d.id||!d.event){return}var c=DM.$(d.id);c._recvEvent(d)},b)}}if(DM.Player.API_MODE===null){DM.Player.API_MODE="fragment";return;if(!DM.Player._INTERVAL_ID){DM.Player._INTERVAL_ID=setInterval(function(){for(var g in DM.Player._INSTANCES){var c=DM.Player._INSTANCES[g],f;if((f=c.src.indexOf("#"))!=-1){var d=DM.QS.decode(src.substring(f+1));c.src=src.substring(0,f);if(d.id&&d.event){c._recvEvent(d)}}}if(DM.Player._INSTANCES.length===0){clearInterval(DM.Player._INTERVAL_ID)}},0)}}},_send:function(b){switch(DM.Player.API_MODE){case"postMessage":this.contentWindow.postMessage(b,DM._domain.www);break;case"xdcom":DM.Player.xdcomChannel.postMessage(this.id,b);break;case"fragment":var a=this.src,c;if((c=a.indexOf("#"))!=-1){a=a.substring(0,c)}this.src=a+"#"+b;break}},_dispatch:document.createEvent?function(a){var b=document.createEvent("HTMLEvents");b.initEvent(a,true,true);this.dispatchEvent(b)}:function(a){e=document.createEventObject();this.fireEvent("on"+event.event,e)},_recvEvent:function(a){switch(a.event){case"apiready":if(this.apiReady){return}else{this.apiReady=true}break;case"loadedmetadata":this.error=null;this.ended=false;break;case"timeupdate":this.currentTime=parseFloat(a.time);break;case"progress":this.bufferedTime=parseFloat(a.time);break;case"durationchange":this.duration=parseFloat(a.duration);break;case"seeking":this.seeking=true;this.currentTime=parseFloat(a.time);break;case"seeked":this.seeking=false;this.currentTime=parseFloat(a.time);break;case"fullscreenchange":this.fullscreen=DM.parseBool(a.fullscreen);break;case"volumechange":this.volume=parseFloat(a.volume);break;case"playing":case"play":this.paused=false;break;case"ended":this.ended=true;break;case"ended":case"pause":this.paused=true;break;case"error":this.error={code:a.code,title:a.title,message:a.message};break}this._dispatch(a.event)},addEventListener:function(b,c,a){if(this.attachEvent){this.attachEvent("on"+b,c,a)}}});
