PageSourceSearch

https://keda.co.uk/wp-content/themes/jevelin/js/scripts.js?ver=dff779a818276393ee48e7794920eaf6

js keda.co.uk collected 2026-10-02 12:31:38 UTC 99,405 bytes, 2,534 lines download raw bytes

1jQuery(document).ready(function ($) {
2    "use strict";
3
4    /* Lazy Loading */
5    $('.lazy').Lazy({
6        effect: "fadeIn",
7        effectTime: 500,
8        threshold: 1500,
9    });
10
11
12    // Mobile cart link
13    $('header.primary-mobile .sh-nav-cart-content').on( 'click', function(){
14        if( $(this).parent().attr('href') ) {
15            window.location.href = $(this).parent().attr('href');
16        }
17    });
18
19
20    /* Mobile Classic - Navigation Render */
21    if( $('.sh-header-right-side .sh-nav-mobile').length ) {
22        $('.primary-mobile .sh-nav-mobile').html( $('.sh-header-right-side .sh-nav-mobile').html() );
23    } else if( $('.sh-header-left-side .sh-nav').length ) {
24        $('.primary-mobile .sh-nav-mobile').html( $('.sh-header-left-side .sh-nav').html() );
25    } else {
26        $('.primary-mobile .sh-nav-mobile').html( $('.primary-desktop #header-navigation .sh-nav').html() );
27    }
28    $('.primary-mobile .sh-nav-mobile > li.sh-nav-special').remove();
29
30
31    /* Header Builder - Mobile Navigation Render */
32    if( $('.sh-header-builder').length ) {
33        $('.sh-header-builder').each( function() {
34            var nav_html = '';
35            $(this).find( '.sh-header-builder-main-element-navigation .sh-nav' ).each( function() {
36                nav_html = nav_html + $(this).html();
37            });
38
39            $(this).find('.sh-nav-mobile').html( nav_html );
40
41        });
42    }
43
44    $('.sh-header-builder-mobile-menu').on('click', function(e) {
45        /*$(this).closest('.sh-header-builder-mobile').find('.sh-header-mobile-dropdown').toggle();*/
46
47        $(this).closest('.sh-header-builder-mobile').find('.sh-header-mobile-dropdown').stop(true, true).slideToggle( 300, 'linear' );
48
49        var menu = $(this).find(".c-hamburger");
50        if( menu.hasClass("is-active") === true ) {
51            menu.removeClass("is-active");
52        } else {
53            menu.addClass("is-active");
54        }
55    });
56
57
58    /* Mobile header dropdown (close if needed) */
59    setTimeout(function(){
60        if( $(document).width() < 1025 ) {
61            $('.primary-desktop .sh-nav ul.sub-menu, .sh-header-builder-main ul.sub-menu').css('display', 'none');
62        }
63    }, 50);
64    function jevelin_header_dropdown() {
65        if ($(document).width() > 1025) {
66            $('.sh-header-mobile-dropdown').hide();
67        }
68
69        if ($(document).width() < 1025) {
70            $('body').removeClass('page-layout-right-fixed');
71            $('.primary-desktop ul.sub-menu, .sh-header-builder-main ul.sub-menu').css( 'display', 'none' );
72            $('.sh-sticky-mobile-header .sh-header-mobile-dropdown').css( 'overflow', 'auto' );
73            if( $('#wpadminbar').length ) {
74                $('.sh-sticky-mobile-header .sh-header-mobile-dropdown').css( 'max-height',  $(window).height() - $('.sh-header-mobile-navigation').height() - $('#wpadminbar').height() );
75            } else {
76                $('.sh-sticky-mobile-header .sh-header-mobile-dropdown').css( 'max-height',  $(window).height() - $('.sh-header-mobile-navigation').height() );
77            }
78        }
79    }
80    jevelin_header_dropdown();
81
82
83    /* Header navigation position fix */
84    function jevelin_navigation_position() {
85        var new_position, menu_status, menu_width, menu_offset, window_width;
86        window_width = $(document).width();
87        $('ul.sh-nav ul').mouseover(function() {
88
89            menu_status = $(this).find('.sub-menu').length;
90            if( menu_status > 0 ) {
91
92                menu_width = $(this).find('.sub-menu').actual( 'outerWidth' );
93                //console.log( menu_width );
94                menu_offset = $(this).find('.sub-menu').parent().offset().left + menu_width;
95                if( (menu_offset + menu_width) > window_width ) {
96
97                    if( $('.sh-header.sh-header-megamenu-style2').length ) {
98                        new_position = menu_width + 0 + 15;
99                    } else {
100                        new_position = menu_width + 0;
101                    }
102
103                    $(this).find('.sub-menu').css({
104                        left: -new_position-0,
105                        top: '0',
106                    });
107
108                } else {
109
110                    $(this).find('.sub-menu').css({
111                        left: new_position+0,
112                        top: '0',
113                    });
114
115                }
116
117            }
118        });
119    }
120    jevelin_navigation_position();
121
122
123    /* Mega menu helper */
124    function jevelin_megamenu() {
125        $('.sh-nav .mega-menu-row').each(function(){
126            $(this).children().css('height','');
127            var self = $(this);
128            var count = parseInt( $(this).children().length );
129            if( count > 0 && count <= 4 ) {
130                $(this).addClass( 'mega-menu-row-'+count );
131
132                var maxHeight = $(self).actual( 'height' );
133                $(this).find('>:nth-child(-n+'+count+')').each(function() {
134                    $(this).height( maxHeight );
135                });
136            } else {
137                $(this).addClass( 'mega-menu-row-5' );
138
139                var count_now = 0;
140                while( count >= count_now ) {
141                    count_now += 4;
142
143                    var maxHeight = -1;
144                    $(this).find('>:nth-child(n+'+(count_now-3)+'):nth-child(-n+'+count_now+')').each(function() {
145                        maxHeight = maxHeight > $(this).actual( 'height' ) ? maxHeight : $(this).actual( 'height' );
146                    });
147
148                    $(this).find('>:nth-child(n+'+(count_now-3)+'):nth-child(-n+'+count_now+')').each(function() {
149                        $(this).height(maxHeight);
150                    });
151                }
152            }
153        });
154    }
155    jevelin_megamenu();
156
157
158    /* Page builder section option */
159    $('.sh-column-adjust-left .fw-row:first-child .sh-column:first-child > div').append( '<div class="fw-row">'+$('.sh-section-3e0cbbb965eff9a43388283e981cfa23 .fw-row:not(:first-child)').html()+'</div>' );
160    $('.sh-column-adjust-left .sh-section-container > .fw-row:not(:first-child)').remove();
161
162    var section_justify_height_init = 1;
163    var section_justify_height_last = 0;
164    if( $('.sh-google-map').length > 0 ) {
165        section_justify_height_init = 0;
166    }
167    function jevelin_section_justify_height() {
168        $( '.section-justify-height .fw-row' ).each(function() {
169            if( $(this).children().length > 1 ) {
170
171                $(this).children().css( 'height', '' );
172                $('.section-justify-height-google-maps').css( 'max-height', '' ).css( 'min-height', '' );
173                if (window.matchMedia('(min-width: 800px)').matches) {
174                    $(this).children().css( 'height', $(this).height() );
175                    section_justify_height_last = $(this).height();
176
177                    $(this).find('.section-justify-height-google-maps').css( 'max-height', section_justify_height_last+'px' ).css( 'min-height', section_justify_height_last+'px' );
178                }
179
180                if( section_justify_height_init < 1 ) {
181                    $(this).children().children().each(function() {
182                        if( $(this).children().length == '1' && $(this).children().hasClass('sh-google-map') == true ) {
183                            $(this).find('.fw-map > .fw-map-canvas').addClass('section-justify-height-google-maps').css( 'max-height', section_justify_height_last+'px' ).css( 'min-height', section_justify_height_last+'px' );
184                        }
185                    });
186                }
187
188            }
189
190        });
191        section_justify_height_init++;
192    }
193
194    jevelin_section_justify_height();
195    $(window).load(function (){
196        jevelin_section_justify_height();
197    });
198
199
200    function jevelin_nan_to_0( number ) {
201        if( isNaN( number ) ) {
202            return 0;
203        } else {
204            return number;
205        }
206    }
207
208
209
210    /* Header Height */
211    $('.sh-header-7 #header-logo').css('height',$('.sh-header-7').height());
212    $('.sh-header-top-10 .header-contacts').css('height',$('.sh-header-top-10').height());
213    $('header.primary-desktop').css('height', $('header.primary-desktop').actual( 'height' ) );
214
215    if( $('header.primary-mobile .sh-page-notice').is(":visible") ) {
216        $('header.primary-mobile').css('height', jevelin_nan_to_0( parseInt( $('.sh-header-mobile-navigation').actual( 'height' ) ) ) + jevelin_nan_to_0( parseInt( $('header.primary-mobile .sh-page-notice').actual( 'outerHeight' ) ) ) );
217    } else {
218        $('header.primary-mobile').css('height', jevelin_nan_to_0( parseInt( $('.sh-header-mobile-navigation').actual( 'height' ) ) ) );
219    }
220
221
222
223
224
225    
226    
227    /* Resize action (slow) */
228    $(window).resize(function() {
229        clearTimeout(window.resizedFinished);
230        window.resizedFinished = setTimeout(function(){
231
232            jevelin_header_dropdown();
233            jevelin_navigation_position();
234            jevelin_megamenu();
235            jevelin_section_justify_height();
236
237        }, 500);
238    });
239
240
241    /* Resize action (fast) */
242    function jevelin_header_height() {
243        if( $(document).width() > 1025 ) {
244            $('header.primary-desktop').css('height','');
245
246            if( $('.sh-header-top').length ) {
247                primary_desktop = $('.sh-header').actual( 'outerHeight') + $('.sh-header-top').actual( 'outerHeight');
248            } else {
249                primary_desktop = $('.sh-header').actual( 'outerHeight');
250            }
251
252            $('header.primary-desktop').css('height', primary_desktop );
253        }
254    }
255    var primary_desktop = ''
256    window.addEventListener( 'load', jevelin_header_height );
257    window.addEventListener( 'resize', jevelin_header_height ),
258
259
260    /* Header Builder - Search */
261    $(".sh-header-builder-search-trigger").on( 'click', function(e) {
262        $(this).closest( '.sh-header-builder' ).find( '.sh-header-search' ).fadeIn("fast");
263        $(this).closest( '.sh-header-builder' ).find( '.sh-header-search-input' ).focus();
264        e.preventDefault();
265        return false;
266    });
267
268    $(".sh-header-builder-main .close-header-search").on( 'click', function(e) {
269        $(this).closest( '.sh-header-search' ).fadeOut("fast");
270        e.preventDefault();
271        return false;
272    });
273
274
275    /* Header Classic - Search */
276    $(".sh-nav-search, .sh-side-button-search").on( 'click', function() {
277        if( $("#primary-desktop").actual( 'height' ) > 200 ) {
278            $("#header-search").addClass( 'sh-side-button-search-line' );
279        }
280
281        $("#header-search").fadeIn("fast");
282        $("#header-search").find(".sh-header-search-input").focus();
283        return false;
284    });
285    $(".close-header-search").on( 'click', function() {
286        $("#header-search").fadeOut("fast");
287        return false;
288    });
289    $( ".sh-header-search-form" ).submit(function( event ) {
290        $(this).fadeTo( "fast", 0.45 );
291    });
292
293    $(document).keyup(function(e) {
294        if (e.keyCode == 27) {
295            $(".sh-header-search").fadeOut("fast");
296
297            if( $('body').hasClass('page-layout-right-fixed') ) {
298                $("body").removeClass('page-layout-right-fixed');
299
300                var menu = $(".sh-header .sh-nav-dropdown").find(".c-hamburger");
301                if( e.target != 'div.sh-table-cell' ) {
302                    if( menu.hasClass("is-active") === true ) {
303                        menu.removeClass("is-active");
304                    } else {
305                        menu.addClass("is-active");
306                    }
307                }
308            }
309        }
310    });
311
312
313    /* Header side menu */
314    $(".sh-header .sh-nav-dropdown").on( 'click', function(e) {
315        var self = $(this);
316
317        if( !$("body").hasClass('page-layout-right-fixed') ) {
318
319            $(".sh-header").addClass("sh-animation-left");
320            $("body").addClass('page-layout-right-fixed');
321            setTimeout(function(){
322                $(".sh-header").removeClass("sh-animation-left");
323            }, 301);
324
325        } else {
326
327            $(".sh-header").addClass("sh-animation-left");
328            $("body").removeClass('page-layout-right-fixed');
329            setTimeout(function(){
330                $(".sh-header").removeClass("sh-animation-left");
331                jQuery(window).trigger('resize');
332            }, 301);
333
334            setTimeout(function(){
335                jQuery(window).trigger('resize');
336            }, 350);
337
338            setTimeout(function(){
339                jQuery(window).trigger('resize');
340            }, 450);
341        }
342
343        var menu = self.find(".c-hamburger");
344        if( e.target != 'div.sh-table-cell' ) {
345            if( menu.hasClass("is-active") === true ) {
346                menu.removeClass("is-active");
347            } else {
348                menu.addClass("is-active");
349            }
350        }
351
352        var self_icon_image = self.find('.sh-nav-custom-icon-image');
353        if( self_icon_image.hasClass( 'active' ) ) {
354            self_icon_image.removeClass( 'active' );
355        } else {
356            self_icon_image.addClass( 'active' );
357        }
358
359        return false;
360    });
361
362
363    /* Mobile header dropdown folders */
364    $('.sh-header-mobile-dropdown ul li:has(">ul") a').on( 'click', function() {
365        $(this).parent().toggleClass('open');
366        $(this).parent().find('> ul').stop(true, true).slideToggle(300, jevelin.header_animation_dropdown);
367        if( $(this).parent().hasClass('open') ) {
368            $(this).parent().find('ul ul').stop(true, true).slideUp(0, jevelin.header_animation_dropdown);
369        }
370
371        if( $(this).parent().hasClass('menu-item-has-children') ) {
372            return false;
373        }
374    });
375    if( $(document).width() < 1025 ) {
376        $('html').on( 'click', function(e) {
377            if( !$(e.target).hasClass('header-mobile-form-input') && $('.sh-header-mobile-dropdown').is(':visible') ) {
378                $('.sh-nav-dropdown .c-hamburger').trigger('click').toggleClass('is-active');
379            }
380        });
381    }
382    /*$('.sh-header-mobile-dropdown').click(function(event){
383        event.stopPropagation();
384    });*/
385
386
387    /* Close mobile dropdown on click */
388    $('.sh-header-mobile-dropdown li.menu-item:not(.menu-item-has-children)').on( 'click', function() {
389        if( $(this).find('> a').attr('href').indexOf("#") >= 0 ) {
390            setTimeout(function(){
391                if( $('.sh-header-mobile .sh-nav-dropdown .c-hamburger').hasClass( 'is-active' ) ) {
392                    $('.sh-header-mobile .sh-nav-dropdown .c-hamburger').trigger('click').toggleClass('is-active');
393                }
394            }, 50);
395        }
396    });
397
398
399    /* Popover */
400    $('.sh-popover-mini').addClass('sh-animated fadeIn');
401
402
403    /* Image Compare */
404    $(window).load(function (){
405        $('.sh-image-comparison .twentytwenty-handle').addClass('sh-animated pulse');
406        $('.sh-image-comparison .twentytwenty-before').addClass('sh-animated fadeIn');
407        $('.sh-image-comparison .twentytwenty-handle').on('mouseover', function() {
408            $(this).addClass('sh-stop-animation');
409        });
410    });
411
412
413    /* Animations */
414    if( ( typeof( WOW ) == typeof( Function) ) ) {
415        var wow = new WOW({
416            boxClass: 'sh-animated',
417            animateClass: 'animated',
418            offset: 100,
419            mobile: true,
420            live: true,
421            scrollContainer: null
422        });
423        wow.init();
424    }
425
426
427    /* Blog masonry layout */
428    $('.blog-style-masonry:not(.sh-recent-posts-list-carousel)').each( function() {
429        var $masonry = $(this).isotope({
430            itemSelector: '.post-item',
431            columnWidth: 0,
432            gutter: 0,
433        }).isotope('reloadItems');
434        $masonry.imagesLoaded( function() {
435            $masonry.isotope('layout').css( 'opacity', 1 );
436        });
437        $(window).load(function (){
438            setTimeout(function(){
439                $masonry.isotope('layout');
440            }, 0);
441        });
442    });
443
444
445    /* Portfolio masonry layout */
446    $('.sh-portfolio').each( function() {
447        var portfolio_filter = '*';
448        if( $(this).attr( 'data-all-filter' ) ) {
449            portfolio_filter = $(this).attr( 'data-all-filter' );
450        }
451        var $portfolio = $(this).isotope({
452            itemSelector: '.sh-portfolio-item',
453            columnWidth: 0,
454            gutter: 0,
455            filter: portfolio_filter
456        }).isotope('reloadItems').css( 'opacity', 1 );
457
458        $(window).load(function (){
459            $portfolio.imagesLoaded( function() {
460                $portfolio.isotope('layout');
461            });
462        });
463    });
464
465
466
467    /* Portfolio filter */
468    $('.sh-filter:not(.sh-filter-pagination)').on( 'click', 'span', function() {
469
470        var filterValue = $(this).attr('data-filter');
471        if( $(this).parent().attr('data-type') != 'woocommerce' ) {
472            $(this).parent().parent().parent().find('.sh-portfolio').isotope({ filter: filterValue });
473        } else {
474            $(this).parent().parent().parent().find('ul.products').isotope({ filter: filterValue });
475        }
476
477        $(this).parent().children().removeClass('active');
478        $(this).addClass('active');
479
480    });
481
482
483    /* Portfolio fancy filter */
484    $('.sh-filter:not(.sh-filter-pagination)').on( 'click', 'span', function() {
485
486        var filterValue = $(this).attr('data-filter');
487        $(this).parent().parent().parent().find('.sh-portfolio-fancy .sh-portfolio-fancy-item').each( function() {
488            $(this).removeClass('sh-portfolio-fancy-item-active').addClass('sh-portfolio-fancy-item-active-cat');
489        });
490        $(this).parent().parent().parent().find('.sh-portfolio-fancy').isotope({ filter: filterValue });
491
492        $(this).parent().children().removeClass('active');
493        $(this).addClass('active');
494
495    });
496
497
498    /* Portfolio filter with enabled pagination */
499    $('.sh-filter.sh-filter-pagination').on( 'click', 'span', function() {
500        window.location.href = $(this).attr('data-href');
501        $(this).parent().children().removeClass('active');
502        $(this).addClass('active');
503    });
504
505
506    /* Portfolio fancy masonry layout */
507    $.fn.isVisible = function() {
508        var rect = this[0].getBoundingClientRect();
509        //console.log( rect );
510        return (
511            (rect.height > 0 || rect.width > 0) &&
512            rect.bottom >= 0 &&
513            rect.right >= 0 &&
514            rect.top <= (window.innerHeight || document.documentElement.clientHeight) &&
515            rect.left <= (window.innerWidth || document.documentElement.clientWidth)
516        );
517    };
518    $.fn.isVisibleAbove = function() {
519        var rect = this[0].getBoundingClientRect();
520        //console.log( rect );
521        return (
522            (rect.height > 0 || rect.width > 0) &&
523            rect.bottom < 0 &&
524            rect.right >= 0 &&
525            rect.top < 0 &&
526            rect.left <= (window.innerWidth || document.documentElement.clientWidth)
527        );
528    };
529    $.fn.portfolioFancy = function(){ };
530
531    var $portfolio2 = $('.sh-portfolio-fancy').isotope({
532        itemSelector: '.sh-portfolio-fancy-item',
533        columnWidth: 0,
534        gutter: 0,
535    }).isotope('reloadItems');
536
537
538    /* Onepage navigation */
539    if( jevelin.one_pager == true ) {
540
541        /* Onepage navigation - On load */
542        if( window.location.href && window.location.href.split("#")[1] ) {
543            var topbar = 0;
544            if ($(document).width() > 1000 && $(".sh-header").hasClass('sh-sticky-header-active') ) {
545                topbar = topbar + parseInt( $('.sh-header').height() );
546            } else if ($(document).width() > 1000 && $(".sh-header").hasClass('sh-sticky-header') ) {
547                topbar = topbar + parseInt( $('.sh-header').height() ) - 30;
548            }
549
550            if( $(document).width() > 600 && $('#wpadminbar').height() > 0 ) {
551                topbar = topbar + $('#wpadminbar').height();
552            }
553
554            $(window).load(function (){
555                if( $('#'+window.location.href.split("#")[1]).length  && !$('#'+window.location.href.split("#")[1]).hasClass('vc_tta-panel') ) {
556                    $('html, body').animate({
557                        scrollTop: ( $('#'+window.location.href.split("#")[1]).offset().top - topbar )
558                    }, parseInt( jevelin.anchor_scroll_speed ) );
559                }
560            });
561        }
562
563
564
565
566        /* Close mobile menu, when clicking internal links  */
567        $('nav.sh-header-mobile-dropdown li.menu-item:not(.menu-item-has-children) > a[href*="#"]').on("click", function (e){
568            $('.sh-header-builder-mobile-menu').trigger('click');
569        })
570
571
572        /* Onepage navigation - On click custom actions */
573        $('a[href^="#goto-"], a[href^="#backtotop"], a[href$="#backtotop"]').on("click", function (e){
574
575            if( $(this).attr('href').indexOf( '#backtotop' ) == -1  ) {
576
577                var url = $(this).attr('href');
578                if (url.indexOf("goto-") !=-1) {
579                    url = url.replace("goto-", "");
580                }
581
582                if( url && url.substring(0,1) == '#' ) {
583                    e.preventDefault();
584                    if( $(url).length ) {
585
586                        var topbar = 0;
587                        if ($(document).width() > 1000 && $(".sh-header").hasClass('sh-sticky-header-active') ) {
588                            topbar = topbar + $('.sh-header').height();
589                        }
590
591                        if( $(document).width() > 600 && $('#wpadminbar').height() > 0 ) {
592                            topbar = topbar + $('#wpadminbar').height();
593                        }
594
595                        $('html, body').animate({
596                            scrollTop: ( $(url).offset().top - topbar )
597                        }
597, parseInt( jevelin.anchor_scroll_speed ) );
598
599                    }
600                }
601
602            } else {
603
604                // set hash
605                if( history.pushState ) {
606                    history.pushState( null, null, '#backtotop' );
607                } else {
608                    location.hash = '#backtotop';
609                }
610
611                // scroll to
612                $('html, body').animate({
613                    scrollTop: 0
614                }, parseInt( jevelin.anchor_scroll_speed ) );
615
616            }
617        });
618
619
620        /* Onepage navigation - On click */
621        $('a[href*="#"]').on('click', function(e) {
622            if( !$(this).is('[data-vc-tabs]') && !$(this).is('[data-vc-accordion]') && !$(this).hasClass('vc_carousel-control') ) {
623                var hash_url = $(this).attr('href');
624        		var hash_val = hash_url.substring(hash_url.indexOf('#'));
625                var hash_full_url = $(this).attr('href').split("#")[0];
626                hash_full_url = hash_full_url.replace( 'http:', '' );
627                hash_full_url = hash_full_url.replace( 'https:', '' );
628
629                var current_hash_full_url = window.location.href.split("#")[0];
630                current_hash_full_url = current_hash_full_url.replace( 'http:', '' );
631                current_hash_full_url = current_hash_full_url.replace( 'https:', '' );
632
633
634                // redirect if not the same page
635                if( hash_full_url && hash_full_url != current_hash_full_url ) {
636                    window.location.href = $(this).attr('href');
637                }
638
639
640                // scroll to element
641        		if( hash_val &&
642                    $(hash_val).length &&
643                    hash_val.indexOf("goto-") < 0 &&
644                    hash_val.indexOf("backtotop") < 0 &&
645                    $(this).attr('data-toggle') != 'collapse' &&
646                    $(this).attr('data-toggle') != 'tab' &&
647                    !$(this).parent().parent().hasClass('wc-tabs') ) {
648
649                    e.preventDefault();
650                    e.stopPropagation();
651
652        	        var topbar = 0;
653        	        if ($(document).width() > 1000 && $(".sh-header").hasClass('sh-sticky-header-active') ) {
654        	            topbar = topbar + parseInt( $('.sh-header').height() );
655        	        } else if ($(document).width() > 1000 && $(".sh-header").hasClass('sh-sticky-header') ) {
656        	            topbar = topbar + parseInt( $('.sh-header').height() ) - 30;
657        	        }
658
659        	        if( $(document).width() > 600 && $('#wpadminbar').height() > 0 ) {
660        	            topbar = topbar + $('#wpadminbar').height();
661        	        }
662
663                    // set hash
664                    if( history.pushState ) {
665                        history.pushState(null, null, hash_val);
666                    } else {
667                        location.hash = hash_val;
668                    }
669
670                    // scroll to
671        	        $('html, body').animate({
672        	            scrollTop: ( $(hash_val).offset().top - topbar )
673        	        }, parseInt( jevelin.anchor_scroll_speed ) );
674        		}
675            }
676    	});
677    }
678
679
680    /* Header Builder - Content Above */
681    var headers_above_content = 0;
682    $('.sh-header-builder').each( function() {
683        if( $(this).hasClass( 'sh-header-builder-main-above-content' ) ) {
684            if( headers_above_content > 0 ) {
685                var self = $(this);
686                setTimeout(function(){
687                    self.removeClass( 'sh-header-builder-main-above-content' );
688                }, 10);
689            }
690
691            headers_above_content++;
692        }
693    });
694
695
696    /* Header Builder - Sticky */
697    function heade_builder_sticky() {
698        if( $(document).width() >= 1025 ) {
699
700            if( $('#wpadminbar').length ) {
701                var header_builder_admin = $('#wpadminbar').actual( 'height' );
702            } else {
703                var header_builder_admin = 0;
704            }
705            $('.sh-header-builder-main-sticky-enabled').first().height( $('.sh-header-builder-main-sticky-enabled').first().actual('height') );
706
707            var header_builder_sticky = $('.sh-header-builder-main-sticky-enabled').first();
708            if( $(window).scrollTop() && $(window).scrollTop() > header_builder_sticky.offset().top - header_builder_admin ) {
709                if( !header_builder_sticky.hasClass( 'sh-header-builder-main-sticky-fixed' ) ) {
710                    header_builder_sticky.addClass('sh-header-builder-main-sticky-fixed').find('.sh-header-builder-main-container').css( 'top',  header_builder_admin );
711                }
712            } else {
713                header_builder_sticky.removeClass('sh-header-builder-main-sticky-fixed').find('.sh-header-builder-main-container').css( 'top', '' );
714            }
715
716        }
717    }
718
719    if( $('.sh-header-builder-main-sticky-enabled').length ) {
720        heade_builder_sticky();
721        $(window).scroll( heade_builder_sticky );
722    }
723
724
725    /* Header Builder - Mobile Sticky */
726    function heade_builder_mobile_sticky() {
727        if( $(document).width() < 1025 ) {
728
729            if( $('#wpadminbar').length ) {
730                var header_builder_admin = $('#wpadminbar').actual( 'height' );
731            } else {
732                var header_builder_admin = 0;
733            }
734
735            var header_builder_sticky = $('.sh-header-builder-mobile-sticky-enabled').first();
736
737            if( $(window).scrollTop() && $(window).scrollTop() > 1 ) {
738                if( !header_builder_sticky.hasClass('sh-sticky-mobile-header') ) {
739                    $('.sh-header-builder-mobile-sticky-enabled').first().height( $('.sh-header-builder-mobile-sticky-enabled').first().actual('height') );
740                    header_builder_sticky.addClass('sh-header-builder-mobile-sticky-fixed').addClass('sh-sticky-mobile-header');
741                    /*alert( 'CHANGE:' +  $(window).scrollTop() + ' // ' + ( header_builder_sticky.offset().top - header_builder_admin ) );*/
742                }
743            } else {
744                header_builder_sticky.removeClass('sh-header-builder-mobile-sticky-fixed').removeClass('sh-sticky-mobile-header');
745            }
746
747            // console.log(  $(window).scrollTop() + ' // ' + ( header_builder_sticky.offset().top - header_builder_admin ) );
748
749        }
750    }
751
752    if( $('.sh-header-builder-mobile-sticky-enabled').length ) {
753        heade_builder_mobile_sticky();
754        $(window).scroll( heade_builder_mobile_sticky );
755    }
756
757
758
759
760    /* Header Classic - Sticky */
761    function jevelin_sticky(){
762        if( $(document).width() > 1025 && !$('body').hasClass('compose-mode') ) {
763
764            if( header_height < 0 ) {
765                header_height = $('.sh-header').actual( 'height' );
766            }
767
768            if( header_offset_total < 0 ) {
769                if( $('#wpadminbar').length ) {
770                    var header_admin = $('#wpadminbar').actual( 'height' );
771                } else {
772                    var header_admin = 0;
773                }
774
775                if( $('.sh-header').length ) {
776                    var header_offset = $('.sh-header').offset().top - header_admin;
777                } else {
778                    var header_offset = 0;
779                }
780                header_offset_total = header_offset;
781            }
782
783            if( $(document).scrollTop() > header_offset_total ){
784                if( !$('body').hasClass('compose-mode') ) {
785                    $('.sh-header').addClass('sh-sticky-header-active').css('top', $('#wpadminbar').actual( 'height' ));
786                } else {
787                    $('.sh-header').addClass('sh-sticky-header-active').css('top', 0);
788                }
789            } else {
790                if( primary_desktop > 0 ) {
791                    $('.sh-header-height').css( 'height', primary_desktop );
792                    $('.sh-header:not(.sh-header-2):not(.sh-header-3):not(.sh-header-4)').css( 'height', primary_desktop );
793
794                    setTimeout(function(){
795                        $('.sh-header-height').css( 'height', '' );
796                        $('.sh-header:not(.sh-header-2):not(.sh-header-3):not(.sh-header-4)').css( 'height', '' );
797                    }, 300);
798                }
799
800                $('.sh-header').removeClass('sh-sticky-header-active').css('top', 0);
801            }
802        }
803
804        if($(document).scrollTop() > 0 ){
805            $('.sh-header-mobile').addClass('sh-sticky-mobile-header-active');
806        } else {
807            $('.sh-header-mobile').removeClass('sh-sticky-mobile-header-active');
808        }
809    }
810
811    if( $('.sh-sticky-header').length ) {
812
813        if( $('#wpadminbar').length ) {
814            var header_admin = $('#wpadminbar').height();
815        } else {
816            var header_admin = 0;
817        }
818
819        if( $('.sh-header').length ) {
820            var header_offset = $('.sh-header').offset().top - header_admin;
821        } else {
822            var header_offset = 0;
823        }
824
825        var header_height = $('.sh-header').height();
826        var header_offset_total = header_offset;
827        var header_offset_sticky = 0;
828
829        jevelin_sticky();
830        $(window).scroll(jevelin_sticky);
831    }
832    $(window).on( 'ready load', function() {
833        if( $('body').hasClass('compose-mode') ) {
834            $('.sh-header').removeClass('sh-sticky-header-active').css('top', 0);
835        }
836    });
837
838
839    /*  Footer copyrights */
840    if( $('.sh-copyrights-image').height() > 0 ) {
841        $('.sh-copyrights-text, .sh-copyrights-social').css('line-height', $('.sh-copyrights-image').height()+'px');
842    }
843
844
845    /* Alert Message - Close */
846    $('.sh-alert-close').on('click', function() {
847        $(this).parent().fadeTo(400, 0.00, function(){ //fade
848             $(this).slideUp(400, function() { //slide up
849                 $(this).remove(); //then remove from the DOM
850             });
851        });
852    });
853
854
855    /* Counter SC  */
856    if(jQuery().counterUp) {
857        $('.sh-counter-animate').counterUp({
858            delay: 14,
859            time: 1500,
860            triggerOnce: true
861        });
862    }
863
864
865    /* Share  */
866    $(".sh-social-share-networks").jsSocials({
867        showLabel: false,
868        showCount: "inside",
869        shares: ["facebook", "twitter", "email", "pinterest"],
870        shareIn: "blank",
871    });
872
873
874    /* Blog, Portfolio Gallery  */
875    $('.sh-gallery:not(.sh-gallery-autoplay)').slick({
876        accessibility: true,
877        dots: true,
878        arrows: true,
879        infinite: true,
880        speed: 300,
881        slidesToShow: 1,
882        adaptiveHeight: true,
883        prevArrow: '<button type="button" class="slick-prev"><span class="ti-angle-left"></span></button>',
884        nextArrow: '<button type="button" class="slick-next"><span class="ti-angle-right"></span></button>',
885    });
886
887
888    /* Blog, Portfolio Gallery Autoplay */
889    $('.sh-gallery-autoplay').slick({
890        accessibility: true,
891        dots: true,
892        arrows: true,
893        infinite: true,
894        speed: 300,
895        slidesToShow: 1,
896        autoplay: true,
897        autoplaySpeed: 5000,
898        adaptiveHeight: true,
899        prevArrow: '<button type="button" class="slick-prev"><span class="ti-angle-left"></span></button>',
900        nextArrow: '<button type="button" class="slick-next"><span class="ti-angle-right"></span></button>',
901    });
902
903
904    /* Sidebar Search  */
905    $('.sh-sidebar-search').blur(function() {
906        $(this).parent().parent().parent().removeClass("sh-sidebar-search-active");
907    })
908    .focus(function() {
909        $(this).parent().parent().parent().addClass("sh-sidebar-search-active")
910    });
911
912
913    /* Quantity buttons */
914    function sh_increase_number_update() {
915        if( $('body').hasClass('woocommerce-cart') ) {
916            $('input[name="update_cart"]').removeAttr('disabled');
917
918            setTimeout(function(){
919            }, 500);
920
921        }
922    }
923
924    if( jevelin.quantity_button != 'off' ) {
925        $('.quantity').each( function() {
926            if( $(this).children().is( 'input' ) ) {
927
928                $(this).children().attr( 'type', 'text' );
929                $(this).children().attr( 'class', 'sh-quantity-number' );
930                $(this).prepend( '<span class="sh-noselect sh-increase-number-down"><i class="ti-arrow-down"></i></span>' );
931                $(this).append( '<span class="sh-noselect sh-increase-number-up"><i class="ti-arrow-up"></i></span>' );
932                $(this).addClass( 'sh-increase-numbers' );
933
934            }
935        });
936
937        $("input.sh-quantity-number").on('keyup keypress blur change', function(e) {
938            if (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57)) {
939                return false;
940            }else{
941                if( $(this).val().length >= parseInt($(this).attr('maxlength')) && (e.which != 8 && e.which != 0)){
942                    return false;
943                }
944            }
945        });
946
947        $('body').on( 'updated_cart_totals', function(){
948            if( $('.woocommerce .sh-alert-error').length > 1 ) {
949                $('.woocommerce .sh-alert-error').first().remove();
950            }
951
952            $('.quantity').each( function() {
953                if( $(this).children().is( 'input' ) ) {
954                    $(this).find('.sh-increase-number-down').remove();
955                    $(this).find('.sh-increase-number-up').remove();
956
957                    $(this).children().attr( 'type', 'text' );
958                    $(this).children().attr( 'class', 'sh-quantity-number' );
959                    $(this).prepend( '<span class="sh-noselect sh-increase-number-down"><i class="ti-arrow-down"></i></span>' );
960                    $(this).append( '<span class="sh-noselect sh-increase-number-up"><i class="ti-arrow-up"></i></span>' );
961                    $(this).addClass( 'sh-increase-numbers' );
962
963                }
964            });
965        });
966
967
968        var gillion_product_increase_number_min = ( $('.woocommerce-grouped-product-list.group_table').length ) ? 0 : 1;
969        $(document).on('click', '.sh-increase-number-down', function(){
970            var current_number_val = parseInt( $(this).parent().find('input.sh-quantity-number').val() );
971            var current_number = isNaN( current_number_val ) ? 0 : current_number_val;
972            current_number = current_number - 1;
973
974            if( current_number >= gillion_product_increase_number_min ) {
975                $(this).parent().find('input.sh-quantity-number').val( current_number );
976                sh_increase_number_update();
977            }
978        });
979
980        $(document).on('click', '.sh-increase-number-up', function(){
981            var current_number_val = parseInt( $(this).parent().find('input.sh-quantity-number').val() );
982            var current_number = isNaN( current_number_val ) ? 0 : current_number_val;
983            current_number = current_number + 1;
984
985            if( current_number >= 0 ) {
986                $(this).parent().find('input.sh-quantity-number').val( current_number );
987                sh_increase_number_update();
988            }
989        });
990    } else {
991        $('.woocommerce .quantity').addClass( 'quantity-basic' );
992    }
993
994
995    /* Added to cart notification */
996    $('body').on('click', '.product .add_to_cart_button', function () {
997        var name = '';
998        if( $(this).attr( 'data-product_title' ) ) {
999            name = $(this).attr( 'data-product_title' );
1000        } else {
1001            name = $(this).closest('li.product').find('.woocommerce-loop-product__title').text();
1002        }
1003
1004        $('.sh-notification-item-example .sh-notification-item-name').html( name );
1005    });
1006
1007
1008    $('body').on('click', '.sh-notification-item-close', function() {
1009        $(this).parent().animate({ 'opacity': '0', 'margin-bottom': '15px'}, 300);
1010    });
1011
1012
1013    var added_to_cart_timout = 0;
1014    $( document.body ).on( 'added_to_cart', function() {
1015        $('.sh-notifications').html( '<div class="sh-notification-item">' + $('.sh-notification-item-example').html() + '</div>' );
1016        $('.sh-notification-item').animate({ 'opacity': '1', 'margin-bottom': '0px'}, 300);
1017        added_to_cart_timout = setTimeout( function(){
1018            $('.sh-notification-item').animate({ 'opacity': '0', 'margin-bottom': '15px'}, 300);
1019        }, 5000);
1020    });
1021
1022
1023    $('body').on('mouseover', '.sh-notification-item', function() {
1024        clearTimeout( added_to_cart_timout );
1025    });
1026
1027
1028
1029    /* Back To Top  */
1030    if ($('.sh-back-to-top').length) {
1031        var scrollTrigger = 100, // px
1032            backToTop = function () {
1033                var scrollTop = $(window).scrollTop();
1034                if (scrollTop > scrollTrigger) {
1035                    $('.sh-back-to-top').addClass('active');
1036                } else {
1037                    $('.sh-back-to-top').removeClass('active');
1038                }
1039            };
1040        backToTop();
1041        $(window).on('scroll', function () {
1042            backToTop();
1043        });
1044
1045        $('.sh-back-to-top').on('click', function (e) {
1046            e.preventDefault();
1047            $(this).blur();
1048            $('html,body').animate({
1049                scrollTop: 0
1050            }, 500);
1051        });
1052    }
1053
1054
1055    /* Hamburger Animation  */
1056    var toggles = document.querySelectorAll(".sh-header-mobile-navigation .c-hamburger");
1057    for (var i = toggles.length - 1; i >= 0; i--) {
1058        var toggle = toggles[i];
1059        toggleHandler(toggle);
1060    };
1061    function toggleHandler(toggle) {
1062        toggle.addEventListener( "click", function(e) {
1063            e.preventDefault();
1064            (this.classList.contains("is-active") === true) ? this.classList.remove("is-active") : this.classList.add("is-active");
1065        });
1066    }
1067
1068
1069    /* Left header fix */
1070    if( $('.sh-header-left-side').length ) {
1071        $('.sh-header-left-side .sh-nav-cart .sub-menu').css( 'top', -parseInt( $('.sh-header-left-side .sh-nav-cart .sub-menu').height()) );
1072        $(window).on( 'load resize', function() {
1073            var side_logo_spacing = ( $('#wpadminbar').length ) ? 100 : 68;
1074            $(".sh-header-left-side #header-logo img").css('max-height', parseInt( $(".sh-header-left-side .header-standard-position").position().top ) - side_logo_spacing );
1075            $('.sh-header-left-side #header-logo').animate( { opacity: 1 }, 150 );
1076        });
1077    }
1078
1079
1080    /* Progress bar */
1081    if( ( typeof( WOW ) == typeof( Function) ) ) {
1082        var wow_progress = new WOW({
1083            boxClass:     'sh-progress',
1084            animateClass: '',
1085            mobile:       true,
1086            live:         true,
1087            callback:     function(box, test) {
1088
1089                $('#'+box.id).find('.sh-progress-status-value').each( function() {
1090                    $(this).animate(
1091                        {
1092                            width: $(this).attr('data-width')+'%'
1093                        }, {
1094                            duration: 1300,
1095                            easing: 'easeOutExpo',
1096                        }
1097                    );
1098                });
1099
1100            },
1101            scrollContainer: null
1102        });
1103        wow_progress.init();
1104    }
1105
1106
1107    /* Pie chart */
1108    setTimeout(function(){
1109        var wow_progress = new WOW({
1110            boxClass:     'sh-piechart',
1111            animateClass: '',
1112            mobile:       true,
1113            live:         true,
1114            callback:     function(box, test) {
1115
1116                $('#'+box.id).addClass('sh-piechart-animated');
1117
1118                if( $('#'+box.id).hasClass('sh-piechart-circle') ) {
1119                    if( !$('#'+box.id).find('.circle_animation').css('animation') ) {
1120                        $('#'+box.id).find('.circle_animation').velocity({
1121                            strokeDashoffset: parseInt( $('#'+box.id).attr('data-id') )
1122                        }, {
1123                            duration: 2000,
1124                            easing: [ 0.785, 0.135, 0.150, 0.860 ]
1125                        });
1126                    }
1127                } else if( $('#'+box.id).hasClass('sh-piechart-rhomb') ) {
1128                    if( !$('#'+box.id).find('.rhomb_animation').css('animation') ) {
1129                        $('#'+box.id).find('.rhomb_animation').velocity({
1130                            strokeDashoffset: parseInt( $('#'+box.id).attr('data-id') )
1131                        }, {
1132                            duration: 2000,
1133                            easing: [ 0.785, 0.135, 0.150, 0.860 ]
1134                        });
1135                    }
1136                }
1137
1138                $('#'+box.id).find('.sh-piechart-percentage-number').each(function() {
1139                    var self = $(this);
1140                    var percent_hours = self.text();
1141                    $({numberValue: 0}).animate({numberValue: percent_hours}, {
1142                        duration: 2000,
1143                        easing: 'easeOutCirc',
1144                        progress: function() {
1145                            self.text(Math.round(Math.ceil(this.numberValue*100)/100));
1146                        }
1147                    });
1148                });
1149
1150            },
1151            scrollContainer: null
1152        });
1153        wow_progress.init();
1154
1155        /*$('.sh-piechart').viewportChecker({
1156            offset: 100,
1157            callbackFunction: function(box, test){
1158
1159                $('#'+box.context.id).addClass('sh-piechart-animated');
1160
1161                if( $('#'+box.context.id).hasClass('sh-piechart-circle') ) {
1162                    if( !$('#'+box.context.id).find('.circle_animation').css('animation') ) {
1163                        $('#'+box.context.id).find('.circle_animation').velocity({
1164                            strokeDashoffset: parseInt( $('#'+box.context.id).attr('data-id') )
1165                        }, {
1166                            duration: 2000,
1167                            easing: [ 0.785, 0.135, 0.150, 0.860 ]
1168                        });
1169                    }
1170                } else if( $('#'+box.context.id).hasClass('sh-piechart-rhomb') ) {
1171                    if( !$('#'+box.context.id).find('.rhomb_animation').css('animation') ) {
1172                        $('#'+box.context.id).find('.rhomb_animation').velocity({
1173                            strokeDashoffset: parseInt( $('#'+box.context.id).attr('data-id') )
1174                        }, {
1175                            duration: 2000,
1176                            easing: [ 0.785, 0.135, 0.150, 0.860 ]
1177                        });
1178                    }
1179                }
1180
1181                $('#'+box.context.id).find('.sh-piechart-percentage-number').each(function() {
1182                    var self = $(this);
1183                    var percent_hours = self.text();
1184                    $({numberValue: 0}).animate({numberValue: percent_hours}, {
1185                        duration: 2000,
1186                        easing: 'easeOutCirc',
1187                        progress: function() {
1188                            self.text(Math.round(Math.ceil(this.numberValue*100)/100));
1189                        }
1190                    });
1191                });
1192            }
1193        });*/
1194    }, 500);
1195
1196
1197    /* WooCommerce Simple Select Init */
1198    $(".woocommerce select.country_select").SumoSelect({ search: true });
1199    $(".woocommerce-ordering .orderby").SumoSelect({ search: true });
1200    $(".contact-form select").SumoSelect();
1201    $(".wpcf7-select").SumoSelect();
1202
1203
1204    /* Portfolio Overlay 3 */
1205    $('.sh-portfolio-item .sh-portfolio-overlay3').hoverdir();
1206
1207
1208    /* Portfolio Disable*/
1209    $('.sh-portfolio-single-disabled').on( 'click', function() {
1210        return false;
1211    });
1212
1213
1214    /* Youtube Visual Improvements */
1215    $('iframe').each( function() {
1216        var iframe_src = $(this).attr('src');
1217        if( iframe_src ) {
1218        	if( iframe_src.indexOf("youtube.com") !== -1 ) {
1219        		return this.src + '?title=0&byline=0&portrait=0';
1220        	}
1221        }
1222    });
1223
1224
1225    /* Titlebar parallax */
1226    if( $(window).width() >= 768 ) {
1227        $('.sh-titlebar-parallax').jarallax({
1228            speed: 0.5
1229        });
1230    } else {
1231        $('.sh-titlebar-parallax').addClass('sh-titlebar-parallax-disabled');
1232    }
1233
1234
1235    /* Image Gallery SC */
1236    $('.sh-image-gallery:not(.sh-image-gallery-simple)').each( function() {
1237        var image_gallery_columns = parseInt( $(this).attr('data-columns') );
1238        if( isNaN( image_gallery_columns ) ) {
1239            image_gallery_columns = 1;
1240        }
1241
1242        if( image_gallery_columns >= 3 ) {
1243            var image_gallery_1024 = 3;
1244        } else {
1245            var image_gallery_1024 = image_gallery_columns;
1246        }
1247
1248        if( image_gallery_columns >= 2 ) {
1249            var image_gallery_600 = 2;
1250        } else {
1251            var image_gallery_600 = image_gallery_columns;
1252        }
1253
1254        var image_gallery_autoplay = parseInt( $(this).attr('data-autoplay') );
1255        if( image_gallery_autoplay > 0 ) {
1256            var image_gallery_autoplay_status = true;
1257            var image_gallery_autoplay_speed = parseInt( image_gallery_autoplay );
1258        } else {
1259            var image_gallery_autoplay_status = false;
1260            var image_gallery_autoplay_speed = 0;
1261        }
1262        var image_gallery_infinite = ( image_gallery_autoplay_status == true ) ? true : false;
1263
1264        $(this).slick({
1265            infinite: image_gallery_infinite,
1266            dots: true,
1267            slidesToShow: image_gallery_columns,
1268            slidesToScroll: image_gallery_columns,
1269            autoplay: image_gallery_autoplay_status,
1270            autoplaySpeed: image_gallery_autoplay_speed,
1271            responsive: [
1272                {
1273                    breakpoint: 1024,
1274                    settings: {
1275                        slidesToShow: image_gallery_1024,
1276                        slidesToScroll: image_gallery_1024,
1277                    }
1278                },{
1279                    breakpoint: 600,
1280                    settings: {
1281                        slidesToShow: image_gallery_600,
1282                        slidesToScroll: image_gallery_600
1283                    }
1284                },{
1285                    breakpoint: 480,
1286                    settings: {
1287                        slidesToShow: 1,
1288                        slidesToScroll: 1
1289                    }
1290                }
1291            ]
1292        });
1293    });
1294    $('.sh-image-gallery-item.slick-slide.slick-cloned a').attr( 'data-rel', '' );
1295    $('.sh-image-gallery-item .post-meta-thumb a').on( 'click', function(){
1296        $('.sh-image-gallery-item.slick-slide.slick-cloned a').attr( 'data-rel', '' );
1297    });
1298
1299
1300    /* WooCommerce Jevelin Lightbox */
1301    if( jevelin.wc_lightbox == 'jevelin' ) {
1302        $('.woocommerce div.product .woocommerce-product-gallery__wrapper a').attr('data-rel', 'lightcase:gallery');
1303    }
1304
1305
1306    /* Lightbox */
1307    $("a[data-rel^=lightcase], a[rel^='sh-lightbox'], a[rel^='lightbox']" ).lightcase({
1308        maxWidth: jevelin.lightbox_window_max_width,
1309        maxHeight: jevelin.lightbox_window_max_height,
1310        overlayOpacity: jevelin.lightbox_opacity,
1311        transition: jevelin.lightbox_transition,
1312        showSequenceInfo: true,
1313        showCaption: false,
1314        shrinkFactor: jevelin.lightbox_window_size,
1315    });
1316
1317
1318    /* Shop categories widget */
1319    $('.product-categories .count').each(function() {
1320        $(this).html( $(this).html().slice(1, -1)).show();
1321    });
1322
1323
1324    /* Blog categories widget */
1325    $('.widget_categories li').each(function() {
1326        var cat_count = $(this).clone().children().remove().end().text().trim().slice(1, -1);
1327        if( cat_count ) {
1328            $(this).append( '<span class="count">' + cat_count + '</span>' );
1329        }
1330    });
1331
1332
1333    /* Column shadow */
1334    $('.sh-column-shadow').parent().parent().css('z-index','500');
1335
1336
1337    /* Share */
1338    $('.sh-social-share-button').on( 'click', function() {
1339        $(this).next().toggleClass('sh-social-share-networks-active');
1340    });
1341
1342
1343    /* Vidoe Player */
1344    $('.sh-video-player-image-placeholder').on( 'click', function() {
1345        $(this).removeClass('sh-video-player-image-placeholder');
1346
1347        var videoURL = $(this).find('iframe').prop('src');
1348        if( !videoURL.match(/vimeo.com/) ){
1349            videoURL += "&autoplay=1";
1350    	}
1351        $(this).find('iframe').prop('src',videoURL);
1352    });
1353
1354
1355    /* Partners Carousel */
1356    $('.sh-partners-carousel').each( function() {
1357        var partner_autoplay = parseInt( $(this).attr('data-autoplay') );
1358        var partner_carousel_columns = parseInt( $(this).attr('data-id') );
1359        var partner_carousel_columns_responsive1 = partner_carousel_columns;
1360        var partner_carousel_columns_responsive2 = 2;
1361
1362        if( partner_carousel_columns > 4 ) {
1363            partner_carousel_columns_responsive1 = 4;
1364        }
1365
1366        if( partner_carousel_columns == 1 ) {
1367            partner_carousel_columns_responsive2 = 1;
1368        }
1369
1370        if( partner_autoplay < 1 || !partner_autoplay ) {
1371            partner_autoplay = 5000;
1372        }
1373
1374        $(this).slick({
1375            infinite: true,
1376            dots: false,
1377            arrows: false,
1378            slidesToShow: partner_carousel_columns,
1379            slidesToScroll: 1,
1380            autoplay: true,
1381            autoplaySpeed: partner_autoplay,
1382            responsive: [
1383                {
1384                    breakpoint: 1025,
1385                    settings: {
1386                        slidesToShow: partner_carousel_columns_responsive1
1387                    }
1388                },{
1389                    breakpoint: 800,
1390                    settings: {
1391                        slidesToShow: partner_carousel_columns_responsive2,
1392                        pauseOnHover: false
1393                    }
1394                },{
1395                    breakpoint: 550,
1396                    settings: {
1397                        slidesToShow: 1,
1398                        pauseOnHover: false
1399                    }
1400                }
1401            ],
1402        });
1403    })
1404
1405
1406    /* WooCommerce Carousel */
1407    $('.sh-recent-products-carousel .products').each( function() {
1408        var carousel_columns = parseInt( $(this).closest('.sh-recent-products-carousel').attr('data-id') );
1409        var carousel_columns_responsive1 = carousel_columns;
1410        var carousel_columns_responsive2 = 2;
1411
1412        if( carousel_columns > 4 ) {
1413            carousel_columns_responsive1 = 4;
1414        }
1415
1416        if( carousel_columns == 1 ) {
1417            carousel_columns_responsive2 = 1;
1418        }
1419
1420        $(this).slick({
1421            infinite: true,
1422            dots: true,
1423            arrows: false,
1424            slidesToShow: carousel_columns,
1425            slidesToScroll: carousel_columns,
1426            autoplay: true,
1427            autoplaySpeed: 5000,
1428            responsive: [
1429                {
1430                    breakpoint: 1025,
1431                    settings: {
1432                        slidesToShow: carousel_columns_responsive1,
1433                        slidesToScroll: carousel_columns_responsive1,
1434                    }
1435                },{
1436                    breakpoint: 800,
1437                    settings: {
1438                        slidesToShow: carousel_columns_responsive2,
1439                        slidesToScroll: carousel_columns_responsive2,
1440                        pauseOnHover: false
1441                    }
1442                },{
1443                    breakpoint: 550,
1444                    settings: {
1445                        slidesToShow: 1,
1446                        slidesToScroll: 1,
1447                        pauseOnHover: false
1448                    }
1449                }
1450            ],
1451        });
1452    })
1453
1454
1455    /* Blog Posts Carousel */
1456    $('.sh-recent-posts-carousel .blog-list').each( function() {
1457        var desktop_slides = parseInt( $(this).parent().attr('data-id') );
1458        if( desktop_slides == 4 || desktop_slides == 5 ) {
1459            var desktop_slides = 3;
1460        }
1461
1462        $(this).slick({
1463            infinite: true,
1464            dots: true,
1465            arrows: false,
1466            slidesToShow: desktop_slides,
1467            slidesToScroll: desktop_slides,
1468            autoplay: true,
1469            autoplaySpeed: 5000,
1470            responsive: [
1471                {
1472                    breakpoint: 1025,
1473                    settings: {
1474                        slidesToShow: desktop_slides,
1475                        slidesToScroll: desktop_slides,
1476                    }
1477                },{
1478                    breakpoint: 800,
1479                    settings: {
1480                        slidesToShow: 2,
1481                        slidesToScroll: 2,
1482                        pauseOnHover: false
1483                    }
1484                },{
1485                    breakpoint: 550,
1486                    settings: {
1487                        slidesToShow: 1,
1488                        slidesToScroll: 1,
1489                        pauseOnHover: false
1490                    }
1491                }
1492            ],
1493        });
1494    });
1495
1496
1497    /* Partners Carousel Responsive */
1498    $('.sh-partners-carousel').on('init setPosition', function(event, slick, currentSlide, nextSlide){
1499        var self = $(this);
1500        var max_height = 0;
1501        self.find('.slick-slide img').each(function() {
1502            var cur_height = $(this).height();
1503            if (cur_height > max_height) {
1504                max_height = cur_height;
1505            }
1506        });
1507
1508        if( max_height > 0 ) {
1509            self.css('max-height', max_height);
1510            self.find('.slick-slide').each( function() {
1511                $(this).height( max_height );
1512            });
1513        }
1514
1515        self.css('height', 'auto').css('opacity', '1');
1516    });
1517
1518
1519    /* Header navigation */
1520    function jevelin_navigation() {
1521        if( $('.sh-header.sh-header-megamenu-style2').length ) {
1522            $("ul.sh-nav").superfish({
1523                delay: jevelin.header_animation_dropdown_delay,
1524                hoverClass: 'sh-hover',
1525                animation: { opacity: "show", marginTop: "0px" },
1526                animationOut: { opacity: "hide", marginTop: "-10px" },
1527                easing: jevelin.header_animation_dropdown,
1528                speed: parseInt( jevelin.header_animation_dropdown_speed ),
1529                speedOut: 0,
1530                cssArrows: false,
1531                pathLevels: 2,
1532            });
1533        } else {
1534            $("ul.sh-nav").superfish({
1535                delay: jevelin.header_animation_dropdown_delay,
1536                hoverClass: 'sh-hover',
1537                animation: { opacity: "show", height:'show' },
1538                animationOut: { opacity: "hide", height:'hide' },
1539                easing: jevelin.header_animation_dropdown,
1540                speed: parseInt( jevelin.header_animation_dropdown_speed ),
1541                speedOut: 0,
1542                cssArrows: false,
1543                pathLevels: 2,
1544            });
1545        }
1546    }
1547    jevelin_navigation();
1548    if( !$('header.primary-desktop .sh-nav-social').find('a').length ) {
1549        $('header.primary-desktop .sh-nav-social').remove();
1550    }
1551
1552
1553    /* Mobile header dropdown */
1554    var mobile_header_dropdown_align = 0;
1555    $('.sh-header-mobile .sh-nav-dropdown').on( 'click', function() {
1556        if( mobile_header_dropdown_align == 0 ) {
1557            mobile_header_dropdown_align++;
1558            $('.sh-nav-mobile > li > a, .sh-nav-mobile li.menu-item-has-children > a, .sh-header-mobile li.mega-menu-col > a').each( function() {
1559                if( $(this).attr('href') != '' && $(this).attr('href') != '#' ) {
1560                    var link_target = $(this).attr( 'target' );
1561                    if( link_target != '_blank' ) {
1562                        link_target = '_self';
1563                    }
1564
1565                    $(this).parent().prepend('<a href="'+ $(this).attr('href') +'" target="'+ link_target +'" class="menu-item-open-fix">'+ $(this).html() +'</a>');
1566                    $(this).html('&nbsp;')
1567                }
1568            });
1569        }
1570
1571
1572        var self_icon_image = $(this).find('.sh-nav-custom-icon-image');
1573        if( self_icon_image.hasClass( 'active' ) ) {
1574            self_icon_image.removeClass( 'active' );
1575        } else {
1576            self_icon_image.addClass( 'active' );
1577        }
1578
1579
1580        $('.sh-header-mobile-dropdown').stop(true, true).slideToggle(
1581            jevelin.header_animation_dropdown_speed,
1582            jevelin.header_animation_dropdown
1583        );
1584
1585        return false;
1586    });
1587
1588
1589    /* Mega Menu Column Link */
1590    $('.sh-header li.mega-menu-col > a').on( 'click', function() {
1591        window.location = $(this).attr('href');
1592    });
1593
1594
1595    /* Notice */
1596    if( jevelin.notice !== false ) {
1597        if( jevelin.notice == 'enable2' ) {
1598
1599            $('.sh-page-notice').show();
1600            $(".sh-page-notice-button").on('click', function() {
1601
1602                $('.sh-page-notice').hide();
1603                $('header.primary-mobile').css('height', $('.sh-header-mobile-navigation').actual( 'height' ) );
1604                return false;
1605            });
1606
1607        } else {
1608
1609            if ( 'set' !== $.cookie( 'sh-notice' ) ) {
1610                $('.sh-page-notice').show();
1611                $(".sh-page-notice-button").on('click', function() {
1612                    $.cookie( 'sh-notice', 'set', { expires: 356, path: '/' });
1613
1614                    $('.sh-page-notice').hide();
1615                    $('header.primary-mobile').css('height', $('.sh-header-mobile-navigation').actual( 'height' ) );
1616                    return false;
1617                });
1618            }
1619
1620        }
1621
1622
1623        $('header.primary-mobile').css('height', jevelin_nan_to_0( parseInt( $('.sh-header-mobile-navigation').actual( 'height' ) ) ) );
1624    }
1625
1626
1627    /* Page loader */
1628    if( jevelin.page_loader == 1 ) {
1629        $(".sh-page-loader").fadeOut(500);
1630        $("body").css('overflow', 'visible');
1631
1632		$(window).bind('beforeunload', function(e){
1633			$('.sh-page-loader').fadeIn();
1634		});
1635    }
1636
1637
1638    /* WooCommerce - Page Numbers */
1639    $(".woocommerce-pagination .page-numbers .prev").html( jevelin.page_numbers_prev );
1640    $(".woocommerce-pagination .page-numbers .next").html( jevelin.page_numbers_next );
1641
1642
1643    /* RTL support */
1644    if( jevelin.rtl_support == 1 ) {
1645        $('.sh-filter').each(function(){
1646            $(this).find('.sh-filter-item:first-child').appendTo(this);
1647        });
1648
1649        $('.sh-portfolio-single-info-item').each(function(){
1650            $(this).find('.sh-portfolio-single-info-left').appendTo(this);
1651        });
1652
1653        $('.sh-progress-style4 .sh-progress-item .row').each(function(){
1654            $(this).find('.col-md-8').appendTo(this);
1655        });
1656
1657        $('.sh-progress-style5 .sh-progress-item .row').each(function(){
1658            $(this).find('.col-md-8').appendTo(this);
1659        });
1660
1661        $('.sh-counter-style3 > .sh-table').each(function(){
1662            $(this).find('.text-right').appendTo(this);
1663        });
1664
1665        $('.sh-copyrights-style2 > .sh-table-full > .sh-table-cell:first-child').appendTo('.sh-copyrights-style2 > .sh-table-full');
1666        $('.sh-header:not(.sh-header-7) > .container > .sh-table > .sh-table-cell:first-child').appendTo('.sh-header > .container > .sh-table');
1667
1668        $('.sh-header:not(.sh-header-7) .sh-nav .menu-item.sh-nav-cart').prependTo('.sh-header .sh-nav');
1669        $('.sh-header:not(.sh-header-7) .sh-nav .menu-item.sh-nav-search').prependTo('.sh-header .sh-nav');
1670        $('.sh-header:not(.sh-header-7) .sh-nav .menu-item.sh-nav-social').prependTo('.sh-header .sh-nav');
1671
1672        $('.sh-header-top-2 > .container > .row > .header-contacts').appendTo('.sh-header-top-2 > .container > .row');
1673        $('.sh-header-top-3 > .container > .sh-table > .header-contacts').appendTo('.sh-header-top-3 > .container > .sh-table');
1674    }
1675
1676
1677    /* Footer Parallax */
1678    function jevelin_footer_parallax() {
1679        if ($(document).width() > 850) {
1680            $("#wrapper > .content-container").css( 'margin-bottom', $('.sh-footer').height() );
1681        } else {
1682            $("#wrapper > .content-container").css( 'margin-bottom', '' );
1683        }
1684    }
1685
1686    function jevelin_footer_parallax_visible() {
1687        if ($(document).width() > 850) {
1688            if( ( $(document).height() - ($(window).scrollTop() + $(window).height()) ) < $('.sh-footer').height() ) {
1689                $('.sh-footer').css( 'opacity', '1');
1690            } else {
1691                $('.sh-footer').css( 'opacity', '0');
1692            }
1693        }
1694    }
1695
1696    if( jevelin.footer_parallax == 1 ) {
1697        $("body").addClass( 'sh-footer-paralalx-init' );
1698
1699        $(window).load(function (){
1700            jevelin_footer_parallax();
1701            jevelin_footer_parallax_visible();
1702        });
1703
1704        $(window).resize(function() {
1705            clearTimeout(window.resizedFinishedFooter);
1706            window.resizedFinishedFooter = setTimeout(function(){
1707
1708                jevelin_footer_parallax();
1709
1710            }, 500);
1711        });
1712
1713        $(window).scroll(jevelin_footer_parallax_visible);
1714    }
1715
1716
1717    /* WooCommerce Button Change */
1718    $('.sh-woocommerce-products-style2 li.product').each( function() {
1719        var button_html = '';
1720        if( $(this).find('.add_to_cart_button').length ) {
1721            button_html = $(this).find('.add_to_cart_button')[0].outerHTML;
1722        }
1723        $(this).find('.sh-woo-post-content-container > a:first-child').append( button_html );
1724        $(this).find('.sh-woo-post-content-container > .add_to_cart_button').remove();
1725    });
1726
1727
1728    /* Admin Preview (beta) */
1729    $('.sh-unyson-frontend-test').on( 'click', function() {
1730        $(this).toggleClass( "active" );
1731        $('#content.page-content').toggleClass( "sh-unyson-frontend-preview" );
1732    });
1733
1734
1735    /* AJAX - Lazy Load */
1736    if( $('.sh-load-more:not(.sh-load-more-product)').length ) {
1737        if( $('.sh-load-more.infinite').length ) {
1738            $(window).scroll( function() {
1739                if( $('.sh-load-more').length && $('.sh-load-more').isInViewport() ) {
1740                    if( $('.sh-load-more:not(.disabled)').length ) {
1741                        jevelin_loadmore();
1742                    }
1743                } else if( !$('.sh-load-more').length ) {
1744                    $(this).off();
1745                }
1746            });
1747        }
1748
1749        jQuery( document ).on( 'click', '.sh-load-more:not(.disabled)', function() {
1750            jevelin_loadmore();
1751        });
1752
1753        function jevelin_loadmore() {
1754            var lazy_self = $('.sh-load-more');
1755            lazy_self.addClass( 'disabled' );
1756            var lazy_categories = lazy_self.attr('data-categories');
1757            var lazy_post_style = lazy_self.attr('data-post-style');
1758            var lazy_posts_per_page = lazy_self.attr('data-posts-per-page');
1759            var lazy_paged = lazy_self.attr('data-paged');
1760            jQuery.ajax({
1761                url : jevelin_loadmore_posts.ajax_url,
1762                type : 'post',
1763                data : {
1764                    action : 'load_more_posts',
1765                    categories : lazy_categories,
1766                    per_page: lazy_posts_per_page,
1767                    post_style : lazy_post_style,
1768                    paged: lazy_paged,
1769                },
1770                success : function( response ) {
1771                    if( response == 'done' ) {
1772                        $('.sh-load-more').remove();
1773                    } else {
1774                        $('.sh-load-more').attr('data-paged', parseInt( $('.sh-load-more').attr('data-paged') ) + 1 );
1775
1776                        if( lazy_self.attr( 'data-id' ) ) {
1777
1778                            var lazy_add_posts = $( '.content-container .'+ lazy_self.attr( 'data-id' ) +' .blog-list' );
1779                            if( lazy_add_posts.hasClass('blog-style-masonry') ) {
1780                                // console.log('yes');
1781                                lazy_add_posts.isotope( 'insert', $(response) ).imagesLoaded( function() {
1782                                    lazy_add_posts.isotope('layout').css( 'opacity', 1 );
1783                                });
1784                            } else {
1785                                $(response).appendTo( '.content-container .'+ lazy_self.attr( 'data-id' ) +' .blog-list' );
1786                            }
1787
1788                        } else {
1789                            if( $( '.blog-list.blog-style-masonry' ).length ) {
1790                                $( '.blog-list.blog-style-masonry' ).isotope( 'insert', $(response) ).imagesLoaded( function() {
1791                                    $( '.blog-list.blog-style-masonry' ).isotope('layout').css( 'opacity', 1 );
1792                                });
1793                            } else {
1794                                $(response).appendTo( '.content-container .blog-list' ).hide().fadeIn( 700 );
1795                            }
1796                        }
1797
1798                        lazy_self.removeClass( 'disabled' );
1799                        if( $(response).filter('.post-item').length < lazy_posts_per_page ) {
1800                            $('.sh-load-more').remove();
1801                        }
1802
1803                    }
1804                }
1805            });
1806        }
1807    }
1808
1809
1810    /* AJAX - Load more products */
1811    if( $('.sh-load-more.sh-load-more-product').length ) {
1812        if( $('.sh-load-more.sh-load-more-product.infinite').length ) {
1813            $(window).scroll( function() {
1814                if( $('.sh-load-more.sh-load-more-product').length && $('.sh-load-more.sh-load-more-product').isInViewport() ) {
1815                    if( $('.sh-load-more.sh-load-more-product:not(.disabled)').length ) {
1816                        jevelin_loadmore_products();
1817                    }
1818                } else if( !$('.sh-load-more.sh-load-more-product').length ) {
1819                    $(this).off();
1820                }
1821            });
1822        }
1823
1824        jQuery( document ).on( 'click', '.sh-load-more-product:not(.disabled)', function() {
1825            jevelin_loadmore_products();
1826        });
1827
1828        function jevelin_loadmore_products() {
1829            var lazy_self = $('.sh-load-more-product');
1830            lazy_self.addClass( 'disabled' );
1831            var lazy_categories = lazy_self.attr('data-categories');
1832            var lazy_post_style = lazy_self.attr('data-post-style');
1833            var lazy_posts_per_page = lazy_self.attr('data-posts-per-page');
1834            var lazy_paged = lazy_self.attr('data-paged');
1835            jQuery.ajax({
1836                url : jevelin_loadmore_posts.ajax_url,
1837                type : 'post',
1838                data : {
1839                    action : 'load_more_products',
1840                    per_page: lazy_posts_per_page,
1841                    paged: lazy_paged,
1842                },
1843                success : function( response ) {
1844                    if( response == 'done' ) {
1845                        $('.sh-load-more-product').remove();
1846                    } else {
1847                        $(response).appendTo( '.vcg-woocommerce-products ul.products' );
1848
1849                        $('.sh-load-more-product').attr('data-paged', parseInt( $('.sh-load-more-product').attr('data-paged') ) + 1 );
1850                        lazy_self.removeClass( 'disabled' );
1851
1852                        if( $(response).filter('.type-product').length < lazy_posts_per_page ) {
1853                            $('.sh-load-more-product').remove();
1854                        }
1855
1856                    }
1857                }
1858            });
1859        }
1860    }
1861
1862
1863    /* One Page Navigation - On load */
1864    var opn_find_url = document.location.protocol +"//"+ document.location.hostname + document.location.pathname;
1865    var opn_find = 'a[href="'+opn_find_url+'#backtotop"]';
1866    if( $(opn_find).length ) {
1867        $('header.primary-desktop .sh-nav').find('li.current_page_item').each( function() {
1868            $(this).removeClass('current_page_item');
1869            $(opn_find).parent().addClass('current_page_item');
1870        });
1871    }
1872
1873
1874    /* One Page Navigation - Scroll */
1875    if( $('#content > .vc_row').is('[id]') ) {
1876        var opn_lock = 0;
1877        $(window).on( 'load scroll', function() {
1878            var opn_lock_scroll = 0;
1879            if( opn_lock == 0 ) {
1880                $('#content > .vc_row').each( function() {
1881                    if( opn_lock_scroll == 0 && $(this).is('[id]') && $(this).isInViewport() ) {
1882                        var opn_find_url = document.location.protocol +"//"+ document.location.hostname + document.location.pathname;
1883                        var opn_find = 'a[href="'+opn_find_url+'#'+$(this).attr('id')+'"]';
1884                        if( $(opn_find).length ) {
1885                            $(opn_find).closest('ul.sh-nav').find('li.current_page_item').removeClass('current_page_item');
1886                            $(opn_find).parent().addClass('current_page_item');
1887                        }
1888                        opn_lock_scroll = 1;
1889                    }
1890                });
1891
1892                if( $(window).scrollTop() == 0 ) {
1893                    var opn_find_url = document.location.protocol +"//"+ document.location.hostname + document.location.pathname;
1894                    var opn_find = 'a[href="'+opn_find_url+'#backtotop"]';
1895                    if( $(opn_find).length ) {
1896                        $(opn_find).closest('ul.sh-nav').find('li.current_page_item').removeClass('current_page_item');
1897                        $(opn_find).parent().addClass('current_page_item');
1898                    }
1899                }
1900            }
1901
1902        });
1903    }
1904
1905
1906    /* One Page Navigation - Click */
1907    $('header.primary-desktop .sh-nav a').on( 'click', function() {
1908        var opn_current = '';
1909        if( $(this).is('[href]') ) {
1910            if( $(this).attr('href').length ) {
1911                var opn_current = 'div#'+$(this).attr('href').replace(/^.*?(#|$)/,'');
1912            } else {
1913                return false;
1914            }
1915        }
1916
1917        if( $(opn_current).length || opn_current == 'div#backtotop' ) {
1918
1919            $(this).closest('ul.sh-nav').find('li.current_page_item').removeClass('current_page_item');
1920            $(this).parent().addClass('current_page_item');
1921            opn_lock = 1;
1922
1923            setTimeout(function() {
1924                opn_lock = 0;
1925            }, 3000);
1926
1927        }
1928    });
1929
1930
1931});
1932
1933
1934/* Load functions */
1935(function( $ ){
1936
1937    /* Shufflehound Carousel */
1938    $.fn.isInViewport = function() {
1939        var elementTop = $(this).offset().top;
1940        var elementBottom = elementTop + $(this).outerHeight();
1941
1942        var viewportTop = $(window).scrollTop();
1943        var viewportBottom = viewportTop + $(window).height();
1944
1945        return elementBottom > viewportTop && elementTop < viewportBottom;
1946    };
1947
1948    $.fn.sh_carousel = function() {
1949
1950        /* Prepair Carusel */
1951        $(this).html( '<div class="sh-carousel-items">' + $(this).html() + '</div>' );
1952        var self_main = $(this);
1953        var self = $(this).find('.sh-carousel-items');
1954        self.find('.blog-textslider-post:first-child').addClass( 'sh-active' );
1955
1956
1957        /* Add Buttons */
1958        self_main.append( '<span class="sh-carousel-buttons sh-carousel-buttons-styling"></span>' );
1959        self_main.find( '.sh-carousel-buttons' ).append( '<span class="sh-carousel-prev"><i class="icon icon-arrow-left-circle"></i></span>' );
1960        self_main.find( '.sh-carousel-buttons' ).append( '<span class="sh-carousel-next"><i class="icon icon-arrow-right-circle"></i></span>' );
1961
1962
1963        /* Add Button Actions */
1964        self_main.find('.sh-carousel-prev').on( 'click', function() {
1965            var active = self.find( '.blog-textslider-post.sh-active' );
1966            var prev = active.prev();
1967
1968            /* If one the last slide */
1969            if( !prev.length ) {
1970                prev = self.find( '.blog-textslider-post:last-child' );
1971            }
1972
1973            active.removeClass( 'sh-active' );
1974            prev.addClass( 'sh-active' );
1975        });
1976
1977        self_main.find('.sh-carousel-next').on( 'click', function() {
1978            if( self.isInViewport() && !document.hidden ) {
1979                var active = self.find( '.blog-textslider-post.sh-active' );
1980                var next = active.next();
1981
1982                /* If one the last slide */
1983                if( !next.length ) {
1984                    next = self.find( '.blog-textslider-post:first-child' );
1985                }
1986
1987                active.removeClass( 'sh-active' );
1988                next.addClass( 'sh-active' );
1989            }
1990        });
1991
1992
1993        /* Start Carousel */
1994        var speed = 5000;
1995        var run = setInterval( function(){ self_main.find('.sh-carousel-next').trigger('click'); }, speed);
1996        self_main.hover(
1997            function() {
1998                clearInterval(run);
1999            },
2000            function() {
2001                 run = setInterval( function(){ self_main.find('.sh-carousel-next').trigger('click'); }, speed);
2002            }
2003        );
2004
2005    }
2006
2007})( jQuery );
2008
2009
2010
2011/*
2012** Portfolio Fancy Image Loading
2013*/
2014window.addEventListener( 'load', function() {
2015    jQuery( function($) {
2016        if( $('.sh-portfolio-fancy').length ) {
2017            var $portfolio2 = $('.sh-portfolio-fancy');
2018            $portfolio2.imagesLoaded( function() {
2019                var time = 0;
2020                $('.sh-portfolio-fancy').find('.sh-portfolio-fancy-item').each( function() {
2021
2022                    var self = $(this);
2023                    if( self.isVisible() ) {
2024                        setTimeout( function(){
2025                            self.addClass( 'sh-portfolio-fancy-item-active' );
2026                        }, time);
2027                        time += 300;
2028                    } else if( self.isVisibleAbove() ) {
2029                        self.addClass( 'sh-portfolio-fancy-item-active' );
2030                    }
2031
2032                });
2033                $portfolio2.isotope('layout');
2034            });
2035
2036            $(window).scroll(function() {
2037                clearTimeout(window.scrollFinished);
2038                window.scrollFinished = setTimeout(function(){
2039
2040                    var time2 = 0;
2041                    $('.sh-portfolio-fancy').find('.sh-portfolio-fancy-item:not(.sh-portfolio-fancy-item-active)').each( function() {
2042                        var self = $(this);
2043                        if( self.isVisible() ) {
2044                            setTimeout( function(){
2045                                self.addClass( 'sh-portfolio-fancy-item-active' );
2046                            }, time2);
2047                            time2 += 300;
2048                        }
2049                    });
2050
2051                }, 100);
2052            });
2053        }
2054    });
2055});
2056
2057
2058
2059
2060
2061/*
2062** Font Awesome migration from 4 to 5 version
2063*/
2064/*jQuery( function($) {
2065    var icons = {
2066        "fa-500px": "fab fa-500px",
2067        "fa-address-book-o": "far fa-address-book",
2068        "fa-address-card-o": "far fa-address-card",
2069        "fa-adn": "fab fa-adn",
2070        "fa-amazon": "fab fa-amazon",
2071        "fa-android": "fab fa-android",
2072        "fa-angellist": "fab fa-angellist",
2073        "fa-apple": "fab fa-apple",
2074        "fa-area-chart": "fas fa-chart-area",
2075        "fa-arrow-circle-o-down": "far fa-arrow-alt-circle-down",
2076        "fa-arrow-circle-o-left": "far fa-arrow-alt-circle-left",
2077        "fa-arrow-circle-o-right": "far fa-arrow-alt-circle-right",
2078        "fa-arrow-circle-o-up": "far fa-arrow-alt-circle-up",
2079        "fa-arrows": "fas fa-arrows-alt",
2080        "fa-arrows-alt": "fas fa-expand-arrows-alt",
2081        "fa-arrows-h": "fas fa-arrows-alt-h",
2082        "fa-arrows-v": "fas fa-arrows-alt-v",
2083        "fa-asl-interpreting": "fas fa-american-sign-language-interpreting",
2084        "fa-automobile": "fas fa-car",
2085        "fa-bandcamp": "fab fa-bandcamp",
2086        "fa-bank": "fas fa-university",
2087        "fa-bar-chart": "far fa-chart-bar",
2088        "fa-bar-chart-o": "far fa-chart-bar",
2089        "fa-bathtub": "fas fa-bath",
2090        "fa-battery": "fas fa-battery-full",
2091        "fa-battery-0": "fas fa-battery-empty",
2092        "fa-battery-1": "fas fa-battery-quarter",
2093        "fa-battery-2": "fas fa-battery-half",
2094        "fa-battery-3": "fas fa-battery-three-quarters",
2095        "fa-battery-4": "fas fa-battery-full",
2096        "fa-behance": "fab fa-behance",
2097        "fa-behance-square": "fab fa-behance-square",
2098        "fa-bell-o": "far fa-bell",
2099        "fa-bell-slash-o": "far fa-bell-slash",
2100        "fa-bitbucket": "fab fa-bitbucket",
2101        "fa-bitbucket-square": "fab fa-bitbucket",
2102        "fa-bitcoin": "fab fa-btc",
2103        "fa-black-tie": "fab fa-black-tie",
2104        "fa-bluetooth": "fab fa-bluetooth",
2105        "fa-bluetooth-b": "fab fa-bluetooth-b",
2106        "fa-bookmark-o": "far fa-bookmark",
2107        "fa-btc": "fab fa-btc",
2108        "fa-building-o": "far fa-building",
2109        "fa-buysellads": "fab fa-buysellads",
2110        "fa-cab": "fas fa-taxi",
2111        "fa-calendar": "fas fa-calendar-alt",
2112        "fa-calendar-check-o": "far fa-calendar-check",
2113        "fa-calendar-minus-o": "far fa-calendar-minus",
2114        "fa-calendar-o": "far fa-calendar",
2115        "fa-calendar-plus-o": "far fa-calendar-plus",
2116        "fa-calendar-times-o": "far fa-calendar-times",
2117        "fa-caret-square-o-down": "far fa-caret-square-down",
2118        "fa-caret-square-o-left": "far fa-caret-square-left",
2119        "fa-caret-square-o-right": "far fa-caret-square-right",
2120        "fa-caret-square-o-up": "far fa-caret-square-up",
2121        "fa-cc": "far fa-closed-captioning",
2122        "fa-cc-amex": "fab fa-cc-amex",
2123        "fa-cc-diners-club": "fab fa-cc-diners-club",
2124        "fa-cc-discover": "fab fa-cc-discover",
2125        "fa-cc-jcb": "fab fa-cc-jcb",
2126        "fa-cc-mastercard": "fab fa-cc-mastercard",
2127        "fa-cc-paypal": "fab fa-cc-paypal",
2128        "fa-cc-stripe": "fab fa-cc-stripe",
2129        "fa-cc-visa": "fab fa-cc-visa",
2130        "fa-chain": "fas fa-link",
2131        "fa-chain-broken": "fas fa-unlink",
2132        "fa-check-circle-o": "far fa-check-circle",
2133        "fa-check-square-o": "far fa-check-square",
2134        "fa-chrome": "fab fa-chrome",
2135        "fa-circle-o": "far fa-circle",
2136        "fa-circle-o-notch": "fas fa-circle-notch",
2137        "fa-circle-thin": "far fa-circle",
2138        "fa-clipboard": "far fa-clipboard",
2139        "fa-clock-o": "far fa-clock",
2140        "fa-clone": "far fa-clone",
2141        "fa-close": "fas fa-times",
2142        "fa-cloud-download": "fas fa-cloud-download-alt",
2143        "fa-cloud-upload": "fas fa-cloud-upload-alt",
2144        "fa-cny": "fas fa-yen-sign",
2145        "fa-code-fork": "fas fa-code-branch",
2146        "fa-codepen": "fab fa-codepen",
2147        "fa-codiepie": "fab fa-codiepie",
2148        "fa-comment-o": "far fa-comment",
2149        "fa-commenting": "far fa-comment-dots",
2150        "fa-commenting-o": "far fa-comment-dots",
2151        "fa-comments-o": "far fa-comments",
2152        "fa-compass": "far fa-compass",
2153        "fa-connectdevelop": "fab fa-connectdevelop",
2154        "fa-contao": "fab fa-contao",
2155        "fa-copyright": "far fa-copyright",
2156        "fa-creative-commons": "fab fa-creative-commons",
2157        "fa-credit-card": "far fa-credit-card",
2158        "fa-credit-card-alt": "fas fa-credit-card",
2159        "fa-css3": "fab fa-css3",
2160        "fa-cutlery": "fas fa-utensils",
2161        "fa-dashboard": "fas fa-tachometer-alt",
2162        "fa-dashcube": "fab fa-dashcube",
2163        "fa-deafness": "fas fa-deaf",
2164        "fa-dedent": "fas fa-outdent",
2165        "fa-delicious": "fab fa-delicious",
2166        "fa-deviantart": "fab fa-deviantart",
2167        "fa-diamond": "far fa-gem",
2168        "fa-digg": "fab fa-digg",
2169        "fa-dollar": "fas fa-dollar-sign",
2170        "fa-dot-circle-o": "far fa-dot-circle",
2171        "fa-dribbble": "fab fa-dribbble",
2172        "fa-drivers-license": "fas fa-id-card",
2173        "fa-drivers-license-o": "far fa-id-card",
2174        "fa-dropbox": "fab fa-dropbox",
2175        "fa-drupal": "fab fa-drupal",
2176        "fa-edge": "fab fa-edge",
2177        "fa-eercast": "fab fa-sellcast",
2178        "fa-empire": "fab fa-empire",
2179        "fa-envelope-o": "far fa-envelope",
2180        "fa-envelope-open-o": "far fa-envelope-open",
2181        "fa-envira": "fab fa-envira",
2182        "fa-etsy": "fab fa-etsy",
2183        "fa-eur": "fas fa-euro-sign",
2184        "fa-euro": "fas fa-euro-sign",
2185        "fa-exchange": "fas fa-exchange-alt",
2186        "fa-expeditedssl": "fab fa-expeditedssl",
2187        "fa-external-link": "fas fa-external-link-alt",
2188        "fa-external-link-square": "fas fa-external-link-square-alt",
2189        "fa-eye": "far fa-eye",
2190        "fa-eye-slash": "far fa-eye-slash",
2191        "fa-eyedropper": "fas fa-eye-dropper",
2192        "fa-fa": "fab fa-font-awesome",
2193        "fa-facebook": "fab fa-facebook-f",
2194        "fa-facebook-f": "fab fa-facebook-f",
2195        "fa-facebook-official": "fab fa-facebook",
2196        "fa-facebook-square": "fab fa-facebook-square",
2197        "fa-feed": "fas fa-rss",
2198        "fa-file-archive-o": "far fa-file-archive",
2199        "fa-file-audio-o": "far fa-file-audio",
2200        "fa-file-code-o": "far fa-file-code",
2201        "fa-file-excel-o": "far fa-file-excel",
2202        "fa-file-image-o": "far fa-file-image",
2203        "fa-file-movie-o": "far fa-file-video",
2204        "fa-file-o": "far fa-file",
2205        "fa-file-pdf-o": "far fa-file-pdf",
2206        "fa-file-photo-o": "far fa-file-image",
2207        "fa-file-picture-o": "far fa-file-image",
2208        "fa-file-powerpoint-o": "far fa-file-powerpoint",
2209        "fa-file-sound-o": "far fa-file-audio",
2210        "fa-file-text": "fas fa-file-alt",
2211        "fa-file-text-o": "far fa-file-alt",
2212        "fa-file-video-o": "far fa-file-video",
2213        "fa-file-word-o": "far fa-file-word",
2214        "fa-file-zip-o": "far fa-file-archive",
2215        "fa-files-o": "far fa-copy",
2216        "fa-firefox": "fab fa-firefox",
2217        "fa-first-order": "fab fa-first-order",
2218        "fa-flag-o": "far fa-flag",
2219        "fa-flash": "fas fa-bolt",
2220        "fa-flickr": "fab fa-flickr",
2221        "fa-floppy-o": "far fa-save",
2222        "fa-folder-o": "far fa-folder",
2223        "fa-folder-open-o": "far fa-folder-open",
2224        "fa-font-awesome": "fab fa-font-awesome",
2225        "fa-fonticons": "fab fa-fonticons",
2226        "fa-fort-awesome": "fab fa-fort-awesome",
2227        "fa-forumbee": "fab fa-forumbee",
2228        "fa-foursquare": "fab fa-foursquare",
2229        "fa-free-code-camp": "fab fa-free-code-camp",
2230        "fa-frown-o": "far fa-frown",
2231        "fa-futbol-o": "far fa-futbol",
2232        "fa-gbp": "fas fa-pound-sign",
2233        "fa-ge": "fab fa-empire",
2234        "fa-gear": "fas fa-cog",
2235        "fa-gears": "fas fa-cogs",
2236        "fa-get-pocket": "fab fa-get-pocket",
2237        "fa-gg": "fab fa-gg",
2238        "fa-gg-circle": "fab fa-gg-circle",
2239        "fa-git": "fab fa-git",
2240        "fa-git-square": "fab fa-git-square",
2241        "fa-github": "fab fa-github",
2242        "fa-github-alt": "fab fa-github-alt",
2243        "fa-github-square": "fab fa-github-square",
2244        "fa-gitlab": "fab fa-gitlab",
2245        "fa-gittip": "fab fa-gratipay",
2246        "fa-glass": "fas fa-glass-martini",
2247        "fa-glide": "fab fa-glide",
2248        "fa-glide-g": "fab fa-glide-g",
2249        "fa-google": "fab fa-google",
2250        "fa-google-plus": "fab fa-google-plus-g",
2251        "fa-google-plus-circle": "fab fa-google-plus",
2252        "fa-google-plus-official": "fab fa-google-plus",
2253        "fa-google-plus-square": "fab fa-google-plus-square",
2254        "fa-google-wallet": "fab fa-google-wallet",
2255        "fa-gratipay": "fab fa-gratipay",
2256        "fa-grav": "fab fa-grav",
2257        "fa-group": "fas fa-users",
2258        "fa-hacker-news": "fab fa-hacker-news",
2259        "fa-hand-grab-o": "far fa-hand-rock",
2260        "fa-hand-lizard-o": "far fa-hand-lizard",
2261        "fa-hand-o-down": "far fa-hand-point-down",
2262        "fa-hand-o-left": "far fa-hand-point-left",
2263        "fa-hand-o-right": "far fa-hand-point-right",
2264        "fa-hand-o-up": "far fa-hand-point-up",
2265        "fa-hand-paper-o": "far fa-hand-paper",
2266        "fa-hand-peace-o": "far fa-hand-peace",
2267        "fa-hand-pointer-o": "far fa-hand-pointer",
2268        "fa-hand-rock-o": "far fa-hand-rock",
2269        "fa-hand-scissors-o": "far fa-hand-scissors",
2270        "fa-hand-spock-o": "far fa-hand-spock",
2271        "fa-hand-stop-o": "far fa-hand-paper",
2272        "fa-handshake-o": "far fa-handshake",
2273        "fa-hard-of-hearing": "fas fa-deaf",
2274        "fa-hdd-o": "far fa-hdd",
2275        "fa-header": "fas fa-heading",
2276        "fa-heart": "far fa-heart",
2277        "fa-heart-o": "far fa-heart",
2278        "fa-hospital-o": "far fa-hospital",
2279        "fa-hotel": "fas fa-bed",
2280        "fa-hourglass-1": "fas fa-hourglass-start",
2281        "fa-hourglass-2": "fas fa-hourglass-half",
2282        "fa-hourglass-3": "fas fa-hourglass-end",
2283        "fa-hourglass-o": "far fa-hourglass",
2284        "fa-houzz": "fab fa-houzz",
2285        "fa-html5": "fab fa-html5",
2286        "fa-id-badge": "far fa-id-badge",
2287        "fa-id-card-o": "far fa-id-card",
2288        "fa-ils": "fas fa-shekel-sign",
2289        "fa-image": "far fa-image",
2290        "fa-imdb": "fab fa-imdb",
2291        "fa-inr": "fas fa-rupee-sign",
2292        "fa-instagram": "fab fa-instagram",
2293        "fa-institution": "fas fa-university",
2294        "fa-internet-explorer": "fab fa-internet-explorer",
2295        "fa-intersex": "fas fa-transgender",
2296        "fa-ioxhost": "fab fa-ioxhost",
2297        "fa-joomla": "fab fa-joomla",
2298        "fa-jpy": "fas fa-yen-sign",
2299        "fa-jsfiddle": "fab fa-jsfiddle",
2300        "fa-keyboard-o": "far fa-keyboard",
2301        "fa-krw": "fas fa-won-sign",
2302        "fa-lastfm": "fab fa-lastfm",
2303        "fa-lastfm-square": "fab fa-lastfm-square",
2304        "fa-leanpub": "fab fa-leanpub",
2305        "fa-legal": "fas fa-gavel",
2306        "fa-lemon-o": "far fa-lemon",
2307        "fa-level-down": "fas fa-level-down-alt",
2308        "fa-level-up": "fas fa-level-up-alt",
2309        "fa-life-bouy": "far fa-life-ring",
2310        "fa-life-buoy": "far fa-life-ring",
2311        "fa-life-ring": "far fa-life-ring",
2312        "fa-life-saver": "far fa-life-ring",
2313        "fa-lightbulb-o": "far fa-lightbulb",
2314        "fa-line-chart": "fas fa-chart-line",
2315        "fa-linkedin": "fab fa-linkedin-in",
2316        "fa-linkedin-square": "fab fa-linkedin",
2317        "fa-linode": "fab fa-linode",
2318        "fa-linux": "fab fa-linux",
2319        "fa-list-alt": "far fa-list-alt",
2320        "fa-long-arrow-down": "fas fa-long-arrow-alt-down",
2321        "fa-long-arrow-left": "fas fa-long-arrow-alt-left",
2322        "fa-long-arrow-right": "fas fa-long-arrow-alt-right",
2323        "fa-long-arrow-up": "fas fa-long-arrow-alt-up",
2324        "fa-mail-forward": "fas fa-share",
2325        "fa-mail-reply": "fas fa-reply",
2326        "fa-mail-reply-all": "fas fa-reply-all",
2327        "fa-map-marker": "fas fa-map-marker-alt",
2328        "fa-map-o": "far fa-map",
2329        "fa-maxcdn": "fab fa-maxcdn",
2330        "fa-meanpath": "fab fa-font-awesome",
2331        "fa-medium": "fab fa-medium",
2332        "fa-meetup": "fab fa-meetup",
2333        "fa-meh-o": "far fa-meh",
2334        "fa-minus-square-o": "far fa-minus-square",
2335        "fa-mixcloud": "fab fa-mixcloud",
2336        "fa-mobile": "fas fa-mobile-alt",
2337        "fa-mobile-phone": "fas fa-mobile-alt",
2338        "fa-modx": "fab fa-modx",
2339        "fa-money": "far fa-money-bill-alt",
2340        "fa-moon-o": "far fa-moon",
2341        "fa-mortar-board": "fas fa-graduation-cap",
2342        "fa-navicon": "fas fa-bars",
2343        "fa-newspaper-o": "far fa-newspaper",
2344        "fa-object-group": "far fa-object-group",
2345        "fa-object-ungroup": "far fa-object-ungroup",
2346        "fa-odnoklassniki": "fab fa-odnoklassniki",
2347        "fa-odnoklassniki-square": "fab fa-odnoklassniki-square",
2348        "fa-opencart": "fab fa-opencart",
2349        "fa-openid": "fab fa-openid",
2350        "fa-opera": "fab fa-opera",
2351        "fa-optin-monster": "fab fa-optin-monster",
2352        "fa-pagelines": "fab fa-pagelines",
2353        "fa-paper-plane-o": "far fa-paper-plane",
2354        "fa-paste": "far fa-clipboard",
2355        "fa-pause-circle-o": "far fa-pause-circle",
2356        "fa-paypal": "fab fa-paypal",
2357        "fa-pencil": "fas fa-pencil-alt",
2358        "fa-pencil-square": "fas fa-pen-square",
2359        "fa-pencil-square-o": "far fa-edit",
2360        "fa-photo": "far fa-image",
2361        "fa-picture-o": "far fa-image",
2362        "fa-pie-chart": "fas fa-chart-pie",
2363        "fa-pied-piper": "fab fa-pied-piper",
2364        "fa-pied-piper-alt": "fab fa-pied-piper-alt",
2365        "fa-pied-piper-pp": "fab fa-pied-piper-pp",
2366        "fa-pinterest": "fab fa-pinterest",
2367        "fa-pinterest-p": "fab fa-pinterest-p",
2368        "fa-pinterest-square": "fab fa-pinterest-square",
2369        "fa-play-circle-o": "far fa-play-circle",
2370        "fa-plus-square-o": "far fa-plus-square",
2371        "fa-product-hunt": "fab fa-product-hunt",
2372        "fa-qq": "fab fa-qq",
2373        "fa-question-circle-o": "far fa-question-circle",
2374        "fa-quora": "fab fa-quora",
2375        "fa-ra": "fab fa-rebel",
2376        "fa-ravelry": "fab fa-ravelry",
2377        "fa-rebel": "fab fa-rebel",
2378        "fa-reddit": "fab fa-reddit",
2379        "fa-reddit-alien": "fab fa-reddit-alien",
2380        "fa-reddit-square": "fab fa-reddit-square",
2381        "fa-refresh": "fas fa-sync",
2382        "fa-registered": "far fa-registered",
2383        "fa-remove": "fas fa-times",
2384        "fa-renren": "fab fa-renren",
2385        "fa-reorder": "fas fa-bars",
2386        "fa-repeat": "fas fa-redo",
2387        "fa-resistance": "fab fa-rebel",
2388        "fa-rmb": "fas fa-yen-sign",
2389        "fa-rotate-left": "fas fa-undo",
2390        "fa-rotate-right": "fas fa-redo",
2391        "fa-rouble": "fas fa-ruble-sign",
2392        "fa-rub": "fas fa-ruble-sign",
2393        "fa-ruble": "fas fa-ruble-sign",
2394        "fa-rupee": "fas fa-rupee-sign",
2395        "fa-s15": "fas fa-bath",
2396        "fa-safari": "fab fa-safari",
2397        "fa-scissors": "fas fa-cut",
2398        "fa-scribd": "fab fa-scribd",
2399        "fa-sellsy": "fab fa-sellsy",
2400        "fa-send": "fas fa-paper-plane",
2401        "fa-send-o": "far fa-paper-plane",
2402        "fa-share-square-o": "far fa-share-square",
2403        "fa-shekel": "fas fa-shekel-sign",
2404        "fa-sheqel": "fas fa-shekel-sign",
2405        "fa-shield": "fas fa-shield-alt",
2406        "fa-shirtsinbulk": "fab fa-shirtsinbulk",
2407        "fa-sign-in": "fas fa-sign-in-alt",
2408        "fa-sign-out": "fas fa-sign-out-alt",
2409        "fa-signing": "fas fa-sign-language",
2410        "fa-simplybuilt": "fab fa-simplybuilt",
2411        "fa-skyatlas": "fab fa-skyatlas",
2412        "fa-skype": "fab fa-skype",
2413        "fa-slack": "fab fa-slack",
2414        "fa-sliders": "fas fa-sliders-h",
2415        "fa-slideshare": "fab fa-slideshare",
2416        "fa-smile-o": "far fa-smile",
2417        "fa-snapchat": "fab fa-snapchat",
2418        "fa-snapchat-ghost": "fab fa-snapchat-ghost",
2419        "fa-snapchat-square": "fab fa-snapchat-square",
2420        "fa-snowflake-o": "far fa-snowflake",
2421        "fa-soccer-ball-o": "far fa-futbol",
2422        "fa-sort-alpha-asc": "fas fa-sort-alpha-down",
2423        "fa-sort-alpha-desc": "fas fa-sort-alpha-up",
2424        "fa-sort-amount-asc": "fas fa-sort-amount-down",
2425        "fa-sort-amount-desc": "fas fa-sort-amount-up",
2426        "fa-sort-asc": "fas fa-sort-up",
2427        "fa-sort-desc": "fas fa-sort-down",
2428        "fa-sort-numeric-asc": "fas fa-sort-numeric-down",
2429        "fa-sort-numeric-desc": "fas fa-sort-numeric-up",
2430        "fa-soundcloud": "fab fa-soundcloud",
2431        "fa-spoon": "fas fa-utensil-spoon",
2432        "fa-spotify": "fab fa-spotify",
2433        "fa-square-o": "far fa-square",
2434        "fa-stack-exchange": "fab fa-stack-exchange",
2435        "fa-stack-overflow": "fab fa-stack-overflow",
2436        "fa-star-half-empty": "far fa-star-half",
2437        "fa-star-half-full": "far fa-star-half",
2438        "fa-star-half-o": "far fa-star-half",
2439        "fa-star-o": "far fa-star",
2440        "fa-steam": "fab fa-steam",
2441        "fa-steam-square": "fab fa-steam-square",
2442        "fa-sticky-note-o": "far fa-sticky-note",
2443        "fa-stop-circle-o": "far fa-stop-circle",
2444        "fa-stumbleupon": "fab fa-stumbleupon",
2445        "fa-stumbleupon-circle": "fab fa-stumbleupon-circle",
2446        "fa-sun-o": "far fa-sun",
2447        "fa-superpowers": "fab fa-superpowers",
2448        "fa-support": "far fa-life-ring",
2449        "fa-tablet": "fas fa-tablet-alt",
2450        "fa-tachometer": "fas fa-tachometer-alt",
2451        "fa-telegram": "fab fa-telegram",
2452        "fa-television": "fas fa-tv",
2453        "fa-tencent-weibo": "fab fa-tencent-weibo",
2454        "fa-themeisle": "fab fa-themeisle",
2455        "fa-thermometer": "fas fa-thermometer-full",
2456        "fa-thermometer-0": "fas fa-thermometer-empty",
2457        "fa-thermometer-1": "fas fa-thermometer-quarter",
2458        "fa-thermometer-2": "fas fa-thermometer-half",
2459        "fa-thermometer-3": "fas fa-thermometer-three-quarters",
2460        "fa-thermometer-4": "fas fa-thermometer-full",
2461        "fa-thumb-tack": "fas fa-thumbtack",
2462        "fa-thumbs-o-down": "far fa-thumbs-down",
2463        "fa-thumbs-o-up": "far fa-thumbs-up",
2464        "fa-ticket": "fas fa-ticket-alt",
2465        "fa-times-circle-o": "far fa-times-circle",
2466        "fa-times-rectangle": "fas fa-window-close",
2467        "fa-times-rectangle-o": "far fa-window-close",
2468        "fa-toggle-down": "far fa-caret-square-down",
2469        "fa-toggle-left": "far fa-caret-square-left",
2470        "fa-toggle-right": "far fa-caret-square-right",
2471        "fa-toggle-up": "far fa-caret-square-up",
2472        "fa-trash": "fas fa-trash-alt",
2473        "fa-trash-o": "far fa-trash-alt",
2474        "fa-trello": "fab fa-trello",
2475        "fa-tripadvisor": "fab fa-tripadvisor",
2476        "fa-try": "fas fa-lira-sign",
2477        "fa-tumblr": "fab fa-tumblr",
2478        "fa-tumblr-square": "fab fa-tumblr-square",
2479        "fa-turkish-lira": "fas fa-lira-sign",
2480        "fa-twitch": "fab fa-twitch",
2481        "fa-twitter": "fab fa-twitter",
2482        "fa-twitter-square": "fab fa-twitter-square",
2483        "fa-unsorted": "fas fa-sort",
2484        "fa-usb": "fab fa-usb",
2485        "fa-usd": "fas fa-dollar-sign",
2486        "fa-user-circle-o": "far fa-user-circle",
2487        "fa-user-o": "far fa-user",
2488        "fa-vcard": "fas fa-address-card",
2489        "fa-vcard-o": "far fa-address-card",
2490        "fa-viacoin": "fab fa-viacoin",
2491        "fa-viadeo": "fab fa-viadeo",
2492        "fa-viadeo-square": "fab fa-viadeo-square",
2493        "fa-video-camera": "fas fa-video",
2494        "fa-vimeo": "fab fa-vimeo-v",
2495        "fa-vimeo-square": "fab fa-vimeo-square",
2496        "fa-vine": "fab fa-vine",
2497        "fa-vk": "fab fa-vk",
2498        "fa-volume-control-phone": "fas fa-phone-volume",
2499        "fa-warning": "fas fa-exclamation-triangle",
2500        "fa-wechat": "fab fa-weixin",
2501        "fa-weibo": "fab fa-weibo",
2502        "fa-weixin": "fab fa-weixin",
2503        "fa-whatsapp": "fab fa-whatsapp",
2504        "fa-wheelchair-alt": "fab fa-accessible-icon",
2505        "fa-wikipedia-w": "fab fa-wikipedia-w",
2506        "fa-window-close-o": "far fa-window-close",
2507        "fa-window-maximize": "far fa-window-maximize",
2508        "fa-window-restore": "far fa-window-restore",
2509        "fa-windows": "fab fa-windows",
2510        "fa-won": "fas fa-won-sign",
2511        "fa-wordpress": "fab fa-wordpress",
2512        "fa-wpbeginner": "fab fa-wpbeginner",
2513        "fa-wpexplorer": "fab fa-wpexplorer",
2514        "fa-wpforms": "fab fa-wpforms",
2515        "fa-xing": "fab fa-xing",
2516        "fa-xing-square": "fab fa-xing-square",
2517        "fa-y-combinator": "fab fa-y-combinator",
2518        "fa-y-combinator-square": "fab fa-hacker-news",
2519        "fa-yahoo": "fab fa-yahoo",
2520        "fa-yc": "fab fa-y-combinator",
2521        "fa-yc-square": "fab fa-hacker-news",
2522        "fa-yelp": "fab fa-yelp",
2523        "fa-yen": "fas fa-yen-sign",
2524        "fa-yoast": "fab fa-yoast",
2525        "fa-youtube": "fab fa-youtube",
2526        "fa-youtube-play": "fab fa-youtube",
2527        "fa-youtube-square": "fab fa-youtube-square",
2528    };
2529
2530    $.each( icons, function( fa4, fa5 ) {
2531        $( '.fa.'+fa4 ).removeClass('fa').removeClass(fa4).addClass(fa5);
2532    });
2533});
2534*/

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.