PageSourceSearch

https://www.yfeskythnos.com/wp-content/themes/twentytwenty-child/assets/js/core.js?ver=2.0

js yfeskythnos.com collected 2026-10-05 04:53:46 UTC 14,113 bytes, 455 lines download raw bytes

1function addBullet(cx, cy, cz, target, direction) {
2    let x = cx - cz,
3        y = cy - cz,
4        popupWidth = $(target).width(),
5        endX = direction == 'right' ? (cx + 220) : (cx - (220 + popupWidth)),
6        endY = (cy - 80),
7        innerBulletSize = (cz + (cz/3)),
8        outerBulletSize = (2 * cz);
9
10    $('#line').find('line').attr({
11        'x1' : cx,
12        'y1' : cy,
13        'x2' : direction == 'right' ? endX : endX + popupWidth,
14        'y2' : endY
15    });
16
17    $('#bullet').css({
18        'left': (x + (cz/3)) + 'px',
19        'top': (y + (cz/3)) + 'px',
20        'width': innerBulletSize + 'px',
21        'height': innerBulletSize + 'px'
22    });
23
24    $('#bullet-shadow').css({
25        'left': x + 'px',
26        'top': y + 'px',
27        'width': outerBulletSize + 'px',
28        'height': outerBulletSize + 'px'
29    });
30    $(target).css({
31        'left': endX + 'px',
32        'top': endY + 'px'
33    });
34    $(target).find('.bullet_small.right').css({
35        'width': innerBulletSize + 'px',
36        'height': innerBulletSize + 'px',
37        'left' : -(innerBulletSize/2) + 'px',
38        'top' : -(innerBulletSize/2) + 'px'
39    });
40    $(target).find('.bullet_big.right').css({
41        'width': outerBulletSize + 'px',
42        'height': outerBulletSize + 'px',
43        'left' : -(outerBulletSize/2) + 'px',
44        'top' : -(outerBulletSize/2) + 'px'
45    });
46    $(target).find('.bullet_small.left').css({
47        'width': innerBulletSize + 'px',
48        'height': innerBulletSize + 'px',
49        'right' : -(innerBulletSize/2) + 'px',
50        'top' : -(innerBulletSize/2) + 'px'
51    });
52    $(target).find('.bullet_big.left').css({
53        'width': outerBulletSize + 'px',
54        'height': outerBulletSize + 'px',
55        'right' : -(outerBulletSize/2) + 'px',
56        'top' : -(outerBulletSize/2) + 'px'
57    });
58
59
60}
61
62function addBulletMobile(cx, cy, cz, target, directionX, directionY) {
63    let x = cx - cz,
64        y = cy - cz,
65        endX,
66        endY,
67        popupWidth = $(target).width(),
68        popupHeight = $(target).height(),
69        // endX = directionX == 'right' ? (cx + 220) : (cx - (220 + popupWidth)),
70        // endY = (cy - 80),
71        innerBulletSize = (cz + (cz/3)),
72        outerBulletSize = (2 * cz);
73
74
75    if(directionY == 'top' && directionX == 'right') {
76        endX = cx - 30;
77        endY = cy - 150;
78    } else if(directionY == 'top' && directionX == 'left') {
79        endX = cx + 50;
80        endY = cy - 280;
81    } else if(directionY == 'bottom' && directionX == 'right') {
82        endX = cx - 50;
83        endY = cy + 150;
84    } else if (directionY == 'bottom' && directionX == 'left') {
85        endX = cx + 50;
86        endY = cy + 150;
87    }
88
89    $('#line').find('line').attr({
90        'x1' : cx,
91        'y1' : cy,
92        'x2' : endX,
93        'y2' : endY
94    });
95
96    $('#bullet').css({
97        'left': (x + (cz/3)) + 'px',
98        'top': (y + (cz/3)) + 'px',
99        'width': innerBulletSize + 'px',
100        'height': innerBulletSize + 'px'
101    });
102
103    $('#bullet-shadow').css({
104        'left': x + 'px',
105        'top': y + 'px',
106        'width': outerBulletSize + 'px',
107        'height': outerBulletSize + 'px'
108    });
109
110    $(target).css({
111        'left': directionY == 'top' && directionX == 'right' ? endX - popupWidth : endX + 'px',
112        'top': directionY == 'top' ? endY - popupHeight : endY + 'px'
113    });
114
115    $(target).find('.bullet_small.right.top').css({
116        'width': innerBulletSize + 'px',
117        'height': innerBulletSize + 'px',
118        'right' : -(innerBulletSize/2) + 'px',
119        'bottom' : -(innerBulletSize/2) + 'px'
120    });
121
122    $(target).find('.bullet_big.right.top').css({
123        'width': outerBulletSize + 'px',
124        'height': outerBulletSize + 'px',
125        'right' : -(outerBulletSize/2) + 'px',
126        'bottom' : -(outerBulletSize/2) + 'px'
127    });
128    $(target).find('.bullet_small.right.bottom').css({
129        'width': innerBulletSize + 'px',
130        'height': innerBulletSize + 'px',
131        'left' : -(innerBulletSize/2) + 'px',
132        'top' : -(innerBulletSize/2) + 'px'
133    });
134    $(target).find('.bullet_big.right.bottom').css({
135        'width': outerBulletSize + 'px',
136        'height': outerBulletSize + 'px',
137        'left' : -(outerBulletSize/2) + 'px',
138        'top' : -(outerBulletSize/2) + 'px'
139    });
140    $(target).find('.bullet_small.left.bottom').css({
141        'width': innerBulletSize + 'px',
142        'height': innerBulletSize + 'px',
143        'left' : -(innerBulletSize/2) + 'px',
144        'top' : -(innerBulletSize/2) + 'px'
145    });
146    $(target).find('.bullet_big.left.bottom').css({
147        'width': outerBulletSize + 'px',
148        'height': outerBulletSize + 'px',
149        'left' : -(outerBulletSize/2) + 'px',
150        'top' : -(outerBulletSize/2) + 'px'
151    });
152
153    $(target).find('.bullet_small.left.top').css({
154        'width': innerBulletSize + 'px',
155        'height': innerBulletSize + 'px',
156        'left' : -(innerBulletSize/2) + 'px',
157        'bottom' : -(innerBulletSize/2) + 'px'
158    });
159    $(target).find('.bullet_big.left.top').css({
160        'width': outerBulletSize + 'px',
161        'height': outerBulletSize + 'px',
162        'left' : -(outerBulletSize/2) + 'px',
163        'bottom' : -(outerBulletSize/2) + 'px'
164    });
165}
166
167function sliderNavigationPosition() {
168
169    let kythnosSlider = $('#kythnos-slider'),
170        sliderImageHeight = kythnosSlider.find('.card').height();
171
172    kythnosSlider.find('button.slick-arrow').css({
173        'top': 'calc(' + sliderImageHeight/2 + 'px + 1.25rem)'
174    });
175    kythnosSlider.find('.slick-dots').css({
176        'top': 'calc(' + sliderImageHeight + 'px - 3rem)'
177    });
178
179}
180
181$(document).ready(function () {
182
183    $('#rooms-slider:not(.slick-initialized)').slick({
184        infinite: true,
185        slidesToShow: 3,
186        slidesToScroll: 1,
187        cssEase: 'linear',
188        centerMode: true,
189        centerPadding: '12%',
190        dots: false,
191        arrows: true,
192        responsive: [
193            {
194                breakpoint: 991,
195                settings: {
196                    slidesToShow: 2,
197                    slidesToScroll: 1,
198                    centerMode: false
199                }
200            },
201            {
202                breakpoint: 767,
203                settings: {
204                    slidesToShow: 1,
205                    centerMode: true,
206                    centerPadding: '18%'
207                }
208            }
209        ]
210    });
211
212    $('#rooms-slider')
213        .on('beforeChange', function(event, slick, currentSlide, nextSlide){
214            $('#rooms-slider').find('.slick-slide .card-img-overlay').css('background-color', 'transparent');
215            $('#rooms-slider').find('.slick-slide .card-body > *').css('color', 'inherit');
216        })
217        .on('afterChange', function(event, slick, currentSlide, nextSlide){
218            $('#rooms-slider').find('.slick-slide[aria-hidden="true"] .card-img-overlay').css('background-color', 'rgba(0,0,0,0.65)');
219            $('#rooms-slider').find('.slick-slide[aria-hidden="false"] .card-img-overlay').css('background-color', 'transparent');
220            $('#rooms-slider').find('.slick-slide[aria-hidden="true"] .card-body > *').css('color', 'transparent');
221            $('#rooms-slider').find('.slick-slide[aria-hidden="false"] .card-body > *').css('color', 'inherit');
222        })
223        .on('click', '.slide-link', function (e) {
224            e.preventDefault();
225            e.stopPropagation();
226            let _this = $(this),
227                url = _this.attr('data-link');
228            window.open(url, '_blank');
229        });
230
231
232    $('#kythnos-slider').slick({
233        infinite: true,
234        slidesToShow: 1,
235        slidesToScroll: 1,
236        cssEase: 'linear',
237        centerMode: true,
238        centerPadding: '8%',
239        dots: true,
240        arrows: true,
241        responsive: [
242            {
243                breakpoint: 767,
244                settings: {
245                    centerPadding: '14%'
246                }
247            }
248        ]
249    });
250
251    sliderNavigationPosition();
252
253    $('#kythnos-slider')
254        .on('beforeChange', function(event, slick, currentSlide, nextSlide){
255            $('#kythnos-slider').find('.slick-slide .card-img-overlay').css('background-color', 'transparent');
256            $('#kythnos-slider').find('.slick-slide .card-body > *').css('color', 'inherit');
257        })
258        .on('afterChange', function(event, slick, currentSlide, nextSlide){
259            $('#kythnos-slider').find('.slick-slide[aria-hidden="true"] .card-img-overlay').css('background-color', 'rgba(0,0,0,0.65)');
260            $('#kythnos-slider').find('.slick-slide[aria-hidden="false"] .card-img-overlay').css('background-color', 'transparent');
261            $('#kythnos-slider').find('.slick-slide[aria-hidden="true"] .card-body > *').css('color', 'transparent');
262            $('#kythnos-slider').find('.slick-slide[aria-hidden="false"] .card-body > *').css('color', 'inherit');
263        });
264
265
266    let video = document.getElementById('homeVideo');
267    let soundBtn = $('.sound_btn');
268
269    function toggleMute(){
270        video.muted = !video.muted;
271    }
272
273    if(soundBtn.length) {
274        soundBtn
275            .on('click', function () {
276               let _this = $(this);
277               _this.toggleClass('on');
278               toggleMute();
279            });
280    }
281
282    $('body')
283        .on('click', '.section-anchor', function (e) {
284            e.preventDefault();
285            let _this = $(this),
286                hash = _this.attr('href').replace('#', '');
287
288            $('html, body').animate({
289                scrollTop: $('#' + hash).offset().top - 30
290            }, 300);
291        })
292        .on('click', '.to_top', function () {
293            $('html, body').animate({
294                scrollTop: 0
295            }, 300);
296        });
297
298
299    let areaTarget;
300
301    if($('img[usemap]').length) {
302        $('img[usemap]').rwdImageMaps();
303    }
304
305
306    $('.map-section')
307        .on('click', function () {
308            $('.info').hide();
309            $('#bullet').hide();
310            $('#bullet-shadow').hide();
311            $('#line').hide();
312            areaTarget = null;
313        });
314
315    $('#map-desktop')
316        .on('click', 'area[href]', function (e) {
317            e.preventDefault();
318            e.stopPropagation();
319
320            $('.info').hide();
321            $('#bullet').hide();
322            $('#bullet-shadow').hide();
323            $('#line').hide();
324
325            let _this = $(this),
326                target = _this.data('target'),
327                direction = _this.data('direction'),
328                coords = _this.attr('coords'),
329                coords_array = coords.split(','),
330                cx = parseInt(coords_array[0]),
331                cy = parseInt(coords_array[1]),
332                cz = parseInt(coords_array[2]);
333
334            if(areaTarget != target) {
335                $('area:not(this)').removeClass('selected');
336            }
337
338            $(target).find('.bullet_small').addClass(direction);
339            $(target).find('.bullet_big').addClass(direction);
340
341            addBullet(cx, cy, cz, target, direction);
342
343            _this.toggleClass('selected');
344
345            if(_this.hasClass('selected')) {
346                $(target).show();
347                $('#bullet').show();
348                $('#bullet-shadow').show();
349                $('#line').show();
350            }
351
352            areaTarget = target;
353        });
354
355
356    $('#map-mobile')
357        .on('click', 'area[href]', function (e) {
358            e.preventDefault();
359            e.stopPropagation();
360
361            console.log(1);
362
363            $('.info').hide();
364            $('#bullet').hide();
365            $('#bullet-shadow').hide();
366            $('#line').hide();
367
368            let _this = $(this),
369                target = _this.data('target'),
370                directionX = _this.data('direction-x'),
371                directionY = _this.data('direction-y'),
372                coords = _this.attr('coords'),
373                coords_array = coords.split(','),
374                cx = parseInt(coords_array[0]),
375                cy = parseInt(coords_array[1]),
376                cz = parseInt(coords_array[2]);
377
378            if(areaTarget != target) {
379                $('area:not(this)').removeClass('selected');
380            }
381
382            $(target).find('.bullet_small').addClass(directionX + ' ' + directionY);
383            $(target).find('.bullet_big').addClass(directionX + ' ' + directionY);
384
385            addBulletMobile(cx, cy, cz, target, directionX, directionY);
386
387            _this.toggleClass('selected');
388
389            if(_this.hasClass('selected')) {
390                $(target).show();
391                $('#bullet').show();
392                $('#bullet-shadow').show();
393                $('#line').show();
394            }
395
396            areaTarget = target;
397        });
398
399    var date = new Date();
400    var today = new Date(date.getFullYear(), date.getMonth(), date.getDate());
401
402    $('.wpcf7-form-control.date').datepicker({
403        autoclose: true,
404        startDate: today,
405        format: 'dd/mm/yyyy',
406    });
407
408});
409
410$(window)
411    .on('resize', function () {
412        setTimeout(function () {
413            sliderNavigationPosition();
414        }, 400);
415    });
416
417
418if(document.readyState === 'ready' || document.readyState === 'complete') {
419
420
421    if($('body').hasClass('page-template-template-gallery')) {
422
423        $('.photo-gallery').isotope({
424            filter: '*',
425            itemSelector: '.image-item',
426            layoutMode: 'masonry',
427        });
428
429        $('.venobox').venobox({
430            'share': false,
431            'bgcolor' : 'transparent'
432        });
433    }
434
435} else {
436    document.onreadystatechange = function () {
437        if (document.readyState == "complete") {
438            if($('body').hasClass('page-template-template-gallery')) {
439
440                $('.photo-gallery').isotope({
441                    filter: '*',
442                    itemSelector: '.image-item',
443                    layoutMode: 'masonry',
444                });
445
446                $('.venobox').venobox({
447                    'share': false,
448                    'bgcolor' : 'transparent'
449                });
450            }
451        }
452    }
453}
454
455

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.