    function mostraFoto(id) {
        $.ajax( {
                    type: "POST",
                    url: "funcoes_jQuery.php",
                    data: "acao=exibeFoto&id=" + id,
                    beforeSend: function() {
                                    // enquanto a função esta sendo processada...
                                    $('#image-big').html('<img id="image-big" src="../img/carregando.gif">');
                },
          success: function(txt) {
          // troca o conteúdo
                                    //$("#image-big").fadeOut("slow");
                                    $('#left').html(txt);
                                  },

          error: function(txt) {
          // em caso de erro pode dar um alert('erro');
                                    alert('Erro: '+txt);
                               }
                }
              );
    }
    
    function mostraThumbs(id,pagina) {
        $.ajax( {
          //faz a chamada
                    type: "POST",
                    url: "funcoes_jQuery.php",
                    data: "acao=exibeThumbs&id=" + id+"&pagina="+pagina,
                    beforeSend: function() {
                                    // enquanto a função esta sendo processada...
                                    $('#right').html('<img id="image-big" src="../img/carregando.gif">');
                },
          success: function(txt) {
          // troca o conteúdo
                                    $('#right').html(txt);
                                    $("#image-big").fadeOut("slow");
                                  },

          error: function(txt) {
          // em caso de erro pode dar um alert('erro');
                                    alert('Erro: '+txt);
                               }
                }
              );
    }

    function enviaFormFoto(form) {
        if (validaForm(form)) {
            var id = document.getElementById('id_da_foto').value;
            var nome = document.getElementById('nome').value;
            var email = document.getElementById('email').value;
            var nomeAmigo = document.getElementById('nomeAmigo').value;
            var emailAmigo = document.getElementById('emailAmigo').value;
            $.ajax( {
                        type: "POST",
                        url: "email_fotos.php",
                        data: "acao=exibeFoto&id="+id+"&nome="+nome+"&email="+email+"&nomeAmigo="+nomeAmigo+"&emailAmigo="+emailAmigo,
                        beforeSend: function() {
                                        // enquanto a função esta sendo processada...
                    },
              success: function(txt) {
              // troca o conteúdo
                                        //$('#resultado-envio-email').html(txt);
                                        //$("#image-big").fadeOut("slow");
                                        alert('Foto enviada com sucesso.');
                                      },

              error: function(txt) {
              // em caso de erro pode dar um alert('erro');
                                        alert('Erro: '+txt);
                                   }
                    }
                  );
        }
        return false;
    }
    
    function cadastraNews(form) {
        if (validaForm(form)) {
            $.ajax( {
                        type: "POST",
                        url: "incs/funcoes_jQuery.php",
                        data: "acao=cadastraNews&email=" + document.getElementById('emailNews').value,
                        beforeSend: function() {
                                        // enquanto a função esta sendo processada...
                                        //$('#image-big').html('<img id="image-big" src="../img/carregando.gif">');
                    },
              success: function(txt) {
              // troca o conteúdo
                                        //$('#left').html(txt);
                                        alert('Obrigado por se cadastrar.'+txt);
                                      },

              error: function(txt) {
              // em caso de erro pode dar um alert('erro');
                                        alert('Erro: '+txt);
                                   }
                    }
                  );
        }
    }

	function mostraBanner1(id) {
		$.ajax( {
			type: "POST",
			url: "incs/funcoes_jQuery.php",
			data: "acao=exibeBanner1",
			beforeSend: function() {
				//$('#banner_1').html('<img src="../img/carregando.gif">');
			},
			success: function(txt) {
				$('#banner_1').html(txt).hide().fadeIn(800);
			},
			error: function(txt) {
				alert('Erro: '+txt);
			}
		});
	}
	function doFadein(txt){
	//alert(txt);
		$('#imagem-grande').html(txt);
		$('#imagem-grande').fadeIn(300);
	}
	function mostraImagemDestaque(id) {
		
		$.ajax( {
			type: "POST",
			url: "incs/funcoes_jQuery.php",
			data: "acao=exibeImagemDestaque",
			beforeSend: function() {
				//$('#imagem-grande').fadeOut(300);				
			},
			success: function(txt) {
				//$('#imagem-grande').hide();

				$('#imagem-grande').fadeOut(300);

				setTimeout(function() {
							$('#imagem-grande').html(txt);
							$('#imagem-grande').fadeIn(300);
							},300);

								
			},
			error: function(txt) {
				alert('Erro: '+txt);
			}
		});
	}

	function mostraBanner2() {
		$.ajax( {
			type: "POST",
			url: "incs/funcoes_jQuery.php",
			data: "acao=exibeBanner2",
			beforeSend: function() {
				//$('#banner_2').html('<img src="../img/carregando.gif">');
			},
			success: function(txt) {
				$('#banner_2').html(txt).hide().fadeIn(800);
			},
			error: function(txt) {
				alert('Erro: '+txt);
			}
		});
	}
	

