$(document).ready(function(){
// Super Destaque
	$('#cycleDestaque').cycle({ 
		fx:     'fade', 
		speed:  2000, 
		timeout: 7000, 
		pager:  '.destaqueBottom' 
	});
});
$(document).ready(function(){

 $('h1').flash(
	{ 
		src: 'swf/h1.swf', 
		flashvars: { 
			css: [
				'* { color: #000; }',
			].join(' ')
		},
		wmode: "transparent"
	},
	
	{ version: 7 },
		function(htmlOptions) {
		htmlOptions.flashvars.txt = this.innerHTML;
		this.innerHTML = '<div>'+this.innerHTML+'</div>';
		var $alt = $(this.firstChild);
		htmlOptions.height = 30;
		htmlOptions.width = 300;
		$alt.addClass('alt');
		$(this)
		.addClass('h1flash')
		.prepend($.fn.flash.transform(htmlOptions));						
	}
);

    $('#destaques .imagens_imoveis1').jCarouselLite({
        btnNext: '.anterior_cycle1',
        btnPrev: '.proximo_cycle1',
		auto: 10000,
		speed: 500,
		visible: 4
    });
	
    $('.destaques .imagens_imoveis').jCarouselLite({
        btnNext: '.anterior_cycle2',
        btnPrev: '.proximo_cycle2',
		auto: 10000,
		speed: 500,
		visible: 4
    });	
	


 
$('#destBanners') 
.after('<div id="pager">') 
.cycle({ 
    fx:     'fade', 
    speed:  'medium', 
    speed:    500, 
    timeout:  4000,
    pager:  '#pager' 
});
 
});	

function addFriend(){
	var fieldsetIndicados = document.getElementById("fieldsetIndicados");
	var campos = fieldsetIndicados.getElementsByTagName("dd");
	var num_campos = campos.length/2;
	var mydl = fieldsetIndicados.getElementsByTagName("dl");
	var dlContent = mydl[0].innerHTML;
	var newdlContent = '<dt><label for="nomeAmigo['+ num_campos +']">Nome do '+ (num_campos + 1) +'<sup>o</sup> indicado:</label></dt>';
	newdlContent += '<dd><input type="text" name="nomeAmigo['+ num_campos +']" id="nomeAmigo['+ num_campos +']" maxlength="50" size="50" title="requerido" /></dd>';
	newdlContent += '<dt><label for="emailAmigo['+ num_campos +']">E-mail do '+ (num_campos + 1) +'<sup>o</sup> indicado:</label></dt>';
	newdlContent += '<dd><input type="text" name="emailAmigo['+ num_campos +']" id="emailAmigo['+ num_campos +']" maxlength="50" size="50"  /></dd>';
	mydl[0].innerHTML = dlContent + newdlContent;
	//alert(mydl[0].innerHTML);
	
}

$(document).ready(function(){
	//TABS
	$('#fichaLancamento').tabs({
		fxSlide:	true,
		fxFade:		true,
		fxSpeed:	'fast'
	});
	
	
});

$(document).ready(function(){
	$("#Telefone").mask("(99) 9999-9999");
	$("#Celular").mask("(99) 9999-9999");	
	$("#Telefone_imobiliaria").mask("(99) 9999-9999");	
	$("#Telefone_comercial").mask("(99) 9999-9999");
	$("#Telefone_comercial_conjuge").mask("(99) 9999-9999");
	$("#Telefone_banco").mask("(99) 9999-9999");	
	$("#Telefone_banco2").mask("(99) 9999-9999");	
	$("#Telefone_empresa_contato").mask("(99) 9999-9999");
	$("#Telefone_empresa_contato2").mask("(99) 9999-9999");
	$("#Telefone_residencial").mask("(99) 9999-9999");
	$("#Telefone_banco3").mask("(99) 9999-9999");
	$("#Telefone_empresa_contato3").mask("(99) 9999-9999");
	$("#Telefone_locador").mask("(99) 9999-9999");
	$("#Telefone_conjuge").mask("(99) 9999-9999");
	$("#Celular_conjuge").mask("(99) 9999-9999");
	$("#Telefone_Residencial").mask("(99) 9999-9999");
	$("#Telefone_Comercial").mask("(99) 9999-9999");
	$("dd #telefone").mask("(99) 9999-9999");	
	$("#celular").mask("(99) 9999-9999");	
	$("#Fax").mask("(99) 9999-9999");	
	$("#Celular_locador").mask("(99) 9999-9999");
	$("#tx_telefone").mask("(99) 9999-9999");
	
	$("#Data_nascimento").mask("99/99/9999");
	$("#Data_nascimento_conjuge").mask("99/99/9999");
	$("#Data_Nascimento").mask("99/99/9999");	
	
	$("#Cpf").mask("999.999.999-99");
	$("#Cpf_conjuge").mask("999.999.999-99");	
	
	$("#Cep").mask("99999-999");
	$("#Cep_locador").mask("99999-999");
	$("#Cep_conjuge").mask("99999-999");
	
	$("#txtArea").maskDecimal();
	$("#txtAreaTot").maskDecimal();
	$("#Area_construida").maskDecimal();
	$("#Valor").maskMoney();
	$("#Valor_condominio").maskMoney();		
});


