1(function ($) { 2 3 $(document).ready(function() { 4 5// Do not delete above line 6/****************************************************************/ 7/****************************************************************/ 8 9$(".fitVids").fitVids(); 10 11if(!jQuery('#mc_mv_EMAIL').val()) { 12 jQuery('#mc_mv_EMAIL').attr("placeholder", "Your Email Address"); 13} 14 15/*************************************************************** 16* Main Navigation * 17****************************************************************/ 18 19function swm_main_navigation() { 20 21 /* mobile menu show hide ------------------------------------- */ 22 23 $('.top_nav').tinyNav({ 24 active: 'active', // class name of active link 25 header: 'Navigation' // default display text for dropdown 26 }); 27 28 $('#mobile_nav_button').click(function () { 29 $('ul.mobi-menu').toggleClass("mobile_nav_active"); 30 31 var menu_icon = $('#mobile_nav_button i'); 32 33 if($(menu_icon).hasClass("fa-list-ul")) { 34 $(menu_icon).removeClass("fa-list-ul").addClass("fa-times"); 35 } else { 36 $(menu_icon).removeClass("fa-times").addClass("fa-list-ul"); 37 } 38 }); 39 40 $('.top_nav > li > a.sf-with-ul').after('<div class="mobile_nav_subarrow"><i class="fa fa-caret-square-o-down"></i></div>'); 41 42 $('.mobile_nav_subarrow').click(function () { 43 $(this).parent().toggleClass("mobile_sub_menu"); 44 }); 45 46 /* search box show hide ------------------------------------- */ 47 48 $(".search_section").click(function (e) { 49 $(".swm_search_box").fadeToggle("fast"); 50 e.stopImmediatePropagation(); 51 52 var search_icon = $('.search_section i'); 53 54 if($(search_icon).hasClass("fa-search")) { 55 $(search_icon).removeClass("fa-search").addClass("fa-times"); 56 $(this).removeClass("sbox_skin").addClass("sbox_dark"); 57 } else { 58 $(search_icon).removeClass("fa-times").addClass("fa-search"); 59 $(this).removeClass("sbox_dark").addClass("sbox_skin"); 60 } 61 62 $('.isotope-item').toggleClass('isotope-zindex'); 63 64 }); 65 66 $(".swm_search_box").click(function (e) { 67 e.stopImmediatePropagation(); 68 }); 69 70 // logo section toggle responsive menu 71 72 $('.logo_section_toggle').click(function () { 73 $('.logo_section_menu').toggleClass("logo_nav_active"); 74 75 var menu_icon = $('.logo_section_btn i'); 76 77 if($(menu_icon).hasClass("fa-chevron-down")) { 78 $(menu_icon).removeClass("fa-chevron-down").addClass("fa-chevron-up"); 79 } else { 80 $(menu_icon).removeClass("fa-chevron-up").addClass("fa-chevron-down"); 81 } 82 }); 83 84 $('.sticky-navigation').waypoint('sticky'); 85 86} 87 88swm_main_navigation(); 89 90/*************************************************************** 91* Parallax Background * 92****************************************************************/ 93function swm_parallax_on() { 94 95 var dataParallax = $(".swm_section_prallax").attr("data-parallaxtest"), 96 dataParallaxHeader = $(".swm_headerImage").attr("data-parallaxtest"); 97 98 if (/Android|webOS|iPhone|iPad|iPod|pocket|psp|kindle|avantgo|blazer|midori|Tablet|Palm|maemo|plucker|phone|BlackBerry|symbian|IEMobile|mobile|ZuneWP7|Windows Phone|Opera Mini/i.test(navigator.userAgent)) { 99 100 $(".swm_section_prallax").css('background-attachment','scroll'); 101 $(".swm_headerImage").css('background-attachment','scroll'); 102 103 } else { 104 $(".swm_parallax_on").each(function(){ 105 var scrollSpeed = $(this).attr("data-bg-scrollSpeed"); 106 $(this).parallax( '50%', scrollSpeed); 107 }); 108 109 if ( dataParallax == 'true' ) { 110 $(".swm_section_prallax").css('background-attachment','fixed'); 111 } 112 113 if ( dataParallaxHeader == 'true' ) { 114 $(".swm_headerImage").css('background-attachment','fixed'); 115 } 116 } 117 118} 119 120/*************************************************************** 121* Retina * 122****************************************************************/ 123 124function swm_retinaRatioCookies() { 125 var devicePixelRatio = !!window.devicePixelRatio ? window.devicePixelRatio : 1; 126 if (!$.cookie("pixel_ratio")) { 127 if (devicePixelRatio > 1 && navigator.cookieEnabled === true) { 128 $.cookie("pixel_ratio", devicePixelRatio, {expires : 360}); 129 location.reload(); 130 } 131 } 132} 133 134/*************************************************************** 135* Responsive Height * 136****************************************************************/ 137 138function swm_responsive_height() { 139 if ( !$('body').hasClass('swm_disable_header_auto_height') ) { 140 $(window).resize(function(){ 141 $('.swm_headerImage').each(function(){ 142 var self = $(this), 143 old_width = 1199, 144 old_height = parseInt(self.attr("data-header-height") || 400), 145 new_width = old_width, 146 new_height = old_height, 147 w_width = $(window).width(); 148 149 if( w_width <= 1199 ) { new_width = 1000; } 150 if( w_width <= 979 ) { new_width = 749; } 151 if( w_width <= 767 ) { new_width = 461; } 152 if( w_width <= 480 ) { new_width = 301; } 153 154 var ratio = (new_width / old_width) * old_height; 155 new_height = Math.round(ratio); 156 157 $(this).css('max-height',new_height); 158 $('.swm_header_content').css('height',new_height); 159 160 }); 161 }); 162 $(window).trigger('resize'); 163 } 164} 165 166/*************************************************************** 167 * Post Format Gallery * 168****************************************************************/ 169 170function swm_pf_gallery() { 171 $('.pfi_gallery').imagesLoaded( function() { 172 $('.pfi_gallery').flexslider({ 173 animation: 'fade', 174 animationSpeed: 500, 175 slideshow: false, 176 smoothHeight: false, 177 controlNav: true, 178 directionNav: true, 179 prevText: '<i class="fa fa-chevron-left"></i>', 180 nextText: '<i class="fa fa-chevron-right"></i>' 181 }); 182 }); 183} 184 185/*************************************************************** 186 * Portfolio Page * 187****************************************************************/ 188 189function swm_portfolio_items() { 190 191 $(".swm_portfolio_sort").imagesLoaded( function() { 192 $('.swm_portfolio_sort').isotope({ 193 itemSelector: '.swm_portfolio_isotope', 194 masonry: { 195 //custom addition 196 } 197 }); 198 }); 199 200 $('.filter_menu a').click(function(){ 201 var selector = $(this).attr('data-filter'); 202 $('.swm_portfolio_sort').isotope({filter: selector}); 203 $('.filter_menu a.active').removeClass('active'); 204 $(this).addClass('active'); 205 return false;
206 }); 207 208 if ($(window).width() < 768) { 209 $('div .swm_horizontal_menu').addClass('h_responsive'); 210 } 211 212 $(".pf_sort").imagesLoaded( function() { 213 $('.pf_sort').isotope({ 214 itemSelector: '.pf_isotope', 215 masonry: { 216 //custom addition 217 } 218 }); 219 }); 220} 221 222/*************************************************************** 223 * Cause Page * 224****************************************************************/ 225 226function swm_cause_items() { 227 228 $(".swm_cause_sort").imagesLoaded( function() { 229 $('.swm_cause_sort').isotope({ 230 itemSelector: '.swm_cause_isotope', 231 masonry: { 232 //custom addition 233 } 234 }); 235 }); 236 237 $('.filter_menu a').click(function(){ 238 var selector = $(this).attr('data-filter'); 239 $('.swm_cause_sort').isotope({filter: selector}); 240 $('.filter_menu a.active').removeClass('active'); 241 $(this).addClass('active'); 242 return false; 243 }); 244 245 246 $(".cause_sort").imagesLoaded( function() { 247 $('.cause_sort').isotope({ 248 itemSelector: '.cause_isotope', 249 masonry: { 250 //custom addition 251 } 252 }); 253 }); 254} 255 256/*************************************************************** 257 * Sermons Page * 258****************************************************************/ 259 260function swm_sermons_items() { 261 262 $(".swm_sermons_sort").imagesLoaded( function() { 263 $('.swm_sermons_sort').isotope({ 264 itemSelector: '.swm_sermons_isotope', 265 masonry: { 266 //custom addition 267 } 268 }); 269 }); 270 271 $('.filter_menu a').click(function(){ 272 var selector = $(this).attr('data-filter'); 273 $('.swm_sermons_sort').isotope({filter: selector}); 274 $('.filter_menu a.active').removeClass('active'); 275 $(this).addClass('active'); 276 return false; 277 }); 278 279 280 $(".sermons_sort").imagesLoaded( function() { 281 $('.sermons_sort').isotope({ 282 itemSelector: '.sermons_isotope', 283 masonry: { 284 //custom addition 285 } 286 }); 287 }); 288} 289 290/*************************************************************** 291 * Testimonials Page * 292****************************************************************/ 293function swm_testimonials_items() { 294 $(".testimonials_sort").imagesLoaded( function() { 295 $('.testimonials_sort').isotope({ 296 itemSelector: '.testimonials_isotope', 297 masonry: { 298 //custom addition 299 } 300 }); 301 }); 302 303 $('.filter_menu a').click(function(){ 304 var selector = $(this).attr('data-filter'); 305 $('.testimonials_sort').isotope({filter: selector}); 306 $('.filter_menu a.active').removeClass('active'); 307 $(this).addClass('active'); 308 return false; 309 }); 310} 311 312/*************************************************************** 313* Auto Lightbox * 314****************************************************************/ 315 316(function($) 317{ 318 $.fn.swm_auto_lightbox = function(variables) 319 { 320 var defaults = { 321 lightboxSelectors: 'a[data-rel^="prettyPhoto"],a[rel^="prettyPhoto"], a[rel^="lightbox"], a[href$=jpg], a[href$=png], a[href$=gif], a[href$=jpeg], a[href$=".mov"] , a[href$=".swf"] , a[href*="vimeo.com"] , a[href*="youtube.com/watch"] , a[href*="screenr.com"]' 322 }; 323 324 var options = $.extend(defaults, variables), 325 win = $(window), 326 windowWidth = parseInt(win.width(),10) * 0.8, //lightbox width 327 windowHeight = (windowWidth/16)*9; // lightbox height 328 329 return this.each(function() { 330 331 var elements = $(options.lightboxSelectors, this), 332 lastParent = "", 333 counter = 0; 334 335 elements.each(function() { 336 var el = $(this), 337 rel = el.data('rel'), 338 getParent = el.parents('.swm_container:eq(0)'), 339 imgGallery = 'img_gallery'; 340 341 if(getParent.get(0) != lastParent) { 342 lastParent = getParent.get(0); 343 counter ++; 344 } 345 346 if(rel !== "" && typeof rel !== 'undefined') { 347 el.attr('rel','lightbox['+rel+']'); 348 } 349 350 if((el.attr('rel') === undefined || el.attr('rel') === '')) { 351 if(elements.length > 1) { 352 el.attr('rel','lightbox['+imgGallery+counter+']'); 353 } else { 354 el.attr('rel','lightbox'); 355 } 356 } 357 }); 358 359 if($.fn.prettyPhoto) { 360 elements.prettyPhoto({ social_tools:'',slideshow: 5000, deeplinking: false, overlay_gallery:false, default_width: windowWidth, default_height: windowHeight }); 361 } 362 363 }); 364 }; 365})(jQuery); 366 367/*************************************************************** 368* Go top scroll * 369****************************************************************/ 370 371function swm_go_top_scroll() { 372 373 var pageScroll = false;
374 var $element = $('#go_top_scroll'); 375 376 $element.click(function(e) { 377 $('body,html').animate({ scrollTop: "0" }, 750, 'easeOutExpo' ); 378 e.preventDefault(); 379 }); 380 381 $(window).scroll(function() { 382 pageScroll = true; 383 }); 384 385 setInterval(function() { 386 if( pageScroll ) { 387 pageScroll = false; 388 389 if( $(window).scrollTop() > 300 ) { 390 $element.fadeIn('fast'); 391 } else { 392 $element.fadeOut('fast'); 393 } 394 } 395 }, 250); 396} 397 398/*************************************************************** 399* Mega Menu * 400****************************************************************/ 401 402function swm_megamenu() { 403 404 var $et_top_menu = $( 'ul.top_nav' ); 405 406 $et_top_menu.find( 'li' ).hover( function() { 407 if ( ! $(this).closest( 'li.mega-menu' ).length || $(this).hasClass( 'mega-menu' ) ) { 408 $(this).addClass( 'swm_display_mega_menu' ); 409 $(this).removeClass( 'swm_menu_hover' ).addClass( 'swm_menu_hover' ); 410 } 411 }, function() { 412 var $this_el = $(this); 413 414 $this_el.removeClass( 'swm_display_mega_menu' ); 415 416 setTimeout( function() { 417 if ( ! $this_el.hasClass( 'swm_display_mega_menu' ) ) { 418 $this_el.removeClass( 'swm_menu_hover' ); 419 } 420 }, 200 ); 421 } ); 422 423} 424 425/*************************************************************** 426* Sermons Audio Video * 427****************************************************************/ 428 429function swm_sermons_single() { 430 431 var swm_sermon_video = $('.swm_sermon_video'), 432 swm_sermon_audio = $('.swm_sermon_audio'); 433 434 if (swm_sermon_audio.length) { 435 436 var mediaPlayer = new MediaElementPlayer('.sermonAudio'); 437 if ($('.sermonAudio').length) { 438 $(".sermonAudio").css('max-width', '100%'); 439 setTimeout(function() { 440 $(window).trigger('resize'); 441 swm_sermon_audio.hide(); 442 if (window.location.hash == '#getAudio') { 443 swm_sermon_video.hide(); 444 swm_sermon_audio.show(); 445 } 446 }, 400); 447 } 448 449 } 450 451 if (swm_sermon_video.length) { 452 var video_on = swm_sermon_video.html().replace('autoplay=0', 'autoplay=1'), 453 video_off = swm_sermon_video.html().replace('autoplay=1', 'autoplay=0'); 454 } 455 456 $('.playSermonVideo').click(function(event) { 457 event.preventDefault(); 458 if (swm_sermon_audio.length) { 459 mediaPlayer.pause(); 460 swm_sermon_audio.hide(); 461 } 462 swm_sermon_video.html(video_on).show(); 463 }); 464 465 $('.playSermonAudio').click(function(event) { 466 event.preventDefault(); 467 swm_sermon_video.hide(); 468 469 if (swm_sermon_video.length) { 470 swm_sermon_video.html(video_off); 471 } 472 473 swm_sermon_audio.show(); 474 mediaPlayer.play(); 475 $(window).trigger('resize'); 476 }); 477 478} 479 480/*************************************************************** 481* Load All Functions * 482****************************************************************/ 483 484swm_retinaRatioCookies(); 485swm_parallax_on(); 486swm_responsive_height(); 487swm_pf_gallery(); 488swm_portfolio_items(); 489swm_cause_items(); 490swm_sermons_items(); 491swm_testimonials_items(); 492$('.swm_container').swm_auto_lightbox(); 493swm_go_top_scroll(); 494swm_megamenu(); 495swm_sermons_single(); 496 497/****************************************************************/ 498/****************************************************************/ 499}); })(jQuery); 500// Do not delete above lines 501 502 503// Window OnLoad Functions ########################################################## 504 505(function ($) { 506 507 var $window = $(window); 508 509 $window.load(function(){ 510 511 if ( $('.swm_site_loader').length ){ 512 $(".swm_site_loader").fadeOut("slow"); 513 } 514 515 // blog grid 516 function swm_BlogGridIsotope() { 517 $('.swm_blog_grid_sort').isotope({ 518 itemSelector: '.swm_blog_grid' 519 }); 520 } 521 swm_BlogGridIsotope(); 522 $window.resize(function () { swm_BlogGridIsotope(); }); 523 window.addEventListener("orientationchange", function() { swm_BlogGridIsotope(); }); 524 525 var swm_sermon_video = $('.swm_sermon_video'); 526 if (swm_sermon_video.length) { 527 var video_on = swm_sermon_video.html().replace('autoplay=0', 'autoplay=1'); 528 if ( document.location.href.indexOf('#getVideo') > -1 && video_on ) { 529 swm_sermon_video.html(video_on).show(); 530 } 531 } 532 533 }); // End on window load 534 535})(jQuery); // End jQuery(function($) 536 537 538if (!jQuery("body").hasClass("tribe-filter-live")) { 539 540 (function (e) { 541 e(document).ready(function () { 542 if (jQuery.browser.msie) { 543 e("[placeholder]").focus(function () { 544 var t = e(this); 545 if (t.val() == t.attr("placeholder")) { 546 t.val(""); 547 t.removeClass("placeholder"); 548 } 549 }).blur(function () { 550 var t = e(this); 551 if (t.val() == "" || t.val() == t.attr("placeholder")) { 552 t.addClass("placeholder"); 553 t.val(t.attr("placeholder")); 554 } 555 }).blur().parents("form").submit(function () { 556 e(this).find("[placeholder]").each(function () { 557 var t = e(this); 558 if (t.val() == t.attr("placeholder")) { 559 t.val(""); 560 } 561 }); 562 }); 563 } 564 }); 565 })(jQuery); 566 567}
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.