$(document).ready(function(){
    
    //Como entrar na Russi
    jQuery("#acesso_loja_content").css("display","none");


    //Visitante
    jQuery("#visitante_content").css("display","none");


    //CEP Inválido
    jQuery('#alDuvidas').click(function(){
        
        jQuery('#acesso_loja_content').show("slow");
        jQuery("#acesso_loja_content > h1").html("Como acessar a loja Russi?");
    
    });
    
     jQuery('#alDuvidasClose').click(function(){
        
        jQuery('#acesso_loja_content').hide("fast");
    
    });
    
    jQuery('#alDuvidasClose2').click(function(){
        
        jQuery('#acesso_loja_content2').hide("fast");
    
    });
    
    
    //Visitante entrar loja
    jQuery('#btnEntrarVisitante').click(function(){
        
        jQuery('#visitante_content').show("slow");
    
    });
    
     jQuery('#btnNaoConcordo').click(function(){
        
        jQuery('#visitante_content').hide("fast");
    
    });


    //Calcula a maior Elemento par Ajustar os Produtos da Home
    var maxheight = 0;    
   
    jQuery('.lancamentos_container .lstProdutos li').each(function(){
        if(maxheight < jQuery(this).height())
        {
            maxheight = jQuery(this).height();
        }
    });  
    
    jQuery('.lancamentos_container .lstProdutos li').css("height", maxheight);
    
    maxheight = 0;
    
    jQuery('.promocao_container .lstProdutos li').each(function(){
        if(maxheight < jQuery(this).height())
        {
            maxheight = jQuery(this).height();
        }
    });  
    
    jQuery('.promocao_container .lstProdutos li').css("height", maxheight);
    
    maxheight = 0;
    
    jQuery('.mais_vendidos .lstProdutos li').each(function(){
        if(maxheight < jQuery(this).height())
        {
            maxheight = jQuery(this).height();
        }
    });  
    
    jQuery('.mais_vendidos .lstProdutos li').css("height", maxheight);

    
    
    //Ajuste de titulo no detalhe do produto
    var heightTitProduto = jQuery('#main_content .titProduto').height() + 10;
    var heightlstReference = jQuery('#main_content .lstReference').height() + 10;
    var bpTotal = heightTitProduto + heightlstReference;

    jQuery('.bg_produto').css('background-position', '0 ' + bpTotal + 'px');
});


