var hits = 5;
function fontSize(action, container){
	container = typeof(container) != 'undefined' ? container : '#conteudo';
	var hitIncrease = 0;
	var hitDecrease = 0;
	
	var pegaTodos = {pega : function(maiorDeTodos){
	var filho;
	
	// Passo por todos os controles.
	jQuery(maiorDeTodos).children().each(function(i){
	filho = jQuery(this);
	
	$fs = parseInt(jQuery(filho).css('font-size'));
	if(action=="plus" && $fs<16) $fs+=1;
    else if(action=="minus" && $fs>9) $fs-=1;
	jQuery(filho).css('font-size', $fs);
	
	if (jQuery(filho).children().length != 0) {
	pegaTodos.pega(jQuery(filho));
	}
	});
	}};
	
	pegaTodos.pega(jQuery(container));
	
	if (hitIncrease == 1)hits+=1;
	else if (hitDecrease == 1)hits-=1;
	
}

function abrirPopup(urlPopup)
{
	jQuery('#indique').toggle();
	jQuery('#layerOpaco2').toggle();
	jQuery('#indique').height(jQuery(document).height());
	document.getElementById('indique').style.width=(document.body.offsetWidth+50)+'px';
	jQuery('#layerOpaco2').height(jQuery(document).height());
	document.getElementById('layerOpaco2').style.width=(document.body.offsetWidth+50)+'px';
	jQuery("#carregando-popup").css('display', 'block');
	jQuery("#miolo-popup").load(urlPopup, '', function(){jQuery("#carregando-popup").css('display', 'none');});
}

jQuery(function(){
	jQuery('#decrease').click(function(){ fontSize('minus'); });
	jQuery('#increase').click(function(){ fontSize('plus'); });
	jQuery('.div_menu').hover(function(){jQuery(this).css("background-color", "#FFEDA6");},function(){jQuery(this).css("background-color", "#ffcc00");});
	jQuery('.div_vitrine').hover(function(){jQuery(this).css("background-color", "#fae077");},function(){jQuery(this).css("background-color", "#ffffff");});
});

