 
 
$(document).ready(function() {
		$('.miniaturas img').css('opacity', 0.5);
		$('.miniaturas img').width(47);
		$('.miniaturas img').height(47);
		$('.miniaturas img:first').css('opacity', 1);
		$('#flotacion img').hide();
		$('#flotacion img:first').show();
 
 	
 
 		  $(function() {
        $('.gallery a').lightBox();
    
	$('.horizontal img').width(245);
		$('.horizontal img').height(162);
		
			$('.vertical img').height(208);
		$('.vertical img').width(130);
    });
 
 
 $("#mapa").click(function(){
				

		$("#callejero").replaceWith(generarMapaGoogle());
		
		
	 });
		
		 $("#mapa2").click(function(){
				

		$("#callejero").replaceWith(generarMapaGoogle2());
		
		
	 });
		
			
		$('#menu-actual a').addClass('suave');
		$('#menu-actual li a:first').addClass('encima');
		
			$(".texto").hide();
			$(".texto:first").show();
			
			$("#menu-actual li a").click(function (evento) {
				
				
				$('#menu-actual li a').removeClass('encima');
				
				$(this).addClass('encima');
			
				
				var nombre=$(this).attr("name");
				var posicion= nombre.substring(4,5);
				$(".texto").hide();
			
				$(".texto").eq(posicion).show();
				
				evento.preventDefault(); });
				
		
$("#menu-actual li a").mouseenter(function (evento) {
				
				$('#menu-actual li a').removeClass('sobre');
				
				$(this).addClass('sobre');
		
			

			});	 
		
$("#menu-actual li a").mouseout(function () {
				
			$(this).removeClass('sobre');
			$(this).addClass('suave');
			
			

			});	 
			
				$('.miniaturas img').click(function() {
		 
	var posicion=$(this).attr("name");
	
	 var width_foto = $("#foto").width();
	  
 var margen_left = (width_foto - $("#flotacion img").eq(posicion).width())/2;  
 
$('#foto').css("left",margen_left);  

$("#flotacion img").hide();
			
			$("#flotacion img").eq(posicion).fadeIn('slow');
			
			
		
		$('.miniaturas img').css('opacity', 0.5);
			
			$(this).css('opacity', 1);	
		});	
			$('.miniaturas img').hover(function() {
			 
			 	$(this).css('border', "1px solid black");
			 	}, function(){
					$(this).css('border', "1px solid #ccc");
					
				}) ;	

			});	 
				
						
			function generarMapaGoogle() {
		
	var mapaGoogle='<iframe width="550" height="450" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.es/maps/ms?ie=UTF8&amp;hl=es&amp;msa=0&amp;msid=102433515588281589457.00047568e152ad4ca36aa&amp;ll=43.461392,-3.823242&amp;spn=0.007009,0.011802&amp;z=16&amp;output=embed"></iframe><br /><small>Ver <a href="http://maps.google.es/maps/ms?ie=UTF8&amp;hl=es&amp;msa=0&amp;msid=102433515588281589457.00047568e152ad4ca36aa&amp;ll=43.461392,-3.823242&amp;spn=0.007009,0.011802&amp;z=16&amp;source=embed" style="color:#0000FF;text-align:left">Pizzerías Santander</a> en un mapa más grande</small>';
	return mapaGoogle;		
	}
		
				function generarMapaGoogle2() {
		
	var mapaGoogle='<table cellspacing="0" cellpadding="0" border="0"><tr><td><iframe src="http://www.map-generator.net/extmap.php?name=Restaurante%	20Express&amp;address=C%2F%20Santa%20Luc%EDa%203%2C%20Santander&amp;width=550&amp;height=500&amp;maptype=map&amp;zoom=16&amp;hl=en&amp;t=1247741506" width="550" height="500" marginwidth="0" marginheight="0" frameborder="0" scrolling="no"></iframe></td></tr><tr><td align="right"><a style="font:8px Arial;text-decoration:none;cursor:default;color:#5C5C5C;" href="http://www.map-generator.net">Map Generator</a></td></tr></table><!-- Do not change code! -->';
	return mapaGoogle;		
	}	

	
