var buscador_reservas = true;
var pulsado = false;
var opciones_menu_medio = 4;
var idioma_site = "2";
function misplanes(url,foto,titulo,tipo){
var total_planes = $.cookie("totalplanesmurcia");
var nombre_cookie = "";
var url_cookie = "";
var existe = 0;
if (!total_planes){
total_planes = 0;
}else{
for (i = 1; i <= total_planes; i++) {
nombre_cookie = "planesurl_"+i;
url_cookie = $.cookie(nombre_cookie);
if (url_cookie == "https://www.turismoregiondemurcia.es"+url){
existe = 1;
}
}
}
if (existe == 0){
total_planes++;
nombre_cookie = "planesurl_"+total_planes;
url_cookie = "https://www.turismoregiondemurcia.es"+url;
$.cookie(nombre_cookie, url_cookie, { expires: 7 });
nombre_cookie = "planesfoto_"+total_planes;
url_cookie = "https://www.turismoregiondemurcia.es"+foto;
$.cookie(nombre_cookie, url_cookie, { expires: 7 });
nombre_cookie = "planestitulo_"+total_planes;
$.cookie(nombre_cookie, titulo, { expires: 7 });
nombre_cookie = "planestipo_"+total_planes;
$.cookie(nombre_cookie, tipo, { expires: 7 });
$.cookie("totalplanesmurcia", total_planes, { expires: 7 });
alert("Añadido a mis planes correctamente");
}else{
alert("Este plan ya había sido añadido a tus planes");
}
/* if (!http_peticion)
$("#"+obj).val(adultos);
$("#act_texto").val();
if (total_planes) {
}else{
total_planes := 0;
alert("No hay planes");
} */
}
function verplanes(){
var total_planes = $.cookie("totalplanesmurcia");
var nombre_cookie = "";
var url = "";
var foto = "";
var titulo = "";
var tipo = "";
var contador = 0;
var planes_totales = 0;
if (!total_planes){
alert("No tienes planes almacenados");
}else{
for (i = 1; i <= total_planes; i++) {
nombre_cookie = "planesurl_"+i;
url = $.cookie(nombre_cookie);
nombre_cookie = "planesfoto_"+i;
foto = $.cookie(nombre_cookie);
nombre_cookie = "planestitulo_"+i;
titulo = $.cookie(nombre_cookie);
nombre_cookie = "planestipo_"+i;
tipo = $.cookie(nombre_cookie);
if (url != ""){
planes_totales++;
if (contador < 2){
document.write('
');
contador++;
}else{
document.write('
');
if (contador == 0){
document.write('
');
}
}
}
if (planes_totales == 1){
document.getElementById("totresplan").innerHTML = "HAY "+planes_totales+" PLAN GUARDADO";
}else{
document.getElementById("totresplan").innerHTML = "HAY "+planes_totales+" PLANES GUARDADOS";
}
}
}
function eliminarplan(codigo){
var nombre_cookie = "";
nombre_cookie = "planesurl_"+codigo;
$.cookie(nombre_cookie,"", { expires: 7 });
nombre_cookie = "planesfoto_"+codigo;
$.cookie(nombre_cookie,"", { expires: 7 });
nombre_cookie = "planestitulo_"+codigo;
$.cookie(nombre_cookie,"", { expires: 7 });
nombre_cookie = "planestipo_"+codigo;
$.cookie(nombre_cookie,"", { expires: 7 });
location.reload();
}
function mail(texto){
var mailres = true;
var cadena = "abcdefghijklmnñopqrstuvwxyzABCDEFGHIJKLMNÑOPQRSTUVWXYZ1234567890@._-";
var arroba = texto.indexOf("@",0);
if ((texto.lastIndexOf("@")) != arroba) arroba = -1;
var punto = texto.lastIndexOf(".");
for (var contador = 0 ; contador < texto.length ; contador++){
if (cadena.indexOf(texto.substr(contador, 1),0) == -1){
mailres = false;
break;
}
}
if ((arroba > 1) && (arroba + 1 < punto) && (punto + 1 < (texto.length)) && (mailres == true) && (texto.indexOf("..",0) == -1))
mailres = true;
else
mailres = false;
return mailres;
}
function ver_calendario(mes,anyo,parametros){
var url = "./mu_calendario_02?mes="+mes+"&anu="+anyo+parametros+"&id_empresa=1";
hazPeticion(url,"calendar"," ");
}
function buscar_movil(){
var texto = document.getElementById("consulta").value;
texto = texto.replace("Buscar en turismoregiondemurcia.es","");
if (texto != ""){
location.href = "/en/search?buscador="+texto;
}
}
function speak(textToSpeak) {
var newUtterance = new SpeechSynthesisUtterance();
newUtterance.text = textToSpeak;
newUtterance.lang = 'es-ES';
window.speechSynthesis.speak(newUtterance);
}
function buscar_recursos(){
var url = "?buscar=si";
if (document.getElementById("texto_libre").value != ""){
url = url + "&texto_libre="+document.getElementById("texto_libre").value;
}
if (document.getElementById("localidad").value != ""){
url = url + "&localidad="+document.getElementById("localidad").value;
}
if (document.getElementById("tipo_recurso")){
url = url + document.getElementById("tipo_recurso").value;
}
if (document.getElementById("tipo_agencia")){
url = url + document.getElementById("tipo_agencia").value;
}
if (document.getElementById("camino")){
url = url + "&camino="+document.getElementById("camino").value;
}
if (document.getElementById("marca_blanca")){
url = url + "&marca_blanca="+document.getElementById("marca_blanca").value;
}
if (document.getElementById("tipo_actividad")){
url = url + document.getElementById("tipo_actividad").value;
}
if (document.getElementById("adheridos")){
if (document.getElementById("adheridos").checked){
url = url + "&adheridos=S";
}
}
if (document.getElementById("mar_menor")){
url = url + "&mar_menor="+document.getElementById("mar_menor").value;
}
if (document.getElementById("localidades")){
if (document.getElementById("localidades").value != ""){
url = url + "&localidades="+document.getElementById("localidades").value;
}
}
if (document.getElementById("ag_desde")){ // Solo para la agenda
var ag_desde = document.getElementById("ag_desde").value;
ag_desde = ag_desde.replace("FROM","");
var ag_hasta = document.getElementById("ag_hasta").value;
ag_hasta = ag_hasta.replace("TO","");
url = url + "&fecha_desde="+ag_desde+"&fecha_hasta="+ag_hasta;
if (ag_desde != "" && (ag_hasta == ag_desde || ag_hasta == "")){ url = url + "&busqueda=dia"; }
else if (ag_desde != "" && ag_hasta != "" && ag_desde != ag_hasta){ url = url + "&busqueda=rango"; }
else if (ag_desde == "" && ag_hasta == ""){ url = url + "&busqueda=todo"; }
}
location.href = url;
}
var tipo_busquedas_reservas = 1;
function pestanas(obj){
$( "#pest_1" ).toggleClass( "seleccionado", "fast" );
$( "#pest_2" ).toggleClass( "seleccionado", "fast" );
tipo_busquedas_reservas = obj;
}
function filtra_tipo_recurso(desde,hasta,localidad,tipo_alojamiento,categoria_alojamiento,localidades,precios){
var tipos_recursos = "";
if(esIE > -1){
var c = document.all;
for(i = 0; i < c.length; i++){
if (c(i).type == "checkbox" && String(c(i).id).indexOf("tipo_recurso") !== -1){
if (c(i).checked){
tipos_recursos = tipos_recursos + c(i).value + '@';
}
}
}
}else{
var c = document.getElementsByTagName("body")[0].getElementsByTagName("*");
for(i = 0; i < c.length; i++){
if (c[i].type == "checkbox" && String(c[i].id).indexOf("tipo_recurso") !== -1){
if (c[i].checked){
tipos_recursos = tipos_recursos + c[i].value + '@';
}
}
}
}
var url = document.getElementById("formlistadoreservas").action+"?tipo_busqueda=1&fecha_desde="+desde+"&fecha_hasta="+hasta+"&localidad="+localidad+"&precios="+precios+
"&tipo_alojamiento="+tipo_alojamiento+"&categoria_alojamiento="+categoria_alojamiento+"&tipo_recurso="+tipos_recursos+"&localidades="+localidades+"&grupo="+document.getElementById("grupo").value+"&pagina=resultados";
location.href = url;
}
function filtra_localidad_recurso(desde,hasta,localidad,tipo_alojamiento,categoria_alojamiento,tipos_recursos,precios){
var localidades_recursos = "";
if(esIE > -1){
var c = document.all;
for(i = 0; i < c.length; i++){
if (c(i).type == "checkbox" && String(c(i).id).indexOf("localidades_recurso") !== -1){
if (c(i).checked){
localidades_recursos = localidades_recursos + c(i).value + '@';
}
}
}
}else{
var c = document.getElementsByTagName("body")[0].getElementsByTagName("*");
for(i = 0; i < c.length; i++){
if (c[i].type == "checkbox" && String(c[i].id).indexOf("localidades_recurso") !== -1){
if (c[i].checked){
localidades_recursos = localidades_recursos + c[i].value + '@';
}
}
}
}
var url = document.getElementById("formlistadoreservas").action+"?tipo_busqueda=1&fecha_desde="+desde+"&fecha_hasta="+hasta+"&localidad="+localidad+"&precios="+precios+
"&tipo_alojamiento="+tipo_alojamiento+"&categoria_alojamiento="+categoria_alojamiento+"&tipo_recurso="+tipos_recursos+"&localidades="+localidades_recursos+"&pagina=resultados";
location.href = url;
}
function filtra_precio_recurso(desde,hasta,localidad,tipo_alojamiento,categoria_alojamiento,localidades,tipos_recursos){
var precios_recursos = "";
if(esIE > -1){
var c = document.all;
for(i = 0; i < c.length; i++){
if (c(i).type == "checkbox" && String(c(i).id).indexOf("precios_recurso") !== -1){
if (c(i).checked){
precios_recursos = precios_recursos + c(i).value + '@';
}
}
}
}else{
var c = document.getElementsByTagName("body")[0].getElementsByTagName("*");
for(i = 0; i < c.length; i++){
if (c[i].type == "checkbox" && String(c[i].id).indexOf("precios_recurso") !== -1){
if (c[i].checked){
precios_recursos = precios_recursos + c[i].value + '@';
}
}
}
}
var url = document.getElementById("formlistadoreservas").action+"?tipo_busqueda=1&fecha_desde="+desde+"&fecha_hasta="+hasta+"&localidad="+localidad+"&precios="+precios_recursos+
"&tipo_alojamiento="+tipo_alojamiento+"&categoria_alojamiento="+categoria_alojamiento+"&tipo_recurso="+tipos_recursos+"&localidades="+localidades+"&grupo="+document.getElementById("grupo").value+"&pagina=resultados";
location.href = url;
}
function refrescar_reservas(){
var desde = document.getElementById("reservas_desde").value;
var hasta = document.getElementById("reservas_hasta").value;
desde = desde.replace("FROM","");
hasta = hasta.replace("TO","");
var error = "";
var diahoy = document.getElementById("reservas_dia").value;
var meshoy = document.getElementById("reservas_mes").value;
var anohoy = document.getElementById("reservas_anu").value;
var diad = 0;
var mesd = 0;
var anod = 0;
var diah = 0;
var mesh = 0;
var anoh = 0;
diad = desde.substring(0,2);
mesd = desde.substring(3,5);
anod = desde.substring(6,10);
diah = hasta.substring(0,2);
mesh = hasta.substring(3,5);
anoh = hasta.substring(6,10);
if ((anod < anohoy) || ((anod == anohoy) && (mesd < meshoy)) || ((anod == anohoy) && (mesd == meshoy) && (diad < diahoy)))
error = "The date in FROM cannot be previous to the current date or it has been entered incorrectly; please use DD/MM/YYYY format";
if ((anod > anoh) || ((anod == anoh) && (mesd > mesh)) || ((anod == anoh) && (mesd == mesh) && (diad >= diah)))
error = "The date in TO cannot be previous to the date in FROM or it has been entered incorrectly; please use DD/MM/YYYY format";
if (hasta == "") error = "Please indicate date in TO";
if (desde == "") error = "Please indicate date in FROM";
if (error != "")
mensaje(error);
else{
location.href = document.getElementById("formreservas").action + "?fecha_desde="+desde+"&fecha_hasta="+hasta+"&hotel="+document.getElementById("hotel").value+"&empresa="+document.getElementById("empresa").value+
"&grupo="+document.getElementById("grupo").value+"&codigo_promocional="+document.getElementById("codigo_promocional").value+"&servicio="+document.getElementById("servicio").value+"&pagina="+document.getElementById("pagina").value;
}
}
function buscar_reservas(){
var pagina ="resultados";
var desde = document.getElementById("reservas_desde").value;
var hasta = document.getElementById("reservas_hasta").value;
desde = desde.replace("FROM","");
hasta = hasta.replace("TO","");
var error = "";
var diahoy = document.getElementById("reservas_dia").value;
var meshoy = document.getElementById("reservas_mes").value;
var anohoy = document.getElementById("reservas_anu").value;
var diad = 0;
var mesd = 0;
var anod = 0;
var diah = 0;
var mesh = 0;
var anoh = 0;
diad = desde.substring(0,2);
mesd = desde.substring(3,5);
anod = desde.substring(6,10);
diah = hasta.substring(0,2);
mesh = hasta.substring(3,5);
anoh = hasta.substring(6,10);
if ((anod < anohoy) || ((anod == anohoy) && (mesd < meshoy)) || ((anod == anohoy) && (mesd == meshoy) && (diad < diahoy)))
error = "The date in FROM cannot be previous to the current date or it has been entered incorrectly; please use DD/MM/YYYY format";
if ((anod > anoh) || ((anod == anoh) && (mesd > mesh)) || ((anod == anoh) && (mesd == mesh) && (diad >= diah)))
error = "The date in TO cannot be previous to the date in FROM or it has been entered incorrectly; please use DD/MM/YYYY format";
if (hasta == "") error = "Please indicate date in TO";
if (desde == "") error = "Please indicate date in FROM";
if (error != "")
mensaje(error);
else{
var url = document.getElementById("formlistadoreservas").action+"?pagina="+pagina+"&tipo_busqueda="+tipo_busquedas_reservas+"&fecha_desde="+desde+"&fecha_hasta="+hasta;
if (document.getElementById("all_hotel").value != ""){
url = url + "&hotel="+document.getElementById("all_hotel").value;
pagina = "inicio-reserva";
}else{
if (document.getElementById("reservas_localidad")){
if (document.getElementById("reservas_localidad").value != ""){
url = url + "&localidad="+document.getElementById("reservas_localidad").value;
}
}
if (document.getElementById("grupo")){
if (document.getElementById("grupo").value != ""){
url = url + "&grupo="+document.getElementById("grupo").value;
}
}
if (document.getElementById("all_localidad").value != "" && document.getElementById("reservas_localidad").value == ""){
url = url + "&localidad="+document.getElementById("all_localidad").value;
}
if (document.getElementById("all_tipo").value != ""){
url = url + "&tipo_alojamiento="+document.getElementById("all_tipo").value;
}
if (document.getElementById("all_categoria").value != ""){
url = url + "&categoria_alojamiento="+document.getElementById("all_categoria").value;
}
if (document.getElementById("localidades_camino")){
if (document.getElementById("localidades_camino").value != ""){
url = url + "&localidades="+document.getElementById("localidades_camino").value;
}
}
if (document.getElementById("camino")){
if (document.getElementById("camino").value != ""){
url = url + "&camino="+document.getElementById("camino").value;
}
}
}
cargando();
location.href = url;
}
}
function buscar_actividades(){
var pagina ="resultados";
var desde = document.getElementById("acti_desde").value;
var hasta = document.getElementById("acti_desde").value;
desde = desde.replace("FROM","");
hasta = hasta.replace("TO","");
var error = "";
var diahoy = document.getElementById("reservas_dia").value;
var meshoy = document.getElementById("reservas_mes").value;
var anohoy = document.getElementById("reservas_anu").value;
var diad = 0;
var mesd = 0;
var anod = 0;
var diah = 0;
var mesh = 0;
var anoh = 0;
diad = desde.substring(0,2);
mesd = desde.substring(3,5);
anod = desde.substring(6,10);
diah = hasta.substring(0,2);
mesh = hasta.substring(3,5);
anoh = hasta.substring(6,10);
if ((anod < anohoy) || ((anod == anohoy) && (mesd < meshoy)) || ((anod == anohoy) && (mesd == meshoy) && (diad < diahoy)))
error = "La FECHA no puede ser menor que la fecha actual o ha sido introducida incorrectamente, use el formato 'DD/MM/AAAA'";
if (desde == "") error = "Debe indicar la FECHA";
if (error != "")
mensaje(error);
else{
var url = document.getElementById("formlistadoacti").action+"?buscar=si&fecha_desde="+desde+"&fecha_hasta="+hasta;
if (document.getElementById("acti_localidad").value != ""){
url = url + "&localidad="+document.getElementById("acti_localidad").value;
}
if (document.getElementById("acti_categoria").value != ""){
url = url + "&categoria="+document.getElementById("acti_categoria").value;
}
if (document.getElementById("acti_texto").value != ""){
url = url + "&texto_libre="+document.getElementById("acti_texto").value;
}
cargando();
location.href = url;
}
}
function consultar_reserva(){
if (document.getElementById("reservas_numReserva").value != ""){
location.href = document.getElementById("formlistadoreservas").action + "?pagina=resguardo&locid="+document.getElementById("reservas_numReserva").value;
}else{
mensaje("Debe introducir el número de la reserva");
}
}
function ordena_reservas(){
location.href = document.getElementById("formlistadoreservas").action + "?localidad="+document.getElementById("localidad").value+"&texto_libre="+document.getElementById("texto_libre").value+
"&fecha_desde="+document.getElementById("fecha_desde").value+"&fecha_hasta="+document.getElementById("fecha_hasta").value+"&grupo="+document.getElementById("grupo").value+
"&tipo_alojamiento="+document.getElementById("tipo_alojamiento").value+"&categoria_alojamiento="+document.getElementById("categoria_alojamiento").value+
"&tipo_recurso="+document.getElementById("tipo_recurso").value+"&localidades="+document.getElementById("localidades").value+"&precios="+document.getElementById("precios").value+
"&orden="+document.getElementById("orden").value+"&tipo_busqueda="+document.getElementById("tipo_busqueda").value+"&pagina=resultados";
}
function reservar(){
var habitaciones = "";
var total_habitaciones = 0;
if(esIE > -1){
var c = document.all;
for(i = 0; i < c.length; i++){
if (c(i).tagName == "SELECT" && String(c(i).id) != "" && String(c(i).value) != "0" && String(c(i).id).indexOf("id_habitacion") !== -1){
habitaciones = habitaciones + String(c(i).id) + "-valor:" + String(c(i).value) + "*";
total_habitaciones++;
}
}
}else{
var c = document.getElementsByTagName("body")[0].getElementsByTagName("*");
for(i = 0; i < c.length; i++){
if (c[i].tagName == "SELECT" && String(c[i].id) != "" && String(c[i].value) != "0" && String(c[i].id).indexOf("id_habitacion") !== -1){
habitaciones = habitaciones + String(c[i].id) + "-valor:" + String(c[i].value) + "*";
total_habitaciones++;
}
}
}
if (total_habitaciones == 0){
mensaje("Please select number of rooms you wish to book");
}else{ // https
var url = "/en/reservas_online?pagina=pre-datos-reserva&empresa="+document.getElementById("empresa").value+"&fecha_desde="+document.getElementById("x_reservas_desde").value+
"&fecha_hasta="+document.getElementById("x_reservas_hasta").value+"&hotel="+document.getElementById("hotel").value+"&habitaciones=" + habitaciones+
"&ip="+document.getElementById("ip").value;
if (document.getElementById("referencia").value != "") url = url+"&referencia="+document.getElementById("referencia").value;
if (document.getElementById("paquete").value != "") url = url+"&paquete="+document.getElementById("paquete").value;
if (document.getElementById("grupo").value != "") url = url+"&grupo="+document.getElementById("grupo").value;
location.href = url;
}
}
function finalizar_reserva(){
if (document.getElementById("nombre").value == ""){
mensaje("Please enter your name");
document.getElementById("nombre").focus();
}else if (document.getElementById("apellidos").value == ""){
mensaje("Please enter your surname");
document.getElementById("apellidos").focus();
}else if (document.getElementById("email").value == ""){
mensaje("Please enter your email address");
document.getElementById("email").focus();
}else if (!validarEmail(document.getElementById("email").value)){
mensaje("Debe introducir una dirección de email valida.");
}else if (document.getElementById("email2").value == ""){
mensaje("Please confirm your email address");
document.getElementById("email2").focus();
}else if (document.getElementById("email").value != document.getElementById("email2").value){
mensaje("Email addresses do not match");
document.getElementById("email2").value = "";
document.getElementById("email2").focus();
}else if (document.getElementById("direccion").value == ""){
mensaje("Please enter your address");
document.getElementById("direccion").focus();
}else if (document.getElementById("poblacion").value == ""){
mensaje("Debe introducir su población de residencia");
document.getElementById("poblacion").focus();
}else if (document.getElementById("telefono").value == ""){
mensaje("Please enter your phone number");
document.getElementById("telefono").focus();
}else if (!document.getElementById("condiciones").checked){
mensaje("You must accept the booking conditions");
document.getElementById("condiciones").focus();
}else{
if (!pulsado){
pulsado = true;
cargando();
document.formreservas.submit();
}
}
}
function cancelar_reserva(){
window.location = "/en/reservas_online?pagina=resguardo&locid="+document.getElementById("locid").value+"&pinid="+document.getElementById("pinid").value+"&accid=cancel&modificar=no";
}
function guardar_cambios_reserva(){
if (document.getElementById("nombre").value == ""){
mensaje("The field 'name' has to be completed");
document.getElementById("nombre").focus();
}else if (document.getElementById("apellidos").value == ""){
mensaje("The field 'surname' has to be completed");
document.getElementById("apellidos").focus();
}else if (document.getElementById("direccion").value == ""){
mensaje("The field 'address' has to be completed");
document.getElementById("direccion").focus();
}else if (document.getElementById("poblacion").value == ""){
mensaje("The field 'Locality' has to be completed");
document.getElementById("poblacion").focus();
}else if (document.getElementById("telefono").value == ""){
mensaje("The field 'phone' has to be completed");
document.getElementById("telefono").focus();
}else{
document.formulario.submit();
}
}
$(function() {
$( "#acti_desde" ).datepicker({
firstDay: 1,
dateFormat: "dd/mm/yy",
changeMonth: true,
changeYear: true,
minDate: 0,
dayNamesMin: ["Su", "Mo", "Tue", "Wed", "Thu", "Fri", "Sat"],
monthNamesShort: ["Jan","Feb","March","Apr","May","Ju","Jul","Aug","Sep","Oct","Nov","Dec"],
onSelect: function( selectedDate ) {
}
});
$( "#reservas_desde" ).datepicker({
firstDay: 1,
dateFormat: "dd/mm/yy",
changeMonth: true,
changeYear: true,
minDate: 0,
dayNamesMin: ["Su", "Mo", "Tue", "Wed", "Thu", "Fri", "Sat"],
monthNamesShort: ["Jan","Feb","March","Apr","May","Ju","Jul","Aug","Sep","Oct","Nov","Dec"],
onSelect: function( selectedDate ) {
$( "#reservas_hasta" ).datepicker( "option", "minDate", selectedDate );
document.getElementById("reservas_hasta").value = addToDate(selectedDate,1);
}
});
$( "#reservas_hasta" ).datepicker({
firstDay: 1,
dateFormat: "dd/mm/yy",
changeMonth: true,
changeYear: true,
minDate: 0,
dayNamesMin: ["Su", "Mo", "Tue", "Wed", "Thu", "Fri", "Sat"],
monthNamesShort: ["Jan","Feb","March","Apr","May","Ju","Jul","Aug","Sep","Oct","Nov","Dec"],
onSelect: function( selectedDate ) {
$( "#reservas_desde" ).datepicker( "option", "maxDate", selectedDate );
}
});
$( "#desde_movil" ).datepicker({
firstDay: 1,
dateFormat: "dd/mm/yy",
changeMonth: true,
changeYear: true,
minDate: 0,
dayNamesMin: ["Su", "Mo", "Tue", "Wed", "Thu", "Fri", "Sat"],
monthNamesShort: ["Jan","Feb","March","Apr","May","Ju","Jul","Aug","Sep","Oct","Nov","Dec"],
onSelect: function( selectedDate ) {
$( "#hasta_movil" ).datepicker( "option", "minDate", selectedDate );
document.getElementById("hasta_movil").value = addToDate(selectedDate,1);
}
});
$( "#hasta_movil" ).datepicker({
firstDay: 1,
dateFormat: "dd/mm/yy",
changeMonth: true,
changeYear: true,
minDate: 0,
dayNamesMin: ["Su", "Mo", "Tue", "Wed", "Thu", "Fri", "Sat"],
monthNamesShort: ["Jan","Feb","March","Apr","May","Ju","Jul","Aug","Sep","Oct","Nov","Dec"],
onSelect: function( selectedDate ) {
$( "#desde_movil" ).datepicker( "option", "maxDate", selectedDate );
}
});
});
$("document").ready(function() {
$('#menu_1').click(function(){
$('html, body').animate({scrollTop: $("#salto_1").offset().top-$("#cab-container").height()}, 500);
});
$('#menu_2').click(function(){
$('html, body').animate({scrollTop: $("#salto_2").offset().top-$("#cab-container").height()}, 500);
});
$('#menu_3').click(function(){
$('html, body').animate({scrollTop: $("#salto_3").offset().top-$("#cab-container").height()}, 500);
});
$('#menu_4').click(function(){
$('html, body').animate({scrollTop: $("#salto_4").offset().top-$("#cab-container").height()}, 500);
});
});
function filtra_localidades(parametros){
var localidades_recursos = "";
if(esIE > -1){
var c = document.all;
for(i = 0; i < c.length; i++){
if (c(i).type == "checkbox" && String(c(i).id).indexOf("localidades_recurso") !== -1){
if (c(i).checked){
localidades_recursos = localidades_recursos + c(i).value + '@';
}
}
}
}else{
var c = document.getElementsByTagName("body")[0].getElementsByTagName("*");
for(i = 0; i < c.length; i++){
if (c[i].type == "checkbox" && String(c[i].id).indexOf("localidades_recurso") !== -1){
if (c[i].checked){
localidades_recursos = localidades_recursos + c[i].value + '@';
}
}
}
}
var url = document.getElementById("formrecursos").action+"?buscar=si"+parametros+"&localidades="+localidades_recursos;
location.href = url;
}
function filtra_tipos_recursos(parametros){
var tipos_recursos = "";
if(esIE > -1){
var c = document.all;
for(i = 0; i < c.length; i++){
if (c(i).type == "checkbox" && String(c(i).id).indexOf("tipos_recurso") !== -1){
if (c(i).checked){
tipos_recursos = tipos_recursos + c(i).value + '@';
}
}
}
}else{
var c = document.getElementsByTagName("body")[0].getElementsByTagName("*");
for(i = 0; i < c.length; i++){
if (c[i].type == "checkbox" && String(c[i].id).indexOf("tipos_recurso") !== -1){
if (c[i].checked){
tipos_recursos = tipos_recursos + c[i].value + '@';
}
}
}
}
var url = document.getElementById("formrecursos").action+"?buscar=si"+parametros+"&tipos="+tipos_recursos;
location.href = url;
}
function filtra_tipos_activo(parametros){
var tipos_activo = "";
if(esIE > -1){
var c = document.all;
for(i = 0; i < c.length; i++){
if (c(i).type == "checkbox" && String(c(i).id).indexOf("tipos_recurso") !== -1){
if (c(i).checked){
tipos_activo = tipos_activo + c(i).value + '@';
}
}
}
}else{
var c = document.getElementsByTagName("body")[0].getElementsByTagName("*");
for(i = 0; i < c.length; i++){
if (c[i].type == "checkbox" && String(c[i].id).indexOf("tipos_recurso") !== -1){
if (c[i].checked){
tipos_activo = tipos_activo + c[i].value + '@';
}
}
}
}
var url = document.getElementById("formrecursos").action+"?buscar=si"+parametros+"&tipos_activo="+tipos_activo;
location.href = url;
}
function filtra_otros(parametros){
var url = document.getElementById("formrecursos").action+"?buscar=si"+parametros;
location.href = url;
}
function autocompletar(texto,prefijo,campo){
if (texto.length > 2){
$('#'+prefijo+'_autocompletar').show("slide", { direction: "up" }, 300);
// document.write("https://www.turismoregiondemurcia.es/en/mu_autocompletar?frase="+texto+"&prefijo="+prefijo+"&campo="+campo);
hazPeticion("https://www.turismoregiondemurcia.es/en/mu_autocompletar?frase="+texto+"&prefijo="+prefijo+"&campo="+campo,prefijo+"_autocompletar","CARGANDO SUGERENCIAS ...");
// hazPeticion("https://www.turismoregiondemurcia.es/en/mu_autocompletar?frase="+texto+"&prefijo="+prefijo+"&campo="+campo,prefijo+"_autocompletar","CARGANDO SUGERENCIAS ...");
}else{
$('#'+prefijo+'_autocompletar').hide("slide", { direction: "up" }, 300);
}
}
function buscarGoogle(){
var texto_libre = document.getElementById("texto_google").value;
texto_libre = texto_libre.replace("FREE TEXT","");
window.open("https://www.google.es/#q=site:turismoregiondemurcia.es+"+texto_libre,"_blank");
}
function comprueba_localidad(valor){
if (valor == "03099" || valor == "orihuela"){
window.open("http://www.orihuelaturistica.es/orihuela/web_php/index.php?contenido=apartadosComerciales&idNivel=3964&id=15&mode=list&order=asc","_blank");
}
}
var tipo_buscador = "alojamientos";
function buscador_alojamientos(){
tipo_buscador = "alojamientos";
document.getElementById("iraloja").className = "";
document.getElementById("iractiv").className = "opaco";
document.getElementById("irpaque").className = "opaco";
document.getElementById("al_texto").style.display = "block";
document.getElementById("ac_texto").style.display = "none";
document.getElementById("al_hasta").style.display = "block";
document.getElementById("ac_tipo").style.display = "none";
document.getElementById("pa_adultos").style.display = "none";
document.getElementById("pa_ninos").style.display = "none";
document.getElementById("pa_bebes").style.display = "none";
document.getElementById("capagratis").style.display = "none";
document.getElementById("titalo").style.display = "block";
document.getElementById("titacti").style.display = "none";
document.getElementById("titpaqu").style.display = "none";
}
function buscador_actividades(){
tipo_buscador = "actividades";
document.getElementById("iraloja").className = "opaco";
document.getElementById("iractiv").className = "";
document.getElementById("irpaque").className = "opaco";
document.getElementById("al_texto").style.display = "none";
document.getElementById("ac_texto").style.display = "block";
document.getElementById("al_hasta").style.display = "none";
document.getElementById("ac_tipo").style.display = "block";
document.getElementById("pa_adultos").style.display = "none";
document.getElementById("pa_ninos").style.display = "none";
document.getElementById("pa_bebes").style.display = "none";
document.getElementById("capagratis").style.display = "block";
document.getElementById("titalo").style.display = "none";
document.getElementById("titacti").style.display = "block";
document.getElementById("titpaqu").style.display = "none";
}
function buscador_paquetes(){
tipo_buscador = "paquetes";
document.getElementById("iraloja").className = "opaco";
document.getElementById("iractiv").className = "opaco";
document.getElementById("irpaque").className = "";
document.getElementById("al_texto").style.display = "none";
document.getElementById("ac_texto").style.display = "block";
document.getElementById("al_hasta").style.display = "block";
document.getElementById("ac_tipo").style.display = "none";
//document.getElementById("pa_adultos").style.display = "block";
//document.getElementById("pa_ninos").style.display = "block";
//document.getElementById("pa_bebes").style.display = "block";
document.getElementById("capagratis").style.display = "none";
document.getElementById("titalo").style.display = "none";
document.getElementById("titacti").style.display = "none";
document.getElementById("titpaqu").style.display = "block";
}
function reservar_alojamientos(){
var oImg = document.createElement("script");
oImg.src = 'https://secure.adnxs.com/px?id=639385&t=1';
document.body.appendChild(oImg);
var pagina = "resultados";
var idpagina = document.getElementById("destino_url").value;
if (tipo_buscador == "alojamientos"){
if (document.getElementById("al_desde").value == "" || document.getElementById("al_desde").value == "ARRIVAL"){
mensaje("You must enter date of arrival to accommodation");
}else if (document.getElementById("al_hasta").value == "" || document.getElementById("al_hasta").value == "DEPARTURE"){
mensaje("You must enter date of departure from accommodation");
}else{
var url = "/en/bookings?pagina="+pagina+"&fecha_desde="+document.getElementById("al_desde").value+"&fecha_hasta="+document.getElementById("al_hasta").value;
if (document.getElementById("al_hotel").value != ""){
url = url + "&hotel="+document.getElementById("al_hotel").value;
pagina = "inicio-reserva";
}else{
if (document.getElementById("al_localidades").value != ""){
url = url + "&localidad="+document.getElementById("al_localidades").value;
}
if (document.getElementById("al_localidad").value != "" && document.getElementById("al_localidades").value == ""){
url = url + "&localidad="+document.getElementById("al_localidad").value;
}
if (document.getElementById("al_tipo").value != ""){
url = url + "&tipo_alojamiento="+document.getElementById("al_tipo").value;
}
if (document.getElementById("al_categoria").value != ""){
url = url + "&categoria_alojamiento="+document.getElementById("al_categoria").value;
}
}
cargando();
window.open(url+'&tipo_busqueda=1',idpagina);
}
}else if(tipo_buscador == "actividades"){
if (document.getElementById("al_desde").value == "" || document.getElementById("al_desde").value == "ARRIVAL"){
mensaje("Please insert wished date to enjoy activity");
}else{
var url = "/en/search_activities?buscar=si";
if (document.getElementById("ac_texto").value != "" && document.getElementById("ac_texto").value != "FREE TEXT" && document.getElementById("ac_texto").value != "TEXTO%20LIBRE"){
url = url + "&texto_libre="+document.getElementById("ac_texto").value;
}
if (document.getElementById("al_localidades").value != ""){
url = url + "&localidad="+document.getElementById("al_localidades").value;
}
if (document.getElementById("al_desde").value != "" && document.getElementById("al_desde").value != "ARRIVAL"){
url = url + "&fecha_desde="+document.getElementById("al_desde").value + "&fecha_hasta="+document.getElementById("al_desde").value;
}
if (document.getElementById("ac_tipo").value != ""){
url = url + "&categoria="+document.getElementById("ac_tipo").value;
}
if (document.getElementById("ac_gratis").checked){
url = url + "&gratis="+document.getElementById("ac_gratis").value;
}
cargando();
window.open(url,idpagina);
}
}else if(tipo_buscador == "paquetes"){
if (document.getElementById("al_desde").value == "" || document.getElementById("al_desde").value == "ARRIVAL"){
mensaje("You must enter date of arrival to accommodation");
}else if (document.getElementById("al_hasta").value == "" || document.getElementById("al_hasta").value == "DEPARTURE"){
mensaje("You must enter date of departure from accommodation");
}else{
var url = "/en/buscar_paquetes?fecha_desde="+document.getElementById("al_desde").value+"&fecha_hasta="+document.getElementById("al_hasta").value;
if (document.getElementById("ac_texto").value != "" && document.getElementById("ac_texto").value != "FREE TEXT" && document.getElementById("ac_texto").value != "TEXTO%20LIBRE"){
url = url + "&texto_libre="+document.getElementById("ac_texto").value;
}
if (document.getElementById("al_localidades").value != ""){
url = url + "&localidad="+document.getElementById("al_localidades").value;
}
url = url + "&distribucion=1-"+document.getElementById("pa_adultos").value+"-"+document.getElementById("pa_ninos").value+"-"+document.getElementById("pa_bebes").value+"@";
cargando();
window.open(url,idpagina);
}
}
}
function reservar_actividades(){
var oImg = document.createElement("script");
oImg.src = 'https://secure.adnxs.com/px?id=639385&t=1';
document.body.appendChild(oImg);
var pagina = "resultados";
var idpagina = document.getElementById("destino_url").value;
if (document.getElementById("ac_desde").value == "" || document.getElementById("ac_desde").value == "ARRIVAL"){
mensaje("Please insert wished date to enjoy activity");
}else{
var url = "/en/search_activities?buscar=si";
if (document.getElementById("ac_texto").value != "" && document.getElementById("ac_texto").value != "FREE TEXT" && document.getElementById("ac_texto").value != "TEXTO%20LIBRE"){
url = url + "&texto_libre="+document.getElementById("ac_texto").value;
}
if (document.getElementById("ac_localidades").value != ""){
url = url + "&localidad="+document.getElementById("ac_localidades").value;
}
if (document.getElementById("ac_desde").value != "" && document.getElementById("ac_desde").value != "ARRIVAL"){
url = url + "&fecha_desde="+document.getElementById("ac_desde").value + "&fecha_hasta="+document.getElementById("ac_desde").value;
}
if (document.getElementById("ac_tipo").value != ""){
url = url + "&categoria="+document.getElementById("ac_tipo").value;
}
if (document.getElementById("ac_gratis").checked){
url = url + "&gratis="+document.getElementById("ac_gratis").value;
}
cargando();
window.open(url,idpagina);
}
}
function reservar_paquetes(){
var oImg = document.createElement("script");
oImg.src = 'https://secure.adnxs.com/px?id=639385&t=1';
document.body.appendChild(oImg);
var pagina = "resultados";
var idpagina = document.getElementById("destino_url").value;
if (document.getElementById("pa_desde").value == "" || document.getElementById("pa_desde").value == "ARRIVAL"){
mensaje("You must enter date of arrival to accommodation");
}else if (document.getElementById("pa_hasta").value == "" || document.getElementById("pa_hasta").value == "DEPARTURE"){
mensaje("You must enter date of departure from accommodation");
}else{
var url = "/en/buscar_paquetes?fecha_desde="+document.getElementById("pa_desde").value+"&fecha_hasta="+document.getElementById("pa_hasta").value;
if (document.getElementById("pk_texto").value != "" && document.getElementById("pk_texto").value != "FREE TEXT" && document.getElementById("pk_texto").value != "TEXTO%20LIBRE"){
url = url + "&texto_libre="+document.getElementById("pk_texto").value;
}
if (document.getElementById("pk_localidades").value != ""){
url = url + "&localidad="+document.getElementById("pk_localidades").value;
}
url = url + "&distribucion=1-"+document.getElementById("pa_adultos").value+"-"+document.getElementById("pa_ninos").value+"-"+document.getElementById("pa_bebes").value+"@";
cargando();
window.open(url,idpagina);
}
}
function buscar_reservas_movil(){
var pagina ="resultados";
var desde = document.getElementById("desde_movil").value;
var hasta = document.getElementById("hasta_movil").value;
desde = desde.replace("FROM","");
hasta = hasta.replace("TO","");
var error = "";
var diahoy = document.getElementById("movil_dia").value;
var meshoy = document.getElementById("movil_mes").value;
var anohoy = document.getElementById("movil_anu").value;
var diad = 0;
var mesd = 0;
var anod = 0;
var diah = 0;
var mesh = 0;
var anoh = 0;
diad = desde.substring(0,2);
mesd = desde.substring(3,5);
anod = desde.substring(6,10);
diah = hasta.substring(0,2);
mesh = hasta.substring(3,5);
anoh = hasta.substring(6,10);
if ((anod < anohoy) || ((anod == anohoy) && (mesd < meshoy)) || ((anod == anohoy) && (mesd == meshoy) && (diad < diahoy)))
error = "The date in FROM cannot be previous to the current date or it has been entered incorrectly; please use DD/MM/YYYY format";
if ((anod > anoh) || ((anod == anoh) && (mesd > mesh)) || ((anod == anoh) && (mesd == mesh) && (diad >= diah)))
error = "The date in TO cannot be previous to the date in FROM or it has been entered incorrectly; please use DD/MM/YYYY format";
if (hasta == "") error = "Please indicate date in TO";
if (desde == "") error = "Please indicate date in FROM";
if (error != "")
mensaje(error);
else{
var url = document.getElementById("formmovilreservas").action+"?pagina="+pagina+"&tipo_busqueda=1&fecha_desde="+desde+"&fecha_hasta="+hasta;
if (document.getElementById("localidad_movil").value != ""){
url = url + "&localidad="+document.getElementById("localidad_movil").value;
}
if (document.getElementById("texto_movil").value != ""){
url = url + "&texto_libre="+document.getElementById("texto_movil").value;
}
cargando();
location.href = url;
}
}
function reservar_entradas(){
if (document.getElementById("en_fecha").value == "" || document.getElementById("en_fecha").value == "DATE"){
mensaje("You must enter the date");
}else if (document.getElementById("en_adultos").value == "" && document.getElementById("en_menores").value == ""){
mensaje("Debe seleccionar el número de adultos o el número de menores.");
}else{
var url = "https://www.turismoregiondemurcia.es/es/turismo.auriga.inicio?tipo_busqueda=entradas"+
"&f_desde="+document.getElementById("en_fecha").value+"&f_hasta="+document.getElementById("en_fecha").value+
"&v_adultos="+document.getElementById("en_adultos").value+"&v_menores="+document.getElementById("en_menores").value+
"&logo=S&id_vendedor=MURCIATURISTICA";
if (document.getElementById("en_destino").value != ""){
url = url + "&v_pais=ES&v_provincia=MU&v_localidad="+document.getElementById("en_destino").value;
}
window.open(url,'_blank');
}
}
function reservar_restaurantes(){
mensaje("In this moment it is impossible to make restaurant reservations. We are sorry for the inconveniences.");
}
function reservar_alojamiento(id){
if (document.getElementById("desde_"+id).value == "" || document.getElementById("desde_"+id).value == "ARRIVAL"){
mensaje("You must enter date of arrival to accommodation");
}else if (document.getElementById("hasta_"+id).value == "" || document.getElementById("hasta_"+id).value == "DEPARTURE"){
mensaje("You must enter date of departure from accommodation");
}else{
var url = "/en/inicio?hotel="+id+"&fecha_desde="+document.getElementById("desde_"+id).value+"&fecha_hasta="+document.getElementById("hasta_"+id).value;
window.open(url,'_self');
}
}
$("document").ready(function() {
$('#menu_1').click(function(){
$('html, body').animate({
scrollTop: $("#salto_1").offset().top - 100
}, 1000);
});
$('#menu_2').click(function(){
$('html, body').animate({
scrollTop: $("#salto_3").offset().top - 100
}, 1000);
});
$('#menu_3').click(function(){
$('html, body').animate({
scrollTop: $("#salto_4").offset().top - 100
}, 1000);
});
$('#menu_5').click(function(){
$('html, body').animate({
scrollTop: $("#salto_5").offset().top - 100
}, 1000);
});
$('#menu_4').click(function(){
$('html, body').animate({
scrollTop: $("#salto_6").offset().top - 100
}, 1000);
});
$('#menu_6').click(function(){
$('html, body').animate({
scrollTop: $("#salto_9").offset().top - 100
}, 1000);
});
});
$(function() {
$( "#of_desde" ).datepicker({
firstDay: 1,
dateFormat: "dd/mm/yy",
changeMonth: true,
changeYear: true,
minDate: 0,
dayNamesMin: ["Su", "Mo", "Tue", "Wed", "Thu", "Fri", "Sat"],
monthNamesShort: ["Jan","Feb","March","Apr","May","Ju","Jul","Aug","Sep","Oct","Nov","Dec"],
onSelect: function( selectedDate ) {
$( "#of_hasta" ).datepicker( "option", "minDate", selectedDate );
// document.getElementById("of_hasta").value = addToDate(selectedDate,1);
}
});
$( "#of_hasta" ).datepicker({
firstDay: 1,
dateFormat: "dd/mm/yy",
changeMonth: true,
changeYear: true,
minDate: 0,
dayNamesMin: ["Su", "Mo", "Tue", "Wed", "Thu", "Fri", "Sat"],
monthNamesShort: ["Jan","Feb","March","Apr","May","Ju","Jul","Aug","Sep","Oct","Nov","Dec"],
onSelect: function( selectedDate ) {
$( "#of_desde" ).datepicker( "option", "maxDate", selectedDate );
}
});
$( "#ev_desde" ).datepicker({
firstDay: 1,
dateFormat: "dd/mm/yy",
changeMonth: true,
changeYear: true,
minDate: 0,
dayNamesMin: ["Su", "Mo", "Tue", "Wed", "Thu", "Fri", "Sat"],
monthNamesShort: ["Jan","Feb","March","Apr","May","Ju","Jul","Aug","Sep","Oct","Nov","Dec"],
onSelect: function( selectedDate ) {
$( "#ev_hasta" ).datepicker( "option", "minDate", selectedDate );
// document.getElementById("ev_hasta").value = addToDate(selectedDate,1);
}
});
$( "#ev_hasta" ).datepicker({
firstDay: 1,
dateFormat: "dd/mm/yy",
changeMonth: true,
changeYear: true,
minDate: 0,
dayNamesMin: ["Su", "Mo", "Tue", "Wed", "Thu", "Fri", "Sat"],
monthNamesShort: ["Jan","Feb","March","Apr","May","Ju","Jul","Aug","Sep","Oct","Nov","Dec"],
onSelect: function( selectedDate ) {
$( "#ev_desde" ).datepicker( "option", "maxDate", selectedDate );
}
});
});
$(function() {
$( "#al_desde" ).datepicker({
firstDay: 1,
dateFormat: "dd/mm/yy",
changeMonth: true,
changeYear: true,
minDate: 0,
dayNamesMin: ["Su", "Mo", "Tue", "Wed", "Thu", "Fri", "Sat"],
monthNamesShort: ["Jan","Feb","March","Apr","May","Ju","Jul","Aug","Sep","Oct","Nov","Dec"],
onSelect: function( selectedDate ) {
$( "#al_hasta" ).datepicker( "option", "minDate", selectedDate );
document.getElementById("al_hasta").value = addToDate(selectedDate,1);
}
});
$( "#al_hasta" ).datepicker({
firstDay: 1,
dateFormat: "dd/mm/yy",
changeMonth: true,
changeYear: true,
minDate: 0,
dayNamesMin: ["Su", "Mo", "Tue", "Wed", "Thu", "Fri", "Sat"],
monthNamesShort: ["Jan","Feb","March","Apr","May","Ju","Jul","Aug","Sep","Oct","Nov","Dec"],
onSelect: function( selectedDate ) {
$( "#al_desde" ).datepicker( "option", "maxDate", selectedDate );
}
});
$( "#ac_desde" ).datepicker({
firstDay: 1,
dateFormat: "dd/mm/yy",
changeMonth: true,
changeYear: true,
minDate: 0,
dayNamesMin: ["Su", "Mo", "Tue", "Wed", "Thu", "Fri", "Sat"],
monthNamesShort: ["Jan","Feb","March","Apr","May","Ju","Jul","Aug","Sep","Oct","Nov","Dec"],
onSelect: function( selectedDate ) {
}
});
$( "#pa_desde" ).datepicker({
firstDay: 1,
dateFormat: "dd/mm/yy",
changeMonth: true,
changeYear: true,
minDate: 0,
dayNamesMin: ["Su", "Mo", "Tue", "Wed", "Thu", "Fri", "Sat"],
monthNamesShort: ["Jan","Feb","March","Apr","May","Ju","Jul","Aug","Sep","Oct","Nov","Dec"],
onSelect: function( selectedDate ) {
$( "#pa_hasta" ).datepicker( "option", "minDate", selectedDate );
document.getElementById("pa_hasta").value = addToDate(selectedDate,1);
}
});
$( "#pa_hasta" ).datepicker({
firstDay: 1,
dateFormat: "dd/mm/yy",
changeMonth: true,
changeYear: true,
minDate: 0,
dayNamesMin: ["Su", "Mo", "Tue", "Wed", "Thu", "Fri", "Sat"],
monthNamesShort: ["Jan","Feb","March","Apr","May","Ju","Jul","Aug","Sep","Oct","Nov","Dec"],
onSelect: function( selectedDate ) {
$( "#pa_desde" ).datepicker( "option", "maxDate", selectedDate );
}
});
$( "#desde_movil" ).datepicker({
showOn: "button",
buttonImage: "/webs/murciaturistica/estatico/img/calendario_reservas.png",
buttonImageOnly: true,
buttonText: "Date from",
firstDay: 1,
dateFormat: "dd/mm/yy",
changeMonth: true,
changeYear: true,
minDate: 0,
dayNamesMin: ["Su", "Mo", "Tue", "Wed", "Thu", "Fri", "Sat"],
monthNamesShort: ["Jan","Feb","March","Apr","May","Ju","Jul","Aug","Sep","Oct","Nov","Dec"],
onSelect: function( selectedDate ) {
$( "#hasta_movil" ).datepicker( "option", "minDate", selectedDate );
document.getElementById("hasta_movil").value = addToDate(selectedDate,1);
}
});
$( "#hasta_movil" ).datepicker({
showOn: "button",
buttonImage: "/webs/murciaturistica/estatico/img/calendario_reservas.png",
buttonImageOnly: true,
buttonText: "Date until",
firstDay: 1,
dateFormat: "dd/mm/yy",
changeMonth: true,
changeYear: true,
minDate: 0,
dayNamesMin: ["Su", "Mo", "Tue", "Wed", "Thu", "Fri", "Sat"],
monthNamesShort: ["Jan","Feb","March","Apr","May","Ju","Jul","Aug","Sep","Oct","Nov","Dec"],
onSelect: function( selectedDate ) {
$( "#desde_movil" ).datepicker( "option", "maxDate", selectedDate );
}
});
});
$("document").ready(function() {
$('.to_top').click(function(){
$("html, body").animate({ scrollTop: 0 }, "slow");
});
$('#to_reservas').click(function(){
$("html, body").animate({ scrollTop: 0 }, "slow");
});
/* $('.carrudest').click(function(){
$('html, body').animate({
scrollTop: $("#carruban").offset().top
}, 1000);
});
$('.carrudest2').click(function(){
$('html, body').animate({
scrollTop: $("#carruban2").offset().top
}, 2000);
});
$('.ttcontainer').click(function(){
$('html, body').animate({scrollTop: $("#topten").offset().top+($("#cab-container").height()/2)}, 1000);
});
$('.perdernavega').click(function(){
$('html, body').animate({scrollTop: $("#topten").offset().top-$("#cab-container").height()}, 1000);
});
$('#carucont .botonCerrar').click(function(){
$('html, body').animate({scrollTop: $("#topten").offset().top-$("#cab-container").height()}, 1000);
});
$('#agenda1x2 .navega').click(function(){
$('html, body').animate({scrollTop: $("#agenda1x2").offset().top-$("#cab-container").height()}, 500);
});
$('#carucont .cerrarDetalle').click(function(){
$('html, body').animate({scrollTop: $("#buscadorofertas").offset().top-$("#cab-container").height()}, 500);
});
$('.carrucontainer').click(function(){
$('html, body').animate({scrollTop: $("#buscadorofertas").offset().top-$("#cab-container").height()}, 500);
}); */
$('#indicadores .desplegable').on('click', function() {
var father = $(this).parent().parent();
var element = $(father).find("ul:first");
var img = $(this).find("img:first");
var imgSrc = $(img).attr("src");
var imgName = imgSrc.substring(0, imgSrc.lastIndexOf('_'));
var imgExt = imgSrc.substring(imgSrc.lastIndexOf('.'), imgSrc.length);
if ((element).is(':visible') && (element).parents(':hidden').length == 0) {
$(img).attr("src", imgName+"_down"+imgExt);
element.hide("blind");
} else {
$(img).attr("src", imgName+"_up"+imgExt);
element.show("blind");
}
});
});