/* 
RAL
Digital Warehouse Agency
Model Properties and Functions
*/


function initSkyline()
{
	$('#block-12').animate({ 'height' : '338' }, 1500);
	$('#block-11, #block-13').delay(200).animate({ 'height' : '300' }, 1500);
	$('#block-10, #block-14').delay(500).animate({ 'height' : '240' }, 1500);
	$('#block-9, #block-15').delay(950).animate({ 'height' : '75' }, 2500);
	$('#block-8, #block-16').delay(700).animate({ 'height' : '75' }, 1500);
	$('#block-7, #block-17').delay(1200).animate({ 'height' : '120' }, 1500);
	$('#block-6, #block-18').delay(1500).animate({ 'height' : '120' }, 1500);
	$('#block-1').delay(1500).animate({ 'height' : '75' }, 1500);
	$('#block-5').delay(1800).animate({ 'height' : '170' }, 2000);
	$('#block-3').delay(1700).animate({ 'height' : '170' }, 2000);
	$('#block-2').delay(2100).animate({ 'height' : '75' }, 1500);
	
	$('#block-4').delay(1800).animate({ 'height' : '170' }, 1500, function()
	{
		$('.border-left, .border-right').delay(600).animate({ 'height' : '338' }, 1500, function()
		{
			dropSkyline();
		});
	});	
}

function dropSkyline()
{
	$('#block-2, #block-7, #block-10, #block-17').animate({ 'height' : '0' }, 1500);
	$('#block-11, #block-13').delay(150).animate({ 'height' : '0' }, 1500);
	$('#block-6, #block-16').delay(300).animate({ 'height' : '0' }, 1500, function()
	{
		initImages();
	});
}

function initImages()
{
	$('#image-8').animate({ 'opacity' : '1', 'top' : '0' }, 1000);
	$('#image-3').delay(200).animate({ 'opacity' : '1', 'top' : '0' }, 1500);
	$('#image-14, #image-9').delay(400).animate({ 'opacity' : '1', 'top' : '0' }, 1000);
	$('#image-1').delay(650).animate({ 'opacity' : '1', 'top' : '0' }, 1500);
	$('#image-18, #image-5, #image-12').delay(1200).animate({ 'opacity' : '1', 'top' : '0' }, 1000, function()
	{
		initContents();	
	});
}


function initContents()
{
	$('#background').delay(500).animate({ 'height' : '0'}, 600, function()
	{
		$('#container').fadeIn(600, function()
		{
			$('.border-left, .border-right').fadeOut(800, function()
			{
				$('#loader-wrapper').fadeOut(600, function()
				{
					$('body').css({ 'overflow' : 'auto'});
				});
			});			
		});	

	});
}














