PageSourceSearch

https://www.marinha.pt/style%20library/pm/js/scripts.js

js marinha.pt collected 2026-09-24 09:20:09 UTC 17,592 bytes, 535 lines download raw bytes

1/* ===================================   PMARINTER   ===================================*/
2$(document).ready(function () {
3
4    //Slider News Homepage
5    if ($('.pm-mainNewsSlider') != null) {
6        $('.pm-mainNewsSlider').slick({
7            slidesToShow: 1,
8            slidesToScroll: 1,
9            arrows: false,
10            fade: true,
11            asNavFor: '.pm-navNewsSlider'
12        });
13    };
14
15    if ($('.pm-navNewsSlider') != null) {
16        $('.pm-navNewsSlider').slick({
17            slidesToShow: 3,
18            slidesToScroll: 1,
19            asNavFor: '.pm-mainNewsSlider',
20            focusOnSelect: true,
21            prevArrow: $('.pm-btnMainPrev'),
22            nextArrow: $('.pm-btnMainNext'),
23            autoplay: true,
24            autoplaySpeed: 7000,
25            responsive: [
26                {
27                    breakpoint: 991,
28                    settings: {
29                        slidesToShow: 2,
30                        slidesToScroll: 1,
31                    }
32                }
33            ]
34        });
35    };
36
37
38    //Slider Estagios
39    if ($('.pm-estagiosSlider') != null) {
40        $('.pm-estagiosSlider').slick({
41            infinite: true,
42            slidesToShow: 1,
43            slidesToScroll: 1,
44            dots: false,
45            prevArrow: $('.pm-btnPrev'),
46            nextArrow: $('.pm-btnNext'),
47            autoplay: true,
48            autoplaySpeed: 10000,
49            fade: true
50        });
51    };
52
53    //Estatisticas Marinha
54    if ($('.pm-numberCount') != null) {
55        $('.pm-numberCount').one("mouseover", function () {
56            $('.pm-number.counter').counterUp({
57                delay: 10,
58                time: 1000
59            });
60        });
61    };
62
63    //Animação do menu
64    //#TODO# Fazer ação do ENTER
65    if ($('#menuTop') != null) {
66        $('#menuTop').click(function () {
67            $(this).toggleClass('open');
68            $('#menuList').toggleClass('hide');
69        });
70    };
71
72    if ($('#menuFixed') != null) {
73        $('#menuFixed').click(function () {
74            $(this).toggleClass('open');
75            $('#menuList').toggleClass('hide');
76            $('#pm_navContainer').toggleClass('hide');
77        });
78    };
79
80    if ($('#menu-button') != null) {
81        $('.menu-button').keydown(function (event) {
82            var keyCode = (event.keyCode ? event.keyCode : event.which);
83            if (keyCode == 13) {
84                $('#menuFixed').trigger('click');
85            }
86        }); 
87    };
88
89    ////Lazyload effect
90    //if ($('.lazyRow') != null) {
91    //    $('.lazyRow').addClass('pm-hidden pm-field row');
92    //    $('.lazyRow').each(function (index, element) {
93    //        $(element).waypoint({
94    //            handler: function () {
95    //                $(element).addClass('pm-visible animated');
96    //            },
97    //            context: document.getElementById('s4-workspace'),
98    //            offset: '87%'
99    //        });
100    //    });
101    //};
102
103    ////Animate slideInRight
104    //if ($('.lazySR') != null) {
105    //    $('.lazySR').addClass('pm-hidden');
106    //    $('.lazySR').each(function (index, element) {
107    //        $(element).waypoint({
108    //            handler: function () {
109    //                $(element).addClass('pm-visible animated fadeInRight');
110    //            },
111    //            context: document.getElementById('s4-workspace'),
112    //            offset: '50%'
113    //        });
114    //    });
115    //};
116
117    ////Animate slideInLeft
118    //if ($('.lazySR') != null) {
119    //    $('.lazySL').addClass('pm-hidden');
120    //    $('.lazySL').each(function (index, element) {
121    //        $(element).waypoint({
122    //            handler: function () {
123    //                $(element).addClass('pm-visible animated fadeInLeft');
124    //            },
125    //            context: document.getElementById('s4-workspace'),
126    //            offset: '50%'
127    //        });
128    //    });
129    //};
130
131    ////Animate fadeInDown
132    //if ($('.lazyFD') != null) {
133    //    $('.lazyFD').addClass('pm-hidden');
134    //    $('.lazyFD').each(function (index, element) {
135    //        $(element).waypoint({
136    //            handler: function () {
137    //                $(element).addClass('pm-visible animated fadeInDown');
138    //            },
139    //            context: document.getElementById('s4-workspace'),
140    //            offset: '50%'
141    //        });
142    //    });
143    //};
144
145    ////Animate fadeInDown70%
146    //if ($('.lazyFD80') != null) {
147    //    $('.lazyFD80').addClass('pm-hidden');
148    //    $('.lazyFD80').each(function (index, element) {
149    //        $(element).waypoint({
150    //            handler: function () {
151    //                $(element).addClass('pm-visible animated fadeInDown');
152    //            },
153    //            context: document.getElementById('s4-workspace'),
154    //            offset: '80%'
155    //        });
156    //    });
157    //};
158
159    ////Animate fadeInDown80%
160    //if ($('.lazyFD80') != null) {
161    //    $('.lazyFD80').addClass('pm-hidden');
162    //    $('.lazyFD80').each(function (index, element) {
163    //        $(element).waypoint({
164    //            handler: function () {
165    //                $(element).addClass('pm-visible animated fadeInDown');
166    //            },
167    //            context: document.getElementById('s4-workspace'),
168    //            offset: '90%'
169    //        });
170    //    });
171    //};
172
173    ////Animate fadeInUp
174    //if ($('.lazyFU') != null) {
175    //    $('.lazyFU').addClass('pm-hidden');
176    //    $('.lazyFU').each(function (index, element) {
177    //        $(element).waypoint({
178    //            handler: function () {
179    //                $(element).addClass('pm-visible animated fadeInUp');
180    //            },
181    //            context: document.getElementById('s4-workspace'),
182    //            offset: '50%'
183    //        });
184    //    });
185    //};
186
187    ////Animate fadeInUp80%
188    //if ($('.lazyFD80') != null) {
189    //    $('.lazyFU80').addClass('pm-hidden');
190    //    $('.lazyFU80').each(function (index, element) {
191    //        $(element).waypoint({
192    //            handler: function () {
193    //                $(element).addClass('pm-visible animated fadeInUp');
194    //            },
195    //            context: document.getElementById('s4-workspace'),
196    //            offset: '90%'
197    //        });
198    //    });
199    //};
200
201    ////Animate fadeOutUp
202    //if ($('.lazyFOU') != null) {
203    //    $('.lazyFOU').addClass('pm-hidden');
204    //    $('.lazyFOU').each(function (index, element) {
205    //        $(element).waypoint({
206    //            handler: function () {
207    //                $(element).addClass('pm-visible animated fadeOutUp');
208    //            },
209    //            context: document.getElementById('s4-workspace'),
210    //            offset: '50%'
211    //        });
212    //    });
213    //};
214
215    ////Animate zoomIn
216    //if ($('.lazyZI') != null) {
217    //    $('.lazyZI').addClass('pm-hidden');
218    //    $('.lazyZI').each(function (index, element) {
219    //        $(element).waypoint({
220    //            handler: function () {
221    //                $(element).addClass('pm-visible animated zoomIn');
222    //            },
223    //            context: document.getElementById('s4-workspace'),
224    //            offset: '50%'
225    //        });
226    //    });
227    //};
228
229    ////Animate fadeInDown70%
230    //if ($('.lazyFD80') != null) {
231    //    $('.lazyFD80').addClass('pm-hidden');
232    //    $('.lazyFD80').each(function (index, element) {
233    //        $(element).waypoint({
234    //            handler: function () {
235    //                $(element).addClass('pm-visible animated fadeInDown');
236    //            },
237    //            context: document.getElementById('s4-workspace'),
238    //            offset: '80%'
239    //        });
240    //    });
241    //};
242
243    ////Animate fadeInDown80%
244    //if ($('.lazyFD80') != null) {
245    //    $('.lazyFD80').addClass('pm-hidden');
246    //    $('.lazyFD80').each(function (index, element) {
247    //        $(element).waypoint({
248    //            handler: function () {
249    //                $(element).addClass('pm-visible animated fadeInDown');
250    //            },
251    //            context: document.getElementById('s4-workspace'),
252    //            offset: '90%'
253    //        });
254    //    });
255    //};
256
257    ////Animate fadeInUp100%
258    //if ($('.lazyFU100') != null) {
259    //    $('.lazyFU100').addClass('pm-hidden');
260    //    $('.lazyFU100').each(function (index, element) {
261    //        $(element).waypoint({
262    //            handler: function () {
263    //                $(element).addClass('pm-visible animated fadeInUp');
264    //            },
265    //            context: document.getElementById('s4-workspace'),
266    //            offset: '100%'
267    //        });
268    //    });
269    //};
270
271    ////Animated zoomIn100%
272    //if ($('.lazyZI100') != null) {
273    //    $('.lazyZI100').addClass('pm-hidden');
274    //    $('.lazyZI100').each(function (index, element) {
275    //        $(element).waypoint({
276    //            handler: function () {
277    //                $(element).addClass('pm-visible animated zoomIn');
278    //            },
279    //            context: document.getElementById('s4-workspace'),
280    //            offset: '100%'
281    //        });
282    //    });
283    //};
284
285    ////Animated zoomIn80%
286    //if ($('.lazyZI80') != null) {
287    //    $('.lazyZI80').addClass('pm-hidden');
288    //    $('.lazyZI80').each(function (index, element) {
289    //        $(element).waypoint({
290    //            handler: function () {
291    //                $(element).addClass('pm-visible animated zoomIn');
292    //            },
293    //            context: document.getElementById('s4-workspace'),
294    //            offset: '90%'
295    //        });
296    //    });
297    //};
298
299    ////Animated zoomIn70%
300    //if ($('.lazyZI70') != null) {
301    //    $('.lazyZI70').addClass('pm-hidden');
302    //    $('.lazyZI70').each(function (index, element) {
303    //        $(element).waypoint({
304    //            handler: function () {
305    //                $(element).addClass('pm-visible animated zoomIn');
306    //            },
307    //            context: document.getElementById('s4-workspace'),
308    //            offset: '80%'
309    //        });
310    //    });
311    //};
312
313    ////Animate fadeInUp80%
314    //if ($('.lazyFU80') != null) {
315    //    $('.lazyFU80').addClass('pm-hidden');
316    //    $('.lazyFU80').each(function (index, element) {
317    //        $(element).waypoint({
318    //            handler: function () {
319    //                $(element).addClass('pm-visible animated fadeInUp');
320    //            },
321    //            context: document.getElementById('s4-workspace'),
322    //            offset: '90%'
323    //        });
324    //    });
325    //};
326
327    ////Animate slideInLeft80%
328    //if ($('.lazySL80') != null) {
329    //    $('.lazySL80').addClass('pm-hidden');
330    //    $('.lazySL80').each(function (index, element) {
331    //        $(element).waypoint({
332    //            handler: function () {
333    //                $(element).addClass('pm-visible animated fadeInLeft');
334    //            },
335    //            context: document.getElementById('s4-workspace'),
336    //            offset: '90%'
337    //        })
338    //    });
339    //};
340
341    ////Animate slideInRight80%
342    //if ($('.lazySR80') != null) {
343    //    $('.lazySR80').addClass('pm-hidden');
344    //    $('.lazySR80').each(function (index, element) {
345    //        $(element).waypoint({
346    //            handler: function () {
347    //                $(element).addClass('pm-visible animated fadeInRight');
348    //            },
349    //            context: document.getElementById('s4-workspace'),
350    //            offset: '90%'
351    //        });
352    //    });
353    //};
354
355    ////Animate slideInLeft85%
356    //if ($('.lazySL85') != null) {
357    //    $('.lazySL85').addClass('pm-hidden');
358    //    $('.lazySL85').each(function (index, element) {
359    //        $(element).waypoint({
360    //            handler: function () {
361    //                $(element).addClass('pm-visible animated fadeInLeft');
362    //            },
363    //            context: document.getElementById('s4-workspace'),
364    //            offset: '90%'
365    //        })
366    //    });
367    //};
368
369    //Slider Jumbotron
370    if ($('.pm-jumbSlider') != null) {
371        $('.pm-jumbSlider').slick({
372            infinite: true,
373            slidesToShow: 1,
374            slidesToScroll: 1,
375            dots: false,
376            arrows: false,
377            autoplay: true,
378            autoplaySpeed: 5000,
379            fade: true
380        });
381    };
382
383    //Accordions
384
385    //Imagens/Meios
386    if ($('.pm-anchorIMG') != null) {
387        $(function () {
388            $('.pm-anchorIMG').click(function () {
389                $(this).find('#panel-head').toggleClass('open-off open-on');
390                $('.panel-icon').find('svg').toggleClass('fa-chevron-up fa-chevron-down');
391            });
392        });
393    };
394
395    //Texto/Estagios
396    if ($('.pm-anchorTXT') != null) {
397        $(function () {
398            $('.pm-anchorTXT').click(function () {
399                $(this).parent().parent().parent().toggleClass('open-on').next().toggle();
400                $(this).find('svg').toggleClass('fa-chevron-up fa-chevron-down');
401            });
402        });
403    };
404
405    //Postos
406    if ($('.pm-postosSlider') != null) {
407        $('.pm-postosSlider').slick({
408            slidesToShow: 4,
409            slidesToScroll: 1,
410            focusOnSelect: true,
411            prevArrow: '<span class="pm-btnMainPrev"><i class="fas fa-chevron-left"></i></span>',
412            nextArrow: '<span class="pm-btnMainNext"><i class="fas fa-chevron-right"></i></span>',
413            autoplay: true,
414            autoplaySpeed: 10000,
415            responsive: [
416                {
417                    breakpoint: 991,
418                    settings: {
419                        slidesToShow: 2,
420                        slidesToScroll: 1,
421                        autoplay: false,
422                    }
423                }
424            ],
425            responsive: [
426                {
427                    breakpoint: 510,
428                    settings: {
429                        slidesToShow: 1,
430                        slidesToScroll: 1,
431                        autoplay: false,
432                    }
433                }
434            ]
435        });
436    };
437
438    //Esconde a Barra de Descrição caso estejá vazia
439    if ($('.pm-greyBackground') != null) {
440        if ($('div.pm-greyBackground').text() == 0) $('div.pm-greyBackground').hide();
441    }
442
443    //Slider Fim de Pag
444    if ($('.pm-fpSlider') != null) {
445        $('.pm-fpSlider').slick({
446            slidesToShow: 4,
447            slidesToScroll: 1,
448            focusOnSelect: true,
449            arrows: false,
450            autoplay: true,
451            autoplaySpeed: 10000,
452            responsive: [
453                {
454                    breakpoint: 991,
455                    settings: {
456                        slidesToShow: 2,
457                        slidesToScroll: 1,
458                    }
459                }
460            ],
461            responsive: [
462                {
463                    breakpoint: 676,
464                    settings: {
465                        slidesToShow: 1,
466                        slidesToScroll: 1,
467                    }
468                }
469            ]
470        });
471        //FeatherlightBox do Slider Fim de Pag
472        $('a.pm-fpItem').featherlightGallery({
473            previousIcon: '<span class="fas fa-chevron-left"></span>', //'<',
474            nextIcon: '<span class="fas fa-chevron-right"></span>', //'>',
475            galleryFadeIn: 300,
476
477            openSpeed: 300
478        });
479    };
480
481
482    //Slider Destaques Micro Site
483    if ($('.pm-destaquesSlider') != null) {
484        $('.pm-destaquesSlider').slick({
485            infinite: true,
486            slidesToShow: 1,
487            slidesToScroll: 1,
488            dots: false,
489            prevArrow: $('.pm-btnPrev'),
490            nextArrow: $('.pm-btnNext'),
491            autoplay: true,
492            autoplaySpeed: 10000,
493            fade: true
494        });
495    };
496
497    //Slider Galeria Micro Site
498    if ($('.pm-msGallerySlider') != null) {
499        $('.pm-msGallerySlider').slick({
500            slidesToShow: 4,
501            slidesToScroll: 1,
502            focusOnSelect: true,
503            arrows: false,
504            autoplay: true,
505            autoplaySpeed: 10000,
506            responsive: [
507                {
508                    breakpoint: 991,
509                    settings: {
510                        slidesToShow: 2,
511                        slidesToScroll: 1,
512                    }
513                }
514            ],
515            responsive: [
516                {
517                    breakpoint: 676,
518                    settings: {
519                        slidesToShow: 1,
520                        slidesToScroll: 1,
521                    }
522                }
523            ]
524        });
525        //FeatherlightBox do Slider Fim de Pag
526        $('a.pm-msGalleryItem').featherlightGallery({
527            previousIcon: '<',
528            nextIcon: '>',
529            galleryFadeIn: 300,
530
531            openSpeed: 300
532        });
533    };
534
535});

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.