1/* <![CDATA[ */ 2/*global $:false */ 3jQuery(document).ready(function() { 4 5 "use strict"; 6 //resize Alamance County Programs function 7 resizePrograms(); 8 jQuery(window).on('resize', function(){ 9 resizePrograms(); 10 }); 11 12 // main-menu functions 13 jQuery('.main-menu .has-submenu').click(function(ev){ 14 ev.preventDefault(); 15 ev.stopPropagation(); 16 var title = jQuery(this).text(); 17 var submenu = jQuery(this).siblings('.submenu').html(); 18 jQuery('.main-menu-stage-ct').html(submenu); 19 jQuery('.main-menu-stage-ct').prepend('<h3>'+title+'</h3>'); 20 jQuery('.main-menu-stage').addClass('active'); 21 jQuery('.search-stage').removeClass('active'); 22 jQuery('.toggle-search').removeClass('active'); 23 jQuery('.main-menu-stage .show-childrens').click(function(ev){ 24 ev.preventDefault(); 25 if ( jQuery(this).hasClass('active')) { 26 jQuery(this).removeClass('active'); 27 jQuery(this).parents('.top').siblings('ul').animate({opacity: 'hide', height: 'hide'}, 700, 'easeOutQuint'); 28 } else { 29 jQuery(this).parents('li').siblings('li').each(function(){ 30 if (jQuery(this).find('.show-childrens').hasClass('active')) { 31 jQuery(this).find('.show-childrens').removeClass('active'); 32 jQuery(this).find('ul').animate({opacity: 'hide', height: 'hide'}, 700, 'easeOutQuint'); 33 } 34 }); 35 jQuery(this).addClass('active'); 36 jQuery(this).parents('.top').siblings('ul').animate({opacity: 'show', height: 'show'}, 700, 'easeOutQuint'); 37 } 38 }); 39 }); 40 jQuery('.main-menu-stage .close-menu').click(function(ev){ 41 ev.stopPropagation(); 42 jQuery('.main-menu-stage').removeClass('active'); 43 }); 44 jQuery('body').click(function(ev){ 45 jQuery('.main-menu-stage').removeClass('active'); 46 }); 47 jQuery('.main-menu-stage-ct').click(function(ev){ 48 ev.stopPropagation(); 49 }); 50 jQuery('.page-sidebar').click(function(ev){ 51 ev.stopPropagation(); 52 }); 53 54 // search 55 jQuery('.toggle-search').click(function(ev){ 56 ev.stopPropagation(); 57 if ( jQuery(this).hasClass('active')) { 58 jQuery(this).removeClass('active'); 59 jQuery('.search-stage').removeClass('active'); 60 } else { 61 jQuery(this).addClass('active'); 62 jQuery('.search-stage').addClass('active'); 63 jQuery('.main-menu-stage').removeClass('active'); 64 jQuery('.toggle-mobile-menu').removeClass('active'); 65 jQuery('body').removeClass('mobile-menu-active'); 66 jQuery('.toggle-mobile-menu .top-line').removeClass('rotate'); 67 jQuery('.toggle-mobile-menu .top-line').removeClass('middle'); 68 jQuery('.toggle-mobile-menu .bottom-line').removeClass('rotate'); 69 jQuery('.toggle-mobile-menu .bottom-line').removeClass('middle'); 70 } 71 }); 72 jQuery('.search-stage .close-search').click(function(ev){ 73 jQuery('.search-stage').removeClass('active'); 74 jQuery('.toggle-search').removeClass('active'); 75 }); 76 jQuery('body').click(function(ev){ 77 jQuery('.search-stage').removeClass('active'); 78 jQuery('.toggle-search').removeClass('active'); 79 }); 80 jQuery('.search-stage-ct').click(function(ev){ 81 ev.stopPropagation(); 82 }); 83 84 /* mobile-menu */ 85 jQuery('.toggle-mobile-menu').click(function(ev){ 86 ev.stopPropagation(); 87 if ( jQuery(this).hasClass('active')) { 88 jQuery(this).removeClass('active'); 89 jQuery('body').removeClass('mobile-menu-active'); 90 jQuery(this).find('.top-line').removeClass('rotate'); 91 jQuery(this).find('.top-line').removeClass('middle'); 92 jQuery(this).find('.bottom-line').removeClass('rotate'); 93 jQuery(this).find('.bottom-line').removeClass('middle'); 94 95 } else { 96 jQuery(this).addClass('active'); 97 jQuery('body').addClass('mobile-menu-active'); 98 jQuery('.search-stage').removeClass('active'); 99 jQuery('.toggle-search').removeClass('active'); 100 jQuery(this).find('.top-line').addClass('middle'); 101 jQuery(this).find('.top-line').addClass('rotate'); 102 jQuery(this).find('.bottom-line').addClass('middle'); 103 jQuery(this).find('.bottom-line').addClass('rotate'); 104 } 105 }); 106 jQuery('body').click(function(){ 107 jQuery('.toggle-mobile-menu').removeClass('active'); 108 jQuery('body').removeClass('mobile-menu-active'); 109 jQuery('.toggle-mobile-menu .top-line').removeClass('rotate'); 110 jQuery('.toggle-mobile-menu .top-line').removeClass('middle'); 111 jQuery('.toggle-mobile-menu .bottom-line').removeClass('rotate'); 112 jQuery('.toggle-mobile-menu .bottom-line').removeClass('middle'); 113 }); 114 jQuery('.mobile-menu').click(function(ev) { 115 ev.stopPropagation(); 116 }); 117 118 /* share functions */ 119 jQuery('.show-share-list').click(function(ev){ 120 ev.preventDefault(); 121 if ( jQuery(this).hasClass('active')) { 122 jQuery(this).removeClass('active'); 123 jQuery(this).siblings('.share-list').animate({opacity: 'hide', height: 'hide'}, 700, 'easeOutQuint'); 124 } else { 125 jQuery(this).addClass('active'); 126 jQuery(this).siblings('.share-list').animate({opacity: 'show', height: 'show'}, 700, 'easeOutQuint'); 127 } 128 }); 129 jQuery('body').click(function(){ 130 if ( jQuery('.show-share-list').hasClass('active')) { 131 jQuery('.show-share-list').removeClass('active'); 132 jQuery('.share-list').animate({opacity: 'hide', height: 'hide'}, 700, 'easeOutQuint'); 133 } 134 }); 135 jQuery('.share').click(function(ev) { 136 ev.stopPropagation(); 137 }); 138 139 /* styling selects */ 140 jQuery('select').selectize(); 141 142 // back to top 143 jQuery('.back-to-top').click(function(){ 144 jQuery("html, body").animate({scrollTop: 0}, 300); 145 }); 146 147 // responsive tables 148 jQuery(window).on('load', function(){ 149 jQuery('.wysiwyg table').each(function(){ 150 jQuery(this).wrap('<div class="table-holder"></div>').promise().done(function(){ 151 jQuery(this).parent('.table-holder').append('<span class="msg">
151Swipe horizontally to view all fields.</span>'); 152 }); 153 var Twidth = jQuery(this).width(); 154 var Pwidth = jQuery(this).parent('.table-holder').width(); 155 if (Pwidth < Twidth) { 156 jQuery(this).parent('.table-holder').find('.msg').show(); 157 } else { 158 jQuery(this).parent('.table-holder').find('.msg').hide(); 159 } 160 }); 161 }); 162 jQuery(window).on('resize', function(){ 163 jQuery('.wysiwyg table').each(function(){ 164 var Twidth = jQuery(this).width(); 165 var Pwidth = jQuery(this).parent('.table-holder').width(); 166 if (Pwidth < Twidth) { 167 jQuery(this).parent('.table-holder').find('.msg').show(); 168 } else { 169 jQuery(this).parent('.table-holder').find('.msg').hide(); 170 } 171 }); 172 }); 173 174 // mobile-related functions 175 jQuery('.toggle-mobile-sidebar').click(function(ev){ 176 ev.stopPropagation(); 177 if ( jQuery(this).hasClass('active')) { 178 jQuery(this).removeClass('active'); 179 jQuery('.page-top').animate({height: 'hide'}, 700, 'easeOutQuint'); 180 jQuery(this).find('.top-line').removeClass('rotate'); 181 jQuery(this).find('.top-line').removeClass('middle'); 182 jQuery(this).find('.bottom-line').removeClass('rotate'); 183 jQuery(this).find('.bottom-line').removeClass('middle'); 184 } else { 185 jQuery(this).addClass('active'); 186 jQuery('.page-top').animate({height: 'show'}, 700, 'easeOutQuint'); 187 jQuery(this).find('.top-line').addClass('middle'); 188 jQuery(this).find('.top-line').addClass('rotate'); 189 jQuery(this).find('.bottom-line').addClass('middle'); 190 jQuery(this).find('.bottom-line').addClass('rotate'); 191 } 192 }); 193 194 // sort item functions 195 jQuery('.sort-item .sort-item-top').click(function(){ 196 if ( jQuery(this).hasClass('active')) { 197 jQuery(this).removeClass('active'); 198 jQuery(this).siblings('.sort-item-list').animate({opacity: 'hide', height: 'hide'}, 700, 'easeOutQuint'); 199 } else { 200 jQuery(this).parents('li').siblings('li').each(function(){ 201 if (jQuery(this).find('.sort-item-top').hasClass('active')) { 202 jQuery(this).find('.sort-item-top').removeClass('active'); 203 jQuery(this).find('.sort-item-list').animate({opacity: 'hide', height: 'hide'}, 700, 'easeOutQuint', function () {}); 204 } 205 }); 206 jQuery(this).addClass('active'); 207 jQuery(this).siblings('.sort-item-list').animate({opacity: 'show', height: 'show'}, 700, 'easeOutQuint'); 208 } 209 }); 210 jQuery('body').click(function(){ 211 jQuery('.sort-item').each(function(){ 212 if (jQuery(this).find('.sort-item-top').hasClass('active')) { 213 jQuery(this).find('.sort-item-top').removeClass('active'); 214 jQuery(this).find('.sort-item-list').animate({opacity: 'hide', height: 'hide'}, 700, 'easeOutQuint', function () {}); 215 } 216 }); 217 }); 218 jQuery('.sort-item').click(function(ev) { 219 ev.stopPropagation(); 220 }); 221 222 // home rotator functions 223 jQuery(window).on('resize', function(){ 224 if (jQuery('.home-rotator').length) { 225 var winHeight = jQuery(window).height(); 226 jQuery('.home-rotator .slides .slide').css('height', winHeight - 25 +'px'); 227 } 228 }).resize(); 229 jQuery('.home-rotator .slides').slick({ 230 speed: 500, 231 fade: true, 232 arrows: true, 233 autoplay: true, 234 autoplaySpeed: 6000, 235 pauseOnHover: false, 236 dots: true 237 }); 238 jQuery('.home-rotator .slide').each(function(){ 239 var $HRparallax = jQuery(this).find('.image'); 240 var yPos = jQuery(window).scrollTop() / 5; 241 $HRparallax.css({ "transform": "translate3d(0px, " + yPos + "px, 0px)" }); 242 jQuery(window).scroll(function() { 243 var yPos = jQuery(window).scrollTop() / 5; 244 $HRparallax.css({ "transform": "translate3d(0px, " + yPos + "px, 0px)" }); 245 }); 246 }); 247 248 // home-info functions 249 var stc = false;
250 jQuery(window).on('load', function(){ 251 if (jQuery('.home-info').length && !stc) { 252 if (isIntoView(jQuery('.home-info'))) { 253 stc = true; 254 jQuery('.home-info .text').animate({opacity: 1}, 700, 'easeOutQuint'); 255 jQuery('.home-info .count').each(function () { 256 jQuery(this).prop('Counter',0).animate({ 257 Counter: jQuery(this).text() 258 }, { 259 duration: 2000, 260 easing: 'swing', 261 step: function (now) { 262 jQuery(this).text(Math.ceil(now)); 263 } 264 }); 265 }); 266 } 267 } 268 }); 269 jQuery(window).scroll(function() { 270 if (jQuery('.home-info').length && !stc) { 271 if (isIntoView(jQuery('.home-info'))) { 272 stc = true; 273 jQuery('.home-info .text').animate({opacity: 1}, 700, 'easeOutQuint'); 274 jQuery('.home-info .count').each(function () { 275 jQuery(this).prop('Counter',0).animate({ 276 Counter: jQuery(this).text() 277 }, { 278 duration: 2000, 279 easing: 'swing', 280 step: function (now) { 281 jQuery(this).text(Math.ceil(now)); 282 } 283 }); 284 }); 285 } 286 } 287 }); 288 289 // featured posts functions 290 jQuery('.featured-posts .slides').slick({ 291 speed: 500, 292 fade: true, 293 arrows: false, 294 autoplay: true, 295 autoplaySpeed: 6000, 296 pauseOnHover: true 297 }); 298 299 // home-testimonials functions 300 jQuery('.home-testimonials .slides').slick({ 301 speed: 500, 302 fade: true, 303 arrows: true, 304 autoplay: true, 305 autoplaySpeed: 6000, 306 pauseOnHover: true 307 }); 308 309 // Staff functions 310 jQuery('.entry-staff-content').click(function(ev){ 311 ev.stopPropagation(); 312 }); 313 jQuery('.entry-staff').click(function(ev){ 314 ev.stopPropagation(); 315 if ( jQuery(this).hasClass('active') ) { 316 jQuery(this).removeClass('active'); 317 var optHeight = jQuery(this).children('.entry-staff-content').height(); 318 jQuery(this).children('.entry-staff-content').animate({ 319 'height': 0+'px' 320 }, 700, 'easeOutQuint', function() { 321 jQuery(this).css('display', 'none'); 322 jQuery(this).css('height', optHeight+'px'); 323 }); 324 jQuery(this).animate({ 325 'marginBottom': 40 +'px' 326 }, 700, 'easeOutQuint', function() { 327 }); 328 } else { 329 jQuery(this).siblings('.entry-staff').each(function(){ 330 jQuery(this).removeClass('active'); 331 jQuery(this).animate({ 332 'marginBottom': 40+'px' 333 }, 700, 'easeOutQuint', function() { 334 }); 335 var optHeight = jQuery(this).children('.entry-staff-content').height(); 336 jQuery(this).children('.entry-staff-content').animate({ 337 'height': 0+'px' 338 }, 700, 'easeOutQuint', function() { 339 jQuery(this).css('display', 'none'); 340 jQuery(this).css('height', optHeight+'px'); 341 }); 342 }); 343 jQuery(this).addClass('active'); 344 var optHeight = jQuery(this).children('.entry-staff-content').height(); 345 jQuery(this).children('.entry-staff-content').css('height', 0+'px'); 346 jQuery(this).children('.entry-staff-content').css('display', 'block'); 347 jQuery(this).children('.entry-staff-content').animate({ 348 'height': optHeight+'px' 349 }, 700, 'easeOutQuint', function() { 350 jQuery(this).css('height', 'auto'); 351 }); 352 jQuery(this).animate({ 353 'marginBottom': optHeight + 40 +'px' 354 }, 700, 'easeOutQuint', function() { 355 var PitemOffset = jQuery(this).offset(); 356 var windowW = jQuery(window).width(); 357 if (windowW < 767) { 358 jQuery("html, body").animate({scrollTop: (PitemOffset.top - 100)}, 700, 'easeOutQuint'); 359 } else { 360 jQuery("html, body").animate({scrollTop: (PitemOffset.top - 220)}, 700, 'easeOutQuint'); 361 } 362 }); 363 } 364 }); 365 jQuery('html').click(function() { 366 jQuery('.entry-staff').each(function(){ 367 if ( jQuery(this).hasClass('active') ) { 368 jQuery(this).removeClass('active'); 369 var optHeight = jQuery(this).children('.entry-staff-content').height(); 370 jQuery(this).children('.entry-staff-content').animate({ 371 'height': 0+'px' 372 }, 700, 'easeOutQuint', function() { 373 jQuery(this).css('display', 'none'); 374 jQuery(this).css('height', optHeight+'px'); 375 }); 376 jQuery(this).animate({ 377 'marginBottom': 40 +'px' 378 }, 700, 'easeOutQuint', function() { 379 }); 380 } 381 }); 382 }); 383 jQuery('.entry-staff .close-staff-content').click(function(ev) { 384 ev.preventDefault(); 385 jQuery(this).parents('.entry-staff').removeClass('active'); 386 var optHeight = jQuery(this).parents('.entry-staff').children('.entry-staff-content').height(); 387 jQuery(this).parents('.entry-staff').children('.entry-staff-content').animate({ 388 'height': 0+'px' 389 }, 700, 'easeOutQuint', function() { 390 jQuery(this).css('display', 'none'); 391 jQuery(this).css('height', optHeight+'px'); 392 }); 393 jQuery(this).parents('.entry-staff').animate({ 394 'marginBottom': 40 +'px' 395 }, 700, 'easeOutQuint', function() { 396 }); 397 }); 398 jQuery('.entry-staff .entry-staff-details .mail').click(function(ev) { 399 ev.stopPropagation(); 400 }); 401 402 // video functions 403 jQuery(".video-popup").colorbox({ 404 iframe: true, 405 innerWidth: 640, 406 innerHeight: 409, 407 maxWidth: '95%', 408 maxHeight: '95%' 409 }); 410 411 // home programs functions 412 jQuery('.home-programs ul').slick({ 413 speed: 500, 414 arrows: true, 415 autoplay: true, 416 autoplaySpeed: 5000, 417 pauseOnHover: false, 418 dots: false, 419 slidesToShow: 4, 420 slidesToScroll: 4, 421 responsive: [ 422 { 423 breakpoint: 991, 424 settings: { 425 slidesToShow: 3, 426 slidesToScroll: 3 427 } 428 }, 429 { 430 breakpoint: 767, 431 settings: { 432 slidesToShow: 1, 433 slidesToScroll: 1 434 } 435 } 436 ] 437 }); 438 439 // members functions 440 jQuery('.members-list ul').slick({ 441 speed: 500, 442 arrows: true, 443 autoplay: true, 444 autoplaySpeed: 5000, 445 pauseOnHover: false, 446 dots: false, 447 slidesToShow: 3, 448 slidesToScroll: 3, 449 responsive: [ 450 { 451 breakpoint: 991, 452 settings: { 453 slidesToShow: 3, 454 slidesToScroll: 3,
455 arrows: false 456 } 457 }, 458 { 459 breakpoint: 767, 460 settings: { 461 slidesToShow: 1, 462 slidesToScroll: 1, 463 arrows: false 464 } 465 } 466 ] 467 }); 468 469 // credits rotator functions 470 jQuery('.credits ul').slick({ 471 speed: 500, 472 arrows: false, 473 autoplay: true, 474 autoplaySpeed: 5000, 475 pauseOnHover: false, 476 dots: false, 477 slidesToShow: 4, 478 slidesToScroll: 4, 479 responsive: [ 480 { 481 breakpoint: 991, 482 settings: { 483 slidesToShow: 2, 484 slidesToScroll: 2, 485 arrows: false 486 } 487 }, 488 { 489 breakpoint: 767, 490 settings: { 491 slidesToShow: 1, 492 slidesToScroll: 1, 493 arrows: false 494 } 495 } 496 ] 497 }); 498 499 // faq functions 500 jQuery('.faq-content h3').click(function(ev){ 501 ev.preventDefault(); 502 ev.stopPropagation(); 503 if ( jQuery(this).hasClass('active')) { 504 jQuery(this).removeClass('active'); 505 jQuery(this).siblings('.answer').animate({opacity: 'hide', height: 'hide'}, 700, 'easeOutQuint'); 506 } else { 507 jQuery('.faq-content ul li').each(function(){ 508 if (jQuery(this).find('h3').hasClass('active')) { 509 jQuery(this).find('h3').removeClass('active'); 510 jQuery(this).find('.answer').animate({opacity: 'hide', height: 'hide'}, 700, 'easeOutQuint'); 511 } 512 }); 513 jQuery(this).addClass('active'); 514 jQuery(this).siblings('.answer').animate({opacity: 'show', height: 'show'}, 700, 'easeOutQuint'); 515 } 516 }); 517 518 // request-information functions 519 jQuery(window).on('load', function(){ 520 if (jQuery('.request-information').length) { 521 jQuery('.request-information .bg-image').css('top', - jQuery(window).height() / 5 +'px'); 522 if (isAppearIntoView(jQuery('.request-information'))) { 523 var $Uparallax = jQuery('.request-information .bg-image'); 524 var UparallaxTop = jQuery('.request-information').offset().top; 525 var winHeight = jQuery(window).height(); 526 var yPos = (jQuery(window).scrollTop() - (UparallaxTop - winHeight)) / 5; 527 $Uparallax.css({ "transform": "translate3d(0px, " + yPos + "px, 0px)" }); 528 } 529 } 530 }); 531 jQuery(window).on('scroll', function(){ 532 if (jQuery('.request-information').length) { 533 if (isAppearIntoView(jQuery('.request-information'))) { 534 var $Uparallax = jQuery('.request-information .bg-image'); 535 var UparallaxTop = jQuery('.request-information').offset().top; 536 var winHeight = jQuery(window).height(); 537 var yPos = (jQuery(window).scrollTop() - (UparallaxTop - winHeight)) / 5; 538 $Uparallax.css({ "transform": "translate3d(0px, " + yPos + "px, 0px)" }); 539 } 540 } 541 }); 542 jQuery(window).on('resize', function(){ 543 jQuery('.request-information .bg-image').css('top', - jQuery(window).height() / 5 +'px'); 544 }); 545 546 // page-top functions 547 if (jQuery('.page-top').length) { 548 var PTheight = jQuery('.page-top').outerHeight(); 549 jQuery('.page-top-spacer').css('height', PTheight+'px'); 550 jQuery(window).on('resize', function(){ 551 var PTheight = jQuery('.page-top').outerHeight(); 552 jQuery('.page-top-spacer').css('height', PTheight+'px'); 553 }); 554 } 555 556 // story functions 557 jQuery('.testimonials-rotator .slides').slick({ 558 speed: 500, 559 arrows: true, 560 infinite: true, 561 slidesToShow: 1, 562 slidesToScroll: 1, 563 dots: true, 564 appendDots: jQuery('.filter-testimonials-rotator'), 565 customPaging : function(slider, i) { 566 var title = jQuery(slider.$slides[i]).attr('data-title'); 567 return '<a>'+title+'</a>'; 568 }, 569 swipe: true 570 }); 571 572 // home-info functions 573 var stc = false;
574 jQuery(window).on('load', function(){ 575 if (jQuery('.home-info').length && !stc) { 576 if (isHalfIntoView(jQuery('.home-info'))) { 577 stc = true; 578 jQuery('.home-info .text').animate({opacity: 1}, 700, 'easeOutQuint'); 579 jQuery('.home-info .count').each(function () { 580 jQuery(this).prop('Counter',0).animate({ 581 Counter: jQuery(this).text() 582 }, { 583 duration: 2000, 584 easing: 'swing', 585 step: function (now) { 586 jQuery(this).text(Math.ceil(now)); 587 } 588 }); 589 }); 590 } 591 } 592 }); 593 jQuery(window).scroll(function() { 594 if (jQuery('.home-info').length && !stc) { 595 if (isHalfIntoView(jQuery('.home-info'))) { 596 stc = true; 597 jQuery('.home-info .text').animate({opacity: 1}, 700, 'easeOutQuint'); 598 jQuery('.home-info .count').each(function () { 599 jQuery(this).prop('Counter',0).animate({ 600 Counter: jQuery(this).text() 601 }, { 602 duration: 2000, 603 easing: 'swing', 604 step: function (now) { 605 jQuery(this).text(Math.ceil(now)); 606 } 607 }); 608 }); 609 } 610 } 611 }); 612 613 /* share functions */ 614 jQuery('.show-home-menu-list').click(function(ev){ 615 ev.stopPropagation(); 616 if ( jQuery(this).hasClass('active')) { 617 jQuery(this).removeClass('active'); 618 jQuery(this).siblings('.home-menu-list').animate({opacity: 'hide', height: 'hide'}, 700, 'easeOutQuint'); 619 } else { 620 jQuery(this).addClass('active'); 621 jQuery(this).siblings('.home-menu-list').animate({opacity: 'show', height: 'show'}, 700, 'easeOutQuint'); 622 } 623 }); 624 jQuery('body').click(function(){ 625 if ( jQuery('.show-home-menu-list').hasClass('active')) { 626 jQuery('.show-home-menu-list').removeClass('active'); 627 jQuery('.home-menu-list').animate({opacity: 'hide', height: 'hide'}, 700, 'easeOutQuint'); 628 } 629 }); 630 jQuery('.home-menu-list').click(function(ev) { 631 ev.stopPropagation(); 632 }); 633 634 // stiky top-bar functions 635 jQuery(window).on('load', function(){ 636 var tbTop = jQuery(window).scrollTop(); 637 if (tbTop > 300) { 638 jQuery('body').addClass('stiky-tb'); 639 } else { 640 jQuery('body').removeClass('stiky-tb'); 641 } 642 }); 643 jQuery(window).scroll(function() { 644 var tbTop = jQuery(window).scrollTop(); 645 if (tbTop > 300) { 646 jQuery('body').addClass('stiky-tb'); 647 } else { 648 jQuery('body').removeClass('stiky-tb'); 649 } 650 }); 651 652}); 653 654function isAppearIntoView(elem) 655{ 656 if (jQuery(elem).length) { 657 var docViewTop = jQuery(window).scrollTop(); 658 var docViewBottom = docViewTop + jQuery(window).height(); 659 660 var elemTop = jQuery(elem).offset().top; 661 var elemHeight = jQuery(elem).outerHeight(); 662 var elemBottom = elemTop + elemHeight; 663 } 664 665 return (elemTop <= docViewBottom && elemBottom >= docViewTop); 666} 667 668function isIntoView(elem) 669{ 670 if (elem.length) { 671 var docViewTop = jQuery(window).scrollTop(); 672 var docViewBottom = docViewTop + jQuery(window).height(); 673 var elemTop = jQuery(elem).offset().top; 674 var elemHeight = jQuery(elem).outerHeight(); 675 var elemBottom = elemTop + elemHeight; 676 return (elemBottom <= docViewBottom); 677 } 678} 679 680function isHalfIntoView(elem) 681{ 682 if (elem.length) { 683 var docViewTop = jQuery(window).scrollTop(); 684 var docViewBottom = docViewTop + jQuery(window).height(); 685 var elemTop = jQuery(elem).offset().top; 686 var elemHeight = jQuery(elem).outerHeight(); 687 var elemBottom = elemTop + elemHeight; 688 return ((elemTop + (elemHeight / 2.2)) <= docViewBottom); 689 } 690} 691function resizePrograms() 692{ 693 var maxHeight = 0; 694 jQuery('.entry-program').each(function() { 695 maxHeight = maxHeight > jQuery(this).height() ? maxHeight : jQuery(this).height(); 696 }); 697 698 jQuery('.entry-program').each(function() { 699 jQuery(this).height(maxHeight); 700 }); 701}
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.