1function getViewport(){return{width:window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,height:window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,scrollTop:window.pageYOffset||document.documentElement.scrollTop,scrollLeft:window.pageXOffset||document.documentElement.scrollLeft}}; 2 3var isClickLeftMenu = false; 4 5(function($){ 6 var oldAttr = $.fn.attr; 7 $.fn.attr = function() { 8 var ret = oldAttr.apply(this, arguments); 9 if(this.length>0 && arguments.length == 1 && arguments[0] == 'hash'){var ha = this[0].hash;return ha;} 10 return ret; 11 } 12})(jQuery); 13 14$.fn.load = function(arg) {this.on('load',arg);} 15$.fn.live = function(n,arg) {this.on(n,arg);} 16 17$(function(){ 18 19 const doc = document; 20 21 Array.from(document.querySelectorAll('.pYouTube>iframe[src$="three/"]')).forEach(entry => { 22 }); 23 24 $(".gallery a > img").each(function(a,c){var b=$(this).parent().attr("href");$(this).parent().attr("rel","prettyPhoto[pp_gal]");$(this).parent().attr("href",b).prettyPhoto({show_title:true,overlay_gallery:false})}) 25 $("a[rel^='prettyPhoto']").prettyPhoto({show_title:true,overlay_gallery:false}); 26 27 //--------MENU LEWE--------- 28 var aChildrenLeft = $("div.menuLeft li a"); 29 var aArrayLeft = []; 30 var firstChildMenuLeft = aChildrenLeft[0]; 31 var aFirstHref = $(firstChildMenuLeft).attr('href'); 32 var firstHa = $(firstChildMenuLeft).attr('hash'); 33 34 if(aFirstHref) var aHrf = aFirstHref.replace(firstHa,''); 35 36 for (var i=0; i < aChildrenLeft.length; i++) { 37 var aChildL = aChildrenLeft[i]; 38 var ahref = $(aChildL).attr('href'); 39 var ha = $(aChildL).attr('hash'); 40 41 if(ha != '') aArrayLeft.push(ha); 42 } 43 //------------------------------ 44 45 //--------MENU GÃRNE--------- 46 var aChildren = $("div.menuTop li li a"); 47 var aArray = []; 48 var firstChildMenu = aChildren[0]; 49 var homeFirstHref = $(firstChildMenu).attr('href'); 50 var firstHomeHa = $(firstChildMenu).attr('hash'); 51 52 53 if(homeFirstHref) var aHomeRf = homeFirstHref.replace(firstHomeHa,''); 54 55 for (var i=0; i < aChildren.length; i++) { 56 var aChild = aChildren[i]; 57 58 if($(aChild).attr('hash') != '') { 59 var ahref = $(aChild).attr('href'); 60 var ha = $(aChild).attr('hash'); 61 if (ha != '') aArray.push(ha); 62 } 63 } 64 //------------------------------------ 65 66 /* TOP Menu */ 67 68 var hMenuStart = 1040;//if 0 always hamburger menu 69 70 (function(){ 71 72 var tm = $('div.menuTop>div.inMenu'), 73 bck = false,//$('body').append('<div style="display:none;position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,0.6);z-index:9"></div>').children(':last').get(0), 74 right = false, 75 hasHMenu = false, 76 hMenu = $('div.menuTop>a.showMenu'), 77 fnClick = function(e){ 78 79 if(typeof $('div.menuParent')[0] != 'undefined'){ 80 var posMl = $('div.menuParent').position(); 81 if(posMl.left == 0){ 82 $('div.menuParent').trigger('click'); 83 } 84 } 85 86 e.preventDefault(); 87 88 var hasVisible = tm.hasClass('show'); 89 90 if(right === false){ 91 92 right = tm.hasClass('show'); 93 94 //right = tm.outerWidth() * -1; 95 if(!hasVisible){ 96 tm.addClass('show'); 97 98 //tm.css({right:right}); 99 } 100 } 101 102 103 if(hasVisible){ 104 105 /* 106 tm.animate({right:right},100,function(){ 107 $(this).hide(); 108 $('body').removeAttr('style'); 109 if(bck) 110 bck.style.display = 'none'; 111 }); 112 */ 113 $('body').removeAttr('style'); 114 tm.removeClass('show'); 115 $(this).removeClass('selShow'); 116 $('.showBckMenu').removeClass('showBg'); 117 118 119 } else { 120 121 // if(bck) 122 // bck.style.display = 'block'; 123 124 $('.showBckMenu').addClass('showBg'); 125 $('body').css({overflow:'hidden'}); 126 //tm.show().animate({right:0},100,function(){ 127 //$('body').css({overflow:'hidden',position:'fixed',width:'100%'});
128 //}); 129 tm.addClass('show'); 130 $(this).addClass('selShow'); 131 132 } 133 }; 134 135 hMenu.on('click', fnClick); 136 137 //if(bck) 138 // bck.addEventListener('click', fnClick); 139 140 if(hMenuStart > 0){ 141 oListenSize([hMenuStart], function( size, isLess ){ 142 if(!isLess){ 143 hasHMenu = false; 144 //if(bck) 145 // bck.style.display = 'none'; 146 $('body').removeAttr('style'); 147 tm.removeAttr('style'); 148 } else { 149 hasHMenu = true; 150 } 151 }); 152 } else hasHMenu = true; 153 154 /* HASH Link */ 155 var hash = document.querySelectorAll('li.runHash>a'), 156 l = hash.length, 157 i = 0, 158 runID = function(){ 159 var ha = this.hash, 160 $elem = $(ha); 161 162 i = 0; 163 for( ; i < l; i++ ){ 164 var parent = hash[i].parentNode, 165 cName = parent.className.replace(/\s+sel|sel\s*/g, ''); 166 167 if(hash[i].hash === ha){ 168 169 parent.className = cName + ( parent.className ? ' ' : '' ) + 'sel'; 170 171 var p = parent.parentNode; 172 while(p !== null && p.nodeType === 1 && ( p.tagName === 'UL' || p.tagName === 'LI' )){ 173 174 if(p.tagName === 'LI' && /(?:\s|^)runHash(?:\s|$)/.test(p.className)){ 175 $(p).addClass('sel') 176 .children('a') 177 .addClass('sel'); 178 } 179 180 p = p.parentNode; 181 182 } 183 184 } else { 185 parent.className = cName; 186 } 187 188 hash[i].className = parent.className; 189 190 } 191 192 if(hasHMenu){ 193 hMenu.trigger('click', fnClick); 194 } 195 196 $('html, body').animate({ 197 scrollTop: $elem.offset().top- parseInt($('.menuTop').height()) 198 }, 1000); 199 }; 200 201 for( ; i < l; i++ ){ 202 if(hash[i].hash){ 203 hash[i].addEventListener('click', runID); 204 if(location.hash === hash[i].hash){ 205 var parent = hash[i].parentNode, 206 cName = parent.className.replace(/\s+sel|sel\s*/g, ''); 207 parent.className = cName + ( parent.className ? ' ' : '' ) + 'sel'; 208 hash[i].className = parent.className; 209 } 210 } 211 } 212 /* EOT HASH Link */ 213 })(); 214 /* EOT TOP Menu */ 215 216 var hBoxTop = 1; 217 218 if($('.menuTop')[0] != undefined){ 219 var v = getViewport(); 220 if(hMenuStart > 0 && v.width <= hMenuStart) hBoxTop = 1; 221 else hBoxTop = $('.box_top').height(); 222 } 223 224 225 226 //----------------------------- 227 228 var scrollDownObj = null, 229 isMenuFix = 0, //MENU 230 posMenu = 0,//MENU 231 heightMenu = 0,//MENU 232 timeoutLId = null,//MENU 233 //hBoxTop = 1,//MENU 234 isFix = 0,//MENU 235 scrollOld = 0, 236 heightBoxScroll = 0 237 238 resizeFn = function(){ 239 240 heightBoxScroll = $('.boxScroll').height(); 241 242 //------------------ TOP IMAGE ----------------- 243 244 var contImage = $('#box_image > img').width(), 245 w = Math.min(contImage,$(document).width()); 246 247 if(w < contImage){ 248 $('#box_image > img').css('left',-((contImage-w)/2)); 249 $('#box_image > img').css('visibility','visible'); 250 } 251 else{ 252 $('#box_image > img').css('left',((w-contImage)/2)); 253 $('#box_image > img').css('visibility','visible'); 254 } 255 256 //------------------------------------------ 257 258 if(scrollDownObj === null){ 259 260 scrollDownObj = { 261 obj:$('body').append('<a href="#" class="scrollDown"></a>').find('a.scrollDown'), 262 stat: 0 263 }; 264 scrollDownObj.obj.on('click', function(e){
265 $('html,body').animate({scrollTop:0},400); 266 $(this).css('opacity',0.3).hide(); 267 e.preventDefault(); 268 }); 269 } 270 }, 271 scrollFn = function(){ 272 273 var scrollTop = getViewport().scrollTop; 274 275 //--------- MENU GORNE MENU LEWE------------------- 276 var windowHeight = $(window).height(); 277 var docHeight = $(document).height(); 278 279 280 //---------------- MENU LEWE ZAZNACZENIE AKTYWNEJ----------------------- 281 for (var i=0; i < aArrayLeft.length; i++) { 282 283 var theID = aArrayLeft[i]; 284 285 if($(theID)[0] != undefined){ 286 var divPos = $(theID).offset().top; 287 var divHeight = $(theID).parent().height(); 288 var actH; 289 290 divPos = divPos - divHeight/3; 291 292 if (scrollTop >= divPos && scrollTop < (divPos + divHeight)) { 293 if (timeoutLId) clearTimeout(timeoutLId); 294 295 $("div.menuLeft li").removeClass("sel"); 296 $("div.menuLeft a[href='"+aHrf+"" + theID + "']").parent().addClass("sel"); 297 actH = theID; 298 } 299 } 300 } 301 302 //if($("div.menuLeft .sel")[0] == undefined){ 303 // $(firstChildMenuLeft).parent().addClass("sel"); 304 //} 305 306 //------------------------------------------------- 307 308 309 //---------------- MENU LEWE FIXED----------------------- 310 if($('.menuLinks')[0] != undefined){ 311 312 if(isMenuFix == 0){ 313 heightMenu = $('.menuLinks').height(); 314 } 315 316 if(heightMenu < $(window).height() && heightMenu < $('.content-text').height()){ 317 318 var v = getViewport(); 319 var timeoutId = null; 320 321 if (timeoutId) clearTimeout(timeoutId); 322 // timeoutId = setTimeout(function(){ 323 324 var contentPos = $('.content-text').position().top+$('.content-text').height(); 325 var menuLeftOuter = $('.menuLinks').height()+window.scrollY; 326 var contentPos2 = contentPos-parseInt($('.boxScroll').height()); 327 var contentPos3 = contentPos-parseInt($('.boxScroll').height()); 328 329 if(contentPos2 <= menuLeftOuter){ 330 $('.menuLinks').css('top','auto'); 331 $('.menuLinks').css('top',contentPos-$('.menuLinks').height()); 332 $('.menuLinks').addClass('menuAbs'); 333 } 334 else{ 335 $('.menuLinks').removeClass('menuAbs'); 336 //$('.menuLinks').css('top',parseInt($('.boxScroll').height())); 337 $('.menuLinks').css('top',0); 338 if($('.boxScroll').hasClass('scrolShow')){ 339 $('.menuLinks').css('top',$('.boxScroll').height()); 340 } 341 } 342 343 //var posContent = $('.content-text')[0].getBoundingClientRect().top-parseInt($('.boxScroll').height()); 344 var posContent = $('.content-text')[0].getBoundingClientRect().top; 345 346 if(posContent<= 0){ 347 isMenuFix = 1; 348 $('.menuLinks').addClass('menuFix'); 349 } 350 else{ 351 if(scrollTop<$('.content-text')[0].getBoundingClientRect().top) { 352 isMenuFix = 0; 353 $('.menuLinks').removeClass('menuFix'); 354 } 355 } 356 357 //}, 20); 358 } 359 } 360 361 //----------------------------------------- 362 363 for (var i=0; i < aArray.length; i++) { 364 365 var theID = aArray[i]; 366 367 if($(theID)[0] != undefined){ 368 var divPos = $(theID).offset().top; 369 var divHeight = $(theID).parent().height(); 370 var actH; 371 372 divPos = divPos - divHeight/3; 373 374 if (scrollTop >= divPos && scrollTop < (divPos + divHeight)) { 375 376 //$("div.menuTop li li").removeClass("sel"); 377 $("div.menuTop a[href='"+aHrf+"" + theID + "']").parent().addClass("sel"); 378 379 actH = theID; 380 } 381 } 382 } 383 384 385 /* 386 //---------------- MENU GORNE ZAZNACZENIE AKTYWNEJ----------------------- 387 for (var i=0; i < aArray.length; i++) { 388 var theID = aArray[i]; 389 390 if($(theID)[0] != undefined){ 391 392 var divPos = $(theID).offset().top-100; 393 var divHeight = $(theID).parent().height(); 394 395 var actH; 396 397 if (scrollTop >= divPos && scrollTop < (divPos + divHeight)) { 398 $("div.menuTop li li").removeClass("sel"); 399 $("div.menuTop a[href='"+aHomeRf+"" + theID + "']").parent().addClass("sel"); 400 401 actH = theID; 402 } else { 403 $("div.menuTop a[href!='/" + actH + "']").parent().removeClass("sel"); 404 } 405 } 406 } 407 408 if($("div.menuTop .sel")[0] == undefined){ 409 $(firstChildMenu).parent().addClass("sel"); 410 } 411 //-------------------------------------------------------- 412 */ 413 /* 414 //---------------- MENU GORNE FIXED ----------------------- 415 if(scrollTop >= hBoxTop && isFix == 0){ 416 isFix = 1; 417 $('body').addClass('hfix'); 418 }else if(scrollTop < hBoxTop && isFix == 1){ 419 isFix = 0; 420 $('body').removeClass('hfix'); 421 } 422 //------------------------------------------------------- 423 */ 424 425 426 427 428 //window.setTimeout(function(){ 429 if($('.boxScroll').hasClass('scrolShow') && scrollTop == 0){ 430 $('.boxScroll').removeClass('scrolShow'); 431 } 432 if((heightBoxScroll+50)-scrollTop<0){ 433 $('.boxScroll').addClass('scrollUp'); 434 435 if(scrollOld-scrollTop > 0){ 436 $('.boxScroll').addClass('scrolShow'); 437 $('.boxScroll').css('top','0px'); 438 } 439 else{ 440 $('.boxScroll').removeClass('scrolShow'); 441 $('.boxScroll').css('top',-(heightBoxScroll+50)+'px'); 442 } 443 } 444 else{ 445 if(!$('.boxScroll').hasClass('scrolShow')) $('.boxScroll').css('top', -scrollTop); 446 $('.boxScroll').removeClass('scrollUp'); 447 } 448 449 scrollOld = scrollTop; 450 451 //},1); 452 453 454 if(getViewport().height < scrollTop){ 455 if(scrollDownObj.stat === 1) return; 456 scrollDownObj.obj.show(); 457 scrollDownObj.stat = 1; 458 } else { 459 if(scrollDownObj.stat === 2) return; 460 scrollDownObj.obj.hide(); 461 scrollDownObj.stat = 2; 462 } 463 464 }; 465 466 $(window) 467 .on('resize', resizeFn) 468 .trigger('resize', resizeFn) 469 .on('scroll', scrollFn) 470 .trigger('scroll', scrollFn); 471 472 473 var ha = window.location.hash; 474 475 if($(ha).length>0 && ha != ''){ 476 $('.menuTop').find('li a').each(function(){ 477 if($(this).attr('hash') == ha){ 478 $(this).parent().addClass('sel'); 479 } 480 }); 481 482 483 var v = getViewport(); 484 let heightMenu = $('.box_top_menu').height(); 485 486 $('html, body').animate({
487 scrollTop: v.scrollTop+$(ha)[0].getBoundingClientRect().top - heightMenu-120 488 }, 1000); 489 } 490 //---------------------------------------- 491 492 493 /* 494 //----- MENU GORNE ZAZNACZENIE AKTYWNEJ 495 var ha = window.location.hash; 496 497 if(ha != ''){ 498 $('.menuLeft').find('li').removeClass('sel'); 499 $('.menuLeft').find('li a').each(function(){ 500 501 if($(this).attr('hash') == ha){ 502 $(this).parent().addClass('sel'); 503 } 504 }) 505 } 506 //---------------------------------------- 507 */ 508 509 510 $('.divDomain li') 511 .mouseenter(function() { 512 if($(this).hasClass('sel')){ 513 $(this).parent().find('.sel').removeClass('activ'); 514 }else { 515 $(this).parent().find('.sel').addClass('activ'); 516 } 517 }) 518 .mouseleave(function() { 519 $(this).parent().find('.sel').removeClass('activ'); 520 }) 521 522 523 524 $('.menuTop .inMenu ul a').on('click',function(e){ 525 if(hMenuStart>=getViewport().width){ 526 527 if($(this).parent().find('ul').length>0){ 528 e.preventDefault(); 529 530 if($(this).parent().hasClass('sel')) $(this).parent().removeClass('sel'); 531 else $(this).parent().addClass('sel'); 532 } 533 534 } 535 }) 536 537 if($('table')[0] != undefined){ 538 539 $('table').each(function(){ 540 var divTable = $('<div>'); 541 var divTable2 = $('<div>'); 542 divTable.addClass('pTable'); 543 divTable2.addClass('pTable2'); 544 var tableD = $(this); 545 $(divTable).insertBefore(tableD); 546 547 $(divTable).append(tableD); 548 }); 549 550 } 551 552 553 $('.menuTop>.inMenu>ul>li>.subMenu').on('click',function(e){ 554 e.preventDefault(); 555 if($(this).parent().hasClass('active')){ 556 $(this).parent().removeClass('active'); 557 }else { 558 $(this).parent().addClass('active'); 559 } 560 }) 561 562 $('.menuTop>.inMenu>ul>li>.subMenu').on('mouseleave',function(e){ 563 if($(this).parent().hasClass('active')){ 564 $(this).parent().removeClass('active'); 565 } 566 }); 567 568 569 570 571}); 572 573 574//------------------- MENU GORNE --------------------- 575function runID(el){ 576 577 var ha = el.hash; 578 if(typeof $(ha)[0] !== 'undefined'){ 579 580 var v = getViewport(); 581 582 $(el).parent().siblings().removeClass('sel'); 583 $(el).parent().addClass('sel'); 584 585 if(ha != ''){ 586 $('.menuLeft').find('li').removeClass('sel'); 587 $('.menuLeft').find('li a').each(function(){ 588 589 if($(this).attr('hash') == ha){ 590 $(this).parent().addClass('sel'); 591 } 592 }) 593 } 594 595 if(v.width <= 1040){ 596 let tm = $('div.menuTop>div.inMenu'); 597 $('body').removeAttr('style'); 598 tm.removeClass('show'); 599 $('.showMenu').removeClass('selShow'); 600 $('.showBckMenu').removeClass('showBg'); 601 /* 602 var tm = $('div.menuTop>div.inMenu'), 603 right = tm.outerWidth() * -1; 604 605 tm.animate({right:right},100,function(){ 606 $(this).hide(); 607 $('body').removeAttr('style'); 608 }); 609 */ 610 } 611 612 613 $('html, body').animate({ 614 scrollTop: $(ha).offset().top- parseInt($('.menuTop').height()+120) 615 }, 1000); 616 } 617} 618// EOT MENU GORNE ------------------------------------------- 619 620$(function() { 621 $('#changeLang').find('li').bind('click',function() { 622 if($(this).hasClass('sel')) { 623 $(this).parent().find('li').each(function() { 624 if($(this).hasClass('sel')==false) { 625 if($(this).css('display')=='none') { 626 $(this).addClass('animatedLang'); 627 $(this).addClass('fadeInDownMenu'); 628 $(this).addClass('langAnim'); 629 } 630 else { 631 $(this).removeClass('fadeInDownMenu'); 632 $(this).addClass('fadeOutUpMenu'); 633 $(this).one('webkitAnimationEnd oanimationend msAnimationEnd animationend',function(e) { 634 $(this).off('webkitAnimationEnd oanimationend msAnimationEnd animationend'); 635 $(this).removeClass('animatedLang'); 636 $(this).removeClass('langAnim'); 637 $(this).removeClass('fadeOutUpMenu'); 638 } 639 ); 640 } 641 } 642 } 643 ) 644 } 645 else { 646 window.location=$(this).find('a').attr('href'); 647 } 648 return false; 649 } 650 ) 651 } 652); 653 654 655/* 656$(window).load(function(){ 657 658 //--------------- SCROLL DO TEKSTU ------------ 659 var v = getViewport(); 660 offHeight = 70; 661 662 //if(v.width <= 768){ 663 if($('.content-text')[0] != undefined){ 664 665 666 667 $('html, body').animate({ 668 scrollTop: $('.content-text').offset().top-offHeight 669 }, 1000); 670 } 671 //} 672 673 //------------------------------------- 674 675//-------------- modul szukaj ------------------- 676 677 $('.modSearchBttn').on('click',function(e){
678 679 680 681 $( "#formSearch" ).toggle( 0, function() { 682 683 if(!$('#formSearch').is(':visible')){ 684 $('#formSearch').removeAttr('style',''); 685 } 686 else{ 687 $('#formSearch').css('display','block'); 688 } 689 690 691 }); 692 693 if($('#formSearch').is(':visible')) 694 $('input[type="text"]', '#formSearch').val('').focus(); 695 tm.css({right:'-90%',display:'none'}); 696 $('body').removeAttr('style'); 697 698 e.preventDefault(); 699 e.stopPropagation(); 700 701 702 }) 703 704 //------------------------------------------- 705 706 707 708}); 709 */ 710 711 712 713
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.