		// fade nos destaques
		
		$('.thumb').mouseover(function() {
			$(this).siblings(".thumb").stop().fadeTo( 300, .6);
			//$("body").append("<strong>Hello</strong>");
		});
		
		$('.thumb').mouseout(function() {
			$(this).siblings(".thumb").stop().fadeTo( 300, 1);
		});
		
		$("#img_principal").css("display","none");
		$("#shadow_principal").css("display","none");
					
					
$(document).ready(function() 
{		

					
					
					$('#img_principal').load(function() {
						$("#shadow_principal").css("width",$('#img_principal').width());
						$("#shadow_principal").css("height",$('#img_principal').height());
						$("#shadow_principal").css("margin-top",-( $('#img_principal').height()));
						
						$("#loader_image img").fadeOut();
						$(".white_image").fadeOut(2000, function(){
							$("#img_principal").fadeIn();
							$("#shadow_principal").fadeIn();
						});
						
						
					});

				
				

			$('body').animate({opacity: 1}, 500);
			$('#sombra_header1').animate({height: "165px"}, 600);
			$('#sombra_header2').animate({height: "11px"}, 600);
			$('#header').animate({height: "165px"}, 600, function() 
			{	
				$('#menu_content').animate({opacity: 1}, 600);
				$('#logo_img').animate({opacity: 1}, 600);
				$('#page_description').animate({opacity: 1}, 600);
				
				$('#site_content').animate({opacity: 1}, 1500, function() 
				{
					$(".white_youtube").html('<embed src="http://www.youtube.com/p/A790D173EBB42434?hl=pt_BR&fs=1" type="application/x-shockwave-flash" width="318" height="265" allowscriptaccess="always" allowfullscreen="true"></embed>'); /* inclui video do youtube após carregar a página para não quebrar o efeito fade */
						
				});
			});
			
			
			
			$(function(){
				$('#thumb0').bind("mouseenter mouseleave", function(event){
				$('#popup0').stop(true, true).fadeToggle("normal");
				});
				$('#thumb1').bind("mouseenter mouseleave", function(event){
				$('#popup1').stop(true, true).fadeToggle("normal");
				});
				$('#thumb2').bind("mouseenter mouseleave", function(event){
				$('#popup2').stop(true, true).fadeToggle("normal");
				});
				$('#thumb3').bind("mouseenter mouseleave", function(event){
				$('#popup3').stop(true, true).fadeToggle("normal");
				});
				$('#thumb4').bind("mouseenter mouseleave", function(event){
				$('#popup4').stop(true, true).fadeToggle("normal");
				});
				$('#thumb5').bind("mouseenter mouseleave", function(event){
				$('#popup5').stop(true, true).fadeToggle("normal");
				});
			});
	
			$(function(){
				$(document).mousemove(function(e){
				  $(".popup").css("top",e.pageY+10);
				  $(".popup").css("left",e.pageX+20);
				  $(".popup_shadow").css("top",e.pageY+20);
				  $(".popup_shadow").css("left",e.pageX+30);
				}); 
			});
		
		
			// menu
	
			$('#menu_home').mouseenter(function() {
				$('#texto_home').stop(true, false).animate({marginTop: "-8", opacity: 0}, 150).animate({marginTop: "8"}, 10).animate({marginTop: "0", opacity: 1}, 150);
			});
			
			
			$('#menu_projetos').mouseenter(function() {
				$('#texto_projetos').stop(true, false).animate({marginTop: "-8", opacity: 0}, 150).animate({marginTop: "8"}, 10).animate({marginTop: "0", opacity: 1}, 150);
			});
						  
			$('#menu_textos').mouseenter(function() {
				$('#texto_textos').stop(true, false).animate({marginTop: "-8", opacity: 0}, 150).animate({marginTop: "8"}, 10).animate({marginTop: "0", opacity: 1}, 150);
			});
			
			
			$('#menu_clientes').mouseenter(function() {
				$('#texto_clientes').stop(true, false).animate({marginTop: "-8", opacity: 0}, 150).animate({marginTop: "8"}, 10).animate({marginTop: "0", opacity: 1}, 150);
			});
});


	function footer(){	
		var width = $(window).width();
		var footer = $("#center_footer").width();
		var mirror_size = (width-footer)/2;
        
		if (width <= footer){
			$("#left_footer").hide();
			$("#right_footer").hide();
        }
        else{
			$("#left_footer").show();
			$("#left_footer").css("width",mirror_size);
			$("#right_footer").show();
			$("#right_footer").css("width",mirror_size);
		}
		
		var height = $(window).height();
		var content = $('body').outerHeight();
		/*var content = $('#center').height() + 285;*/
		/*alert("content: "+content+"window: "+height);*/
		
		if (content >= height){
			$(".footer").css("position","relative");
			$(".footer_small").css("position","relative");
        }
        else{
			if (height >= 640){
				$(".footer").css("position","absolute");
				$(".footer_small").css("position","absolute");
			}
			else
			{
				$(".footer").css("position","relative");
				$(".footer_small").css("position","relative");
			}
        }
    }

	function footer_fade(){
		$('.footer').delay(700).animate({opacity: 1}, 1500);
		$('.footer_small').delay(700).animate({opacity: 1}, 1500);
	}
