var Geral = {

	__construct: function() {
		_this = Geral;
		$("input[type='text'],input[type='password'],textarea").resetDefaultValue();
		$("a.lightbox").lightBox();
	}

}

$(document).ready(function(){
	Geral.__construct();
	
	$('.anima').cycle({ 
    fx: 'scrollHorz',
    timout: 6000, 
	cleartypeNoBg: true,
	next: '.seta-direita',
	prev: '.seta-esquerda',
	pager: '.num'
	});
	
	$('.animacao-villa').cycle({ 
    fx: 'fade',
    timeout:  5000, 
	cleartypeNoBg: true
	});
	
	$('#acordeon ul').addClass(" invisivel");
	$('#acordeon h3').css('cursor','pointer');
	$('#acordeon h3').click(function(){
		$(this).toggleClass("seta");
		$(this).next().toggleClass("invisivel");
	});
	
	/**NewsLetter**/
	$form = $('#formnews');
	$opcao = $('#xopcao');
	$retorno = $('#result');
	end = $form.attr('action');
	
		
	$('.bt-incluir').click(function(){
		$opcao.attr('value','add');
		$.post(end,
			   $form.serialize(),
			   function(data){
				   $retorno.html(data);
				   })
	})
	
	$('.bt-excluir').click(function(){
				$opcao.attr('value','del');
		$.post(end,
			   $form.serialize(),
			   function(data){
				   $retorno.html(data);
				   })
	})
});