$(window).load(function() {

	$('#content').css({background:'none'});

	var topcounter = $('#content img').size();
	var contentheight = $('#container').height();

	$('html, body').animate({scrollTop:contentheight}, topcounter*120);

	setTimeout(function() {
		$('#container').animate({opacity:0},500, function() {
			window.location.href="main.php";
		});
	}, topcounter*50);

	$('#content img')
		.each(function(i) {
			var current = $(this);
			setTimeout(function() {
				current.animate({opacity: 1}, 50);
			}, 50*(i+1));
		});

	$('#content').click(function() {
		window.location.href="main.php";
	});

});

