if(typeof(renderStartTime)!="undefined"){Event.observe(window,"load",function(b){var a="http://www.dailymotion.com/sense/images/vs/tag.gif";var c=new Hash({vs_locale:"locale",vs_country:"country",vs_channel:"actionchannel",vs_pagename:"actionpage"});var e=new Hash();e.set("action","timer");e.set("npd",Math.round((new Date()-renderStartTime)/10));if(typeof(vskeys)=="object"){c.each(function(f){if($H(vskeys).get(f.key)!=undefined){e.set(f.value,$H(vskeys).get(f.key))}})}if(typeof(memoryPeakUsage)!="undefined"){e.set("memory_peak_usage",memoryPeakUsage)}if(typeof(memoryUsage)!="undefined"){e.set("memory_usage",memoryUsage)}(new Image()).src=a+"?"+e.toQueryString()})}var vskeys;var vsUrl;var vsRedUrl;var cookieEnabled=(function cookieEnabled(){setCookieWithFormat("cookie_enabled","y",1,"m");if(getCookie("cookie_enabled")=="y"){return true}return false})();function cookieSet(a,b,c){d=new Date();d.setTime(d.getTime()+(c*1000));expiry="; expires="+d.toGMTString();document.cookie=a+"="+b+expiry+"; path=/"}function instrument(c){var b;for(b=0;b<c.length;b++){var a={rank:b,call:function(e){var f=location.href.substring((location.href.lastIndexOf("/"))+1);if(f[0]<"0"||f[0]>"9"){f=0}else{f=parseInt(f)-1}cookieSet("rn",""+f+","+this.rank,60)}};Event.observe(c[b],"click",a.call.bindAsEventListener(a))}}var instrumentActionCounter=new Array();function instrumentAction(elts,action,type,method){if(!cookieEnabled||!elts){return}if(action=="OSU/Send"){var url=vsRedUrl+"log=1&action="+encodeURIComponent(action);url+="&country="+encodeURIComponent(vskeys.vs_country);url+="&locale="+encodeURIComponent(vskeys.vs_locale);new Ajax.Request(url,{method:"get"});return}var i=0,l=elts.length||0,el=elts.nodeType?elts:l?elts[0]:null;do{if(!el||el.is_vs_obs){return}var spa=encodeURIComponent(vskeys.vs_spa);if(typeof thefilter_enabled!="undefined"&&thefilter_enabled&&typeof thefilter_recommandation_enabled!="undefined"&&thefilter_recommandation_enabled){if(action.indexOf("related/related")!=-1){spa="thefilter"}}var url=vsRedUrl+"log=1&action="+encodeURIComponent(action);if(type=="video"){if(action.indexOf("related/related")===-1){url+="&video="+encodeURIComponent(vskeys.vs_video);url+="&videotitle="+encodeURIComponent(vskeys.vs_videotitle);url+="&user="+encodeURIComponent(vskeys.vs_user);url+="&usertype="+encodeURIComponent(vskeys.vs_usertype)}url+="&actionpage="+encodeURIComponent(vskeys.vs_pagename);url+="&country="+encodeURIComponent(vskeys.vs_country);if(typeof spa!="undefined"&&spa!="undefined"){url+="&spa="+spa}if(action.indexOf("related")==0){if(!instrumentActionCounter[action]){instrumentActionCounter[action]=0}instrumentActionCounter[action]++;url+="&spb="+instrumentActionCounter[action]}}if(type=="list"){url+="&experience="+encodeURIComponent(vskeys.vs_experience);url+="&actionpage="+encodeURIComponent(vskeys.vs_pagename);var page="0";if("vs_page" in vskeys){page=vskeys.vs_page}url+="&rank="+encodeURIComponent(page+","+i);url+="&actionchannel="+encodeURIComponent(vskeys.vs_channel)}var observer={elt:el,url:url,call:function(event){if(this.elt.nodeName=="A"&&this.elt.hasClassName("not_ajax")&&this.elt.href.indexOf("javascript")==-1&&this.elt.href.indexOf("#")!=0){event.stop()}var request=new Ajax.Request(this.url,{method:"get",onComplete:function(transport){var time_out=0;if(typeof method!="undefined"){time_out=300;eval(method)(this.elt)}if(this.elt.nodeName=="A"&&this.elt.hasClassName("not_ajax")&&this.elt.href.indexOf("javascript")==-1&&this.elt.href.indexOf("#")!=0){setTimeout(function(){document.location=this.elt.href}.bind(this),time_out)}}.bindAsEventListener(this)})}};Event.observe(el,"click",observer.call.bindAsEventListener(observer));el.is_vs_obs=true}while(++i<l&&(el=elts[i]))}function vsStat(){if(!cookieEnabled){return}var j=vskeys;var n=screen;var h=document;var m=false;if(h.referrer){j.vs_dr=h.referrer}j.vs_dh=location.href;j.vs_cb=new Date().getTime();for(cKey in j){if(cKey=="vs_pagename"&&j[cKey].substr(0,15)=="player/internal"){m=true;if(typeof(deconcept)=="object"){var a=deconcept.SWFObjectUtil.getPlayerVersion();var b="W";if(navigator.appVersion.indexOf("Win")!=-1){b="W"}else{if(navigator.appVersion.indexOf("Mac")!=-1){b="M"}else{b="U"}}j.vs_fv=b+a.major+"."+a.minor+"."+a.rev+".0";j.vs_fvs="old";if(a.major>=8){j.vs_fvs="on2"}if((a.major==9&&a.rev>=115)||a.major>=10){j.vs_fvs="h264"}}break}}if(m){var g="";if($("tabs")&&$("tabs").select("a.context_tab_selected").length){$("tabs").select("a.context_tab_selected").first().classNames().each(function(c){if(c.startsWith("tab_")){g=c.gsub(/tab_/,"")}})}else{g="related"}j.vs_spd=g}var l=vsUrl;var f=true;for(cKey in j){if(!f){l+="&"}l+=cKey.substr(3)+"="+encodeURIComponent(j[cKey]);f=false}if(typeof didyoumean_present!="undefined"&&didyoumean_present){l+="&spa=didyoumean"}var e=h.createElement("img");e.src=l;e.id="vstag";var k=h.getElementById("vstag");k.parentNode.insertBefore(e,k.nextSibling)}function vsInstrument(){Event.observe(window,"load",function(){if($("dmpi_video_tools")){$("dmpi_video_tools").select("a").each(function(a){var b=a.className.match(/\btool_([^\b\s]+)\b/),c=b&&b.length==2?"video/"+b[1].replace(/_/,"/"):null;if(c){instrumentAction(a,c,"video")}})}if($("small_embed_link")){instrumentAction($("small_embed_link"),"video/embed","video")}if($("ff_bigbox")){instrumentAction($$("form.dmpi_familyfilter a.creative_content"),"ff/creative_content","list")}else{if($("big_box_kids")){instrumentAction($$("#navigation_list_item_0"),"kids/navigation_list_item_0","all");instrumentAction($$("#navigation_list_item_1"),"kids/navigation_list_item_1","all");instrumentAction($$("#navigation_list_item_2"),"kids/navigation_list_item_2","all");instrumentAction($$("#navigation_list_item_3"),"kids/navigation_list_item_3","all");instrumentAction($$("#navigation_list_item_4"),"kids/navigation_list_item_4","all");instrumentAction($$("#navigation_list_item_5"),"kids/navigation_list_item_5","all");instrumentAction($$("#navigation_list_item_6"),"kids/navigation_list_item_6","all");instrumentAction($$("#navigation_list_item_7"),"kids/navigation_list_item_7","all");instrumentAction($$("#navigation_list_item_8"),"kids/navigation_list_item_8","all");instrumentAction($$("#navigation_list_item_9"),"kids/navigation_list_item_9","all");instrumentAction($$("#navigation_list_item_10"),"kids/navigation_list_item_10","all");instrumentAction($$("#navigation_controls_play"),"kids/navigation_controls_play","all");instrumentAction($$("#navigation_controls_play.paused"),"kids/navigation_controls_play","all");instrumentAction($$("#navigation_controls_forward"),"kids/navigation_controls_forward","all");instrumentAction($$("#navigation_controls_reload"),"kids/navigation_controls_reload","all");instrumentAction($$("#navigation_next_link"),"kids/navigation_next_link","all");instrumentAction($$("#navigation_previous_link"),"kids/navigaton_previous_link","all");instrumentAction($$("a.logo"),"kids/logo","all");instrumentAction($$("#header div.dmpi_slotlists_home_link1 div a.dmco_simplelink"),"kids/3-6","all");instrumentAction($$("#header div.dmpi_slotlists_home_link2 div a.dmco_simplelink"),"kids/7","all");instrumentAction($$("div.dmpi_playlist_preview a.preview_link, div.big_box_kids div.dmpi_video_preview a.preview_link"),"kids/playlist","all")}}})}if(typeof(vskeys)!="undefined"&&$$("img#vstag").length==0){vsStat();vsInstrument();vsContextInstrument=function(a){if(document.body.className.match(/dm_page_html_videos\b|dm_page_html_daily50\b|dm_page_html_video\b/)){if($("dmpi_video_tools")&&a&&!arguments.callee["doneTools"+a]){arguments.callee["doneTools"+a]=true;$$(a+" a").each(function(c){var e=c.className.match(/\btool_([^\b\s]+)\b/),f=e&&e.length==2?"video/"+e[1].replace(/_/g,"/"):null;if(f){instrumentAction(c,f,"video")}})}}if(a=="div.dmpi_list_recommendations"){if(document.body.className.match(/\bdm_page_html_home\b/)){instrumentAction($$("div.dmpi_list_recommendations a.preview_link"),"home/recommendations/preview","videos","DM_Widget_PageItem_List_Recommendations.homeClickTracking");instrumentAction($$("div.dmpi_list_recommendations a.video_title"),"home/recommendations/title","videos","DM_Widget_PageItem_List_Recommendations.homeClickTracking")}else{if(document.body.className.match(/\bdm_page_html_videos\b/)){instrumentAction($$("div.dmpi_list_recommendations a.preview_link"),"list/recommendations/preview","videos","DM_Widget_PageItem_List_Recommendations.searchClickTracking");instrumentAction($$("div.dmpi_list_recommendations a.video_title"),"list/recommendations/title","videos","DM_Widget_PageItem_List_Recommendations.searchClickTracking")}}}else{if(a=="#tab_recommendations_content"&&document.body.className.match(/\bdm_page_html_video\b/)){instrumentAction($$("#tab_recommendations_content a.preview_link"),"player/recommendations/preview","videos","DM_Widget_Page_Video.recotabClickTracking");instrumentAction($$("#tab_recommendations_content a.video_title"),"player/recommendations/title","videos","DM_Widget_Page_Video.recotabClickTracking")}else{if(!a&&document.location.pathname.match(/\/recommendations/)){instrumentAction($$("#dual_list a.preview_link"),"reco/recommendations/preview","videos","DM_Widget_PageItem_List_Recommendations.recopageClickTracking");instrumentAction($$("#dual_list a.video_title"),"reco/recommendations/title","videos","DM_Widget_PageItem_List_Recommendations.recopageClickTracking")}}}if(document.body.className.match(/dm_page_html_video\b/)){if(a=="#related"){if(!arguments.callee.doneRelated&&$("related").down("div.dmpi_video_relatedlist")){arguments.callee.doneRelated=true;instrumentAction($$("#related a.preview_link"),"related/related/preview","video","DM_Widget_PageItem_Video_Related.theFilterClickTracking");instrumentAction($$("#related a.video_title"),"related/related/title","video","DM_Widget_PageItem_Video_Related.theFilterClickTracking");instrumentAction($("all_videos"),"related/related/all","video")}}else{if(!arguments.callee.doneTabs&&$("player_page_tabs_nav")){arguments.callee.doneTabs=true;$("player_page_tabs_nav").select("span").each(function(e){var c=e.className.match(/\btab_([^\b\s]+)\b/),f=c&&c.length==2?"video/tabs/"+c[1]:null;if(f){instrumentAction(e,f,"video")}})}if($("player_page_tabs")&&a&&a.match(/tab_[a-z]+_content/)&&!arguments.callee["doneTab"+a]){arguments.callee["doneTab"+a]=true;var b=a.match(/tab_([a-z]+)_content/)[1];if(b=="playlists"){instrumentAction($$(a+" a.bottom_right"),"video/tabs/playlists/shownext","video")}else{instrumentAction($$(a+" input.long_button"),"video/tabs/"+b+"/showmore","video");instrumentAction($$(a+" a.bottom_right"),"video/tabs/"+b+"/shownext","video")}}}}};vsContextInstrument()}function vsSimpleCall(b){if(!cookieEnabled){return}if(b.indexOf("/lang/")>0){b=b.substr(b.indexOf("/lang/")+6,2)}else{b="All"}var a=vsRedUrl+"log=1&action=selectcomment/"+b;a+="&Video="+encodeURIComponent(vskeys.vs_video);a+="&Videotitle="+encodeURIComponent(vskeys.vs_videotitle);a+="&user="+encodeURIComponent(vskeys.vs_user);a+="&usertype="+encodeURIComponent(vskeys.vs_usertype);a+="&actionpage="+encodeURIComponent(vskeys.vs_pagename);a+="&spa="+encodeURIComponent(vskeys.vs_spa);new Ajax.Request(a)}function addLeadiumTags(){if(typeof leadiumPixels!="undefined"){$$("div.dm_widget_pagestats").first().insert({bottom:leadiumPixels})}}$(document).observe("dom:loaded",addLeadiumTags);
