intHeight = document.documentElement.clientHeight;
intWidth = document.documentElement.clientWidth;
var intT = ( ( intHeight / 2 ) - ( 650 / 2 ) );
var intL = ( ( intWidth / 2 ) - ( 1000 / 2 ) ) - 5;
var GB_DONE = false;
var GB_HEIGHT = 650;
var GB_WIDTH = 1000;
function GB_show(caption, url, height, width)
{
	GB_HEIGHT = height || 650;
	GB_WIDTH = width || 1000;

		$(document.body).append("<div id='GB_overlay'></div><div id='GB_window'><div id='GB_caption'></div>"+
		"<div id='imgNormal1' alt='Fechar' title='Fechar'><a></a></div>"+
		"<div id='cartaoHome'><a href='../index.htm' title='HOME'></a></div>"+"</div>");
		$("#imgNormal").hide();
		$("#fechaTeste").click( function(){ GB_hide('root'); } );
		$("#cartaoHome").click( function(){ GB_hide('root'); } );
		$("#GB_overlay").click( function(){ GB_hide('root'); } );
		$("#imgNormal1").remove();
		$(window).resize(GB_position);
	
	$("#GB_frame").remove();
	$("#GB_window").append("<iframe id='GB_frame' src='"+url+"' Frameborder='0'></iframe>");
	
	$("#GB_caption").html(caption);
	$("#GB_overlay").show();
	GB_position();
	
	if(GB_ANIMATION)
		$("#GB_window").show();
	else
		$("#GB_window").show();
}

function GB_hide(destiny)
{
	$("#GB_window").remove();
	var myInterval = window.setInterval(function (a,b) {
		$("#GB_overlay").remove();
		clearInterval(myInterval);
	},10);
}

function GB_position()
{
	intHeight = document.documentElement.clientHeight;
	intWidth = document.documentElement.clientWidth;
	var intT = ( ( intHeight / 2 ) - ( 650 / 2 ) ) - 10;
	var intL = ( ( intWidth / 2 ) - ( 1000 / 2 ) ) - 5;
	$("#GB_window").css({width:"1000px",height:"650px",left: intL+"px", top:intT+"px" });
	$("#GB_frame").css("height","650px");
	$("#GB_frame").css("width","1000px");
}
      var GB_ANIMATION = true;
      $(document).ready(function(){
        $("a.telefone").click(function(){
          var t = this.title || $(this).text() || this.href;
          GB_show("",this.href,600,1000);
          return false;
        });
      });

