jQuery(document).ready(function() {
    jQuery('#mycarousel').jcarousel();
    jQuery('#mycarousel2').jcarousel();
});
function seleccionar_foto(img, id_hotel){
	if(jQuery.browser.safari){
		img='<img src="media/img/galeria/'+id_hotel+'/'+img+'" width=432"  />';
		document.getElementById('foto_seleccionada').innerHTML=img;
	}
	else{
		$('#foto_seleccionada').fadeTo("slow", 0  , function () { 
			mostrar_foto(img, id_hotel) 
		} );
	}		
}
			
function seleccionar_video(video, txtlink, bol_is_externo){
	var div = "#foto_seleccionada";
	if(bol_is_externo=='2'){
		openPopup(txtlink,"360_Tour", 800, 600);
	}	
	else{
		var data="video="+video+"&op=ver_video&txt_link="+txtlink+
					"&bol_is_externo="+bol_is_externo
		
		inicioEnvioVideo();
		$(div).load("proc_ajax_ver_video.php?"+data);
	}		
}
			
function mostrar_foto(img, id_hotel){
	jQuery("#foto_seleccionada").empty();
	var img='<img src="media/img/galeria/'+id_hotel+'/'+img+'" width=432"  />';
	$("#foto_seleccionada").html(img);
	//$('#div_recargar_foto').show('slow');
	$('#foto_seleccionada').fadeTo("slow", 1);
}
			
			
function ajax_recargar_galeria(iddestino){
	var div = "#recargar_galeria";
	var data_input={
		iddestino: iddestino,
		op: "recargar_galeria"
	}
	inicioEnvio();
	 $(div).load("proc_ajax_recargar_galeria.php", data_input, function(datos){
		  	jQuery('#mycarousel').jcarousel();
			jQuery('#mycarouse2').jcarousel();
	 });
}
			
			
function inicioEnvio(){
	var div = "#recargar_galeria";
	jQuery(div).html('<div align="center"><img src="images/imagenes_publicas/loading.gif" width="180" height="90" /></div>');
}
			
function inicioEnvioVideo(){
	var div = "#foto_seleccionada";
	jQuery(div).empty();
	jQuery(div).html('<br><br><br><br><br><br><div style="width:420px" align="center"><img src="../images/imagenes_publicas/loading.gif" width="180" height="90" /></div>');
}
