1jQuery(function ($) { 2 "use strict"; 3 var NATIVE = window.NATIVE || {}; 4 NATIVE.megaMenu = function () { 5 jQuery('.megamenu-sub-title').closest('ul.sub-menu').wrapInner('<div class="row" />').wrapInner('<div class ="megamenu-container container" />').wrapInner('<li />'); 6 jQuery('.megamenu-container').closest('li.menu-item-has-children').addClass('megamenu'); 7 var $class = ''; 8 jQuery(".megamenu-container").each(function (index, elem) { 9 var numImages = $(this).find('.row').children().length; 10 switch (numImages) { 11 case 1: 12 $class = 12; 13 break; 14 case 2: 15 $class = 6; 16 break; 17 case 3: 18 $class = 4; 19 break; 20 case 4: 21 $class = 3; 22 break; 23 default: 24 $class = 2; 25 } 26 $(this).find('.row').find('.col-md-3').each(function () { 27 jQuery(this).removeClass('col-md-3').addClass('col-md-' + $class); 28 }); 29 }); 30 }; 31 /* ================================================== 32 Contact Form Validations 33 ================================================== */ 34 NATIVE.ContactForm = function () { 35 $('.contact-form-native').each(function () { 36 var formInstance = $(this); 37 formInstance.submit(function () { 38 var action = $(this).attr('action'); 39 $("#message").slideUp(750, function () { 40 $('#message').hide(); 41 $('#submit') 42 .after('<img src="' + $('#image_path').val() + '/assets/images/assets/ajax-loader.gif" class="loader" />') 43 .attr('disabled', 'disabled'); 44 $.post(action, { 45 name: $('#name').val(), 46 email: $('#email').val(), 47 phone: $('#phone').val(), 48 comments: $('#comments').val(), 49 subject: $('#subject').val(), 50 admin_email: $('#admin_email').val(), 51 }, 52 function (data) { 53 document.getElementById('message').innerHTML = data; 54 $('#message').slideDown('slow'); 55 $('.contact-form-native img.loader').fadeOut('slow', function () { 56 $(this).remove(); 57 }); 58 $('#submit').removeAttr('disabled'); 59 if (data.match('success') !== null) { 60 $('.contact-form-native').slideUp('slow'); 61 } 62 } 63 ); 64 }); 65 return false; 66 }); 67 }); 68 }; 69 /* ================================================== 70 Responsive Nav Menu 71 ================================================== */ 72 NATIVE.navMenu = function () { 73 // Responsive Menu Events 74 $(".top-navigation").clone().appendTo("#top-nav-clone"); 75 $(".menu-toggle").click(function () { 76 $(this).toggleClass("opened"); 77 $(".main-menu-wrapper").slideToggle(500); 78 $(".header-style4 #top-nav-clone").slideToggle(500); 79 $(".new-flex-header .navigation").slideToggle(500); 80 return false; 81 }); 82 $(window).resize(function () { 83 if ($(".menu-toggle").hasClass("opened")) { 84 $(".main-menu-wrapper").css("display", "block"); 85 $(".header-style4 #top-nav-clone").css("display", "block"); 86 } else { 87 $(".menu-toggle").css("display", "none"); 88 } 89 }); 90 $('.enabled-top-mobile .top-navigation').tinyNav({ 91 header: '---', 92 indent: 'â' 93 }); 94 // Header Style 6 95 var menuCount = $('.header-style6 .site-header .navigation ul.sf-menu > li').length;
96 var leftMenu = Math.ceil(menuCount / 2); 97 var rightMenu = leftMenu + 1; 98 $('.header-style6 .site-header .navigation ul li:nth-child('+leftMenu+')').addClass('centered-logo-right'); 99 $('.header-style6 .site-header .navigation ul li:nth-child('+rightMenu+')').addClass('centered-logo-left'); 100 }; 101 /* ================================================== 102 User Login Register 103 ================================================== */ 104 NATIVE.userlogin = function () { 105 // User Login/Register 106 $("#login-register").click(function (e) { 107 $("#login-user-form").show(); 108 $("#register-user-form").hide(); 109 e.preventDefault(); 110 }); 111 $("#login-user").click(function (e) { 112 $("#login-user-form").show(); 113 $("#register-user-form").hide(); 114 e.preventDefault(); 115 }); 116 $("#register-user").click(function (e) { 117 $("#login-user-form").hide(); 118 $("#register-user-form").show(); 119 e.preventDefault(); 120 }); 121 }; 122 /* ================================================== 123 Scroll to Top 124 ================================================== */ 125 NATIVE.scrollToTop = function () { 126 var windowWidth = $(window).width(), 127 didScroll = false; 128 129 var $arrow = $('#back-to-top'); 130 131 $arrow.click(function (e) { 132 $('body,html').animate({ scrollTop: "0" }, 750, 'easeOutExpo'); 133 e.preventDefault(); 134 }); 135 136 $(window).scroll(function () { 137 didScroll = true; 138 }); 139 140 setInterval(function () { 141 if (didScroll) { 142 didScroll = false; 143 144 if ($(window).scrollTop() > 200) { 145 $arrow.fadeIn(); 146 } else { 147 $arrow.fadeOut(); 148 } 149 } 150 }, 250); 151 }; 152 /* ================================================== 153 Accordion 154 ================================================== */ 155 NATIVE.accordion = function () { 156 var accordion_trigger = $('.accordion-heading.accordionize'); 157 accordion_trigger.delegate('.accordion-toggle', 'click', function (event) { 158 if ($(this).hasClass('active')) { 159 $(this).removeClass('active'); 160 $(this).addClass('inactive'); 161 } 162 else { 163 accordion_trigger.find('.active').addClass('inactive'); 164 accordion_trigger.find('.active').removeClass('active'); 165 $(this).removeClass('inactive'); 166 $(this).addClass('active'); 167 } 168 event.preventDefault(); 169 }); 170 }; 171 /* ================================================== 172 Toggle 173 ================================================== */ 174 NATIVE.toggle = function () { 175 var accordion_trigger_toggle = $('.accordion-heading.togglize'); 176 accordion_trigger_toggle.delegate('.accordion-toggle', 'click', function (event) { 177 if ($(this).hasClass('active')) { 178 $(this).removeClass('active'); 179 $(this).addClass('inactive'); 180 } 181 else { 182 $(this).removeClass('inactive'); 183 $(this).addClass('active'); 184 } 185 event.preventDefault(); 186 }); 187 }; 188 /* ================================================== 189 Tooltip 190 ================================================== */ 191 NATIVE.toolTip = function () { 192 $('a[data-toggle=tooltip]').tooltip(); 193 }; 194 /* ================================================== 195 Tooltip Live 196 ================================================== */ 197 NATIVE.toolTipLive = function () { 198 $('a[data-toggle=tooltip-live]').tooltip(); 199 }; 200 /* ================================================== 201 Flex Slider 202 ================================================== */ 203 NATIVE.FlexSlider = function () { 204 $('.flexslider').each(function () { 205 var carouselInstance = $(this); 206 var carouselAutoplay = carouselInstance.attr("data-autoplay") === 'yes' ? true : false;
207 var carouselPagination = carouselInstance.attr("data-pagination") === 'yes' ? true : false; 208 var carouselArrows = carouselInstance.attr("data-arrows") === 'yes' ? true : false; 209 var carouselDirection = carouselInstance.attr("data-direction") ? carouselInstance.attr("data-direction") : "horizontal"; 210 var carouselStyle = carouselInstance.attr("data-style") ? carouselInstance.attr("data-style") : "fade"; 211 var carouselSpeed = carouselInstance.attr("data-speed") ? carouselInstance.attr("data-speed") : "5000"; 212 var carouselPause = carouselInstance.attr("data-pause") === 'yes' ? true : false; 213 carouselInstance.flexslider({ 214 animation: carouselStyle, 215 easing: "swing", 216 direction: carouselDirection, 217 slideshow: carouselAutoplay, 218 slideshowSpeed: carouselSpeed, 219 animationSpeed: 600, 220 initDelay: 0, 221 randomize: false, 222 pauseOnHover: carouselPause, 223 controlNav: carouselPagination, 224 directionNav: carouselArrows, 225 prevText: "", 226 nextText: "", 227 smoothHeight: false, 228 start: function (slider) { 229 var slide_count = slider.count - 1; 230 $(slider) 231 .find('img.lazy:eq(0)') 232 .each(function () { 233 var src = $(this).attr('data-src'); 234 $(this).attr('src', src).removeAttr('data-src'); 235 }); 236 }, 237 before: function (slider) { 238 var slides = slider.slides, 239 index = slider.animatingTo, 240 $slide = $(slides[index]), 241 $img = $slide.find('img[data-src]'), 242 current = index, 243 nxt_slide = current + 1, 244 prev_slide = current - 1; 245 246 $slide 247 .parent() 248 .find('img.lazy:eq(' + current + '), img.lazy:eq(' + prev_slide + '), img.lazy:eq(' + nxt_slide + ')') 249 .each(function () { 250 var src = $(this).attr('data-src'); 251 $(this).attr('src', src).removeAttr('data-src'); 252 }); 253 } 254 }); 255 }); 256 }; 257 /* ================================================== 258 PrettyPhoto 259 ================================================== */ 260 NATIVE.PrettyPhoto = function () { 261 $("a[data-rel^='prettyPhoto']").prettyPhoto({ 262 opacity: 0.5, 263 social_tools: "", 264 deeplinking: false 265 }); 266 jQuery('.sort-source a').click(function () { 267 var sortval = jQuery(this).parent().attr('data-option-value'); 268 $(".sort-destination li a").removeAttr('data-rel'); 269 $(".sort-destination li a").attr('data-rel', "prettyPhoto[" + sortval + "]"); 270 }); 271 }; 272 /* ================================================== 273 Animated Counters 274 ================================================== */ 275 NATIVE.Counters = function () { 276 $('.counters').each(function () { 277 $(".timer .count").appear(function () { 278 var counter = $(this).html(); 279 $(this).countTo({ 280 from: 0, 281 to: counter, 282 speed: 2000, 283 refreshInterval: 60, 284 }); 285 }); 286 }); 287 288 $(".countdown .timer .count").appear(function () { 289 var counter = $(this).html(); 290 $(this).countTo({ 291 from: 0, 292 to: counter, 293 speed: 2000, 294 refreshInterval: 60, 295 }); 296 }); 297 }; 298 /* ================================================== 299 SuperFish menu 300 ================================================== */ 301 NATIVE.SuperFish = function () { 302 if(jQuery(window).width() > 992){ 303 $('.sf-menu').superfish({ 304 delay: 200, 305 animation: { 306 opacity: 'show', 307 height: 'show' 308 }, 309 speed: 'fast',
310 cssArrows: false, 311 disableHI: true 312 }); 313 } else { 314 jQuery('.sf-menu .menu-item-has-children').append('<span class="smenu-opener"><i class="fa fa-angle-down"></i></span>'); 315 jQuery('.smenu-opener').each(function(){ 316 jQuery(this).on('click',function(){ 317 if(jQuery(this).hasClass('smenu-opened')){ 318 jQuery(this).removeClass('smenu-opened'); 319 jQuery(this).prev('.sub-menu').slideUp(); 320 jQuery(this).html('<i class="fa fa-angle-down"></i>'); 321 } else { 322 jQuery(this).prev('.sub-menu').slideDown(); 323 jQuery(this).addClass('smenu-opened'); 324 jQuery(this).html('<i class="fa fa-angle-up"></i>'); 325 } 326 }); 327 }); 328 } 329 $(".navigation > ul > li:has(ul)").find("a:first").append(" <i class='fa fa-angle-down'></i>"); 330 $(".navigation > ul > li > ul > li:has(ul)").find("a:first").append(" <i class='fa fa-angle-right'></i>"); 331 $(".navigation > ul > li > ul > li > ul > li:has(ul)").find("a:first").append(" <i class='fa fa-angle-right'></i>"); 332 $(".top-navigation > li:has(ul)").find("a:first").append(" <i class='fa fa-angle-down'></i>"); 333 $(".top-navigation > li > ul > li:has(ul)").find("a:first").append(" <i class='fa fa-angle-right'></i>"); 334 $(".top-navigation > li > ul > li > ul > li:has(ul)").find("a:first").append(" <i class='fa fa-angle-right'></i>"); 335 }; 336 /* ================================================== 337 IsoTope Portfolio 338 ================================================== */ 339 NATIVE.IsoTope = function () { 340 $("ul.sort-source").each(function () { 341 var isoInstance = $(this); 342 var isoLayout = isoInstance.attr("data-layout") ? isoInstance.attr("data-layout") : "sloppyMasonry"; 343 var source = $(this); 344 var destination = $("ul.sort-destination[data-sort-id=" + $(this).attr("data-sort-id") + "]"); 345 if (destination.get(0)) { 346 $(window).on('load',function () { 347 destination.isotope({ 348 itemSelector: ".grid-item", 349 layoutMode: isoLayout 350 }); 351 source.find("a").click(function (e) { 352 e.preventDefault(); 353 var $this = $(this), 354 filter = $this.parent().attr("data-option-value"); 355 source.find("li.active").removeClass("active"); 356 $this.parent().addClass("active"); 357 destination.isotope({ 358 filter: filter 359 }); 360 if (window.location.hash !== "" || filter.replace(".", "") !== "*") { 361 self.location = "#" + filter.replace(".", ""); 362 } 363 return false; 364 }); 365 $(window).bind("hashchange", function (e) { 366 var hashFilter = "." + location.hash.replace("#", ""), 367 hash = (hashFilter === "." || hashFilter === ".*" ? "*" : hashFilter); 368 source.find("li.active").removeClass("active"); 369 source.find("li[data-option-value='" + hash + "']").addClass("active"); 370 destination.isotope({ 371 filter: hash 372 }); 373 }); 374 var hashFilter = "." + (location.hash.replace("#", "") || "*"); 375 var initFilterEl = source.find("li[data-option-value='" + hashFilter + "'] a"); 376 if (initFilterEl.get(0)) { 377 source.find("li[data-option-value='" + hashFilter + "'] a").click(); 378 } else { 379 source.find("li:first-child a").click(); 380 } 381 }); 382 } 383 }); 384 $(window).on('load',function () { 385 var IsoTopeCont = $(".isotope-grid"); 386 IsoTopeCont.isotope({ 387 itemSelector: ".grid-item", 388 layoutMode: 'sloppyMasonry' 389 });
390 if ($(".grid-holder").length > 0) { 391 var $container_blog = $('.grid-holder'); 392 var isoLayout = $container_blog.attr("data-layout") ? $container_blog.attr("data-layout") : "sloppyMasonry"; 393 $container_blog.isotope({ 394 itemSelector: '.grid-item', 395 layoutMode: isoLayout 396 }); 397 $(window).resize(function () { 398 var $container_blog = $('.grid-holder'); 399 var isoLayout = $container_blog.attr("data-layout") ? $container_blog.attr("data-layout") : "sloppyMasonry"; 400 $container_blog.isotope({ 401 itemSelector: '.grid-item', 402 layoutMode: isoLayout 403 }); 404 }); 405 } 406 }); 407 }; 408 /* ================================================== 409 Init Functions 410 ================================================== */ 411 $(document).ready(function () { 412 NATIVE.ContactForm(); 413 NATIVE.megaMenu(); 414 NATIVE.scrollToTop(); 415 NATIVE.accordion(); 416 NATIVE.toggle(); 417 NATIVE.toolTip(); 418 NATIVE.toolTipLive(); 419 NATIVE.navMenu(); 420 NATIVE.FlexSlider(); 421 NATIVE.SuperFish(); 422 NATIVE.Counters(); 423 NATIVE.IsoTope(); 424 $("#additional-media-sermons").find(".tab-content").find('.tab-pane:first-child').addClass('active'); 425 $("#additional-media-sermons").find(".nav-tabs").find('li:first-child').addClass('active'); 426 427 //Code for sermon filters Start 428 var start_search = "1"; 429 $('.sermon-filter-search').on('submit', function () { 430 $('.nativechurch_sermon_filters').each(function () { 431 var selected_val = $("option:selected", this); 432 if ($(selected_val).val() !== '') { 433 start_search = ""; 434 } 435 }); 436 if (start_search === "1") { 437 return false; 438 } 439 }); 440 $('.nativechurch_sermon_filters').change(function () { 441 $('.terms-search').show(); 442 var selected = $("option:selected", this); 443 var filter_id = $(this).attr('id'); 444 var posts = JSON.parse($(selected).attr('data-objects')); 445 $('.nativechurch_sermon_filters').each(function () { 446 var next_filter_id = $(this).attr('id'); 447 if (filter_id === next_filter_id) { return true; } 448 $("#" + next_filter_id + " > option").each(function () { 449 $(this).show(); 450 if ($(this).val() === '') { return true; } 451 var posts_next = JSON.parse($(this).attr('data-objects')); 452 var intersect_posts = $(posts).filter(posts_next); 453 if (intersect_posts.length <= 0) { 454 $(this).hide(); 455 } 456 }); 457 }); 458 }); 459 //Code for sermon filters End 460 }); 461 462 $(document).ajaxStop(function () { 463 NATIVE.toolTipLive(); 464 }); 465 466 // FITVIDS 467 $(".navigation, .widget, .fw-video, .video-container").fitVids(); 468 // Design Functions 469 $(".events-listing .item").each(function () { 470 var eventHeight = $(this).height(); 471 $(this).find(".to-event-url").css("height", eventHeight); 472 }); 473 $(window).resize(function () { 474 $(".events-listing .item").each(function () { 475 var eventHeight = $(this).height(); 476 $(this).find(".to-event-url").css("height", eventHeight); 477 }); 478 }); 479 $(".navigation ul li").mouseover(function () { 480 var the_width = $(this).find("a").width(); 481 var child_width = $(this).find("ul").width(); 482 var width = parseInt((child_width - the_width) / 2); 483 $(this).find("ul").css('left', - width); 484 }); 485 $(".top-navigation li").mouseover(function () { 486 var the_width = $(this).find("a").width(); 487 var child_width = $(this).find("ul").width(); 488 var width = parseInt((child_width - the_width) / 2); 489 $(this).find("ul").css('left', -width); 490 }); 491 $(window).on('load',function () { 492 $('.goingon-events-floater').animate({ opacity: 1 }, [1000]); 493 }); 494 $(window).resize(function () { 495 if ($(window).width() > 992) { 496 $(".main-menu-wrapper").css("display", "block"); 497 } else { 498 $(".main-menu-wrapper").css("display", "none"); 499 } 500 }); 501 /* List Styles */ 502 $('ul.chevrons li:even i').after('<i class="icon icon-envelope-alt"></i>'); 503 $('ul.chevrons li:odd i').after('<i class="icon icon-film"></i>'); 504 $('.goingon-events-floater').prepend('<i class="fa flo-arrow fa-caret-down"></i> '); 505 // Featured Event Widget 506 $(".featured_event_widget").find(".sidebar-widget-title h3").prepend("<span class='featured-star'><i class='fa fa-star'></i></span>"); 507 $(".featured_event_widget").find("h4.featured-event-title a").append(" <i class='fa fa-caret-right'></i>"); 508 $(".featured_event_widget").has("img.featured-event-image").find(".featured-event-time").css("position", "absolute"); 509 //Donation Modal 510 $(".donate-paypal").click(function () { 511 var CauseName = $(this).parents(".cause-item").find("h3").html(); 512 $(".payment-to-cause").html(CauseName); 513 }); 514 $('select[name="donation amount"]').change(function () { 515 if ($(this).val() === "101") { 516 $('.custom-donate-amount').show(); 517 $('input[name="Custom Donation Amount"]').focus(); 518 } 519 else { 520 $('.custom-donate-amount').hide(); 521 } 522 }); 523 jQuery('video.custom-video').mediaelementplayer(); 524 if ($('.audio-player').length) { 525 var audio_player = new MediaElementPlayer('.audio-player'); 526 $(".audio-player").css('max-width', '100%'); 527 setTimeout(function () { 528 $(window).trigger('resize'); 529 if ($('.video-container').length) { 530 $('.audio-container').hide(); 531 } 532 if (window.location.hash === '#play-audio') { 533 $('.video-container').hide(); 534 $('.audio-container').show(); 535 } 536 }, 500); 537 $(window).bind('load debouncedresize', function () { 538 $('.mejs-time-rail').width($('.mejs-time-rail').width() - 2); 539 }); 540 } 541 $('.play-video-link').click(function (event) { 542 event.preventDefault(); 543 var video_url = $(this).attr('href'); 544 var video_container = $('.video-container'); 545 if (video_url && video_container) { 546 var embed_code = video_container 547 .html() 548 .replace('autoplay=0', 'autoplay=1'); 549 if (embed_code) { 550 var audio_container = $('.audio-container'); 551 if (audio_container.length) { 552 audio_player.pause(); 553 audio_container.hide(); 554 } 555 video_container 556 .html(embed_code) 557 .show(); 558 } 559 } 560 }); 561 $('.play-audio-link').click(function (event) { 562 event.preventDefault(); 563 $('.video-container').hide(); 564 var video_container = $('.video-container'); 565 if (video_container.length) { 566 var embed_code = video_container 567 .html().replace('autoplay=1', 'autoplay=0'); 568 video_container.html(embed_code); 569 } 570 $('.audio-container').show(); 571 audio_player.pause(); 572 audio_player.play(); 573 $(window).trigger('resize'); 574 }); 575 $(".widget_featured_event").find(".sidebar-widget-title h3").prepend("<span class='featured-star'><i class='fa fa-star'></i></span>"); 576 $(".widget_featured_event").find("h4.featured-event-title a").append(" <i class='fa fa-caret-right'></i>"); 577 $(".widget_featured_event").has("img.featured-event-image").find(".featured-event-time").css("position", "absolute"); 578 579 // Animation Appear 580 $("[data-appear-animation]").each(function () { 581 var $this = $(this); 582 $this.addClass("appear-animation"); 583 if (!$("html").hasClass("no-csstransitions") && $(window).width() > 767) { 584 $this.appear(function () {
585 var delay = ($this.attr("data-appear-animation-delay") ? $this.attr("data-appear-animation-delay") : 1); 586 if (delay > 1) 587 $this.css("animation-delay", delay + "ms"); 588 $this.addClass($this.attr("data-appear-animation")); 589 setTimeout(function () { 590 $this.addClass("appear-animation-visible"); 591 }, delay); 592 }, { accX: 0, accY: -150 }); 593 } else { 594 $this.addClass("appear-animation-visible"); 595 } 596 }); 597 // Animation Progress Bars 598 $("[data-appear-progress-animation]").each(function () { 599 var $this = $(this); 600 $this.appear(function () { 601 var delay = ($this.attr("data-appear-animation-delay") ? $this.attr("data-appear-animation-delay") : 1); 602 if (delay > 1) 603 $this.css("animation-delay", delay + "ms"); 604 $this.addClass($this.attr("data-appear-animation")); 605 setTimeout(function () { 606 $this.animate({ 607 width: $this.attr("data-appear-progress-animation") 608 }, 1500, "easeOutQuad", function () { 609 $this.find(".progress-bar-tooltip").animate({ 610 opacity: 1 611 }, 500, "easeOutQuad"); 612 }); 613 }, delay); 614 }, { accX: 0, accY: -50 }); 615 }); 616 //Parallax 617 if (!Modernizr.touch) { 618 $(window).bind('load', function () {
619 parallaxInit(); 620 }); 621 } 622 function parallaxInit() { 623 $('.parallax1').parallax("50%", 0.1); 624 $('.parallax2').parallax("50%", 0.1); 625 $('.parallax3').parallax("50%", 0.1); 626 $('.parallax4').parallax("50%", 0.1); 627 $('.parallax5').parallax("50%", 0.1); 628 $('.parallax6').parallax("50%", 0.1); 629 $('.parallax7').parallax("50%", 0.1); 630 $('.parallax8').parallax("50%", 0.1); 631 /*add as necessary*/ 632 } 633 /* Window Height/Width Getter Class */ 634 var wheighter = $(window).height(); 635 var wwidth = $(window).width(); 636 $(".wheighter").css("height", wheighter); 637 $(".wwidth").css("width", wwidth); 638 $(window).resize(function () { 639 var wheighter = $(window).height(); 640 var wwidth = $(window).width(); 641 $(".wheighter").css("height", wheighter); 642 $(".wwidth").css("width", wwidth); 643 }); 644 // Staff Items Equal Height 645 jQuery(function () { 646 // apply matchHeight to each item container's items 647 $('.content').each(function () { 648 $(this).find('.staff-item').find('.grid-item-inner').matchHeight(); 649 }); 650 }); 651}); 652jQuery(window).bind("load", function () { 653 if (document.location.href.indexOf('#playvideo') > -1) { 654 var video_container = jQuery('.video-container'); 655 var embed_code = video_container 656 .html() 657 .replace('autoplay=0', 'autoplay=1'); // same for YouTube and Vimeo 658 if (embed_code) { 659 // replace embed code and show 660 video_container 661 .html(embed_code) 662 .show(); 663 } 664 } 665}); 666jQuery(window).bind("load", function () { 667 if (document.location.href.indexOf('#read') > -1) { 668 var video_container = jQuery('.video-container'); 669 if (video_container.length) { // if there is video 670 var embed_code = video_container 671 .html().replace('autoplay=1', 'autoplay=0'); // same for YouTube and Vimeo 672 video_container.html(embed_code).hide(); 673 } 674 } 675});
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.