	$(function(){
		$('#barra_roteiro > ul').tabs({ fxSlide: true, fxFade: true, fxSpeed: 'normal' });
		//$('#menu2').clickMenu();
		$(".access").attr({href:"#"});
		$(".divnone").css({display:"none"});
		$('#dest_home').innerfade({
			speed: 'slow',
			timeout: 12000,
			containerheight: '200px'
		});
	});
	function show_sub(div){
		$(div).slideToggle("slow");
	}
	function mostra_cidades(tipo,id){
		var destino = '#targ_cid'+id;
		var url = 'lista_cidades.php?tipo='+tipo+'&id='+id;
		if ($(destino).html() == ''){
			$(destino).slideToggle("fast");
			$(destino).html("<div class='carrega'>Carregando...</div>");
			$.ajax({
			  url: url,
			  cache: false,
			  success: function(html){
				$(destino).html(html);
				$(".access").attr({href:"#"});
			  }
			});
		}
	}
	
	function mostra_popup(id){	
		w = screen.Width;
		h = screen.Height;
		window.open('popup.php?id=' + id,'popcatalogo', 'width=' + w + ' height = ' + h + ' toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes')
	}
	function mostra_hoteis(id,rande){
		var destino = '#targ_hot'+id+rande;
		var url = 'lista_hoteis.php?id='+id;
		$(destino).slideToggle("fast");
		if ($(destino).html() == ''){
			$(destino).html("<div class='carrega'>Carregando...</div>");
			$.ajax({
			  url: url,
			  cache: false,
			  success: function(html){
				$(destino).html(html);
				
			  }
			});
		}
	
	}
	function cidades_letra(letra){
		var destino = '#cidades_letra';
		var url = 'lista_cidades_letra.php?letra='+letra;
			$(destino).html("<div class='carrega'>Carregando...</div>");
			$.ajax({
			  url: url,
			  cache: false,
			  success: function(html){
				$(destino).html(html);
			  }
			});
	}
	
	function hoteis_letra(letra){
		var destino = '#hoteis_letra';
		var url = 'lista_hoteis_letra.php?letra='+letra;
			$(destino).html("<div class='carrega'>Carregando...</div>");
			$.ajax({
			  url: url,
			  cache: false,
			  success: function(html){
				$(destino).html(html);
				tb_init('a.thickbox, area.thickbox, input.thickbox');
			  }
			});
	}
	function chama_texto(tipo,id){
		var destino = '#texto'+id;
		var url = 'chama_texto.php?id='+id;
			if ($(destino).html() == ''){
				$(destino).html("<div class='carrega'>Carregando...</div>");
				$.ajax({
				  url: url,
				  cache: false,
				  success: function(html){
					$(destino).html(html);
				  }
				});
			}
			$(destino).slideToggle("fast");
	}
	function count_field(field,limit,display){
		if(field.value.length > limit){
			field.value = field.value.substring(0, limit);
		}
		if(display != null){
			display.innerHTML = field.value.length;
		}
	}