1$(document).ready(function() { 2 $('.type-post img:not(.ignore-zoom)').each(function() { 3 $(this).addClass("ignore-zoom"); 4 var Element = $(this).clone(); 5 var Element_Src = $(this).attr("src"); 6 //$(this).replaceWith("<a href=\""+Element_Src+"\" class=\"fancy\" data-generate="auto">"+Element+"</a>"); 7 if($(this).data("gallery-group") !== null && $(this).data("gallery-group") !== undefined) { 8 var albumRef = $(this).data("gallery-group"); 9 $(this).wrap($('<a>',{ href: Element_Src }).addClass("fancy").attr("data-generate","auto").attr("rel",albumRef).attr("data-fancybox",albumRef)); 10 } else { 11 if($(this).parents('.article-post').length) { 12 $(this).wrap($('<a>',{ href: Element_Src }).addClass("fancy").attr("data-generate","auto").attr("data-fancybox","article-post")); 13 } else { 14 $(this).wrap($('<a>',{ href: Element_Src }).addClass("fancy").attr("data-generate","auto")); 15 } 16 17 } 18 //$.fancybox.update; 19 }); 20 21 $('a.fancy img, a.fancy div').each(function() { 22 if($(this).attr('title') !== undefined && $(this).attr('title').length > 1) { 23 $(this).parent().data("caption", $(this).attr('title')); 24 } 25 }); 26 27 var FancyBox_Update = function() { 28 $(".fancy").fancybox({ 29 transitionIn: 'elastic', 30 transitionOut: 'elastic', 31 speedIn: 600, 32 speedOut: 200, 33 overlayShow: false, 34 hideOnContentClick: true, 35 keyboard: true, 36 arrows: true, 37 infobar: true, 38 protect: true, 39 titlePosition : 'inside' 40 }); 41 $('[data-fancybox="gallery"]').fancybox({ 42 thumbs : { 43 autoStart : true 44 } 45 }); 46 } 47 FancyBox_Update(); 48 setInterval(function() { FancyBox_Update(); }, 10000); 49 $(document).on('DOMNodeInserted', function(e) { 50 FancyBox_Update(); 51 }); 52 53 /* RESPONSIVE IFRAME */ 54 $('iframe:not(.ignore-ri)').each(function() { 55 $(this).wrap($('<div>').addClass("responsive-iframe").attr("data-generate","auto")); 56 }); 57 /* FIM: RESPONSIVE IFRAME */ 58 59 $('#fg-calendar').calendar({ 60 view: 'date', 61 weekArray: ['D', 'S', 'T', 'Q', 'Q', 'S', 'S'], 62 monthArray: ['Jan', 'Feb', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul', 'Ago', 'Set', 'Out', 'Nov', 'Dez'] 63 }); 64 65 if($('#agenda-eventos').length > 0) { 66 $("#agenda-eventos").zabuto_calendar({ 67 language: "pt", 68 today: true, 69 nav_icon: { 70 prev: '<i class="fa fa-chevron-circle-left"></i>', 71 next: '<i class="fa fa-chevron-circle-right"></i>' 72 }, 73 data: agendaData, 74 action: function () { 75 return AgendaAction(this.id, false); 76 } 77 }); 78 79 function AgendaAction(id) { 80 var EventElem = $('#'+id); 81 if(EventElem.data("hasEvent")) { 82 var ClassCount = EventElem.children(".day").attr('class').split(' ').length; 83 var EventClass = EventElem.children(".day").attr('class').split(' ')[ClassCount-1]; 84 var EventDate = EventClass.replace("date_",""); 85 location.href="/agenda/"+EventDate; 86 } 87 } 88 } 89 90 $('a').each(function() { 91 var content = $(this).html(); 92 if($(this).hasClass("pdf")) { 93 var addContent = "<i class=\"far fa-file-pdf\"></i> "; 94 $(this).html(addContent + content); 95 } 96 }); 97 98 $('div[data-img]').each(function() { 99 $(this).attr("style","background-image: url('"+$(this).data('img')+"');"); 100 $(this).removeAttr("data-img"); 101 }); 102 103 if($('.places').length > 0) { 104 $('.places .place .placeinfo').addClass("show"); 105 106 $('.places .place .place-moreinfo, .places .place .place-info').click(function() { 107 /* 108 var PlaceId = $(this).parent().data("place-id"); 109 var PlaceInfo_Elem = $('.places .place[data-place-id="'+PlaceId+'"] .placeinfo'); 110 if(!PlaceInfo_Elem.hasClass("show")) { 111 $('.places .place[data-place-id="'+PlaceId+'"] .placeinfo').addClass("show"); 112 } else { 113 $('.places .place[data-place-id="'+PlaceId+'"] .placeinfo').removeClass("show"); 114 } 115 */ 116 }); 117 } 118 119 if($('[data-action]').length > 0) { 120 $('[data-action]').click(function() { 121 switch($(this).data('action')) { 122 case "bookmark-old": 123 if (window.sidebar) { 124 window.sidebar.addPanel(location.href,document.title,""); 125 } else if(window.external) { 126 window.external.AddFavorite(location.href,document.title); 127 } else if(window.opera && window.print) { 128 this.title=document.title; 129 return true; 130 } 131 break; 132 case "bookmark": 133 alert("Precione CTRL + D para adicionar a Freguesia aos seus Favoritos."); 134 break; 135 } 136 }); 137 } 138 139 toastr.options = { 140 "closeButton": false, 141 "debug": false, 142 "newestOnTop": false, 143 "progressBar": true, 144 "positionClass": "toast-bottom-right", 145 /*"preventDuplicates": true,*/ 146 "onclick": null, 147 "showDuration": "300", 148 "hideDuration": "1000", 149 "timeOut": "5000", 150 "extendedTimeOut": "1000", 151 "showEasing": "swing", 152 "hideEasing": "linear", 153 "showMethod": "fadeIn", 154 "hideMethod": "fadeOut", 155 "autoDismiss": true 156 /*"maxOpened": 1*/ 157 } 158 159 $('a[href="#contatos"]').click(function() { 160 if($('footer#contatos').hasClass("effon")) { 161 $('footer#contatos').removeClass("effon"); 162 } 163 $('footer#contatos').addClass("effon"); 164 setTimeout(function() { $('footer#contatos').removeClass("effon"); }, 3500); 165 }); 166 167 if($('[data-album]').length > 0) { 168 $('[data-album]').each(function() { 169 var This = $(this); 170 var AlbumId = $(this).data('album'); 171 var ImagesAlbum_Count = AlbumImages[AlbumId].length; 172 if(ImagesAlbum_Count < 1) { return; } 173 var IAc_ = 1; 174 var LoopChangeImg = function(force) { 175 if(!This.data("loop") && !force) { return; } 176 var image = $('[data-album="'+AlbumId+'"] .album-cover'); 177 image.fadeOut(0, function () { 178 image.attr('src', AlbumImages[AlbumId][(IAc_ - 1)]); 179 image.fadeIn(0); 180 }); 181 182 if(IAc_ == ImagesAlbum_Count) { 183 IAc_ = 1; 184 } else { 185 IAc_ = IAc_ + 1; 186 } 187 } 188 LoopChangeImg(true); 189 setInterval(function() { 190 LoopChangeImg(false); 191 }, 2000); 192 }); 193 $('[data-album]').mouseover(function() { 194 $(this).data("loop", true); 195 }); 196 $('[data-album]').mouseout(function() { 197 $(this).data("loop", false); 198 }); 199 } 200}); 201 202$(document).on('click','[data-status="development"],[data-status="maintenance"]',function(e){ 203 e.preventDefault(); 204 toastr.info("A página pretendida encontra-se em manutenção ou ainda em desenvolvimento."); 205 206});
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.