1// main.js opakowany w jQuery wrapper 2jQuery(function($){ 3 $(window).scroll(function(){ 4 const scroll = $(window).scrollTop(); 5 if(scroll < 32){ 6 $('.fixed-top') 7 .css({'background': 'transparent', 'box-shadow': '0px 0px 0px 0px rgba(0,0,0,0)'}) 8 .removeClass('ui-slim-menu'); 9 } else{ 10 $('.fixed-top') 11 .css({'background': 'rgb(255, 127, 0)', 'box-shadow': '0px 0px 10px 0px rgba(0,0,0,0.35)'}) 12 .addClass('ui-slim-menu'); 13 } 14 }); 15 // Flickity INIT 16 const elemFlickity = document.querySelector('.main-carousel'); 17 if (elemFlickity) { 18 const flkty = new Flickity( elemFlickity, { 19 cellAlign: 'left', 20 contain: true 21 }); 22 } 23 // Search bar 24 const input = document.getElementById("search-input"); 25 const searchBtn = document.getElementById("search-btn"); 26 const expand = () => { 27 searchBtn.classList.toggle("close"); 28 input.classList.toggle("square"); 29 }; 30 if (searchBtn) { 31 searchBtn.addEventListener("click", expand); 32 } 33 function jumpToHomepage() { 34 window.location.href = "http://fidea.pl"; 35 } 36 if ($('.counter').length) { 37 $('.counter').counterUp({ 38 delay: 10, 39 time: 3000, 40 offset: 70, 41 beginAt: 0, 42 formatter: function (n) { 43 return n.replace(/[,.]/g, m => (m === ',' ? '.' : ',')); 44 } 45 }); 46 } 47 function symmetricDifference(a1, a2) { 48 var result = []; 49 for (var i = 0; i < a1.length; i++) { 50 if (a2.indexOf(a1[i]) === -1) { 51 result.push(a1[i]); 52 } 53 } 54 for (i = 0; i < a2.length; i++) { 55 if (a1.indexOf(a2[i]) === -1) { 56 result.push(a2[i]); 57 } 58 } 59 return result; 60 } 61 window.randomBackground = function() { 62 var element, arr, checkClass; 63 var bgClassArray = ['bg1', 'bg2', 'bg3', 'bg4', 'bg5', 'bg6', 'bg7']; 64 var randomItem = bgClassArray[Math.floor(Math.random()*bgClassArray.length)]; 65 element = document.getElementsByClassName("modal"); 66 Array.prototype.forEach.call(element, function(el) { 67 arr = el.className.split(" "); 68 var intersection = arr.filter(x => bgClassArray.includes(x)); 69 if (intersection.length > 0) { 70 intersection.forEach(function(bg) { el.classList.remove(bg); }); 71 } 72 if (arr.indexOf(randomItem) == -1) { 73 el.className += " " + randomItem; 74 } 75 }); 76 } 77 if ($(".tombstone").length) { 78 $(".tombstone").flip({ 79 trigger: 'hover' 80 }); 81 } 82 if( $("#right-content").length ) { 83 $('#right-content').hcSticky({ 84 stickTo: '#left-content', 85 responsive: true, 86 top: 115 87 }); 88 } 89 $(document).on('click', 'a[href^="#"]', function (event) { 90 var href = $(this).attr('href'); 91 if (href === "#" || href === "") { 92 event.preventDefault(); 93 return; 94 } 95 var $target = $(href); 96 if ($target.length) { 97 event.preventDefault(); 98 $('html, body').animate({ 99 scrollTop: $target.offset().top - 110 + 'px' 100 }, 500); 101 } 102 }); 103 $(document).ready(function () { 104 $('.modal').each(function () { 105 const modalId = `#${$(this).attr('id')}`; 106 if (window.location.href.indexOf(modalId) !== -1) { 107 $(modalId).modal('show'); 108 } 109 }); 110 $('[data-toggle="tooltip"]').tooltip(); 111 $('.wpcf7-form-control-wrap span').tooltip() 112 // translacja wsp sitemap wordpress na EN 113 var theLanguage = $('html').attr('lang'), 114 pathname = window.location.pathname, 115 siteMap = pathname.search("site-map"); 116 if (theLanguage === 'en-GB' && siteMap !== -1) { 117 $('h2.wsp-transakcjes-title') 118 .html($("h2.wsp-transakcjes-title").html().replace('Transakcje', 'Transactions')); 119 $('h2.wsp-aktualnoscis-title') 120 .html($("h2.wsp-aktualnoscis-title").html().replace('AktualnoÅci', 'News')); 121 } 122 }); 123});
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.