$(document).ready(function() {
	$('#inner.venue').hide().fadeIn(500);
	$('.about #inner').css({
		position: 'relative',
		top: 20,
		left: 0,
		opacity: 0
	}).animate({
		top: 0,
		left: 0,
		opacity: 1
	}, 250, 'swing');
	$('#main-menu li a').click(function() {
		var url = $(this).attr('href');
		$('#header').css({
		position: 'relative',
		top: 0,
		left: 0,
		opacity: 1
	}).animate({
		top: -200,
		left: 0,
		opacity: 0
	}, 250, 'swing');
		$('#left-sidebar').css({
			position: 'relative',
			top: 0,
			left: 0,
			opacity: 1
		}).animate({
			top: 0,
			left: -200,
			opacity: 0
		}, 250, 'swing');
		$('#right-sidebar').css({
			position: 'relative',
			top: 0,
			left: 0,
			opacity: 1
		}).animate({
			top: 200,
			left: 0,
			opacity: 0
		}, 250, 'swing');
		$('#inner').fadeOut(250, function() {
			window.location = url;
		});
		return false;
	});
	$('#sub-nav li a').click(function() {
		var url = $(this).attr('href') + ' #inner';
		$('#sub-nav li').removeClass('selected loading');
		$(this).parent().addClass('selected loading');
		$('#main-content').css({
			position: 'relative',
			top: 0,
			left: 0,
			'z-index': -100,
			opacity: 1
		}).animate({
			top: 0,
			left: -100,
			opacity: 0
		}, 250, 'swing', function() {
			$('#main-content').load(url, function() {
				$('#sub-nav li').removeClass('loading');
				$('#main-content').css({
					position: 'relative',
					top: 0,
					left: 100,
					'z-index': -100,
					opacity: 0
				}).animate({
					top: 0,
					left: 0,
					opacity: 1
				}, 250, 'swing', function() {
					$('#main-content').css('z-index', 0);
				});
			});
		});
		return false;
	});
	$('#slideshow').css('opacity', 0);
	$('#header').css({
		position: 'relative',
		top: -200,
		left: 0,
		opacity: 0
	}).animate({
		top: 0,
		left: 0,
		opacity: 1
	}, 250, 'swing', function() {
		$('#slideshow').animate({opacity: 1}, 500, 'linear');
	});
	$('#left-sidebar').css({
		position: 'relative',
		top: 0,
		left: -500,
		opacity: 0
	}).animate({
		top: 0,
		left: 0,
		opacity: 1
	}, 250, 'swing');
	$('#box-1, #box-2, #box-3').css({
		position: 'relative',
		top: 50,
		opacity: 0
	});
	$('#box-1').animate({
		top: 0,
		opacity: 1
	}, 125, 'swing', function() {
		$('#box-2').animate({
			top: 0,
			opacity: 1
		}, 125, 'swing', function() {
			$('#box-3').animate({
				top: 0,
				opacity: 1
			}, 125, 'swing');
		});
	});
});
