	
	// ciudad (nombre_imagen, nombre_ciudad, link_ciudad, num_images)	
	var boston = new Array(4)
	boston[0] = 'boston'
	boston[1] = 'BOSTON'
	boston[2] = 'boston'
	boston[3] = '5'
	
	var lasvegas = new Array(4)
	lasvegas[0] = 'lasvegas'
	lasvegas[1] = 'LAS VEGAS'
	lasvegas[2] = 'las-vegas'
	lasvegas[3] = '5'
	
	var losangeles = new Array(4)
	losangeles[0] = 'losangeles'
	losangeles[1] = 'LOS ANGELES'
	losangeles[2] = 'los-angeles'
	losangeles[3] = '5'
	
	var miami = new Array(4)
	miami[0] = 'miami'
	miami[1] = 'MIAMI'
	miami[2] = 'miami'
	miami[3] = '5'
	
	var montreal = new Array(4)
	montreal[0] = 'montreal'
	montreal[1] = 'MONTREAL<BR>CANADA'
	montreal[2] = 'montreal'
	montreal[3] = '5'
	
	var neworleans = new Array(4)
	neworleans[0] = 'neworleans'
	neworleans[1] = 'NEW ORLEANS'
	neworleans[2] = 'new-orleans'
	neworleans[3] = '5'
	
	var newyork = new Array(4)
	newyork[0] = 'newyork'
	newyork[1] = 'NEW YORK'
	newyork[2] = 'new-york'
	newyork[3] = '5'
	
	var philadelphia = new Array(4)
	philadelphia[0] = 'philadelphia'
	philadelphia[1] = 'PHILADELPHIA'
	philadelphia[2] = 'philadelphia'
	philadelphia[3] = '5'
	
	var sandiego = new Array(4)
	sandiego[0] = 'sandiego'
	sandiego[1] = 'SAN DIEGO'
	sandiego[2] = 'san-diego'
	sandiego[3] = '5'
	
	var sanfrancisco = new Array(4)
	sanfrancisco[0] = 'sanfrancisco'
	sanfrancisco[1] = 'SAN FRANCISCO'
	sanfrancisco[2] = 'san-francisco'
	sanfrancisco[3] = '5'
	
	var toronto = new Array(4)
	toronto[0] = 'toronto'
	toronto[1] = 'TORONTO<br>CANADA'
	toronto[2] = 'toronto'
	toronto[3] = '5'
	
	var vancouver = new Array(4)
	vancouver[0] = 'vancouver'
	vancouver[1] = 'VANCOUVER<BR>CANADA'
	vancouver[2] = 'vancouver'
	vancouver[3] = '5'
	
	var washington = new Array(3)
	washington[0] = 'washington'
	washington[1] = 'WASINGHTON'
	washington[2] = 'washington'
	washington[3] = '5'
	
	var ciudades = new Array(11)
	ciudades[0] = boston
	ciudades[1] = losangeles
	ciudades[2] = miami
	ciudades[3] = montreal
	ciudades[4] = neworleans
	ciudades[5] = philadelphia
	ciudades[6] = sandiego
	ciudades[7] = sanfrancisco
	ciudades[8] = toronto
	ciudades[9] = vancouver
	ciudades[10] = washington
	ciudades[11] = lasvegas
	
	var number_cities = ciudades.length;
	
	// calculamos 5 numeros aleatorios distintos entre sí
	var rnd1 = Math.round(Math.random()*(number_cities-1));

	var rnd3 = Math.round(Math.random()*(number_cities-1));
	while (rnd1 == rnd3) {
			rnd3 = Math.round(Math.random()*(number_cities-1));
	}
	
	var rnd4 = Math.round(Math.random()*(number_cities-1));
	while ((rnd1 == rnd4) || (rnd3 == rnd4)) {
			rnd4 = Math.round(Math.random()*(number_cities-1));
	}
	
	var rnd5 = Math.round(Math.random()*(number_cities-1));
	while ((rnd1 == rnd5) || (rnd3 == rnd5) || (rnd4 == rnd5)) {
			rnd5 = Math.round(Math.random()*(number_cities-1));
	}
	
	rnd_img1 = Math.ceil(Math.random()*(ciudades[rnd1][3]));
	rnd_img2 = Math.ceil(Math.random()*(newyork[3]));
	rnd_img3 = Math.ceil(Math.random()*(ciudades[rnd3][3]));
	rnd_img4 = Math.ceil(Math.random()*(ciudades[rnd4][3]));
	rnd_img5 = Math.ceil(Math.random()*(ciudades[rnd5][3]));
	
	//Rellenar los divs con las imagenes
	var img_1="<img src=\"/imagenes/img_ppal/" + ciudades[rnd1][0] + "1.jpg\" alt=\"" + ciudades[rnd1][0] + "\" width=\"145\" height=\"350\" />"+"<img src=\"/imagenes/img_ppal/" + ciudades[rnd1][0] + "2.jpg\" alt=\"" + ciudades[rnd1][0] + "\" width=\"145\" height=\"350\" />"+"<img src=\"/imagenes/img_ppal/" + ciudades[rnd1][0] + "3.jpg\" alt=\"" + ciudades[rnd1][0] + "\" width=\"145\" height=\"350\" />"+"<img src=\"/imagenes/img_ppal/" + ciudades[rnd1][0] + "4.jpg\" alt=\"" + ciudades[rnd1][0] + "\" width=\"145\" height=\"350\" />"+"<img src=\"/imagenes/img_ppal/" + ciudades[rnd1][0] + "5.jpg\" alt=\"" + ciudades[rnd1][0] + "\" width=\"145\" height=\"350\" />";
	
	var img_2="<img src=\"/imagenes/img_ppal/" + newyork[0] + "1.jpg\" alt=\"" + newyork[1] + "\"  width=\"290\" height=\"350\" />"+"<img src=\"/imagenes/img_ppal/" + newyork[0] + "2.jpg\" alt=\"" + newyork[1] + "\" width=\"290\" height=\"350\" />"+"<img src=\"/imagenes/img_ppal/" + newyork[0] + "3.jpg\" alt=\"" + newyork[1] + "\"  width=\"290\" height=\"350\" />"+"<img src=\"/imagenes/img_ppal/" + newyork[0] + "4.jpg\" alt=\"" + newyork[1] + "\"  width=\"290\" height=\"350\" />"+"<img src=\"/imagenes/img_ppal/" + newyork[0] + "5.jpg\" alt=\"" + newyork[1] + "\"  width=\"290\" height=\"350\" />"
	
	var img_3="<img src=\"/imagenes/img_ppal/" + ciudades[rnd3][0] + "1.jpg\" alt=\"" + ciudades[rnd3][0] + "\" width=\"145\" height=\"350\" />"+"<img src=\"/imagenes/img_ppal/" + ciudades[rnd3][0] + "2.jpg\" alt=\"" + ciudades[rnd3][0] + "\" width=\"145\" height=\"350\" />"+"<img src=\"/imagenes/img_ppal/" + ciudades[rnd3][0] + "3.jpg\" alt=\"" + ciudades[rnd3][0] + "\" width=\"145\" height=\"350\" />"+"<img src=\"/imagenes/img_ppal/" + ciudades[rnd3][0] + "4.jpg\" alt=\"" + ciudades[rnd3][0] + "\" width=\"145\" height=\"350\" />"+"<img src=\"/imagenes/img_ppal/" + ciudades[rnd3][0] + "5.jpg\" alt=\"" + ciudades[rnd3][0] + "\" width=\"145\" height=\"350\" />";	
	
	var img_4="<img src=\"/imagenes/img_ppal/" + ciudades[rnd4][0] + "1.jpg\" alt=\"" + ciudades[rnd4][0] + "\" width=\"145\" height=\"350\" />"+"<img src=\"/imagenes/img_ppal/" + ciudades[rnd4][0] + "2.jpg\" alt=\"" + ciudades[rnd4][0] + "\" width=\"145\" height=\"350\" />"+"<img src=\"/imagenes/img_ppal/" + ciudades[rnd4][0] + "3.jpg\" alt=\"" + ciudades[rnd4][0] + "\" width=\"145\" height=\"350\" />"+"<img src=\"/imagenes/img_ppal/" + ciudades[rnd4][0] + "4.jpg\" alt=\"" + ciudades[rnd4][0] + "\" width=\"145\" height=\"350\" />"+"<img src=\"/imagenes/img_ppal/" + ciudades[rnd4][0] + "5.jpg\" alt=\"" + ciudades[rnd4][0] + "\" width=\"145\" height=\"350\" />";		
	
	var img_5="<img src=\"/imagenes/img_ppal/" + ciudades[rnd5][0] + "1.jpg\" alt=\"" + ciudades[rnd5][0] + "\" width=\"145\" height=\"350\" />"+"<img src=\"/imagenes/img_ppal/" + ciudades[rnd5][0] + "2.jpg\" alt=\"" + ciudades[rnd5][0] + "\" width=\"145\" height=\"350\" />"+"<img src=\"/imagenes/img_ppal/" + ciudades[rnd5][0] + "3.jpg\" alt=\"" + ciudades[rnd5][0] + "\" width=\"145\" height=\"350\" />"+"<img src=\"/imagenes/img_ppal/" + ciudades[rnd5][0] + "4.jpg\" alt=\"" + ciudades[rnd5][0] + "\" width=\"145\" height=\"350\" />"+"<img src=\"/imagenes/img_ppal/" + ciudades[rnd5][0] + "5.jpg\" alt=\"" + ciudades[rnd5][0] + "\" width=\"145\" height=\"350\" />";		

	var txt_1="<a href=\"/" + ciudades[rnd1][2] + "\"><strong>" + ciudades[rnd1][1] + "</strong></a>";

  var txt_3="<a href=\"/" + ciudades[rnd3][2] + "\"><strong>" + ciudades[rnd3][1] + "</strong></a>";
	var txt_4="<a href=\"/" + ciudades[rnd4][2] + "\"><strong>" + ciudades[rnd4][1] + "</strong></a>";
	var txt_5="<a href=\"/" + ciudades[rnd5][2] + "\"><strong>" + ciudades[rnd5][1] + "</strong></a>";
	
 

$(document).ready(function() {	
	$('.city1').html(img_1);
	$('.city2').html(img_2);
	$('.city3').html(img_3);
	$('.city4').html(img_4);
	$('.city5').html(img_5);
	
	$('#c1').html(txt_1);
	$('#c3').html(txt_3);
	$('#c4').html(txt_4);
	$('#c5').html(txt_5);	
	
	$('.city1').cycle('fade');
	$('.city2').cycle('fade');
	$('.city3').cycle('fade');
	$('.city4').cycle('fade');
	$('.city5').cycle('fade');

});