if(typeof VIDLY_InitialLoad=='undefined'){L0=document.createElement('link');L0.rel='stylesheet';L0.href='http://assets.vidly-cdn.com/express/vidly_express.css';document.getElementsByTagName('HEAD')[0].appendChild(L0);VIDLY_InitialLoad=true}(function(){var VIDLY_Link=document.getElementsByName('vvrnyp');var VIDLY_LinkCount=0;var VIDLY_Flashvars='';if(VIDLY_Link.length==0){var VIDLY_Links=document.getElementsByTagName('span');for(var i=0;i<VIDLY_Links.length;i++){if(VIDLY_Links[i].getAttribute('name')=='vvrnyp'){VIDLY_Link=VIDLY_Links[i];break}}}else{VIDLY_Link=VIDLY_Link[0]}if(VIDLY_Link.getAttribute('url')=='{url}'||!VIDLY_Link.getAttribute('url')){VIDLY_Link.setAttribute('url',document.location.href)}if(VIDLY_Link.title=='{title}'||!VIDLY_Link.getAttribute('title')){VIDLY_Link.setAttribute('title',document.title)}var to=(VIDLY_Link.getAttribute('owner'))?VIDLY_Link.getAttribute('owner').replace('@',''):'';var source_url=VIDLY_Link.getAttribute('url');var source_title=VIDLY_Link.title;VIDLY_Link.className='vidly_video_reply';VIDLY_Link.title='Leave a video reply to '+source_title;VIDLY_Span=document.createElement('a');VIDLY_Span.className='vidly_video_reply_button';VIDLY_Link.appendChild(VIDLY_Span);VIDLY_Span=document.createElement('a');VIDLY_Span.className='vidly_video_reply_count';var script=document.createElement("script");script.setAttribute("src","http://api.vidly.com/0.1/stats/identifier.jsonp?callback=VIDLY_GetStats&identifier="+escape(VIDLY_Link.getAttribute('url')));script.setAttribute("type","text/javascript");document.getElementsByTagName('HEAD')[0].appendChild(script);VIDLY_Link.appendChild(VIDLY_Span);VIDLY_Link.childNodes[1].innerHTML='0';var status='';if(to.length>0){var pre_status='Hey @'+to+', come see my response to '}else{var pre_status='Come see my reponse to '}var chars_left=140-19-pre_status.length;if(source_title.length>0){if(source_title.length+2>chars_left){status=pre_status+'"'+source_title.substr(0,chars_left-3)+'..."'}else{status=pre_status+'"'+source_title+'"'}}VIDLY_Flashvars='source_title='+escape(source_title)+'&source_url='+escape(source_url)+'&to='+escape(to)+'&status='+escape(status);VIDLY_Link.childNodes[0].onclick=function(e){var VIDLY_Background=document.createElement('div');VIDLY_Background.style.height=VIDLY_GetDocHeight()+'px';VIDLY_Background.style.width=VIDLY_GetWindowSize().width+'px';VIDLY_Background.id='vidly_video_reply_background';var VIDLY_Container=document.createElement('div');VIDLY_Container.style.marginTop=(((typeof window.pageYOffset!='undefined')?window.pageYOffset:document.documentElement.scrollTop)-160)+'px';VIDLY_Container.id='vidly_video_reply_container';var VIDLY_CloseButton=document.createElement('a');VIDLY_CloseButton.className='vidly_video_reply_close';VIDLY_CloseButton.onclick=function(){document.body.removeChild(VIDLY_Background);document.body.removeChild(VIDLY_Container);window.onresize=null;window.onscroll=null};if(parseInt(this.parentNode.childNodes[1].innerHTML)>0){VIDLY_Container.innerHTML+='<a href="http://vidly.com/replies/'+this.parentNode.getAttribute('slug')+'" id="vidly_view_replies" class="ui-button"><span>See Replies &raquo;</span></a>'}VIDLY_Container.innerHTML+='<object width="320" height="240" data="http://assets.vidly-cdn.com/express/vidly_express.swf" type="application/x-shockwave-flash"><param value="always" name="allowscriptaccess"/><param value="'+VIDLY_Flashvars+'" name="flashvars"/><param name="wmode" value="opaque"/><param value="http://assets.vidly-cdn.com/express/vidly_express.swf" name="movie"/><embed width="320" height="240" align="middle"  type="application/x-shockwave-flash" allowfullscreen="false" allowscriptaccess="always" flashvars="'+VIDLY_Flashvars+'" name="vidly_record" bgcolor="#ffffff" quality="high" src="http://assets.vidly-cdn.com/express/vidly_express.swf"/></object><a href="http://vidly.com/widgets/express" id="vidly_get_widget">Get this widget</a>';VIDLY_Container.appendChild(VIDLY_CloseButton);document.body.appendChild(VIDLY_Background);document.body.appendChild(VIDLY_Container);window.onresize=function(){document.getElementById('vidly_video_reply_background').style.height=VIDLY_GetDocHeight()+'px';document.getElementById('vidly_video_reply_background').style.width=VIDLY_GetWindowSize().width+'px'};window.onscroll=function(){document.getElementById('vidly_video_reply_container').style.marginTop=(((typeof window.pageYOffset!='undefined')?window.pageYOffset:document.documentElement.scrollTop)-160)+'px'}};if(VIDLY_Link.captureEvents){VIDLY_Link.captureEvents(Event.CLICK)}VIDLY_Link.setAttribute('name','vidly_video_reply')})();function VIDLY_GetWindowSize(){if(typeof window.innerWidth!='undefined'){return{height:window.innerHeight,width:window.innerWidth}}else if(typeof document.documentElement!='undefined'&&typeof document.documentElement.clientWidth!='undefined'&&document.documentElement.clientWidth!=0){return{height:document.documentElement.clientHeight,width:document.documentElement.clientWidth}}else{return{height:document.getElementsByTagName('body')[0].clientHeight,width:document.getElementsByTagName('body')[0].clientWidth}}}function VIDLY_GetDocHeight(){var D=document;return Math.max(Math.max(D.body.scrollHeight,D.documentElement.scrollHeight),Math.max(D.body.offsetHeight,D.documentElement.offsetHeight),Math.max(D.body.clientHeight,D.documentElement.clientHeight))}function VIDLY_GetStats(data){var VIDLY_video_replies=document.getElementsByName('vidly_video_reply');if(VIDLY_video_replies.length==0){var VIDLY_video_replies=document.getElementsByTagName('span')}for(var i=0;i<VIDLY_video_replies.length;i++){if(VIDLY_video_replies[i].getAttribute('url')==unescape(data.response.identifier)){if(typeof data.response.augment!='undefined'&&data.response.augment==true){VIDLY_video_replies[i].childNodes[1].innerHTML=parseInt(VIDLY_video_replies[i].childNodes[1].innerHTML)+1;document.body.removeChild(document.getElementById('vidly_video_reply_background'));document.body.removeChild(document.getElementById('vidly_video_reply_container'));window.onresize=null;window.onscroll=null}else{VIDLY_video_replies[i].childNodes[1].innerHTML=data.response.count;if(data.response.count>0){var slug=(data.response.title_safe?data.response.title_safe:data.response.hash);VIDLY_video_replies[i].setAttribute('slug',slug);VIDLY_video_replies[i].childNodes[1].href='http://vidly.com/replies/'+slug}}}}}