﻿$(document).ready(function(){
            
    //PRE-LOADER DE IMAGENS
    $(window).load(function(){
	
		$('#preloader').fadeOut('slow',function(){
            $(this).remove();
           $('#img_concept').fadeIn('slow', function() {
            // Animation complete
            });      
        });
		
		$('#preloader').fadeOut('slow',function(){
            $(this).remove();
           $('#gal_image').fadeIn('slow', function() {
            // Animation complete
            });      
        });
		
        $('#preloader').fadeOut('slow',function(){
            $(this).remove();
           $('#img1').fadeIn('slow', function() {
            // Animation complete
            });
        });
        
        $('#preloader').fadeOut('slow',function(){
            $(this).remove();
           $('#img2').fadeIn('slow', function() {
            // Animation complete
            });      
        });
        
        $('#preloader').fadeOut('slow',function(){
            $(this).remove();
           $('#img3').fadeIn('slow', function() {
            // Animation complete
            });      
        });
        
        $('#preloader').fadeOut('slow',function(){
            $(this).remove();
           $('#img4').fadeIn('slow', function() {
            // Animation complete
            });      
        });
        
        $('#preloader').fadeOut('slow',function(){
            $(this).remove();
           $('#img5').fadeIn('slow', function() {
            // Animation complete
            });      
        });
        
        $('#preloader').fadeOut('slow',function(){
            $(this).remove();
           $('#img6').fadeIn('slow', function() {
            // Animation complete
            });      
        });
       
    });
        
    //LINHAS ALTERNADAS NAS TABELAS	
	$('tbody tr:even').addClass("alt-row"); // Add class "alt-row" to even table rows
	
    
    /*MENU ESQUERDO*/
	/*1º NIVEL */
	$(".img_menu_1_01").hover(function(){this.src = this.src.replace("01","01_off");},function(){this.src = this.src.replace("01_off","01");});
    $(".img_menu_1_02").hover(function(){this.src = this.src.replace("02","02_off");},function(){this.src = this.src.replace("02_off","02");});
    $(".img_menu_1_03").hover(function(){this.src = this.src.replace("03","03_off");},function(){this.src = this.src.replace("03_off","03");});
    $(".img_menu_1_04").hover(function(){this.src = this.src.replace("04","04_off");},function(){this.src = this.src.replace("04_off","04");});
    $(".img_menu_1_05").hover(function(){this.src = this.src.replace("05","05_off");},function(){this.src = this.src.replace("05_off","05");});
    $(".img_menu_1_06").hover(function(){this.src = this.src.replace("06","06_off");},function(){this.src = this.src.replace("06_off","06");});
    $(".img_menu_1_07").hover(function(){this.src = this.src.replace("07","07_off");},function(){this.src = this.src.replace("07_off","07");});
	
	/*DISPLAY DE IMAGENS NO DETALHE DO PROJECTO*/
	$('#trueContainer a').click(function(ev){
	   
       ev.preventDefault();
					
       var imgLink = $(this).attr("href");
	   
       $('#gal_image').fadeOut('fast',function(){						
		   $('#gal_image').load(function(){
		       $(this).fadeIn();
		   }).attr('src', imgLink);
					
		});
										
	});
    
    /*MOSTRA O PAINEL DE DESTAQUES*/
    $("#btn_destak").mouseover(function(){
       $("#projects_h").slideDown(function(){
            $(this).mouseleave(function(){
               $(this).slideUp(); 
            });
       }); 
    });
    
    /*APLICA UM TOOLTIP AOS LINKS*/           
    $(".tooltip").easyTooltip();  		
			
});
  
