1 2$( document ).ready(function() { 3 4 var scroll = new SmoothScroll('a[href*="#"]'); 5 6 $('#main-menu').smartmenus({ 7 mainMenuSubOffsetX: -1, 8 mainMenuSubOffsetY: 4, 9 subMenusSubOffsetX: 6, 10 subMenusSubOffsetY: -6 11 }); 12 13 disabledBlankLink(); 14 function disabledBlankLink() { 15 $('.has-submenu').on('click', function (e) { 16 e.preventDefault(); 17 }); 18 } 19 20 // change font size 21 $fontSize = parseInt($('html').css('font-size')); 22 $('#make-bigger').on('click', function (e) { 23 if ($fontSize < 12) { 24 changeFontSize(1); 25 } 26 }); 27 $('#make-normal').on('click', function (e) { 28 $('html').css('font-size', "10px"); 29 $fontSize = 10; 30 }); 31 $('#make-smaller').on('click', function (e) { 32 console.log($fontSize); 33 if ($fontSize > 8) { 34 35 changeFontSize(-1); 36 } 37 }); 38 39 function changeFontSize(number) { 40 $fontSize = $fontSize + (number * 1); 41 $fontSizeWithPx = $fontSize + "px"; 42 $('html').css('font-size', $fontSizeWithPx); 43 } 44 45 // switcher jezykow 46 $('.language-toggle').on('click', function () { 47 $('.language__chooser').toggleClass('language__chooser--open'); 48 }); 49 50 //contrast 51 function appendStyleSheet() { 52 $('head').append('<link rel="stylesheet" href="/bundles/velacmssolutionjordanow/dist/stylesheets/contrast.min.css" type="text/css" id="hc_stylesheet"/>'); 53 } 54 if ($.cookie('high_contrast') == 'true') { 55 appendStyleSheet(); 56 } 57 58 $(".wcag__contrast-icon").click(function () { 59 if ($.cookie('high_contrast') != 'true') { 60 appendStyleSheet(); 61 $.cookie('high_contrast', 'true'); 62 } 63 else { 64 $("#hc_stylesheet").remove(); 65 $.cookie('high_contrast', 'false'); 66 } 67 }); 68 69 $("#slider").owlCarousel({ 70 loop: true, 71 margin: 0, 72 nav: true, 73 autoplay: true, 74 animateOut: 'fadeOut', 75 animateIn: 'fadeIn', 76 autoplayTimeout: 8000, 77 smartSpeed: 1500, 78 autoplayHoverPause: true, 79 dots: false, 80 responsiveClass: true, 81 responsive: { 82 0: { 83 items: 1, 84 nav: false 85 }, 86 600: { 87 items: 1, 88 nav: false 89 }, 90 1000: { 91 items: 1, 92 nav: true, 93 loop: true 94 } 95 } 96 }) 97 98 $("#news-slider").owlCarousel({ 99 loop: true, 100 margin: 0, 101 nav: false, 102 animateOut: 'fadeOut', 103 animateIn: 'fadeIn', 104 autoplay: false, 105 autoplayTimeout: 4000, 106 fluidSpeed: 250, 107 dots: true, 108 responsiveClass: true, 109 responsive: { 110 0: { 111 items: 1, 112 nav: true 113 }, 114 600: { 115 items: 1, 116 nav: true 117 }, 118 1000: { 119 items: 1, 120 nav: false, 121 loop: true, 122 dots: true 123 } 124 } 125 }) 126 127 //fancy gallery 128 $('[data-fancybox="images"]').fancybox({ 129 130 buttons: [ 131 "zoom", 132 "slideShow", 133 "download", 134 "thumbs", 135 "close" 136 ], 137 animationEffect: "zoom-in-out", 138 transitionEffect: "circular", 139 lang: "pl", 140 i18n: { 141 pl: { 142 CLOSE: "Zamknij", 143 NEXT: "NastÄpny", 144 PREV: "Poprzedni", 145 ERROR: "Nie mogÅ wyÅwietliÄ zawartoÅci <br/> Spróbuj póniej", 146 PLAY_START: "Zacznij pokaz slajdów", 147 PLAY_STOP: "Zatrzymaj pokaz slajdów", 148 FULL_SCREEN: "CaÅy ekran", 149 THUMBS: "Miniaturki", 150 DOWNLOAD: "Pobierz", 151 SHARE: "UdostÄpnij", 152 ZOOM: "PowiÄksz" 153 } 154 } 155 }); 156 157 }); 158 var avilableDay=[]; 159 var currentDate; 160 $(function () { 161 $('.article-list').css('display', 'none'); 162 var currentDate = new Date() 163 var month = currentDate.getMonth() + 1 164 var year = currentDate.getFullYear() 165 var href = $(location).attr('href'); 166 daysWithEvents(year, month); 167 var xhr; 168 169 function daysWithEvents(y, m, refresh) { 170 avilableDay = [] 171 if (refresh) { 172 xhr.abort() 173 $('.calendar').addClass('switchPreloader'); 174 } 175 xhr = $.ajax({
176 url: "/?data=" + y + "-" + m + "&ajax=1&calendar=1&random="+Math.floor((Math.random() * 1000) + 1), 177 context: document.body 178 }).done(function (data) { 179 var result = jQuery(data).find('#events-source .event-duration').text(); 180 var daty = result.split('.') 181 for (var i = daty.length - 3; i >= 0; i -= 2) { 182 startDate = new Date(daty[i]); 183 endDate = new Date(daty[i + 1]); 184 currentDate = new Date(startDate) 185 186 while (currentDate <= endDate) { 187 var bDay = ('0' + (new Date(currentDate)).getDate()).slice(-2); 188 var bMonth = (new Date(currentDate)).getMonth() + 1; 189 var dateToArray = bDay + "-" + bMonth; 190 if ($.inArray(dateToArray, avilableDay) == -1) { 191 avilableDay.push(dateToArray); 192 } 193 currentDate.setDate(currentDate.getDate() + 1); 194 } 195 }; 196 wholeCalendar(refresh); 197 if (refresh) { 198 $('#events-calendar').datepicker('refresh'); 199 } 200 201 202 }).always(function () { 203 $('.calendar').removeClass('switchPreloader'); 204 }) 205 } 206 207 function wholeCalendar(refresh) { 208 function available(date) { 209 dmy = ('0' + date.getDate()).slice(-2); 210 dmonth = date.getMonth() + 1; 211 if ($.inArray(dmy + "-" + dmonth, avilableDay) != -1) { 212 return [true, "hasEvents"]; 213 } else { 214 return [true, "noEvents"]; 215 } 216 } 217 $('#events-calendar').datepicker({ 218 219 monthNames: ["StyczeÅ", "Luty", "Marzec", "KwiecieÅ", "Maj", "Czerwiec", "Lipiec", "SierpieÅ", "WrzesieÅ", "Październik", "Listopad", "GrudzieÅ"], 220 monthNamesShort: ["STY", "LUT", "MAR", "KWI", "MAJ", "CZE", "LIP", "SIE", "WRZ", "PAŹ", "LIS", "GRU"], 221 dayNamesMin: ["N", "Pn", "Wt", "År", "Cz", "Pt", "So"], 222 dayNames: ["Niedziela", "PoniedziaÅek", "Wtorek", "Åroda", "Czwartek", "PiÄ tek", "Sobota"], 223 firstDay: 1, 224 inline: true, 225 showOtherMonths: true, 226 dateFormat: 'yy-mm-dd', 227 beforeShowDay: available, 228 onChangeMonthYear: function (year, month) { 229 daysWithEvents(year, month, true); 230 }, 231 onSelect: function (date) { 232 $('.preloader').css('display', 'block'); 233 $('#events').css('display', 'none'); 234 var href = $(location).attr('href'); 235 $.ajax({
236 url: "/?data=" + date + "&ajax=1&calendar=1&random="+Math.floor((Math.random() * 1000) + 1), 237 context: document.body 238 }).done(function (data) { 239 $('#events').css('display', 'block'); 240 $('.preloader').hide(); 241 var result = jQuery(data).find('#events-source .no-event').text(); 242 if ($.trim(result) == 'brak elementów do wyÅwietlenia') { 243 jQuery("#events").hide().fadeIn('fast').html("<p class=\"no-event\">Brak wydarzeÅ w tym dniu.</p>"); 244 } else { 245 jQuery("#events").hide().fadeIn('fast').html(jQuery(data).find('#events-source .events')); 246 $('.events').append("<a class='see-all navy' href='/wydarzenia' >Wszystkie wydarzenia</a>"); 247 } 248 }); 249 }, 250 }); 251 if (!refresh) { 252 var currentDate = new Date() 253 var day = ('0' + currentDate.getDate()).slice(-2); 254 var month = currentDate.getMonth() + 1 255 var year = currentDate.getFullYear() 256 var href = $(location).attr('href'); 257 $('.preloader').css("display", "none"); 258 $.ajax({
259 url: "/?data=" + year + "-" + month + "-" + day + "&ajax=1&calendar=1&random="+Math.floor((Math.random() * 1000) + 1), 260 context: document.body 261 }).done(function (data) { 262 $('#events').css('display', 'block'); 263 264 var result = jQuery(data).find('#events-source .no-event').text(); 265 if ($.trim(result) == 'brak elementów do wyÅwietlenia') { 266 jQuery("#events").hide().fadeIn('fast').html("<p class=\"no-event\">Brak wydarzeÅ w tym dniu.</p>"); 267 268 } else { 269 jQuery("#events").hide().fadeIn('fast').html(jQuery(data).find('#events-source .events')); 270 $('.events').append("<div class='text-center'><a class='see-all title-section' href='/wydarzenia'>Sprawdź inne wydarzenia</a></div>"); 271 } 272 }); 273 274 $("a:odd").removeClass("ui-state-active"); 275 } 276 } 277 278 }); 279
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.