function equalHeight(group) {
	var tallest = 0;
	group.each(function() {
		var thisHeight = $(this).height();
		if(thisHeight > tallest) {
			tallest = thisHeight;
		}
	});
	group.height(tallest);
	/*$(".mais").css({
		'position':'absolute',
		'right' : '10px',
		'bottom' : '10px'
				   });*/
}

function ajustaAltura() {
		var maior = 0;
		$('.bloco div').each(function() {
			var thisHeight = $(this).height();
			if(thisHeight > maior) {
				maior = thisHeight;
			}});
		$('.bloco div').height(maior);
};

function mostra(idDiv) {
	$('.conteudoTextos div').slideUp('medium');
	if($(idDiv).is(':visible')) {
		$(idDiv).slideUp('medium');
	}
	else {
		$(idDiv).slideDown(888);
	}
}


$(function() {
    
    $("#menuPrincipal li").bind("click", function(){
		$(this).find("ul").slideToggle("fast");
	});
	
	$('.fechar').click(function(){
		$('.conteudoTextos div').slideUp('slow');
	});
	
	ajustaAltura();
    
    /* FUNCÕES LIGHTBOX*/ 
	$('a.lightbox').lightBox();
	/* FUNCÕES SLIDE*/   
    jQuery('.pics').cycle({
        fx:     'fade',
        speed:  1000,
        timeout: 6000,
        next:  '.next',
		prev: '.prev'
    });
	
	
	$(".containerSlides ul").cycle({
		fx: "fade",
		speed: 333,
		timeout: 4000,
		next: ".nextPromocao",
		prev: ".prevPromocao"
	});
	
	//
	function escondeBusca() {
      jQuery("#palavraBusca").val('');
	}
	
	
	$('#nomeNewsletter, #emailNewsletter').bind({
	  'click': function() {
		if($(this).val() == "Digite seu nome" || $(this).val() == "Digite seu e-mail"){
			$(this).val("");
		}
	  },
	  'focusout': function() {
		if($(this).val() == ""){
		}
	  }
	});
	

});
