
jQuery(document).ready(function($) { 

$.startAnim = function() {

	$('#aclose').fadeIn('slow');
	
	$('#starttext').fadeOut();

    start = $.timer(1000,function(){
    	$('#startimg').fadeOut('slow');});

    start = $.timer(1900,function(){
    	$('#astart').fadeIn('slow');});
    start = $.timer(2300,function(){
    	$('#aroom').fadeIn();});
    start = $.timer(2600,function(){
    	$('#amwgreen').fadeIn('slow');});
    start = $.timer(3000,function(){
    	$('#amwblue').fadeIn('slow');});
    start = $.timer(3500,function(){
    	$('#amwpurple').fadeIn('slow');});
    start = $.timer(3600,function(){
    	$('#amwyellow').fadeIn();});
    start = $.timer(4000,function(){
    	$('#aectblack').fadeIn();});
    start = $.timer(4500,function(){
    	$('#aectgreen').fadeIn('slow');});
    start = $.timer(5000,function(){
    	$('#acard').fadeIn('slow');});
    start = $.timer(5500,function(){
    	$('#adoor').fadeIn('slow');});
    start = $.timer(6000,function(){
    	$('#aleave').fadeIn('slow');});

    start = $.timer(8000,function(){
    	$('#amwgreen').fadeOut('slow');
    	$('#amwblue').fadeOut('slow');
    	$('#amwpurple').fadeOut('slow');
    	$('#amwyellow').fadeOut('slow');
    	$('#adoor').animate({ left: '50', top: '0' }, 900);
    	$('#astart').animate({ top: '100', width: '200', height: '145' }, 1000);
    	$('#aroom').animate({ left: '170', top: '150', width: '150', height: '116' }, 1100);
    	$('#aleave').animate({ left: '160', top: '50' }, 950);
    	});

    start = $.timer(8300,function(){
    	$('#aectblack').fadeOut('slow');
    	$('#aectgreen').fadeOut('slow');
    	$('#acard').fadeOut('slow');
    	$('#startwords').html($t1);
    	$('#startwords').show();
    	$('#startwords').animate({ left: '500', opacity: 1 }, 1000).animate({ left: '400' }, 4000, 'linear').animate({ left: '100', opacity: 0 }, 1000);
    	});

    start = $.timer(14000,function(){
    	$('#amwgreen').css({'opacity' : '0', 'display' : 'block'}).animate({ left: '650', opacity: 1 }, 900);
    	$('#amwblue').css({'opacity' : '0', 'display' : 'block'}).animate({ left: '700', opacity: 1 }, 900);
    	$('#amwpurple').css({'opacity' : '0', 'display' : 'block'}).animate({ left: '830', opacity: 1 }, 900);
    	$('#amwyellow').css({'opacity' : '0', 'display' : 'block'}).animate({ left: '640', opacity: 1 }, 900);
    	$('#adoor').animate({ left: '550', opacity: 0 }, 900);
    	$('#astart').animate({ left: '600', opacity: 0 }, 1000);
    	$('#aroom').animate({ left: '670', opacity: 0 }, 1100);
    	$('#aleave').animate({ left: '660', opacity: 0 }, 950);
    	$('#startwords').html($t2);
    	$('#startwords').animate({ left: '300', opacity: 1 }, 1000).animate({ left: '200' }, 4000, 'linear').animate({ left: '0', opacity: 0 }, 1000);
    	});
	
    start = $.timer(20000,function(){
    	$('#aectblack').css({'opacity' : '0', 'display' : 'block'}).animate({ left: '200', opacity: 1 }, 900);
    	$('#aectgreen').css({'opacity' : '0', 'display' : 'block'}).animate({ left: '150', opacity: 1 }, 900);
    	$('#acard').css({'opacity' : '0', 'display' : 'block'}).animate({ left: '105', top: '60', opacity: 1 }, 900);
    	$('#amwgreen').animate({ left: '150', opacity: 0 }, 900);
    	$('#amwblue').animate({ left: '200', opacity: 0 }, 1000);
    	$('#amwpurple').animate({ left: '270', opacity: 0 }, 900);
    	$('#amwyellow').animate({ left: '260', opacity: 0 }, 950);
    	$('#startwords').html($t3);
    	$('#startwords').animate({ left: '300', opacity: 1 }, 1000).animate({ left: '400' }, 4000, 'linear').animate({ left: '450', opacity: 0 }, 500);
    	});

    start = $.timer(26000,function(){
    	$('#astart').css({'opacity' : '0', 'display' : 'block'}).animate({ left: '670', width: '183', height: '133', opacity: 1 }, 900);
    	$('#aectgreen').css({'display' : 'block'}).animate({ left: '730', top: '0', opacity: 1 }, 900);
    	$('#amwgreen').css({'opacity' : '0', 'display' : 'block'}).animate({ left: '780', top: '10', opacity: 1 }, 900);
    	$('#aectblack').animate({ left: '650', opacity: 0 }, 900);
    	$('#acard').animate({ left: '670', opacity: 0 }, 900);
    	$('#startwords').html($t4);
    	$('#startwords').css('left','600px').animate({ left: '400', opacity: 1 }, 1000).animate({ left: '200' }, 4000, 'linear').animate({ left: '0', opacity: 0 }, 500);
    	});

    start = $.timer(32000,function(){
    	$('#astart').animate({ left: '10', top: '40', width: '183', height: '133', opacity: 1 }, 1000);
    	$('#aroom').animate({ left: '150', top: '70', width: '226', height: '175', opacity: 1 }, 1000);
    	$('#amwgreen').animate({ left: '300', top: '5', width: '154', height: '135', opacity: 1 }, 1000);
    	$('#amwblue').animate({ left: '400', top: '60', width: '198', height: '173', opacity: 1 }, 1000);
    	$('#amwpurple').animate({ left: '540', top: '10', width: '121', height: '107', opacity: 1 }, 1000);
    	$('#amwyellow').animate({ left: '560', top: '145', width: '104', height: '94', opacity: 1 }, 1000);
    	$('#aectblack').animate({ left: '635', top: '50', width: '48', height: '68', opacity: 1 }, 1000);
    	$('#aectgreen').animate({ left: '710', top: '100', width: '84', height: '109', opacity: 1 }, 1000);
    	$('#acard').animate({ left: '680', top: '120', width: '74', height: '87', opacity: 1 }, 1000);
    	$('#adoor').animate({ left: '750', top: '10', width: '105', height: '141', opacity: 1 }, 1000);
    	$('#aleave').animate({ left: '810', top: '40', width: '183', height: '139', opacity: 1 }, 1000);
    	});

    start = $.timer(40000,function(){
    	$.startAnim();
    	});
	
	}
	
});

