var buscador_reservas = true; var pulsado = false; var opciones_menu_medio = 8; var idioma_site = "1"; 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('
'); contador = 0; } url = url.replace("https://www.turismoregiondemurcia.eshttps://", "https://"); foto = foto.replace("https://www.turismoregiondemurcia.eshttps://", "https://"); document.write(''); document.write(''+titulo+''); document.write('
'); document.write('
'+titulo+'
'); document.write('
'+tipo+'
'); document.write('
'); document.write('Eliminar este plan'); 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=4"; hazPeticion(url,"calendar"," "); } function buscar_movil(){ var texto = document.getElementById("consulta").value; texto = texto.replace("Buscar en turismoregiondemurcia.es",""); if (texto != ""){ location.href = "/es/buscar?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("DESDE",""); var ag_hasta = document.getElementById("ag_hasta").value; ag_hasta = ag_hasta.replace("HASTA",""); 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; } 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/es/mu_autocompletar?frase="+texto+"&prefijo="+prefijo+"&campo="+campo); hazPeticion("https://www.turismoregiondemurcia.es/es/mu_autocompletar?frase="+texto+"&prefijo="+prefijo+"&campo="+campo,prefijo+"_autocompletar","CARGANDO SUGERENCIAS ..."); // hazPeticion("https://www.turismoregiondemurcia.es/es/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("TEXTO LIBRE",""); 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 == "LLEGADA"){ mensaje("Debe introducir la fecha de llegada al alojamiento."); }else if (document.getElementById("al_hasta").value == "" || document.getElementById("al_hasta").value == "SALIDA"){ mensaje("Debe introducir la fecha de salida del alojamiento."); }else{ var url = "/es/reservas?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 == "LLEGADA"){ mensaje("Debe introducir la fecha en la que quiere realizar la actividad."); }else{ var url = "/es/buscar_actividades?buscar=si"; if (document.getElementById("ac_texto").value != "" && document.getElementById("ac_texto").value != "TEXTO LIBRE" && 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 != "LLEGADA"){ 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 == "LLEGADA"){ mensaje("Debe introducir la fecha de llegada al alojamiento."); }else if (document.getElementById("al_hasta").value == "" || document.getElementById("al_hasta").value == "SALIDA"){ mensaje("Debe introducir la fecha de salida del alojamiento."); }else{ var url = "/es/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 != "TEXTO LIBRE" && 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 == "LLEGADA"){ mensaje("Debe introducir la fecha en la que quiere realizar la actividad."); }else{ var url = "/es/buscar_actividades?buscar=si"; if (document.getElementById("ac_texto").value != "" && document.getElementById("ac_texto").value != "TEXTO LIBRE" && 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 != "LLEGADA"){ 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 == "LLEGADA"){ mensaje("Debe introducir la fecha de llegada al alojamiento."); }else if (document.getElementById("pa_hasta").value == "" || document.getElementById("pa_hasta").value == "SALIDA"){ mensaje("Debe introducir la fecha de salida del alojamiento."); }else{ var url = "/es/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 != "TEXTO LIBRE" && 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("DESDE",""); hasta = hasta.replace("HASTA",""); 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 = "La fecha DESDE no puede ser menor que la fecha actual o ha sido introducida incorrectamente, use el formato 'DD/MM/AAAA'"; if ((anod > anoh) || ((anod == anoh) && (mesd > mesh)) || ((anod == anoh) && (mesd == mesh) && (diad >= diah))) error = "La fecha HASTA debe ser posterior a la fecha DESDE o ha sido introducida incorrectamente, use el formato 'DD/MM/AAAA'"; if (hasta == "") error = "Debe indicar la fecha HASTA"; if (desde == "") error = "Debe indicar la fecha DESDE"; 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 == "FECHA"){ mensaje("Debe introducir la fecha."); }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("En estos momentos no se pueden reservar restaurantes, disculpe las molestias."); } function reservar_alojamiento(id){ if (document.getElementById("desde_"+id).value == "" || document.getElementById("desde_"+id).value == "LLEGADA"){ mensaje("Debe introducir la fecha de llegada al alojamiento."); }else if (document.getElementById("hasta_"+id).value == "" || document.getElementById("hasta_"+id).value == "SALIDA"){ mensaje("Debe introducir la fecha de salida del alojamiento."); }else{ var url = "/es/reservar?hotel="+id+"&fecha_desde="+document.getElementById("desde_"+id).value+"&fecha_hasta="+document.getElementById("hasta_"+id).value; window.open(url,'_self'); } } $(function() { $( "#al_desde" ).datepicker({ firstDay: 1, dateFormat: "dd/mm/yy", changeMonth: true, changeYear: true, minDate: 0, dayNamesMin: ["Do", "Lu", "Ma", "Mi", "Ju", "Vi", "Sa"], monthNamesShort: ["Ene","Feb","Mar ","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"], 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: ["Do", "Lu", "Ma", "Mi", "Ju", "Vi", "Sa"], monthNamesShort: ["Ene","Feb","Mar ","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"], 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: ["Do", "Lu", "Ma", "Mi", "Ju", "Vi", "Sa"], monthNamesShort: ["Ene","Feb","Mar ","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"], onSelect: function( selectedDate ) { } }); $( "#pa_desde" ).datepicker({ firstDay: 1, dateFormat: "dd/mm/yy", changeMonth: true, changeYear: true, minDate: 0, dayNamesMin: ["Do", "Lu", "Ma", "Mi", "Ju", "Vi", "Sa"], monthNamesShort: ["Ene","Feb","Mar ","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"], 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: ["Do", "Lu", "Ma", "Mi", "Ju", "Vi", "Sa"], monthNamesShort: ["Ene","Feb","Mar ","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"], 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: "Fecha desde", firstDay: 1, dateFormat: "dd/mm/yy", changeMonth: true, changeYear: true, minDate: 0, dayNamesMin: ["Do", "Lu", "Ma", "Mi", "Ju", "Vi", "Sa"], monthNamesShort: ["Ene","Feb","Mar ","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"], 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: "Fecha hasta", firstDay: 1, dateFormat: "dd/mm/yy", changeMonth: true, changeYear: true, minDate: 0, dayNamesMin: ["Do", "Lu", "Ma", "Mi", "Ju", "Vi", "Sa"], monthNamesShort: ["Ene","Feb","Mar ","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"], 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"); } }); });