function doMenuUbicacion() {
    $('#menu-ubicacion .ciudad').each(function() {
		var img_ciudad = $('img', this).get(0);
		var div_plazas = $('.plazas', this);
		
        $(img_ciudad).click(function() {
            resetMenuUbicacion(this);
            $(div_plazas).toggle();
            
			imgOff = $(this).attr("src");
			imgOn = imgOff.replace("Off.gif", "On.gif");
			$(this).attr("src", imgOn);
        });
        
        $(".plazas img", this).click(function() {
			resetMenuUbicacionPlazas(div_plazas, this);
			
			imgOff = $(this).attr("src");
			imgOn = imgOff.replace("Off.gif", "On.gif");
			$(this).attr("src", imgOn);
        });
    });
}

function resetMenuUbicacion(exclusion) {
	$('#menu-ubicacion .ciudad img').not(exclusion).each(function() {
        imgOn = $(this).attr("src");
        imgOff = imgOn.replace("On.gif", "Off.gif");        
		$(this).attr({ src: imgOff });
	});
	
	$('#menu-ubicacion .ciudad').not(exclusion).each(function() {
		$('.plazas', this).hide();
	});
}

function resetMenuUbicacionPlazas(ciudad, imagen) {
	$('img', ciudad).not(imagen).each(function() {
        imgOn = $(this).attr("src");
        imgOff = imgOn.replace("On.gif", "Off.gif");        
		$(this).attr({ src: imgOff });
	});
}