1//---- Slide HOME Verano ----// 2 3$(window).bind('scroll',function(e){ 4 parallaxScroll(); 5}); 6 7function parallaxScroll(){ 8 var scrolled = $(window).scrollTop(); 9 $('#parallax-bg1').css('top',(0-(scrolled*.05))+'px'); 10 $('#parallax-bg2').css('top',(0-(scrolled*.15))+'px'); 11} 12 13function btnBuscadorMovil(){ 14 15 if(!$('#partial-xs').is(':visible')){ 16 17 $('#partial-xs').show(); 18 goTop(); 19 20 }else{ 21 22 var scrollTop = $(window).scrollTop(); 23 var scrollheight = $('#partial-xs').height(); 24 25 if(scrollTop >= scrollheight){ 26 27 goTop(); 28 29 }else{ 30 31 $('#partial-xs').hide(); 32 33 } 34 35 } 36 37} 38 39//---- Fin Slide HOME Verano ----// 40 41function ancho_vent_navegador(){ 42 //Conocer el ancho de la ventana del navegador 43 var myWidth = 0; 44 if( typeof( window.innerWidth ) == 'number' ) { 45 //No-IE 46 myWidth = window.innerWidth; 47 } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { 48 //IE 6+ 49 myWidth = document.documentElement.clientWidth; 50 } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { 51 //IE 4 compatible 52 myWidth = document.body.clientWidth; 53 } 54 return myWidth; 55} 56 57function alto_vent_navegador(){ 58 //Conocer la altura de la ventana del navegador 59 var myHeight = 0; 60 if( typeof( window.innerWidth ) == 'number' ) { 61 //Non-IE 62 myHeight = window.innerHeight; 63 } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { 64 //IE 6+ in 'standards compliant mode' 65 myHeight = document.documentElement.clientHeight; 66 } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { 67 //IE 4 compatible 68 myHeight = document.body.clientHeight; 69 } 70 return myHeight; 71} 72 73var areaActual = 1; 74var idLink = 'linkOffers1'; 75 76var textTranslate = { 77 habitación:{'es_ES':'habitación','ca_ES':'habitació','en_US':'room','fr_FR':'chambre','pt_PT':'quarto'}, 78 habitaciones:{'es_ES':'habitaciones','ca_ES':'habitacions','en_US':'rooms','fr_FR':'chambres','pt_PT':'quartos'}, 79 adultos:{'es_ES':'adultos','ca_ES':'adults','en_US':'adults','fr_FR':'adultes','pt_PT':'adultos'}, 80 adulto:{'es_ES':'adulto','ca_ES':'adult','en_US':'adult','fr_FR':'adulte','pt_PT':'adulto'}, 81 niños:{'es_ES':'niños','ca_ES':'nens','en_US':'children','fr_FR':'enfants','pt_PT':'crianças'}, 82 niño:{'es_ES':'niño','ca_ES':'nen','en_US':'child','fr_FR':'enfant','pt_PT':'criança'}, 83 persona:{'es_ES':'persona','ca_ES':'persona','en_US':'person','fr_FR':'personne','pt_PT':'pessoa'}, 84 personas:{'es_ES':'personas','ca_ES':'persones','en_US':'people','fr_FR':'personnes','pt_PT':'pessoas'},
85 apartamento:{'es_ES':'apartamento','ca_ES':'apartament','en_US':'apartment','fr_FR':'appartement','pt_PT':'apartamento'}, 86 apartamentos:{'es_ES':'apartamentos','ca_ES':'apartaments','en_US':'apartments','fr_FR':'appartements','pt_PT':'apartamentos'}, 87 destiTag :{'es_ES':'Elige tu destino','ca_ES':'Escull el teu destÃ','en_US':'Choose your destination','fr_FR':'Choisissez votre destination','pt_PT':'Escolha o seu destino'}, 88 skiTag :{'es_ES':'¿Dónde quieres esquiar?','ca_ES':'On vols esquiar?','en_US':'Where do you want to ski?','fr_FR':'Où voulez-vous skier?','pt_PT':'Onde quer esquiar?'}, 89 relaxTag :{'es_ES':'Elige tu balneario','ca_ES':'Escull el teu balneari','en_US':'Choose your spa','fr_FR':'Choisissez votre spa','pt_PT':'Escolha o seu spa'}, 90 hotelTag :{'es_ES':'Elige tu aventura','ca_ES':'Escull la teva activitat','en_US':'Choose your activity','fr_FR':'Choisissez votre activité','pt_PT':'Escolha a sua atividade'}, 91 bikeTag :{'es_ES':'Elige tu estación','ca_ES':'Escull la teva estació','en_US':'Choose your station','fr_FR':'Choisissez votre station','pt_PT':'Escolha a sua estação'}, 92 parquesTag :{'es_ES':'Elige tu parque','ca_ES':'Escull el teu parc','en_US':'Choose your park','fr_FR':'Choisissez votre parc','pt_PT':'Escolha o seu parque'}, 93 titleSearcherEsqui:{'es_ES':"Buscador de ofertas de esquÃ",'ca_ES':"Cercador d'ofertes d'esquÃ",'en_US':"Ski Holidays Deals",'fr_FR':"Trouvez votre séjour de ski",'pt_PT':"Ofertas de férias de esqui"}, 94 titleSearcherRelax:{'es_ES':"Viajes de relax y balnearios",'ca_ES':"Viatges de relax i balnearis",'en_US':"Spa Holidays",'fr_FR':"Séjours détente et spas",'pt_PT':"Viagens de relax e spas"}, 95 titleSearcherAventura:{'es_ES':"Viajes de aventura",'ca_ES':"Viatges d'aventura",'en_US':"Adventure Holidays",'fr_FR':"Voyages d'aventure",'pt_PT':"Viagens de aventura"}, 96 titleSearcherParques:{'es_ES':"Viajes a parques",'ca_ES':"Viatges a parcs",'en_US':"Trips to parks",'fr_FR':"Voyages dans les parcs",'pt_PT':"Viagens a parques"}, 97 titleSearcherHotel:{'es_ES':"Hoteles a precios exclusivos",'ca_ES':"Hotels a preus exclusius",'en_US':"Best value hotels",'fr_FR':"Hôtels à prix exclusifs",'pt_PT':"Hotéis a preços exclusivos"}, 98 Errors :{'es_ES':'¡Error!','ca_ES':'Error!','en_US':'Error!','fr_FR':'Erreur!','pt_PT':'Erro!'}, 99 privacidad :{'es_ES':'Tienes que aceptar la polÃtica de privacidad.','ca_ES':'Has d\'acceptar la polÃtica de privacitat.','en_US':'You must accept the privacy policy.','fr_FR':'Vous devez accepter la politique de confidentialité.','pt_PT':'Tem de aceitar a polÃtica de privacidade.'}, 100 direccion :{'es_ES':'No has puesto ninguna dirección.','ca_ES':'No has posat cap direcció.','en_US':'You have not written any direction','fr_FR':'Vous ne l\'avez pas mis toutes les directions.','pt_PT':'Não introduziu nenhuma morada.'}, 101 Actividades:{'es_ES':'actividades','ca_ES':'activitats','en_US':'activities','fr_FR':'activites','pt_PT':'atividades'}, 102 HotelActividad:{'es_ES':'Hotel + Actividad','ca_ES':'Hotel + Activitat','en_US':'Hotel + Activity','fr_FR':'Hôtel + Activité','pt_PT':'Hotel + Atividade'}, 103 Hotel:{'es_ES':'Hoteles','ca_ES':'Hotels','en_US':'Hotels','fr_FR':'Hôtels','pt_PT':'Hotéis'}, 104 Actividad:{'es_ES':'Actividades','ca_ES':'Activitats','en_US':'Activities','fr_FR':'Activités','pt_PT':'Atividades'}, 105 errorDomini:{'es_ES':'Por favor, introduzca un destino.','ca_ES':'Si us plau, introdueixi un destÃ.','en_US':'Please, enter a destination.','fr_FR':'Veuillez introduire votre destination.','pt_PT':'Por favor, introduza um destino.'}, 106 errorFecha:{'es_ES':'Por favor, introduzca una fecha para poder realizar la búsqueda.','ca_ES':'Si us plau, introdueixi una data per realitzar la recerca.','en_US':'Please, introduce a date for start with the search','fr_FR':'Sil vous plaît entrer une date pour la recherche.','pt_PT':'Por favor, introduza uma data para realizar a pesquisa.'}, 107 errorEdad:{'es_ES':'Por favor, introduzca las edades de todos los niños.','ca_ES':'Si us plau, introduïu les edats de tots els nens.','en_US':'Please enter the ages of all children.','fr_FR':'Veuillez entrer l\'âge de tous les enfants.','pt_PT':'Por favor, introduza as idades de todas as crianças.'}, 108 applyButton:{'es_ES':'Aceptar','ca_ES':'Aceptar','en_US':'Accept','fr_FR':'Accepte','pt_PT':'Aceitar'}, 109 cancelButton:{'es_ES':'Cancelar','ca_ES':'Cancelar','en_US':'Cancel','fr_FR':'Annuler','pt_PT':'Cancelar'}, 110 titleDates:{'es_ES':'Fechas del alojamiento','ca_ES':'Dates del allotjament','en_US':'Lodging dates','fr_FR':'Dates de logement','pt_PT':'Datas do alojamento'}, 111 titleDate:{'es_ES':'Fecha','ca_ES':'Data','en_US':'Date','fr_FR':'Date','pt_PT':'Data'} 112}; 113 114function texto(key){ 115 var cultura = $('#cultura').val(); 116 if (cultura === undefined){cultura = 'es_ES';} 117 return textTranslate[key][cultura]; 118} 119 120function btn_H_A_tag(){ 121 122 $('.ski-tag').show(); 123 $('.relax-tag').show(); 124 $('.hotel-tag').show(); 125 $('.bike-tag').show(); 126 $('.forfait-tag').hide(); 127 $('.solo-relax-tag').hide(); 128 $('.tours-tag').hide(); 129 $('.solo-bike-tag').hide(); 130 $('.btn_H_A_tag').removeClass('selector_no_activo'); 131 $('.btn_A_tag').removeClass('selector_activo'); 132 $('.btn_H_tag').removeClass('selector_activo'); 133 $('.btn_H_A_tag').addClass('selector_activo'); 134 $('.btn_A_tag').addClass('selector_no_activo'); 135 $('.btn_H_tag').addClass('selector_no_activo');
136 $('#tit_btn_selector').html(texto('HotelActividad')); 137 138 $('#in_Tour').val(''); 139 $('.ski-searcher').show(); 140 $('.hotel-relax-searcher').hide(); 141 $('.hotel-searcher').hide(); 142 $('.bike-searcher').hide(); 143 $('.summer-ski-searcher').hide(); 144 $('.tours-searcher').hide(); 145 $('.solo-relax-searcher').hide(); 146 $('.solo-bike-searcher').hide(); 147 $('.forfait-searcher').hide(); 148 $('.solo-hotel-searcher').hide(); 149 $('.ski-tag').removeClass('sch-e').addClass('sch-e-active'); 150 $('#etiqueta-chg').val("E"); 151 $('.solo-relax-tag').removeClass('sch-e-active').addClass('sch-e'); 152 $('.solo-bike-tag').removeClass('sch-e-active').addClass('sch-e'); 153 $('.relax-tag').removeClass('sch-e-active').addClass('sch-e'); 154 $('.hotel-tag').removeClass('sch-e-active').addClass('sch-e'); 155 $('.bike-tag').removeClass('sch-e-active').addClass('sch-e'); 156 $('.summer-ski-tag').removeClass('sch-e-active').addClass('sch-e'); 157 $('.tours-tag').removeClass('sch-e-active').addClass('sch-e'); 158 $('.forfait-tag').removeClass('sch-e-active').addClass('sch-e'); 159 $('#moda').val('E'); 160 $('#tematica').val(0); 161 $('#opt_radio_search').val('E'); 162 $('#tipoP').val(''); 163 $('#everano').data('moda',0); 164 $('.ski-btn-dst').html(texto('skiTag') + '<span class="caret"></span>'); 165 set_MinDate("G"); 166 $('.ocuHotels').css("display", ""); 167 $('.ocuTours').css("display", "none"); 168 $('#id_form_cercador').attr("action", window.location.protocol + '//' + getHostName() + "/csp/online/vnew/Booking.CSP"); 169 peopleCount(); 170 171 $('#zona').val(''); 172 $('#zona-xs').val(''); 173 $('#area').val(''); 174 $('#area-xs').val(''); 175 $('#domini').val(''); 176 $('#domini-xs').val(''); 177} 178function btn_H_tag(){ 179 180 $('.ski-tag').hide(); 181 $('.relax-tag').hide(); 182 $('.hotel-tag').hide(); 183 $('.bike-tag').hide(); 184 $('.forfait-tag').hide(); 185 $('.solo-relax-tag').hide(); 186 $('.tours-tag').hide(); 187 $('.solo-bike-tag').hide(); 188 $('.btn_H_A_tag').removeClass('selector_activo'); 189 $('.btn_A_tag').removeClass('selector_activo'); 190 $('.btn_H_tag').removeClass('selector_no_activo'); 191 $('.btn_H_A_tag').addClass('selector_no_activo'); 192 $('.btn_A_tag').addClass('selector_no_activo'); 193 $('.btn_H_tag').addClass('selector_activo'); 194 $('#tit_btn_selector').html(texto('Hotel')); 195 196 $('#in_Tour').val(''); 197 $('.ski-searcher').hide(); 198 $('.hotel-relax-searcher').hide(); 199 $('.hotel-searcher').hide(); 200 $('.bike-searcher').hide(); 201 $('.summer-ski-searcher').hide(); 202 $('.tours-searcher').hide(); 203 $('.solo-relax-searcher').hide(); 204 $('.solo-bike-searcher').hide(); 205 $('.forfait-searcher').hide(); 206 $('.solo-hotel-searcher').show(); 207 $('#etiqueta-chg').val("H"); 208 $('.hotel-tag').removeClass('sch-e-active').addClass('sch-e'); 209 $('.solo-relax-tag').removeClass('sch-e-active').addClass('sch-e'); 210 $('.solo-bike-tag').removeClass('sch-e-active').addClass('sch-e'); 211 $('.relax-tag').removeClass('sch-e-active').addClass('sch-e'); 212 $('.ski-tag').removeClass('sch-e-active').addClass('sch-e'); 213 $('.bike-tag').removeClass('sch-e-active').addClass('sch-e'); 214 $('.summer-ski-tag').removeClass('sch-e-active').addClass('sch-e'); 215 $('.tours-tag').removeClass('sch-e-active').addClass('sch-e'); 216 $('.forfait-tag').removeClass('sch-e-active').addClass('sch-e'); 217 $('#moda').val('H'); 218 $('#tematica').val(0); 219 $('#opt_radio_search').val('SH'); 220 $('#tipoP').val(''); 221 $('#everano').data('moda',0); 222 $('.hotel-btn-dst').html(texto('destiTag') + '<span class="caret"></span>'); 223 set_MinDate("G"); 224 $('.ocuHotels').css("display", ""); 225 $('.ocuTours').css("display", "none"); 226 $('#id_form_cercador').attr("action", window.location.protocol + '//' + getHostName() + "/csp/online/vnew/Booking.CSP"); 227 peopleCount(); 228 229 $('#zona').val(''); 230 $('#zona-xs').val(''); 231 $('#area').val(''); 232 $('#area-xs').val(''); 233 $('#domini').val(''); 234 $('#domini-xs').val(''); 235} 236function btn_A_tag(){ 237 238 var cultura = $('#cultura').val(); 239 240 $('.ski-tag').hide(); 241 $('.relax-tag').hide(); 242 $('.hotel-tag').hide(); 243 $('.bike-tag').hide(); 244 $('.forfait-tag').show(); 245 $('.solo-relax-tag').show(); 246 $('.tours-tag').show(); 247 $('.solo-bike-tag').show(); 248 $('.btn_H_A_tag').removeClass('selector_activo'); 249 $('.btn_A_tag').removeClass('selector_no_activo'); 250 $('.btn_H_tag').removeClass('selector_activo'); 251 $('.btn_H_A_tag').addClass('selector_no_activo'); 252 $('.btn_A_tag').addClass('selector_activo'); 253 $('.btn_H_tag').addClass('selector_no_activo');
254 $('#tit_btn_selector').html(texto('Actividad')); 255 256 $('#in_Tour').val(1); 257 $('.ski-searcher').hide(); 258 $('.hotel-relax-searcher').hide(); 259 $('.hotel-searcher').hide(); 260 $('.bike-searcher').hide(); 261 $('.summer-ski-searcher').hide(); 262 $('.tours-searcher').hide(); 263 $('.solo-relax-searcher').hide(); 264 $('.solo-bike-searcher').hide(); 265 $('.forfait-searcher').show(); 266 $('.solo-hotel-searcher').hide(); 267 $('.forfait-tag').removeClass('sch-e').addClass('sch-e-active'); 268 $('#etiqueta-chg').val("F"); 269 $('.solo-relax-tag').removeClass('sch-e-active').addClass('sch-e'); 270 $('.solo-bike-tag').removeClass('sch-e-active').addClass('sch-e'); 271 $('.relax-tag').removeClass('sch-e-active').addClass('sch-e'); 272 $('.hotel-tag').removeClass('sch-e-active').addClass('sch-e'); 273 $('.tours-tag').removeClass('sch-e-active').addClass('sch-e'); 274 $('.bike-tag').removeClass('sch-e-active').addClass('sch-e'); 275 $('.ski-tag').removeClass('sch-e-active').addClass('sch-e'); 276 $('.summer-ski-tag').removeClass('sch-e-active').addClass('sch-e'); 277 $('#moda').val('T'); 278 $('#tematica').val(0); 279 $('#opt_radio_search').val('SF'); 280 $('#tipoP').val('F'); 281 $('#everano').data('moda',0); 282 $('.forfait-btn-dst').html(texto('skiTag') + '<span class="caret"></span>'); 283 set_MinDate("T"); 284 $('.ocuHotels').css("display", "none"); 285 $('.ocuTours').css("display", ""); 286 $(".num-habs option[value=1]").attr('selected', 'selected'); 287 $('.num-habs').trigger('change'); 288 $('#id_form_cercador').attr("action", window.location.protocol + '//' + getHostName() + "/"+cultura+"/"+textTranslate['Actividades'][cultura]); 289 peopleCount(); 290 291 $('#zona').val(''); 292 $('#zona-xs').val(''); 293 $('#area').val(''); 294 $('#area-xs').val(''); 295 $('#domini').val(''); 296 $('#domini-xs').val(''); 297} 298function btn_ski_tag(){ 299 300 $('#in_Tour').val(''); 301 $('.ski-searcher').show(); 302 $('.hotel-relax-searcher').hide(); 303 $('.hotel-searcher').hide(); 304 $('.bike-searcher').hide(); 305 $('.summer-ski-searcher').hide(); 306 $('.tours-searcher').hide(); 307 $('.solo-relax-searcher').hide(); 308 $('.solo-bike-searcher').hide(); 309 $('.forfait-searcher').hide(); 310 $('.solo-hotel-searcher').hide(); 311 $('.ski-tag').removeClass('sch-e').addClass('sch-e-active'); 312 $('#etiqueta-chg').val("E"); 313 $('.solo-relax-tag').removeClass('sch-e-active').addClass('sch-e'); 314 $('.solo-bike-tag').removeClass('sch-e-active').addClass('sch-e'); 315 $('.relax-tag').removeClass('sch-e-active').addClass('sch-e'); 316 $('.hotel-tag').removeClass('sch-e-active').addClass('sch-e'); 317 $('.bike-tag').removeClass('sch-e-active').addClass('sch-e'); 318 $('.summer-ski-tag').removeClass('sch-e-active').addClass('sch-e'); 319 $('.tours-tag').removeClass('sch-e-active').addClass('sch-e'); 320 $('.forfait-tag').removeClass('sch-e-active').addClass('sch-e'); 321 $('#moda').val('E'); 322 $('#tematica').val(0); 323 $('#opt_radio_search').val('E'); 324 $('#tipoP').val(''); 325 $('#everano').data('moda',0); 326 $('.ski-btn-dst').html(texto('skiTag') + '<span class="caret"></span>'); 327 set_MinDate("G"); 328 $('.ocuHotels').css("display", ""); 329 $('.ocuTours').css("display", "none"); 330 $('#id_form_cercador').attr("action", window.location.protocol + '//' + getHostName() + "/csp/online/vnew/Booking.CSP"); 331 peopleCount(); 332 333} 334function btn_relax_tag(){ 335 336 $('#in_Tour').val(''); 337 $('.ski-searcher').hide(); 338 $('.hotel-relax-searcher').show(); 339 $('.hotel-searcher').hide(); 340 $('.bike-searcher').hide(); 341 $('.summer-ski-searcher').hide(); 342 $('.tours-searcher').hide(); 343 $('.solo-relax-searcher').hide(); 344 $('.solo-bike-searcher').hide(); 345 $('.forfait-searcher').hide(); 346 $('.solo-hotel-searcher').hide(); 347 $('.relax-tag').removeClass('sch-e').addClass('sch-e-active'); 348 $('#etiqueta-chg').val("H"); 349 $('.solo-relax-tag').removeClass('sch-e-active').addClass('sch-e'); 350 $('.solo-bike-tag').removeClass('sch-e-active').addClass('sch-e'); 351 $('.hotel-tag').removeClass('sch-e-active').addClass('sch-e'); 352 $('.ski-tag').removeClass('sch-e-active').addClass('sch-e'); 353 $('.bike-tag').removeClass('sch-e-active').addClass('sch-e'); 354 $('.summer-ski-tag').removeClass('sch-e-active').addClass('sch-e'); 355 $('.tours-tag').removeClass('sch-e-active').addClass('sch-e'); 356 $('.forfait-tag').removeClass('sch-e-active').addClass('sch-e'); 357 $('#moda').val('H'); 358 $('#tematica').val(4); 359 $('#opt_radio_search').val('R');
360 $('#tipoP').val(''); 361 $('#everano').data('moda',0); 362 $('.relax-btn-dst').html(texto('relaxTag') + '<span class="caret"></span>'); 363 set_MinDate("G"); 364 $('.ocuHotels').css("display", ""); 365 $('.ocuTours').css("display", "none"); 366 $('#id_form_cercador').attr("action", window.location.protocol + '//' + getHostName() + "/csp/online/vnew/Booking.CSP"); 367 peopleCount(); 368 369} 370function btn_hotel_tag(){ 371 372 $('#in_Tour').val(''); 373 $('.ski-searcher').hide(); 374 $('.hotel-relax-searcher').hide(); 375 $('.hotel-searcher').show(); 376 $('.bike-searcher').hide(); 377 $('.summer-ski-searcher').hide(); 378 $('.tours-searcher').hide(); 379 $('.solo-relax-searcher').hide(); 380 $('.solo-bike-searcher').hide(); 381 $('.forfait-searcher').hide(); 382 $('.solo-hotel-searcher').hide(); 383 $('.hotel-tag').removeClass('sch-e').addClass('sch-e-active'); 384 $('#etiqueta-chg').val("H"); 385 $('.solo-relax-tag').removeClass('sch-e-active').addClass('sch-e'); 386 $('.solo-bike-tag').removeClass('sch-e-active').addClass('sch-e'); 387 $('.relax-tag').removeClass('sch-e-active').addClass('sch-e'); 388 $('.ski-tag').removeClass('sch-e-active').addClass('sch-e'); 389 $('.bike-tag').removeClass('sch-e-active').addClass('sch-e'); 390 $('.summer-ski-tag').removeClass('sch-e-active').addClass('sch-e'); 391 $('.tours-tag').removeClass('sch-e-active').addClass('sch-e'); 392 $('.forfait-tag').removeClass('sch-e-active').addClass('sch-e'); 393 $('#moda').val('H'); 394 $('#tematica').val(0); 395 $('#opt_radio_search').val('A'); 396 $('#tipoP').val(''); 397 $('#everano').data('moda',0); 398 $('.hotel-btn-dst').html(texto('hotelTag') + '<span class="caret"></span>'); 399 set_MinDate("G"); 400 $('.ocuHotels').css("display", ""); 401 $('.ocuTours').css("display", "none"); 402 $('#id_form_cercador').attr("action", window.location.protocol + '//' + getHostName() + "/csp/online/vnew/Booking.CSP"); 403 peopleCount(); 404 405} 406function btn_bike_tag(){ 407 408 $('#in_Tour').val(''); 409 $('.ski-searcher').hide(); 410 $('.hotel-relax-searcher').hide(); 411 $('.hotel-searcher').hide(); 412 $('.bike-searcher').show(); 413 $('.summer-ski-searcher').hide(); 414 $('.tours-searcher').hide(); 415 $('.solo-relax-searcher').hide(); 416 $('.solo-bike-searcher').hide(); 417 $('.forfait-searcher').hide(); 418 $('.solo-hotel-searcher').hide(); 419 $('.bike-tag').removeClass('sch-e').addClass('sch-e-active'); 420 $('#etiqueta-chg').val("B"); 421 $('.solo-relax-tag').removeClass('sch-e-active').addClass('sch-e'); 422 $('.solo-bike-tag').removeClass('sch-e-active').addClass('sch-e'); 423 $('.relax-tag').removeClass('sch-e-active').addClass('sch-e'); 424 $('.hotel-tag').removeClass('sch-e-active').addClass('sch-e'); 425 $('.ski-tag').removeClass('sch-e-active').addClass('sch-e'); 426 $('.summer-ski-tag').removeClass('sch-e-active').addClass('sch-e'); 427 $('.tours-tag').removeClass('sch-e-active').addClass('sch-e'); 428 $('.forfait-tag').removeClass('sch-e-active').addClass('sch-e'); 429 $('#moda').val('B'); 430 $('#tematica').val(0); 431 $('#opt_radio_search').val('B'); 432 $('#tipoP').val(''); 433 $('#everano').data('moda',0); 434 $('.bike-btn-dst').html(texto('bikeTag') + '<span class="caret"></span>'); 435 set_MinDate("G"); 436 $('.ocuHotels').css("display", ""); 437 $('.ocuTours').css("display", "none"); 438 $('#id_form_cercador').attr("action", window.location.protocol + '//' + getHostName() + "/csp/online/vnew/Booking.CSP"); 439 peopleCount(); 440 441} 442function btn_summer_ski_tag(){ 443 444 $('#in_Tour').val(''); 445 $('.ski-searcher').hide(); 446 $('.hotel-relax-searcher').hide(); 447 $('.hotel-searcher').hide(); 448 $('.bike-searcher').hide(); 449 $('.tours-searcher').hide(); 450 $('.solo-relax-searcher').hide(); 451 $('.solo-bike-searcher').hide(); 452 $('.forfait-searcher').hide(); 453 $('.summer-ski-searcher').show(); 454 $('.solo-hotel-searcher').hide(); 455 $('.summer-ski-tag').removeClass('sch-e').addClass('sch-e-active'); 456 $('#etiqueta-chg').val("EV"); 457 $('.solo-relax-tag').removeClass('sch-e-active').addClass('sch-e'); 458 $('.solo-bike-tag').removeClass('sch-e-active').addClass('sch-e'); 459 $('.relax-tag').removeClass('sch-e-active').addClass('sch-e'); 460 $('.hotel-tag').removeClass('sch-e-active').addClass('sch-e'); 461 $('.bike-tag').removeClass('sch-e-active').addClass('sch-e'); 462 $('.ski-tag').removeClass('sch-e-active').addClass('sch-e'); 463 $('.tours-tag').removeClass('sch-e-active').addClass('sch-e'); 464 $('.forfait-tag').removeClass('sch-e-active').addClass('sch-e'); 465 $('#moda').val('E'); 466 $('#tematica').val(0); 467 $('#opt_radio_search').val('EV');
468 $('#tipoP').val(''); 469 $('#everano').data('moda',1); 470 $('.summer-ski-btn-dst').html(texto('skiTag') + '<span class="caret"></span>'); 471 set_MinDate("G"); 472 $('.ocuHotels').css("display", ""); 473 $('.ocuTours').css("display", "none"); 474 $('#id_form_cercador').attr("action", window.location.protocol + '//' + getHostName() + "/csp/online/vnew/Booking.CSP"); 475 peopleCount(); 476 477} 478function btn_forfait_tag(){ 479 480 var cultura = $('#cultura').val(); 481 482 $('#in_Tour').val(1); 483 $('.ski-searcher').hide(); 484 $('.hotel-relax-searcher').hide(); 485 $('.hotel-searcher').hide(); 486 $('.bike-searcher').hide(); 487 $('.summer-ski-searcher').hide(); 488 $('.tours-searcher').hide(); 489 $('.solo-relax-searcher').hide(); 490 $('.solo-bike-searcher').hide(); 491 $('.forfait-searcher').show(); 492 $('.solo-hotel-searcher').hide(); 493 $('.forfait-tag').removeClass('sch-e').addClass('sch-e-active'); 494 $('#etiqueta-chg').val("F"); 495 $('.solo-relax-tag').removeClass('sch-e-active').addClass('sch-e'); 496 $('.solo-bike-tag').removeClass('sch-e-active').addClass('sch-e'); 497 $('.relax-tag').removeClass('sch-e-active').addClass('sch-e'); 498 $('.hotel-tag').removeClass('sch-e-active').addClass('sch-e'); 499 $('.tours-tag').removeClass('sch-e-active').addClass('sch-e'); 500 $('.bike-tag').removeClass('sch-e-active').addClass('sch-e'); 501 $('.ski-tag').removeClass('sch-e-active').addClass('sch-e'); 502 $('.summer-ski-tag').removeClass('sch-e-active').addClass('sch-e'); 503 $('#moda').val('T'); 504 $('#tematica').val(0); 505 $('#opt_radio_search').val('SF'); 506 $('#tipoP').val('F'); 507 $('#everano').data('moda',0); 508 $('.forfait-btn-dst').html(texto('skiTag') + '<span class="caret"></span>'); 509 set_MinDate("T"); 510 $('.ocuHotels').css("display", "none"); 511 $('.ocuTours').css("display", ""); 512 $(".num-habs option[value=1]").attr('selected', 'selected'); 513 $('.num-habs').trigger('change'); 514 $('#id_form_cercador').attr("action", window.location.protocol + '//' + getHostName() + "/"+cultura+"/"+textTranslate['Actividades'][cultura]); 515 peopleCount(); 516 517} 518function btn_solo_relax_tag(){ 519 520 var cultura = $('#cultura').val(); 521 522 $('#in_Tour').val(1); 523 $('.ski-searcher').hide(); 524 $('.hotel-relax-searcher').hide(); 525 $('.hotel-searcher').hide(); 526 $('.bike-searcher').hide(); 527 $('.summer-ski-searcher').hide(); 528 $('.forfait-searcher').hide(); 529 $('.solo-relax-searcher').show(); 530 $('.solo-bike-searcher').hide(); 531 $('.tours-searcher').hide(); 532 $('.solo-hotel-searcher').hide(); 533 $('.solo-relax-tag').removeClass('sch-e').addClass('sch-e-active'); 534 $('#etiqueta-chg').val("T"); 535 $('.solo-bike-tag').removeClass('sch-e-active').addClass('sch-e'); 536 $('.tours-tag').removeClass('sch-e-active').addClass('sch-e'); 537 $('.relax-tag').removeClass('sch-e-active').addClass('sch-e'); 538 $('.forfait-tag').removeClass('sch-e-active').addClass('sch-e'); 539 $('.hotel-tag').removeClass('sch-e-active').addClass('sch-e'); 540 $('.bike-tag').removeClass('sch-e-active').addClass('sch-e'); 541 $('.ski-tag').removeClass('sch-e-active').addClass('sch-e'); 542 $('.summer-ski-tag').removeClass('sch-e-active').addClass('sch-e'); 543 $('#moda').val('T'); 544 $('#tematica').val(4); 545 $('#opt_radio_search').val('SR'); 546 $('#tipoP').val('A'); 547 $('#everano').data('moda',0); 548 $('.tour-btn-dst').html(texto('relaxTag') + '<span class="caret"></span>'); 549 set_MinDate("T"); 550 $('.ocuHotels').css("display", "none"); 551 $('.ocuTours').css("display", ""); 552 $(".num-habs option[value=1]").attr('selected', 'selected'); 553 $('.num-habs').trigger('change'); 554 $('#id_form_cercador').attr("action", window.location.protocol + '//' + getHostName() + "/"+cultura+"/"+textTranslate['Actividades'][cultura]); 555 peopleCount(); 556 557} 558function btn_tours_tag(){ 559 560 var cultura = $('#cultura').val(); 561 562 $('#in_Tour').val(1); 563 $('.ski-searcher').hide(); 564 $('.hotel-relax-searcher').hide(); 565 $('.hotel-searcher').hide(); 566 $('.bike-searcher').hide(); 567 $('.summer-ski-searcher').hide(); 568 $('.forfait-searcher').hide(); 569 $('.solo-relax-searcher').hide(); 570 $('.solo-bike-searcher').hide(); 571 $('.tours-searcher').show(); 572 $('.solo-hotel-searcher').hide(); 573 $('.tours-tag').removeClass('sch-e').addClass('sch-e-active'); 574 $('#etiqueta-chg').val("T"); 575 $('.solo-relax-tag').removeClass('sch-e-active').addClass('sch-e'); 576 $('.solo-bike-tag').removeClass('sch-e-active').addClass('sch-e'); 577 $('.relax-tag').removeClass('sch-e-active').addClass('sch-e'); 578 $('.relax-tag').removeClass('sch-e-active').addClass('sch-e'); 579 $('.forfait-tag').removeClass('sch-e-active').addClass('sch-e'); 580 $('.hotel-tag').removeClass('sch-e-active').addClass('sch-e'); 581 $('.bike-tag').removeClass('sch-e-active').addClass('sch-e'); 582 $('.ski-tag').removeClass('sch-e-active').addClass('sch-e'); 583 $('.summer-ski-tag').removeClass('sch-e-active').addClass('sch-e'); 584 $('#moda').val('T'); 585 $('#tematica').val(5); 586 $('#opt_radio_search').val('SA');
587 $('#tipoP').val('A'); 588 $('#everano').data('moda',0); 589 $('.tour-btn-dst').html(texto('hotelTag') + '<span class="caret"></span>'); 590 set_MinDate("T"); 591 $('.ocuHotels').css("display", "none"); 592 $('.ocuTours').css("display", ""); 593 $(".num-habs option[value=1]").attr('selected', 'selected'); 594 $('.num-habs').trigger('change'); 595 $('#id_form_cercador').attr("action", window.location.protocol + '//' + getHostName() + "/"+cultura+"/"+textTranslate['Actividades'][cultura]); 596 peopleCount(); 597 598} 599function btn_solo_bike_tag(){ 600 601 var cultura = $('#cultura').val(); 602 603 $('#in_Tour').val(1); 604 $('.ski-searcher').hide(); 605 $('.hotel-relax-searcher').hide(); 606 $('.hotel-searcher').hide(); 607 $('.bike-searcher').hide(); 608 $('.summer-ski-searcher').hide(); 609 $('.forfait-searcher').hide(); 610 $('.solo-relax-searcher').hide(); 611 $('.solo-bike-searcher').show(); 612 $('.tours-searcher').hide(); 613 $('.solo-hotel-searcher').hide(); 614 $('.solo-bike-tag').removeClass('sch-e').addClass('sch-e-active'); 615 $('#etiqueta-chg').val("T"); 616 $('.solo-relax-tag').removeClass('sch-e-active').addClass('sch-e'); 617 $('.tours-tag').removeClass('sch-e-active').addClass('sch-e'); 618 $('.relax-tag').removeClass('sch-e-active').addClass('sch-e'); 619 $('.forfait-tag').removeClass('sch-e-active').addClass('sch-e'); 620 $('.hotel-tag').removeClass('sch-e-active').addClass('sch-e'); 621 $('.bike-tag').removeClass('sch-e-active').addClass('sch-e'); 622 $('.ski-tag').removeClass('sch-e-active').addClass('sch-e'); 623 $('.summer-ski-tag').removeClass('sch-e-active').addClass('sch-e'); 624 $('#moda').val('T'); 625 $('#tematica').val(0); 626 $('#opt_radio_search').val('SB'); 627 $('#tipoP').val('F'); 628 $('#everano').data('moda',0); 629 $('.tour-btn-dst').html(texto('bikeTag') + '<span class="caret"></span>'); 630 set_MinDate("T"); 631 $('.ocuHotels').css("display", "none"); 632 $('.ocuTours').css("display", ""); 633 $(".num-habs option[value=1]").attr('selected', 'selected'); 634 $('.num-habs').trigger('change'); 635 $('#id_form_cercador').attr("action", window.location.protocol + '//' + getHostName() + "/"+cultura+"/"+textTranslate['Actividades'][cultura]); 636 peopleCount(); 637 638} 639 640//Buscar un elemento haciendo scroll 641function goToByScroll(id, dist_top) { 642 $('html,body').animate({ 643 scrollTop: $("#" + id).offset().top - dist_top 644 }, 500); 645} 646 647 648$(document).ready(function(){ 649 650 /*$(window).bind("pageshow", function() { 651 652 for (var i = 1; i <= 3; i++) { 653 654 $('#habs').val(1); 655 $('#habsxs').val(1); 656 $('#adu'+i).val(2); 657 $('#adu'+i+'-xs').val(2); 658 $('#nen'+i).val(0); 659 $('#nen'+i+'-xs').val(0); 660 661 for (var y = 1; y <= 4; y++) { 662 $('.edat'+i+y).val(1); 663 } 664 665 } 666 667 });*/ 668 669 $('#vullFact').change(function() { 670 if($(this).is(":checked")) { 671 $("#div_novullFactura").css("pointer-events", "none"); 672 $("#div_novullFactura").css("opacity", "0.4"); 673 $("#nom").val($("#nomFS").val()); 674 $("#cognoms").val($("#cognomsFS").val()); 675 $("#email").val($("#emailFS").val()); 676 $("#email2").val($("#emailFS2").val()); 677 $("#telefon").val($("#telefonFS").val()); 678 $("#div_novullFactura").hide('slow'); 679 $("#div_vullFactura").show('slow'); 680 }else{ 681 $("#div_novullFactura").css("pointer-events", ""); 682 $("#div_novullFactura").css("opacity", ""); 683 $("#div_novullFactura").show('slow'); 684 $("#div_vullFactura").hide('slow'); 685 $("#dni").val(""); 686 $("#nom").val(""); 687 $("#cognoms").val(""); 688 $("#email").val(""); 689 $("#telefon").val(""); 690 $("#codiPostal").val(""); 691 $("#poblacio").val(""); 692 $("#direccio").val(""); 693 } 694 }); 695 696 var cookie = get_cookie("CookieWarning"); 697 if(cookie=="1"){hideCookieDiv();} 698 window.name="estiberPL"; 699 var menuActivat = 'cercadorHomeHoteles'; 700 //Les 5 linies a continuació serveixen per activar el menu Hoteles en cas de que la url contingui naturlandia, andorra, andorre, vallnord o grandvalira 701 if(window.location.href.indexOf("naturlandia") > -1){var menuActivat = 'cercadorHomeHoteles';} 702 if(window.location.href.indexOf("andorra") > -1){var menuActivat = 'cercadorHomeHoteles';} 703 if(window.location.href.indexOf("andorre") > -1){var menuActivat = 'cercadorHomeHoteles';} 704 if(window.location.href.indexOf("vallnord") > -1){var menuActivat = 'cercadorHomeHoteles';} 705 if(window.location.href.indexOf("grandvalira") > -1){var menuActivat = 'cercadorHomeHoteles';} 706 $('#' + menuActivat).css( 'background-color', '#ffb400'); 707 $('#' + menuActivat).css( 'box-shadow', 'none'); 708 var cultura = $('#cultura').val(); 709 710 $('.btn_H_A_tag').click(function(){ 711 712 btn_H_A_tag(); 713 714 }); 715 716 $('.btn_H_tag').click(function(){ 717 718 btn_H_tag(); 719 720 }); 721 722 $('.btn_A_tag').click(function(){ 723 724 btn_A_tag(); 725 726 }); 727 728 $('.ski-tag').click(function(){ 729 730 btn_ski_tag(); 731 732 }); 733 734 $('.relax-tag').click(function(){ 735 736 btn_relax_tag(); 737 738 }); 739 740 $('.hotel-tag').click(function(){ 741 742 btn_hotel_tag(); 743 744 }); 745 746 $('.bike-tag').click(function(){ 747 748 btn_bike_tag(); 749 750 }); 751 752 $('.summer-ski-tag').click(function(){ 753 754 btn_summer_ski_tag(); 755 756 }); 757 758 $('.forfait-tag').click(function(){ 759 760 btn_forfait_tag(); 761 762 }); 763 764 $('.solo-relax-tag').click(function(){ 765 766 btn_solo_relax_tag(); 767 768 }); 769 770 $('.tours-tag').click(function(){ 771 772 btn_tours_tag(); 773 774 }); 775 776 $('.solo-bike-tag').click(function(){ 777 778 btn_solo_bike_tag(); 779 780 }); 781 782 $('.ski-tag, .relax-tag, .hotel-tag, .bike-tag, .summer-ski-tag, .tours-tag, .forfait-tag, .solo-relax-tag, .solo-bike-tag').click(function(){ 783 $('#zona').val(''); 784 $('#zona-xs').val(''); 785 $('#area').val(''); 786 $('#area-xs').val(''); 787 $('#domini').val(''); 788 $('#domini-xs').val(''); 789 /* 790 $('#buscador_datapicker').val(''); 791 $('#buscador_datapicker_xs').val(''); 792 $('#buscador_datapickerOut').val(''); 793 $('#buscador_datapickerOut_xs').val(''); 794 $('#sch-p').html('2 personas'); 795 $('#habs').val(1); 796 $('#habsxs').val(1); 797 $('#adu1').val(2); 798 $('#adu2').val(2); 799 $('#adu3').val(2); 800 $('#adu4').val(2); 801 $('#adu1-xs').val(2); 802 $('#adu2-xs').val(2); 803 $('#adu3-xs').val(2); 804 $('#adu4-xs').val(2); 805 $('#nen1').val(0); 806 $('#nen2').val(0); 807 $('#nen3').val(0); 808 $('#nen4').val(0); 809 $('#nen1-xs').val(0); 810 $('#nen2-xs').val(0); 811 $('#nen3-xs').val(0); 812 $('#nen4-xs').val(0); 813 $('#edat1').hide(); 814 $('#edat2').hide(); 815 $('#edat3').hide(); 816 $('#edat4').hide(); 817 $('#edat1-xs').hide(); 818 $('#edat2-xs').hide(); 819 $('#edat3-xs').hide(); 820 $('#edat4-xs').hide(); 821 $('#hab2').hide(); 822 $('#hab3').hide(); 823 $('#hab2-xs').hide(); 824 $('#hab3-xs').hide(); 825 */ 826 }); 827 828 $('#adu4').change(function(){ 829 $('#adu1').val($('#adu4').val()); 830 $('#adu1-xs').val($('#adu4').val()); 831 $('#adu4-xs').val($('#adu4').val()); 832 }); 833 834 $('#nen4').change(function(){ 835 $('#nen1').val($('#nen4').val()); 836 $('#nen1-xs').val($('#nen4').val()); 837 $('#nen4-xs').val($('#nen4').val()); 838 }); 839 840 $('#adu1').change(function(){ 841 $('#adu4').val($('#adu1').val()); 842 $('#adu4-xs').val($('#adu1').val()); 843 $('#adu1-xs').val($('#adu1').val()); 844 }); 845 846 $('#nen1').change(function(){ 847 $('#nen4').val($('#nen1').val()); 848 $('#nen4-xs').val($('#nen1').val()); 849 $('#nen1-xs').val($('#nen1').val()); 850 }); 851 852 $('#adu4-xs').change(function(){ 853 $('#adu1-xs').val($('#adu4-xs').val()); 854 $('#adu1').val($('#adu4-xs').val()); 855 $('#adu4').val($('#adu4-xs').val()); 856 }); 857 858 $('#nen4-xs').change(function(){ 859 $('#nen1-xs').val($('#nen4-xs').val()); 860 $('#nen1').val($('#nen4-xs').val()); 861 $('#nen4').val($('#nen4-xs').val()); 862 }); 863 864 $('#adu1-xs').change(function(){ 865 $('#adu4-xs').val($('#adu1-xs').val()); 866 $('#adu4').val($('#adu1-xs').val()); 867 $('#adu1').val($('#adu1-xs').val()); 868 }); 869 870 $('#nen1-xs').change(function(){ 871 $('#nen4-xs').val($('#nen1-xs').val()); 872 $('#nen4').val($('#nen1-xs').val()); 873 $('#nen1').val($('#nen1-xs').val()); 874 }); 875 876 loadCercadorPartial( menuActivat, cultura ); 877 878 $('.cl_imgGal').click( function(event) { 879 $target=(event.target); 880 //alert("element: "+$target.tagName); 881 if($target.tagName.toLowerCase()=="img"){ 882 var src = $target.src; 883 //alert("src: "+src); 884 var srcdesti = $(this).siblings("img").attr("src"); 885 //alert("srcdesti: "+srcdesti); 886 $(this).siblings("img").attr("src",src); 887 //$target.src = srcdesti; 888 } 889 });//click 890 891 $('.cl_enllasVeureItinerari').click( function() { 892 893 var display = $('.cl_titolItinerariSkiBus, .cl_cosItinerariSkiBus').css("display"); 894 895 if(display == "none"){ 896 $('.cl_titolItinerariSkiBus, .cl_cosItinerariSkiBus').css("display", "inline"); 897 } 898 else{ 899 $('.cl_titolItinerariSkiBus, .cl_cosItinerariSkiBus').css("display", "none"); 900 } 901 902 });//click 903 904 $('.cl_degradatVerdPetit, .cl_degradatBlauPetit2').click( function() { 905 var oncle = $(this).parent().parent().siblings("#serveis").css("display"); 906 if(oncle=="none") 907 { 908 $(this).parent().parent().siblings("#serveis").css("display","inline"); 909 $(this).parent().parent().parent().css("margin-bottom","8px"); 910 $(this).children("h2").text("ocultar"); 911 } 912 else{ 913 $(this).parent().parent().siblings("#serveis").css("display","none"); 914 $(this).parent().parent().parent().css("margin-bottom","0px"); 915 $(this).children("h2").text("Ver lo que incluye"); 916 } 917 });//click 918 919 $('#id_botoBuscaEsqui').click( function() { 920 if($("#id_cercadorEsqui").css("display")=="none" ) { 921 $('.cl_cercadorEsqui').css('border-radius', '5px 5px 0px 0px'); 922 $('#id_cercadorEsqui').css('display', 'block'); 923 } else{ 924 $('#id_cercadorEsqui').css('display', 'none'); 925 $('.cl_cercadorEsqui').css('border-radius', '5px'); 926 } 927 return false;
928 }); 929 930 $('#id_botoEnviar').click( function() { 931// if(form_principal.privacypol3.checked == false){ 932// alert("Tienes que aceptar la polÃtica de privacidad."); 933// } else { 934 if($("#formularigrups_nom").get(0).value == "" || $("#formularigrups_comments").get(0).value == "") { 935 alert('Els camps son obligatoris'); 936 return false; 937 } 938// } 939 }); 940 941 $('a.areaoffer').click( function() { 942 var area = $(this).attr('rel'); 943 var areaDescatada = $("li:parent").siblings().children("a.active").get(0).attributes.getNamedItem("rel").value; 944 //alert(areaDescatada); 945 $('a.areaoffer').removeClass('active'); 946 $('#ofertas'+areaDescatada).fadeOut('slow', function () { 947 $('#ofertas'+area).fadeIn('slow'); 948 //areaActual = area; 949 //$('a#'+idLink).removeClass('active'); 950 //$(this).removeClass('active'); 951 idLink = 'linkOffers'+area; 952 $('a#'+idLink).addClass('active'); 953 }); 954 return false; 955 }); 956 957 $('#AddSubscriberForm').submit( function() { 958 var stringData = "mail="+$('#SubscriberMail').val(); 959 if(AddSubscriberForm.privacypol.checked == false){ 960 $('#sch-error .modal-header h4').html(texto('Errors')); 961 $('#sch-error .modal-body p').html(texto('privacidad')); 962 $('#sch-error').modal("show"); 963 } else { 964 if(jQuery.trim($('#SubscriberMail').val())!="" && jQuery.trim($('#SubscriberMail').val())!='Escribe aquà tu e-mail') 965 $.ajax({url: window.location.protocol + "//" + getHostName() + "/"+cultura+"/main/addSubscriber", data: stringData, 966 beforeSend: function () { 967 $('#loading-gif').modal("show"); 968 }, 969 success: function(data){ 970 $('#loading-gif').modal("hide"); 971 var errorVector = data.split("#"); 972 $('#sch-error .modal-header h4').html(errorVector[1]); 973 $('#sch-error .modal-body p').html(errorVector[2]); 974 $('#sch-error').modal("show"); 975 }}); 976 else{ 977 $('#sch-error .modal-header h4').html(texto('Errors')); 978 $('#sch-error .modal-body p').html(texto('direccion')); 979 $('#sch-error').modal("show"); 980 } 981 } 982 return false; 983 }); 984 $('#AddSubscriberForm2').submit( function() { 985 var stringData = "mail="+$('#SubscriberMail2').val(); 986 if(AddSubscriberForm2.privacypol2.checked == false){ 987 $('#sch-error .modal-header h4').html(texto('Errors')); 988 $('#sch-error .modal-body p').html(texto('privacidad')); 989 $('#sch-error').modal("show"); 990 } else { 991 if(jQuery.trim($('#SubscriberMail2').val())!="" && jQuery.trim($('#SubscriberMail2').val())!='Escribe aquà tu e-mail') 992 $.ajax({url: window.location.protocol + "//" + getHostName() +"/"+cultura+"/main/addSubscriber", data: stringData, 993 beforeSend: function () { 994 $('#loading-gif').modal("show"); 995 }, 996 success: function(data){ 997 $('#loading-gif').modal("hide"); 998 var errorVector = data.split("#"); 999 $('#sch-error .modal-header h4').html(errorVector[1]); 1000 $('#sch-error .modal-body p').html(errorVector[2]); 1001 $('#sch-error').modal("show"); 1002 }}); 1003 else{ 1004 $('#sch-error .modal-header h4').html(texto('Errors')); 1005 $('#sch-error .modal-body p').html(texto('direccion')); 1006 $('#sch-error').modal("show"); 1007 } 1008 } 1009 return false; 1010 }); 1011 1012 //Comprobamos que buscador queremos mostrar en cada momento 1013 //dependiendo de la pestaña que clicke el usuario: 1014 $('.cl_selectorCercador').click(function() { 1015 var id = $(this).attr('id'); 1016 1017 if(id != menuActivat){ 1018 $(this).css('background-color', '#ffb400'); 1019 $(this).css('box-shadow', 'none'); 1020 $('#' + menuActivat).css('background-color', '#dddcdc'); 1021 $('#' + menuActivat).css('box-shadow', 'inset -10px 0px 5px -1px #d1d0d0'); 1022 1023 menuActivat = id; 1024 } 1025 1026 loadCercadorPartial( id, cultura ); 1027 1028 }); 1029 $('.cl_selectorCercadorResp').click(function() { 1030 var id = $(this).attr('id'); 1031 1032 if(id != menuActivat){ 1033 $(this).css('background-color', '#ffb400'); 1034 $(this).css('box-shadow', 'none'); 1035 $('#' + menuActivat).css('background-color', '#dddcdc'); 1036 $('#' + menuActivat).css('box-shadow', 'inset -10px 0px 5px -1px #d1d0d0'); 1037 1038 menuActivat = id; 1039 } 1040 1041 loadCercadorPartial( id, cultura ); 1042 1043 }); 1044 //Comprobamos que al pulsar en cualquier categorÃa se nos 1045 //deselecciona la opción "todas". 1046 $('#form_filtrar_categorias').click(function( event ) { 1047 var option = event.target; 1048 if(0 != $(option).attr('value') && true == $(option).attr('checked')){ 1049 var todasOption = $("[name='todas']"); 1050 $(todasOption).attr('checked', ''); 1051 } 1052 }); 1053 1054}); 1055 1056var OSX = { 1057 container: null, 1058 init: function () { 1059 $("#osx-modal-content").modal({ 1060 overlayId: 'osx-overlay', 1061 containerId: 'osx-container', 1062 closeHTML: null, 1063 minHeight: 80, 1064 opacity: 65, 1065 position: ['0',], 1066 overlayClose: true, 1067 onOpen: OSX.open, 1068 onClose: OSX.close 1069 }); 1070 }, 1071 open: function (d) { 1072 var self = this; 1073 self.container = d.container[0]; 1074 d.overlay.fadeIn('slow', function () { 1075 $("#osx-modal-content", self.container).show(); 1076 var title = $("#osx-modal-title", self.container); 1077 title.show(); 1078 d.container.slideDown('slow', function () { 1079 setTimeout(function () { 1080 var h = $("#osx-modal-data", self.container).height() 1081 + title.height() 1082 + 20; // padding 1083 d.container.animate( 1084 {height: h}, 1085 0, 1086 function () { 1087 $("div.close", self.container).show(); 1088 $("#osx-modal-data", self.container).show(); 1089 } 1090 ); 1091 }, 300); 1092 }); 1093 }) 1094 }, 1095 close: function (d) { 1096 var self = this;
1096 // this = SimpleModal object 1097 d.container.animate( 1098 {top:"-" + (d.container.height() + 20)}, 1099 500, 1100 function () { 1101 self.close(); // or $.modal.close(); 1102 } 1103 ); 1104 } 1105}; 1106 1107function cargarDatos(){ 1108 document.getElementById('id_loading').style.display="block"; 1109} 1110 1111/** 1112 * Cargamos el partial con la id y cultura pasadas por parámetro. 1113 */ 1114function loadCercadorPartial( id, cultura ){ 1115 $('#cercador').load(window.location.protocol + "//" + getHostName() + "/" + cultura + "/main/index",{id: id}, function(){ 1116 if("cercadorHomeHoteles" == id){ 1117 var areasOptions = $('#selectAreasOptions').val(); 1118 //var pobOptions = $('#selectPobOptions').val(); 1119 1120 $('#area').html(areasOptions); 1121 //$('#poblacio').html(pobOptions); 1122 } 1123 }); 1124} 1125 1126/** 1127 * Obtenemos el host actual en el que está corriendo la web. 1128 */ 1129function getHostName(){ 1130 var hostname = window.location.hostname; 1131 if( -1 != hostname.indexOf('192.168.1.15') ){ 1132 hostname = "192.168.1.15/webEstiber/html/frontend_dev.php"; 1133 } 1134 return hostname; 1135} 1136 1137function getPageSize() { 1138 var xScroll, yScroll; 1139 if (window.innerHeight && window.scrollMaxY) { 1140 xScroll = window.innerWidth + window.scrollMaxX; 1141 yScroll = window.innerHeight + window.scrollMaxY; 1142 } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac 1143 xScroll = document.body.scrollWidth; 1144 yScroll = document.body.scrollHeight; 1145 } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari 1146 xScroll = document.body.offsetWidth; 1147 yScroll = document.body.offsetHeight; 1148 } 1149 var windowWidth, windowHeight; 1150 if (self.innerHeight) { // all except Explorer 1151 if(document.documentElement.clientWidth){ 1152 windowWidth = document.documentElement.clientWidth; 1153 } else { 1154 windowWidth = self.innerWidth; 1155 } 1156 windowHeight = self.innerHeight; 1157 } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode 1158 windowWidth = document.documentElement.clientWidth; 1159 windowHeight = document.documentElement.clientHeight; 1160 } else if (document.body) { // other Explorers 1161 windowWidth = document.body.clientWidth; 1162 windowHeight = document.body.clientHeight; 1163 } 1164 // for small pages with total height less then height of the viewport 1165 if(yScroll < windowHeight){ 1166 pageHeight = windowHeight; 1167 } else { 1168 pageHeight = yScroll; 1169 } 1170 // for small pages with total width less then width of the viewport 1171 if(xScroll < windowWidth){ 1172 pageWidth = xScroll; 1173 } else { 1174 pageWidth = windowWidth; 1175 } 1176 arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight); 1177 return arrayPageSize; 1178} 1179 1180// navbar 1181function showNavbarDropdownMenu(id) { 1182 var menus = ["menu-esqui", "menu-balnearios", "menu-parques", "menu-aventuras", "menu-hoteles", "menu-grupos"]; 1183 1184 for (var i = 0; i < menus.length; i++) { 1185 if (menus[i] == id) { 1186 $('#'+id).removeClass('d-none') 1187 } else { 1188 $('#'+menus[i]).addClass('d-none'); 1189 } 1190 } 1191} 1192 1193$(document).ready(function() { 1194 if($(".dropdown-main-menu-navbar").length) { 1195 1196 $(".dropdown-main-menu-navbar").find('li[data-value]').each(function(index,element) { 1197 $(element).hover( 1198 function() { 1199 $('img[data-active=true]').removeAttr('data-active'); 1200 $('.rotate-180').removeClass('rotate-180'); 1201 showNavbarDropdownMenu($(this).attr('data-value')); 1202 $(this).find('img').addClass('rotate-180').attr('data-active', true); 1203 $('div[data-name="dropdown-main-navbar"]').removeClass('d-none'); 1204 }, function() { 1205 $(this).find('img').removeClass('rotate-180'); 1206 $('div[data-name="dropdown-main-navbar"]').addClass('d-none'); 1207 } 1208 ); 1209 }); 1210 1211 1212 $('[data-name="dropdown-main-navbar"]').hover( 1213 function() { 1214 $('img[data-active=true]').addClass('rotate-180'); 1215 $('div[data-name="dropdown-main-navbar"]').removeClass('d-none'); 1216 1217 }, function() { 1218 $('.rotate-180').removeClass('rotate-180'); 1219 $('img[data-active=true]').removeAttr('data-active'); 1220 $('div[data-name="dropdown-main-navbar"]').addClass('d-none'); 1221 } 1222 ); 1223 1224 $('#navbar_menu').click(function() { 1225 mostrar_menu(1) 1226 }); 1227 1228 $('#menu-lang').hover( 1229 function() { 1230 $('#menu-lang').addClass('open'); 1231 1232 }, function() { 1233 $('#menu-lang').removeClass('open'); 1234 } 1235 ); 1236 } 1237}); 1238 1239 function get_cookie(cookie_name) { 1240 var results = document.cookie.match('(^|;
1240) ?' + cookie_name + '=([^;]*)(;|$)'); 1241 1242 if (results) 1243 return (unescape(results[2])); 1244 else 1245 return null; 1246} 1247function hideCookieDiv() { 1248 if(document.getElementById('cookies')!=null){ 1249 document.getElementById('cookies').style.display = 'none'; 1250 var cookie_date = new Date ( 2017, 12, 15 ); 1251 document.cookie="CookieWarning=1; expires=" + cookie_date.toGMTString(); 1252 } 1253} 1254// end navbar 1255 1256// end navbar 1257 1258$(document).ready(function() { 1259 if($("#accordionFaq").length) { 1260 //Al pulsar el acordeon el + cambia por una x 1261 $('.collapse').on('show.bs.collapse', function () { 1262 var collapseheader = $(this).attr('aria-labelledby'); 1263 var collapseSvg = $('#'+collapseheader).find('img.rotator'); 1264 collapseSvg.removeClass('rotate-icon'); 1265 collapseSvg.addClass('rotate-iconOff'); 1266 }) 1267 $('.collapse').on('hide.bs.collapse', function () { 1268 var collapseheader = $(this).attr('aria-labelledby'); 1269 var collapseSvg = $('#'+collapseheader).find('img.rotator'); 1270 collapseSvg.addClass('rotate-icon'); 1271 collapseSvg.removeClass('rotate-iconOff'); 1272 }) 1273 } 1274});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.