$(function(){

    $('#topo #busca_avancada form').addClass('has_js').prepend('<div class="busca_topo"></div>').append('<div class="busca_rodape"><div class="botao_toggle_avancada">Busca Avançada</div></div>');
    $('#topo #busca_avancada div.botao_toggle_avancada').bind('click',function(){
        $('#topo #busca_avancada form').toggleClass('expandido');
    });
    if($('#imoveis.busca').length){
        $('#topo #busca_avancada div.botao_toggle_avancada').trigger('click');
    }
    $('#indices_economicos ul li:even').addClass('alternate');
    $('#rodape ul.filiais li:last').css('border','none');
    $('#a_lancamento').parents('div.input').hide();
/*
	var thead = $('table.imoveis thead');
	thead.each(function(){
		var table = $(this).parent().parent();
		if (table.width()>$('#conteudo').width()) return;
		alert( table.width() +'-'+ $('#conteudo').width() );
		var clone = $('<div/>').prependTo(table);
		clone.css({
			'width': $(this).width(),
			'position': 'fixed',
			'top':0,
			'display': 'none'
		});

		clone.html('<table class="imoveis"><thead></thead></table>');
		$($(this).clone()).appendTo(clone.find('thead'));
		clone.topo = $(this).offset().top;
		setInterval(function(){
			if($(window).scrollTop()>clone.topo){
				clone.show();
			} else {
				clone.hide();
			}
		}, 50);
	});*/
});
$(window).bind('load',function(){
    $('#twitter ul li:even').addClass('alternate');
});

