a_data=new Array();

function setvideo(vid){
	$vid = vid;
	a_data[0]='<object style="height: 565; width: 960px">'
	+'<param name="movie" value="http://www.youtube.com/v/'+$vid+'?version=3&amp;autohide=1&amp;fs=1&amp;feature=player_embedded"></param>'
	+'<param name="allowFullScreen" value="true"></param>'
	+'<param name="allowScriptAccess" value="always"></param>'
	+'<embed src="http://www.youtube.com/v/'+$vid+'?version=3&amp;fs=1&amp;feature=player_embedded" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="960" height="570"></embed>'
	+'</object>';
}

function setdata(link){
	$link = link;
	a_data[1]='<a href='+$link+'>&gt;&gt;この動画の詳細をみる!!</a><a href="http://www.youtube.com/watch?v=vjsPljHSYwE&feature=list_related&playnext=1&list=SPB502DE832BDBB2BC" target="_blank">&gt;&gt;最先端初日の出動画を順番に見る！</a>';
}

function replacevideo(){
	document.getElementById("movie").innerHTML=a_data[0];
}

function replaceother(){
	document.getElementById("moreinfo").innerHTML=a_data[1];
}

$(function(){
	$(".menuItem").click(function(){
		setvideo($(this).attr("vid"));
		replacevideo();
		setdata($(this).attr("link"));
		replaceother();
		$("#commentform").load("player",{vid: $(this).attr("vid"),link:$(this).attr("link"),title:$(this).attr("title")});
	});
})
