	var janela;
	function popup(URL,w,h) {
		if (janela) {
			janela.close();
		}
		janela = window.open(URL,'popup',"width = " + w + ", height = " + h + ",status=no,resizable=yes,toolbar=no,scrollbars=yes");
		return false;
  }
  function urldecode(nome) {
    nome = nome.replace(/\+/g, " ");
    nome = unescape(nome);
    return nome;
  }


   createThumbLinks = function() {
    $('a.thumb').click( function() {
      if (janela) {
    		janela.close();
    	}
  		janela = window.open($(this).attr('href'),'thumb','width=100,height=100,status=no,resizable=yes,toolbar=no,scrollbars=no');
  		return false;
    });
  }

  $(document).ready(function () {
    // Create External Links
    $('a[@rel=external]').attr('target', '_blank');

    createThumbLinks();
    $('body').prepend("<div id='progresso'><img src='img/progress.gif' alt='Carregando...' /></div>");
    $('#progresso').hide();
  });

