var wsj_mexico_locations={todays_option:0,todays_location:[20.75095,-105.32259],todays_category:"nayarit",update_today:function(b,a){this.todays_category=(b)?(this.locations[b])?b:this.todays_category:this.todays_category;if(this.locations[this.todays_category][a].coord.length==0){this.update_today(this.todays_category,0)}this.todays_location=(a)?(this.locations[this.todays_category][a])?this.locations[this.todays_category][a].coord:this.todays_location:this.todays_location;this.current_location=(a)?(this.locations[this.todays_category][a].coord.length==0)?this.current_location:a:this.current_location},current_location:0,location_index:[],options:{zoom:14,mapTypeId:google.maps.MapTypeId.HYBRID},embed_html:{first:"<p class = 'map_label' style ='margin:0px;font-family:Arial, sans-serif; font-size:10px;'>",last:"</p>",image:["<img style ='float:right; padding-left:4px;' class = 'image' src = '","'>"],name:["<span class = 'title' style ='font-size:12px; font-weight:bold'>","</span><br/>"],category:["<span class = 'cat' style ='font-size:9px'>","<br/></span>"],web_site:["<a style ='font-size:10px;' class = 'map_a' href = '","' target = '_blank'>Web Site</a><br/>"],address:["<span class = 'address' style ='font-size:10px'>","<br/></span>"],city:["<span class = 'city' style ='font-size:10px;'>","<br/></span>"],state:["<span class = 'state' style ='font-size:10px'>","<br/></span>"],zip:["<span class = 'zip' style ='font-size:10px'>","<br/></span>"]},line_order:["image","name","category","web_site","address","city","state","zip"],locations:{riviera_maya:[{name:"Aventura Spa Palace",category:"Spa",coord:[20.98175,-86.828344],web_site:"http://www.palaceresorts.com/RESORTS/AventuraSpaPalace/Index.asp",address:"KM. 72 Carretera Cancun - Tulum",city:"Puerto Aventuras",state:"Quintana. Roo",zip:"77710"},{name:"Tulum",image:"http://online.wsj.com/adimg/memoirs-map-tulum.jpg",category:"Archeology Sites",coord:[20.214722,-87.428889],address:"Riviera Maya Mainland",city:"Cancun",state:"Quintana Roo",zip:"77500"},{name:"Hacienda Tres Rios",image:"http://online.wsj.com/adimg/memoirs-map-haciendatresrios.jpg",category:"Hotel",coord:[20.691722,-87.03],web_site:"http://www.haciendatresrios.com/",address:"KM. 54 Carretera Cancun - Tulum",city:"Riviera Maya",state:"Quintana Roo",zip:"77760"},{name:"Xplor",image:"http://online.wsj.com/adimg/memoirs-map-xplor.jpg",category:"Park",coord:[20.582814,-87.118156],web_site:"http://www.xplor.travel/",address:"KM. 282 Federal Highway 307",phone:"01 800 00 xplor"}],cozumel:[{name:"La Choza",category:"Restaurant",coord:[20.5056649,-86.9467241],web_site:"http://www.cozumelmexico.net/La_Choza/",address:"Adolfo Rosado Salas 200",city:"San Miguel ",state:"Cozumel",phone:"(987) 872-09 58"},{name:"Neptuno",category:"Nightclub",coord:[20.505072,-86.957119],web_site:"http://thisiscozumel.com/content/view/25/49/",address:"Rafael Melgar at Calle 11 Sur",city:"San Miguel de Cozumel",state:"Cozumel",phone:"+52 (987) 872 1537"},{name:"Chankanaab Natural Park",image:"http://online.wsj.com/adimg/memoirs-map-chankanaab.jpg",category:"Park",coord:[20.510071,-86.948914],web_site:"http://www.cozumelparks.com",address:"KM. 9 Seaside Road"},{name:"Parka Punta Sur",image:"http://online.wsj.com/adimg/memoirs-map-puntasur.jpg",category:"Park",coord:[20.510071,-86.948914],web_site:"http://www.cozumelparks.com",address:"KM. 9 South Coastal Road",state:"Cozumel",phone:"+52 (987) 872-0914"}],cancun:[{name:"Isla Contoy",category:"Snorkel and Scuba",coord:[21.490242,-86.794864],address:"Zona Hotelera",state:"Quintana Roo",zip:"77500",phone:"+52 (998) 287-3671"},{name:"Fiesta Americana Grand Coral Beach Cancun",image:"http://online.wsj.com/adimg/memoirs-map-fiestaamerican.jpg",category:"Hotel",coord:[21.166172,-86.832622],web_site:"http://www.fiestamericanagrand.com/",address:"KM. 9.5 Blvd. Kukulcan",city:"Zona Hotelera, Cancun",state:"Quintana Roo",phone:"+52 (998) 881-3200"},{name:"Luxury Avenue",image:"http://online.wsj.com/adimg/memoirs-map-luxuryave.jpg",category:"Shopping",coord:[21.101144,-86.765806],web_site:"http://www.luxuryavenue.com",address:"KM. 13 Blvd. Kukulcan",city:"Zona Hotelera, Cancun",state:"Quintana Roo",phone:"+1 (877) 477-5348"},{name:"Cafe Salsa",category:"Restaurant",coord:[],address:"KM 14.5 Blvd. Kukulcan",city:"Zona Hotelera",state:"",phone:"mexico or us? +52 (998) 848-9600 ext 6649 &#38; 6849"},{name:"John Gray's Downtown in Cancun",image:"http://online.wsj.com/adimg/memoirs-map-johngray.jpg",category:"Restaurant",coord:[21.160333,-86.837142],address:"Avenida Xpuhil SM 19",city:"Centro Cancun",state:"Quinana Roo",phone:"+52 (998) 883-9800"}],nayarit:[{name:"Pie in the Sky Caf&#233; and Bakery",category:"",web_site:"http://www.bestofbucerias.com/product_pie_in_the_sky_115",address:"Heroe de Nacozari #202",city:"Bucerias",coord:[20.75095,-105.32259]},{name:"RIU Palace Pacifico",category:"",web_site:"http://www.riu.com/en-us/Paises/mexico/nuevo-vallarta-riviera-nayarit/hotel-riu-palace-pacifico/index.jsp",address:"Address: Av. de los Cocoteros, Lote Hotelero G",city:"Riviera Nayarit Nuevo Vallarta",state:"Nayarit",coord:[20.73452,-105.31271]},{name:"Four Seasons Resort Punta Mita",category:"",web_site:"",address:"Punta Mita",city:"Bah&#237;a de Banderas",state:"Nayarit",zip:"63734",coord:[20.7781,-105.50669]},{name:"Marina Riviera Nayarit at La Cruz",address:"Marlin No. 39",city:"La Cruz de Huanacaxtle",state:"Riviera Nayarit",coord:[20.752903,-105.379143],}]},create_location_index:function(){for(var b in this.locations){for(var a=0;a<this.locations[b].length;a++){this.location_index.push([b,a,this.locations[b][a]])}}},get_current:function(a){return(!a)?this.location_index[this.current_location]:[a,this.current_location,this.locations[a][this.current_location]]},get_next:function(c){this.current_location=parseInt(this.current_location);var b=(c)?this.locations[this.todays_category]:this.location_index;this.current_location=(this.current_location+1>=b.length)?0:this.current_location+1;var a=(c)?[c,this.current_location,b[this.current_location]]:this.location_index[this.current_location];return(a[2].coord.length<2)?this.get_next():a[2]},get_next_latLng:function(a){return this.get_latLng(this.get_next(a).coord)},get_today:function(){return this.locations[this.todays_location][this.todays_option]},get_todays_coord:function(){if(this.todays_location.length){return this.todays_location}return this.get_today().coord},get_latLng:function(a){if(!a||a.length<1){return false}return new google.maps.LatLng(a[0],a[1])},get_todays_latLng:function(){if(this.todays_location.length){return this.get_latLng(this.todays_location)}return this.get_latLng(this.get_todays_coord())},get_marker_options:function(b,c){var a={};a=this.set_if(this.locations[b][c],a,"icon");a.position=(!this.locations[b][c].coord)?false:this.get_latLng(this.locations[b][c].coord);a.title=this.locations[b][c].name;return a},get_info_window_options:function(b,d){var c=this.embed_html.first;for(var a=0;a<this.line_order.length;a++){c+=this.get_w_html(this.embed_html[this.line_order[a]],this.locations[b][d][this.line_order[a]])}return{content:c+this.embed_html.last}},get_w_html:function(b,c,a){return(!c)?"":(b.length)?b[0]+c+b[1]:b+c+a},set_if:function(c,b,a){if(c[a]){b[a]=c[a]}return b},db:function(a){try{console.log(a)}catch(b){}}};
