$(document).ready(function(){
	//trabalhando com as alturas das colunas
	$('#content').css('min-height', $('#sidebar').height() + 30);	
	//trabalhando com as alturas das colunas
	
	//hover das fotos
	$('.img-hover').fadeTo("fast",1.0);
	$('.img-hover').parent().parent().find("span").fadeTo("fast",1.0);
	$(".img-hover").hover( 
		function(){
			$(this).fadeTo("fast",0.8);
			$(this).parent().parent().find("span").fadeTo("fast",0.8);
		},
		function(){
			$(this).fadeTo("fast",1.0);
			$(this).parent().parent().find("span").fadeTo("fast",1.0);
		}
	);
	//hover das fotos
    
    //configuração do popup
	$.superbox.settings = {
		boxId: "superbox", // Id attribute of the "superbox" element
		boxClasses: "", // Class of the "superbox" element
		overlayOpacity: .9, // Background opaqueness
		boxWidth: "700", // Default width of the box
		boxHeight: "640", // Default height of the box
		loadTxt: "<img src='img/preload.gif' />", // Loading text
		closeTxt: "<img src='img/close.png' title='Fechar' />", // "Close" button text
        nextTxt: "Próxima &raquo;",
		prevTxt: "&laquo; Anterior"
	};
	$.superbox();
	//configuração do popup
    
    /*$('#list-agenda LI').click(
        function(){
            if($('#list-agenda LI > UL').css('display') == 'none')
                $(this).children().show();
            else
                $('#list-agenda LI > UL').hide();
        }
    );*/    
	
	$(".data").mask("99/99/9999");
   	$(".telefone").mask("(99) 9999-9999");
   	$(".cpf").mask("999.999.999-99");
   	$(".cnpj").mask("99.999.999/9999-99");
	$(".cep").mask("99999-999");
    
    var colum1 = $(".lista-ultimas").height();
    var colum2 = $("#form-enquete FIELDSET").height();
    var columMax = "";
    
    if(colum1 > colum2) columMax = colum1;
    if(colum2 > colum1) columMax = colum2;
    
    $(".lista-ultimas").height(columMax);
    $("#form-enquete FIELDSET").height(columMax);
});

function toogleAgenda(id){
	document.getElementById('agenda-' + id).style.display = (document.getElementById('agenda-' + id).style.display != 'block') ? 'block' : 'none';
         
    if($('#bullet-' + id).attr('src') == 'img/bullet.png'){
        $('#bullet-' + id).attr('src', '');   
        $('#bullet-' + id).attr('src', 'img/bullet-down.png');
    }
    else{
        $('#bullet-' + id).attr('src', '');   
        $('#bullet-' + id).attr('src', 'img/bullet.png');
    }
	
	void(0);
}

