function loadImages() {
	var img;
	var path = "layout/images/teaser/";
	for (i = 0; i < arguments.length; i++) {
		img = new Image(1, 1);
		img.src = path + arguments[i];
	}
}

function crossFadeIn(link){
	$('#'+link+'a').stop().animate({
					opacity: 0
				}, 350
	);
	$('#'+link+'b').stop().animate({
					opacity: 1
				}, 350
	);
}

function crossFadeOut(link){
	$('#'+link+'b').stop().animate({
					opacity: 0
				}, 350
	);
	$('#'+link+'a').stop().animate({
					opacity: 1
				}, 350
	);
}

loadImages('2a.png', '2b.png', '2c.png', '3a.png', '3b.png', '3c.png');

$(document).ready(function() {
	$('#middlebg').stop().animate({
		opacity : 1
	}, 800,

	function() {
		$('#middlelogo').stop().animate({
			opacity : 1
		}, 800,

		function() {
			$('#lastfmlinka').stop().animate({
				opacity : 1
			}, 250,

			function() {
				$('#twitterlinka').stop().animate({
					opacity : 1
				}, 300,

				function() {
					$('#facebooklinka').stop().animate({
						opacity : 1
					}, 300
					);
				});
			});
		});
	});
});
