PageSourceSearch

https://www.quoinmobiliaria.com/js/modulos/slider/slider.js?x=20260923140215

js quoinmobiliaria.com collected 2026-09-27 05:50:59 UTC 3,936 bytes, 125 lines download raw bytes

1$(document).ready(function(){
2
3    $('#slider-estrella-felchas a').on('click', function(){
4
5        event.preventDefault();
6
7        var $obj = $(this);
8        var numDestacados = listados.destacadosestrella.length - 1;
9        var siguiente;
10
11        if($obj.hasClass('flecha2-previous')) {
12            if(destacadosestrellaActual == 1)
13                siguiente =  numDestacados;
14            else
15                siguiente = destacadosestrellaActual - 1;
16
17        }else if($obj.hasClass('flecha2-next')) {
18            if(destacadosestrellaActual >= numDestacados)
19                siguiente =  1;
20            else
21                siguiente = destacadosestrellaActual + 1;
22        }else {
23            return false;
24        }
25
26        if(typeof listados.destacadosestrella[siguiente] == 'undefined') return false;
27
28        rellenaDestacadoEstrella(siguiente);
29
30        destacadosestrellaActual = siguiente;
31
32
33    });
34});
35
36
37function rellenaDestacadoEstrella(indice)
38{
39
40    var datos = listados.destacadosestrella[indice];
41
42    var $objPadre = $('#slider-bloque-estrella');
43
44    $objPadre.find('article.propiedad').attr('onclick', 'window.location.href = "' + datos.urlfichaauto + '"');
45    $objPadre.find('.titulo1').html(datos.tituloauto);
46    $objPadre.find('.precio1').html(datos.precioauto);
47    $objPadre.find('.ref').html(datos.ref);
48    $objPadre.find('.habitaciones').html(datos.total_hab);
49    $objPadre.find('.banyos').html(datos.banyos);
50    $objPadre.find('.superficie').html(datos.superficieauto);
51    var $foto = $objPadre.find('.fotopropiedad');
52    $foto.css('background-image', 'url(' + datos.fotoprincipalauto + ')')
53        .attr('indice', indice);
54
55    // Marca de agua "Generada por IA"
56    var esIA = datos.fotoprincipal_generada_ia === '1';
57    // Fallback: comprobar fotos_generadas_ia para la foto 1
58    if (!esIA && datos.fotos_generadas_ia && datos.fotos_generadas_ia['1']) {
59        esIA = true;
60    }
61    if (esIA) {
62        $foto.addClass('generada-ia');
63        if (typeof ajustarPosicionMarcaIA === 'function') {
64            ajustarPosicionMarcaIA($foto);
65        }
66    } else {
67        $foto.removeClass('generada-ia');
68    }
69
70    if(datos.numfotos > 0) {
71        $objPadre.find('article.propiedad').removeClass('nofoto')
72    }else{
73        $objPadre.find('article.propiedad').addClass('nofoto')
74    }
75
76}
77
78
79var PosSlider=-3;
80var SaltaSlider=false;
81
82function DestacadoCabecera(pos) {
83    document.getElementById('slider-textoEstrella').innerHTML=imagesCab[pos+1];
84    document.getElementById('slider-textoEstrella').setAttribute("posslider",pos);
85    $(".contenedorDatosSliderDestacado").on("click",function(){window.location.assign(imagesCab[pos+2]);})
86}
87
88function SliderCabecera(pos){
89
90    if(imagesCab.length < 1) return;
91
92    PosSlider=PosSlider+3;
93
94    if (PosSlider >= imagesCab.length) {PosSlider = 0;pos= 0;}
95
96    if (pos!=null) {
97        PosSlider=pos;
98        SaltaSlider=false;
99        if (PosSlider<0) PosSlider=imagesCab.length-3;
100    }
101    if (SaltaSlider==false)  {
102        $("#img1").fadeOut("slow", function () {
103            let backgroundImage =  imagesCab[PosSlider].replace('_*.','_'+letraFoto+'.');
104            backgroundImage = backgroundImage.replace(/(\d+-\d+)s(\.jpg)/, '$1$2');
105
106            $(this).css("background-image",`url('${backgroundImage}')`);
107            $(this).fadeIn("slow"); DestacadoCabecera(PosSlider);
108        });
109    } else {
110        SaltaSlider=false;
111        PosSlider=PosSlider-3;
112    }
113    if (pos!=null) SaltaSlider=true; //para que se espere una transaccion mas
114}
115
116SliderCabecera(0);
117
118if (imagesCab.length>3) {
119    setInterval(function() { SliderCabecera(); },4000);
120} else {
121    if (document.querySelector(".modulo-slider .slider-botonAnterior") != null) {
122        document.querySelector(".modulo-slider .slider-botonAnterior").style.display = "none";
123        document.querySelector(".modulo-slider .slider-botonSiguiente").style.display = "none";
124    }
125}

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.