$j = jQuery; /* Loading */ window.onload = function() { $j("#loading_site").hide(); $j("#content").css("visibility","visible"); } /* ====== */ /* Funções para a página de fotos */ fotos_carousel_load = function (page) { if (page == 'fotos-de-studio' || page == 'imagens-campo' || page == 'detalhes') { try { fotos_carousel_load_XMLHTTP.abort(); } catch (e) {} fotos_carousel_load_XMLHTTP = $j.ajax( { type: "GET", url: page + ".php", dataType: "html", beforeSend: function (HTML) { $j(".menu_fotos").hide(); $j(".menu_fotos_loading").show(); }, error: function () { $j(".menu_fotos_loading").hide(); $j(".menu_fotos").show(); }, success: function (HTML) { $j(".menu_fotos_loading").hide(); $j(".menu_fotos").show(); $j(".menu_fotos").html(HTML); $j("#mycarousel").jcarousel(); $j("a[rel='galeria_imagens']").colorbox({ photo: true }); } } ); } } /* ============================== */ /* Funções para a página de videos */ video_load = function (page) { if (page == 'fotos-de-studio' || page == 'imagens-campo' || page == 'detalhes') { try { fotos_carousel_load_XMLHTTP.abort(); } catch (e) {} fotos_carousel_load_XMLHTTP = $j.ajax( { type: "GET", url: page + ".php", dataType: "html", beforeSend: function (HTML) { $j(".menu_fotos").hide(); $j(".menu_fotos_loading").show(); }, error: function () { $j(".menu_fotos_loading").hide(); $j(".menu_fotos").show(); }, success: function (HTML) { $j(".menu_fotos_loading").hide(); $j(".menu_fotos").show(); $j(".menu_fotos").html(HTML); $j("#mycarousel").jcarousel(); $j("a[rel='galeria_imagens']").colorbox( { photo: true } ); } } ); } } /* ============================== */ /* Function form contato */ envia_form_contato_mensagem = 'Enviando mensgem...'; envia_form_contato = function () { if ($j("#answer").html() != envia_form_contato_mensagem) { $j.ajax( { type: "POST", url: "contato_post.php", data: $j("#form_contato").serialize(), dataType: "html", beforeSend: function (HTML) { $j("#answer").html(envia_form_contato_mensagem); }, success: function (HTML) { $j("#answer").html(HTML); } } ); } } /* ============================== */ /* Fuction colorbox */ $j(document).ready(function(){ $j("a[rel='galeria_imagens']").colorbox( { photo: true } ); }); /* ================ */ /* Fuction to "Projetos" in menu */ $j(document).ready(function(){ $j(".projetos_box").hover(function() { $j(".proj").show(); }, function(){ $j(".proj").hide(); }); }); /* ============================= */