PageSourceSearch

https://fida.org.ng/wp-content/themes/oconnor/js/theme.js?ver=6.9.9

js fida.org.ng collected 2026-10-02 05:50:34 UTC 59,426 bytes, 1,474 lines download raw bytes

1"use strict";
2var header = jQuery('.main_header'),
3    footer = jQuery('.main_footer'),
4    nav = jQuery('nav.main_nav'),
5    menu = nav.find('ul.menu'),
6    html = jQuery('html'),
7    body = jQuery('body'),
8    myWindow = jQuery(window),
9    windowWidth = myWindow.outerWidth();
10
11(function gt3_preloader() {
12    setTimeout(function () {
13        jQuery('#loading').fadeOut();
14    }, 8000);
15}());
16
17jQuery(document).ready(function ($) {
18
19	$('.gt3_team_list__image_link').contents().unwrap();
20		$('.gt3_team_list__title_link').contents().unwrap();
21
22    /* ol increment */
23    $("ol[start]").each(function () {
24        var val = 1;
25        if (jQuery(this).attr("start")) {
26            val = jQuery(this).attr("start");
27        }
28        val = val - 1;
29        val = 'li ' + val;
30        $(this).css('counter-increment', val);
31    });
32    gt3_search();
33    gt3_mobile_menu();
34    gt3_menu_line();
35    gt3_sticky_header();
36    gt3_burger_sidebar();
37    gt3_modal_login();
38    gt3_message_close();
39    gt3_custom_price_button();
40    gt3_back_to_top();
41    gt3_mega_menu();
42    gt3_video_play_button();
43    init_slick_post_gallery();
44    gt3_custom_color();
45    gt3_initCounter();
46    gt3_hide_label();
47
48    if ($('.pp_block').size() > 0) {
49        html.addClass('pp_page');
50    }
51    var gt3_js_bg_img = $('.gt3_js_bg_img');
52    if (gt3_js_bg_img.size() > 0) {
53        gt3_js_bg_img.each(function () {
54            $(this).css('background-image', 'url(' + $(this).attr('data-src') + ')');
55        });
56    }
57    var gt3_js_bg_color = $('.gt3_js_bg_color');
58    if (gt3_js_bg_color.size() > 0) {
59        gt3_js_bg_color.each(function () {
60            $(this).css('background-color', $(this).attr('data-bgcolor'));
61        });
62    }
63    var gt3_js_color = $('.gt3_js_color');
64    if (gt3_js_color.size() > 0) {
65        gt3_js_color.each(function () {
66            $(this).css('color', $(this).attr('data-color'));
67        });
68    }
69    var gt3_js_transition = $('.gt3_js_transition');
70    if (gt3_js_transition.size() > 0) {
71        gt3_js_transition.each(function () {
72            var transition_time = $(this).attr('data-transition') + 'ms';
73            $(this).css({'transition-duration': transition_time});
74        });
75    }
76
77    //Flickr Widget
78    if ($('.flickr_widget_wrapper').size() > 0) {
79        $('.flickr_badge_image a').each(function () {
80            $(this).append('<div class="flickr_fadder"></div>');
81        });
82    }
83
84    //Blank Anchors
85    $('a[href="#"]').on('click', function (e) {
86        e.preventDefault();
87    });
88
89    // Gt3 Carousel List
90    gt3_carousel_list();
91
92    // GT3 Testimonials List
93    gt3_testimonials_list();
94
95    // Slick Slider Arrows
96    gt3_slick_slider_arrows();
97    var carousel_arrows_tag = $('.gt3_module_featured_posts .carousel_arrows');
98    if (carousel_arrows_tag.length) {
99        carousel_arrows_tag.each(function () {
100            $(this).find('a.left_slick_arrow').on("click", function () {
101                $(this).parents('.gt3_module_carousel').find('.slick-prev').click();
102            });
103            $(this).find('a.right_slick_arrow').on("click", function () {
104                $(this).parents('.gt3_module_carousel').find('.slick-next').click();
105            });
106        });
107    }
108
109    if ($('.gt3-contact-widget').length) {
110        $('.gt3-contact-widget_label').on('click', function () {
111            $('.gt3-contact-widget').toggleClass('open');
112        })
113    }
114
115    // GT3 Countdown
116    gt3_countdown_module();
117
118    // GT3 Flicker Widget
119    gt3_flickr_widget();
120
121    // GT3 Popup Video
122    gt3_popup_video();
123
124    gt3_includes_js();
125
126    // GT3 Hotspot
127    gt3_hotspot_marker_active();
128});
129
130function gt3_includes_js() {
131    // GT3 Button
132    var gt3_btn_customize = jQuery('.gt3_btn_customize');
133    if (gt3_btn_customize.length) {
134        gt3_btn_customize.each(function () {
135            var this_btn = jQuery(this).find('a');
136            var body_tag = jQuery('body');
137
138            // Default Attributes
139            var btn_default_bg = this_btn.attr('data-default-bg');
140            var btn_default_color = this_btn.attr('data-default-color');
141            var btn_default_border_color = this_btn.attr('data-default-border');
142            var btn_default_icon = jQuery(this).find('.gt3_btn_icon').attr('data-default-icon');
143
144            // Hover Attributes
145            var btn_hover_bg = this_btn.attr('data-hover-bg');
146            var btn_hover_color = this_btn.attr('data-hover-color');
147            var btn_hover_border_color = this_btn.attr('data-hover-border');
148            var btn_hover_icon = jQuery(this).find('.gt3_btn_icon').attr('data-hover-icon');
149
150            // Theme Color
151            var theme_color = body_tag.attr('data-theme-color');
152
153            this_btn.mouseenter(function () {
154                // Button Hover Bg
155                if (typeof btn_hover_bg !== 'undefined') {
156                    this_btn.css({'background-color': btn_hover_bg});
157                } else {
158                    this_btn.css({'background-color': '#ffffff'});
159                }
160                // Button Hover Text Color
161                if (typeof btn_hover_color !== 'undefined') {
162                    this_btn.css({'color': btn_hover_color});
163                } else {
164                    this_btn.css({'color': theme_color});
165                }
166                // Button Hover Border Color
167                if (typeof btn_hover_border_color !== 'undefined') {
168                    this_btn.css({'border-color': btn_hover_border_color});
169                } else {
170                    this_btn.css({'border-color': theme_color});
171                }
172                // Button Hover Icon Color
173                if (typeof btn_hover_icon !== 'undefined') {
174                    this_btn.find('.gt3_btn_icon').css({'color': btn_hover_icon});
175                } else {
176                    this_btn.find('.gt3_btn_icon').css({'color': '#ffffff'});
177                }
178            }).mouseleave(function () {
179                // Button Default Bg
180                if (typeof btn_default_bg !== 'undefined') {
181                    this_btn.css({'background-color': btn_default_bg});
182                } else {
183                    this_btn.css({'background-color': theme_color});
184                }
185                // Button Default Text Color
186                if (typeof btn_default_color !== 'undefined') {
187                    this_btn.css({'color': btn_default_color});
188                } else {
189                    this_btn.css({'color': '#ffffff'});
190                }
191                // Button Default Border Color
192                if (typeof btn_default_border_color !== 'undefined') {
193                    this_btn.css({'border-color': btn_default_border_color});
194                } else {
195                    this_btn.css({'border-color': theme_color});
196                }
197                // Button Default Icon Color
198                if (typeof btn_default_icon !== 'undefined') {
199                    this_btn.find('.gt3_btn_icon').css({'color': btn_default_icon});
200                } else {
201                    this_btn.find('.gt3_btn_icon').css({'color': '#ffffff'});
202                }
203            });
204
205        });
206    }
207
208    // GT3 Link Layer
209    var gt3_hover_customize = jQuery('.gt3_hover_customize');
210    if (gt3_hover_customize.length) {
211        gt3_hover_customize.each(function () {
212            var this_ = jQuery(this);
213            var body_tag = jQuery('body');
214
215            // Default Attributes
216            var this_default_bg = this_.attr('data-default-bg');
217            var this_default_color = this_.attr('data-default-color');
218            var this_default_border_color = this_.attr('data-default-border');
219            var this_default_icon = jQuery(this).find('.gt3_icon').attr('data-default-icon');
220
221            // Hover Attributes
222            var this_hover_bg = this_.attr('data-hover-bg');
223            var this_hover_color = this_.attr('data-hover-color');
224            var this_hover_border_color = this_.attr('data-hover-border');
225            var this_hover_icon = jQuery(this).find('.gt3_icon').attr('data-hover-icon');
226
227            // Theme Color
228            var theme_color = body_tag.attr('data-theme-color');
229
230            this_.mouseenter(function () {
231                // Button Hover Bg
232                if (typeof this_hover_bg !== 'undefined') {
233                    this_.css({'background-color': this_hover_bg});
234                } else {
235                    // this_.css({'background-color': '#ffffff'});
236                }
237                // Button Hover Text Color
238                if (typeof this_hover_color !== 'undefined') {
239                    this_.css({'color': this_hover_color});
240                } else {
241                    // this_.css({'color': theme_color});
242                }
243                // Button Hover Border Color
244                if (typeof this_hover_border_color !== 'undefined') {
245                    this_.css({'border-color': this_hover_border_color});
246                } else {
247                    // this_.css({'border-color': theme_color});
248                }
249                // Button Hover Icon Color
250                if (typeof this_hover_icon !== 'undefined') {
251                    this_.find('.gt3_icon').css({'color': this_hover_icon});
252                } else {
253                    // this_.find('.gt3_icon').css({'color': '#ffffff'});
254                }
255            }).mouseleave(function () {
256                // Button Default Bg
257                if (typeof this_default_bg !== 'undefined') {
258                    this_.css({'background-color': this_default_bg});
259                } else {
260                    // this_.css({'background-color': theme_color});
261                }
262                // Button Default Text Color
263                if (typeof this_default_color !== 'undefined') {
264                    this_.css({'color': this_default_color});
265                } else {
266                    // this_.css({'color': '#ffffff'});
267                }
268                // Button Default Border Color
269                if (typeof this_default_border_color !== 'undefined') {
270                    this_.css({'border-color': this_default_border_color});
271                } else {
272                    // this_.css({'border-color': theme_color});
273                }
274                // Button Default Icon Color
275                if (typeof this_default_icon !== 'undefined') {
276                    this_.find('.gt3_icon').css({'color': this_default_icon});
277                } else {
278                    // this_.find('.gt3_icon').css({'color': '#ffffff'});
279                }
280            });
281
282        });
283    }
284}
285
286function gt3_mega_menu() {
287    jQuery('.gt3_header_builder > .gt3_header_builder__container .gt3_megamenu_active > .sub-menu, .gt3_header_builder > .sticky_header > .gt3_header_builder__container .gt3_megamenu_active > .sub-menu').each(function () {
288        jQuery(this).find('.gt3_megamenu_triangle').css({
289            'margin-left': '0px'
290        });
291        jQuery(this).css({
292            'margin-left': '0px'
293        });
294        var elementWidth = jQuery(this).outerWidth();
295        var windowWidth = jQuery(window).width();
296        if (elementWidth > (windowWidth - 50) || jQuery(this).hasClass('huge_number_of_column')) {
297            elementWidth = windowWidth - 50;
298            jQuery(this).addClass('huge_number_of_column');
299            var menu_item_width = jQuery(this).children('.menu-item').outerWidth();
300            var namber_item_per_row = Math.floor(elementWidth / menu_item_width);
301            var item_count = jQuery(this).children('.menu-item').length;
302            var i = 1;
303            var last_item_begin_from = (Math.floor(item_count / namber_item_per_row) * namber_item_per_row);
304            jQuery(this).children('.menu-item').each(function () {
305                i++;
306                if (last_item_begin_from < i) {
307                    jQuery(this).css('max-width', (menu_item_width - 70 /*padding value*/) + 'px');
308                }
309
310            })
311        } else {
312            jQuery(this).removeClass('huge_number_of_column');
313        }
314        var halfWidth = Math.round(elementWidth / 2);
315
316        var leftOffset = jQuery(this).offset().left - halfWidth;
317        var rightOffset = windowWidth - (leftOffset + elementWidth);
318        if (rightOffset < 25) {
319            halfWidth = halfWidth + 25 - rightOffset;
320        }
321        if (leftOffset < 25) {
322            halfWidth = halfWidth - 25 + leftOffset;
323        }
324        jQuery(this).find('.gt3_megamenu_triangle').css({
325            'margin-left': (halfWidth - 34) + 'px'
326        });
327        jQuery(this).css({
328            'margin-left': -halfWidth + 'px'
329        });
330    })
331}
332
333jQuery(window).resize(function () {
334    if (jQuery(window).width() >= 1200) {
335        gt3_mega_menu();
336    }
337});
338
339function gt3_popup_video() {
340    var swipebox = jQuery('.swipebox-video, .swipebox');
341    if (swipebox.length) {
342        swipebox.swipebox({
343            useCSS: true, // false will force the use of jQuery for animations
344            useSVG: true, // false to force the use of png for buttons
345            initialIndexOnArray: 0, // which image index to init when a array is passed
346            hideCloseButtonOnMobile: false, // true will hide the close button on mobile devices
347            removeBarsOnMobile: true, // false will show top bar on mobile devices
348            hideBarsDelay: 3000, // delay before hiding bars on desktop
349            videoMaxWidth: 1140,
350            autoplayVideos: false,
351            beforeOpen: function () {}, // called before opening
352            afterOpen: null, // called after opening
353            afterClose: function () {}, // called after closing
354            loopAtEnd: false // true will return to the first image after the last image is reached
355        });
356    }
357}
358
359function gt3_back_to_top() {
360    var W_height = jQuery(window).height();
361    var element = jQuery('#back_to_top');
362    if (element.length) {
363        element.click(function () {
364            jQuery('body,html').animate({
365                scrollTop: 0
366            }, 500);
367            return false;
368        });
369        var show_back_to_top = function () {
370            if (jQuery(document).scrollTop() < W_height) {
371                element.removeClass('show');
372            } else {
373                element.addClass('show');
374            }
375        };
376        show_back_to_top();
377        jQuery(window).scroll(function () {
378            show_back_to_top();
379        });
380    }
381}
382
383// menu line
384function gt3_menu_line() {
385    var menu = jQuery('.main-menu.main_menu_container.menu_line_enable > ul');
386    if (menu.length) {
387        menu.each(function () {
388            var menu = jQuery(this);
389            var current = '';
390            menu.append('<span class="menu_item_line"></span>');
391            var menu_item = menu.find('> .menu-item');
392            var currentItem = menu.find('> .current-menu-item');
393            var currentItemParent = menu.find('> .current-menu-ancestor');
394            var line = menu.find('.menu_item_line');
395            if (currentItem.length || currentItemParent.length) {
396                current = currentItem.length ? currentItem : (currentItemParent.length ? currentItemParent : '');
397                line.css({width: current.find('>a').outerWidth()});
398                line.css({left: current.find('>a').offset().left - menu.offset().left});
399            }
400
401            menu_item.mouseenter(function () {
402                line.css({width: jQuery(this).find('> a').outerWidth()});
403                line.css({left: jQuery(this).find('> a').offset().left - jQuery(this).parent().offset().left});
404            });
405
406            menu.mouseleave(function () {
407                if (current.length) {
408                    line.css({width: current.find('> a').outerWidth()});
409                    line.css({left: current.find('> a').offset().left - menu.offset().left});
410                } else {
411                    line.css({width: '0'});
412                    line.css({left: '100%'});
413                }
414            });
415
416
417        })
418    }
419}
420
421function gt3_sticky_header() {
422    if (jQuery(window).width() > 1200) {
423        var stickyNumber = jQuery('.gt3_header_builder').height();
424        var stickyHeader = jQuery('.gt3_header_builder > .sticky_header');
425        var docScroll = jQuery(document).scrollTop();
426        var docScrollNext = jQuery(document).scrollTop();
427        if (stickyHeader.length) {
428            var stickyType = stickyHeader.attr('data-sticky-type');
429            if (stickyHeader[0].hasAttribute('data-sticky-number')) {
430                stickyNumber = stickyHeader.attr('data-sticky-number');
431            }
432            var stickyOn = function () {
433                docScroll = jQuery(document).scrollTop();
434                if (stickyType === 'classic') {
435                    if (docScroll < stickyNumber) {
436                        stickyHeader.removeClass('sticky_on')
437                    } else {
438                        stickyHeader.addClass('sticky_on')
439                    }
440                } else {
441                    if ((docScrollNext < docScroll) || (docScroll < stickyNumber)) {
442                        stickyHeader.removeClass('sticky_on')
443                    } else {
444                        stickyHeader.addClass('sticky_on')
445                    }
446                }
447                docScrollNext = jQuery(document).scrollTop();
448
449            };
450            stickyOn();
451            jQuery(window).scroll(function () {
452                stickyOn();
453            });
454        }
455    }
456
457}
458
459// mobile menu
460function gt3_mobile_menu() {
461    var windowW = jQuery(window);
462    var loaded = false;
463    var main_menu = jQuery('.mobile_menu_container .main-menu > ul');
464    var sub_menu = jQuery('.mobile_menu_container .main-menu > ul ul');
465    var mobile_toggle = jQuery('.mobile-navigation-toggle');
466    if (windowW.width() <= 1200) {
467        sub_menu.hide().removeClass('showsub');
468        main_menu.hide().addClass('mobile_view_on');
469        loaded = true;
470        gt3_mobile_menu_switcher(main_menu)
471    } else {
472        sub_menu.show();
473        main_menu.show();
474    }
475
476    jQuery(window).resize(function () {
477        if (windowW.width() <= 1200) {
478            if (!mobile_toggle.hasClass('is-active')) {
479                sub_menu.hide().removeClass('showsub');
480                main_menu.hide().removeClass('showsub').addClass('mobile_view_on');
481                mobile_toggle.removeClass('is-active')
482            }
483            if (loaded === false) {
484                loaded = true;
485                gt3_mobile_menu_switcher(main_menu)
486            }
487        } else {
488            sub_menu.show().removeClass('showsub');
489            main_menu.show().removeClass('showsub').removeClass('mobile_view_on');
490            mobile_toggle.removeClass('is-active')
491        }
492    });
493}
494
495// end mobile menu
496
497function gt3_mobile_menu_switcher(main_menu) {
498    if (jQuery(main_menu).find('.menu-item-has-children > .mobile_sitcher').length === 0) {
499        jQuery(main_menu).find('.menu-item-has-children').append('<div class="mobile_sitcher"></div>')
500    }
501    jQuery('.mobile-navigation-toggle').on("tap click", function () {
502        var element = jQuery(this);
503        if (element.hasClass('is-active')) {
504            main_menu.removeClass('showsub').slideUp(200);
505            element.removeClass('is-active')
506        } else {
507            main_menu.addClass('showsub').slideDown(200);
508            element.addClass('is-active')
509        }
510    });
511
512    jQuery(main_menu).find('.menu-item-has-children > .mobile_sitcher , .menu-item-has-children > a[href*=#]').on("tap click", function (e) {
513        e.preventDefault();
514        var element = jQuery(this);
515        if (element.hasClass('is-active')) {
516            element.prev('ul.sub-menu').removeClass('showsub').slideUp(200);
517            element.next('ul.sub-menu').removeClass('showsub').slideUp(200);
518            element.removeClass('is-active')
519        } else {
520            element.prev('ul.sub-menu').addClass('showsub').slideDown(200);
521            element.next('ul.sub-menu').addClass('showsub').slideDown(200);
522            element.addClass('is-active')
523        }
524    });
525}
526
527function gt3_burger_sidebar() {
528    var element = jQuery('.gt3_header_builder_burger_sidebar_component');
529    var sidebar = jQuery('.gt3_header_builder__burger_sidebar');
530    jQuery('.gt3_header_builder_burger_sidebar_component,.gt3_header_builder__burger_sidebar-cover').on('click', function () {
531        if (element.hasClass('active')) {
532            element.removeClass('active');
533            sidebar.removeClass('active');
534            jQuery('body').removeClass('active_burger_sidebar');
535        } else {
536            element.addClass('active');
537            sidebar.addClass('active');
538            jQuery('body').addClass('active_burger_sidebar');
539        }
540    });
541    jQuery(sidebar).on('swiperight', function () {
542        if (element.hasClass('active')) {
543            element.removeClass('active');
544            sidebar.removeClass('active');
545            jQuery('body').removeClass('active_burger_sidebar');
546        } else {
547            element.addClass('active');
548            sidebar.addClass('active');
549            jQuery('body').addClass('active_burger_sidebar');
550        }
551    });
552}
553
554function gt3_modal_login() {
555    var element = jQuery('.gt3_header_builder__login-modal');
556    jQuery('.gt3_header_builder_login_component,.gt3_header_builder__login-modal-close,.gt3_header_builder__login-modal-cover').on('click', function () {
557        if (element.hasClass('active')) {
558            element.removeClass('active');
559        } else {
560            element.addClass('active');
561        }
562    })
563}
564
565function gt3_search() {
566    var top_search = jQuery('.header_search');
567
568    if (top_search.size() > 0) {
569        top_search.each(function () {
570
571            var $ctsearch = jQuery(this),
572                $ctsearchinput = $ctsearch.find('input.search_text'),
573                $body = jQuery('html, body'),
574                openSearch = function () {
575                    $ctsearch.data('open', true).addClass('ct-search-open');
576                    $ctsearchinput.focus();
577                    return false;
578                },
579                closeSearch = function () {
580                    $ctsearch.data('open', false).removeClass('ct-search-open');
581                };
582
583            $ctsearchinput.on('click', function (e) {
584                e.stopPropagation();
585                $ctsearch.data('open', true);
586            });
587
588            $ctsearch.on('click', function (e) {
589                e.stopPropagation();
590                if (!$ctsearch.data('open')) {
591                    openSearch();
592                    $body.on('click', function () {
593                        closeSearch();
594                    });
595                } else {
596                    if ($ctsearchinput.val() === '') {
597                        closeSearch();
598                        return false;
599                    }
600                }
601            });
602
603            top_search.on('click', function () {
604                var element = jQuery(this);
605                if (element.hasClass('ct-search-hover')) {
606                    element.removeClass('ct-search-hover');
607                } else {
608                    element.addClass('ct-search-hover');
609                    setTimeout(function () {
610                        element.find('input.search_text').focus();
611                    }, 100);
612                }
613            })
614
615        });
616    }
617
618    jQuery('.search_form .search_submit').on({
619        mouseenter: function () {
620            jQuery(this).parents('.search_form').addClass("button-hover");
621        },
622        mouseleave: function () {
623            jQuery(this).parents('.search_form').removeClass("button-hover");
624        }
625    });
626}
627
628function gt3_message_close() {
629    jQuery(".gt3_message_box-closable").each(function () {
630        var element = jQuery(this);
631        element.find('.gt3_message_box__close').on('click', function () {
632            element.slideUp(300);
633        })
634    })
635}
636
637jQuery(window).resize(function () {
638    // Slick Slider Arrows
639    gt3_slick_slider_arrows();
640    // Blog Isotope reLayout
641    gt3_blog_isotope_update_js();
642});
643
644jQuery(window).load(function () {
645    gt3_practice_isotope();
646    gt3_team_isotope();
647    gt3_case_isotope();
648    gt3_practice_load_more_init();
649    gt3_team_load_more_init();
650    gt3_case_load_more_init();
651
652    // Blog Isotope reLayout
653    /*gt3_blog_isotope_update_js ();*/
654    gt3_blog_isotope_js();
655    jQuery('#loading').fadeOut();
656});
657
658// Slick Slider Arrows
659function gt3_slick_slider_arrows() {
660    var carousel_arrows_tag = jQuery('.gt3_module_featured_posts .carousel_arrows');
661    if (carousel_arrows_tag.length) {
662        carousel_arrows_tag.each(function () {
663            if (jQuery(this).parents('.gt3_module_carousel').find('.slick-arrow').length) {
664                jQuery(this).removeClass('hidden_block');
665            } else {
666                jQuery(this).addClass('hidden_block');
667            }
668        });
669    }
670}
671
672// -------------------- //
673// --- GT3 COMPOSER --- //
674// -------------------- //
675
676// GT3 Counter
677function gt3_initCounter() {
678    var gt3_module_counter = jQuery('.gt3_module_counter');
679    if ((gt3_module_counter).length) {
680        if (jQuery(window).width() > 760) {
681            var waypoint = new Waypoint({
682                element: document.getElementsByClassName('gt3_module_counter'),
683                handler: function (direction) {},
684                offset: 'bottom-in-view'
685            });
686            waypoint.context.refresh();
687
688            gt3_module_counter.each(function () {
689                var cur_this = jQuery(this);
690                if (jQuery(this).offset().top < jQuery(window).height()) {
691                    if (!jQuery(this).hasClass('done')) {
692                        var stat_count = cur_this.find('.stat_count'),
693                            set_count = stat_count.attr('data-value'),
694                            counter_suffix = stat_count.attr('data-suffix'),
695                            counter_prefix = stat_count.attr('data-prefix');
696
697                        jQuery(this).find('.stat_temp').stop().animate({width: set_count}, {
698                            duration: 3000,
699                            step: function (now) {
700                                var data = Math.floor(now);
701                                stat_count.text(counter_prefix + data + counter_suffix
701);
702                            }
703                        });
704                        jQuery(this).addClass('done');
705                    }
706                } else {
707                    jQuery(this).waypoint(function () {
708                        if (!cur_this.hasClass('done')) {
709                            var stat_count = cur_this.find('.stat_count'),
710                                set_count = stat_count.attr('data-value'),
711                                counter_suffix = stat_count.attr('data-suffix'),
712                                counter_prefix = stat_count.attr('data-prefix');
713                            cur_this.find('.stat_temp').stop().animate({width: set_count}, {
714                                duration: 3000,
715                                step: function (now) {
716                                    var data = Math.floor(now);
717                                    stat_count.text(counter_prefix + data + counter_suffix);
718                                }
719                            });
720                            cur_this.addClass('done');
721                        }
722                    }, {offset: 'bottom-in-view'});
723                }
724            });
725        } else {
726            gt3_module_counter.each(function () {
727                var stat_count = jQuery(this).find('.stat_count'),
728                    set_count = stat_count.attr('data-value'),
729                    counter_suffix = stat_count.attr('data-suffix'),
730                    counter_prefix = stat_count.attr('data-prefix');
731                jQuery(this).find('.stat_temp').stop().animate({width: set_count}, {
732                    duration: 3000,
733                    step: function (now) {
734                        var data = Math.floor(now);
735                        stat_count.text(counter_prefix + data + counter_suffix);
736                    }
737                });
738            }, {offset: 'bottom-in-view'});
739        }
740    }
741}
742
743// team
744function gt3_team_isotope(){
745    jQuery('.gt3_team_list__posts-container').each(function(){
746        var element = jQuery(this);
747        var element_item = element.find('.gt3_team_list__item');
748        // var layoutMode = element.hasClass('isotope_packery') ? 'masonry' : 'fitRows';
749        var count = 1;
750
751        element_item.on('mouseenter', function(){
752            count ++;
753            jQuery(this).css({'z-index':count});
754        });
755
756        element.find('.gt3_team_list__item:not(.image_loaded)').each(function(){
757            element_item = jQuery(this);
758            element_item.find('img').imagesLoaded().always(function(instance ){
759                jQuery(instance.elements).parents('.gt3_team_list__item').addClass('image_loaded');
760            })
761        });
762
763        element.isotope({
764            itemSelector: '.gt3_team_list__item',
765            percentPosition: true,
766            masonry: {
767                columnWidth: '.gt3_team_list__grid-sizer',
768                gutter: '.gt3_team_list__grid-gutter'
769            }
770        });
771
772        element.imagesLoaded(function(){
773            element.isotope({
774                itemSelector: '.gt3_team_list__item',
775                percentPosition: true,
776                masonry: {
777                    columnWidth: '.gt3_team_list__grid-sizer',
778                    gutter: '.gt3_team_list__grid-gutter'
779                }
780            });
781        });
782
783        element.parent('.gt3_team_list').find(".gt3_team_list__filter.isotope-filter a").on( 'click', function(){
784            var filter_item = jQuery(this);
785            filter_item.siblings().removeClass('active');
786            filter_item.addClass("active");
787            var selector = filter_item.attr('data-filter');
788            element.isotope({
789                filter: selector
790            });
791            return false;
792        });
793    })
794}
795
796function gt3_team_load_more_init (){
797    var gt3_team_list = jQuery('.gt3_team_list');
798    if (gt3_team_list.length) {
799        gt3_team_list.each(function(){
800            var element = jQuery(this);
801            var loadMoreButton = element.find('.gt3_team_load_more');
802            var teamContainer = element.find('.gt3_team_list__posts-container');
803            var nextPage = 2;
804            var max_num_pages = 3;
805            if (typeof teamContainer.data('max_num_pages') !== 'undefined' && teamContainer.data('max_num_pages') !== false) {
806                max_num_pages = teamContainer.data('max_num_pages');
807            }
808
809            loadMoreButton.on('click', function (e) {
810                loadMoreButton.addClass('loading');
811                e.preventDefault();
812                e.stopPropagation();
813                if (nextPage <= max_num_pages) {
814                    var ajaxData = {
815                        action: 'gt3_get_team_item_from_ajax',
816                        build_query: teamContainer.attr('data-build_query'),
817                        team_style: teamContainer.attr('data-team_style'),
818                        posts_per_line: teamContainer.attr('data-posts_per_line'),
819                        items_load: teamContainer.attr('data-items_load'),
820                        post_count: teamContainer.attr('data-post_count')
821                    };
822                    ajaxData['next_page'] = nextPage;
823                    jQuery.ajax({
824                        type: 'POST',
825                        data: ajaxData,
826                        url: gt3_oconnor.ajaxurl,
827                        success: function (data) {
828                            loadMoreButton.removeClass('loading');
829                            if (data !== '') {
830                                var response = jQuery.parseJSON(data);
831                                var responseHtml = response.html;
832                                var img_loader = imagesLoaded( teamContainer );
833                                img_loader.on( "always", function (){
834                                    setTimeout(function() {
835                                        teamContainer
836                                            .append( jQuery(responseHtml) )
837                                            .isotope( 'appended', jQuery(responseHtml) )
838                                            .isotope('reloadItems');
839                                        teamContainer.find('.gt3_team_list__item:not(.image_loaded)').each(function(){
840                                            jQuery(this).imagesLoaded().always(function(instance ){
841                                                jQuery(instance.elements).addClass('image_loaded');
842                                            })
843                                        });
844                                        setTimeout(function(){
845                                            teamContainer.isotope({sortby: 'original-order'});
846                                        },100)
847                                    },200);
848                                });
849                                if (Number(response.items_left) <= '0') {
850                                    loadMoreButton.hide(300);
851                                }
852                                teamContainer.attr('data-post_count',Number(ajaxData.post_count) + Number(ajaxData.items_load));
853                            }
854                        }
855                    });
856                }
857            })
858        })
859    }
860}
861
862// Practice
863function gt3_practice_isotope() {
864    jQuery('.gt3_practice_list__posts-container').each(function () {
865        var element = jQuery(this);
866        var element_item = element.find('.gt3_practice_list__item');
867        // var layoutMode = element.hasClass('isotope_packery') ? 'masonry' : 'fitRows';
868        var count = 1;
869
870        element_item.on('mouseenter', function(){
871            count ++;
872            jQuery(this).css({'z-index':count});
873        });
874
875        element.find('.gt3_practice_list__item:not(.image_loaded)').each(function () {
876            element_item = jQuery(this);
877            element_item.find('img').imagesLoaded().always(function (instance) {
878                jQuery(instance.elements).parents('.gt3_practice_list__item').addClass('image_loaded');
879            })
880        });
881
882        element.isotope({
883            itemSelector: '.gt3_practice_list__item',
884            percentPosition: true,
885            masonry: {
886                columnWidth: '.gt3_practice_list__grid-sizer',
887                // columnWidth: Math.floor(element.outerWidth(true)/4),
888                gutter: '.gt3_practice_list__grid-gutter'
889            }
890        });
891
892        element.imagesLoaded(function () {
893            element.isotope({
894                itemSelector: '.gt3_practice_list__item',
895                percentPosition: true,
896                masonry: {
897                    columnWidth: '.gt3_practice_list__grid-sizer',
898                    // columnWidth: Math.floor(element.outerWidth(true)/4),
899                    gutter: '.gt3_practice_list__grid-gutter'
900                }
901            });
902        });
903
904        element.parent('.gt3_practice_list').find(".gt3_practice_list__filter.isotope-filter a").on('click', function () {
905            var filter_item = jQuery(this);
906            filter_item.siblings().removeClass('active');
907            filter_item.addClass("active");
908            var selector = filter_item.attr('data-filter');
909            element.isotope({
910                filter: selector
911            });
912            return false;
913        });
914
915    })
916}
917
918function gt3_practice_load_more_init() {
919    var gt3_practice_list = jQuery('.gt3_practice_list');
920    if (gt3_practice_list.length) {
921        gt3_practice_list.each(function () {
922            var element = jQuery(this);
923            var loadMoreButton = element.find('.gt3_practice_load_more');
924            var practiceContainer = element.find('.gt3_practice_list__posts-container');
925            var nextPage = 2;
926            var max_num_pages = 3;
927            if (typeof practiceContainer.data('max_num_pages') !== 'undefined' && practiceContainer.data('max_num_pages') !== false) {
928                max_num_pages = practiceContainer.data('max_num_pages');
929            }
930
931            loadMoreButton.on('click', function (e) {
932                loadMoreButton.addClass('loading');
933                e.preventDefault();
934                e.stopPropagation();
935                if (nextPage <= max_num_pages) {
936                    var ajaxData = {
937                        action: 'gt3_get_practice_item_from_ajax',
938                        build_query: practiceContainer.attr('data-build_query'),
939                        practice_style: practiceContainer.attr('data-practice_style'),
940                        practice_layout: practiceContainer.attr('data-practice_layout'),
941                        columns_with_spaces: practiceContainer.attr('data-columns_with_spaces'),
942                        rounded_images: practiceContainer.attr('data-rounded_images'),
943                        posts_per_line: practiceContainer.attr('data-posts_per_line'),
944                        image_proportional: practiceContainer.attr('data-image_proportional'),
945                        items_load: practiceContainer.attr('data-items_load'),
946                        post_count: practiceContainer.attr('data-post_count')
947                    };
948                    ajaxData['next_page'] = nextPage;
949                    jQuery.ajax({
950                        type: 'POST',
951                        data: ajaxData,
952                        url: gt3_oconnor.ajaxurl,
953                        success: function (data) {
954                            loadMoreButton.removeClass('loading');
955                            if (data !== '') {
956                                var response = jQuery.parseJSON(data);
957                                var responseHtml = response.html;
958                                var img_loader = imagesLoaded(practiceContainer);
959                                img_loader.on("always", function () {
960                                    setTimeout(function () {
961                                        practiceContainer
962                                            .append(jQuery(responseHtml))
963                                            .isotope('appended', jQuery(responseHtml))
964                                            .isotope('reloadItems');
965                                        practiceContainer.find('.gt3_practice_list__item:not(.image_loaded)').each(function () {
966                                            jQuery(this).imagesLoaded().always(function (instance) {
967                                                jQuery(instance.elements).addClass('image_loaded');
968                                            })
969                                        });
970                                        setTimeout(function () {
971                                            practiceContainer.isotope({sortby: 'original-order'});
972                                        }, 100)
973                                    }, 200);
974                                });
975                                if (Number(response.items_left) <= '0') {
976                                    loadMoreButton.hide(300);
977                                }
978                                practiceContainer.attr('data-post_count', Number(ajaxData.post_count) + Number(ajaxData.items_load));
979                            }
980                        }
981                    });
982                }
983            })
984        })
985    }
986}
987
988// case
989function gt3_case_isotope(){
990    jQuery('.gt3_case_list__posts-container').each(function(){
991        var element = jQuery(this);
992        var element_item = element.find('.gt3_case_list__item');
993        // var layoutMode = element.hasClass('isotope_packery') ? 'masonry' : 'fitRows';
994        var count = 1;
995
996        element_item.on('mouseenter', function(){
997            count ++;
998            jQuery(this).css({'z-index':count});
999        });
1000
1001        element.find('.gt3_case_list__item:not(.image_loaded)').each(function(){
1002            element_item = jQuery(this);
1003            element_item.find('img').imagesLoaded().always(function(instance ){
1004                jQuery(instance.elements).parents('.gt3_case_list__item').addClass('image_loaded');
1005            })
1006        });
1007
1008        element.isotope({
1009            itemSelector: '.gt3_case_list__item',
1010            percentPosition: true,
1011            masonry: {
1012                columnWidth: '.gt3_case_list__grid-sizer',
1013                gutter: '.gt3_case_list__grid-gutter'
1014            }
1015        });
1016
1017        element.imagesLoaded(function(){
1018            element.isotope({
1019                itemSelector: '.gt3_case_list__item',
1020                percentPosition: true,
1021                masonry: {
1022                    columnWidth: '.gt3_case_list__grid-sizer',
1023                    gutter: '.gt3_case_list__grid-gutter'
1024                }
1025            });
1026        });
1027
1028        element.parent('.gt3_case_list').find(".gt3_case_list__filter.isotope-filter a").on( 'click', function(){
1029            var filter_item = jQuery(this);
1030            filter_item.siblings().removeClass('active');
1031            filter_item.addClass("active");
1032            var selector = filter_item.attr('data-filter');
1033            element.isotope({
1034                filter: selector
1035            });
1036            return false;
1037        });
1038    })
1039}
1040
1041function gt3_case_load_more_init (){
1042    var gt3_case_list = jQuery('.gt3_case_list');
1043    if (gt3_case_list.length) {
1044        gt3_case_list.each(function(){
1045            var element = jQuery(this);
1046            var loadMoreButton = element.find('.gt3_case_load_more');
1047            var caseContainer = element.find('.gt3_case_list__posts-container');
1048            var nextPage = 2;
1049            var max_num_pages = 3;
1050            if (typeof caseContainer.data('max_num_pages') !== 'undefined' && caseContainer.data('max_num_pages') !== false) {
1051                max_num_pages = caseContainer.data('max_num_pages');
1052            }
1053
1054            loadMoreButton.on('click', function (e) {
1055                if (!caseContainer.hasClass('dsb_img_placeholder')) caseContainer.addClass('dsb_img_placeholder');
1056                loadMoreButton.addClass('loading');
1057                e.preventDefault();
1058                e.stopPropagation();
1059                if (nextPage <= max_num_pages) {
1060                    var ajaxData = {
1061                        action: 'gt3_get_case_item_from_ajax',
1062                        build_query: caseContainer.attr('data-build_query'),
1063                        case_style: caseContainer.attr('data-case_style'),
1064                        posts_per_line: caseContainer.attr('data-posts_per_line'),
1065                        items_load: caseContainer.attr('data-items_load'),
1066                        post_count: caseContainer.attr('data-post_count')
1067                    };
1068                    ajaxData['next_page'] = nextPage;
1069                    jQuery.ajax({
1070                        type: 'POST',
1071                        data: ajaxData,
1072                        url: gt3_oconnor.ajaxurl,
1073                        success: function (data) {
1074                            loadMoreButton.removeClass('loading');
1075                            if (data !== '') {
1076                                var response = jQuery.parseJSON(data);
1077                                var responseHtml = response.html;
1078                                var add = jQuery(responseHtml);
1079                                caseContainer.append(add);
1080                                caseContainer.imagesLoaded(function () {
1081                                    caseContainer.isotope('appended', add).isotope({sortby: 'original-order'}).isotope('reloadItems');
1082                                    setTimeout(function () {
1083                                        caseContainer.find('.gt3_case_list__item:not(.image_loaded)').addClass('image_loaded');
1084                                    }, 100);
1085                                });
1086                                if (Number(response.items_left) <= '0') {
1087                                    loadMoreButton.hide(300);
1088                                }
1089                                caseContainer.attr('data-post_count', Number(ajaxData.post_count) + Number(ajaxData.items_load));
1090                            }
1091                        }
1092                    });
1093                }
1094            })
1095        })
1096    }
1097}
1098
1099function gt3_custom_price_button() {
1100    jQuery(".shortcode_button").each(function () {
1101        var _this = jQuery(this);
1102        if (_this.attr('data-btn-color')) {
1103            var curent_color = _this.attr('data-btn-color');
1104            this.style.borderColor = curent_color;
1105            this.style.backgroundColor = curent_color;
1106            this.style.color = "#ffffff";
1107            _this.on({
1108                mouseenter: function () {
1109                    /*this.style.backgroundColor = "#ffffff";
1110                    this.style.color = curent_color;*/
1111                    _this.style.backgroundColor = "#ffffff";
1112                    _this.style.color = curent_color;
1113                },
1114                mouseleave: function () {
1115                    /*this.style.backgroundColor = curent_color;
1116                    this.style.color = "#ffffff";*/
1117                    _this.style.backgroundColor = curent_color;
1118                    _this.style.color = "#ffffff";
1119                }
1120            })
1121        }
1122    });
1123
1124    jQuery(".shortcode_button.alt").each(function () {
1125        var _this = jQuery(this);
1126        if (_this.attr('data-btn-color')) {
1127            var curent_color = _this.attr('data-btn-color');
1128            this.style.borderColor = curent_color;
1129            this.style.backgroundColor = "#ffffff";
1130            this.style.color = curent_color;
1131            _this.on({
1132                mouseenter: function () {
1133                    /*this.style.backgroundColor = curent_color;
1134                    this.style.color = "#ffffff";*/
1135                    _this.style.backgroundColor = curent_color;
1136                    _this.style.color = "#ffffff";
1137                },
1138                mouseleave: function () {
1139                    /*this.style.backgroundColor = "#ffffff";
1140                    this.style.color = curent_color;*/
1141                    _this.style.backgroundColor = "#ffffff";
1142                    _this.style.color = curent_color;
1143                }
1144            })
1145        }
1146    })
1147}
1148
1149// Blog Isotope
1150function gt3_blog_isotope_js() {
1151    var isotope_blog_items = jQuery('.isotope_blog_items');
1152    if ((isotope_blog_items).length) {
1153        isotope_blog_items.isotope({
1154            itemSelector: '.element'
1155        });
1156    }
1157}
1158
1159// Blog Isotope reLayout
1160function gt3_blog_isotope_update_js() {
1161    var isotope_blog_items = jQuery('.isotope_blog_items');
1162    if ((isotope_blog_items).length) {
1163        isotope_blog_items.isotope('layout');
1164    }
1165}
1166
1167// Gt3 Carousel List
1168function gt3_carousel_list() {
1169    var carousel_tag = jQuery('.gt3_carousel_list');
1170    if (carousel_tag.length) {
1171        carousel_tag.each(function () {
1172            jQuery(this).slick();
1173        });
1174    }
1175}
1176
1177// Gt3 Testimonials
1178function gt3_testimonials_list() {
1179    var module_testimonial_type4 = jQuery('.module_testimonial.type4');
1180    if ((module_testimonial_type4).length) {
1181        module_testimonial_type4.each(function () {
1182            var cur_img = jQuery(this).find('.testimonials_photo');
1183            var wrapper_img = '';
1184            for (var i = 0; i < cur_img.length; i++) {
1185                wrapper_img += cur_img[i].outerHTML;
1186            }
1187            jQuery(this).find('.testimonials-photo-wrapper').append(wrapper_img);
1188        })
1189    }
1190    var module_testimonial_active_carousel = jQuery('.module_testimonial.active-carou
1190sel');
1191    if ((module_testimonial_active_carousel).length) {
1192        module_testimonial_active_carousel.each(function () {
1193            var cur_slidesToShow = jQuery(this).attr('data-slides-per-line') * 1;
1194            var cur_sliderAutoplay = jQuery(this).attr('data-autoplay-time') * 1;
1195            var cur_fade = jQuery(this).attr('data-slider-fade') === 1;
1196            var rotator = jQuery(this).find('.testimonials_rotator');
1197            var photo_wrapper = jQuery(this).find('.testimonials-photo-wrapper');
1198            jQuery(this).find('.testimonials_rotator').slick({
1199                slidesToShow: cur_slidesToShow,
1200                slidesToScroll: cur_slidesToShow,
1201                autoplay: true,
1202                autoplaySpeed: cur_sliderAutoplay,
1203                speed: 500,
1204                dots: true,
1205                fade: cur_fade,
1206                focusOnSelect: true,
1207                arrows: false,
1208                infinite: true,
1209                asNavFor: photo_wrapper
1210            });
1211            var centerMode = false;
1212            if (jQuery(this).hasClass('testimonials_align_center')) {
1213                centerMode = true;
1214            }
1215            jQuery(this).find('.testimonials-photo-wrapper').slick({
1216                slidesToShow: 3,
1217                slidesToScroll: 1,
1218                asNavFor: rotator,
1219                dots: false,
1220                centerMode: centerMode,
1221                focusOnSelect: true
1222            })
1223        });
1224    }
1225}
1226
1227// GT3 Countdown
1228function gt3_countdown_module() {
1229    var countdown = jQuery('.gt3-countdown');
1230    if ((countdown).length) {
1231        countdown.each(function () {
1232            var year = jQuery(this).attr('data-year');
1233            var month = jQuery(this).attr('data-month');
1234            var day = jQuery(this).attr('data-day');
1235            var hours = jQuery(this).attr('data-hours');
1236            var min = jQuery(this).attr('data-min');
1237            var format = jQuery(this).attr('data-format');
1238
1239            var austDay = new Date(+year, +month - 1, +day, +hours, +min);
1240            jQuery(this).countdown({
1241                until: austDay,
1242                format: format,
1243                padZeroes: true,
1244                labels: [jQuery(this).attr('data-label_years'), jQuery(this).attr('data-label_months'), jQuery(this).attr('data-label_weeks'), jQuery(this).attr('data-label_days'), jQuery(this).attr('data-label_hours'), jQuery(this).attr('data-label_minutes'), jQuery(this).attr('data-label_seconds')],
1245                labels1: [jQuery(this).attr('data-label_year'), jQuery(this).attr('data-label_month'), jQuery(this).attr('data-label_week'), jQuery(this).attr('data-label_day'), jQuery(this).attr('data-label_hour'), jQuery(this).attr('data-label_minute'), jQuery(this).attr('data-label_second')]
1246            });
1247        });
1248    }
1249}
1250
1251// GT3 Flicker Widget
1252function gt3_flickr_widget() {
1253    var flickr_widget_wrapper = jQuery('.flickr_widget_wrapper');
1254    if ((flickr_widget_wrapper).length) {
1255        flickr_widget_wrapper.each(function () {
1256            var flickrid = jQuery(this).attr('data-flickrid');
1257            var widget_id = jQuery(this).attr('data-widget_id');
1258            var widget_number = jQuery(this).attr('data-widget_number');
1259            jQuery(this).addClass('flickr_widget_wrapper_' + flickrid);
1260
1261            jQuery.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?id=" + widget_id + "&lang=en-us&format=json&jsoncallback=?", function (data) {
1262                jQuery.each(data.items, function (i, item) {
1263                    if (i < widget_number) {
1264                        jQuery("<img/>").attr("src", item.media.m).appendTo(".flickr_widget_wrapper_" + flickrid).wrap("<div class=\'flickr_badge_image\'><a href=\'" + item.link + "\' target=\'_blank\' title=\'Flickr\'></a></div>");
1265                    }
1266                });
1267            });
1268        });
1269    }
1270}
1271
1272// Post Likes
1273jQuery(document).on("click", ".post_likes_add", function () {
1274    var post_likes_this = jQuery(this);
1275    if (!jQuery.cookie(post_likes_this.attr('data-modify') + post_likes_this.attr('data-postid'))) {
1276        jQuery.post(gt3_oconnor.ajaxurl, {
1277            action: 'add_like_attachment',
1278            attach_id: jQuery(this).attr('data-postid')
1279        }, function (response) {
1280            jQuery.cookie(post_likes_this.attr('data-modify') + post_likes_this.attr('data-postid'), 'true', {
1281                expires: 7,
1282                path: '/'
1283            });
1284            post_likes_this.addClass('already_liked');
1285            post_likes_this.find('span.like_count').text(response);
1286        });
1287    }
1288});
1289
1290function gt3_hotspot_marker_active() {
1291    var $marker_wrap = jQuery('.gt3_marker_wrapper'),
1292        count = 1;
1293
1294    if (windowWidth > 760) {
1295
1296        jQuery('.gt3-hotspot-shortcode-wrapper').each(function () {
1297            var $self = $marker_wrap.first(),
1298                $self_half_width = Math.round($self.width() / 2),
1299                $self_half_height = Math.round($self.height() / 2);
1300            jQuery(this).find('.gt3_marker_wrapper').css('transform', 'translate3d(-' + $self_half_width + 'px, -' + $self_half_height + 'px, 0px)');
1301        });
1302
1303        var $marker_click = jQuery('.hotspot_action-click .gt3_marker'),
1304            $marker_hover = jQuery('.hotspot_action-hover .gt3_marker'),
1305            $marker_visible = jQuery('.hotspot_action-visible .gt3_marker');
1306
1307        $marker_click.on('click', function () {
1308            gt3_tooltip_offset(jQuery(this), count);
1309        });
1310
1311        $marker_hover.on('hover', function () {
1312            gt3_tooltip_offset(jQuery(this), count);
1313        });
1314
1315        $marker_visible.on('click', function () {
1316            gt3_tooltip_offset(jQuery(this), count);
1317        });
1318        $marker_visible.trigger('click');
1319
1320        jQuery(document).keyup(function (e) {
1321            if (e.keyCode === 27) $marker_wrap.removeClass('active');
1322        });
1323    } else {
1324        var $marker = jQuery('.gt3_marker');
1325        $marker.on('click', function () {
1326            count++;
1327            jQuery(this).parent().toggleClass('active').css({'z-index': count});
1328        })
1329    }
1330    jQuery('.gt3_marker_wrapper .gt3-close').on('click', function (e) {
1331        e.preventDefault();
1332        jQuery(this).closest('.gt3_marker_wrapper').removeClass('active');
1333    });
1334    jQuery(document).on('mouseup', function (e) {
1335        e.preventDefault();
1336        if ($marker_wrap.has(e.target).length === 0) {
1337            jQuery('.gt3-hotspot-image-cover:not(.hotspot_action-visible) .gt3_marker_wrapper').removeClass('active');
1338        }
1339    });
1340}
1341
1342function gt3_tooltip_offset(click_hover, count) {
1343    /* GT3 Tooltip Offset */
1344    var tooltip = jQuery(click_hover).parent().find('.gt3_tooltip'),
1345        selfWidth = tooltip.outerWidth(),
1346        selfOffset = tooltip.offset();
1347
1348    if (selfOffset.left <= 0 && selfOffset.left + selfWidth > windowWidth) {
1349        tooltip.removeClass('gt3-hotspot-offset-left gt3-hotspot-offset-right').addClass('gt3-hotspot-offset-outsite');
1350    } else if (selfOffset.left <= 0) {
1351        tooltip.removeClass('gt3-hotspot-offset-outsite gt3-hotspot-offset-right').addClass('gt3-hotspot-offset-left');
1352    } else if (selfOffset.left + selfWidth > windowWidth) {
1353        tooltip.removeClass('gt3-hotspot-offset-outsite gt3-hotspot-offset-left').addClass('gt3-hotspot-offset-right');
1354    }
1355
1356    /* GT3 Tooltip z-index */
1357    count++;
1358    jQuery(click_hover).parent().toggleClass('active').css({'z-index': count});
1359}
1360
1361// Video
1362function gt3_video_play_button() {
1363    jQuery('.blog_post_media.has_post_thumb').each(function () {
1364        var iframe = jQuery(this).find('.gt3_video__play_iframe iframe');
1365        var iframe_wrapper = jQuery(this).find('.gt3_video__play_iframe');
1366        var thumb = jQuery(this).find('.gt3_video_wrapper__thumb');
1367        jQuery(this).find('.gt3_video__play_button').on('click', function () {
1368            iframe[0].src += jQuery(this).attr('data-video-autoplay');
1369            iframe_wrapper.addClass('play_video');
1370            thumb.addClass('play_video');
1371        })
1372
1373    })
1374}
1375
1376// Gallery
1377function init_slick_post_gallery() {
1378    var all_wrappers = jQuery('.blog_post_media .slider-wrapper');
1379    if (!all_wrappers.length) {
1380        return;
1381    }
1382    jQuery.each(all_wrappers, function (key, $scope) {
1383        var slick_wrapper = jQuery('.slick_wrapper', $scope);
1384        slick_wrapper.slick({
1385            autoplay: false,
1386            arrows: true,
1387            dots: false,
1388            slidesToScroll: 1,
1389            slidesToShow: 1,
1390            focusOnSelect: true,
1391            speed: 500,
1392            nextArrow: '<button type="button" class="slick-next"></button>',
1393            prevArrow: '<button type="button" class="slick-prev"></button>'
1394        });
1395    })
1396}
1397
1398// Custom Colors
1399function gt3_custom_color() {
1400    jQuery('.gt3_custom_color').each(function () {
1401        var element = jQuery(this);
1402        var color = element.attr('data-color');
1403        var hover_color = element.attr('data-hover-color');
1404        var bg_color = element.attr('data-bg-color');
1405        var border_color = element.attr('data-border-color');
1406        var bg_hover_color = element.attr('data-hover-bg-color');
1407        var border_hover_color = element.attr('data-hover-border-color');
1408
1409        //set default colors
1410        if (typeof color !== 'undefined') {
1411            element.css({'color': color});
1412        } else {
1413            element.css({'color': ''});
1414        }
1415        if (typeof bg_color !== 'undefined') {
1416            element.css({'background-color': bg_color});
1417        } else {
1418            element.css({'background-color': ''});
1419        }
1420
1421        if (typeof border_color !== 'undefined') {
1422            element.css({'border-color': border_color});
1423        } else {
1424            element.css({'border-color': ''});
1425        }
1426
1427        //change colors on mouseenter / mouseleave
1428        element.mouseenter(function () {
1429            // Button Hover Text Color
1430            if (typeof hover_color !== 'undefined') {
1431                element.css({'color': hover_color});
1432            }
1433            if (typeof bg_hover_color !== 'undefined') {
1434                element.css({'background-color': bg_hover_color});
1435            }
1436            if (typeof border_hover_color !== 'undefined') {
1437                element.css({'border-color': border_hover_color});
1438            }
1439        }).mouseleave(function () {
1440            // Button Default Text Color
1441            if (typeof color !== 'undefined') {
1442                element.css({'color': color});
1443            } else {
1444                element.css({'color': ''});
1445            }
1446            if (typeof bg_color !== 'undefined') {
1447                element.css({'background-color': bg_color});
1448            } else {
1449                element.css({'background-color': ''});
1450            }
1451            if (typeof border_color !== 'undefined') {
1452                element.css({'border-color': border_color});
1453            } else {
1454                element.css({'border-color': ''});
1455            }
1456        });
1457    })
1458}
1459
1460function gt3_hide_label() {
1461    var mc_merge_var = jQuery('#mc_signup').find('.mc_merge_var');
1462    if (mc_merge_var.length) {
1463        mc_merge_var.each(function () {
1464            var _elem = jQuery(this).find('input, textarea');
1465            _elem.on('focus', function () {
1466                jQuery(this).prev('label').addClass('gt3_onfocus');
1467            }).on('blur', function () {
1468                if (jQuery(this).val() === '') {
1469                    jQuery(this).prev('label').removeClass('gt3_onfocus');
1470                }
1471            });
1472        })
1473    }
1474}

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.