$(function() {
	$("body *").remove();
	$("body").html('<div id="geral" style="height:1px;min-height:100%;display:none;"></div><div id="tudo"></div>');
	
	$("#geral").animate({'height': '100%', 'opacity': 'show'},"slow", function() {
																								 
		$("#tudo").html('<div id="apres"></div>');
		$("#apres").css({'position': 'absolute', 'left':'-500px', 'height': '5px', 'width': '5px', 'top': '50%', 'margin-top':'-2.5px', 'border': '1px solid #013968', 'font-size': '0'});
		
		$("#apres").animate({'left': '50%', 'marginLeft': '2.5px'},600, function() {
			
			$("#apres").css({'border': '1px solid #CCC'});
			
			$("#apres").animate({'height': '430px', 'width': '880px', 'left':'50%', 'top': '50%', 'marginTop': '-215px', 'marginLeft':'-440px'}, "normal",function() {
				
				$("#tudo").append("<div style='height:430px;background:transparent;'></div>");
				
				//$("#apres").css({'position': 'relative'});
				
				$("#apres").append("<h1>Micromap - Solu&ccedil;&otilde;es em Inform&aacute;tica</h1>");
				$("#apres h1").hide();
				$("#apres h1").animate({'height': 'show', 'opacity': 'show'},function() {
																						
					$("#apres").append('<div id="botoes"></div>');
					$("#botoes").html('<a class="t pr" href="privado/"></a>');
					$("#botoes .pr").html('<h2><img src="images/apres_h1_privado.png" /></h2>').find('h2').hide().animate({'width': 'show', 'opacity': 'show'}, 300);
					$("#botoes .pr").append('<div><img src="images/apres_img_privado.png" /></div>').find('div').hide().animate({'opacity': 'show'}, 500,function() {
																																							
						$("#botoes .pr").append('<span>Pessoa Física, Pessoa Jurídica...</span>').find('span').hide().animate({'height': 'show', 'opacity': 'show'}, 'fast');
						
					});
					
					
					$("#botoes").append('<a class="t" href="publico/"></a>');
					$("#botoes .t").eq(1).html('<h2><img src="images/apres_h1_publico.png" /></h2>').find('h2').hide().delay(200).animate({'width': 'show', 'opacity': 'show'}, 300);
					$("#botoes .t").eq(1).append('<div><img src="images/apres_img_publico.png" /></div>').find('div').hide().delay(200).animate({'opacity': 'show'}, 500,function() {
																																										   
						$("#botoes .t").eq(1).append('<span>Órgãos Públicos, Prefeituras, Câmaras...</span>').find('span').hide().animate({'height': 'show', 'opacity': 'show'}, 'fast', function() {
							
							$(".t").mouseover(function() {
								$(this).find('h2').stop().animate({'paddingTop': '96px'});
								$(this).find('div img').stop().animate({'marginTop': '0', 'marginBottom': '40px'});
							});
							$(".t").mouseout(function() {
								$(this).find('h2').stop().animate({'paddingTop': '0'});
								$(this).find('div img').stop().animate({'marginTop': '39px', 'marginBottom': '0'});
							});
							$(".t").click(function() {
						   		window.location = $(this).attr('href');
						    });
							
							$("#tudo").append('<div id="tecnologias"></div>').find('#tecnologias').css({'position': 'relative', 'top':'0'}).hide();
							$("#apres").animate({'marginTop': '-255px'});
							$("#tecnologias").animate({'height': 'show', 'opacity': 'show'}, function() {
								
								$("#tecnologias").html('<img src="images/apres_marcas_oracle.png" /><img src="images/apres_marcas_java.png" /><img src="images/apres_marcas_windows.png" /><img src="images/apres_marcas_delphi.png" />');
								$("#tecnologias img").hide();
								$("#tecnologias img").each(function(i) {
									$(this).css({'marginTop': '0', 'position':'relative', 'top': '-10px'});
									$(this).delay(i*250).animate({'top': '0', 'opacity': 'show'});
								});
								
							});
							
						});
						
					});
					
				});
				
			});
			
		});
		
	});
});

