1(function($) { 2 'use strict'; 3 4 5 // Scroll progress 6 var scrollProgress = function() { 7 var docHeight = $(document).height(), 8 windowHeight = $(window).height(), 9 scrollPercent; 10 $(window).on('scroll', function() { 11 scrollPercent = $(window).scrollTop() / (docHeight - windowHeight) * 100; 12 $('.scroll-progress').width(scrollPercent + '%'); 13 }); 14 }; 15 16 // Off canvas sidebar 17 var OffCanvas = function() { 18 $('#off-canvas-toggle').on('click', function() { 19 $('body').toggleClass("canvas-opened"); 20 }); 21 22 $('.dark-mark').on('click', function() { 23 $('body').removeClass("canvas-opened"); 24 25 }); 26 $('.off-canvas-close').on('click', function() { 27 $('body').removeClass("canvas-opened"); 28 }); 29 30 $('.mega-menu-item').on('click', function() { 31 $(this).toggleClass("open"); 32 $('body').removeClass("open-search-form"); 33 }); 34 }; 35 36 // Search form 37 var openSearchForm = function() { 38 $('button.search-icon').on('click', function() { 39 $('body').toggleClass("open-search-form"); 40 $('.mega-menu-item').removeClass("open"); 41 $("html, body").animate({ scrollTop: 0 }, "slow"); 42 }); 43 $('.search-close').on('click', function() { 44 $('body').removeClass("open-search-form"); 45 }); 46 }; 47 48 // Mobile menu 49 var mobileMenu = function() { 50 var menu = $('ul#mobile-menu'); 51 if (menu.length) { 52 menu.slicknav({ 53 prependTo: ".mobile_menu", 54 closedSymbol: '+', 55 openedSymbol: '-' 56 }); 57 }; 58 }; 59 60 var WidgetSubMenu = function() { 61 $(".widget_nav_menu .sub-menu").hide(); 62 $(".menu li.menu-item-has-children > a").removeAttr("href"); 63 $('.menu li.menu-item-has-children').on('click', function() { 64 var element = $(this); 65 if (element.hasClass('open')) { 66 element.removeClass('open'); 67 element.find('li').removeClass('open'); 68 element.find('ul').slideUp(200); 69 } else { 70 element.addClass('open'); 71 element.children('ul').slideDown(200); 72 element.siblings('li').children('ul').slideUp(200); 73 element.siblings('li').removeClass('open'); 74 element.siblings('li').find('li').removeClass('open'); 75 element.siblings('li').find('ul').slideUp(200); 76 } 77 }); 78 }; 79 80 81 // Nice Select 82 var niceSelectBox = function() { 83 var nice_Select = $('select'); 84 if (nice_Select.length) { 85 nice_Select.niceSelect(); 86 } 87 }; 88 89 //Header sticky 90 var headerSticky = function() { 91 $(window).on('scroll', function() { 92 var scroll = $(window).scrollTop(); 93 if (scroll < 245) { 94 $(".header-sticky").removeClass("sticky-bar"); 95 } else { 96 $(".header-sticky").addClass("sticky-bar"); 97 } 98 }); 99 }; 100 101 // Scroll up to top 102 var scrollToTop = function() { 103 $.scrollUp({ 104 scrollName: 'scrollUp', // Element ID 105 topDistance: '300', // Distance from top before showing element (px) 106 topSpeed: 300, // Speed back to top (ms) 107 animation: 'fade', // Fade, slide, none 108 animationInSpeed: 200, // Animation in speed (ms) 109 animationOutSpeed: 200, // Animation out speed (ms) 110 scrollText: '<i class="ti-angle-double-up"></i><br>Na vrh', // Text for element 111 activeOverlay: false, // Set CSS color to display scrollUp active point, e.g '#00FFFF' 112 }); 113 }; 114 115 //sidebar sticky 116 var stickySidebar = function() { 117 $('.sticky-sidebar').theiaStickySidebar(); 118 }; 119 120 //Custom scrollbar 121 var customScrollbar = function() { 122 var $ = document.querySelector.bind(document); 123 //var ps = new PerfectScrollbar('.custom-scrollbar'); 124 }; 125 126 //Mega menu 127 var megaMenu = function() { 128 $('.sub-mega-menu .nav-pills > a').on('mouseover', function(event) { 129 $(this).tab('show'); 130 }); 131 }; 132 133 //Single post tools 134 var singleTool = function() { 135 if ($(".single-print").length) { 136 $('.single-print').on('click', function() { 137 $('.single-content').printThis(); 138 }); 139 } 140 141 $(".fonts-size-zoom-in").on('click', function() { 142 var size = parseInt($('.single-content').css("font-size")); 143 size = size + 2; 144 $('.single-content').css("font-size", size); 145 }); 146 147 $(".fonts-size-zoom-out").on('click', function() { 148 var size = parseInt($('.single-content').css("font-size")); 149 size = size - 2; 150 $('.single-content').css("font-size", size); 151 }); 152 }; 153 154 /* More articles*/ 155 var moreArticles = function() { 156 $.fn.vwScroller = function(options) { 157 var default_options = { 158 delay: 500, 159 /* Milliseconds */ 160 position: 0.7, 161 /* Multiplier for document height */ 162 visibleClass: '', 163 invisibleClass: '', 164 } 165 166 var isVisible = false;
167 var $document = $(document); 168 var $window = $(window); 169 170 options = $.extend(default_options, options); 171 172 var observer = $.proxy(function() { 173 var isInViewPort = $document.scrollTop() > (($document.height() - $window.height()) * options.position); 174 175 if (!isVisible && isInViewPort) { 176 onVisible(); 177 } else if (isVisible && !isInViewPort) { 178 onInvisible(); 179 } 180 }, this); 181 182 var onVisible = $.proxy(function() { 183 isVisible = true; 184 185 /* Add visible class */ 186 if (options.visibleClass) { 187 this.addClass(options.visibleClass); 188 } 189 190 /* Remove invisible class */ 191 if (options.invisibleClass) { 192 this.removeClass(options.invisibleClass); 193 } 194 195 }, this); 196 197 var onInvisible = $.proxy(function() { 198 isVisible = false; 199 200 /* Remove visible class */ 201 if (options.visibleClass) { 202 this.removeClass(options.visibleClass); 203 } 204 205 /* Add invisible class */ 206 if (options.invisibleClass) { 207 this.addClass(options.invisibleClass); 208 } 209 }, this); 210 211 /* Start observe*/ 212 setInterval(observer, options.delay); 213 214 return this; 215 } 216 217 if ($.fn.vwScroller) { 218 var $more_articles = $('.single-more-articles'); 219 $more_articles.vwScroller({ visibleClass: 'single-more-articles--visible', position: 0.55 }) 220 $more_articles.find('.single-more-articles-close-button').on('click', function() { 221 $more_articles.hide(); 222 }); 223 } 224 } 225 226 /* WOW active */ 227 new WOW().init(); 228 229 230 $('body').bind('contentchanged', function() { 231 openSearchForm(); 232 OffCanvas(); 233 customScrollbar(); 234 scrollToTop(); 235 headerSticky(); 236 stickySidebar(); 237 customSlickSlider(); 238 megaMenu(); 239 mobileMenu(); 240 WidgetSubMenu(); 241 scrollProgress(); 242 niceSelectBox(); 243 singleTool(); 244 moreArticles(); 245 }); 246 247 248 //Load functions 249 $(document).ready(function() { 250 openSearchForm(); 251 OffCanvas(); 252 customScrollbar(); 253 scrollToTop(); 254 headerSticky(); 255 stickySidebar(); 256 megaMenu(); 257 mobileMenu(); 258 WidgetSubMenu(); 259 scrollProgress(); 260 niceSelectBox(); 261 singleTool(); 262 moreArticles(); 263 }); 264 265 266 /** pratite nas na facebooku */ 267 (function(d, s, id) { 268 var js, fjs = d.getElementsByTagName(s)[0]; 269 if (d.getElementById(id)) return; 270 js = d.createElement(s); js.id = id; 271 js.src = "https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.7&appId=128320713991432"; 272 fjs.parentNode.insertBefore(js, fjs); 273 }(document, 'script', 'facebook-jssdk')); 274 275 276 /** bitcoin */ 277 /* (function(b,i,t,C,O,I,N) { 278 window.addEventListener('load',function() { 279 if(b.getElementById(C))return; 280 I=b.createElement(i),N=b.getElementsByTagName(i)[0]; 281 I.src=t;I.id=C;N.parentNode.insertBefore(I, N); 282 },false) 283 })(document,'script','https://widgets.bitcoin.com/widget.js','btcwdgt'); */ 284 285 286 /** 287 * newsletter 288 */ 289 function ml_webform_success_380017() { 290 var $ = ml_jQuery || jQuery; 291 $('.ml-subscribe-form-380017 .ml-block-success').show(); 292 $('.ml-subscribe-form-380017 .ml-block-form').hide(); 293 }; 294 295})(jQuery); 296 297( function( $ ) { 298 299 $( '.swipebox' ).swipebox( { 300 useCSS : true, // false will force the use of jQuery for animations 301 useSVG : true, // false to force the use of png for buttons 302 initialIndexOnArray : 0, // which image index to init when a array is passed 303 hideCloseButtonOnMobile : false, // true will hide the close button on mobile devices 304 removeBarsOnMobile : true, // false will show top bar on mobile devices 305 hideBarsDelay : 3000, // delay before hiding bars on desktop 306 videoMaxWidth : 1140, // videos max width 307 beforeOpen: function() {}, // called before opening 308 afterOpen: null, // called after opening 309 afterClose: function() {}, // called after closing 310 loopAtEnd: false // true will return to the first image after the last image is reached 311 } ); 312 313 314 /* Smooth scroll */ 315 $( '.scroll' ).on( 'click', function () { 316 $( 'html, body' ).animate( { scrollTop: $( $( this ).attr('href') ).offset().top - 15 }, 750 ); // Go 317 return false;
318 }); 319 320} )( jQuery ); 321 322 323 324(function(m,a,i,l,e,r){ m['MailerLiteObject']=e;function f(){ 325 var c={ a:arguments,q:[]};var r=this.push(c);return "number"!=typeof r?r:f.bind(c.q);} 326 f.q=f.q||[];m[e]=m[e]||f.bind(f.q);m[e].q=m[e].q||f.q;r=a.createElement(i); 327 var _=a.getElementsByTagName(i)[0];r.async=1;r.src=l+'?v'+(~~(new Date().getTime()/1000000)); 328 _.parentNode.insertBefore(r,_);})(window, document, 'script', 'https://static.mailerlite.com/js/universal.js', 'ml'); 329 330var ml_account = ml('accounts', '242987', '54d20054daeba', 'load'); 331 332 333/* Poll */ 334// 335// const options = document.querySelectorAll("label"); 336// for (let i = 0; i < options.length; i++) { 337// options[i].addEventListener("click", ()=>{ 338// for (let j = 0; j < options.length; j++) { 339// if(options[j].classList.contains("selected")){ 340// options[j].classList.remove("selected"); 341// } 342// } 343// 344// options[i].classList.add("selected"); 345// for (let k = 0; k < options.length; k++) { 346// options[k].classList.add("selectall"); 347// } 348// 349// let forVal = options[i].getAttribute("for"); 350// let selectInput = document.querySelector("#"+forVal); 351// let getAtt = selectInput.getAttribute("type"); 352// if(getAtt == "checkbox"){ 353// selectInput.setAttribute("type", "radio"); 354// }else if(selectInput.checked == true){ 355// options[i].classList.remove("selected"); 356// selectInput.setAttribute("type", "checkbox"); 357// } 358// 359// let array = []; 360// for (let l = 0; l < options.length; l++) { 361// if(options[l].classList.contains("selected")){ 362// array.push(l); 363// } 364// } 365// if(array.length == 0){ 366// for (let m = 0; m < options.length; m++) { 367// options[m].removeAttribute("class"); 368// } 369// } 370// }); 371// } 372 373 374// google analytics 375/*
vendor: 128 bytes, lines 375-379
375window.dataLayer = window.dataLayer || []; 376function gtag(){dataLayer.push(arguments);} 377gtag('js', new Date()); 378 379gtag('config', '
379UA-37915730-1
vendor: 133 bytes, lines 379-385
379'); 380 381window.dataLayer = window.dataLayer || []; 382function gtag(){dataLayer.push(arguments);} 383gtag('js', new Date()); 384 385gtag('config', '
385G-HS9ZZRN3RB
vendor: 4 bytes, line 385
385');
385*/ 386
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.