PageSourceSearch

https://www.cruiseonline.com/nl-nl/assets/js/voy-all.js?v=202610071540

js cruiseonline.com collected 2026-10-07 14:57:06 UTC 23,341 bytes, 871 lines download raw bytes

1var webPath = $('#webpath').val();
2
3$(function () {
4    $('.dropdown [data-toggle="dropdown"]').on('click', function () {
5        $(this).parent().parent().toggleClass('show');
6        $(this).parent().parent().find('.dropdown-menu').toggleClass('show');
7    })
8})
9
10
11$(function () {
12
13    $('[id^="slides-"]').each(function () {
14
15        var dots = $('#dots' + $(this).attr('id'));
16        if ($(this).children().length > 1) {
17            for (var i = 0; i < $(this).children().length; i++) {
18                dots.append("<div class='dots' onclick='setSlide(this, " + i + "); return false'></div>");
19            }
20            setActiveDot($(this).attr('id'), 0)
21        }
22    })
23    $(".owl-carousel:not(.owl-carousel2):not(.owl-carousel3):not(.owl-carousel4):not(.owl-carousel5):not(.owl-carousel6):not(#choosePeriodMonth):not(#choosePeriodDay):not(#choosePeriod2):not(#instance_carousel):not(.owl-instances):not(.owl-carousel-wave):not(.owl-instance):not(.owl-carousel10):not(.owl-carousel8):not(.owl-carousel9)").owlCarousel({
24
25        loop: false,
26        rewind: false,
27        margin: 10,
28        stagePadding: 0,
29        nav: true,
30        navText: ["<span class='material-icons'>chevron_left</span> ", "<span class='material-icons'>chevron_right</span>"],
31        responsiveClass: true,
32        responsive: {
33            0: {
34                items: 1,
35                nav: false,
36            },
37            768: {
38                items: 2,
39                nav: true,
40            },
41            1000: {
42                items: 4,
43            }
44        },
45
46    });
47
48    $('.owl-instance').owlCarousel({
49        loop: false,
50        rewind: false,
51        margin: 10,
52        stagePadding: 40,
53        nav: true,
54        navText: ["<span class='material-icons'>chevron_left</span> ", "<span class='material-icons'>chevron_right</span>"],
55        responsiveClass: true,
56        responsive: {
57            0: {
58                items: 1,
59                nav: true,
60            },
61            768: {
62                items: 2,
63                nav: true,
64            },
65            992: {
66                item: 3,
67                nav: true,
68            },
69            1200: {
70                items: 4,
71            }
72        },
73
74    });
75
76    $(".owl-carousel-wave").owlCarousel({
77
78
79        autoplay: true,
80        autoplayTimeout: 2000,
81        loop: true,
82        rewind: false,
83        margin: 10,
84        stagePadding: 40,
85        autoWidth: true,
86        nav: false,
87        responsiveClass: true,
88        slideBy: 4,
89
90    });
91    var owlChoosePeriodMonth = $('#choosePeriodMonth').owlCarousel({
92        nav: true,
93        margin: 10,
94        navText: ["<span class='material-icons'>chevron_left</span> ", "<span class='material-icons'>chevron_right</span>"],
95        navClass: ['myOwl-prev', 'myOwl-next'],
96        responsive: {
97            0: {
98                items: 1,
99            },
100            1200: {
101                items: 2,
102            },
103        }
104    })
105    var owlChoosePeriodDay = $('#choosePeriodDay').owlCarousel({
106        nav: true,
107        margin: 10,
108        navText: ["<span class='material-icons'>chevron_left</span> ", "<span class='material-icons'>chevron_right</span>"],
109        navClass: ['myOwl-prev', 'myOwl-next'],
110        responsive: {
111            0: {
112                items: 1,
113            },
114            1200: {
115                items: 2,
116            },
117        }
118    })
119    var isZoom = false;
120    var owl3 = $(".owl-carousel3").owlCarousel({
121
122        loop: false,
123        rewind: false,
124        margin: 10,
125        stagePadding: 40,
126
127        nav: true,
128        navText: ["<span class='material-icons'>chevron_left</span> ", "<span class='material-icons'>chevron_right</span>"],
129        responsiveClass: true,
130        responsive: {
131            0: {
132                items: 1,
133                nav: false,
134                loop: true,
135            },
136            768: {
137                items: 2,
138                stagePadding: 0,
139                nav: true,
140            },
141            992: {
142                item: 3,
143                nav: true,
144            },
145            1200: {
146                items: 4,
147                stagePadding: 0,
148            }
149        },
150
151    });
152    var owl8 = $(".owl-carousel8").owlCarousel({
153
154        loop: false,
155        rewind: false,
156        margin: 10,
157        stagePadding: 40,
158        touchDrag: true,
159        mouseDrag: true,
160        pullDrag: true,
161        nav: false,
162        navText: ["<span class='material-icons'>chevron_left</span> ", "<span class='material-icons'>chevron_right</span>"],
163        responsiveClass: true,
164        autoWidth: true,
165
166
167    });
168    var owl9 = $(".owl-carousel9").owlCarousel({
169
170        loop: false,
171        rewind: false,
172        margin: 10,
173        stagePadding: 0,
174        touchDrag: true,
175        mouseDrag: true,
176        pullDrag: true,
177        nav: false,
178        navText: ["<span class='material-icons'>chevron_left</span> ", "<span class='material-icons'>chevron_right</span>"],
179        responsiveClass: true,
180        items: 1
181
182
183    });
184    var owl5 = $(".owl-carousel5").owlCarousel({
185
186        loop: false,
187        rewind: false,
188        margin: 10,
189        stagePadding: 40,
190
191        nav: true,
192        navText: ["<span class='material-icons'>chevron_left</span> ", "<span class='material-icons'>chevron_right</span>"],
193        responsiveClass: true,
194        responsive: {
195            0: {
196                items: 1,
197                nav: false
198            },
199            768: {
200                items: 2,
201                nav: true,
202            },
203            992: {
204                item: 3,
205                nav: true,
206            },
207            1200: {
208                items: 4,
209                stagePadding: 0,
210            }
211        },
212
213    });
214    var owl6 = $(".owl-carousel6").owlCarousel({
215
216        loop: false,
217        rewind: false,
218        margin: 10,
219        stagePadding: 40,
220        autoWidth: true,
221        nav: false,
222        responsiveClass: true,
223    });
224
225    var owl_instances = $(".owl-instances").owlCarousel({
226
227        loop: false,
228        rewind: false,
229        margin: 10,
230        stagePadding: 40,
231        autoWidth: true,
232        nav: false,
233        responsiveClass: true,
234        autoplay: true,
235        autoplaySpeed: 2000,
236    });
237
238
239    $('.owl-carousel3.resizeonclick').click(function (e) {
240
241
242        if (!$(e.target).hasClass('videobox')) {
243            var carouselData = owl3.data();
244            var carouselOptions = carouselData['owl.carousel'].options;
245
246            carouselOptions.stagePadding = carouselOptions.stagePadding === 40 ? 5 : 40;
247            owl3.trigger('refresh.owl.carousel');
248            $('.owl-carousel3.resizeonclick').toggleClass('zoomed')
249        } else {
250            $('.owl-carousel3.resizeonclick').removeClass('zoomed')
251        }
252
253    })
254
255    $(".videoModalEvent").on('hide.bs.modal shown.bs.modal', function (event) {
256        var target = $(event.target);
257        var type = event.type;
258        var video = target.find("video")[0];
259        var iframe = target.find("iframe")[0];
260
261        if (type === 'shown') {
262            if (video) {
263                video.play();
264            } else if (iframe) {
265                iframe.contentWindow.postMessage(
266                    '{"event":"command","func":"playVideo","args":""}',
267                    "*"
268                );
269            }
270        } else if (type === 'hide') {
271            if (video) {
272                video.pause();
273            } else if (iframe) {
274                iframe.contentWindow.postMessage(
275                    '{"event":"command","func":"pauseVideo","args":""}',
276                    "*"
277                );
278            }
279        }
280    });
281
282
283    $(".owl-carousel4").owlCarousel({
284
285        loop: false,
286        rewind: false,
287        margin: 10,
288        stagePadding: 0,
289
290        nav: true,
291        navText: ["<span class='material-icons'>chevron_left</span> ", "<span class='material-icons'>chevron_right</span>"],
292        responsiveClass: true,
293        responsive: {
294            0: {
295                items: 1,
296                nav: false,
297                stagePadding: 40,
298            },
299            768: {
300                items: 2,
301                nav: true,
302            },
303            1000: {
304                items: 4,
305            }
306        },
307
308    });
309
310    var owl = $(".owl-carousel2").owlCarousel({
311
312        loop: false,
313        rewind: true,
314        nav: true,
315        navText: ["<span class='material-icons'>chevron_left</span> ", "<span class='material-icons'>chevron_right</span>"],
316        responsiveClass: true,
317        responsive: {
318            0: {
319                items: 1,
320            }
321        },
322        onInitialized: function (elem) {
323            $('.owl-carousel2').find(".owl-item").each(function (e, el) {
324
325                var src = $(el).find("img").attr('src');
326                // $(el).css('background-image', 'url(' + src + ')');
327            })
328
329        }
330    });
331    /*keyboard navigation*/
332    $(document.documentElement).keyup(function (event) {
333        if (event.keyCode === 37) { /*left key*/
334            owl.trigger('prev.owl.carousel', [700]);
335        } else if (event.keyCode === 39) { /*right key*/
336            owl.trigger('next.owl.carousel', [700]);
337        }
338    });
339});
340
341
342function setActiveDot(slide, index) {
343    var dots = $('#dots' + slide);
344    dots.children().removeClass('isactive')
345    dots.children().eq(index).addClass('isactive')
346
347    if (index !== 0) {
348        dots.parent().find('.slideButton').show();
349    }
350
351}
352
353function setSlide(el, i) {
354    var slider = $(el).parent().attr('id').substr(4);
355    var slide = slider.substr(7);
356    slider = $('#' + slider);
357    slider.children().hide();
358    slider.children().eq(i).show();
359
360
361    currentSlides[slide] = slider.children().eq(i)
362
363    setActiveDot(slider.attr('id'), i);
364}
365
366var currentSlides = [];
367
368function slideNext(slide) {
369
370    var selector = 'img';
371
372
373    var slideEl = $('#slides-' + slide)
374
375
376    if (slideEl.find('picture').length > 0) {
377        selector = 'picture';
378    }
379
380    if (slideEl.find('video').length > 0) {
381        slideEl.find('video')[0].load();
382    }
383
384    if (!currentSlides[slide]) {
385        var currentEl = slideEl.find(selector).first()
386    } else {
387        var currentEl = currentSlides[slide];
388    }
389    if (currentEl.hasClass('bigimage-hide')) {
390        currentEl = currentEl.parent();
391    }
392
393    currentEl.hide()
394    currentEl.next().show()
395    currentSlides[slide] = currentEl.next()
396
397
398    if (!slideEl.find(selector + ':visible').length) {
399        currentEl.hide()
400        var nextSlideEl = slideEl.find(selector).first();
401        if (nextSlideEl.hasClass('bigimage-hide')) {
402            nextSlideEl = nextSlideEl.parent();
403        }
404        nextSlideEl.show()
405        currentSlides[slide] = nextSlideEl
406    }
407    setActiveDot(slideEl.attr('id'), currentSlides[slide].index());
408
409
410}
411
412function slideBack(slide) {
413
414    var selector = 'img';
415
416    var slideEl = $('#slides-' + slide)
417
418    if (slideEl.find('picture').length > 0) {
419        selector = 'picture';
420    }
421
422    if (slideEl.find('video').length > 0) {
423        slideEl.find('video')[0].load();
424    }
425
426    if (!currentSlides[slide]) {
427        var currentEl = slideEl.find(selector).first()
428    } else {
429        var currentEl = currentSlides[slide];
430    }
431
432    if (currentEl.hasClass('bigimage-hide')) {
433        currentEl = currentEl.parent();
434    }
435
436    currentEl.hide()
437    currentEl.prev().show()
438    console.log(currentEl.prev());
439    console.log(currentSlides);
440    currentSlides[slide] = currentEl.prev()
441
442
443    if (!slideEl.find(selector + ':visible').length) {
444        currentEl.hide()
445        var lastSlideEl = slideEl.find(selector).last();
446        if (lastSlideEl.hasClass('bigimage-hide')) {
447            lastSlideEl = lastSlideEl.parent();
448        }
449        lastSlideEl.show()
450
451        currentSlides[slide] = lastSlideEl;
452    }
453    setActiveDot(slideEl.attr('id'), currentSlides[slide].index());
454
455
456}
457
458function toggleShow(el) {
459    $('.popupbox .card-body').hide()
460    $('.overlaybox').show()
461    $('#' + el).show();
462}
463
464$('.overlaybox, h2 .close, .overlaybox, .oldh2 .close, .overlaybox, .confirmpopup button').click(function () {
465    $('.overlaybox').hide()
466    $('.popupbox .card-body').hide()
467})
468
469$('.footer_bottomBox .h5.clickit').click(function () {
470
471    $(this).parent().find('ul').toggleClass('d-none')
472
473})
474
475
476$('#stickynav').on('click', '.toggle-mobile', function () {
477    if ($(window).width() < 992) {
478        $(this).parent().find('.hide-on-mobile').slideToggle();
479        $(this).toggleClass('arrow-up');
480    }
481})
482
483$(function () {
484    $('.popupbox').on('click', 'input', function () {
485        setHomepageSearch(this);
486    })
487    setTimeout(function () {
488        setHomepageSearch($('#dest-0'), false)
489    }, 300)
490
491    if($('#instance_carousel').length > 0) {
492        setShipCarousel();
493
494    }
495
496})
497var originalShip = false;
498var owlChooseInstance = false;
499
500function destroyShipCarousel() {
501
502    if(owlChooseInstance) {
503        $('#instance_carousel').trigger('destroy.owl.carousel').removeClass('owl-loaded');
504        $('#instance_carousel').find('.owl-stage-outer').children().unwrap();
505    }
506
507    $('#instance_carousel').html(originalShip);
508
509}
510function setShipCarousel () {
511
512    if(!originalShip) {
513        originalShip = $('#instance_carousel').html();
514    }
515
516    var i = 1;
517    var newHtml = '';
518    $('#instance_carousel .instance-box:not(.i-am-hidden)').each(function() {
519        if(i === 1) {
520            newHtml += '<div class="d-flex flex-row" style="max-width: 100%;flex-wrap: wrap;">'
521        }
522
523        newHtml += $(this)[0].outerHTML;
524
525        if(i === 16) {
526            newHtml += '</div>';
527            i = 0;
528        }
529        i++;
530    });
531
532    if (i !== 1) {
533        newHtml += '</div>'
534    }
535
536    $('#instance_carousel').html(newHtml);
537
538
539    owlChooseInstance = $('#instance_carousel').owlCarousel({
540        nav: true,
541        margin: 10,
542        navText: ["<span class='material-icons'>chevron_left</span> ", "<span class='material-icons'>chevron_right</span>"],
543        navClass: ['myOwl-prev', 'myOwl-next'],
544        slideBy: 'page',
545        responsive: {
546            0: {
547                items: 1,
548            },
549            1200: {
550                items: 1,
551            },
552        }
553    })
554
555    owlChooseInstance.trigger('refresh.owl.carousel');
556    owlChooseInstance.trigger('to.owl.carousel', 0);
557
558
559}
560
561function setHomepageSearch(self, click = true) {
562    if (click) {
563        if ($(self).attr('value') !== '0') {
564            $(self).closest('.card-body').find('input[value=0]').prop('checked', false)
565        } else {
566            $(self).closest('.card-body').find('input:not(input[value=0])').prop('checked', false)
567        }
568    }
569
570    var val = [];
571    var ids = [];
572    var target = $(self).attr('data-target');
573
574    $(self).closest('.card-body').find('input:checked').each(function () {
575        const elm = $(this);
576
577        val.push(elm.attr('value'))
578        ids.push(elm.attr('data-id'))
579    });
580
581    $(self).closest('.card-body').find('input:checked').each(function () {
582        if ($(this).attr('value') === '0') {
583            val = [];
584            ids = [];
585        }
586    });
587
588    $('#' + target).val(val.join(', '));
589    $('#' + target + '-hidden').val(ids.join(', '));
590
591    if ($(self).data('target') === 'inputDestination') {
592        $.ajax({
593            type: 'GET',
594            url: webPath + '/api/search.php?action=availableDatesByRegion&region=' + ids.join(','),
595            success: function (data) {
596                const json = JSON.parse(data);
597
598                $('#datetime .flexrow input').each(function () {
599                    if (this.type !== "checkbox") return
600                    $(this).removeClass('notAvailable')
601                    const day = $(this).data("minday").substring(0, 7).trimEnd();
602
603                    const available = json.some((date) => date === day)
604                    if (available) return
605
606                    $(this).addClass('notAvailable')
607                })
608            },
609        })
610    }
611
612    // if($(self).length > 0) {
613    //     ids = $.grep(ids, n => n === 0 || n);
614    //     $.ajax({
615    //         type: 'GET',
616    //         url: webPath + '/api/search.php?action=availableCountByHomepage&region=' + ids.join(',') + '&startdate=' + $('#begindatum2').val() + '&enddate=' + $('#einddatum').val(),
617    //         success: function (data) {
618    //
619    //             $('#totalCruises').html(parseInt(data));
620    //         },
621    //     })
622    // }
623
624
625}
626
627function getBestSellingThemas() {
628
629    if ($('#best_selling_themas').length > 0) {
630        $.ajax({
631            type: 'GET',
632            url: webPath + '/api/search.php?action=bestSellingThemasHTML',
633            success: function (data) {
634
635                $('#best_selling_themas').html(data);
636            },
637        })
638
639
640    }
641}
642
643function getBestSellingRegions() {
644
645    if ($('#best_selling_regions').length > 0) {
646        $.ajax({
647            type: 'GET',
648            url: webPath + '/api/search.php?action=bestSellingRegionsHTML',
649            success: function (data) {
650
651                $('#best_selling_regions').html(data);
652            },
653        })
654
655
656    }
657
658}
659
660function getBestSellingCategories() {
661    if($('#best_selling_categories').length > 0) {
662        $.ajax({
663            type: 'GET',
664            url: webPath + '/api/search.php?action=bestSellingCategoriesHTML',
665            success: function (data) {
666                $('#best_selling_categories').html(data);
667            },
668        })
669    }
670}
671
672function getLowestPrice() {
673
674    var data = {};
675
676    if ($('#clearCacheFirst').val() == 'true') {
677        data = {'clearCacheFirst': 'true'}
678        $('#clearCacheFirst').val('false');
679    }
680
681    if ($('#promo').length > 0) {
682        $.ajax({
683            type: 'GET',
684            data: data,
685            url: webPath + '/api/search.php?action=lowestPriceHTML',
686            success: function (data) {
687
688                $('#promo').html(data);
689            }
690        })
691    }
692}
693
694$(function () {
695
696    $('.mapbox .map').each(function () {
697        var id = $(this).attr('data-active');
698        if (id !== undefined) {
699            console.log($('#' + id));
700            $('#' + id).attr("class", "pathcol activeMap");
701        }
702    });
703
704    $('.mapbox').on('click', '.map svg .pathcol', function () {
705        if ($(this).attr('id') !== undefined) {
706            var value = $('input[name=' + $(this).attr('id').toLowerCase() + ']').data('url')
707            if (value !== undefined) {
708                location.href = value;
709            }
710
711        }
712    });
713    $('.mapbox').on('mouseenter', '.map svg .pathcol', function () {
714
715        $('#label-' + $(this).attr('id').toLowerCase()).show();
716
717    });
718
719    $('.mapbox').on('mouseleave', '.map svg .pathcol', function () {
720
721        $('#label-' + $(this).attr('id').toLowerCase()).hide();
722
723    });
724
725    $('.mapbox .map svg').children().each(function () {
726
727        if ($(this).attr('id') !== undefined) {
728            var value = $('input[name=' + $(this).attr('id').toLowerCase() + ']').val()
729            if (value !== undefined) {
730                var bbbox = $(this)[0].getBBox();
731
732                var svg = document.querySelector('.mapbox .map svg');
733                var box = svg.getAttribute('viewBox');
734                var splitbox = box.split(/\s+|,/);
735
736                var fontsize = 20 / $('.mapbox .map svg').width() * splitbox[2];
737
738                $('<div style="left:' + Math.round($(this).offset().left) + 'px;
738 top:' + Math.round($(this).offset().top) + 'px;" class="svglabel" id="label-' + $(this).attr('id').toLowerCase() + '">' + value + '</div>').insertAfter($('.mapbox .map'));
739
740            }
741
742        }
743
744        if ($(this).attr('id') !== undefined) {
745            var value2 = $('input[name=' + $(this).attr('id').toLowerCase() + ']').val();
746            console.log(value2);
747            if (value2 === undefined) {
748                $(this).addClass('noCountry');
749                $(this).attr("class", "pathcol noCountry");
750
751            }
752        } else {
753            $(this).attr("class", "pathcol noCountry");
754        }
755
756
757    });
758
759    if (document.getElementById("redraw")) {
760        document.getElementById("redraw").innerHTML += '';
761    }
762
763    $('[data-toggle="tooltip"]').bstooltip()
764
765    getBestSellingRegions();
766    getBestSellingCategories();
767    getBestSellingThemas();
768    getLowestPrice();
769
770    $('button[type=submit]:not(.no-loader)').on('click', function() {
771        var form = $(this).closest('form');
772        if (form.length > 0 && form[0].checkValidity && !form[0].checkValidity()) {
773            return;
774        }
775        var width = $(this).width();
776        $(this).html('<span class="text-white mi-spin material-icons">progress_activity</span>')
777        $(this).width(width);
778    })
779
780
781})
782
783$(document).mouseup(function (e) {
784
785    var menuContainer = $("#navbarSupportedContent");
786
787    // if the target of the click isn't the container nor a descendant of the container
788    if (!menuContainer.is(e.target) && menuContainer.has(e.target).length === 0 && $('#navbarSupportedContent').hasClass('show') && !$('#changeCountryModal').hasClass('show') && !$('.modal').hasClass('show')) {
789        $('#navbarSupportedContent .navbar-toggler').click();
790    }
791
792});
793
794function handleImageError(x) {
795    console.log($(x));
796    x.onerror = null;
797    $(x).parent().find('source').remove();
798    x.src = $(x).data('on-error');
799
800}
801
802function openOrInstallApp() {
803    var iosUrl = 'https://apps.apple.com/nl/app/cruiseonline-boek-jouw-cruise/id6748603618';
804    var androidUrl = 'https://play.google.com/store/apps/details?id=com.cruiseonline.cruiseonline';
805    var launchUrl = 'cruiseonline://cruiseonline/home';
806
807    const userAgent = navigator.userAgent || navigator.vendor || window.opera;
808    let storeLink;
809
810    if (/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) {
811        storeLink = iosUrl;
812    } else if (/android/i.test(userAgent)) {
813        storeLink = androidUrl;
814    }
815
816    dataLayer.push({
817        'event': 'downloadApp'
818    });
819
820    if (storeLink) {
821        setTimeout(() => {
822            window.location.href = storeLink;
823        }, 100);
824    }
825
826    window.location.href = launchUrl;
827
828
829}
830
831function hideAppBar() {
832    var date = new Date();
833    date.setTime(date.getTime() + (1500 * 60 * 1000));
834    var expires = "; expires=" + date.toGMTString();
835    document.cookie = "hideAppBar=" + favoriteProducts.join(',') + expires + ";  path=/";
836
837
838    $('#appBar').slideUp();
839}
840
841function preventTranslation() {
842    const divs = document.querySelectorAll('span.material-icons:not([translate="no"]), .price span:not([translate="no"])');
843    divs.forEach(div => {
844        div.setAttribute('translate', 'no');
845    });
846}
847
848document.addEventListener('DOMContentLoaded', () => {
849    preventTranslation();
850
851    const observer = new MutationObserver((mutationsList, observer) => {
852        preventTranslation();
853    });
854
855    observer.observe(document.body, {
856        childList: true,
857        subtree: true
858    });
859});
860
861var urlParams = new URLSearchParams(window.location.search);
862var affiliate = urlParams.get('utm_source') === 'daisycon';
863
864if (affiliate) {
865    const date = new Date();
866    date.setTime(date.getTime() + (30 * 24 * 60 * 60 * 1000));
867    document.cookie = "is_affiliate=true; expires=" + date.toUTCString() + "; path=/";
868}
869function isAffiliate() {
870    return document.cookie.includes("is_affiliate=");
871}

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.