/* 
  Copyright 2007-2010 hkrn <hikarin@users.sourceforge.jp>
   */Img0ch.App.Read.Plugin.Youtube=(function(){var re1_=/<a[^>]+>http:\/\/\w*\.?youtube\.com\/watch\?v=([\w\-]+)<\/a>/g;function getVideoPlayer(videoID){return"<object width=425 height=344><param name=movie value=http://www.youtube-nocookie.com/v/"
+videoID+"&fs=1><param name=allowFullScreen value=true><param name=allowscriptaccess value=always></param>"
+"<embed src=http://www.youtube-nocookie.com/v/"+videoID+"&fs=1 type=application/x-shockwave-flash "
+"width=425 height=344 allowscriptaccess=always allowfullscreen=true /></object>";}
return{"rewrite":function(resno,comment){comment=comment.replace(re1_,"<b><a href=\"http://youtu.be/$1"
+"\" onclick=\"Img0ch.App.toggleVideoPlayer('Youtube', '$1', '"+resno
+"_youtube_$1');return false\">[youtube.com:$1]</a></b><div id=\""+resno
+"_youtube_$1\" style=\"display:inline\"></div>","g");return comment;},"toggle":function(videoID,domID){var div=jQuery("#"+domID)
if(div.children().size()>1)
div.empty();else
div.append("<br />"+getVideoPlayer(videoID));}};})();