PageSourceSearch

https://mrlinfo.org/wp-content/themes/orga/framework/js/custom.js?ver=6.9.9

js mrlinfo.org collected 2026-10-03 23:44:04 UTC 11,594 bytes, 344 lines download raw bytes

1jQuery.noConflict();
2jQuery(document).ready(function($){
3    "use strict";
4
5    var currentWidth = window.innerWidth || document.documentElement.clientWidth;
6
7    // Loader
8    if( dttheme_urls.loadingbar === "enable") {
9        Pace.on("done", function(){
10            $(".loader").fadeOut(500);
11            $(".pace").remove();
12        });
13    }
14
15    // Mega Menu
16        if ( $('li.has-mega-menu').length>0 && $('.dt-no-header-builder-content').length==0 ) {
17
18            jQuery.fn.liCenter = function () {
19
20                var w = $('#header .container').width(),
21                    a = $(window).width(),
22                    c = $('.dt-header-menu').parents('.wpb_column'),
23                    ol = c.offset().left;
24
25                $('.mega-menu-page-equal li.has-mega-menu:not(.mega-menu-custom-width) > ul > li.menu-item-object-dt_mega_menus').css("width", w+"px");
26
27                this.css("width", a+"px");
28                this.css("left", ol*-1+"px");
29
30                return this;
31            };
32
33            $('.mega-menu-page-equal li.has-mega-menu:not(.mega-menu-custom-width) > ul').liCenter();
34
35            $(window).resize(function(){
36                $('.mega-menu-page-equal li.has-mega-menu:not(.mega-menu-custom-width) > ul').liCenter();
37            });
38        }
39
40    // Mobile Menu    
41
42        // Move Nav as Mobile Nav
43        $("div.dt-header-menu").each(function(){
44            var d = $(this).data('menu'),
45                c = $(this).find('ul[data-menu="'+d+'"]').clone(),
46                m = $('body').find('.mobile-menu[data-menu="'+d+'"]');
47
48            c.prependTo(m);
49        });
50
51        // Opening Mobile Nav
52        $('.menu-trigger').on('click', function( event ){
53            $(this).next('.mobile-menu').toggleClass('nav-is-visible');
54            $(this).parent('.mobile-nav-container').find('.overlay').toggleClass('is-visible');
55            $('body').toggleClass('nav-is-visible');
56        });
57
58        // Closing Mobile Nav
59            function closeMobNav() {
60                $('body').removeClass('nav-is-visible');
61                $('.overlay').removeClass('is-visible');
62                $('.mobile-menu').removeClass('nav-is-visible');
63                $('.menu-item-has-children a').removeClass('selected');        
64                $('.menu-item-has-children ul.sub-menu').addClass('is-hidden');            
65            }
66
67            $('li.close-nav').on('click', function(event){
68                closeMobNav();
69            });
70
71            $('.mobile-nav-container > .overlay').on('click', function(event){
72                closeMobNav();
73            });
74
75        // Sub Menu in Mobile Menu
76        $('.menu-item-has-children > a, .page_item_has_children > a').on('click', function(event) {
77
78            if ( $('body').hasClass('nav-is-visible') ) {
79                event.preventDefault();
80                var a = $(this).clone();
81                $(this).next('.sub-menu').find('.see-all').html(a);
82            }
83
84            var selected = $(this);
85            if( selected.next('ul').hasClass('is-hidden') ) {
86                selected.addClass('selected').next('ul.sub-menu').removeClass('is-hidden');
87            } else {
88                selected.removeClass('selected').next('ul.sub-menu').addClass('is-hidden');
89            }
90        });
91
92        // Go Back in Mobile Menu
93        $('.go-back').on('click', function(){
94            $(this).parent('ul:not(.menu)').addClass('is-hidden');
95        });
96
97    // Visual Nav Menu
98        if( $('ul.visual-nav').length > 0 ) {
99
100            $('ul.visual-nav').visualNav({
101                selectedClass     : 'current_page_item',
102                externalLinks     : 'external',
103                useHash           : false,
104                // offsetTop : 100
105            });          
106        }
107
108    $("div.dt-video-wrap").fitVids();
109    $('a.video-image').prettyPhoto({
110        animation_speed:'normal',
111        theme:'facebook',
112        slideshow:3000,
113        autoplay_slideshow: false,
114        social_tools: false,
115        deeplinking:false
116    });      
117
118    // Container
119    if( currentWidth > 767 ) {
120        if( $('#primary').hasClass('with-both-sidebar') ) {
121           if( ( $('#secondary-left').is(':empty') && $('#secondary-right').is(':empty')) ){
122                $('#primary').css({'width': '100%', 'margin': 0});
123           }
124        } else if( $('#primary').hasClass('with-left-sidebar') ) {
125           if( $('#secondary-left').is(':empty') ){
126                $('#primary').css({'width': '100%', 'margin': 0});
127           }
128        } else if( $('#primary').hasClass('with-right-sidebar') ) {
129           if( $('#secondary-right').is(':empty') ){
130                $('#primary').css({'width': '100%', 'margin': 0});
131           }
132        }
133    }
134
135    $('#main .sidebar-as-sticky').theiaStickySidebar({
136        additionalMarginTop: 70,
137        containerSelector: $('#primary').parent('.container')
138    });
139
140    if($('.sidenav-sticky').length){
141        $('.sidenav-sticky .side-navigation').theiaStickySidebar({
142            additionalMarginTop: 90,
143            containerSelector: $('#primary')
144        });
145    }    
146
147    // <select> 
148    $("select").each(function(){
149        if($(this).css('display') != 'none') {
150            $(this).wrap( '<div class="selection-box"></div>' );
151        }
152    });
153
154    $('.activity-type-tabs > ul >li:first').addClass('selected');
155    $('.dir-form > .item-list-tabs > ul > li:first').addClass('selected');
156
157    $('.downcount').each(function(){
158        var el = $(this);
159        el.downCount({
160            date    : el.attr('data-date'),
161            offset  : el.attr('data-offset')
162        });
163    });
164
165    $('p:empty').each(function (){
166        $(this).next('br').remove();
167        $(this).remove();
168    });
169
170    // Map Overlay
171        $('.dt-sc-contact-details-on-map a.map-switch-icon').on( "click", function() {
172            $(this).parents('.dt-sc-contact-details-on-map').toggleClass('hide-overlay');
173            $('.dt-sc-map-overlay').toggle();
174            return false;
175        });
176
177        $('.dt-sc-contact-details-on-map a.switch-icon').on( "click", function() {
178            $(this).parents('.dt-sc-contact-details-on-map').addClass('hide-overlay');
179            $('.dt-sc-map-overlay').toggle();
180            $('.back-to-contact').toggle();
181            return false;
182        });
183
184        $('.dt-sc-contact-details-on-map a.back-to-contact').on( "click", function() {
185            $(this).parents('.dt-sc-contact-details-on-map').removeClass('hide-overlay');
186            $('.dt-sc-map-overlay').toggle();
187            $(this).toggle();
188            return false;
189        });
190
191    //Smart Resize
192    $(window).bind("resize", function() {
193
194        //Blog Template
195        if( $(".apply-isotope").length ) {
196            $(".apply-isotope").isotope({itemSelector : '.column',transformsEnabled:false,masonry: { columnWidth: '.grid-sizer' } });
197        }
198    });
199
200    // Window Load Start
201    $(window).load(function(){
202
203        //Blog Template
204        if( $(".apply-isotope").length ) {
205            $(".apply-isotope").isotope({itemSelector : '.column',transformsEnabled:false,masonry: { columnWidth: '.grid-sizer' } });
206        }
207
208        //Gallery Post Slider
209        if( ($("ul.entry-gallery-post-slider").length) && ( $("ul.entry-gallery-post-slider li").length > 1 ) ){
210            $("ul.entry-gallery-post-slider").bxSlider({auto:false, video:true, useCSS:false, pager:'', autoHover:true, adaptiveHeight:true});
211        }
212    });
213
214    $(".dt-like-this").click(function(){
215
216        var el = jQuery(this);
217
218        if( el.hasClass('liked') ) {
219            return false;
220        }
221
222        var post = {
223            action: 'orga_likes_ajax',
224            post_id: el.attr('data-id')
225        };
226
227        $.post(dttheme_urls.ajaxurl, post, function(data){
228            el.find('span').html(data);
229            el.addClass('liked');
230        });
231        return false;
232    });
233
234    $('input, textarea').placeholder();
235
236    // Toggle store locator advacned options
237        $("a.dt-sc-toggle-advanced-options").click(function( event ){
238            event.preventDefault();
239            var $this = $(this);
240            $this.parents('.wpsl-search').find( "div.dt-sc-advanced-options" ).slideToggle( "slow", function() {
241                $this.toggleClass('expanded');
242                if($this.hasClass('expanded')) {
243                    $this.html(dttheme_urls.advOptions + ' <span class="fa fa-angle-up"></span>');
244                } else {
245                    $this.html(dttheme_urls.advOptions + ' <span class="fa fa-angle-down"></span>');
246                }
247            });
248        });
249
250    //Sinle post like btn
251    if( $(".single-post").length ) {
252        $(".dt_like_btn a").on("click",function() {
253            var btn = $(this);
254            var post_id = btn.data("postid");
255            var act = btn.data("action");
256
257            $.ajax({
258                type: "post",
259                url: dttheme_urls.ajaxurl,
260                data: { action: 'orga_post_rating_like',
261                        nonce: dttheme_urls.wpnonce,
262                        post_id: post_id,
263                        doaction: act
264                      },
265                success: function(data, textStatus, XMLHttpRequest){
266                        btn.find('i').text(data);
267                },
268                error: function(MLHttpRequest, textStatus, errorThrown){
269                    //alert(textStatus);
270                }
271            });
272            return false;
273        });
274    }
275
276    //Scroll down animate
277    $(".dt_scroll_down a").click(function(a) {
278        a.preventDefault();
279
280        var st = 0;
281        if(dttheme_urls.stickynav === 'enable') {
282            st = 90;
283        }
284
285        $("html, body").stop();
286        $("html, body").animate({
287            scrollTop: $('.entry-details.within-image').offset().top - st
288        }, {
289            duration: 1000,
290            easing: "easeInOutQuart"
291        });
292    });    
293          
294
295    // Go To Top
296    $().UItoTop({ easingType: 'easeOutQuart' });
297
298    if( $('.dt-sc-icon-box-type9').length ) {
299        setTimeout(function(){
300            $('.dt-sc-icon-box-type9').each(function(){
301                $(this).find('.icon-wrapper').css('height', $(this).find('.icon-content').outerHeight(true) );
302            });
303        },1000);
304    }
305        
306    if( $('ul.dt-sc-tabs-vertical-frame').length ) {
307        $('ul.dt-sc-tabs-vertical-frame').each(function(){
308            $(this).css('min-height', $(this).height() );
309        });
310    }
311
312    if( $('ul.dt-sc-tabs-vertical').length ) {
313        $('ul.dt-sc-tabs-vertical').each(function(){
314            $(this).css('min-height', $(this).height() );
315        });
316    }  
317
318    // Overlay Search
319    $("div.overlay-header-search").each(function(){
320        var triggerBttn = $(this).find("a.dt-search-icon"),
321            overlay = $(this).find('div.overlay'),
322            closeBttn = $(this).find('div.overlay-close');
323
324       triggerBttn.on('click', function(){
325            if( overlay.hasClass( 'open' ) ) {
326                overlay.removeClass( 'open' )
327                overlay.addClass( 'close' );
328            }else if( !overlay.hasClass( 'close' ) ) {
329                overlay.addClass( 'open' );
330            }
331        });
332        closeBttn.on('click', function(){
333            if( overlay.hasClass( 'open' ) ) {
334                overlay.removeClass( 'open' )
335                overlay.addClass( 'close' );
336
337                overlay.removeClass( 'close' );
338            }else if( !overlay.hasClass( 'close' ) ) {
339                overlay.addClass( 'open' );
340            }
341        });
342    });
343     
344});

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.