PageSourceSearch

https://www.csr-consulting.pl/wp-content/themes/csrconsulting/assets/js/mouton.js?ver=9.0

js csr-consulting.pl collected 2026-10-09 03:19:13 UTC 57,832 bytes, 1,496 lines download raw bytes

1(function($) {
2	'use strict';
3
4     /* --------------------------------------------------
5      * template options (customable)
6      * --------------------------------------------------*/
7      var rtl_mode = 'off'; // on - for enable RTL, off - for deactive RTL
8
9
10     /* predefined vars begin */
11     var mobile_menu_show = 0;
12     var v_count = '0';
13     var mb;
14     var instances = [];
15     var $window = $(window);
16     var $tmp_h = '120';
17	 var $op_header_autoshow = 0;
18	 var grid_size = 10;
19     /* predefined vars end */
20	 
21	 if($('header').hasClass("has-topbar")){
22		  $tmp_h = '125px';
23	 }
24
25     /* --------------------------------------------------
26      * header | sticky
27      * --------------------------------------------------*/
28     function header_sticky() {
29         jQuery("header").addClass("clone", 1000, "easeOutBounce");
30         var $document = $(document);
31         var vscroll = 0;
32		 var header = jQuery("header.autoshow");
33         if ($document.scrollTop() >= 10 && vscroll == 0) {
34             header.removeClass("scrollOff");
35             header.addClass("scrollOn");
36             header.css("height", "auto");
37             vscroll = 1;
38         } else {
39             header.removeClass("scrollOn");
40             header.addClass("scrollOff");
41             vscroll = 0;
42         }
43     }
44     /* --------------------------------------------------
45      * plugin | magnificPopup
46      * --------------------------------------------------*/
47     function load_magnificPopup() {
48         jQuery('.simple-ajax-popup-align-top').magnificPopup({
49             type: 'ajax',
50             alignTop: true,
51             overflowY: 'scroll'
52         });
53         jQuery('.simple-ajax-popup').magnificPopup({
54             type: 'ajax'
55         });
56         // zoom gallery
57         jQuery('.zoom-gallery').magnificPopup({
58             delegate: 'a',
59             type: 'image',
60             closeOnContentClick: false,
61             closeBtnInside: false,
62             mainClass: 'mfp-with-zoom mfp-img-mobile',
63             image: {
64                 verticalFit: true,
65                 titleSrc: function(item) {
66                     return item.el.attr('title');
67                     //return item.el.attr('title') + ' &middot; <a class="image-source-link" href="'+item.el.attr('data-source')+'" target="_blank">image source</a>';
68                 }
69             },
70             gallery: {
71                 enabled: true
72             },
73             zoom: {
74                 enabled: true,
75                 duration: 300, // don't foget to change the duration also in CSS
76                 opener: function(element) {
77                     return element.find('img');
78                 }
79             }
80         });
81         // popup youtube, video, gmaps
82         jQuery('.popup-youtube, .popup-vimeo, .popup-gmaps').magnificPopup({
83             disableOn: 700,
84             type: 'iframe',
85             mainClass: 'mfp-fade',
86             removalDelay: 160,
87             preloader: false,
88             fixedContentPos: false
89         });
90         // Initialize popup as usual
91         $('.image-popup').magnificPopup({
92             type: 'image',
93             mainClass: 'mfp-with-zoom', // this class is for CSS animation below
94
95             zoom: {
96                 enabled: true, // By default it's false, so don't forget to enable it
97
98                 duration: 300, // duration of the effect, in milliseconds
99                 easing: 'ease-in-out', // CSS transition easing function
100
101                 // The "opener" function should return the element from which popup will be zoomed in
102                 // and to which popup will be scaled down
103                 // By defailt it looks for an image tag:
104                 opener: function(openerElement) {
105                     // openerElement is the element on which popup was initialized, in this case its <a> tag
106                     // you don't need to add "opener" option if this code matches your needs, it's defailt one.
107                     return openerElement.is('img') ? openerElement : openerElement.find('img');
108                 }
109             }
110
111         });
112         $('.image-popup-vertical-fit').magnificPopup({
113             type: 'image',
114             closeOnContentClick: true,
115             mainClass: 'mfp-img-mobile',
116             image: {
117                 verticalFit: true
118             }
119         });
120         $('.image-popup-fit-width').magnificPopup({
121             type: 'image',
122             closeOnContentClick: true,
123             image: {
124                 verticalFit: false
125             }
126         });
127         $('.image-popup-no-margins').magnificPopup({
128             type: 'image',
129             closeOnContentClick: true,
130             closeBtnInside: false,
131             fixedContentPos: true,
132             mainClass: 'mfp-no-margins mfp-with-zoom', // class to remove default margin from left and right side
133             image: {
134                 verticalFit: true
135             },
136             zoom: {
137                 enabled: true,
138                 duration: 300 // don't foget to change the duration also in CSS
139             }
140         });
141         $('.image-popup-gallery').magnificPopup({
142             type: 'image',
143             closeOnContentClick: false,
144             closeBtnInside: false,
145             mainClass: 'mfp-with-zoom mfp-img-mobile',
146             image: {
147                 verticalFit: true,
148                 titleSrc: function(item) {
149                     return item.el.attr('title');
150                     //return item.el.attr('title') + ' &middot; <a class="image-source-link" href="'+item.el.attr('data-source')+'" target="_blank">image source</a>';
151                 }
152             },
153             gallery: {
154                 enabled: true
155             }
156         });
157         $('.images-group').each(function() { // the containers for all your galleries
158             $(this).magnificPopup({
159                 delegate: 'a', // the selector for gallery item
160                 type: 'image',
161                 gallery: {
162                     enabled: true
163                 }
164             });
165         });
166
167         $('.images-popup').magnificPopup({
168             delegate: 'a', // child items selector, by clicking on it popup will open
169             type: 'image'
170             // other options
171         });
172     }
173     /* --------------------------------------------------
174      * plugin | enquire.js
175      * --------------------------------------------------*/
176     function init_resize() {
177         enquire.register("screen and (max-width: 993px)", {
178             match: function() {
179                 $('header').addClass("header-mobile");
180				 var body = jQuery('body');
181                 if (body.hasClass('side-content')) {
182                     body.removeClass('side-layout');
183                 }
184             },
185             unmatch: function() {
186                 $('header').removeClass("header-mobile");
187                 jQuery('header').css("height", $tmp_h);
188				 var body = jQuery('body');
189                 if (body.hasClass('side-content')) {
190                     body.addClass('side-layout');
191                 }
192             }
193         });
194         init();
195         init_de();
196         video_autosize();
197		 
198		 var header = $('header');
199         header.removeClass('smaller');
200         header.removeClass('logo-smaller');
201         header.removeClass('clone');
202
203         var mx = window.matchMedia("(max-width: 992px)");
204		 var osw = jQuery('.owl-slide-wrapper');
205         if (mx.matches) {			 
206             osw.find("img").css("height", $(window).innerHeight());
207             osw.find("img").css("width", "auto");
208			 if($op_header_autoshow==1){
209				 header.removeClass('autoshow');
210			 }
211			 
212         } else {
213             osw.find("img").css("width", "100%");
214             osw.find("img").css("height", "auto");
215			 if($op_header_autoshow==1){
216				 header.addClass('autoshow');
217			 }
218         }
219
220
221     };
222     /* --------------------------------------------------
223      * plugin | owl carousel
224      * --------------------------------------------------*/
225     function load_owl() {
226		 jQuery("#event-carousel").owlCarousel({
227            center: false,
228			items:3,
229			loop:true,
230			margin:0,
231			nav:false,
232			dots:false,
233			responsive:{
234				1000:{
235					items:3
236				},
237				600:{
238					items:3
239				},
240				0:{
241					items:1
242				}
243			}
244         });
245		 
246		 jQuery("#ss-carousel").owlCarousel({
247            center: true,
248			items:4,
249			loop:true,
250			margin:60,
251			responsive:{
252				1000:{
253					items:4
254				},
255				600:{
256					items:3
257				},
258				0:{
259					items:2
260				}
261			}
262         });
263
264        jQuery(".rtl #testimonial-carousel").owlCarousel({
265            center: false,
266            loop:false,
267            margin:30,
268            rtl: true,
269            responsive:{
270                1000:{
271                    items:3
272                },
273                600:{
274                    items:1
275                },
276                0:{
277                    items:1
278                }
279            }
280         });
281		 
282         jQuery("#testimonial-carousel").owlCarousel({
283            center: false,
284			loop:false,
285			margin:30,
286			responsive:{
287				1000:{
288					items:3
289				},
290				600:{
291					items:1
292				},
293                0:{
294                    items:1
295                }
296			}
297         });
298
299
300		 
301		 jQuery("#blog-carousel").owlCarousel({
302            center: false,
303			items:3,
304			loop:true,
305			margin:30,
306			responsive:{
307				1000:{
308					items:3
309				},
310				600:{
311					items:2
312				},
313				0:{
314					items:1
315				}
316			}
317         });
318		 
319		 jQuery("#blog-carousel-3").owlCarousel({
320            center: true,
321			items:5,
322			loop:true,
323			margin:20,
324			responsive:{
325				1000:{
326					items:3
327				},
328				600:{
329					items:2
330				},
331				0:{
332					items:1
333				}
334			}
335         });
336		 
337		 jQuery("#owl-logo").owlCarousel({
338            center: false,
339			items:6,
340			loop:true,
341			dots: false,
342			margin:30,
343			autoplay:true,
344			autoplayTimeout:2000,
345			responsive:{
346				1000:{
347					items:6
348				},
349				600:{
350					items:4
351				},
352				0:{
353					items:2
354				}
355			}
356         });
357		 
358		 jQuery(".project-carousel-4-nav").owlCarousel({
359            center: true,
360			items:4,
361			loop:true,
362			margin:15,
363			responsive:{
364				1000:{
365					items:4
366				},
367				600:{
368					items:3
369				},
370				0:{
371					items:1
372				}
373			}
374         });
375		 
376		 jQuery("#owl-features").owlCarousel({
377            center: true,
378			items:4,
379			loop:true,
380			dots: true,
381			margin:30,
382			autoplay:false,
383			autoplayTimeout:0,
384			responsive:{
385				1000:{
386					items:4
387				},
388				600:{
389					items:2
390				},
391				0:{
392					items:1
393				}
394			}
395         });
396		 
397         // Custom Navigation owlCarousel
398         $(".next").on("click", function() {
399             $(this).parent().parent().find('.blog-slide').trigger('owl.next');
400         });
401         $(".prev").on("click", function() {
402             $(this).parent().parent().find('.blog-slide').trigger('owl.prev');
403         });
404
405         jQuery('.owl-custom-nav').each(function() {
406             var owl = $('.owl-custom-nav').next();
407             var ow = parseInt(owl.css("height"), 10);
408             $(this).css("margin-top", (ow / 2) - 25);
409             owl.owlCarousel();
410             // Custom Navigation Events
411             $(".btn-next").on("click", function() {
412                 owl.trigger('owl.next');
413             });
414             $(".btn-prev").on("click", function() {
415                 owl.trigger('owl.prev');
416             });
417         });
418
419
420         // custom navigation for slider
421         var ows = $('#custom-owl-slider');
422         var arr = $('.owl-slider-nav');
423         var doc_height = $(window).innerHeight();
424         arr.css("top", (doc_height / 2) - 25);
425         ows.owlCarousel();
426         // Custom Navigation Events
427         arr.find(".next").on("click", function() {
428             ows.trigger('owl.next');
429         });
430         arr.find(".prev").on("click", function() {
431             ows.trigger('owl.prev');
432         });
433
434         jQuery(".owl-slide-wrapper").on("mouseenter", function() {
435             arr.find(".next").css("right", "40px");
436             arr.find(".prev").css("left", "40px");
437         }).on("mouseleave", function() {
438             arr.find(".next").css("right", "-50px");
439             arr.find(".prev").css("left", "-50px");
440         })
441     }
442     /* --------------------------------------------------
443      * plugin | isotope
444      * --------------------------------------------------*/
445     function filter_gallery() {
446         var $container = jQuery('#gallery');
447         $container.isotope({
448             itemSelector: '.item',
449             filter: '*'
450         });
451         jQuery('#filters a').on("click", function() {
452             var $this = jQuery(this);
453             if ($this.hasClass('selected')) {
454                 return false;
455             }
456             var $optionSet = $this.parents();
457             $optionSet.find('.selected').removeClass('selected');
458             $this.addClass('selected');
459             var selector = jQuery(this).attr('data-filter');
460             $container.isotope({
461                 filter: selector
462             });
463             return false;
464         });
465     }
466
467     function masonry() {
468         var $container = jQuery('.row-masonry');
469         $container.isotope({
470             itemSelector: '.item',
471         });
472         jQuery('#filters a').on("click", function() {
473             var $this = jQuery(this);
474             if ($this.hasClass('selected')) {
475                 return false;
476             }
477             var $optionSet = $this.parents();
478             $optionSet.find('.selected').removeClass('selected');
479             $this.addClass('selected');
480             var selector = jQuery(this).attr('data-filter');
481             $container.isotope({
482                 filter: selector
483             });
484             return false;
485         });
486     }
487     /* --------------------------------------------------
488      * plugin | fitvids
489      * --------------------------------------------------*/
490     /*!
491      * FitVids 1.0
492      *
493      * Copyright 2011, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com
494      * Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/
495      * Released under the WTFPL license - http://sam.zoy.org/wtfpl/
496      *
497      * Date: Thu Sept 01 18:00:00 2011 -0500
498      */
499     ! function(a) {
500         a.fn.fitVids = function(b) {
501             var c = {
502                     customSelector: null
503                 },
504                 d = document.createElement("div"),
505                 e = document.getElementsByTagName("base")[0] || document.getElementsByTagName("script")[0];
506             return d.className = "fit-vids-style", d.innerHTML = "&shy;<style> .fluid-width-video-wrapper { width: 100%; position: relative; padding: 0; } .fluid-width-video-wrapper iframe, .fluid-width-video-wrapper object, .fluid-width-video-wrapper embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } </style>", e.parentNode.insertBefore(d, e), b && a.extend(c, b), this.each(function() {
507                 var b = ["iframe[src*='player.vimeo.com']", "iframe[src*='www.youtube.com']", "iframe[src*='www.kickstarter.com']", "object", "embed"];
508                 c.customSelector && b.push(c.customSelector);
509                 var d = a(this).find(b.join(","));
510                 d.each(function() {
511                     var b = a(this);
512                     if (!("embed" == this.tagName.toLowerCase() && b.parent("object").length || b.parent(".fluid-width-video-wrapper").length)) {
513                         var c = "object" == this.tagName.toLowerCase() || b.attr("height") ? b.attr("height") : b.height(),
514                             d = b.attr("width") ? b.attr("width") : b.width(),
515                             e = c / d;
516                         if (!b.attr("id")) {
517                             var f = "fitvid" + Math.floor(999999 * Math.random());
518                             b.attr("id", f)
519                         }
520                         b.wrap('<div class="fluid-width-video-wrapper"></div>').parent(".fluid-width-video-wrapper").css("padding-top", 100 * e + "%"), b.removeAttr("height").removeAttr("width")
521                     }
522                 })
523             })
524         }
525     }(jQuery);
526     /* --------------------------------------------------
527      * back to top
528      * --------------------------------------------------*/
529     var scrollTrigger = 500; // px
530     var t = 0;
531
532     function backToTop() {
533         var scrollTop = $(window).scrollTop();
534         if (scrollTop > scrollTrigger) {
535             $('#back-to-top').addClass('show');
536             $('#back-to-top').removeClass('hide');
537             t = 1;
538         }
539
540         if (scrollTop < scrollTrigger && t == 1) {
541             $('#back-to-top').addClass('hide');
542         }
543
544         $('#back-to-top').on('click', function(e) {
545             e.preventDefault();
546             $('html,body').stop(true).animate({
547                 scrollTop: 0
548             }, 700);
549         });
550     };
551     /* --------------------------------------------------
552      * plugin | scroll to
553      * --------------------------------------------------*/
554     /*!
555      * jquery.scrollto.js 0.0.1 - https://github.com/yckart/jquery.scrollto.js
556      * Scroll smooth to any element in your DOM.
557      *
558      * Copyright (c) 2012 Yannick Albert (http://yckart.com)
559      * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php).
560      * 2013/02/17
561      **/
562     $.scrollTo = $.fn.scrollTo = function(x, y, options) {
563         if (!(this instanceof $)) return $.fn.scrollTo.apply($('html, body'), arguments);
564
565         options = $.extend({}, {
566             gap: {
567                 x: 0,
568                 y: 0
569             },
570             animation: {
571                 easing: 'easeInOutExpo',
572                 duration: 600,
573                 complete: $.noop,
574                 step: $.noop
575             }
576         }, options);
577
578         return this.each(function() {
579
580             if (!jQuery('body').hasClass('side-layout')) {
581                 var h = 69;
582             } else {
583                 var h = 0;
584             }
585
586             var elem = $(this);
587             elem.stop().animate({
588                 scrollLeft: !isNaN(Number(x)) ? x : $(y).offset().left + options.gap.x,
589                 scrollTop: !isNaN(Number(y)) ? y : $(y).offset().top + options.gap.y - h // *edited
590             }, options.animation);
591         });
592     };
593     /* --------------------------------------------------
594      * counting number
595      * --------------------------------------------------*/
596     function de_counter() {
597         jQuery('.timer').each(function() {
598             var imagePos = jQuery(this).offset().top;
599             var topOfWindow = jQuery(window).scrollTop();
600             if (imagePos < topOfWindow + jQuery(window).height() && v_count == '0') {
601                 jQuery(function($) {
602                     // start all the timers
603                     jQuery('.timer').each(count);
604
605                     function count(options) {
606                         v_count = '1';
607                         var $this = jQuery(this);
608                         options = $.extend({}, options || {}, $this.data('countToOptions') || {});
609                         $this.countTo(options);
610                     }
611                 });
612             }
613         });
614     }
615     /* --------------------------------------------------
616      * progress bar
617      * --------------------------------------------------*/
618
619     function text_rotate() {
620         var quotes = $(".text-rotate-wrap .text-item");
621         var quoteIndex = -1;
622
623         function showNextQuote() {
624             ++quoteIndex;
625             quotes.eq(quoteIndex % quotes.length)
626                 .fadeIn(1)
627                 .delay(1500)
628                 .fadeOut(1, showNextQuote);
629         }
630
631         showNextQuote();
632
633     };
634     /* --------------------------------------------------
635      * custom background
636      * --------------------------------------------------*/
637     function custom_bg() {
638         $("body,div,section,span,footer").css('background-color', function() {
639             return jQuery(this).data('bgcolor');
640         });
641         $("body,div,section").css('background', function() {
642             return jQuery(this).data('bgimage');
643         });
644         /*$("body,div,section").css('background-size', function() {
645             return 'cover';
646         });*/
647     }
648     /* --------------------------------------------------
649      * custom elements
650      * --------------------------------------------------*/
651     function custom_elements() {
652         // --------------------------------------------------
653         // tabs
654         // --------------------------------------------------
655         jQuery('.de_tab').find('.de_tab_content > div').hide();
656         jQuery('.de_tab').find('.de_tab_content > div:first').show();
657         jQuery('li').find('.v-border').fadeTo(150, 0);
658         jQuery('li.active').find('.v-border').fadeTo(150, 1);
659         jQuery('.de_nav li').on("click", function() {
660             jQuery(this).parent().find('li').removeClass("active");
661             jQuery(this).addClass("active");
662             jQuery(this).parent().parent().find('.v-border').fadeTo(150, 0);
663             jQuery(this).parent().parent().find('.de_tab_content > div').hide();
664             var indexer = jQuery(this).index(); //gets the current index of (this) which is #nav li
665             jQuery(this).parent().parent().find('.de_tab_content > div:eq(' + indexer + ')').fadeIn(); //uses whatever index the link has to open the corresponding box 
666             jQuery(this).find('.v-border').fadeTo(150, 1);
667         });
668         // request quote function
669         var rq_step = 1;
670         jQuery('#request_form .btn-right').on("click", function() {
671             var rq_name = $('#rq_name').val();
672             var rq_email = $('#rq_email').val();
673             var rq_phone = $('#rq_phone').val();
674             if (rq_step == 1) {
675                 if (rq_name.length == 0) {
676                     $('#rq_name').addClass("error_input");
677                 } else {
678                     $('#rq_name').removeClass("error_input");
679                 }
680                 if (rq_email.length == 0) {
681                     $('#rq_email').addClass("error_input");
682                 } else {
683                     $('#rq_email').removeClass("error_input");
684                 }
685                 if (rq_phone.length == 0) {
686                     $('#rq_phone').addClass("error_input");
687                 } else {
688                     $('#rq_phone').removeClass("error_input");
689                 }
690             }
691             if (rq_name.length != 0 && rq_email.length != 0 && rq_phone.length != 0) {
692                 jQuery("#rq_step_1").hide();
693                 jQuery("#rq_step_2").fadeIn();
694             }
695         });
696         // --------------------------------------------------
697         // tabs
698         // --------------------------------------------------
699         jQuery('.de_review').find('.de_tab_content > div').hide();
700         jQuery('.de_review').find('.de_tab_content > div:first').show();
701         //jQuery('.de_review').find('.de_nav li').fadeTo(150,.5);
702         jQuery('.de_review').find('.de_nav li:first').fadeTo(150, 1);
703         jQuery('.de_nav li').on("click", function() {
704             jQuery(this).parent().find('li').removeClass("active");
705             //jQuery(this).parent().find('li').fadeTo(150,.5);
706             jQuery(this).addClass("active");
707             jQuery(this).fadeTo(150, 1);
708             jQuery(this).parent().parent().find('.de_tab_content > div').hide();
709             var indexer = jQuery(this).index(); //gets the current index of (this) which is #nav li
710             jQuery(this).parent().parent().find('.de_tab_content > div:eq(' + indexer + ')').show(); //uses whatever index the link has to open the corresponding box 
711         });
712         // --------------------------------------------------
713         // toggle
714         // --------------------------------------------------
715         jQuery(".toggle-list h2").addClass("acc_active");
716         jQuery(".toggle-list h2").toggle(function() {
717             jQuery(this).addClass("acc_noactive");
718             jQuery(this).next(".ac-content").slideToggle(200);
719         }, function() {
720             jQuery(this).removeClass("acc_noactive").addClass("acc_active");
721             jQuery(this).next(".ac-content").slideToggle(200);
722         })
723		 // --------------------------------------------------
724         // toggle
725         // --------------------------------------------------
726         jQuery(".expand-custom .toggle").click(function() {
727			 jQuery(this).stop().toggleClass("clicked");
728             jQuery(this).stop().parent().parent().parent().find(".details").slideToggle(500);
729         })
730     }
731     /* --------------------------------------------------
732      * video autosize
733      * --------------------------------------------------*/
734     function video_autosize() {
735         jQuery('.de-video-container').each(function() {
736             var height_1 = jQuery(this).css("height");
737             var height_2 = jQuery(this).find(".de-video-content").css("height");
738             var newheight = (height_1.substring(0, height_1.length - 2) - height_2.substring(0, height_2.length - 2)) / 2;
739             jQuery(this).find('.de-video-overlay').css("height", height_1);
740             jQuery(this).find(".de-video-content").animate({
741                 'margin-top': newheight
742             }, 'fast');
743         });
744     }
745     /* --------------------------------------------------
746      * center x and y
747      * --------------------------------------------------*/
748     function center_xy() {
749         jQuery('.center-xy').each(function() {
750             jQuery(this).parent().find("img").on('load', function() {
751                 var w = parseInt(jQuery(this).parent().find(".center-xy").css("width"), 10);
752                 var h = parseInt(jQuery(this).parent().find(".center-xy").css("height"), 10);
753                 var pic_w = jQuery(this).css("width");
754                 var pic_h = jQuery(this).css("height");
755				 var tp = jQuery(this).parent();
756                 tp.find(".center-xy").css("left", parseInt(pic_w, 10) / 2 - w / 2);
757                 tp.find(".center-xy").css("top", parseInt(pic_h, 10) / 2 - h / 2);
758                 tp.find(".bg-overlay").css("width", pic_w);
759                 tp.find(".bg-overlay").css("height", pic_h);
760             }).each(function() {
761                 if (this.complete) $(this).load();
762             });
763         });
764     }
765     /* --------------------------------------------------
766      * add arrow for mobile menu
767      * --------------------------------------------------*/
768     function menu_arrow() {
769         // mainmenu create span
770         jQuery('#mainmenu li a').each(function() {
771             if ($(this).next("ul").length > 0) {
772                 $("<span></span>").insertAfter($(this));
773             }
774         });
775         // mainmenu arrow click
776         jQuery("#mainmenu > li > span").on("click", function() {
777             
778             var iteration = $(this).data('iteration') || 1;
779             switch (iteration) {
780                 case 1:
781                     $(this).addClass("active");
782                     $(this).parent().find("ul:first").css("height", "auto");
783                     var curHeight = $(this).parent().find("ul:first").height();
784                     $(this).parent().find("ul:first").css("height", "0");
785                     $(this).parent().find("ul:first").animate({
786                         'height': curHeight
787                     }, 300, 'easeOutQuint');
788					 $('header').css("height", $('#mainmenu')[0].scrollHeight+curHeight+(parseInt($tmp_h)*2));
789                     break;
790                 case 2:
791					var curHeight = $(this).parent().find("ul:first").height();
792                     $(this).removeClass("active");
793                     $(this).parent().find("ul:first").animate({
794                         'height': "0"
795                     }, 300, 'easeOutQuint');
796					 $('header').css("height", $('#mainmenu')[0].scrollHeight-curHeight+(parseInt($tmp_h)*2));
797                     break;
798             }
799             iteration++;
800             if (iteration > 2) iteration = 1;
801             $(this).data('iteration', iteration);
802         });
803         jQuery("#mainmenu > li > ul > li > span").on("click", function() {
804             var iteration = $(this).data('iteration') || 1;
805             switch (iteration) {
806                 case 1:
807                     $(this).addClass("active");
808                     $(this).parent().find("ul:first").css("height", "auto");
809                     $(this).parent().parent().parent().find("ul:first").css("height", "auto");
810                     var curHeight = $(this).parent().find("ul:first").height();
811                     $(this).parent().find("ul:first").css("height", "0");
812                     $(this).parent().find("ul:first").animate({
813                         'height': curHeight
814                     }, 400, 'easeInOutQuint');
815                     break;
816                 case 2:
817                     $(this).removeClass("active");
818                     $(this).parent().find("ul:first").animate({
819                         'height': "0"
820                     }, 400, 'easeInOutQuint');
821                     break;
822             }
823             iteration++;
824             if (iteration > 2) iteration = 1;
825             $(this).data('iteration', iteration);
826         });
827     }
828     /* --------------------------------------------------
829      * show gallery item sequence
830      * --------------------------------------------------*/
831     function sequence() {
832         var sq = jQuery(".sequence > .gallery-item .picframe");
833         var count = sq.length;
834		 sq.addClass("fadeIn");
835         sq.find("img").addClass("slideInUp");
836         for (var i = 0; i <= count; i++) {
837             var sqx = jQuery(".sequence > .gallery-item:eq(" + i + ") .picframe");
838			 sqx.attr('data-wow-delay', (i / 8) + 's');
839             sqx.find("img").attr('data-wow-delay', (i / 16) + 's');
840         }
841     }
842     /* --------------------------------------------------
843      * show gallery item sequence
844      * --------------------------------------------------*/
845     function sequence_a() {
846         var sq = jQuery(".sequence").find(".sq-item");
847         var count = sq.length;
848         sq.addClass("fadeInUp");
849         for (var i = 0; i <= count; i++) {
850             var sqx = jQuery(".sequence").find(".sq-item:eq(" + i + ")");
851             sqx.attr('data-wow-delay', (i / 8) + 's');
852			 sqx.attr('data-wow-speed', '1s');
853         }
854     }
855     /* --------------------------------------------------
856      * custom scroll
857      * --------------------------------------------------*/
858     $.fn.moveIt = function() {
859         $(this).each(function() {
860             instances.push(new moveItItem($(this)));
861         });
862     }
863
864     function moveItItemNow() {
865         var scrollTop = $window.scrollTop();
866         instances.forEach(function(inst) {
867             inst.update(scrollTop);
868         });
869     }
870
871     function moveItItem(el) {
872         this.el = $(el);
873         this.speed = parseInt(this.el.attr('data-scroll-speed'));
874     };
875     moveItItem.prototype.update = function(scrollTop) {
876         var pos = scrollTop / this.speed;
877         this.el.css('transform', 'translateY(' + pos + 'px)');
878     };
879     $(function() {
880         $('[data-scroll-speed]').moveIt();
881     });
882     /* --------------------------------------------------
883      * multiple function
884      * --------------------------------------------------*/
885     function init() {
886         var sh = jQuery('#de-sidebar').css("height");
887         var dh = jQuery(window).innerHeight();
888         var h = parseInt(sh) - parseInt(dh);
889
890         function scrolling() {
891             var mq = window.matchMedia("(min-width: 993px)");
892             var ms = window.matchMedia("(min-width: 768px)");
893             if (mq.matches) {
894                 var distanceY = window.pageYOffset || document.documentElement.scrollTop,
895                     shrinkOn = 40,
896                     header = jQuery("header");
897                 if (distanceY > shrinkOn) {
898                     header.addClass("smaller");
899                     jQuery('body').css("margin-top","92px");
900                 } else {
901                     if (header.hasClass('smaller')) {
902                         header.removeClass('smaller');
903                         jQuery('body').css("margin-top","0px");
904                     }
905                 }
906             }
907             if (mq.matches) {
908                 if (jQuery("header").hasClass("side-header")) {
909                     if (jQuery(document).scrollTop() >= h) {
910                         jQuery('#de-sidebar').css("position", "fixed");
911                         if (parseInt(sh) > parseInt(dh)) {
912                             jQuery('#de-sidebar').css("top", -h);
913                         }
914                         jQuery('#main').addClass("col-md-offset-3");
915                         jQuery('h1#logo img').css("padding-left", "7px");
916                         jQuery('header .h-content').css("padding-left", "7px");
917                         jQuery('#mainmenu li').css("width", "103%");
918                     } else {
919                         jQuery('#de-sidebar').css("position", "relative");
920                         if (parseInt(sh) > parseInt(dh)) {
921                             jQuery('#de-sidebar').css("top", 0);
922                         }
923                         jQuery('#main').removeClass("col-md-offset-3");
924                         jQuery('h1#logo img').css("padding-left", "0px");
925                         jQuery('header .h-content').css("padding-left", "0px");
926                         jQuery('#mainmenu li').css("width", "100%");
927                     }
928                 }
929
930             }
931         }
932
933         // --------------------------------------------------
934         // looping background
935         // --------------------------------------------------
936
937         scrolling();
938
939
940         jQuery(".btn-rsvp").on("click", function() {
941             var iteration = $(this).data('iteration') || 1;
942             switch (iteration) {
943                 case 1:
944                     jQuery('#popup-box').addClass('popup-show');
945                     jQuery('#popup-box').removeClass('popup-hide');
946                     break;
947                 case 2:
948
949                     break;
950             }
951             iteration++;
952             if (iteration > 2) iteration = 1;
953             $(this).data('iteration', iteration);
954         });
955
956         jQuery(".btn-close").on("click", function() {
957             var iteration = $(this).data('iteration') || 1;
958             switch (iteration) {
959                 case 1:
960                     jQuery('#popup-box').addClass('popup-hide');
961                     jQuery('#popup-box').removeClass('popup-show');
962                     break;
963                 case 2:
964
965                     break;
966             }
967             iteration++;
968             if (iteration > 2) iteration = 1;
969             $(this).data('iteration', iteration);
970         });
971		 
972		 $("#sw-1").click(function() {
973			if($(this).is(":checked")){
974				$('.opt-1').css('display','none');
975				$('.opt-2').css('display','inline-block');
976			}else{
977				$('.opt-2').css('display','none');
978				$('.opt-1').css('display','inline-block');
979			}
980		});
981     }
982      // init_de begin //
983     function init_de() {
984         jQuery('.de-team-list').each(function() {
985             jQuery(this).find("img").on('load', function() {
986                 var w = jQuery(this).css("width");
987                 var h = jQuery(this).css("height");
988                 var tpp = jQuery(this).parent().parent();
989                 tpp.find(".team-pic").css("height", h);
990                 tpp.find(".team-desc").css("width", w);
991                 tpp.find(".team-desc").css("height", h);
992                 tpp.find(".team-desc").css("top", h);
993             }).each(function() {
994                 if (this.complete) $(this).load();
995             });
996         });
997         jQuery(".de-team-list").on("mouseenter", function() {
998             var h;
999             h = jQuery(this).find("img").css("height");
1000             jQuery(this).find(".team-desc").stop(true).animate({
1001                 'top': "0px"
1002             }, 350, 'easeOutQuad');
1003             jQuery(this).find("img").stop(true).animate({
1004                 'margin-top': "-100px"
1005             }, 400, 'easeOutQuad');
1006         }).on("mouseleave", function() {
1007             var h;
1008             h = jQuery(this).find("img").css("height");
1009             jQuery(this).find(".team-desc").stop(true).animate({
1010                 'top': h
1011             }, 350, 'easeOutQuad');
1012             jQuery(this).find("img").stop(true).animate({
1013                 'margin-top': "0px"
1014             }, 400, 'easeOutQuad');
1015         })
1016         // portfolio
1017         jQuery('.item .picframe').each(function() {
1018			 var img = jQuery(this).find("img");
1019             img.css("width", "100%");
1020             img.css("height", "auto");
1021             img.on('load', function() {
1022                 var w = jQuery(this).css("width");
1023                 var h = jQuery(this).css("height");
1024                 //nh = (h.substring(0, h.length - 2)/2)-48;
1025                 jQuery(this).parent().css("height", h);
1026             }).each(function() {
1027                 if (this.complete) $(this).load();
1028             });
1029         });
1030         // --------------------------------------------------
1031         // portfolio hover
1032         // --------------------------------------------------
1033         jQuery('.overlay').fadeTo(1, 0);
1034         // gallery hover
1035         jQuery(".item .picframe").on("mouseenter", function() {
1036			 var ov = jQuery(this).parent().find(".overlay");
1037             ov.width(jQuery(this).find("img").css("width"));
1038             ov.height(jQuery(this).find("img").css("height"));
1039             ov.stop(true).fadeTo(200, 1);
1040             var picheight = jQuery(this).find("img").css("height");
1041             var newheight;
1042             newheight = (picheight.substring(0, picheight.length - 2) / 2) - 10;
1043             //alert(newheight);
1044             //jQuery(this).parent().find(".pf_text").stop(true).animate({'margin-top': newheight},200,'easeOutCubic');
1045             jQuery(this).parent().find(".pf_text").css('margin-top', newheight);
1046             jQuery(this).parent().find(".pf_text").stop(true).animate({
1047                 'opacity': '1'
1048             }, 1000, 'easeOutCubic');
1049             var w = jQuery(this).find("img").css("width");
1050             var h = jQuery(this).find("img").css("height");
1051             var w = parseInt(w, 10);
1052             var h = parseInt(h, 10);
1053             var $scale = 1;
1054             //alert(w);
1055             jQuery(this).find("img").stop(true).animate({
1056                 width: w * $scale,
1057                 height: h * $scale,
1058                 'margin-left': -w * ($scale - 1) / 2,
1059                 'margin-top': -h * ($scale - 1) / 2
1060             }, 400, 'easeOutCubic');
1061         }).on("mouseleave", function() {
1062             var newheight;
1063             var picheight = jQuery(this).find("img").css("height");
1064             newheight = (picheight.substring(0, picheight.length - 2) / 2) - 10;
1065             //jQuery(this).parent().find(".pf_text").stop(true).animate({'margin-top': newheight - 30},200,'easeOutCubic');
1066             jQuery(this).parent().find(".pf_text").stop(true).animate({
1067                 'opacity': '0'
1068             }, 400, 'easeOutCubic');
1069             jQuery(this).parent().find(".overlay").stop(true).fadeTo(200, 0);
1070             jQuery(this).find("img").stop(true).animate({
1071                 width: '100%',
1072                 height: '100%',
1073                 'margin-left': 0,
1074                 'margin-top': 0
1075             }, 400, 'easeOutQuad');
1076         })
1077         jQuery('.overlay').fadeTo(1, 0);
1078
1079         var preloader_pos = parseInt(jQuery(window).innerHeight() / 2) - 30;
1080         $(".preloader1").css("top", preloader_pos);
1081		 
1082		jQuery('.grid.border').css('padding-top', grid_size);
1083        jQuery('.grid.border').css('padding-left', grid_size);
1084		
1085        jQuery("#selector .opt.tc1").addClass("active");
1086
1087		jQuery("#selector .opt").on("click", function() {
1088            jQuery("#selector .opt").removeClass("active");
1089			var color = jQuery(this).data('color');
1090            jQuery("#colors").attr("href", 'css/colors/'+color+'.css');
1091            jQuery(this).addClass("active");
1092         });
1093
1094        // rtl begin //
1095          if (rtl_mode=="on") {
1096                    jQuery("body").addClass('rtl');
1097                     jQuery("#bootstrap").attr("href", 'css/bootstrap-rtl.min.css');
1098                     jQuery("#bootstrap-grid").attr("href", 'css/bootstrap-grid-rtl.min.css');
1099                     jQuery("#bootstrap-reboot").attr("href", 'css/bootstrap-reboot-rtl.min.css');
1100            };
1101		 // rtl end // 
1102		 
1103		 jQuery("#selector #demo-rtl").on("click", function() {
1104			var iteration = $(this).data('iteration') || 1;
1105			 switch (iteration) {
1106                 case 1:
1107                     jQuery("body").addClass('rtl');
1108                     jQuery("#bootstrap").attr("href", 'css/bootstrap-rtl.min.css');
1109                     jQuery("#bootstrap-grid").attr("href", 'css/bootstrap-grid-rtl.min.css');
1110                     jQuery("#bootstrap-reboot").attr("href", 'css/bootstrap-reboot-rtl.min.css');
1111                     jQuery(this).find(".sc-val").text('Click to Disable');
1112                     break;
1113                 case 2:
1114                    jQuery("body").removeClass('rtl');
1115                    jQuery("#bootstrap").attr("href", 'css/bootstrap.min.css');
1116                    jQuery("#bootstrap-grid").attr("href", 'css/bootstrap-grid.min.css');
1117                    jQuery("#bootstrap-reboot").attr("href", 'css/bootstrap-reboot.min.css');
1118                    jQuery(this).find(".sc-val").text('Click to Enable');
1119                    break;
1120             }
1121             iteration++;
1122             if (iteration > 2) iteration = 1;
1123             $(this).data('iteration', iteration);
1124		 });
1125     }
1126	 // de_init end //
1127	 
1128	 function grid_gallery() {
1129            jQuery('.grid-item').each(function () {
1130                var this_col = Number(jQuery(this).parent().attr('data-col'));
1131                var this_gridspace = Number(jQuery(this).parent().attr('data-gridspace'));
1132                var this_ratio = eval($(this).parent().attr('data-ratio'));
1133                jQuery(this).parent().css('padding-left', this_gridspace);
1134                var w = (($(document).width() - (this_gridspace * this_col + 1)) / this_col) - (this_gridspace / this_col);
1135                var gi = $(this);
1136                var h = w * this_ratio;
1137                gi.css('width', w)
1138                gi.css('height', h);
1139                gi.find(".pf_title").css('margin-top', (h / 2) - 10);
1140                gi.css('margin-right', this_gridspace);
1141                gi.css('margin-bottom', this_gridspace);
1142				$(this).parent().css('padding-top',this_gridspace);
1143                if (gi.hasClass('large')) {
1144                    $(this).css('width', (w * 2) + this_gridspace);
1145                    $(this).css('height', (h * 2) + this_gridspace);
1146                }
1147                if (gi.hasClass('large-width')) {
1148                    $(this).css('width', (w * 2) + this_gridspace);
1149                    $(this).css('height', h);
1150                }
1151                if (gi.hasClass('large-height')) {
1152                    $(this).css('height', (h * 2) + this_gridspace);
1153                    gi.find(".pf_title").css('margin-top', (h) - 20);
1154                }
1155            })
1156        }
1157
1158     /* --------------------------------------------------
1159      * center-y
1160      * --------------------------------------------------*/
1161     function centerY() {
1162         jQuery('.full-height').each(function() {
1163             var dh = jQuery(window).innerHeight();
1164             jQuery(this).css("min-height", dh);
1165         });
1166     }
1167
1168     /* --------------------------------------------------
1169      * progress bar
1170      * --------------------------------------------------*/
1171     function de_progress() {
1172         jQuery('.de-progress').each(function() {
1173             var pos_y = jQuery(this).offset().top;
1174             var value = jQuery(this).find(".progress-bar").attr('data-value');
1175             var topOfWindow = jQuery(window).scrollTop();
1176             if (pos_y < topOfWindow + 550) {
1177                 jQuery(this).find(".progress-bar").css({
1178                     'width': value
1179                 }, "slow");
1180             }
1181
1182             jQuery(this).find('.value').text(jQuery(this).find('.progress-bar').attr('data-value'));
1183         });
1184     }
1185     /* --------------------------------------------------
1186      * document ready
1187      * --------------------------------------------------*/
1188     jQuery(document).ready(function() {
1189         'use strict';
1190         // --------------------------------------------------
1191         // custom positiion
1192         // --------------------------------------------------
1193         var $doc_height = jQuery(window).innerHeight();
1194         jQuery('#homepage #content.content-overlay').css("margin-top", $doc_height);
1195         //jQuery('.full-height').css("height", $doc_height);
1196         //var picheight = jQuery('.center-y').css("height");
1197         //picheight = parseInt(picheight, 10);
1198         //jQuery('.center-y').css('margin-top', (($doc_height - picheight) / 2)-100);
1199         jQuery('.full-height .de-video-container').css("min-height", $doc_height);
1200
1201		 
1202		 if(jQuery('header').hasClass("autoshow")){
1203			 $op_header_autoshow = 1;
1204		 }
1205
1206         $('#mainmenu > li:has(ul)').addClass('menu-item-has-children');
1207         $(".jarallax").jarallax();
1208         centerY();
1209
1210         // --------------------------------------------------
1211         // blog list hover
1212         // --------------------------------------------------
1213         jQuery(".blog-list").on("mouseenter", function() {
1214             var v_height = jQuery(this).find(".blog-slide").css("height");
1215             var v_width = jQuery(this).find(".blog-slide").css("width");
1216             var newheight = (v_height.substring(0, v_height.length - 2) / 2) - 40;
1217			 var owa = jQuery(this).find(".owl-arrow");
1218             owa.css("margin-top", newheight);
1219             owa.css("width", v_width);
1220             owa.fadeTo(150, 1);
1221             //alert(v_height);
1222         }).on("mouseleave", function() {
1223             jQuery(this).find(".owl-arrow").fadeTo(150, 0);
1224         })
1225         //  logo carousel hover
1226         jQuery("#logo-carousel img").on("mouseenter", function() {
1227             jQuery(this).fadeTo(150, .5);
1228         }).on("mouseleave", function() {
1229             jQuery(this).fadeTo(150, 1);
1230         })
1231         if ($('#back-to-top').length) {
1232             backToTop();
1233         }
1234         jQuery(".nav-exit").on("click", function() {
1235             $.magnificPopup.close();
1236         });
1237         // --------------------------------------------------
1238         // navigation for mobile
1239         // --------------------------------------------------
1240         jQuery('#menu-btn').on("click", function() {
1241
1242            var h = jQuery('header')[0].scrollHeight;
1243			
1244             if (mobile_menu_show == 0) {
1245                 jQuery('header.header-mobile').stop(true).animate({
1246                     'height': h
1247                 }, 200, 'easeOutCubic');
1248                 mobile_menu_show = 1;
1249             } else {
1250                 jQuery('header.header-mobile').stop(true).animate({
1251                     'height': '100px'
1252                 }, 200, 'easeOutCubic');
1253                 mobile_menu_show = 0;
1254             }
1255         })
1256		 
1257		 
1258		 
1259		 jQuery("#gform_2 label").on("click", function(evn) {
1260             jQuery("#gform_2 label").css('height','auto');
1261			 jQuery("#gform_2 label").css('border-bottom','none');
1262			 
1263         });
1264		 
1265		 
1266         jQuery("a.btn").on("click", function(evn) {
1267             if (this.href.indexOf('#') != -1) {
1268                 evn.preventDefault();
1269                 jQuery('html,body').scrollTo(this.hash, this.hash);
1270             }
1271         });
1272         jQuery('.de-gallery .item .icon-info').on("click", function() {
1273             jQuery('.page-overlay').show();
1274             url = jQuery(this).attr("data-value");
1275             jQuery("#loader-area .project-load").load(url, function() {
1276                 jQuery("#loader-area").slideDown(500, function() {
1277                     jQuery('.page-overlay').hide();
1278                     jQuery('html, body').animate({
1279                         scrollTop: jQuery('#loader-area').offset().top - 70
1280                     }, 500, 'easeOutCubic');
1281                     //
1282                     jQuery(".image-slider").owlCarousel({
1283                         items: 1,
1284                         singleItem: true,
1285                         navigation: false,
1286                         pagination: true,
1287                         autoPlay: false
1288                     });
1289                     jQuery(".container").fitVids();
1290                     jQuery('#btn-close-x').on("click", function() {
1291                         jQuery("#loader-area").slideUp(500, function() {
1292                             jQuery('html, body').animate({
1293                                 scrollTop: jQuery('#section-portfolio').offset().top - 70
1294                             }, 500, 'easeOutCirc');
1295                         });
1296                         return false;
1297                     });
1298                 });
1299             });
1300         });
1301         jQuery('.de-gallery .item').on("click", function() {
1302             $('#navigation').show();
1303         });
1304         // btn arrow up
1305         jQuery(".arrow-up").on("click", function() {
1306             jQuery(".coming-soon .coming-soon-content").fadeOut("medium", function() {
1307                 jQuery("#hide-content").fadeIn(600, function() {
1308                     jQuery('.arrow-up').animate({
1309                         'bottom': '-40px'
1310                     }, "slow");
1311                     jQuery('.arrow-down').animate({
1312                         'top': '0'
1313                     }, "slow");
1314                 });
1315             });
1316         });
1317         // btn arrow down
1318         jQuery(".arrow-down").on("click", function() {
1319             jQuery("#hide-content").fadeOut("slow", function() {
1320                 jQuery(".coming-soon .coming-soon-content").fadeIn(800, function() {
1321                     jQuery('.arrow-up').animate({
1322                         'bottom': '0px'
1323                     }, "slow");
1324                     jQuery('.arrow-down').animate({
1325                         'top': '-40'
1326                     }, "slow");
1327                 });
1328             });
1329         });
1330         /* --------------------------------------------------
1331          after window load
1332          * --------------------------------------------------*/
1333		 
1334        setTimeout(function () {
1335        $("#cookieConsent").fadeIn(400);
1336         }, 2000);
1337        $("#closeCookieConsent, .cookieConsentOK").click(function() {
1338            $("#cookieConsent").fadeOut(400);
1339        }); 
1340
1341         
1342         // one page navigation
1343         /**
1344          * This part causes smooth scrolling using scrollto.js
1345          * We target all a tags inside the nav, and apply the scrollto.js to it.
1346          */
1347         jQuery("#homepage nav a, .scroll-to, .onepage-menu a").on("click", function(evn) {
1348             if (this.href.indexOf('#') != -1) {
1349                 evn.preventDefault();
1350                 jQuery('html,body').scrollTo(this.hash, this.hash);
1351             }
1352         });
1353	
1354		$('.accordion-section-title').click(function(e){
1355         var currentAttrvalue = $(this).data('tab');
1356         if($(e.target).is('.active')){
1357             $(this).removeClass('active');
1358             $('.accordion-section-content:visible').slideUp(300);
1359         } else {
1360             $('.accordion-section-title').removeClass('active').filter(this).addClass('active');
1361             $('.accordion-section-content').slideUp(300).filter(currentAttrvalue).slideDown(300);
1362         }
1363     });
1364		
1365
1366         /* --------------------------------------------------
1367          * window | on resize
1368          * --------------------------------------------------*/
1369         $(window).resize(function() {
1370             init_resize();
1371             centerY();
1372			 grid_gallery();
1373
1374            jQuery('header.header-mobile').stop(true).animate({
1375                'height': '100px'
1376            }, 200, 'easeOutCubic');
1377            mobile_menu_show = 0;
1378 
1379         });
1380         /* --------------------------------------------------
1381          * window | on scroll
1382          * --------------------------------------------------*/
1383         jQuery(window).on("scroll", function() {
1384             /* functions */
1385             header_sticky();
1386             de_counter();
1387             de_progress();
1388             init();
1389             backToTop();
1390             moveItItemNow();
1391			 
1392             /* fade base scroll position */
1393             var target = $('.fadeScroll');
1394             var targetHeight = target.outerHeight();
1395             var scrollPercent = (targetHeight - window.scrollY) / targetHeight;
1396             if (scrollPercent >= 0) {
1397                 target.css('opacity', scrollPercent);
1398             } else {
1399                 target.css('opacity', 0);
1400             }
1401             /* custom page with background on side
1402             jQuery('.side-bg').each(function() {
1403                 jQuery(this).find(".image-container").css("height", jQuery(this).find(".image-container").parent().css("height"));
1404             }); */
1405             /* go to anchor */
1406             jQuery('#mainmenu li a').each(function() {
1407                 var cur = jQuery(this);
1408                 if (this.href.indexOf('#') != -1) {
1409                     var href = jQuery(this).attr('href');
1410					if (location.hash!=="") {
1411						 if (jQuery(window).scrollTop() > jQuery(href).offset().top - 140) {
1412							 clearTimeout($.data(this, "scrollCheck"));
1413							 $.data(this, "scrollCheck", setTimeout(function() {
1414								 jQuery('#mainmenu li a').removeClass('active');
1415								 cur.addClass('active');
1416							 }, 250));
1417
1418						 }
1419					 }
1420                 }
1421             });
1422			 
1423			 // acc
1424			 $('.toggle').click(function(e) {
1425				e.preventDefault();
1426			  
1427				var $this = $(this);
1428			  
1429				if ($this.next().hasClass('show')) {
1430					$this.next().removeClass('show');
1431					$this.next().slideUp(350);
1432				} else {
1433					$this.parent().parent().find('li .inner').removeClass('show');
1434					$this.parent().parent().find('li .inner').slideUp(350);
1435					$this.next().toggleClass('show');
1436					$this.next().slideToggle(350);
1437				}
1438			});
1439
1440
1441
1442         });
1443         $(function() {
1444             "use strict";
1445             var x = 0;
1446             setInterval(function() {
1447                 x -= 1;
1448                 $('.bg-loop').css('background-position', x + 'px 0');
1449             }, 50);
1450         })
1451		 
1452		$(window).on('load', function() {
1453
1454            $("body").show();
1455            load_magnificPopup();
1456            center_xy();
1457            init_de();
1458            init_resize();
1459            de_progress();
1460            video_autosize();
1461            filter_gallery();
1462            masonry();
1463            custom_bg();
1464            menu_arrow();
1465            load_owl();
1466            custom_elements();
1467            init();
1468            sequence();
1469            sequence_a();
1470            load_owl();
1471    		new WOW().init();
1472    		window.dispatchEvent(new Event('resize'));		
1473    		$('.grid').isotope({
1474    			itemSelector: '.grid-item'
1475            });
1476    		grid_gallery();
1477            
1478            //hide preloader after loaded
1479            jQuery('#preloader').delay(500).fadeOut(500);
1480
1481
1482            // new
1483            enquire.register("screen and (min-width: 993px)", {
1484                match: function() {
1485                    mobile_menu_show = 1;
1486                    jQuery("#menu-btn").hide();
1487                },
1488                unmatch: function() {
1489                    mobile_menu_show = 0;
1490                    jQuery("#menu-btn").show();
1491                }
1492            });
1493
1494         });
1495     });
1496 })(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.