// JavaScript Document
	 $(document).ready(function(){

        splash();

        function splash(){
           setTimeout('showsplash()',2000);
           setTimeout('hidesplash()',18000);
        }

        showsplash = function(){
	        $("#close_splash").jAlign({top_margin:110});
	        $("#splash").jAlign({top_margin:130});
       	    $("#splash").show();
            $("#close_splash").show();
        }

        hidesplash = function(){
            $("#splash").hide();
            $("#close_splash").hide();
        }

        $("#close_splash").click(function(){
           hidesplash();
        });

		

/*		$(".link").click(function () {
		  var foto_id = $(this).attr('rel');

		  $(".banner img").hide();
		  $("#"+foto_id).fadeIn("fast");
		  $("#"+foto_id).show();

		  $(".navbanner a").css({color: "#fff"});
		  $(this).css({color: "#000"});

		});*/

  $('A[rel="external"]').click( function() {
        window.open( $(this).attr('href'), "mywindow","menubar=0,scrollbars=1,resizable=1,width=650,height=500" );
        return false;
    });

		$("#respo").click(function(){


			$("#overlay").css({'width': $(window).width(), 'height': $(document).height(), 'opacity': 0.4});
			$("#overlay").show();

				$.ajax({
			   type: "GET",
			   url: "respo.asp",
			   success: function(data){
						$("#x_content").show();
						$("#close").show();
						$("#x_content").css({'opacity': 100});
						$("#x_content").html(data);
						$("#overlay").click(function(){
							$("#x_content").hide();
							$("#overlay").hide();
							$("#close").hide();
						});
						$("#close").click(function(){
							$("#x_content").hide();
							$("#overlay").hide();
							$("#close").hide();
						});
				   }

			   });
			$("#loading").bind("ajaxSend", function(){$(this).show();}).bind("ajaxComplete", function(){$(this).hide();});
		}
	);

	  });

	  function open_window(url, width, height){
	    window.open(url, 'janela','left=20,top=20,width='+width+',height='+height+',toolbar=0,resizable=0,scrollbars=1' )
	  }

