
	var topOpen = false;
$(document).ready(function(){
	

	
	Cufon.replace('#ul_nav li a',{
	hover:true,
	hoverables:{a:true}	
	});
	Cufon.replace('.title_bar');
	Cufon.replace('.title_bar_quarter');
	Cufon.replace('.gigs_expander');
	Cufon.replace('#slider_text_1',{
		textShadow: '1px 1px black'
	});
	Cufon.replace('#slider_text_2',{
		textShadow: '1px 1px black'
	});
	Cufon.replace('.artist_name',{
		textShadow: '1px 1px black'
	});
	Cufon.replace('.history_title',{
		textShadow: '1px 1px black'
	});
	Cufon.replace('.history_subtitle',{
		textShadow: '1px 1px black'
	});
	Cufon.replace('.communities');
	
	
	$('#expandArrow').click(function(){
		if(topOpen){
			topOpen=false;
			hidePlayer();
		}else{
			topOpen=true;
			expandPlayer();
		}
	});
	
	$('.youtube_link').click(function(){
		var video = ($(this).attr('rel'));
		getFlashMovie("vid_player").playVideo(video, true, true);
		return false;
	});	


	
	
});


function playerReady(vidstring){
	setTimeout("loadFirstMovie(vidstring)",1500);
}

function loadFirstMovie(vidstring){
		getFlashMovie("vid_player").playVideo("http://www.youtube.com/v/" + vidstring, false, true);
}

// function videoFinished(path){	
// 		getFlashMovie("vid_player").playVideo("http://www.youtube.com/v/--t6CPpHPxU", true, true);
// }

	
function getFlashMovie(movieName) {
	movieName = swfobject.getObjectById(movieName);
	return movieName;
}

function expandPlayer(){

	$('#top_bar').animate({top: "0"}, {duration:'fast'});
	//$('#container').animate({top: "105"}, {duration:'fast'});
	$('#expandArrow').animate({top: "120"}, {duration:'fast'});
};


function hidePlayer(){

	$('#top_bar').animate({top: "-105"}, {duration:'fast'});
	//$('#container').animate({top: "0"}, {duration:'fast'});
	$('#expandArrow').animate({top: "15"}, {duration:'fast'});
};


