PageSourceSearch

https://www.mirabilandia.it/etc.clientlibs/parques-reunidos-catalo…-2ff298038e9f71a152b33f717eebae99-lc.min.js

js mirabilandia.it collected 2026-10-01 13:07:34 UTC 6,695 bytes, 182 lines download raw bytes

1$(document).ready(function () {
2
3    if($("#showHeroBanner").val() && $('.bannerHero').length && $('.cc56_countdown').length){
4        $('.cc56_countdown').addClass("countdownHero");
5        $('.cc56_countdown').addClass("d-none");
6        
7        setTimeout(function(){ 
8             // Obtén el elemento con la clase 'cc56_countdown' y su contenido HTML
9        var countdownElement = $('.cc65_navigation_menu_top .countdownHero');
10
11        // Mueve el elemento y su contenido al final del contenido de la clase 'bannerHero-text'
12            $('.bannerHero-text').append(countdownElement); 
13
14            $('.cc65_navigation_menu_top .countdownHero').remove();
15            $('.cc56_countdown').removeClass("d-none");
16        }, -1);
17
18    }
19
20
21    setTimeout(function(){ 
22        
23        if($('meta[name="template"]').attr('content') != "microsites"){
24            if(sessionStorage.getItem("closePagesCountdown")){
25               $('.cc56_countdown').addClass("d-none");
26            }
27        }else{
28            if(sessionStorage.getItem("closeMicroCountdown")){
29               $('.cc56_countdown').addClass("d-none");
30            }
31        }
32        
33   }, -1);
34
35    
36    
37
38    /*const stickyCountdown = $("#stickyCountdown").val();
39    if(stickyCountdown == "disabled" && localStorage.getItem("countdownClosed") != null){
40        $('.cc56_countdown').css({
41            'height':'0px',
42            'padding':'0px',
43            'opacity':'0'
44        });
45    }*/
46
47    let dateCount = $('#dateCountDown').val();
48    dateCount = dateCount.trim();
49    const dateCont = new Date(dateCount);
50    const dateNow = new Date();
51
52    if (dateCont >= dateNow) {
53        $('.cc56_countdown').show();
54    
55        //click in icon close
56        $('.cc56_countdown .closing-desktop i, .icon-remove, .closing-mobile i').click(function (e) {
57            e.preventDefault();
58            $('.cc56_countdown').css({
59                'height':'0px',
60                'padding':'0px',
61                'opacity':'0'
62            });
63           /* const stickyCountdown = $("#stickyCountdown").val();
64            if(stickyCountdown == "disabled"){
65                localStorage.setItem("countdownClosed", "closed");
66            }else{
67                if(localStorage.getItem("countdownClosed") != null){
68                    localStorage.removeItem("countdownClosed");
69                }
70            }*/
71            
72            if ($(window).width() > 1024) {
73                $('.sticky-widget').css('top', '560px');
74            }
75
76            if($('meta[name="template"]').attr('content') != "microsites"){
77                sessionStorage.setItem("closePagesCountdown", "closed");
78            }else{
79                sessionStorage.setItem("closeMicroCountdown", "closed");
80            }
81            
82
83        });
84        //Fix for Safari
85
86        // Set the date we're counting down to
87        const countDownDate = parseInt(dateCont.getTime());
88
89        // Update the count down every 1 second
90        const x = setInterval(function () {
91            const now = parseInt(new Date().getTime());
92
93            // Find the distance between now and the count down date
94            const distance = countDownDate - now;
95
96            // Time calculations for days, hours, minutes and seconds
97            let days = parseInt(Math.floor(distance / (1000 * 60 * 60 * 24)));
98            if (days < 9) {
99                days = '0' + days
100            }
101            let hours = parseInt(Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)));
102            if (hours < 9) {
103                hours = '0' + hours
104            }
105            let minutes = parseInt(Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)));
106            if (minutes < 9) {
107                minutes = '0' + minutes
108            }
109            let seconds = parseInt(Math.floor((distance % (1000 * 60)) / 1000));
110            if (seconds < 9) {
111                seconds = '0' + seconds
112            }
113            const dayText = $('#days').val();
114            const hoursText = $('#hours').val();
115            const minutesText = $('#minutes').val();
116            const secondsText = $('#seconds').val();
117
118            // Output the result in an element with id="countdown"
119            $('#countdown').html('<div class="days"><span class="number">'+days+'</span><span class="text">'+dayText+'</span></div><span class="divider">:</span><div class="hours"><span class="number">'+hours+'</span><span class="text">'+hoursText+'</span></div><span class="divider">:</span><div class="minutes"><span class="number">'+minutes+'</span><span class="text">'+minutesText+'</span></div><span class="divider">:</span><div class="seconds"><span class="number">'+seconds+'</span><span class="text">'+secondsText+'</span></div>');
120            
121            // If the count down is over, write some text or hide countdown
122            if (distance <= 0) {
123                clearInterval(x);
124                //$('#countdown').html('Expired')
125                $('.cc56_countdown').hide();
126            }
127        }, 1000);
128    }
129
130    // Analytics for Countdown Banner links
131    $('.cc56_countdown a').click(function(e){
132        var linkHref = $(this).attr('href');
133        var ogTitle = $('meta[property="og:title"]').attr('content') || document.title;
134        var urlModulDis = window.location.href;
135        dataLayer.push({
136            'event': 'eventga',
137            'category': 'Interaccion',
138            'action': 'Click CountDown Banner link',
139            'slidername': ogTitle,
140            'label': linkHref,
141            'urlmodule': urlModulDis
142        });
143    });
144});
145
146function formatDateTime(timeZone){
147
148    const options = {
149        weekday: 'short',
150        year: 'numeric',
151        month: 'short',
152        day: 'numeric',
153        hour: '2-digit',
154        minute: '2-digit',
155        second: '2-digit',
156        timeZoneName: 'short',
157      };
158    
159      return date.toLocaleString('en-US', options);
160}
161
162$(window).bind('load', function (e) {
163    var heigthCounty;
164    setTimeout(function() {
165        var heigthCounty = $('.cc56_countdown')[0].clientHeight;
166        var heigthCountB = $('.cc56_countdown').height();
167        if($(window).width()> 1024) {
168            //$('.cc56_countdown').css('height',heigthCounty);
169        }else {
170            //$('.cc56_countdown').css('height',heigthCounty);
171        }
172    }, 1001);
173    //Colocando clases dependiendo del header
174    var tabs = $('.header .tabs .type-parque').length;
175    var tabsDesktop = $('.header .section-contact .type-parque').length;
176    if(tabs > 0) {
177        $('.cc01_banner .bannerHero').addClass('conTabs');
178    }
179    if(tabsDesktop > 0) {
180        $('.cc01_banner .bannerHero').addClass('conTabsDesktop');
181    }
182});

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.