jQuery(document).ready(function(){
	
	$("#hidePanel").click(function(){								   
		$("#col1").animate({width:"300px", opacity:1,filter: ''}, 400 ).fadeTo('fast', 1.0);		
		$("#col3").animate({width:"300px", opacity:1,filter: ''}, 400 ).fadeTo('fast', 1.0);	
		$("#col2").animate({width:"300px", opacity:1,filter: ''}, 200 );
		$("#col2 #playerset li.center").animate({width:"260px", opacity:1,filter: ''}, 200 );
		$("#col2 .flowplayer a.player img").animate({marginLeft:"-370px",filter: ''}, 200 );		
		$("#col2 .screen").animate({opacity:1,filter: ''}, 1000 );
		$("#showPanel2").show();		
		$("#showPanel1").show();
		$("#hidePanel").hide();
		$("#pl").show();
		$f().pause();
	});
	
	$("#showPanel2").click(function(){
		$("#col1").animate({width:"10px", opacity:1,filter: ''}, 400 ).fadeTo(2, 0.0);		
		$("#col3").animate({width:"10px", opacity:1,filter: ''}, 400 ).fadeTo(2, 0.0);
		$("#col2").animate({width:"898px", opacity:1,filter: ''}, 400 );		
		$("#col2 #playerset li.center").animate({width:"850px", opacity:1,filter: ''}, 400 );		
		$("#col2 .flowplayer a.player img").animate({marginLeft:"0",filter: ''}, 200 );
		//$("#col2 .flowplayer").animate({marginLeft:"125px",filter: ''}, 500 );
		$("#col2 .screen").animate({opacity:0}, 100 );
		$("#showPanel2").hide();		
		$("#showPanel1").hide();		
		$("#pl").hide();
		$("#hidePanel").show();
	});
	$("#showPanel1").click(function(){		
		$("#col1").animate({width:"10px", opacity:1,filter: ''}, 400 ).fadeTo(2, 0.0);		
		$("#col3").animate({width:"10px", opacity:1,filter: ''}, 400 ).fadeTo(2, 0.0);
		$("#col2").animate({width:"898px", opacity:1,filter: ''}, 400 );		
		$("#col2 #playerset li.center").animate({width:"850px", opacity:1,filter: ''}, 400 );		
		$("#col2 .flowplayer a.player img").animate({marginLeft:"0px",filter: ''}, 200 );
		//$("#col2 .flowplayer").animate({marginLeft:"125px",filter: ''}, 500 );
		$("#col2 .screen").animate({opacity:0}, 100 );
		$("#showPanel2").hide();		
		$("#showPanel1").hide();		
		$("#pl").hide();
		$("#hidePanel").show();
	});
	$("#player").click(function(){		
		//check to see if its already open
		if($("#pl").is(":visible")){
			$("#col1").animate({width:"10px", opacity:1,filter: ''}, 400 ).fadeTo(2, 0.0);		
			$("#col3").animate({width:"10px", opacity:1,filter: ''}, 400 ).fadeTo(2, 0.0);
			$("#col2").animate({width:"898px", opacity:1,filter: ''}, 400 );		
			$("#col2 #playerset li.center").animate({width:"850px", opacity:1,filter: ''}, 400 );		
			$("#col2 .flowplayer a.player img").animate({marginLeft:"0px",filter: ''}, 200 );
			//$("#col2 .flowplayer").animate({marginLeft:"125px",filter: ''}, 500 );
			$("#col2 .screen").animate({opacity:0}, 100 );
			$("#showPanel2").hide();		
			$("#showPanel1").hide();		
			$("#pl").hide();
			$("#hidePanel").show();
		}
	});
	$(".plentries a").click(function(){	
		//check to see if its already open
		if($("#pl").is(":visible")){
			$("#col1").animate({width:"10px", opacity:1,filter: ''}, 400 ).fadeTo(2, 0.0);		
			$("#col3").animate({width:"10px", opacity:1,filter: ''}, 400 ).fadeTo(2, 0.0);
			$("#col2").animate({width:"898px", opacity:1,filter: ''}, 400 );		
			$("#col2 #playerset li.center").animate({width:"850px", opacity:1,filter: ''}, 400 );		
			$("#col2 .flowplayer a.player img").animate({marginLeft:"0px",filter: ''}, 200 );
			//$("#col2 .flowplayer").animate({marginLeft:"125px",filter: ''}, 500 );
			$("#col2 .screen").animate({opacity:0}, 100 );
			$("#showPanel2").hide();		
			$("#showPanel1").hide();		
			$("#pl").hide();
			$("#hidePanel").show();
		}
	});
});
