PageSourceSearch

https://masonsindelaware.org/wp-content/themes/churchwp/js/churchwp-custom.js?ver=1.0.0.1790323359

js masonsindelaware.org collected 2026-09-25 08:04:42 UTC 12,642 bytes, 294 lines download raw bytes

1/*
2 Project name:       churchwp
3 Project author:     ThemeSLR
4 File name:          Custom JS
5*/
6
7(function ($) {
8    'use strict';
9
10    var is_webkit = navigator.userAgent.toLowerCase().indexOf( 'webkit' ) > -1,
11        is_opera  = navigator.userAgent.toLowerCase().indexOf( 'opera' )  > -1,
12        is_ie     = navigator.userAgent.toLowerCase().indexOf( 'msie' )   > -1;
13
14    if ( ( is_webkit || is_opera || is_ie ) && document.getElementById && window.addEventListener ) {
15        window.addEventListener( 'hashchange', function() {
16            var element = document.getElementById( location.hash.substring( 1 ) );
17
18            if ( element ) {
19                if ( ! /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) {
20                    element.tabIndex = -1;
21                }
22
23                element.focus();
24            }
25        }, false );
26    }
27
28    jQuery(document).ready(function() {
29
30        new WOW().init();
31
32        // jQuery preloader
33        jQuery(window).load(function(){
34            jQuery( '.churchwp_preloader_holder' ).fadeOut( 1000, function() {
35                jQuery( this ).fadeOut();
36            });
37        });
38
39        jQuery('a.print-portfolio').on( "click", function(event) {
40            event.preventDefault();
41        });
42
43        jQuery('[data-toggle="tooltip"]').tooltip();
44
45
46        // FIXED SEARCH FORM
47        jQuery('.mt-search-icon').on( "click", function() {
48            event.preventDefault();
49            jQuery('.fixed-search-overlay').toggleClass('visible');
50        });
51
52        jQuery(document).keyup(function(e) {
53             if (e.keyCode == 27) { // escape key maps to keycode `27`
54                jQuery('.fixed-search-overlay').removeClass('visible');
55                jQuery('.fixed-sidebar-menu').removeClass('open');
56                jQuery('.fixed-sidebar-menu-overlay').removeClass('visible');
57            }
58        });
59
60
61
62        jQuery('#churchwp-nav-burger').on( "click", function() {
63            jQuery('.fixed-sidebar-menu').toggleClass('open');
64            jQuery(this).parent().find('#navbar').toggleClass('hidden');
65            jQuery('.fixed-sidebar-menu-overlay').addClass('visible');
66        });
67
68        /* Click on Overlay - Hide Overline / Slide Back the Sidebar header */
69        jQuery('.fixed-sidebar-menu-overlay').on( "click", function() {
70            jQuery('.fixed-sidebar-menu').removeClass('open');
71            jQuery(this).removeClass('visible');
72        });    
73        /* Click on Overlay - Hide Overline / Slide Back the Sidebar header */
74        jQuery('.fixed-sidebar-menu .icon-close').on( "click", function() {
75            jQuery('.fixed-sidebar-menu').removeClass('open');
76            jQuery('.fixed-sidebar-menu-overlay').removeClass('visible');
77        });
78
79
80        // 9th MENU Toggle - Hamburger
81        var toggles = document.querySelectorAll(".c-hamburger");
82
83        for (var i = toggles.length - 1; i >= 0; i--) {
84          var toggle = toggles[i];
85          toggleHandler(toggle);
86        };
87
88        function toggleHandler(toggle) {
89          toggle.addEventListener( "click", function(e) {
90            e.preventDefault();
91            (this.classList.contains("is-btn-active") === true) ? this.classList.remove("is-btn-active") : this.classList.add("is-btn-active");
92          });
93        }
94
95        jQuery( ".fixed-sidebar-menu .menu-button" ).on( "click", function() {
96            jQuery(this).parent().parent().parent().parent().toggleClass('open');
97            jQuery(this).toggleClass('open');
98        });
99
100
101        if (jQuery(window).width() < 760) {
102/*
103            jQuery( ".menu-item-has-children" ).on( "click", function() {
104				
105	            jQuery(this).find('.sub-menu').first('.sub-menu').toggle('shown');
106                jQuery('.sub-menu.shown').removeClass('.shown');
107            });*/
108
109        }
110        
111        // BEGIN: MOBILE NAVIGATION OPTIMIZATION
112        if (jQuery(window).width() < 1024) {
113            var expand = '<span class="expand"><a class="action-expand"></a></span>';
114            jQuery('.navbar-collapse .menu-item-has-children, .navbar-collapse .mega1column, .navbar-collapse .mega2columns, .navbar-collapse .mega3columns').append(expand);
115            jQuery('header #navbar .sub-menu').hide();
116            jQuery(".menu-item-has-children .expand").on("click",function() {
117                console.log('menu click')
118                jQuery(this).closest('.menu-item').find(' > ul').slideToggle('fast');
119                jQuery(this).toggleClass("show-menu");
120            });
121           jQuery(".mega1column .expand a, .mega2columns .expand a, .mega3columns .expand a").on("click",function() {
122                jQuery(this).parent().parent().find(' > .cf-mega-menu').toggle();
123                jQuery(this).toggleClass("show-menu");
124            });
125        }
126        // END: MOBILE NAVIGATION OPTIMIZATION
127
128
129        //Begin: Sticky Head
130        jQuery(function(){
131           if (jQuery('body').hasClass('is_nav_sticky')) {
132                jQuery(window).resize(function() {
133                    if (jQuery(window).width() <= 1024) {
134                    } else {
135                        jQuery("#theme-main-head").sticky({
136                            topSpacing:0
137                        });
138                    }
139                });
140                if (jQuery(window).width() >= 1024) {
141                    jQuery("#theme-main-head").sticky({
142                        topSpacing:0
143                    });
144                }
145           }
146        });
147
148
149
150        /*Begin: Products by category*/
151        jQuery(".clients-container").owlCarousel({
152            navigation      : false, // Show next and prev buttons
153            pagination      : false,
154            autoPlay        : true,
155            slideSpeed      : 700,
156            paginationSpeed : 700,
157            itemsCustom : [
158                [0,     1],
159                [450,   2],
160                [600,   2],
161                [700,   3],
162                [1000,  5],
163                [1200,  5],
164                [1400,  5],
165                [1600,  5]
166            ]
167        });
168       
169        /*Begin: Testimonials slider*/
170        jQuery(".testimonials_slider").owlCarousel({
171            navigation      : true, // Show next and prev buttons
172            pagination      : true,
173            autoPlay        : false,
174            slideSpeed      : 700,
175            paginationSpeed : 700,
176            singleItem      : true
177        });
178        /*End: Testimonials slider*/
179        /* Animate */
180        jQuery('.animateIn').animateIn();
181        // browser window scroll (in pixels) after which the "back to top" link is shown
182        var offset = 300,
183        //browser window scroll (in pixels) after which the "back to top" link opacity is reduced
184        offset_opacity = 1200,
185        //duration of the top scrolling animation (in ms)
186        scroll_top_duration = 700,
187        //grab the "back to top" link
188        $back_to_top = jQuery('.back-to-top');
189
190
191        //hide or show the "back to top" link
192        jQuery(window).scroll(function(){
193            ( jQuery(this).scrollTop() > offset ) ? $back_to_top.addClass('themeslr-is-visible') : $back_to_top.removeClass('themeslr-is-visible themeslr-fade-out');
194            if( jQuery(this).scrollTop() > offset_opacity ) { 
195                $back_to_top.addClass('themeslr-fade-out');
196            }
197        });
198
199
200        //smooth scroll to top
201        $back_to_top.on('click', function(event){
202            event.preventDefault();
203            $('body,html').animate({
204                scrollTop: 0 ,
205                }, scroll_top_duration
206            );
207        });
208
209
210
211        //Begin: Skills
212        jQuery('.statistics').appear(function() {
213            jQuery('.percentage').each(function(){
214                var dataperc = jQuery(this).attr('data-perc');
215                jQuery(this).find('.skill-count').delay(6000).countTo({
216                    from: 0,
217                    to: dataperc,
218                    speed: 5000,
219                    refreshInterval: 100
220                });
221            });
222        }); 
223        //End: Skills 
224
225        var SidebarMenuEffects = (function() {
226
227            function hasParentClass( e, classname ) {
228                if(e === document) return false;
229                if( classie.has( e, classname ) ) {
230                    return true;
231                }
232                return e.parentNode && hasParentClass( e.parentNode, classname );
233            }
234
235            // http://coveroverflow.com/a/11381730/989439
236            function mobilecheck() {
237                var check = false;
238                (function(a){if(/(android|ipad|playbook|silk|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4)))check = true})(navigator.userAgent||navigator.vendor||window.opera);
239                return check;
240            }
241
242            function init() {
243
244                var container = document.getElementById( 'st-container' ),
245                    buttons = Array.prototype.slice.call( document.querySelectorAll( '#st-trigger-effects > button' ) ),
246                    // event type (if mobile use touch events)
247                    eventtype = mobilecheck() ? 'touchstart' : 'click',
248                    resetMenu = function() {
249                        classie.remove( container, 'st-menu-open' );
250                    },
251                    bodyClickFn = function(evt) {
252                        if( !hasParentClass( evt.target, 'st-menu' ) ) {
253                            resetMenu();
254                            document.removeEventListener( eventtype, bodyClickFn );
255                        }
256                    };
257
258                buttons.forEach( function( el, i ) {
259                    var effect = el.getAttribute( 'data-effect' );
260
261                    el.addEventListener( eventtype, function( ev ) {
262                        ev.stopPropagation();
263                        ev.preventDefault();
264                        container.className = 'st-container'; // clear
265                        classie.add( container, effect );
266                        setTimeout( function() {
267                            classie.add( container, 'st-menu-open' );
268                        }, 25 );
269                        document.addEventListener( eventtype, bodyClickFn );
270                    });
271                } );
272
273            }
274
275            init();
276
277        })();
278
279
280    })
281
282$(document).ready(function() {
283    $('.custom-slider1 .vc_carousel-slideline-inner .vc_inner').each(function() {
284        var altText = $(this).find('img').attr('alt');
285        $('<p class="alt-img-slider">').text(altText).insertAfter($(this).find('img'));
286    });
287});
288
289
290} (jQuery) )
291
292
293var container = document.querySelectorAll( '[data-view-breakpoint-pointer]' );
294window.tribe.events.views.breakpoints.setup( container );

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.