PageSourceSearch

https://msuniv.ac.in/js/custom.js

js msuniv.ac.in collected 2026-09-24 09:57:43 UTC 95,047 bytes, 2,193 lines download raw bytes

1var THEMEMASCOT = {};
2
3(function($) {
4    "use strict";
5
6    /* ---------------------------------------------------------------------- */
7    /* -------------------------- Declare Variables ------------------------- */
8    /* ---------------------------------------------------------------------- */
9    var $document = $(document);
10    var $document_body = $(document.body);
11    var $window = $(window);
12    var $html = $('html');
13    var $body = $('body');
14    var $wrapper = $('#wrapper');
15    var $header = $('#header');
16    var $footer = $('#footer');
17    var $sections = $('section');
18    var $portfolio_gallery = $(".gallery-isotope");
19    var portfolio_filter = ".portfolio-filter a";
20    var $portfolio_filter_first_child = $(".portfolio-filter a:eq(0)");
21    var $portfolio_flex_slider = $(".portfolio-slider");
22
23
24    THEMEMASCOT.isMobile = {
25        Android: function() {
26            return navigator.userAgent.match(/Android/i);
27        },
28        BlackBerry: function() {
29            return navigator.userAgent.match(/BlackBerry/i);
30        },
31        iOS: function() {
32            return navigator.userAgent.match(/iPhone|iPad|iPod/i);
33        },
34        Opera: function() {
35            return navigator.userAgent.match(/Opera Mini/i);
36        },
37        Windows: function() {
38            return navigator.userAgent.match(/IEMobile/i);
39        },
40        any: function() {
41            return (THEMEMASCOT.isMobile.Android() || THEMEMASCOT.isMobile.BlackBerry() || THEMEMASCOT.isMobile.iOS() || THEMEMASCOT.isMobile.Opera() || THEMEMASCOT.isMobile.Windows());
42        }
43    };
44
45    THEMEMASCOT.isRTL = {
46        check: function() {
47            if( $( "html" ).attr("dir") == "rtl" ) {
48                return true;
49            } else {
50                return false;
51            }
52        }
53    };
54
55    THEMEMASCOT.urlParameter = {
56        get: function(sParam) {
57            var sPageURL = decodeURIComponent(window.location.search.substring(1)),
58                sURLVariables = sPageURL.split('&'),
59                sParameterName,
60                i;
61
62            for (i = 0; i < sURLVariables.length; i++) {
63                sParameterName = sURLVariables[i].split('=');
64
65                if (sParameterName[0] === sParam) {
66                    return sParameterName[1] === undefined ? true : sParameterName[1];
67                }
68            }
69        }
70    };
71
72
73    THEMEMASCOT.bmiCalculator = {
74        magic: function(bmi) {
75            var output = '';
76            var info = '';
77            if (bmi) {
78                if (bmi < 15) {
79                    info = "very severely underweight";
80                }
81                if ((bmi >= 15)&&(bmi < 16)) {
82                    info = "severely underweight";
83                }
84                if ((bmi >= 16)&&(bmi < 18.5)) {
85                    info = "underweight";
86                }
87                if ((bmi >= 18.5)&&(bmi < 25)) {
88                    info = "normal";
89                }
90                if ((bmi >= 25)&&(bmi < 30)) {
91                    info = "overweight";
92                }
93                if ((bmi >= 30)&&(bmi < 35)) {
94                    info = "moderately obese";
95                }
96                if ((bmi >= 35)&&(bmi <= 40)) {
97                    info = "severely obese";
98                }
99                if (bmi >40) {
100                    info = "very severely obese";
101                }
102                output = "Your BMI is <span>"  + bmi + "</span><br />" + 
103                                                              "You are <span>"  + info + "</span>.";
104            } else {
105                output = "You broke it!";
106            };
107            return output;
108        },
109        
110        calculateStandard: function (bmi_form) {
111            var weight_lbs = bmi_form.find('input[name="bmi_standard_weight_lbs"]').val();
112            var height_ft = bmi_form.find('input[name="bmi_standard_height_ft"]').val();
113            var height_in = bmi_form.find('input[name="bmi_standard_height_in"]').val();
114            var age = bmi_form.find('input[name="bmi_standard_age"]').val();
115            var gender = bmi_form.find('radio[name="bmi_standard_gender"]').val();
116
117            var total_height_inc = ( parseInt(height_ft, 10) * 12 ) + parseInt(height_in, 10);
118            var bmi = ( parseFloat(weight_lbs) / (total_height_inc * total_height_inc) ) * 703;
119            var output = THEMEMASCOT.bmiCalculator.magic(bmi);
120
121            bmi_form.find('#bmi_standard_calculator_form_result').html(output).fadeIn('slow');
122        },
123        
124        calculateMetric: function (bmi_form) {
125            var weight_kg = bmi_form.find('input[name="bmi_metric_weight_kg"]').val();
126            var height_cm = bmi_form.find('input[name="bmi_metric_height_cm"]').val();
127            var age = bmi_form.find('input[name="bmi_standard_age"]').val();
128            var gender = bmi_form.find('radio[name="bmi_standard_gender"]').val();
129
130            var total_weight_kg = parseFloat(weight_kg) ;
131            var total_height_m = parseFloat(height_cm) * 0.01;
132            var bmi = ( total_weight_kg / (total_height_m * total_height_m) );
133            var output = THEMEMASCOT.bmiCalculator.magic(bmi);
134
135            bmi_form.find('#bmi_metric_calculator_form_result').html(output).fadeIn('slow');
136        },
137        
138        init: function () {
139            var bmi_Standard_Form = $('#form_bmi_standard_calculator');
140            bmi_Standard_Form.on('submit', function(e) {
141                e.preventDefault();
142                THEMEMASCOT.bmiCalculator.calculateStandard(bmi_Standard_Form);
143                return false;
144            });
145
146            var bmi_Metric_Form = $('#form_bmi_metric_calculator');
147            bmi_Metric_Form.on('submit', function(e) {
148                e.preventDefault();
149                THEMEMASCOT.bmiCalculator.calculateMetric(bmi_Metric_Form);
150                return false;
151            });
152        }
153
154    };
155
156    THEMEMASCOT.initialize = {
157
158        init: function() {
159            THEMEMASCOT.bmiCalculator.init();
160            THEMEMASCOT.initialize.TM_fixedFooter();
161            THEMEMASCOT.initialize.TM_datePicker();
162            THEMEMASCOT.initialize.TM_ddslick();
163            THEMEMASCOT.initialize.TM_sliderRange();
164            THEMEMASCOT.initialize.TM_loadBSParentModal();
165            THEMEMASCOT.initialize.TM_demoSwitcher();
166            THEMEMASCOT.initialize.TM_platformDetect();
167            THEMEMASCOT.initialize.TM_onLoadPopupPromoBox();
168            THEMEMASCOT.initialize.TM_customDataAttributes();
169            THEMEMASCOT.initialize.TM_parallaxBgInit();
170            THEMEMASCOT.initialize.TM_resizeFullscreen();
171            THEMEMASCOT.initialize.TM_prettyPhoto_lightbox();
172            THEMEMASCOT.initialize.TM_nivolightbox();
173            THEMEMASCOT.initialize.TM_fitVids();
174            THEMEMASCOT.initialize.TM_YTPlayer();
175            THEMEMASCOT.initialize.TM_equalHeightDivs();
176        },
177
178        /* ---------------------------------------------------------------------- */
179        /* ------------------------------ Fixed Footer  ------------------------- */
180        /* ---------------------------------------------------------------------- */
181        TM_fixedFooter: function() {
182            var $fixed_footer = $('.fixed-footer');
183
184            if( $fixed_footer.length > 0 ){
185                $('body.has-fixed-footer .main-content').css('margin-bottom', $fixed_footer.height());
186            }
187        },
188        
189        /* ---------------------------------------------------------------------- */
190        /* ------------------------------ Date Picker  -------------------------- */
191        /* ---------------------------------------------------------------------- */
192        TM_datePicker: function() {
193            $( ".date-picker" ).datepicker();
194            $( ".time-picker" ).timepicker();
195            $( ".datetime-picker" ).datetimepicker();
196        },
197
198        /* ---------------------------------------------------------------------- */
199        /* -------------------------------- ddslick  ---------------------------- */
200        /* ---------------------------------------------------------------------- */
201        TM_ddslick: function() {
202            var $ddslick = $("select.ddslick");
203            if( $ddslick.length > 0 ) {
204                $ddslick.each(function(){
205                    var name =  $(this).attr('name');
206                    var id = $(this).attr('id');
207                    $("#"+id).ddslick({
208                        width: '100%',
209                        imagePosition: "left",
210                        onSelected: function(selectedData){
211                            $("#"+id+ " .dd-selected-value").prop ('name', name);
212                         }  
213                    });
214                });
215            }
216        },
217
218        /* ---------------------------------------------------------------------- */
219        /* ----------------------------- slider range  -------------------------- */
220        /* ---------------------------------------------------------------------- */
221        TM_sliderRange: function() {
222            var $slider_range = $(".slider-range");
223            if( $slider_range.length > 0 ) {
224                $slider_range.each(function(){
225                    var id = $(this).attr('id');
226                    var target_id = $(this).data('target');
227                    $( "#" + target_id ).slider({
228                      range: "max",
229                      min: 2001,
230                      max: 2016,
231                      value: 2010,
232                      slide: function( event, ui ) {
233                        $( "#" + id ).val( ui.value );
234                      }
235                    });
236                    $( "#" + id ).val( $( "#" + target_id ).slider( "value" ) );
237                });
238            }
239        },
240
241        /* ---------------------------------------------------------------------- */
242        /* ------------------------ Bootstrap Parent Modal  --------------------- */
243        /* ---------------------------------------------------------------------- */
244        TM_loadBSParentModal: function() {
245            var ajaxLoadContent = true;
246            if( ajaxLoadContent ) {
247                $.ajax({
248                    url: "ajax-load/bootstrap-parent-modal.html",
249                    success: function (data) { $body.append(data); },
250                    dataType: 'html'
251                });
252            }
253        },
254        /* ---------------------------------------------------------------------- */
255        /* ------------------------------ Demo Switcher  ------------------------ */
256        /* ---------------------------------------------------------------------- */
257        TM_demoSwitcher: function() {
258            var showSwitcher = true;
259            var $style_switcher = $('#style-switcher');
260            if( !$style_switcher.length && showSwitcher ) {
261                $.ajax({
262                    url: "color-switcher/style-switcher.html",
263                    success: function (data) { $body.append(data); },
264                    dataType: 'html'
265                });
266            }
267        },
268
269        /* ---------------------------------------------------------------------- */
270        /* ------------------------------ Preloader  ---------------------------- */
271        /* ---------------------------------------------------------------------- */
272        TM_preLoaderClickDisable: function() {
273            var $preloader = $('#preloader');
274            $preloader.children('#disable-preloader').on('click', function(e) {
275                $preloader.fadeOut();
276                return false;
277            });
278        },
279
280        TM_preLoaderOnLoad: function() {
281            var $preloader = $('#preloader');
282            if( $preloader.length > 0 ) {
283                $preloader.delay(200).fadeOut('slow');
284            }
285        },
286
287
288        /* ---------------------------------------------------------------------- */
289        /* ------------------------------- Platform detect  --------------------- */
290        /* ---------------------------------------------------------------------- */
291        TM_platformDetect: function() {
292            if (THEMEMASCOT.isMobile.any()) {
293                $html.addClass("mobile");
294            } else {
295                $html.addClass("no-mobile");
296            }
297        },
298
299        /* ---------------------------------------------------------------------- */
300        /* ------------------------------ Popup Promo Box  ---------------------- */
301        /* ---------------------------------------------------------------------- */
302        TM_onLoadPopupPromoBox: function() {
303            var $modal = $('.on-pageload-popup-promobox');
304            if( $modal.length > 0 ) {
305                $modal.each( function(){
306                    var $current_item       = $(this);
307                    var target              = $current_item.data('target');
308                    var timeout             = $current_item.data('timeout');
309
310                    var delay               = $current_item.data('delay');
311                    delay = ( !delay ) ? 2500 : Number(delay) + 2500;
312
313                    if( $current_item.hasClass('cookie-enabled') ) {
314                        var elementCookie = $.cookie( target );
315                        if ( !!elementCookie && elementCookie == 'enabled' ){
316                            return true;
317                        }
318                    } else {
319                        $.removeCookie( target );
320                    }
321
322                    var t_enablepopup = setTimeout(function() {
323                        $.magnificPopup.open({
324                            items: { src: target },
325                            type: 'inline',
326                            mainClass: 'mfp-no-margins mfp-fade',
327                            closeBtnInside: false,
328                            fixedContentPos: true,
329                            removalDelay: 500,
330                            callbacks: {
331                                afterClose: function() {
332                                    if( $current_item.hasClass('cookie-enabled') ) {
333                                        $.cookie( target, 'enabled' );
334                                    }
335                                }
336                            }
337                        }, 0);
338                    }, Number(delay) );
339
340                    if( timeout !== '' ) {
341                        var t_closepopup = setTimeout(function() {
342                            $.magnificPopup.close();
343                        }, Number(delay) + Number(timeout) );
344                    }
345                });
346            }
347        },
348
349        /* ---------------------------------------------------------------------- */
350        /* ------------------------------ Hash Forwarding  ---------------------- */
351        /* ---------------------------------------------------------------------- */
352        TM_hashForwarding: function() {
353            if (window.location.hash) {
354                var hash_offset = $(window.location.hash).offset().top;
355                $("html, body").animate({
356                    scrollTop: hash_offset
357                });
358            }
359        },
360
361
362        /* ---------------------------------------------------------------------- */
363        /* ----------------------- Background image, color ---------------------- */
364        /* ---------------------------------------------------------------------- */
365        TM_customDataAttributes: function() {
366            $('[data-bg-color]').each(function() {
367                $(this).css("cssText", "background: " + $(this).data("bg-color") + " !important;");
368            });
369            $('[data-bg-img]').each(function() {
370                $(this).css('background-image', 'url(' + $(this).data("bg-img") + ')');
371            });
372            $('[data-text-color]').each(function() {
373                $(this).css('color', $(this).data("text-color"));
374            });
375            $('[data-font-size]').each(function() {
376                $(this).css('font-size', $(this).data("font-size"));
377            });
378            $('[data-height]').each(function() {
379                $(this).css('height', $(this).data("height"));
380            });
381            $('[data-width]').each(function() {
382                $(this).css('width', $(this).data("width"));
383            });
384            $('[data-border]').each(function() {
385                $(this).css('border', $(this).data("border"));
386            });
387            $('[data-margin-top]').each(function() {
388                $(this).css('margin-top', $(this).data("margin-top"));
389            });
390            $('[data-margin-right]').each(function() {
391                $(this).css('margin-right', $(this).data("margin-right"));
392            });
393            $('[data-margin-bottom]').each(function() {
394                $(this).css('margin-bottom', $(this).data("margin-bottom"));
395            });
396            $('[data-margin-left]').each(function() {
397                $(this).css('margin-left', $(this).data("margin-left"));
398            });
399        },
400
401
402
403        /* ---------------------------------------------------------------------- */
404        /* -------------------------- Background Parallax ----------------------- */
405        /* ---------------------------------------------------------------------- */
406        TM_parallaxBgInit: function() {
407            if (!THEMEMASCOT.isMobile.any() && $window.width() >= 800 ) {
408                $('.parallax').each(function() {
409                    var data_parallax_ratio = ( $(this).data("parallax-ratio") === undefined ) ? '0.5': $(this).data("parallax-ratio");
410                    $(this).parallax("50%", data_parallax_ratio);
411                });
412            } else {
413                $('.parallax').addClass("mobile-parallax");
414            }
415        },
416
417        /* ---------------------------------------------------------------------- */
418        /* --------------------------- Home Resize Fullscreen ------------------- */
419        /* ---------------------------------------------------------------------- */
420        TM_resizeFullscreen: function() {
421            var windowHeight = $window.height();
422            $('.fullscreen, .revslider-fullscreen').height(windowHeight);
423        },
424
425        /* ---------------------------------------------------------------------- */
426        /* ----------------------------- Magnific Popup ------------------------- */
427        /* ---------------------------------------------------------------------- */
428        TM_magnificPopup_lightbox: function() {
429            
430            var $image_popup_lightbox = $('.image-popup-lightbox');
431            if( $image_popup_lightbox.length > 0 ) {
432                $image_popup_lightbox.magnificPopup({
433                    type: 'image',
434                    closeOnContentClick: true,
435                    closeBtnInside: false,
436                    fixedContentPos: true,
437                    mainClass: 'mfp-no-margins mfp-fade', // class to remove default margin from left and right side
438                    image: {
439                        verticalFit: true
440                    }
441                });
442            }
443
444            var $image_popup_vertical_fit = $('.image-popup-vertical-fit');
445            if( $image_popup_vertical_fit.length > 0 ) {
446                $image_popup_vertical_fit.magnificPopup({
447                    type: 'image',
448                    closeOnContentClick: true,
449                    mainClass: 'mfp-img-mobile',
450                    image: {
451                        verticalFit: true
452                    }
453                });
454            }
455
456            var $image_popup_fit_width = $('.image-popup-fit-width');
457            if( $image_popup_fit_width.length > 0 ) {
458                $image_popup_fit_width.magnificPopup({
459                    type: 'image',
460                    closeOnContentClick: true,
461                    image: {
462                        verticalFit: false
463                    }
464                });
465            }
466
467            var $image_popup_no_margins = $('.image-popup-no-margins');
468            if( $image_popup_no_margins.length > 0 ) {
469                $image_popup_no_margins.magnificPopup({
470                    type: 'image',
471                    closeOnContentClick: true,
472                    closeBtnInside: false,
473                    fixedContentPos: true,
474                    mainClass: 'mfp-no-margins mfp-with-zoom', // class to remove default margin from left and right side
475                    image: {
476                        verticalFit: true
477                    },
478                    zoom: {
479                        enabled: true,
480                        duration: 300 // don't foget to change the duration also in CSS
481                    }
482                });
483            }
484
485            var $popup_gallery = $('.popup-gallery');
486            if( $popup_gallery.length > 0 ) {
487                $popup_gallery.magnificPopup({
488                    delegate: 'a',
489                    type: 'image',
490                    tLoading: 'Loading image #%curr%...',
491                    mainClass: 'mfp-img-mobile',
492                    gallery: {
493                        enabled: true,
494                        navigateByImgClick: true,
495                        preload: [0,1] // Will preload 0 - before current, and 1 after the current image
496                    },
497                    image: {
498                        tError: '<a href="%url%">The image #%curr%</a> could not be loaded.',
499                        titleSrc: function(item) {
500                            return item.el.attr('title') + '<small>by Marsel Van Oosten</small>';
501                        }
502                    }
503                });
504            }
505
506            var $zoom_gallery = $('.zoom-gallery');
507            if( $zoom_gallery.length > 0 ) {
508                $zoom_gallery.magnificPopup({
509                    delegate: 'a',
510                    type: 'image',
511                    closeOnContentClick: false,
512                    closeBtnInside: false,
513                    mainClass: 'mfp-with-zoom mfp-img-mobile',
514                    image: {
515                        verticalFit: true,
516                        titleSrc: function(item) {
517                            return item.el.attr('title') + ' &middot; <a class="image-source-link" href="'+item.el.attr('data-source')+'" target="_blank">image source</a>';
518                        }
519                    },
520                    gallery: {
521                        enabled: true
522                    },
523                    zoom: {
524                        enabled: true,
525                        duration: 300, // don't foget to change the duration also in CSS
526                        opener: function(element) {
527                            return element.find('img');
528                        }
529                    }
530                    
531                });
532            }
533            
534            var $popup_yt_vimeo_gmap = $('.popup-youtube, .popup-vimeo, .popup-gmaps');
535            if( $popup_yt_vimeo_gmap.length > 0 ) {
536                $popup_yt_vimeo_gmap.magnificPopup({
537                    disableOn: 700,
538                    type: 'iframe',
539                    mainClass: 'mfp-fade',
540                    removalDelay: 160,
541                    preloader: false,
542
543                    fixedContentPos: false
544                });
545            }
546
547            var $popup_with_zoom_anim = $('.popup-with-zoom-anim');
548            if( $popup_with_zoom_anim.length > 0 ) {
549                $popup_with_zoom_anim.magnificPopup({
550                    type: 'inline',
551
552                    fixedContentPos: false,
553                    fixedBgPos: true,
554
555                    overflowY: 'auto',
556
557                    closeBtnInside: true,
558                    preloader: false,
559
560                    midClick: true,
561                    removalDelay: 300,
562                    mainClass: 'my-mfp-zoom-in'
563                });
564            }
565
566            var $popup_with_move_anim = $('.popup-with-move-anim');
567            if( $popup_with_move_anim.length > 0 ) {
568                $popup_with_move_anim.magnificPopup({
569                    type: 'inline',
570
571                    fixedContentPos: false,
572                    fixedBgPos: true,
573
574                    overflowY: 'auto',
575
576                    closeBtnInside: true,
577                    preloader: false,
578
579                    midClick: true,
580                    removalDelay: 300,
581                    mainClass: 'my-mfp-slide-bottom'
582                });
583            }
584            
585            var $ajaxload_popup = $('.ajaxload-popup');
586            if( $ajaxload_popup.length > 0 ) {
587                $ajaxload_popup.magnificPopup({
588                  type: 'ajax',
589                  alignTop: true,
590                  overflowY: 'scroll', // as we know that popup content is tall we set scroll overflow by default to avoid jump
591                  callbacks: {
592                    parseAjax: function(mfpResponse) {
593                      THEMEMASCOT.initialize.TM_datePicker();
594                      THEMEMASCOT.initialize.TM_sliderRange();
595                      THEMEMASCOT.initialize.TM_ddslick();
596                    }
597                  }
598                });
599            }
600
601            var $form_ajax_load = $('.form-ajax-load');
602            if( $form_ajax_load.length > 0 ) {
603                $form_ajax_load.magnificPopup({
604                  type: 'ajax'
605                });
606            }
607            
608            var $popup_with_form = $('.popup-with-form');
609            if( $popup_with_form.length > 0 ) {
610                $popup_with_form.magnificPopup({
611                    type: 'inline',
612                    preloader: false,
613                    focus: '#name',
614
615                    mainClass: 'mfp-no-margins mfp-fade',
616                    closeBtnInside: false,
617                    fixedContentPos: true,
618
619                    // When elemened is focused, some mobile browsers in some cases zoom in
620                    // It looks not nice, so we disable it:
621                    callbacks: {
622                      beforeOpen: function() {
623                        if($window.width() < 700) {
624                          this.st.focus = false;
625                        } else {
626                          this.st.focus = '#name';
627                        }
628                      }
629                    }
630                });
631            }
632
633            var $mfpLightboxAjax = $('[data-lightbox="ajax"]');
634            if( $mfpLightboxAjax.length > 0 ) {
635                $mfpLightboxAjax.magnificPopup({
636                    type: 'ajax',
637                    closeBtnInside: false,
638                    callbacks: {
639                        ajaxContentAdded: function(mfpResponse) {
640                        },
641                        open: function() {
642                        },
643                        close: function() {
644                        }
645                    }
646                });
647            }
648
649            //lightbox image
650            var $mfpLightboxImage = $('[data-lightbox="image"]');
651            if( $mfpLightboxImage.length > 0 ) {
652                $mfpLightboxImage.magnificPopup({
653                    type: 'image',
654                    closeOnContentClick: true,
655                    closeBtnInside: false,
656                    fixedContentPos: true,
657                    mainClass: 'mfp-no-margins mfp-with-zoom', // class to remove default margin from left and right side
658                    image: {
659                        verticalFit: true
660                    }
661                });
662            }
663
664            //lightbox gallery
665            var $mfpLightboxGallery = $('[data-lightbox="gallery"]');
666            if( $mfpLightboxGallery.length > 0 ) {
667                $mfpLightboxGallery.each(function() {
668                    var element = $(this);
669                    element.magnificPopup({
670                        delegate: 'a[data-lightbox="gallery-item"]',
671                        type: 'image',
672                        closeOnContentClick: true,
673                        closeBtnInside: false,
674                        fixedContentPos: true,
675                        mainClass: 'mfp-no-margins mfp-with-zoom', // class to remove default margin from left and right side
676                        image: {
677                            verticalFit: true
678                        },
679                        gallery: {
680                            enabled: true,
681                            navigateByImgClick: true,
682                            preload: [0,1] // Will preload 0 - before current, and 1 after the current image
683                        },
684                        zoom: {
685                          enabled: true,
686                          duration: 300, // don't foget to change the duration also in CSS
687                          opener: function(element) {
688                            return element.find('img');
689                          }
690                        }
691
692                    });
693                });
694            }
695
696            //lightbox iframe
697            var $mfpLightboxIframe = $('[data-lightbox="iframe"]');
698            if( $mfpLightboxIframe.length > 0 ) {
699                $mfpLightboxIframe.magnificPopup({
700                    disableOn: 600,
701                    type: 'iframe',
702                    removalDelay: 160,
703                    preloader: false,
704                    fixedContentPos: false
705                });
706            }
707
708            //lightbox inline
709            var $mfpLightboxInline = $('[data-lightbox="inline"]');
710            if( $mfpLightboxInline.length > 0 ) {
711                $mfpLightboxInline.magnificPopup({
712                    type: 'inline',
713                    mainClass: 'mfp-no-margins mfp-zoom-in',
714                    closeBtnInside: false,
715                    fixedContentPos: true
716                });
717            }
718        },
719
720        /* ---------------------------------------------------------------------- */
721        /* ----------------------------- lightbox popup ------------------------- */
722        /* ---------------------------------------------------------------------- */
723        TM_prettyPhoto_lightbox: function() {
724            //prettyPhoto lightbox
725            var $pretty_photo_lightbox = $("a[data-rel^='prettyPhoto']");
726            if( $pretty_photo_lightbox.length > 0 ) {
727                $pretty_photo_lightbox.prettyPhoto({
728                    hook: 'data-rel',
729                    animation_speed:'normal',
730                    theme:'light_square',
731                    slideshow:3000, 
732                    autoplay_slideshow: false,
733                    social_tools: false
734                });
735            }
736        },
737
738        /* ---------------------------------------------------------------------- */
739        /* ------------------------------ Nivo Lightbox ------------------------- */
740        /* ---------------------------------------------------------------------- */
741        TM_nivolightbox: function() {
742            var $nivo_lightbox = $('a[data-lightbox-gallery]');
743            if( $nivo_lightbox.length > 0 ) {
744                $nivo_lightbox.nivoLightbox({
745                    effect: 'fadeScale',
746                    afterShowLightbox: function(){
747                        var $nivo_iframe = $('.nivo-lightbox-content > iframe');
748                        if( $nivo_iframe.length > 0 ) {
749                            var src = $nivo_iframe.attr('src');
750                            $nivo_iframe.attr('src', src + '?autoplay=1');
751                        }
752                    }
753                });
754            }
755        },
756
757
758
759        /* ---------------------------------------------------------------------- */
760        /* ---------------------------- Wow initialize  ------------------------- */
761        /* ---------------------------------------------------------------------- */
762        TM_wow: function() {
763            var wow = new WOW({
764                mobile: false // trigger animations on mobile devices (default is true)
765            });
766            wow.init();
767        },
768
769        /* ---------------------------------------------------------------------- */
770        /* ----------------------------- Fit Vids ------------------------------- */
771        /* ---------------------------------------------------------------------- */
772        TM_fitVids: function() {
773            $body.fitVids();
774        },
775
776        /* ---------------------------------------------------------------------- */
777        /* ----------------------------- YT Player for Video -------------------- */
778        /* ---------------------------------------------------------------------- */
779        TM_YTPlayer: function() {
780            var $ytube_player = $(".player");
781            if( $ytube_player.length > 0 ) {
782                $ytube_player.mb_YTPlayer();
783            }
784        },
785
786        /* ---------------------------------------------------------------------- */
787        /* ---------------------------- equalHeights ---------------------------- */
788        /* ---------------------------------------------------------------------- */
789        TM_equalHeightDivs: function() {
790            /* equal heigh */
791            var $equal_height = $('.equal-height');
792            if( $equal_height.length > 0 ) {
793                $equal_height.children('div').css('min-height', 'auto');
794                $equal_height.equalHeights();
795            }
796
797            /* equal heigh inner div */
798            var $equal_height_inner = $('.equal-height-inner');
799            if( $equal_height_inner.length > 0 ) {
800                $equal_height_inner.children('div').css('min-height', 'auto');
801                $equal_height_inner.children('div').children('div').css('min-height', 'auto');
802                $equal_height_inner.equalHeights();
803                $equal_height_inner.children('div').each(function() {
804                    $(this).children('div').css('min-height', $(this).css('min-height'));
805                });
806            }
807
808            /* pricing-table equal heigh*/
809            var $equal_height_pricing_table = $('.equal-height-pricing-table');
810            if( $equal_height_pricing_table.length > 0 ) {
811                $equal_height_pricing_table.children('div').css('min-height', 'auto');
812                $equal_height_pricing_table.children('div').children('div').css('min-height', 'auto');
813                $equal_height_pricing_table.equalHeights();
814                $equal_height_pricing_table.children('div').each(function() {
815                    $(this).children('div').css('min-height', $(this).css('min-height'));
816                });
817            }
818        }
819
820    };
821
822
823    THEMEMASCOT.header = {
824
825        init: function() {
826
827            var t = setTimeout(function() {
828                THEMEMASCOT.header.TM_fullscreenMenu();
829                THEMEMASCOT.header.TM_sidePanelReveal();
830                THEMEMASCOT.header.TM_scroolToTopOnClick();
831                THEMEMASCOT.header.TM_scrollToFixed();
832                THEMEMASCOT.header.TM_topnavAnimate();
833                THEMEMASCOT.header.TM_scrolltoTarget();
834                THEMEMASCOT.header.TM_menuzord();
835                THEMEMASCOT.header.TM_navLocalScorll();
836                THEMEMASCOT.header.TM_menuCollapseOnClick();
837                THEMEMASCOT.header.TM_homeParallaxFadeEffect();
838                THEMEMASCOT.header.TM_topsearch_toggle();
839            }, 0);
840
841        },
842
843
844        /* ---------------------------------------------------------------------- */
845        /* ------------------------- menufullpage ---------------------------- */
846        /* ---------------------------------------------------------------------- */
847        TM_fullscreenMenu: function() {
848            var $menufullpage = $('.menu-full-page .fullpage-nav-toggle');
849            if( $menufullpage.length > 0 ) {
850                $menufullpage.menufullpage();
851            }
852        },
853
854
855        /* ---------------------------------------------------------------------- */
856        /* ------------------------- Side Push Panel ---------------------------- */
857        /* ---------------------------------------------------------------------- */
858        TM_sidePanelReveal: function() {
859            $('.side-panel-trigger').on('click', function(e) {
860                $body.toggleClass("side-panel-open");
861                if ( THEMEMASCOT.isMobile.any() ) {
862                    $body.toggleClass("overflow-hidden");
863                }
864                return false;
865            });
866
867            $('.has-side-panel .body-overlay').on('click', function(e) {
868                $body.toggleClass("side-panel-open");
869                return false;
870            });
871
872            //sitebar tree
873            $('.side-panel-nav .nav .tree-toggler').on('click', function(e) {
874                $(this).parent().children('ul.tree').toggle(300);
875            });
876        },
877
878        /* ---------------------------------------------------------------------- */
879        /* ------------------------------- scrollToTop  ------------------------- */
880        /* ---------------------------------------------------------------------- */
881        TM_scroolToTop: function() {
882            if ($window.scrollTop() > 600) {
883                $('.scrollToTop').fadeIn();
884            } else {
885                $('.scrollToTop').fadeOut();
886            }
887        },
888
889        TM_scroolToTopOnClick: function() {
890            $document_body.on('click', '.scrollToTop', function(e) {
891                $('html, body').animate({
892                    scrollTop: 0
893                }, 800);
894                return false;
895            });
896        },
897
898
899        /* ---------------------------------------------------------------------------- */
900        /* --------------------------- One Page Nav close on click -------------------- */
901        /* ---------------------------------------------------------------------------- */
902        TM_menuCollapseOnClick: function() {
903            $document.on('click', '.onepage-nav a', function(e) {
904                $('.showhide').trigger('click');
905                //return false;
906            });
907        },
908
909        /* ---------------------------------------------------------------------- */
910        /* ----------- Active Menu Item on Reaching Different Sections ---------- */
911        /* ---------------------------------------------------------------------- */
912        TM_activateMenuItemOnReach: function() {
913            var $onepage_nav = $('.onepage-nav');
914            var cur_pos = $window.scrollTop() + 2;
915            var nav_height = $onepage_nav.outerHeight();
916            $sections.each(function() {
917                var top = $(this).offset().top - nav_height - 80,
918                    bottom = top + $(this).outerHeight();
919
920                if (cur_pos >= top && cur_pos <= bottom) {
921                    $onepage_nav.find('a').parent().removeClass('current').removeClass('active');
922                    $sections.removeClass('current').removeClass('active');
923
924                    //$(this).addClass('current').addClass('active');
925                    $onepage_nav.find('a[href="#' + $(this).attr('id') + '"]').parent().addClass('current').addClass('active');
926                }
927            });
928        },
929
930        /* ---------------------------------------------------------------------- */
931        /* ------------------- on click scrool to target with smoothness -------- */
932        /* ---------------------------------------------------------------------- */
933        TM_scrolltoTarget: function() {
934            //jQuery for page scrolling feature - requires jQuery Easing plugin
935            $('.smooth-scroll-to-target, .fullscreen-onepage-nav a').on('click', function(e) {
936                e.preventDefault();
937
938                var $anchor = $(this);
939                
940                var $hearder_top = $('.header .header-nav');
941                var hearder_top_offset = 0;
942                if ($hearder_top[0]){
943                    hearder_top_offset = $hearder_top.outerHeight(true);
944                } else {
945                    hearder_top_offset = 0;
946                }
947
948                //for vertical nav, offset 0
949                if ($body.hasClass("vertical-nav")){
950                    hearder_top_offset = 0;
951                }
952
953                var top = $($anchor.attr('href')).offset().top - hearder_top_offset;
954                $('html, body').stop().animate({
955                    scrollTop: top
956                }, 1500, 'easeInOutExpo');
957
958            });
959        },
960
961        /* ---------------------------------------------------------------------- */
962        /* -------------------------- Scroll navigation ------------------------- */
963        /* ---------------------------------------------------------------------- */
964        TM_navLocalScorll: function() {
965            var data_offset = -60;
966            var $local_scroll = $("#menuzord .menuzord-menu, #menuzord-right .menuzord-menu");
967            if( $local_scroll.length > 0 ) {
968                $local_scroll.localScroll({
969                    target: "body",
970                    duration: 800,
971                    offset: data_offset,
972                    easing: "easeInOutExpo"
973                });
974            }
975
976            var $local_scroll_other = $("#menuzord-side-panel .menuzord-menu, #menuzord-verticalnav .menuzord-menu, #fullpage-nav");
977            if( $local_scroll_other.length > 0 ) {
978                $local_scroll_other.localScroll({
979                    target: "body",
980                    duration: 800,
981                    offset: 0,
982                    easing: "easeInOutExpo"
983                });
984            }
985        },
986
987        /* ---------------------------------------------------------------------------- */
988        /* --------------------------- collapsed menu close on click ------------------ */
989        /* ---------------------------------------------------------------------------- */
990        TM_scrollToFixed: function() {
991            $('.navbar-scrolltofixed').scrollToFixed();
992            $('.scrolltofixed').scrollToFixed({
993                marginTop: $('.header .header-nav').outerHeight(true) + 10,
994                limit: function() {
995                    var limit = $('#footer').offset().top - $(this).outerHeight(true);
996                    return limit;
997                }
998            });
999            $('#sidebar').scrollToFixed({
1000                marginTop: $('.header .header-nav').outerHeight() + 20,
1001                limit: function() {
1002                    var limit = $('#footer').offset().top - $('#sidebar').outerHeight() - 20;
1003                    return limit;
1004                }
1005            });
1006        },
1007
1008        /* ----------------------------------------------------------------------------- */
1009        /* --------------------------- Menuzord - Responsive Megamenu ------------------ */
1010        /* ----------------------------------------------------------------------------- */
1011        TM_menuzord: function() {
1012
1013            var $menuzord = $("#menuzord");
1014            if( $menuzord.length > 0 ) {
1015                $menuzord.menuzord({
1016                    align: "left",
1017                    effect: "slide",
1018                    animation: "none",
1019                    indicatorFirstLevel: "<i class='fa fa-angle-down'></i>",
1020                    indicatorSecondLevel: "<i class='fa fa-angle-right'></i>"
1021                });
1022            }
1023
1024            var $menuzord_right = $("#menuzord-right");
1025            if( $menuzord_right.length > 0 ) {
1026                $menuzord_right.menuzord({
1027                    align: "right",
1028                    effect: "slide",
1029                    animation: "none",
1030                    indicatorFirstLevel: "<i class='fa fa-angle-down'></i>",
1031                    indicatorSecondLevel: "<i class='fa fa-angle-right'></i>"
1032                });
1033            }
1034
1035            var $menuzord_side_panel = $("#menuzord-side-panel");
1036            if( $menuzord_side_panel.length > 0 ) {
1037                $menuzord_side_panel.menuzord({
1038                    align: "right",
1039                    effect: "slide",
1040                    animation: "none",
1041                    indicatorFirstLevel: "",
1042                    indicatorSecondLevel: "<i class='fa fa-angle-right'></i>"
1043                });
1044            }
1045            
1046            var $menuzord_vertical_nav = $("#menuzord-verticalnav");
1047            if( $menuzord_vertical_nav.length > 0 ) {
1048                $menuzord_vertical_nav.menuzord({
1049                    align: "right",
1050                    effect: "slide",
1051                    animation: "none",
1052                    indicatorFirstLevel: "<i class='fa fa-angle-down'></i>",
1053                    indicatorSecondLevel: "<i class='fa fa-angle-right'></i>"
1054                });
1055            }
1056
1057        },
1058
1059        /* ---------------------------------------------------------------------- */
1060        /* --------------------------- Waypoint Top Nav Sticky ------------------ */
1061        /* ---------------------------------------------------------------------- */
1062        TM_topnavAnimate: function() {
1063            if ($window.scrollTop() > (50)) {
1064                $(".navbar-sticky-animated").removeClass("animated-active");
1065            } else {
1066                $(".navbar-sticky-animated").addClass("animated-active");
1067            }
1068
1069            if ($window.scrollTop() > (50)) {
1070                $(".navbar-sticky-animated .header-nav-wrapper .container, .navbar-sticky-animated .header-nav-wrapper .container-fluid").removeClass("add-padding");
1071            } else {
1072                $(".navbar-sticky-animated .header-nav-wrapper .container, .navbar-sticky-animated .header-nav-wrapper .container-fluid").addClass("add-padding");
1073            }
1074        },
1075
1076        /* ---------------------------------------------------------------------- */
1077        /* ---------------- home section on scroll parallax & fade -------------- */
1078        /* ---------------------------------------------------------------------- */
1079        TM_homeParallaxFadeEffect: function() {
1080            if ($window.width() >= 1200) {
1081                var scrolled = $window.scrollTop();
1082                $('.content-fade-effect .home-content .home-text').css('padding-top', (scrolled * 0.0610) + '%').css('opacity', 1 - (scrolled * 0.00120));
1083            }
1084        },
1085
1086        /* ---------------------------------------------------------------------- */
1087        /* --------------------------- Top search toggle  ----------------------- */
1088        /* ---------------------------------------------------------------------- */
1089        TM_topsearch_toggle: function() {
1090            $document_body.on('click', '#top-search-toggle', function(e) {
1091                e.preventDefault();
1092                $('.search-form-wrapper.toggle').toggleClass('active');
1093                return false;
1094            });
1095        }
1096
1097    };
1098
1099    THEMEMASCOT.widget = {
1100
1101        init: function() {
1102
1103            var t = setTimeout(function() {
1104                THEMEMASCOT.widget.TM_shopClickEvents();
1105                THEMEMASCOT.widget.TM_fcCalender();
1106                THEMEMASCOT.widget.TM_verticalTimeline();
1107                THEMEMASCOT.widget.TM_verticalMasonryTimeline();
1108                THEMEMASCOT.widget.TM_masonryIsotop();
1109                THEMEMASCOT.widget.TM_pieChart();
1110                THEMEMASCOT.widget.TM_progressBar();
1111                THEMEMASCOT.widget.TM_funfact();
1112                THEMEMASCOT.widget.TM_instagramFeed();
1113                THEMEMASCOT.widget.TM_jflickrfeed();
1114                THEMEMASCOT.widget.TM_accordion_toggles();
1115                THEMEMASCOT.widget.TM_tooltip();
1116                //THEMEMASCOT.widget.TM_countDownTimer();
1117            }, 0);
1118
1119        },
1120
1121        /* ---------------------------------------------------------------------- */
1122        /* ------------------------------ Shop Plus Minus ----------------------- */
1123        /* ---------------------------------------------------------------------- */
1124        TM_shopClickEvents: function() {
1125            $document_body.on('click', '.quantity .plus', function(e) {
1126                var currentVal = parseInt($(this).parent().children(".qty").val(), 10);
1127                if (!isNaN(currentVal)) {
1128                    $(this).parent().children(".qty").val(currentVal + 1);
1129                }
1130                return false;
1131            });
1132
1133            $document_body.on('click', '.quantity .minus', function(e) {
1134                var currentVal = parseInt($(this).parent().children(".qty").val(), 10);
1135                if (!isNaN(currentVal) && currentVal > 0) {
1136                    $(this).parent().children(".qty").val(currentVal - 1);
1137                }
1138                return false;
1139            });
1140
1141            $document_body.on('click', '#checkbox-ship-to-different-address', function(e) {
1142                $("#checkout-shipping-address").toggle(this.checked);
1143            });
1144        },
1145
1146
1147        /* ---------------------------------------------------------------------- */
1148        /* ------------------------------ Event Calendar ------------------------ */
1149        /* ---------------------------------------------------------------------- */
1150        TM_fcCalender: function() {
1151            if (typeof calendarEvents !== "undefined" ) {
1152                var $full_event_calendar = $('#full-event-calendar');
1153                if( $full_event_calendar.length > 0 ) {
1154                    $full_event_calendar.fullCalendar({
1155                        header: {
1156                            left: 'prev,next today',
1157                            center: 'title',
1158                            right: 'month,agendaWeek,agendaDay'
1159                        },
1160                        defaultDate: '2018-01-12',
1161                        selectable: true,
1162                        selectHelper: true,
1163                        select: function(start, end) {
1164                            var title = prompt('Event Title:');
1165                            var eventData;
1166                            if (title) {
1167                                eventData = {
1168                                    title: title,
1169                                    start: start,
1170                                    end: end
1171                                };
1172                                $('#calendar').fullCalendar('renderEvent', eventData, true); // stick? = true
1173                            }
1174                            $('#calendar').fullCalendar('unselect');
1175                        },
1176                        editable: true,
1177                        eventLimit: true, // allow "more" link when too many events
1178                        events: calendarEvents
1179                    });
1180                }
1181            }
1182        },
1183
1184        /* ---------------------------------------------------------------------- */
1185        /* ------------------------------ Timeline Block ------------------------ */
1186        /* ---------------------------------------------------------------------- */
1187        TM_verticalTimeline: function() {
1188            var timelineBlocks = $('.cd-timeline-block'),
1189              offset = 0.8;
1190
1191            if( timelineBlocks.length > 0 ) {
1192                //hide timeline blocks which are outside the viewport
1193                hideBlocks(timelineBlocks, offset);
1194                //on scolling, show/animate timeline blocks when enter the viewport
1195                $window.on('scroll', function(){
1196                  (!window.requestAnimationFrame)  ? setTimeout(function(){ showBlocks(timelineBlocks, offset); }, 100) : window.requestAnimationFrame(function(){ showBlocks(timelineBlocks, offset); });
1197                });
1198            }
1199
1200            function hideBlocks(blocks, offset) {
1201              blocks.each(function(){
1202                ( $(this).offset().top > $window.scrollTop()+$window.height()*offset ) && $(this).find('.cd-timeline-img, .cd-timeline-content').addClass('is-hidden');
1203              });
1204            }
1205
1206            function showBlocks(blocks, offset) {
1207              blocks.each(function(){
1208                ( $(this).offset().top <= $window.scrollTop()+$window.height()*offset && $(this).find('.cd-timeline-img').hasClass('is-hidden') ) && $(this).find('.cd-timeline-img, .cd-timeline-content').removeClass('is-hidden').addClass('bounce-in');
1209              });
1210            }
1211        },
1212
1213        /* ---------------------------------------------------------------------- */
1214        /* ----------------------- Vertical Masonry Timeline -------------------- */
1215        /* ---------------------------------------------------------------------- */
1216        TM_verticalMasonryTimeline: function() {
1217            var $masonry_timeline = $('.vertical-masonry-timeline');
1218            if( $masonry_timeline.length > 0 ) {
1219                $masonry_timeline.isotope({
1220                    itemSelector : '.each-masonry-item',
1221                    sortBy: 'original-order',
1222                    layoutMode: 'masonry',
1223                    resizable: false
1224                });
1225            }
1226
1227            //=====> Timeline Positions
1228            function  timeline_on_left_and_right(){
1229                $masonry_timeline.children('.each-masonry-item').each(function(index, element) {
1230                    var last_child = $(this);
1231                    var prev_last  = $(this).prev();
1232                    var last_child_offset = parseInt(last_child.css('top'), 10);
1233                    var prev_last_offset  = parseInt(prev_last.css('top'), 10);
1234                    var offset_icon       = last_child_offset - prev_last_offset;
1235                    
1236                    var go_top_to = 0;
1237                    if(offset_icon){
1238                        if ( offset_icon <= 87 ){
1239                            go_top_to = 87 - offset_icon;
1240                            last_child.find('.timeline-post-format').animate({
1241                                top: go_top_to
1242                            }, 300);
1243                        }
1244                    }
1245                    
1246                    if( $(this).position().left === 0 ){
1247                        $(this).removeClass('item-right');
1248                        $(this).addClass('item-left');
1249                    }else{
1250                        $(this).removeClass('item-left');
1251                        $(this).addClass('item-right');
1252                    }
1253                });
1254            }
1255
1256            if( $masonry_timeline.length > 0 ) {
1257                timeline_on_left_and_right();
1258                
1259                $window.resize(function() {
1260                    timeline_on_left_and_right();
1261                });
1262            }
1263        },
1264
1265        /* ---------------------------------------------------------------------- */
1266        /* ----------------------------- Masonry Isotope ------------------------ */
1267        /* ---------------------------------------------------------------------- */
1268        TM_masonryIsotop: function() {
1269            var isotope_mode;
1270            if ($portfolio_gallery.hasClass("masonry")){
1271                isotope_mode = "masonry";
1272            } else{
1273                isotope_mode = "fitRows";
1274            }
1275
1276            //isotope firsttime loading
1277            if( $portfolio_gallery.length > 0 ) {
1278                $portfolio_gallery.imagesLoaded(function(){
1279                    $portfolio_gallery.isotope({
1280                        itemSelector: '.gallery-item',
1281                        layoutMode: isotope_mode,
1282                        filter: "*"
1283                    });
1284                });
1285            }
1286            
1287            //isotope filter
1288            $document_body.on('click', portfolio_filter, function(e) {
1289                $(portfolio_filter).removeClass("active");
1290                $(this).addClass("active");
1291                var fselector = $(this).data('filter');
1292
1293                $portfolio_gallery.isotope({
1294                    itemSelector: '.gallery-item',
1295                    layoutMode: isotope_mode,
1296                    filter: fselector
1297                });
1298                return false;
1299            });
1300            
1301            THEMEMASCOT.slider.TM_flexslider();
1302
1303        },
1304
1305        TM_portfolioFlexSliderGalleryPopUpInit: function() {
1306            var $flexSliders = $portfolio_gallery.find('.slides');
1307            if( $flexSliders.length > 0 ) {
1308                $flexSliders.each(function () {
1309                    var _items = $(this).find("li > a");
1310                    var items = [];
1311                    for (var i = 0; i < _items.length; i++) {
1312                        items.push({src: $(_items[i]).attr("href"), title: $(_items[i]).attr("title")});
1313                    }
1314                    $(this).parent().parent().parent().find(".icons-holder").magnificPopup({
1315                        items: items,
1316                        type: 'image',
1317                        gallery: {
1318                            enabled: true
1319                        }
1320                    });
1321                });
1322            }
1323        },
1324
1325        TM_isotopeGridRearrange: function() {
1326            var isotope_mode;
1327            if ($portfolio_gallery.hasClass("masonry")){
1328                isotope_mode = "masonry";
1329            } else{
1330                isotope_mode = "fitRows";
1331            }
1332            $portfolio_gallery.isotope({
1333                itemSelector: '.gallery-item',
1334                layoutMode: isotope_mode
1335            });
1336        },
1337
1338        TM_isotopeGridShuffle: function() {
1339            $portfolio_gallery.isotope('shuffle');
1340        },
1341
1342        /* ---------------------------------------------------------------------- */
1343        /* ----------------------------- CountDown ------------------------------ */
1344        /* ---------------------------------------------------------------------- */
1345        TM_countDownTimer: function() {
1346            var $clock = $('#clock-count-down');
1347            var endingdate = $clock.data("endingdate");
1348            if( $clock.length > 0 ) {
1349                $clock.countdown(endingdate, function(event) {
1350                    var countdown_text = '' +
1351                        '<ul class="countdown-timer">' +
1352                        '<li>%D <span>Days</span></li>' +
1353                        '<li>%H <span>Hours</span></li>' +
1354                        '<li>%M <span>Minutes</span></li>' +
1355                        '<li>%S <span>Seconds</span></li>' +
1356                        '</ul>';
1357                    $(this).html(event.strftime(countdown_text));
1358                });
1359            }
1360        },
1361
1362        
1363        /* ---------------------------------------------------------------------- */
1364        /* ----------------------- pie chart / circle skill bar ----------------- */
1365        /* ---------------------------------------------------------------------- */
1366        TM_pieChart: function() {
1367            var $piechart = $('.piechart');
1368            if( $piechart.length > 0 ) {
1369                $piechart.appear();
1370                $document_body.on('appear', '.piechart', function() {
1371                    var current_item = $(this);
1372                    if (!current_item.hasClass('appeared')) {
1373                        var barcolor = current_item.data('barcolor');
1374                        var trackcolor = current_item.data('trackcolor');
1375                        var linewidth = current_item.data('linewidth');
1376                        var boxwidth = current_item.data('boxwidth');
1377                        current_item.css("width", boxwidth);
1378                        current_item.easyPieChart({
1379                            animate: 3000,
1380                            barColor: barcolor,
1381                            trackColor: trackcolor,
1382                            easing: 'easeOutBounce',
1383                            lineWidth: linewidth,
1384                            size: boxwidth,
1385                            lineCap: 'square',
1386                            scaleColor: false,
1387                            onStep: function(from, to, percent) {
1388                                $(this.el).find('span').text(Math.round(percent));
1389                            }
1390                        });
1391                        current_item.addClass('appeared');
1392                    }
1393                });
1394            }
1395        },
1396        
1397        /* ---------------------------------------------------------------------- */
1398        /* ------------------- progress bar / horizontal skill bar -------------- */
1399        /* ---------------------------------------------------------------------- */
1400        TM_progressBar: function() {
1401            var $progress_bar = $('.progress-bar');
1402            if( $progress_bar.length > 0 ) {
1403                $progress_bar.appear();
1404                $document_body.on('appear', '.progress-bar', function() {
1405                    var current_item = $(this);
1406                    if (!current_item.hasClass('appeared')) {
1407                        var percent = current_item.data('percent');
1408                        var barcolor = current_item.data('barcolor');
1409                        current_item.append('<span class="percent">' + percent + '%' + '</span>').css('background-color', barcolor).css('width', percent + '%').addClass('appeared');
1410                    }
1411                    
1412                });
1413            }
1414        },
1415
1416        /* ---------------------------------------------------------------------- */
1417        /* ------------------------ Funfact Number Counter ---------------------- */
1418        /* ---------------------------------------------------------------------- */
1419        TM_funfact: function() {
1420            var $animate_number = $('.animate-number');
1421            if( $animate_number.length > 0 ) {
1422                $animate_number.appear();
1423                $document_body.on('appear', '.animate-number', function() {
1424                    $animate_number.each(function() {
1425                        var current_item = $(this);
1426                        if (!current_item.hasClass('appeared')) {
1427                            current_item.animateNumbers(current_item.attr("data-value"), true, parseInt(current_item.attr("data-animation-duration"), 10)).addClass('appeared');
1428                        }
1429                    });
1430                });
1431            }
1432        },
1433
1434        /* ---------------------------------------------------------------------- */
1435        /* ----------------------------- Instagram Feed ---------------------------- */
1436        /* ---------------------------------------------------------------------- */
1437        TM_instagramFeed: function() {
1438            var $instagram_feed = $('.instagram-feed');
1439            if( $instagram_feed.length > 0 ) {
1440                $instagram_feed.each(function() {
1441                    var current_div = $(this);
1442                    var instagramFeed = new Instafeed({
1443                        target: current_div.attr('id'),
1444                        get: 'user',
1445                        userId: current_div.data('userid'),
1446                        accessToken: current_div.data('accesstoken'),
1447                        resolution: current_div.data('resolution'),
1448                        limit: current_div.data('limit'),
1449                        template: '<div class="item"><figure><img src="{{image}}" /><a href="{{link}}" class="link-out" target="_blank"><i class="fa fa-link"></i></a></figure></div>',
1450                        after: function() {
1451                        }
1452                    });
1453                    instagramFeed.run();
1454                });
1455            }
1456
1457            var $instagram_feed_carousel = $('.instagram-feed-carousel');
1458            if( $instagram_feed_carousel.length > 0 ) {
1459                $instagram_feed_carousel.each(function() {
1460                    var current_div = $(this);
1461                    var instagramFeed = new Instafeed({
1462                        target: current_div.attr('id'),
1463                        get: 'user',
1464                        userId: current_div.data('userid'),
1465                        accessToken: current_div.data('accesstoken'),
1466                        resolution: current_div.data('resolution'),
1467                        limit: current_div.data('limit'),
1468                        template: '<div class="item"><figure><img src="{{image}}" /><a href="{{link}}" class="link-out" target="_blank"><i class="fa fa-link"></i></a></figure></div>',
1469                        after: function() {
1470                            current_div.owlCarousel({
1471                                rtl: THEMEMASCOT.isRTL.check(),
1472                                autoplay: true,
1473                                autoplayTimeout: 4000,
1474                                loop: true,
1475                                margin: 15,
1476                                dots: true,
1477                                nav: false,
1478                                responsive: {
1479                                    0: {
1480                                        items: 2
1481                                    },
1482                                    768: {
1483                                        items: 4
1484                                    },
1485                                    1000: {
1486                                        items: 5
1487                                    }
1488                                }
1489                            });
1490                        }
1491                    });
1492                    instagramFeed.run();
1493                });
1494            }
1495        },
1496
1497        /* ---------------------------------------------------------------------- */
1498        /* ---------------------------- Flickr Feed ----------------------------- */
1499        /* ---------------------------------------------------------------------- */
1500        TM_jflickrfeed: function() {
1501            var $jflickrfeed = $(".flickr-widget .flickr-feed, .jflickrfeed");
1502            if( $jflickrfeed.length > 0 ) {
1503                $jflickrfeed.each(function() {
1504                    var current_div = $(this);
1505                    current_div.jflickrfeed({
1506                        limit: 9,
1507                        qstrings: {
1508                            id: current_div.data('userid')
1509                        },
1510                        itemTemplate: '<a href="{{link}}" title="{{title}}" target="_blank"><img src="{{image_m}}" alt="{{title}}">  </a>'
1511                    });
1512                });
1513            }
1514        },
1515
1516        /* ---------------------------------------------------------------------- */
1517        /* ------------------------- accordion & toggles ------------------------ */
1518        /* ---------------------------------------------------------------------- */
1519        TM_accordion_toggles: function() {
1520            var $panel_group_collapse = $('.panel-group .collapse');
1521            $panel_group_collapse.on("show.bs.collapse", function(e) {
1522                $(this).closest(".panel-group").find("[href='#" + $(this).attr("id") + "']").addClass("active");
1523            });
1524            $panel_group_collapse.on("hide.bs.collapse", function(e) {
1525                $(this).closest(".panel-group").find("[href='#" + $(this).attr("id") + "']").removeClass("active");
1526            });
1527        },
1528
1529        /* ---------------------------------------------------------------------- */
1530        /* ------------------------------- tooltip  ----------------------------- */
1531        /* ---------------------------------------------------------------------- */
1532        TM_tooltip: function() {
1533            var $tooltip = $('[data-toggle="tooltip"]');
1534            if( $tooltip.length > 0 ) {
1535                $tooltip.tooltip();
1536            }
1537        },
1538
1539        /* ---------------------------------------------------------------------- */
1540        /* ---------------------------- Twitter Feed  --------------------------- */
1541        /* ---------------------------------------------------------------------- */
1542        TM_twittie: function() {
1543            var $twitter_feed = $('.twitter-feed');
1544            var $twitter_feed_carousel = $('.twitter-feed-carousel');
1545            
1546            if( $twitter_feed.length > 0 ) {
1547                $twitter_feed.twittie({
1548                    username: $twitter_feed.data('username'),
1549                    dateFormat: '%b. %d, %Y',
1550                    template: '{{tweet}} <div class="date">{{date}}</div>',
1551                    count: ( $twitter_feed.data("count") === undefined ) ? 4: $twitter_feed.data("count"),
1552                    loadingText: 'Loading!'
1553                });
1554            }
1555
1556            if( $twitter_feed_carousel.length > 0 ) {
1557                $twitter_feed_carousel.twittie({
1558                    username: $twitter_feed_carousel.data('username'),
1559                    dateFormat: '%b. %d, %Y',
1560                    template: '{{tweet}} <div class="date">{{date}}</div>',
1561                    count: ( $twitter_feed_carousel.data("count") === undefined ) ? 4: $twitter_feed_carousel.data("count"),
1562                    loadingText: 'Loading!'
1563                }, function() {
1564                    $twitter_feed_carousel.find('ul').owlCarousel({
1565                        rtl: THEMEMASCOT.isRTL.check(),
1566                        autoplay: true,
1567                        autoplayTimeout: 2000,
1568                        loop: true,
1569                        items: 1,
1570                        dots: true,
1571                        nav: false
1572                    });
1573                });
1574            }
1575        }
1576    };
1577
1578    THEMEMASCOT.slider = {
1579
1580        init: function() {
1581
1582            var t = setTimeout(function() {
1583                THEMEMASCOT.slider.TM_typedAnimation();
1584                THEMEMASCOT.slider.TM_flexslider();
1585                THEMEMASCOT.slider.TM_owlCarousel();
1586                THEMEMASCOT.slider.TM_maximageSlider();
1587                THEMEMASCOT.slider.TM_bxslider();
1588            }, 0);
1589
1590        },
1591
1592
1593        /* ---------------------------------------------------------------------- */
1594        /* -------------------------- Typed Text Carousel  ---------------------- */
1595        /* ---------------------------------------------------------------------- */
1596        TM_typedAnimation: function() {
1597            var $typed_text_carousel = $('.typed-text-carousel');
1598            if ( $typed_text_carousel.length > 0 ) {
1599                $typed_text_carousel.each(function() {
1600                    var string_1 = $(this).find('span:first-child').text();
1601                    var string_2 = $(this).find('span:nth-child(2)').text();
1602                    var string_3 = $(this).find('span:nth-child(3)').text();
1603                    var str = '';
1604                    var $this = $(this);
1605                    if (!string_2.trim() || !string_3.trim()) {
1606                        str = [string_1];
1607                    }
1608                    if (!string_3.trim() && string_2.length) {
1609                        str = [string_1, string_2];
1610                    }
1611                    if (string_1.length && string_2.length && string_3.length) {
1612                        str = [string_1, string_2, string_3];
1613                    }
1614                    var speed = $(this).data('speed');
1615                    var back_delay = $(this).data('back_delay');
1616                    var loop = $(this).data('loop');
1617                    $(this).typed({
1618                        strings: str,
1619                        typeSpeed: speed,
1620                        backSpeed: 0,
1621                        backDelay: back_delay,
1622                        cursorChar: "|",
1623                        loop: loop,
1624                        contentType: 'text',
1625                        loopCount: false
1626                    });
1627                });
1628            }
1629        },
1630
1631
1632        /* ---------------------------------------------------------------------- */
1633        /* -------------------------------- flexslider  ------------------------- */
1634        /* ---------------------------------------------------------------------- */
1635        TM_flexslider: function() {
1636            var $each_flex_slider = $('.flexslider-wrapper').find('.flexslider');
1637            if ( $each_flex_slider.length > 0 ) {
1638                THEMEMASCOT.widget.TM_portfolioFlexSliderGalleryPopUpInit();
1639                $each_flex_slider.each(function() {
1640                    var $flex_slider = $(this);
1641                    var data_direction = ( $flex_slider.parent().data("direction") === undefined ) ? 'horizontal': $flex_slider.parent().data("direction");
1642                    var data_controlNav = ( $flex_slider.parent().data("c
1642ontrolnav") === undefined ) ? true: $flex_slider.parent().data("controlnav");
1643                    var data_directionnav = ( $flex_slider.parent().data("directionnav") === undefined ) ? true: $flex_slider.parent().data("directionnav");
1644                    $flex_slider.flexslider({
1645                        rtl: THEMEMASCOT.isRTL.check(),
1646                        selector: ".slides > li",
1647                        animation: "slide",
1648                        easing: "swing",
1649                        direction: data_direction,
1650                        slideshow: true,
1651                        slideshowSpeed: 7000,
1652                        animationSpeed: 600,
1653                        pauseOnHover: false,
1654                        controlNav: data_controlNav,
1655                        directionNav: data_directionnav,
1656                        start: function(slider){
1657                            imagesLoaded($portfolio_gallery, function(){
1658                                setTimeout(function(){
1659                                    $portfolio_filter_first_child.trigger("click");
1660                                },500);
1661                            });
1662                            THEMEMASCOT.initialize.TM_magnificPopup_lightbox();
1663                            THEMEMASCOT.initialize.TM_prettyPhoto_lightbox();
1664                            THEMEMASCOT.initialize.TM_nivolightbox();
1665                        },
1666                        after: function(){
1667                        }
1668                    });
1669                });
1670            }
1671        },
1672
1673        /* ---------------------------------------------------------------------- */
1674        /* -------------------------------- Owl Carousel  ----------------------- */
1675        /* ---------------------------------------------------------------------- */
1676        TM_owlCarousel: function() {
1677            var $owl_carousel_1col = $('.owl-carousel-1col, .text-carousel, .image-carousel, .fullwidth-carousel');
1678            if ( $owl_carousel_1col.length > 0 ) {
1679                $owl_carousel_1col.each(function() {
1680                    var data_dots = ( $(this).data("dots") === undefined ) ? false: $(this).data("dots");
1681                    var data_nav = ( $(this).data("nav") === undefined ) ? false: $(this).data("nav");
1682                    var data_duration = ( $(this).data("duration") === undefined ) ? 4000: $(this).data("duration");
1683                    $(this).owlCarousel({
1684                        rtl: THEMEMASCOT.isRTL.check(),
1685                        autoplay: true,
1686                        autoplayTimeout: data_duration,
1687                        loop: true,
1688                        items: 1,
1689                        dots: data_dots,
1690                        nav: data_nav,
1691                        navText: [
1692                            '<i class="pe-7s-angle-left"></i>',
1693                            '<i class="pe-7s-angle-right"></i>'
1694                        ]
1695                    });
1696                });
1697            }
1698
1699            var $owl_carousel_2col = $('.owl-carousel-2col');
1700            if ( $owl_carousel_2col.length > 0 ) {
1701                $owl_carousel_2col.each(function() {
1702                    var data_dots = ( $(this).data("dots") === undefined ) ? false: $(this).data("dots");
1703                    var data_nav = ( $(this).data("nav")=== undefined ) ? false: $(this).data("nav");
1704                    var data_duration = ( $(this).data("duration") === undefined ) ? 4000: $(this).data("duration");
1705                    $(this).owlCarousel({
1706                        rtl: THEMEMASCOT.isRTL.check(),
1707                        autoplay: true,
1708                        autoplayTimeout: data_duration,
1709                        loop: true,
1710                        items: 2,
1711                        margin: 15,
1712                        dots: data_dots,
1713                        nav: data_nav,
1714                        navText: [
1715                            '<i class="pe-7s-angle-left"></i>',
1716                            '<i class="pe-7s-angle-right"></i>'
1717                        ],
1718                        responsive: {
1719                            0: {
1720                                items: 1,
1721                                center: false
1722                            },
1723                            480: {
1724                                items: 1,
1725                                center: false
1726                            },
1727                            600: {
1728                                items: 1,
1729                                center: false
1730                            },
1731                            750: {
1732                                items: 2,
1733                                center: false
1734                            },
1735                            960: {
1736                                items: 2
1737                            },
1738                            1170: {
1739                                items: 2
1740                            },
1741                            1300: {
1742                                items: 2
1743                            }
1744                        }
1745                    });
1746                });
1747            }
1748
1749            var $owl_carousel_3col = $('.owl-carousel-3col');
1750            if ( $owl_carousel_3col.length > 0 ) {
1751                $owl_carousel_3col.each(function() {
1752                    var data_dots = ( $(this).data("dots") === undefined ) ? false: $(this).data("dots");
1753                    var data_nav = ( $(this).data("nav")=== undefined ) ? false: $(this).data("nav");
1754                    var data_duration = ( $(this).data("duration") === undefined ) ? 4000: $(this).data("duration");
1755                    $(this).owlCarousel({
1756                        rtl: THEMEMASCOT.isRTL.check(),
1757                        autoplay: true,
1758                        autoplayTimeout: data_duration,
1759                        loop: true,
1760                        items: 3,
1761                        margin: 15,
1762                        dots: data_dots,
1763                        nav: data_nav,
1764                        navText: [
1765                            '<i class="pe-7s-angle-left"></i>',
1766                            '<i class="pe-7s-angle-right"></i>'
1767                        ],
1768                        responsive: {
1769                            0: {
1770                                items: 1,
1771                                center: false
1772                            },
1773                            480: {
1774                                items: 1,
1775                                center: false
1776                            },
1777                            600: {
1778                                items: 1,
1779                                center: false
1780                            },
1781                            750: {
1782                                items: 2,
1783                                center: false
1784                            },
1785                            960: {
1786                                items: 2
1787                            },
1788                            1170: {
1789                                items: 3
1790                            },
1791                            1300: {
1792                                items: 3
1793                            }
1794                        }
1795                    });
1796                });
1797            }
1798            
1799
1800            var $owl_carousel_4col = $('.owl-carousel-4col');
1801            if ( $owl_carousel_4col.length > 0 ) {
1802                $owl_carousel_4col.each(function() {
1803                    var data_dots = ( $(this).data("dots") === undefined ) ? false: $(this).data("dots");
1804                    var data_nav = ( $(this).data("nav")=== undefined ) ? false: $(this).data("nav");
1805                    var data_duration = ( $(this).data("duration") === undefined ) ? 4000: $(this).data("duration");
1806                    $(this).owlCarousel({
1807                        rtl: THEMEMASCOT.isRTL.check(),
1808                        autoplay: true,
1809                        autoplayTimeout: data_duration,
1810                        loop: true,
1811                        items: 4,
1812                        margin: 15,
1813                        dots: data_dots,
1814                        nav: data_nav,
1815                        navText: [
1816                            '<i class="pe-7s-angle-left"></i>',
1817                            '<i class="pe-7s-angle-right"></i>'
1818                        ],
1819                        responsive: {
1820                            0: {
1821                                items: 1,
1822                                center: true
1823                            },
1824                            480: {
1825                                items: 1,
1826                                center: false
1827                            },
1828                            600: {
1829                                items: 3,
1830                                center: false
1831                            },
1832                            750: {
1833                                items: 3,
1834                                center: false
1835                            },
1836                            960: {
1837                                items: 3
1838                            },
1839                            1170: {
1840                                items: 4
1841                            },
1842                            1300: {
1843                                items: 4
1844                            }
1845                        }
1846                    });
1847                });
1848            }
1849
1850            var $owl_carousel_5col = $('.owl-carousel-5col');
1851            if ( $owl_carousel_5col.length > 0 ) {
1852                $owl_carousel_5col.each(function() {
1853                    var data_dots = ( $(this).data("dots") === undefined ) ? false: $(this).data("dots");
1854                    var data_nav = ( $(this).data("nav")=== undefined ) ? false: $(this).data("nav");
1855                    var data_duration = ( $(this).data("duration") === undefined ) ? 4000: $(this).data("duration");
1856                    $(this).owlCarousel({
1857                        rtl: THEMEMASCOT.isRTL.check(),
1858                        autoplay: true,
1859                        autoplayTimeout: data_duration,
1860                        loop: true,
1861                        items: 5,
1862                        margin: 15,
1863                        dots: data_dots,
1864                        nav: data_nav,
1865                        navText: [
1866                            '<i class="pe-7s-angle-left"></i>',
1867                            '<i class="pe-7s-angle-right"></i>'
1868                        ],
1869                        responsive: {
1870                            0: {
1871                                items: 1,
1872                                center: false
1873                            },
1874                            480: {
1875                                items: 1,
1876                                center: false
1877                            },
1878                            600: {
1879                                items: 2,
1880                                center: false
1881                            },
1882                            750: {
1883                                items: 3,
1884                                center: false
1885                            },
1886                            960: {
1887                                items: 4
1888                            },
1889                            1170: {
1890                                items: 5
1891                            },
1892                            1300: {
1893                                items: 5
1894                            }
1895                        }
1896                    });
1897                });
1898            }
1899
1900            var $owl_carousel_6col = $('.owl-carousel-6col');
1901            if ( $owl_carousel_6col.length > 0 ) {
1902                $owl_carousel_6col.each(function() {
1903                    var data_dots = ( $(this).data("dots") === undefined ) ? false: $(this).data("dots");
1904                    var data_nav = ( $(this).data("nav")=== undefined ) ? false: $(this).data("nav");
1905                    var data_duration = ( $(this).data("duration") === undefined ) ? 4000: $(this).data("duration");
1906                    $(this).owlCarousel({
1907                        rtl: THEMEMASCOT.isRTL.check(),
1908                        autoplay: true,
1909                        autoplayTimeout: data_duration,
1910                        loop: true,
1911                        items: 6,
1912                        margin: 15,
1913                        dots: data_dots,
1914                        nav: data_nav,
1915                        navText: [
1916                            '<i class="pe-7s-angle-left"></i>',
1917                            '<i class="pe-7s-angle-right"></i>'
1918                        ],
1919                        responsive: {
1920                            0: {
1921                                items: 1,
1922                                center: false
1923                            },
1924                            480: {
1925                                items: 1,
1926                                center: false
1927                            },
1928                            600: {
1929                                items: 2,
1930                                center: false
1931                            },
1932                            750: {
1933                                items: 3,
1934                                center: false
1935                            },
1936                            960: {
1937                                items: 4
1938                            },
1939                            1170: {
1940                                items: 6
1941                            },
1942                            1300: {
1943                                items: 6
1944                            }
1945                        }
1946                    });
1947                });
1948            }
1949
1950            var $owl_carousel_7col = $('.owl-carousel-7col');
1951            if ( $owl_carousel_7col.length > 0 ) {
1952                $owl_carousel_7col.each(function() {
1953                    var data_dots = ( $(this).data("dots") === undefined ) ? false: $(this).data("dots");
1954                    var data_nav = ( $(this).data("nav")=== undefined ) ? false: $(this).data("nav");
1955                    var data_duration = ( $(this).data("duration") === undefined ) ? 4000: $(this).data("duration");
1956                    $(this).owlCarousel({
1957                        rtl: THEMEMASCOT.isRTL.check(),
1958                        autoplay: true,
1959                        autoplayTimeout: data_duration,
1960                        loop: true,
1961                        items: 7,
1962                        margin: 15,
1963                        dots: data_dots,
1964                        nav: data_nav,
1965                        navText: [
1966                            '<i class="pe-7s-angle-left"></i>',
1967                            '<i class="pe-7s-angle-right"></i>'
1968                        ],
1969                        responsive: {
1970                            0: {
1971                                items: 1,
1972                                center: false
1973                            },
1974                            600: {
1975                                items: 2,
1976                                center: false
1977                            },
1978                            750: {
1979                                items: 3,
1980                                center: false
1981                            },
1982                            960: {
1983                                items: 4
1984                            },
1985                            1170: {
1986                                items: 7
1987                            },
1988                            1300: {
1989                                items: 7
1990                            }
1991                        }
1992                    });
1993                });
1994            }
1995
1996            var $owl_carousel_8col = $('.owl-carousel-8col');
1997            if ( $owl_carousel_8col.length > 0 ) {
1998                $owl_carousel_8col.each(function() {
1999                    var data_dots = ( $(this).data("dots") === undefined ) ? false: $(this).data("dots");
2000                    var data_nav = ( $(this).data("nav")=== undefined ) ? false: $(this).data("nav");
2001                    var data_duration = ( $(this).data("duration") === undefined ) ? 4000: $(this).data("duration");
2002                    $(this).owlCarousel({
2003                        rtl: THEMEMASCOT.isRTL.check(),
2004                        autoplay: true,
2005                        autoplayTimeout: data_duration,
2006                        loop: true,
2007                        items: 8,
2008                        margin: 15,
2009                        dots: data_dots,
2010       
2010                 nav: data_nav,
2011                        navText: [
2012                            '<i class="pe-7s-angle-left"></i>',
2013                            '<i class="pe-7s-angle-right"></i>'
2014                        ],
2015                        responsive: {
2016                            0: {
2017                                items: 1,
2018                                center: false
2019                            },
2020                            600: {
2021                                items: 2,
2022                                center: false
2023                            },
2024                            750: {
2025                                items: 3,
2026                                center: false
2027                            },
2028                            960: {
2029                                items: 5
2030                            },
2031                            1170: {
2032                                items: 8
2033                            },
2034                            1300: {
2035                                items: 8
2036                            }
2037                        }
2038                    });
2039                });
2040            }
2041
2042            $('.testimonial-carousel-info').each(function() {
2043                var data_dots = ( $(this).data("dots") === undefined ) ? false: $(this).data("dots");
2044                var data_nav = ( $(this).data("nav") === undefined ) ? false: $(this).data("nav");
2045                $(this).owlCarousel({
2046                    rtl: THEMEMASCOT.isRTL.check(),
2047                    autoplay: true,
2048                    autoplayTimeout: 4000,
2049                    loop: true,
2050                    margin: 15,
2051                    dots: false,
2052                    nav: true,
2053                    navText: [
2054                        '<i class="fa fa-angle-left"></i>',
2055                        '<i class="fa fa-angle-right"></i>'
2056                    ],
2057                    responsive: {
2058                        0: {
2059                            items: 1,
2060                            center: false
2061                        },
2062                        600: {
2063                            items: 1,
2064                            center: false
2065                        },
2066                        750: {
2067                            items: 1,
2068                            center: false
2069                        },
2070                        960: {
2071                            items: 1
2072                        },
2073                        1170: {
2074                            items: 1
2075                        },
2076                        1300: {
2077                            items: 1
2078                        }
2079                    }
2080                });
2081            });
2082            
2083        },
2084
2085
2086        /* ---------------------------------------------------------------------- */
2087        /* ----------------------------- BxSlider  ------------------------------ */
2088        /* ---------------------------------------------------------------------- */
2089        TM_bxslider: function() {
2090            var $bxslider = $('.bxslider');
2091            if( $bxslider.length > 0 ) {
2092                $bxslider.bxSlider({
2093                    mode: 'vertical',
2094                    minSlides: ( $bxslider.data("minslides") === undefined ) ? 2: $bxslider.data("minslides"),
2095                    slideMargin: 20,
2096                    pager: false,
2097                    autoplay:true,
2098                    loop:true,
2099                    prevText: '<i class="fa fa-angle-left"></i>',
2100                    nextText: '<i class="fa fa-angle-right"></i>'
2101                });
2102            }
2103        },
2104
2105
2106        /* ---------------------------------------------------------------------- */
2107        /* ---------- maximage Fullscreen Parallax Background Slider  ----------- */
2108        /* ---------------------------------------------------------------------- */
2109        TM_maximageSlider: function() {
2110            var $maximage_slider = $('#maximage');
2111            if( $maximage_slider.length > 0 ) {
2112                $maximage_slider.maximage({
2113                    cycleOptions: {
2114                        fx: 'fade',
2115                        speed: 1500,
2116                        prev: '.img-prev',
2117                        next: '.img-next'
2118                    }
2119                });
2120            }
2121        }
2122    };
2123
2124
2125    /* ---------------------------------------------------------------------- */
2126    /* ---------- document ready, window load, scroll and resize ------------ */
2127    /* ---------------------------------------------------------------------- */
2128    //document ready
2129    THEMEMASCOT.documentOnReady = {
2130        init: function() {
2131            THEMEMASCOT.initialize.init();
2132            THEMEMASCOT.header.init();
2133            THEMEMASCOT.slider.init();
2134            THEMEMASCOT.widget.init();
2135            THEMEMASCOT.windowOnscroll.init();
2136        }
2137    };
2138
2139    //window on load
2140    THEMEMASCOT.windowOnLoad = {
2141        init: function() {
2142            var t = setTimeout(function() {
2143                THEMEMASCOT.initialize.TM_wow();
2144                THEMEMASCOT.widget.TM_twittie();
2145                THEMEMASCOT.initialize.TM_magnificPopup_lightbox();
2146                THEMEMASCOT.initialize.TM_preLoaderOnLoad();
2147                THEMEMASCOT.initialize.TM_hashForwarding();
2148                THEMEMASCOT.initialize.TM_parallaxBgInit();
2149            }, 0);
2150            $window.trigger("scroll");
2151            $window.trigger("resize");
2152        }
2153    };
2154
2155    //window on scroll
2156    THEMEMASCOT.windowOnscroll = {
2157        init: function() {
2158            $window.on( 'scroll', function(){
2159                THEMEMASCOT.header.TM_scroolToTop();
2160                THEMEMASCOT.header.TM_activateMenuItemOnReach();
2161                THEMEMASCOT.header.TM_topnavAnimate();
2162            });
2163        }
2164    };
2165
2166    //window on resize
2167    THEMEMASCOT.windowOnResize = {
2168        init: function() {
2169            var t = setTimeout(function() {
2170                THEMEMASCOT.initialize.TM_equalHeightDivs();
2171                THEMEMASCOT.initialize.TM_resizeFullscreen();
2172            }, 400);
2173        }
2174    };
2175
2176
2177    /* ---------------------------------------------------------------------- */
2178    /* ---------------------------- Call Functions -------------------------- */
2179    /* ---------------------------------------------------------------------- */
2180    $document.ready(
2181        THEMEMASCOT.documentOnReady.init
2182    );
2183    $window.on('load',
2184        THEMEMASCOT.windowOnLoad.init
2185    );
2186    $window.on('resize', 
2187        THEMEMASCOT.windowOnResize.init
2188    );
2189
2190    //call function before document ready
2191    THEMEMASCOT.initialize.TM_preLoaderClickDisable();
2192
2193})(jQuery);

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.