

$(document).ready(function() {
	$('#videoContainer').hide();													 
	$('#morecomments').hide();
	
	$('#videoContainer').click(function() {
		$(this).hide();				
		$('#videoPlayer').empty();
	});

	$('#morecommentsbtn').click(function(e) {
		$('#morecomments').toggle();
		e.preventDefault();
	});
	
	$('#emailAFriendBtn').click(function(e) 
		 {
			 window.open(this.href, 'sendAFriend', 'width=500,height=500');
			 e.preventDefault();
		 });

	$('a.showDay').click(function(e) {
			e.preventDefault();
			if($('#' + this.rel + ':visible').length) {
				$('#' + this.rel).slideUp(500);	
			} else {
				$('.dayEvents:visible').slideUp(500);													
				$('#' + this.rel).slideDown(500);
			}
		});
	
	$('.dayEventItem img').css({opacity:.85});
	$('.dayEventItem').hover(function(){ $('img',this).animate({opacity:.99},150); },function(){ $('img',this).animate({opacity:.85},200); });
	
	$('#becomeAFan').submit(function(e) 	{
		e.preventDefault();
		 var dataString = $('#becomeAFan').serialize();  
		 //alert (dataString);return false;  
		 $.ajax({  
			 type: "POST",  
			 url: "/becomeafan.php",  
			 data: dataString,  
			 success: function(msg) {  
			 	alert(msg);
			 }  
		 });  												 
		});

	}
);													

function showVideo(fn) 
{ 
		$('#videoPlayer').empty();
		$('#videoContainer').show();		
		//videoFile: 'http://localhost/' + fn
		var flashvars = {
			videoFile: fn
			};
		
		swfobject.embedSWF("/flash/peaceVideo.swf", "videoPlayer", "640", "500", "10.0.0", "/flash/expressInstall.swf", flashvars);
} 