site = ({
	returnFasesChaves: function(){
		var parametros = "chaveselected="+$("#chaveselected").val();
		if($("#chaveselected").val() != 0){
			$.ajax({
				url:'/ajax/ajaxReturnFases.php',
				type:'POST',
				data:parametros,
				success:function(retorno)
				{
					$('#retornofaseschaves').html(retorno);
				} 
			});
		}
	},
	/*paginanotice: function(noticia_id){
		var parametros = "noticiaid="+noticia_id;
		$.ajax({
			url:'/ajax/ajaxReturnNoticia.php',
			type:'POST',
			data:parametros,
			success:function(retorno) {
				 $('#noticias').animate({
				    opacity: 'toggle'
				  }, 500, function() {
				    	$("#noticias").html(retorno);
					    $('#noticias').animate({
					    opacity: 'toggle'
					  }, 500, function() {						  
					  });
				  });
			} 
		});
	},*/
	
	paginacaoNot: function(page, atual, dir, pag) {
		if (dir == 1){			
			page = page + 1;
			atual = atual + 1;
		}else{
			page = page - 1;	
			atual = atual - 1;		
		}
		
		parametros = 'page='+page+'&atual='+atual;
		
		$.ajax({			 
			 url:'/ajax/ajaxReturnNoticia.php',
			 type:'POST',
			 data:parametros,
			 success:function(retorno) {
				/*$('#noticias').animate({
				    opacity: 'toggle'
				  }, 500, function() {
				    	$("#noticias").html(retorno);
					    $('#noticias').animate({
					    opacity: 'toggle'
					  }, 500, function() {						  
					  });
				  });*/
				$('#flowdireita').animate({
				    opacity: 'toggle'
				  }, 500, function() {
				    	$("#flowdireita").html(retorno);
					    $('#flowdireita').animate({
					    opacity: 'toggle'
					  }, 500, function() {						  
					  });
				  });
		 	 }
		});
	},	
	returnChaves: function(){
		var parametros = "faseschaves="+$("#faseschaves").val()+
						 "&chaveselected="+$("#chaveselected").val();
		$.ajax({
			url:'/ajax/ajaxReturnChaves.php',
			type:'POST',
			data:parametros,
			success:function(retorno)
			{
				   		$('#returnchaves').html(retorno);

			} 
		});
	},
	toggleFlow: function(div){
		$('#'+div).animate({
		    opacity: 'toggle'
		  }, 500, function() {
		  });
	},
	leiamaisNoticia: function(noticiaid){
		var parametros = "noticiaid="+noticiaid;
		$.ajax({
			url:'/ajax/ajaxReturnNoticia.php',
			type:'POST',
			data:parametros,
			success:function(retorno) {
				//$('#noticias').html(retorno);
				$('#flowdireita').html(retorno);				
				$('#noticias').animate({
				    opacity: 'toggle'
				  }, 500, function() {
				});
			} 
		});
	},
	exibeNoticia: function(id) {
		var parametros = 'id='+id;
				
		$.ajax({
			url: '/includes/funcoes.php?modulo=exibeNoticia',
			type: 'POST',
			data: parametros,
			success: function(retorno) {
				$('#exibeNot').html(retorno);
				
			}
		});
	}
});
