var delay = 500;

function fake()
{
}

function expandImportantToKnow()
{
	$('#importantToKnowTitleLink').unbind('click');
	$('#funToWatch').animate({width: '0px'}, delay, function() {
			$(this).hide();
			$('#mainContentWrapper').addClass('greyBGRight');
			$('#verticalGreyTitleDiv').slideDown(delay);
		});
	$('#importantToKnow').animate({'width': '973px'}, delay);
	$('#newsHolder').animate({'width': '752px'}, delay);
	$('#newsHolder > .newsDiv > .newsContent').animate({'width': '653px'}, delay);
	$('#archiveListsHolder').animate({'width': '220px'}, delay);
}

function collapseImportantToKnow(doNext)
{	
	$('#verticalGreyTitleDiv').slideUp(delay, function() {
		$('#mainContentWrapper').removeClass('greyBGRight');
		$('#funToWatch').show();
		$('#funToWatch').animate({width: '502px'}, delay);
		$('#importantToKnow').animate({'width': '501px'}, delay);
		$('#newsHolder').animate({'width': '501px'}, delay);
		$('#newsHolder > .newsDiv > .newsContent').animate({'width': '406px'}, delay);
		$('#archiveListsHolder').animate({'width': '0px'}, delay, function() {
			$(this).hide();
			if (doNext)
			{
				expandFunToWatch();
			}
		});
	});
}

function expandFunToWatch()
{
	$('#funToWatchTitleLink').unbind('click');
	$('#importantToKnow').animate({'width': '0px'}, delay, function() {
		$(this).hide();
	});
	
	$('#archiveTitle2').animate({'width': '0px'}, delay, function() {
		$(this).hide();
	});
	$('#archiveGallery2').animate({'width': '0px'}, delay, function() {
		$(this).hide();
	});
	$('#archiveTitle22').animate({'width': '0px'}, delay, function() {
		$(this).hide();
	});
	$('#archiveGallery22').animate({'width': '0px'}, delay, function() {
		$(this).hide();
	});	



	$('#funToWatch').animate({width: '973px'}, delay);
	$('#mainContentWrapper').addClass('redBGLeft');
	$('#verticalRedTitleDivLeft').show();
	$('#verticalRedTitleDivLeft').animate({width: '30px'}, delay);
	$('#mediaDiv').fadeOut(delay);
	$('#archiveTitle').fadeOut(delay);
	$('#archiveGallery').fadeOut(delay, function() {
		$('#newsHolderWide').fadeIn(delay);
		$('#archiveListsHolderVid').fadeIn(delay);
	});
}

function collapseFunToWatch(doNext)
{
	$('#verticalRedTitleDivLeft').animate({width: '0px'}, function() {
		$('#verticalRedTitleDivLeft').hide();
		$('#mainContentWrapper').removeClass('redBGLeft');
	});
	$('#newsHolderWide').fadeOut(delay);
	$('#archiveListsHolderVid').fadeOut(delay, function() {
		$('#mediaDiv').fadeIn(delay);
		$('#archiveTitle').fadeIn(delay);
		$('#archiveGallery').fadeIn(delay, function() {
			if (doNext)
			{
				expandImportantToKnow();
			}
		});
	});
	$('#importantToKnow').show();
	$('#funToWatch').animate({width: '502px'}, delay);
	$('#importantToKnow').animate({'width': '501px'}, delay);
}

function switchFromImportantToFun()
{
	collapseImportantToKnow(true);
//	expandFunToWatch();
}

function switchFromFunToImportant()
{
	collapseFunToWatch(true);
//	expandImportantToKnow();
	//$('*').stop();
	//expandFunToWatch();
}

/*$(document).ready(function() {
	$('#importantToKnowTitleLink').click(expandImportantToKnow);
	$('#funToWatchVerticalLink').click(switchFromFunToImportant);
});

function expandImportantToKnow() { 
	var delay = 500;
	$('#funToWatch > *:not(:first), #funToWatch > .greyTitle > *').fadeOut(delay, function() {
		$('#funToWatch').animate({width: '0px'}, delay, function() {
			$(this).css('display', 'none')
		});
		$('#importantToKnow').animate({'width': '973px'}, delay);
		$('#newsHolder').animate({'width': '721px'}, delay, function() {
			$('#archiveListsHolder').animate({'width': '225px'}, delay, function() {
				$('#archiveListsHolder > .greyTitle > div').fadeIn(delay, function() {
					//$('*').dequeue();
				});																
			});
			$('#mainContentWrapper').addClass('testClass');
			$('#verticalGreyTitleDiv').slideDown(delay);
		});
		$('#newsHolder > .newsDiv > .newsContent').animate({'width': '653px'}, delay, function() {
				
		});
	});
}

function collapseImportantToKnow() {
	var delay = 500;
	$('*').dequeue();
	$('#verticalGreyTitleDiv').slideUp(delay, function() {
		$('#mainContentWrapper').removeClass('testClass');
		$(this).dequeue();
	});
	$('#archiveListsHolder > .greyTitle > div').fadeOut(delay, function() {
		$(this).dequeue();
		$('#archiveListsHolder').animate({'width': '0px'}, delay, function() {
			$(this).dequeue();
		});
	});	
}

function switchFromFunToImportant() {
	collapseImportantToKnow();
}*/
