// Documento JavaScript de www.urotruzzi.com.br

function fixColumnsHeight(elements){
	var height;
	var higher = 0;
	var temp;
	elements.css("height", "");
	elements.each(function(i){
		temp = parseInt($(this).height());
		higher = (temp > higher) ? temp : higher ;
	});
	elements.css("height", higher);
}

function fixColumnsHeightTrigger(){
	fixColumnsHeight($(".left, .right"));
}

var defaultFontSize = 3;
var minFontSize = 3;
var maxFontSize = 6;
var CurrentFontSize = ($.cookie("currentFontSize"))? parseInt($.cookie("currentFontSize")) : defaultFontSize;

function switchFontSize(ckname,val){
	var bd = $('body');
	bd.removeClass();
	switch (val) {
		case 'dec':
			if (CurrentFontSize-1 > minFontSize-1)
				CurrentFontSize--;
		break;
		case 'inc':
			if (CurrentFontSize+1 < maxFontSize+1)
				CurrentFontSize++;
		break;
		default:
			CurrentFontSize = val;
	}
	bd.addClass('fs'+CurrentFontSize);
	$.cookie(ckname, CurrentFontSize, {duration:365});
}
