PageSourceSearch

https://www.bestuivers.nl/Portals/_default/Skins/Porto/HomeBlue_Home.js?cdv=555

js bestuivers.nl collected 2026-10-01 12:09:22 UTC 92,923 bytes, 3,870 lines download raw bytes

1// Lightbox
2(function (theme, $) {
3
4    theme = theme || {};
5
6    var instanceName = '__lightbox';
7
8    var PluginLightbox = function ($el, opts) {
9        return this.initialize($el, opts);
10    };
11
12    PluginLightbox.defaults = {
13        tClose: 'Close (Esc)', // Alt text on close button
14        tLoading: 'Loading...', // Text that is displayed during loading. Can contain %curr% and %total% keys
15        gallery: {
16            tPrev: 'Previous (Left arrow key)', // Alt text on left arrow
17            tNext: 'Next (Right arrow key)', // Alt text on right arrow
18            tCounter: '%curr% of %total%' // Markup for "1 of 7" counter
19        },
20        image: {
21            tError: '<a href="%url%">The image</a> could not be loaded.' // Error message when image could not be loaded
22        },
23        ajax: {
24            tError: '<a href="%url%">The content</a> could not be loaded.' // Error message when ajax request failed
25        },
26        callbacks: {
27            open: function () {
28                $('body').addClass('lightbox-opened');
29            },
30            close: function () {
31                $('body').removeClass('lightbox-opened');
32            }
33        }
34    };
35
36    PluginLightbox.prototype = {
37        initialize: function ($el, opts) {
38            if ($el.data(instanceName)) {
39                return this;
40            }
41
42            this.$el = $el;
43
44            this
45				.setData()
46				.setOptions(opts)
47				.build();
48
49            return this;
50        },
51
52        setData: function () {
53            this.$el.data(instanceName, this);
54
55            return this;
56        },
57
58        setOptions: function (opts) {
59            this.options = $.extend(true, {}, PluginLightbox.defaults, opts, {
60                wrapper: this.$el
61            });
62
63            return this;
64        },
65
66        build: function () {
67            if (!($.isFunction($.fn.magnificPopup))) {
68                return this;
69            }
70
71            this.options.wrapper.magnificPopup(this.options);
72
73            return this;
74        }
75    };
76
77    // expose to scope
78    $.extend(theme, {
79        PluginLightbox: PluginLightbox
80    });
81
82    // jquery plugin
83    $.fn.themePluginLightbox = function (opts) {
84        return this.map(function () {
85            var $this = $(this);
86
87            if ($this.data(instanceName)) {
88                return $this.data(instanceName);
89            } else {
90                return new PluginLightbox($this, opts);
91            }
92
93        });
94    }
95
96}).apply(this, [window.theme, jQuery]);
97
98// Lightbox
99(function ($) {
100
101    'use strict';
102
103    if ($.isFunction($.fn['themePluginLightbox'])) {
104
105        $(function () {
106            $('[data-plugin-lightbox]:not(.manual), .lightbox:not(.manual)').each(function () {
107                var $this = $(this),
108					opts;
109
110                var pluginOptions = $this.data('plugin-options');
111                if (pluginOptions)
112                    opts = jQuery.parseJSON(pluginOptions.replace(/'/g, '\"'));
113
114                $this.themePluginLightbox(opts);
115            });
116        });
117
118    }
119
120}).apply(this, [jQuery]);/*
121Name: 			Shortcodes - Lightboxes - Examples
122Written by: 	Okler Themes - (http://www.okler.net)
123Theme Version:	3.8.0
124*/
125
126(function( $ ) {
127
128	'use strict';
129
130	/*
131	Popup with video or map
132	*/
133	$('.popup-youtube, .popup-vimeo, .popup-gmaps').magnificPopup({
134		disableOn: 700,
135		type: 'iframe',
136		mainClass: 'mfp-fade',
137		removalDelay: 160,
138		preloader: false,
139
140		fixedContentPos: false
141	});
142
143	/*
144	Dialog with CSS animation
145	*/
146	$('.popup-with-zoom-anim').magnificPopup({
147		type: 'inline',
148
149		fixedContentPos: false,
150		fixedBgPos: true,
151
152		overflowY: 'auto',
153
154		closeBtnInside: true,
155		preloader: false,
156
157		midClick: true,
158		removalDelay: 300,
159		mainClass: 'my-mfp-zoom-in'
160	});
161
162	$('.popup-with-move-anim').magnificPopup({
163		type: 'inline',
164
165		fixedContentPos: false,
166		fixedBgPos: true,
167
168		overflowY: 'auto',
169
170		closeBtnInside: true,
171		preloader: false,
172
173		midClick: true,
174		removalDelay: 300,
175		mainClass: 'my-mfp-slide-bottom'
176	});
177
178	/*
179	Form
180	*/
181	$('.popup-with-form').magnificPopup({
182		type: 'inline',
183		preloader: false,
184		focus: '#name',
185
186		// When elemened is focused, some mobile browsers in some cases zoom in
187		// It looks not nice, so we disable it:
188		callbacks: {
189			open: function() {
190				$('body').addClass('lightbox-opened');
191			},
192			close: function() {
193				$('body').removeClass('lightbox-opened');
194			},
195			beforeOpen: function() {
196				if($(window).width() < 700) {
197					this.st.focus = false;
198				} else {
199					this.st.focus = '#name';
200				}
201			}
202		}
203	});
204
205	/*
206	Ajax
207	*/
208	$('.simple-ajax-popup').magnificPopup({
209		type: 'ajax',
210		callbacks: {
211			open: function() {
212				$('body').addClass('lightbox-opened');
213			},
214			close: function() {
215				$('body').removeClass('lightbox-opened');
216			}
217		}
218	});
219
220}).apply( this, [ jQuery ]);// Progress Bar
221(function (theme, $) {
222
223    theme = theme || {};
224
225    var instanceName = '__progressBar';
226
227    var PluginProgressBar = function ($el, opts) {
228        return this.initialize($el, opts);
229    };
230
231    PluginProgressBar.defaults = {
232        accX: 0,
233        accY: -50,
234        delay: 1
235    };
236
237    PluginProgressBar.prototype = {
238        initialize: function ($el, opts) {
239            if ($el.data(instanceName)) {
240                return this;
241            }
242
243            this.$el = $el;
244
245            this
246				.setData()
247				.setOptions(opts)
248				.build();
249
250            return this;
251        },
252
253        setData: function () {
254            this.$el.data(instanceName, this);
255
256            return this;
257        },
258
259        setOptions: function (opts) {
260            this.options = $.extend(true, {}, PluginProgressBar.defaults, opts, {
261                wrapper: this.$el
262            });
263
264            return this;
265        },
266
267        build: function () {
268            if (!($.isFunction($.fn.appear))) {
269                return this;
270            }
271
272            var self = this,
273				$el = this.options.wrapper,
274				delay = 1;
275
276            $el.appear(function () {
277
278                delay = ($el.attr('data-appear-animation-delay') ? $el.attr('data-appear-animation-delay') : self.options.delay);
279
280                $el.addClass($el.attr('data-appear-animation'));
281
282                setTimeout(function () {
283
284                    $el.animate({
285                        width: $el.attr('data-appear-progress-animation')
286                    }, 1500, 'easeOutQuad', function () {
287                        $el.find('.progress-bar-tooltip').animate({
288                            opacity: 1
289                        }, 500, 'easeOutQuad');
290                    });
291
292                }, delay);
293
294            }, {
295                accX: self.options.accX,
296                accY: self.options.accY
297            });
298
299            return this;
300        }
301    };
302
303    // expose to scope
304    $.extend(theme, {
305        PluginProgressBar: PluginProgressBar
306    });
307
308    // jquery plugin
309    $.fn.themePluginProgressBar = function (opts) {
310        return this.map(function () {
311            var $this = $(this);
312
313            if ($this.data(instanceName)) {
314                return $this.data(instanceName);
315            } else {
316                return new PluginProgressBar($this, opts);
317            }
318
319        });
320    }
321
322}).apply(this, [window.theme, jQuery]);
323
324// Progress Bar
325(function ($) {
326
327    'use strict';
328
329    if ($.isFunction($.fn['themePluginProgressBar'])) {
330
331        $(function () {
332            $('[data-plugin-progress-bar]:not(.manual), [data-appear-progress-animation]').each(function () {
333                var $this = $(this),
334					opts;
335
336                var pluginOptions = $this.data('plugin-options');
337                if (pluginOptions)
338                    opts = jQuery.parseJSON(pluginOptions.replace(/'/g, '\"'));
339
340                $this.themePluginProgressBar(opts);
341            });
342        });
343
344    }
345
346}).apply(this, [jQuery]);
347
348// Animate
349(function (theme, $) {
350
351    theme = theme || {};
352
353    var instanceName = '__animate';
354
355    var PluginAnimate = function ($el, opts) {
356        return this.initialize($el, opts);
357    };
358
359    PluginAnimate.defaults = {
360        accX: 0,
361        accY: -150,
362        delay: 1
363    };
364
365    PluginAnimate.prototype = {
366        initialize: function ($el, opts) {
367            if ($el.data(instanceName)) {
368                return this;
369            }
370
371            this.$el = $el;
372
373            this
374				.setData()
375				.setOptions(opts)
376				.build();
377
378            return this;
379        },
380
381        setData: function () {
382            this.$el.data(instanceName, this);
383
384            return this;
385        },
386
387        setOptions: function (opts) {
388            this.options = $.extend(true, {}, PluginAnimate.defaults, opts, {
389                wrapper: this.$el
390            });
391
392            return this;
393        },
394
395        build: function () {
396            var self = this,
397				$el = this.options.wrapper,
398				delay = 0;
399
400            $el.addClass('appear-animation');
401
402            if (!$('html').hasClass('no-csstransitions') && $(window).width() > 767) {
403
404                $el.appear(function () {
405
406                    delay = ($el.attr('data-appear-animation-delay') ? $el.attr('data-appear-animation-delay') : self.options.delay);
407
408                    if (delay > 1) {
409                        $el.css('animation-delay', delay + 'ms');
410                    }
411
412                    $el.addClass($el.attr('data-appear-animation'));
413
414                    setTimeout(function () {
415                        $el.addClass('appear-animation-visible');
416                    }, delay);
417
418                }, {
419                    accX: self.options.accX,
420                    accY: self.options.accY
421                });
422
423            } else {
424
425                $el.addClass('appear-animation-visible');
426
427            }
428
429            return this;
430        }
431    };
432
433    // expose to scope
434    $.extend(theme, {
435        PluginAnimate: PluginAnimate
436    });
437
438    // jquery plugin
439    $.fn.themePluginAnimate = function (opts) {
440        return this.map(function () {
441            var $this = $(this);
442
443            if ($this.data(instanceName)) {
444                return $this.data(instanceName);
445            } else {
446                return new PluginAnimate($this, opts);
447            }
448
449        });
450    };
451
452}).apply(this, [window.theme, jQuery]);
453
454
455// Animate
456(function ($) {
457
458    'use strict';
459
460    if ($.isFunction($.fn['themePluginAnimate'])) {
461
462        $(function () {
463            $('[data-plugin-animate], [data-appear-animation]').each(function () {
464                var $this = $(this),
465					opts;
466
467                var pluginOptions = $this.data('plugin-options');
468                if (pluginOptions)
469                    opts = jQuery.parseJSON(pluginOptions.replace(/'/g, '\"'));
470
471                $this.themePluginAnimate(opts);
472            });
473        });
474
475    }
476
477}).apply(this, [jQuery]);window.theme = {};
478
479// Counter
480(function (theme, $) {
481
482	theme = theme || {};
483
484	var instanceName = '__counter';
485
486	var PluginCounter = function ($el, opts) {
487		return this.initialize($el, opts);
488	};
489
490	PluginCounter.defaults = {
491		accX: 0,
492		accY: 0,
493		speed: 3000,
494		refreshInterval: 100,
495		decimals: 0,
496		onUpdate: null,
497		onComplete: null
498	};
499
500	PluginCounter.prototype = {
501		initialize: function ($el, opts) {
502			if ($el.data(instanceName)) {
503				return this;
504			}
505
506			this.$el = $el;
507
508			this
509                .setData()
510                .setOptions(opts)
511                .build();
512
513			return this;
514		},
515
516		setData: function () {
517			this.$el.data(instanceName, this);
518
519			return this;
520		},
521
522		setOptions: function (opts) {
523			this.options = $.extend(true, {}, PluginCounter.defaults, opts, {
524				wrapper: this.$el
525			});
526
527			return this;
528		},
529
530		build: function () {
531			if (!($.isFunction($.fn.countTo))) {
532				return this;
533			}
534
535			var self = this,
536                $el = this.options.wrapper;
537
538			$.extend(self.options, {
539				onComplete: function () {
540					if ($el.data('append')) {
541						$el.html($el.html() + $el.data('append'));
542					}
543
544					if ($el.data('prepend')) {
545						$el.html($el.data('prepend') + $el.html());
546					}
547				}
548			});
549
550			$el.appear(function () {
551
552				$el.countTo(self.options);
553
554			}, {
555				accX: self.options.accX,
556				accY: self.options.accY
557			});
558
559			return this;
560		}
561	};
562
563	// expose to scope
564	$.extend(theme, {
565		PluginCounter: PluginCounter
566	});
567
568	// jquery plugin
569	$.fn.themePluginCounter = function (opts) {
570		return this.map(function () {
571			var $this = $(this);
572
573			if ($this.data(instanceName)) {
574				return $this.data(instanceName);
575			} else {
576				return new PluginCounter($this, opts);
577			}
578
579		});
580	}
581
582}).apply(this, [window.theme, jQuery]);
583
584// Match Height
585(function (theme, $) {
586
587	theme = theme || {};
588
589	var instanceName = '__matchHeight';
590
591	var PluginMatchHeight = function ($el, opts) {
592		return this.initialize($el, opts);
593	};
594
595	PluginMatchHeight.defaults = {
596		byRow: true,
597		property: 'height',
598		target: null,
599		remove: false
600	};
601
602	PluginMatchHeight.prototype = {
603		initialize: function ($el, opts) {
604			if ($el.data(instanceName)) {
605				return this;
606			}
607
608			this.$el = $el;
609
610			this
611                .setData()
612                .setOptions(opts)
613                .build();
614
615			return this;
616		},
617
618		setData: function () {
619			this.$el.data(instanceName, this);
620
621			return this;
622		},
623
624		setOptions: function (opts) {
625			this.options = $.extend(true, {}, PluginMatchHeight.defaults, opts, {
626				wrapper: this.$el
627			});
628
629			return this;
630		},
631
632		build: function () {
633			if (!($.isFunction($.fn.matchHeight))) {
634				return this;
635			}
636
637			var self = this;
638
639			self.options.wrapper.matchHeight(self.options);
640
641			return this;
642		}
643
644	};
645
646	// expose to scope
647	$.extend(theme, {
648		PluginMatchHeight: PluginMatchHeight
649	});
650
651	// jquery plugin
652	$.fn.themePluginMatchHeight = function (opts) {
653		return this.map(function () {
654			var $this = $(this);
655
656			if ($this.data(instanceName)) {
657				return $this.data(instanceName);
658			} else {
659				return new PluginMatchHeight($this, opts);
660			}
661
662		});
663	}
664
665}).apply(this, [window.theme, jQuery]);
666
667// Sticky
668(function (theme, $) {
669
670	theme = theme || {};
671
672	var instanceName = '__sticky';
673
674	var PluginSticky = function ($el, opts) {
675		return this.initialize($el, opts);
676	};
677
678	PluginSticky.defaults = {
679		minWidth: 991,
680		activeClass: 'sticky-active'
681	};
682
683	PluginSticky.prototype = {
684		initialize: function ($el, opts) {
685			if ($el.data(instanceName)) {
686				return this;
687			}
688
689			this.$el = $el;
690
691			this
692                .setData()
693                .setOptions(opts)
694                .build();
695
696			return this;
697		},
698
699		setData: function () {
700			this.$el.data(instanceName, this);
701
702			return this;
703		},
704
705		setOptions: function (opts) {
706			this.options = $.extend(true, {}, PluginSticky.defaults, opts, {
707				wrapper: this.$el
708			});
709
710			return this;
711		},
712
713		build: function () {
714			if (!($.isFunction($.fn.pin))) {
715				return this;
716			}
717
718			this.options.wrapper.pin(this.options);
719
720			return this;
721		}
722	};
723
724	// expose to scope
725	$.extend(theme, {
726		PluginSticky: PluginSticky
727	});
728
729	// jquery plugin
730	$.fn.themePluginSticky = function (opts) {
731		return this.map(function () {
732			var $this = $(this);
733
734			if ($this.data(instanceName)) {
735				return $this.data(instanceName);
736			} else {
737				return new PluginSticky($this, opts);
738			}
739
740		});
741	}
742
743}).apply(this, [window.theme, jQuery]);
744
745// Toggle
746(function (theme, $) {
747
748	theme = theme || {};
749
750	var instanceName = '__toggle';
751
752	var PluginToggle = function ($el, opts) {
753		return this.initialize($el, opts);
754	};
755
756	PluginToggle.defaults = {
757		duration: 350,
758		isAccordion: false
759	};
760
761	PluginToggle.prototype = {
762		initialize: function ($el, opts) {
763			if ($el.data(instanceName)) {
764				return this;
765			}
766
767			this.$el = $el;
768
769			this
770                .setData()
771                .setOptions(opts)
772                .build();
773
774			return this;
775		},
776
777		setData: function () {
778			this.$el.data(instanceName, this);
779
780			return this;
781		},
782
783		setOptions: function (opts) {
784			this.options = $.extend(true, {}, PluginToggle.defaults, opts, {
785				wrapper: this.$el
786			});
787
788			return this;
789		},
790
791		build: function () {
792			var self = this,
793                $wrapper = this.options.wrapper,
794                $items = $wrapper.find('.toggle'),
795                $el = null;
796
797			$items.each(function () {
798				$el = $(this);
799
800				if ($el.hasClass('active')) {
801					$el.find('> p').addClass('preview-active');
802					$el.find('> .toggle-content').slideDown(self.options.duration);
803				}
804
805				self.events($el);
806			});
807
808			if (self.options.isAccordion) {
809				self.options.duration = self.options.duration / 2;
810			}
811
812			return this;
813		},
814
815		events: function ($el) {
816			var self = this,
817                previewParCurrentHeight = 0,
818                previewParAnimateHeight = 0,
819                toggleContent = null;
820
821			$el.find('> label, > button').click(function (e) {
822
823				var $this = $(this),
824                    parentSection = $this.parent(),
825                    parentWrapper = $this.parents('.toggle'),
826                    previewPar = null,
827                    closeElement = null;
828
829				if (self.options.isAccordion && typeof (e.originalEvent) != 'undefined') {
830					closeElement = parentWrapper.find('.toggle.active > label,.toggle.active > button');
831
832					if (closeElement[0] == $this[0]) {
833						return;
834					}
835				}
836
837				parentSection.toggleClass('active');
838
839				// Preview Paragraph
840				if (parentSection.find('> p').get(0)) {
841
842					previewPar = parentSection.find('> p');
843					previewParCurrentHeight = previewPar.css('height');
844					previewPar.css('height', 'auto');
845					previewParAnimateHeight = previewPar.css('height');
846					previewPar.css('height', previewParCurrentHeight);
847
848				}
849
850				// Content
851				toggleContent = parentSection.find('> .toggle-content');
852
853				if (parentSection.hasClass('active')) {
854
855					$(previewPar).animate({
856						height: previewParAnimateHeight
857					}, self.options.duration, function () {
858						$(this).addClass('preview-active');
859					});
860
861					toggleContent.slideDown(self.options.duration, function () {
862						if (closeElement) {
863							closeElement.trigger('click');
864						}
865					});
866
867				} else {
868
869					$(previewPar).animate({
870						height: 0
871					}, self.options.duration, function () {
872						$(this).removeClass('preview-active');
873					});
874
875					toggleContent.slideUp(self.options.duration);
876
877				}
878
879			});
880		}
881	};
882
883	// expose to scope
884	$.extend(theme, {
885		PluginToggle: PluginToggle
886	});
887
888	// jquery plugin
889	$.fn.themePluginToggle = function (opts) {
890		return this.map(function () {
891			var $this = $(this);
892
893			if ($this.data(instanceName)) {
894				return $this.data(instanceName);
895			} else {
896				return new PluginToggle($this, opts);
897			}
898
899		});
900	}
901
902}).apply(this, [window.theme, jQuery]);
903
904// Word Rotate
905(function (theme, $) {
906
907	theme = theme || {};
908
909	var instanceName = '__wordRotate';
910
911	var PluginwordRotate = function ($el, opts) {
912		return this.initialize($el, opts);
913	};
914
915	PluginwordRotate.defaults = {
916		delay: 2000,
917		animDelay: 300
918	};
919
920	PluginwordRotate.prototype = {
921		initialize: function ($el, opts) {
922			if ($el.data(instanceName)) {
923				return this;
924			}
925
926			this.$el = $el;
927
928			this
929                .setData()
930                .setOptions(opts)
931                .build();
932
933			return this;
934		},
935
936		setData: function () {
937			this.$el.data(instanceName, this);
938
939			return this;
940		},
941
942		setOptions: function (opts) {
943			this.options = $.extend(true, {}, PluginwordRotate.defaults, opts, {
944				wrapper: this.$el
945			});
946
947			return this;
948		},
949
950		build: function () {
951			var self = this,
952                $el = this.options.wrapper,
953                itemsWrapper = $el.find(".word-rotate-items"),
954                items = itemsWrapper.find("> span"),
955                firstItem = items.eq(0),
956                firstItemClone = firstItem.clone(),
957                currentItem = 1,
958                currentTop = 0,
959                itemWidth = 0;
960
961			itemsWrapper
962                .width(firstItem.width() + "px")
963                .append(firstItemClone);
964
965			$el
966                .addClass("active");
967
968			setInterval(function () {
969
970				currentTop = (currentItem * $el.height());
971				currentItem++;
972
973				if (currentItem <= items.length) {
974					itemWidth = items.eq(currentItem - 1).width();
975				} else {
976					itemWidth = items.eq(0).width();
977				}
978
979				itemsWrapper.animate({
980					top: -(currentTop) + "px",
981					width: itemWidth + "px"
982				}, self.options.animDelay, "easeOutQuad", function () {
983
984					if (currentItem > items.length) {
985
986						itemsWrapper.css("top", 0);
987						currentItem = 1;
988
989					}
990
991				});
992
993			}, self.options.delay);
994
995			return this;
996		}
997	};
998
999	// expose to scope
1000	$.extend(theme, {
1001		PluginwordRotate: PluginwordRotate
1002	});
1003
1004	// jquery plugin
1005	$.fn.themePluginwordRotate = function (opts) {
1006		return this.map(function () {
1007			var $this = $(this);
1008
1009			if ($this.data(instanceName)) {
1010				return $this.data(instanceName);
1011			} else {
1012				return new PluginwordRotate($this, opts);
1013			}
1014
1015		});
1016	}
1017
1018}).apply(this, [window.theme, jQuery]);
1019
1020// Loading Overlay
1021(function (theme, $) {
1022
1023	'use strict';
1024
1025	theme = theme || {};
1026
1027	var loadingOverlayTemplate = [
1028        '<div class="loading-overlay">',
1029        '<div class="loader"></div>',
1030        '</div>'
1031	].join('');
1032
1033	var LoadingOverlay = function ($wrapper, options) {
1034		return this.initialize($wrapper, options);
1035	};
1036
1037	LoadingOverlay.prototype = {
1038
1039		options: {
1040			css: {}
1041		},
1042
1043		initialize: function ($wrapper, options) {
1044			this.$wrapper = $wrapper;
1045
1046			this
1047                .setVars()
1048                .setOptions(options)
1049                .build()
1050                .events();
1051
1052			this.$wrapper.data('loadingOverlay', this);
1053		},
1054
1055		setVars: function () {
1056			this.$overlay = this.$wrapper.find('.loading-overlay');
1057
1058			return this;
1059		},
1060
1061		setOptions: function (options) {
1062			if (!this.$overlay.get(0)) {
1063				this.matchProperties();
1064			}
1065			this.options = $.extend(true, {}, this.options, options);
1066			this.loaderClass = this.getLoaderClass(this.options.css.backgroundColor);
1067
1068			return this;
1069		},
1070
1071		build: function () {
1072			if (!this.$overlay.closest(document.documentElement).get(0)) {
1073				if (!this.$cachedOverlay) {
1074					this.$overlay = $(loadingOverlayTemplate).clone();
1075
1076					if (this.options.css) {
1077						this.$overlay.css(this.options.css);
1078						this.$overlay.find('.loader').addClass(this.loaderClass);
1079					}
1080				} else {
1081					this.$overlay = this.$cachedOverlay.clone();
1082				}
1083
1084				this.$wrapper.append(this.$overlay);
1085			}
1086
1087			if (!this.$cachedOverlay) {
1088				this.$cachedOverlay = this.$overlay.clone();
1089			}
1090
1091			return this;
1092		},
1093
1094		events: function () {
1095			var _self = this;
1096
1097			if (this.options.startShowing) {
1098				_self.show();
1099			}
1100
1101			if (this.$wrapper.is('body') || this.options.hideOnWindowLoad) {
1102				$(window).on('load error', function () {
1103					_self.hide();
1104				});
1105			}
1106
1107			if (this.options.listenOn) {
1108				$(this.options.listenOn)
1109                    .on('loading-overlay:show beforeSend.ic', function (e) {
1110                    	e.stopPropagation();
1111                    	_self.show();
1112                    })
1113                    .on('loading-overlay:hide complete.ic', function (e) {
1114                    	e.stopPropagation();
1115                    	_self.hide();
1116                    });
1117			}
1118
1119			this.$wrapper
1120                .on('loading-overlay:show beforeSend.ic', function (e) {
1121                	e.stopPropagation();
1122                	_self.show();
1123                })
1124                .on('loading-overlay:hide complete.ic', function (e) {
1125                	e.stopPropagation();
1126                	_self.hide();
1127                });
1128
1129			return this;
1130		},
1131
1132		show: function () {
1133			this.build();
1134
1135			this.position = this.$wrapper.css('position').toLowerCase();
1136			if (this.position != 'relative' || this.position != 'absolute' || this.position != 'fixed') {
1137				this.$wrapper.css({
1138					position: 'relative'
1139				});
1140			}
1141			this.$wrapper.addClass('loading-overlay-showing');
1142		},
1143
1144		hide: function () {
1145			var _self = this;
1146
1147			this.$wrapper.removeClass('loading-overlay-showing');
1148			setTimeout(function () {
1149				if (this.position != 'relative' || this.position != 'absolute' || this.position != 'fixed') {
1150					_self.$wrapper.css({
1151						position: ''
1152					});
1153				}
1154			}, 500);
1155		},
1156
1157		matchProperties: function () {
1158			var i,
1159                l,
1160                properties;
1161
1162			properties = [
1163                'backgroundColor',
1164                'borderRadius'
1165			];
1166
1167			l = properties.length;
1168
1169			for (i = 0; i < l; i++) {
1170				var obj = {};
1171				obj[properties[i]] = this.$wrapper.css(properties[i]);
1172
1173				$.extend(this.options.css, obj);
1174			}
1175		},
1176
1177		getLoaderClass: function (backgroundColor) {
1178			if (!backgroundColor || backgroundColor === 'transparent' || backgroundColor === 'inherit') {
1179				return 'black';
1180			}
1181
1182			var hexColor,
1183                r,
1184                g,
1185                b,
1186                yiq;
1187
1188			var colorToHex = function (color) {
1189				var hex,
1190                    rgb;
1191
1192				if (color.indexOf('#') > -1) {
1193					hex = color.replace('#', '');
1194				} else {
1195					rgb = color.match(/\d+/g);
1196					hex = ('0' + parseInt(rgb[0], 10).toString(16)).slice(-2) + ('0' + parseInt(rgb[1], 10).toString(16)).slice(-2) + ('0' + parseInt(rgb[2], 10).toString(16)).slice(-2);
1197				}
1198
1199				if (hex.length === 3) {
1200					hex = hex + hex;
1201				}
1202
1203				return hex;
1204			};
1205
1206			hexColor = colorToHex(backgroundColor);
1207
1208			r = parseInt(hexColor.substr(0, 2), 16);
1209			g = parseInt(hexColor.substr(2, 2), 16);
1210			b = parseInt(hexColor.substr(4, 2), 16);
1211			yiq = ((r * 299) + (g * 587) + (b * 114)) / 1000;
1212
1213			return (yiq >= 128) ? 'black' : 'white';
1214		}
1215
1216	};
1217
1218	// expose to scope
1219	$.extend(theme, {
1220		LoadingOverlay: LoadingOverlay
1221	});
1222
1223	// expose as a jquery plugin
1224	$.fn.loadingOverlay = function (opts) {
1225		return this.each(function () {
1226			var $this = $(this);
1227
1228			var loadingOverlay = $this.data('loadingOverlay');
1229			if (loadingOverlay) {
1230				return loadingOverlay;
1231			} else {
1232				var options = opts || $this.data('loading-overlay-options') || {};
1233				return new LoadingOverlay($this, options);
1234			}
1235		});
1236	}
1237
1238	// auto init
1239	$(function () {
1240		$('[data-loading-overlay]').loadingOverlay();
1241	});
1242
1243}).apply(this, [window.theme, jQuery]);
1244
1245// Nav
1246(function (theme, $) {
1247
1248	theme = theme || {};
1249
1250	var initialized = false;
1251
1252	$.extend(theme, {
1253
1254		Nav: {
1255
1256			defaults: {
1257				wrapper: $('#mainMenu'),
1258				scrollDelay: 600,
1259				scrollAnimation: 'easeOutQuad'
1260			},
1261
1262			initialize: function ($wrapper, opts) {
1263				if (initialized) {
1264					return this;
1265				}
1266
1267				initialized = true;
1268				this.$wrapper = ($wrapper || this.defaults.wrapper);
1269
1270				this
1271                    .setOptions(opts)
1272                    .build()
1273                    .events();
1274
1275				return this;
1276			},
1277
1278			setOptions: function (opts) {
1279				this.options = $.extend(true, {}, this.defaults, opts, this.$wrapper.data('plugin-options'));
1280
1281				return this;
1282			},
1283
1284			build: function () {
1285
1286				return this;
1287			},
1288
1289			events: function () {
1290				var self = this,
1291                    target = "",
1292                    delay = 1,
1293                    $header = $('header'),
1294                    headerHeight = $header.outerHeight(),
1295                    $nav = $('.nav-main'),
1296                    $body = $('body');
1297
1298				$header.find('[href=#]').on('click', function (e) {
1299					e.preventDefault();
1300				});
1301
1302				$('ul.image-gallery').parent('.row').css('display', 'block');
1303
1304
1305				//DNN 9
1306
1307				if ($('.personalBarContainer').length && $('.full-header').length)
1308					$('header.full-header').css('margin-left', '-80px');
1309
1310				//LSF Widgets
1311				function changeWidgets() {
1312					if ($("header").hasClass("flat-header"))
1313						$(".mini-widgets").addClass("brd-top");
1314
1315					else if ($("header").hasClass("clean-top"))
1316						$(".mini-widgets").addClass("bg-color-light brd-top");
1317
1318					if ($(window).width() > 991) {
1319
1320						if ($("header").hasClass("darken-top-border"))
1321							$(".mini-widgets").addClass("darken-border-top");
1322
1323						if ($(".mini-widgets").find(".DNNEmptyPane").length != 3) {
1324							if ($("header").hasClass("colored"))
1325								$(".mini-widgets").addClass("bg-color-primary");
1326
1327							else if ($("header").hasClass("newHeader") && !$("header").hasClass("fixedheader")) {
1328								$(".mini-widgets").addClass("widget-overlap")
1329								$(".newHeader").css("margin-top", $(".mini-widgets").height());
1330							}
1331
1332							else if ($("header").hasClass("header-bottom")) {
1333								$(".mini-widgets").addClass("widget-overlap")
1334								$(".header-bottom").css("margin-top", $(".mini-widgets").height());
1335							}
1336
1337							else if ($("header").hasClass("full-header") && !$("header").hasClass("fixedheader")) {
1338								$(".mini-widgets").find(".container").addClass("container-fluid").removeClass("container");
1339								$(".mini-widgets").addClass("widget-overlap bg-color-dark").css("padding-right", "40px");
1340								$(".full-header").css("margin-top", $(".mini-widgets").height());
1341							}
1342
1343							if ($("body").hasClass("dnnEditState")) {
1344								$(".mini-widgets").removeClass("widget-overlap");
1345								$("header").css("margin-top", "0");
1346							}
1347						}
1348					}
1349					else {
1350						$("header").removeClass("mt-55 mt-38 mt-32")
1351						$(".mini-widgets").removeClass("widget-overlap bg-color-dark darken-border-top");
1352					}
1353				}
1354
1355				changeWidgets();
1356
1357				//Skip To Content
1358				$("#SkipContent a").click(function (e) {
1359					e.preventDefault();
1360					var target = $(this).attr("href");
1361					window.scrollTo(0, $("#" + target).offset().top - 100);
1362				});
1363
1364				//VerticalMenu
1365
1366				$vMenu = $('#verticalMenu');
1367
1368				if ($vMenu.length > 0)
1369					$vMenu.find('.dropdown-toggle, .dropdown:not(.mega-menu-item) .dropdown-submenu > a').append($('<i />').addClass('fas fa-caret-down'));
1370
1371				$('.nav-main').find('.dropdown-toggle[href="#"], .dropdown-submenu [href="#"], .dropdown-toggle[href!="#"] .fa-caret-down, .dropdown-submenu a[href!="#"] .fa-caret-down').on('click', function (e) {
1372
1373					e.preventDefault();
1374
1375					if ($(window).width() > 991 && $(this).parents('#verticalMenu').length < 0)
1376						return this;
1377
1378					$(this).parent().parent().toggleClass('resp-active');
1379
1380					return this;
1381				});
1382
1383				function changeVerticalMenu() {
1384
1385					if ($(window).width() < 992) {
1386						if ($('body').hasClass('v-hamburger'))
1387							$('.v-menu').addClass('hamburger');
1388					} else
1389						$('.v-menu').removeClass('hamburger');
1390
1391					if ($('.v-menu').hasClass('hamburger')) {
1392						$('.btn-vertical-nav').show();
1393						$('.nav-main-vertical').hide();
1394					} else {
1395						$('.btn-vertical-nav').hide();
1396						$('.nav-main-vertical').show();
1397					}
1398				}
1399
1400				$('.btn-vertical-nav').click(function () {
1401					$('.nav-main-vertical').slideToggle('slow');
1402				});
1403
1404				//Vertical Menu Keyboard Focus
1405				$('.v-menu nav ul.nav-main > li > a').keyup(function (e) {
1406					if (e.keyCode == 9) {
1407						if ($('.v-menu .dropdown').hasClass('resp-active'))
1408							$('.v-menu .dropdown').removeClass('resp-active');
1409						$(this).siblings('.dropdown-menu').parent().addClass('resp-active');
1410					}
1411				});
1412
1413				$('.v-menu .dropdown-submenu > a').keyup(function (e) {
1414					if (e.keyCode == 9) {
1415						if ($('.v-menu .dropdown-submenu').hasClass('resp-active'))
1416							$('.v-menu .dropdown-submenu').removeClass('resp-active');
1417						$(this).siblings('.dropdown-menu').parent().addClass('resp-active');
1418					}
1419				});
1420
1421				changeVerticalMenu();
1422
1423				//Accordion
1424				$('.panel-group .accordion-body.collapse').each(function () {
1425					if ($(this).hasClass('in'))
1426						$(this).removeClass('in').addClass('show')
1427				});
1428
1429				//Toggle
1430				$('a[data-toggle="tab"]').on("shown.bs.tab", function (a) {
1431					$(this).parents(".nav-tabs").find(".active").removeClass("active"),
1432						$(this).addClass("active").parent().addClass("active")
1433				});
1434
1435				//Toggle Keyboard Focus
1436				$('.toggle-heading').keyup(function (e) {
1437					if (e.keyCode == 9) {
1438						$(this).trigger('click');
1439					}
1440				});
1441
1442				//Search
1443				var $search = $('.search .searchInputContainer');
1444				var inputid = $search.find('input').attr('id');
1445				$search.append('<label class="sr-only" for="' + inputid + '">Search</label>');
1446				$search.parent().find('.icon-search').text('Search').css("text-indent", "-9999px");
1447
1448				//Mini Search
1449				var $searchBlock = $('.search-block .searchInputContainer');
1450				var inputid = $searchBlock.find('input').attr('id');
1451				$searchBlock.append('<label class="sr-only" for="' + inputid + '">Mini Search</label>');
1452				$searchBlock.parent().find('.icon-search').text('Search').css("text-indent", "-9999px");
1453
1454				function showSearch() {
1455					if ($(window).width() < 992) {
1456						if ($('header .search-block').children().length > 0)
1457							$('header .mini-search').show();
1458						else
1459							$('header .mini-search').hide();
1460					}
1461				}
1462
1463				//Header Height
1464				headerBodyHeight = $('header .header-body').outerHeight();
1465
1466				//Mini Search Animate in Mobile 
1467				function animateSearch() {
1468
1469					if ($(window).width() < 992) {
1470
1471						$('header .search-block').on('show.bs.collapse', function () {
1472
1473							$('.header-body').animate({
1474								'min-height': ($('.search-block').outerHeight() + $('.header-body').outerHeight())
1475							}, 500);
1476
1477							$('.header-body').css("overflow", "hidden");
1478							$("header .navbar-collapse").removeClass("show");
1479							$("header .btn-responsive-nav").find("em").removeClass("fa-times").addClass("fa-bars");
1480						});
1481
1482						$('header .search-block').on('hide.bs.collapse', function () {
1483							$('.header-body').animate({
1484								'min-height': headerBodyHeight
1485							}, 250);
1486						});
1487
1488						$('header .search-block').on('hidden.bs.collapse', function () {
1489							setTimeout(function () {
1490								$('.header-body').removeAttr("style");
1491							}, 270);
1492						});
1493					}
1494				}
1495
1496				showSearch();
1497				animateSearch();
1498
1499				//Menu Type
1500				if ($nav.hasClass('ddrmenu'))
1501					$nav.parents('header').addClass('ddrheader');
1502
1503				if ($nav.hasClass('overlay'))
1504					$nav.parents('header').addClass('overlayHeader');
1505
1506				if ($nav.hasClass('push-down'))
1507					$nav.parents('header').addClass('inlineHeader');
1508
1509				if ($nav.hasClass('pushdown'))
1510					$nav.parents('header').addClass('pushdownHeader');
1511
1512				if ($('.navbar-collapse').hasClass('slidebar'))
1513					$('header').addClass('slideHeader');
1514
1515
1516				//Dropdown Menu Keyboard Focus
1517				$(document).click(function () {
1518					$('.dropdown').removeClass('focused');
1519					$('.dropdown-submenu').removeClass('focused');
1520				});
1521
1522				$('header .nav > li > a').focus(function () {
1523					if ($('.dropdown').hasClass('focused'))
1524						$('.dropdown').removeClass('focused');
1525					$('.dropdown-submenu').removeClass('focused');
1526					$(this).siblings('.dropdown-menu').parent().addClass('focused');
1527				});
1528
1529				$('header .dropdown-submenu > a').focus(function () {
1530					if ($('.dropdown-submenu').hasClass('focused'))
1531						$('.dropdown-submenu').removeClass('focused');
1532					$(this).siblings('.dropdown-menu').parent().addClass('focused');
1533				});
1534
1535
1536				//Header Animate in Mobile 
1537				function animateHeader() {
1538
1539					if ($(window).width() < 992) {
1540
1541						if ($('header').hasClass('ddrheader')) {
1542
1543							$('header .navbar-collapse').on('show.bs.collapse', function () {
1544
1545								$('header .header-body').css('max-height', $('header').outerHeight() + 330);
1546
1547								$('.header-body').animate({
1548									'min-height': ($('.navbar-collapse').height() + $('.header-body').outerHeight()),
1549								}, 500);
1550
1551								$('.header-body').css("overflow", "hidden");
1552								$("header .search-block").removeClass("show");
1553							});
1554
1555							$('header .navbar-collapse').on('hide.bs.collapse', function () {
1556								$('.header-body').animate({
1557									'min-height': headerBodyHeight
1558								}, 250);
1559							});
1560
1561							$('header .navbar-collapse').on('hidden.bs.collapse', function () {
1562								setTimeout(function () {
1563									$('.header-body').removeAttr("style");
1564								}, 270);
1565							});
1566
1567						}
1568
1569						else if ($('header').hasClass('pushdownHeader')) {
1570							$('header .navbar-collapse').on('show.bs.collapse', function () {
1571
1572								$('header .header-body').css('max-height', $('header').outerHeight() + 330);
1573
1574								$('.header-body').animate({
1575									'min-height': ($('.pushdown.nav-main-collapse-push').height() + $('.header-body').outerHeight())
1576								}, 500);
1577
1578								$('.header-body .nav-main-collapse').animate({
1579									'height': '100%'
1580								});
1581
1582								$('.header-body').css("overflow", "hidden");
1583								$("header .search-block").removeClass("show");
1584							});
1585
1586							$('header .navbar-collapse').on('hide.bs.collapse', function () {
1587								$('.header-body').animate({
1588									'min-height': headerBodyHeight
1589								}, 250);
1590							});
1591
1592							$('header .navbar-collapse').on('hidden.bs.collapse', function () {
1593								setTimeout(function () {
1594									$('.header-body').removeAttr("style");
1595								}, 270);
1596							});
1597						}
1598					}
1599					else {
1600						$('.header-body').css('height', 'auto');
1601					}
1602				}
1603
1604				animateHeader();
1605
1606				// Setup Menu
1607				$('.btn-responsive-nav').click(function () {
1608
1609					if ($('header').hasClass('overlayHeader')) {
1610
1611						$body.addClass('overlay-effect');
1612
1613						if ($('header .close-btn').length == 0) {
1614							var close = $('<button type="button" class="close-btn"><em class="fas fa-times"></em></button>');
1615							$('header .btn-responsive-nav').before(close);
1616						}
1617
1618						$('.overlay-effect .overlayHeader .close-btn').click(function () {
1619							if ($('body').hasClass('overlay-effect'))
1620								overlayHeader($('.overlayHeader'), false);
1621						});
1622					} else
1623						$(this).find('.fas').toggleClass('fa-bars fa-times');
1624
1625					if ($nav.hasClass('push-down'))
1626						inlineHeader(false);
1627
1628				});
1629
1630				//Overlay Menu
1631
1632				$('.overlayHeader .overlay-dropdown a .fa-caret-right').click(function (e) {
1633					e.preventDefault();
1634				});
1635
1636				$('.overlayHeader .overlay-dropdown > a').click(function () {
1637
1638					$('.overlayHeader .overlay').removeClass('animate-menu');
1639
1640					$('.overlayHeader .overlay .nav').hide("drop", {
1641						direction: "right"
1642					}, 50);
1643					$('.overlayHeader .overlay .nav').show("drop", {
1644						direction: "right"
1645					}).delay(100);
1646
1647					$('.overlayHeader .overlay .nav').addClass('dl-subview');
1648					$(this).parent().addClass('dl-subviewopen');
1649				});
1650
1651				$('.overlayHeader .overlay-dropdown-submenu > a').click(function () {
1652
1653					$('.overlayHeader .overlay').removeClass('animate-menu');
1654
1655					$(this).parents().removeClass('dl-subviewopen');
1656
1657					$('.overlayHeader .overlay .nav').hide("drop", {
1658						direction: "right"
1659					}, 50);
1660					$('.overlayHeader .overlay .nav').show("drop", {
1661						direction: "right"
1662					}).delay(100);
1663
1664					$('.overlayHeader .overlay-menu').addClass('dl-menu');
1665					$(this).parent().addClass('dl-submenu');
1666					$(this).parent().parent().parent().addClass('dl-menuopen dl-subview');
1667				});
1668
1669				$('.overlayHeader .overlay .icon-back').click(function () {
1670
1671					if ($('.overlayHeader .overlay li').hasClass('dl-menuopen')) {
1672
1673						$('.overlayHeader .overlay li.dl-subview').addClass('dl-subviewopen').removeClass('dl-subview dl-menuopen');
1674						$('.overlayHeader .overlay ul').removeClass('dl-menu');
1675						$('.overlayHeader .overlay li').removeClass('dl-submenu');
1676						$('.overlayHeader .overlay').addClass('animate-menu');
1677					} else if ($('.overlayHeader .overlay li').hasClass('dl-subviewopen')) {
1678
1679						$('.overlayHeader').find(".animate-menu").removeClass('animate-menu');
1680
1681						setTimeout(function () {
1682							$('.overlayHeader .overlay ul').removeClass('dl-subview');
1683							$('.overlayHeader .overlay li').removeClass('dl-subviewopen');
1684							$('.overlayHeader .overlay').addClass('animate-menu');
1685						}, 50);
1686					}
1687				});
1688
1689				//Inline Menu
1690
1691				$(".inline-menu.nav-main .nav").hide();
1692
1693				$('.inlineHeader .push-menu a .fa-caret-right').click(function (e) {
1694					e.preventDefault();
1695				});
1696
1697				$('.menu-set > a').click(function () {
1698
1699					$('.push-menu').removeClass('push-animate');
1700
1701					$('.push-menu .nav').hide("drop", {
1702						direction: "right"
1703					}, 50);
1704					$('.push-menu .nav').show("drop", {
1705						direction: "right"
1706					}).delay(100);
1707
1708					$('.push-menu ul.nav').addClass('dl-subview');
1709					$(this).parent().addClass('dl-subviewopen');
1710				});
1711
1712				$('li.menu-set > ul.pushdown-menu > li.pushdown-sub  > a').click(function () {
1713
1714					$('.push-menu .push-down').removeClass('push-animate');
1715
1716					$('ul.pushdown-menu').addClass('subview');
1717					$(this).parent().addClass('subviewopen');
1718
1719					$('.push-menu .nav').hide("drop", {
1720						direction: "right"
1721					}, 50);
1722					$('.push-menu .nav').show("drop", {
1723						direction: "right"
1724					}).delay(100);
1725				});
1726
1727				$('li.pushdown-sub-menu > a').click(function () {
1728
1729					$('.push-menu .push-down').removeClass('push-animate');
1730
1731					$(this).parent().parent().addClass('sub-view');
1732					$(this).parent().addClass('open');
1733
1734					$('.push-menu .nav').hide("drop", {
1735						direction: "right"
1736					}, 50);
1737					$('.push-menu .nav').show("drop", {
1738						direction: "right"
1739					}).delay(100);
1740				});
1741
1742				$('.backicon').click(function () {
1743
1744					if ($('li.pushdown-sub').hasClass('subviewopen')) {
1745
1746						$('li.pushdown-sub').removeClass('subviewopen');
1747						$('ul.pushdown-menu').removeClass('subview');
1748						$('.push-down').addClass('push-animate');
1749					} else if ($('li').hasClass('dl-subviewopen')) {
1750
1751						$('.push-menu').find(".push-animate").removeClass('push-animate');
1752
1753						setTimeout(function () {
1754							$('ul').removeClass('dl-subview');
1755							$('li').removeClass('dl-subviewopen');
1756							$('.push-down').addClass('push-animate');
1757						}, 100);
1758					}
1759				});
1760
1761				//Pushdown Menu
1762
1763				$(".pushdownHeader .btn-responsive-nav").hide();
1764				$(".pushdown .scrollbar").hide();
1765
1766				$(".nav-main.pushdown").addClass("collapse");
1767
1768				if ($(".pushdownHeader").length > 0)
1769					$(".nav-main-collapse").removeClass("collapse");
1770
1771				if ($nav.hasClass('pushdown')) {
1772					$(".btn-push-nav").click(function () {
1773						pushdownMenu();
1774						$(".pushdown .scrollbar").show();
1775					});
1776				}
1777
1778				$('nav.pushdown ul.nav-main li a').click(function () {
1779					$(this).parent().toggleClass('resp-active');
1780				});
1781
1782				$(window).on('scroll resize', function () {
1783					$(".pushdownHeader .btn-responsive-nav").hide();
1784				});
1785
1786				if ($(".pushdownHeader").length > 0) {
1787
1788					if (($header.hasClass('flat-header')) || ($header.hasClass('newHeader'))) {
1789						$('header div.social-icons').css('margin-right', '40px');
1790					}
1791				}
1792
1793				//Resize
1794				$(window).on('resize', function () {
1795					changeVerticalMenu();
1796					showSearch();
1797					animateSearch();
1798					animateHeader();
1799					changeWidgets();
1800				});
1801
1802				// Add Arrows
1803				if ($(window).width() > 991)
1804					$header.find('.dropdown-toggle, .dropdown:not(.mega-menu-item) .dropdown-submenu > a').append($('<i />').addClass('fas fa-caret-down'));
1805				else
1806					$header.find('.dropdown-toggle, .dropdown .dropdown-submenu > a').append($('<i />').addClass('fas fa-caret-down'));
1807
1808				if ($(window).width() < 992) {
1809					$(".navbar-collapse ul li.mega-menu-item").each(function () {
1810						if (!$(this).find(".dropdown-menu > li").length)
1811							$(this).find(".fa-caret-down").hide();
1812					});
1813				}
1814
1815				// Mobile Arrows
1816				$header.find('.dropdown-toggle[href="#"], .dropdown-submenu [href="#"], .dropdown-toggle[href!="#"] .fa-caret-down, .dropdown-submenu a[href!="#"] .fa-caret-down').on('click', function (e) {
1817					e.preventDefault();
1818
1819					if ($(window).width() < 992) {
1820
1821						$(this).closest('li').toggleClass('opened');
1822
1823						if ($(this).closest('li').hasClass('opened')) {
1824							$('header.ddrheader .header-body').css({
1825								"height": $(this).closest('li').height() + $('.header-body').height(),
1826								"max-height": parseInt($('header').css('min-height')) + 330
1827							});
1828						}
1829						else {
1830							setTimeout(function () {
1831								$('header.ddrheader .header-body').css({
1832									"height": "auto",
1833									"min-height": $('.navbar-collapse').height() + parseInt($('header').css('min-height')),
1834									"max-height": $('.navbar-collapse').height() + parseInt($('header').css('min-height'))
1835								});
1836							}, 100);
1837						}
1838					}
1839				});
1840
1841				// Anchors Position
1842				$('[data-hash]').each(function () {
1843
1844					var target = $(this).attr('href'),
1845						offset = ($(this).is("[data-hash-offset]") ? $(this).data('hash-offset') : 0);
1846
1847					if ($(target).get(0)) {
1848						$(this).on('click', function (e) {
1849							e.preventDefault();
1850
1851							if (!$(e.target).is('i')) {
1852
1853								// Close Collapse if Opened
1854								$(this).parents('.collapse.show').collapse('hide');
1855
1856								self.scrollToTarget(target, offset);
1857							}
1858							return;
1859						});
1860					}
1861				});
1862
1863				// Mobile Redirect - (Ignores the Dropdown from Bootstrap)
1864				$('.mobile-redirect').on('click', function () {
1865					if ($(window).width() < 992) {
1866						self.location = $(this).attr('href');
1867					}
1868				});
1869
1870				// Dropdown Menu Check Visible Space
1871				$("#mainMenu li.dropdown").hover(function () {
1872
1873					if ($(window).width() < 767) return;
1874
1875					var menuItem = $(this);
1876					var subMenu = $(this).find("> ul.dropdown-menu");
1877
1878					var screenWidth = $(window).width(),
1879						menuItemWidth = menuItem.width(),
1880						subMenuWidth = subMenu.width(),
1881						menuItemPosRight = subMenu.offset().left + subMenu.width();
1882
1883					if (menuItemPosRight > screenWidth) {
1884						subMenu.css("margin-left", "-" + ((subMenuWidth - menuItemWidth) + 10) + "px");
1885						subMenu.css('border-radius', '0');
1886					} else
1887						subMenu.css("margin-left", '2px');
1888				});
1889
1890				// Submenu Check Visible Space
1891				$("#mainMenu li.dropdown-submenu").hover(function () {
1892
1893					if ($(window).width() < 767) return;
1894
1895					var subMenu = $(this).find("ul.dropdown-menu");
1896
1897					if (!subMenu.get(0)) return;
1898
1899					var screenWidth = $(window).width(),
1900						subMenuWidth = subMenu.width(),
1901						subMenuParentWidth = $(this).parent().width(),
1902						subMenuPosRight = subMenu.offset().left + subMenu.width();
1903
1904					if (subMenuPosRight > screenWidth)
1905						subMenu.css("margin-left", "-" + (subMenuParentWidth + subMenuWidth + 10) + "px");
1906					else
1907						subMenu.css("margin-left", 0);
1908				});
1909
1910				return this;
1911			},
1912
1913			scrollToTarget: function (target, offset) {
1914				var self = this;
1915
1916				$('body').addClass('scrolling');
1917
1918				$('html, body').animate({
1919					scrollTop: $(target).offset().top - offset
1920				}, self.options.scrollDelay, self.options.scrollAnimation, function () {
1921					$('body').removeClass('scrolling');
1922				});
1923
1924				return this;
1925
1926			}
1927
1928		}
1929
1930	});
1931
1932}).apply(this, [window.theme, jQuery]);
1933
1934// Sticky Menu
1935(function (theme, $) {
1936
1937	theme = theme || {};
1938
1939	var initialized = false;
1940
1941	$.extend(theme, {
1942
1943		StickyMenu: {
1944
1945			defaults: {
1946				wrapper: $('header'),
1947				stickyEnabled: true,
1948				stickyEnableOnBoxed: true,
1949				stickyEnableOnMobile: true,
1950				stickyWithGap: true,
1951				stickyChangeLogoSize: true,
1952				stickyBodyPadding: false,
1953				menuAfterHeader: false,
1954				alwaysStickyEnabled: false,
1955				stickyForceHeaderTop: false,
1956				logoPaddingTop: 28,
1957				logoSmallHeight: 40
1958			},
1959
1960			initialize: function ($wrapper, opts, sw) {
1961				if (!sw && initialized) {
1962					return this;
1963				}
1964
1965				initialized = true;
1966				this.$wrapper = ($wrapper || this.defaults.wrapper);
1967
1968				this
1969			.setOptions(opts)
1970			.build()
1971			.events();
1972
1973				return this;
1974			},
1975
1976			setOptions: function (opts) {
1977				this.options = $.extend(true, {}, this.defaults, opts, this.$wrapper.data('plugin-options'));
1978
1979				return this;
1980			},
1981
1982			build: function () {
1983				if (!this.options.stickyEnableOnBoxed && $('body').hasClass('boxed') || !this.options.stickyEnabled) {
1984					return this;
1985				}
1986
1987				var self = this,
1988					$window = $(window);
1989				$body = $('body'),
1990				$header = self.$wrapper,
1991				$headerContainer = $header.parent(),
1992				$headerNavItems = $header.find('ul.nav-main > li > a'),
1993				$logoWrapper = $header.find('.logo'),
1994				$logo = $logoWrapper.find('img'),
1995				logoHeight = $logo.height(),
1996				logoPaddingTop = parseInt($logo.attr('data-sticky-padding') ? $logo.attr('data-sticky-padding') : self.options.logoPaddingTop),
1997				logoSmallHeight = parseInt($logo.attr('data-sticky-height') ? $logo.attr('data-sticky-height') : self.options.logoSmallHeight),
1998				headerHeight = $header.height(),
1999				stickyGap = 0;
2000
2001				if (logoHeight == 0) {
2002					setTimeout(function () {
2003						logoHeight = $logo.height();
2004					}, 400);
2005				} else {
2006
2007					if ($('header').outerHeight() > 0)
2008						$('header').css('min-height', $('header').outerHeight());
2009				}
2010
2011				if (this.options.menuAfterHeader) {
2012					$headerContainer.css('min-height', $header.height());
2013				}
2014
2015				$window.afterResize(function () {
2016					$headerContainer.css('min-height', $header.height());
2017				});
2018
2019				self.checkStickyMenu = function () {
2020
2021					if ((!self.options.stickyEnableOnBoxed && $body.hasClass('boxed')) || ($window.width() < 991 && !self.options.stickyEnableOnMobile)) {
2022						self.stickyMenuDeactivate();
2023						$header.removeClass('fixed')
2024						return false;
2025					}
2026
2027					if (self.options.stickyWithGap && headerHeight > 0) {
2028						stickyGap = ((headerHeight - 15) - logoSmallHeight);
2029					} else {
2030						stickyGap = 0;
2031					}
2032
2033					// Menu After Header
2034					if (!this.options.menuAfterHeader) {
2035
2036						if ($window.scrollTop() > stickyGap) {
2037							self.stickyMenuActivate();
2038						} else {
2039							self.stickyMenuDeactivate();
2040						}
2041
2042					} else {
2043
2044						if ($window.scrollTop() > $headerContainer.offset().top) {
2045							$header.addClass('fixed');
2046						} else {
2047							$header.removeClass('fixed');
2048						}
2049
2050					}
2051
2052				}
2053
2054				self.stickyMenuActivate = function () {
2055
2056					if ($body.hasClass('sticky-menu-active')) {
2057						return false;
2058					}
2059
2060					logoHeight = $logo.height();
2061
2062					$logo.stop(true, true);
2063
2064					$body.addClass('sticky-menu-active').removeClass('sticky-menu-deactive');
2065
2066					if (self.options.stickyBodyPadding) {
2067						$body.css('padding-top', headerHeight);
2068					}
2069
2070					// Flat Menu Items
2071					if ($header.hasClass('flat-menu')) {
2072						$headerNavItems.addClass('sticky-menu-active');
2073					}
2074
2075					if (self.options.stickyChangeLogoSize) {
2076
2077						$logoWrapper.addClass('logo-sticky-active');
2078
2079						$logo.animate({
2080							height: logoSmallHeight,
2081							top: logoPaddingTop + 'px'
2082						}, 200, function () {
2083							$.event.trigger({
2084								type: 'stickyMenu.active'
2085							});
2086						});
2087
2088					} else {
2089						$.event.trigger({
2090							type: 'stickyMenu.active'
2091						});
2092					}
2093
2094					if (self.options.stickyForceHeaderTop) {
2095						$header.css('top', self.options.stickyForceHeaderTop);
2096					}
2097
2098				}
2099
2100				self.stickyMenuDeactivate = function () {
2101
2102					if ($body.hasClass('sticky-menu-active')) {
2103
2104						$body.removeClass('sticky-menu-active').addClass('sticky-menu-deactive');
2105
2106						if (self.options.stickyBodyPadding) {
2107							$body.css('padding-top', 0);
2108						}
2109
2110						// Flat Menu Items
2111						if ($header.hasClass('flat-menu')) {
2112							$headerNavItems.removeClass('sticky-menu-active');
2113						}
2114
2115						if (self.options.stickyChangeLogoSize) {
2116
2117							$logoWrapper.removeClass('logo-sticky-active');
2118
2119							$logo.animate({
2120								height: logoHeight,
2121								top: '0px'
2122							}, 200, function () {
2123								$.event.trigger({
2124									type: 'stickyMenu.deactive'
2125								});
2126								$window.trigger('resize');
2127							});
2128
2129						} else {
2130							$.event.trigger({
2131								type: 'stickyMenu.deactive'
2132							});
2133						}
2134
2135					}
2136
2137					if (self.options.stickyForceHeaderTop) {
2138						$header.css('top', '0');
2139					}
2140
2141				}
2142
2143				if (!self.options.alwaysStickyEnabled) {
2144
2145					$body.addClass('sticky-menu-deactive');
2146
2147					self.checkStickyMenu();
2148
2149				} else {
2150
2151					$body.addClass('sticky-menu-active always-sticky').removeClass('sticky-menu-deactive');
2152
2153					if (self.options.stickyBodyPadding) {
2154						$body.css('padding-top', $header.height() + ($header.hasClass('narrow') ? 0 : 22));
2155					}
2156
2157				}
2158
2159				return this;
2160			},
2161
2162			events: function () {
2163				var self = this;
2164
2165				if (!this.options.stickyEnableOnBoxed && $('body').hasClass('boxed')) {
2166					return this;
2167				}
2168
2169				if (!self.options.alwaysStickyEnabled) {
2170					$(window).on('scroll resize', function () {
2171						if (self.options.stickyEnabled)
2172							self.checkStickyMenu();
2173						else {
2174							if ($(window).scrollTop() > 0)
2175								$('body').addClass('sticky-disable');
2176							else
2177								$('body').removeClass('sticky-disable');
2178						}
2179					});
2180				}
2181				$('.btn-responsive-nav').on('click', function (e) {
2182					e.preventDefault();
2183				});
2184
2185				return this;
2186			}
2187
2188		}
2189
2190	});
2191
2192}).apply(this, [window.theme, jQuery]);
2193
2194// Scroll to Top
2195(function (theme, $) {
2196
2197	theme = theme || {};
2198
2199	$.extend(theme, {
2200
2201		PluginScrollToTop: {
2202
2203			defaults: {
2204				wrapper: $('body'),
2205				offset: 150,
2206				buttonClass: 'scroll-to-top',
2207				iconClass: 'fa fa-chevron-up',
2208				delay: 500,
2209				visibleMobile: false,
2210				label: false
2211			},
2212
2213			initialize: function (opts) {
2214				initialized = true;
2215
2216				this
2217			.setOptions(opts)
2218			.build()
2219			.events();
2220
2221				return this;
2222			},
2223
2224			setOptions: function (opts) {
2225				this.options = $.extend(true, {}, this.defaults, opts);
2226
2227				return this;
2228			},
2229
2230			build: function () {
2231				var self = this,
2232					$el;
2233
2234				// Base HTML Markup
2235				$el = $('<a />')
2236					.addClass(self.options.buttonClass)
2237					.attr({
2238						'href': '#',
2239					})
2240					.append(
2241						$('<i />')
2242						.addClass(self.options.iconClass).html('<span class="scroll-indent">scroller</span>')
2243					);
2244
2245				// Visible Mobile
2246				if (!self.options.visibleMobile) {
2247					$el.addClass('hidden-mobile');
2248				}
2249
2250				// Label
2251				if (self.options.label) {
2252					$el.append(
2253			$('<span />').html(self.options.label)
2254		);
2255				}
2256
2257				this.options.wrapper.append($el);
2258
2259				this.$el = $el;
2260
2261				return this;
2262			},
2263
2264			events: function () {
2265				var self = this,
2266					_isScrolling = false;
2267
2268				// Click Element Action
2269				self.$el.on('click', function (e) {
2270					e.preventDefault();
2271					$('body, html').animate({
2272						scrollTop: 0
2273					}, self.options.delay);
2274					return false;
2275				});
2276
2277				// Show/Hide Button on Window Scroll event.
2278				$(window).scroll(function () {
2279
2280					if (!_isScrolling) {
2281
2282						_isScrolling = true;
2283
2284						if ($(window).scrollTop() > self.options.offset) {
2285
2286							self.$el.stop(true, true).addClass('visible');
2287							_isScrolling = false;
2288
2289						} else {
2290
2291							self.$el.stop(true, true).removeClass('visible');
2292							_isScrolling = false;
2293
2294						}
2295
2296					}
2297
2298				});
2299
2300				return this;
2301			}
2302
2303		}
2304
2305	});
2306
2307}).apply(this, [window.theme, jQuery]);
2308
2309// Parallax
2310(function (theme, $) {
2311
2312	theme = theme || {};
2313
2314	$.extend(theme, {
2315
2316		PluginParallax: {
2317
2318			defaults: {
2319				itemsSelector: '.parallax-background',
2320				offset: 0,
2321				horizontalPosition: '50%',
2322				speed: 1.5,
2323				horizontalScrolling: false
2324			},
2325
2326			initialize: function (opts) {
2327
2328				this
2329			.setOptions(opts)
2330			.build();
2331
2332				return this;
2333			},
2334
2335			setOptions: function (opts) {
2336				this.options = $.extend(true, {}, this.defaults, opts);
2337
2338				return this;
2339			},
2340
2341			build: function () {
2342				if (!($.isFunction($.fn.stellar)) || typeof (Modernizr.touch) == 'undefined') {
2343					return this;
2344				}
2345
2346				var self = this;
2347
2348				$(window).load(function () {
2349
2350					if (!Modernizr.touch) {
2351						$.stellar(self.options).addClass('parallax-ready');
2352					} else {
2353						$(self.options.itemsSelector).addClass('parallax-touch');
2354						$(window).on('scroll resize', function () {
2355							yPos = -($(window).scrollTop()) / ((self.options.speed + 2));
2356							plxPos = (yPos < 0) ? Math.abs(yPos) : -Math.abs(yPos);
2357							bgpos = self.options.horizontalPosition + ' ' + yPos + 'px';
2358							$(self.options.itemsSelector).css('background-position', bgpos);
2359						});
2360					}
2361
2362				});
2363
2364				return this;
2365			}
2366
2367		}
2368
2369	});
2370
2371}).apply(this, [window.theme, jQuery]);
2372
2373// Commom Plugins
2374(function ($) {
2375
2376	'use strict';
2377
2378	// Scroll to Top Button.
2379	if (typeof theme.PluginScrollToTop !== 'undefined') {
2380		theme.PluginScrollToTop.initialize();
2381	}
2382
2383	// Parallax
2384	if (typeof theme.PluginParallax !== 'undefined') {
2385		theme.PluginParallax.initialize();
2386	}
2387
2388	// Tooltips
2389	if ($.isFunction($.fn['tooltip'])) {
2390
2391		//Added rel selector to support backward compatibility
2392		$('[data-tooltip]:not(.manual), [data-plugin-tooltip]:not(.manual), a[rel=tooltip]').tooltip();
2393	}
2394
2395	// Popover
2396	if ($.isFunction($.fn['popover'])) {
2397		$(function () {
2398			$('[data-plugin-popover]:not(.manual)').each(function () {
2399				var $this = $(this),
2400                    opts;
2401
2402				var pluginOptions = $this.data('plugin-options');
2403				if (pluginOptions)
2404					opts = jQuery.parseJSON(pluginOptions.replace(/'/g, '\"'));
2405
2406				$this.popover(opts);
2407			});
2408		});
2409	}
2410
2411	// Match Height
2412	if ($.isFunction($.fn['matchHeight'])) {
2413
2414		$('.match-height').matchHeight();
2415
2416		// Featured Boxes
2417		$('.featured-boxes .featured-box').matchHeight();
2418
2419		// Featured Box Full
2420		$('.featured-box-full').matchHeight();
2421
2422	}
2423
2424}).apply(this, [jQuery]);
2425
2426// Counter
2427(function ($) {
2428
2429	'use strict';
2430
2431	if ($.isFunction($.fn['themePluginCounter'])) {
2432
2433		$(function () {
2434			$('[data-plugin-counter]:not(.manual), .counters [data-to]').each(function () {
2435				var $this = $(this),
2436                    opts;
2437
2438				var pluginOptions = $this.data('plugin-options');
2439				if (pluginOptions)
2440					opts = jQuery.parseJSON(pluginOptions.replace(/'/g, '\"'));
2441
2442				$this.themePluginCounter(opts);
2443			});
2444		});
2445
2446	}
2447
2448}).apply(this, [jQuery]);
2449
2450// Match Height
2451(function ($) {
2452
2453	'use strict';
2454
2455	if ($.isFunction($.fn['themePluginMatchHeight'])) {
2456
2457		$(function () {
2458			$('[data-plugin-match-height]:not(.manual)').each(function () {
2459				var $this = $(this),
2460                    opts;
2461
2462				var pluginOptions = $this.data('plugin-options');
2463				if (pluginOptions)
2464					opts = jQuery.parseJSON(pluginOptions.replace(/'/g, '\"'));
2465
2466				$this.themePluginMatchHeight(opts);
2467			});
2468		});
2469
2470	}
2471
2472}).apply(this, [jQuery]);
2473
2474// Sticky
2475(function ($) {
2476
2477	'use strict';
2478
2479	if ($.isFunction($.fn['themePluginSticky'])) {
2480
2481		$(function () {
2482			$('[data-plugin-sticky]:not(.manual)').each(function () {
2483				var $this = $(this),
2484                    opts;
2485
2486				var pluginOptions = $this.data('plugin-options');
2487				if (pluginOptions)
2488					opts = jQuery.parseJSON(pluginOptions.replace(/'/g, '\"'));
2489
2490				$this.themePluginSticky(opts);
2491			});
2492		});
2493
2494	}
2495
2496}).apply(this, [jQuery]);
2497
2498// Move Cloud
2499(function ($) {
2500
2501	'use strict';
2502
2503	if ($('.cloud').get(0)) {
2504		var moveCloud = function () {
2505			$('.cloud').animate({
2506				'top': '+=20px'
2507			}, 3000, 'linear', function () {
2508				$('.cloud').animate({
2509					'top': '-=20px'
2510				}, 3000, 'linear', function () {
2511					moveCloud();
2512				});
2513			});
2514		};
2515
2516		moveCloud();
2517	}
2518
2519}).apply(this, [jQuery]);
2520
2521// Toggle
2522(function ($) {
2523
2524	'use strict';
2525
2526	if ($.isFunction($.fn['themePluginToggle'])) {
2527
2528		$(function () {
2529
2530			//Added toogle class to support backward compatibility
2531			$('[data-plugin-toggle]:not(.manual), .toogle').each(function () {
2532				var $this = $(this),
2533                    opts;
2534
2535				var pluginOptions = $this.data('plugin-options');
2536				if (pluginOptions)
2537					opts = jQuery.parseJSON(pluginOptions.replace(/'/g, '\"'));
2538
2539				$this.themePluginToggle(opts);
2540			});
2541
2542			//Added toggle class to support backward compatibility
2543			$('section.toggle').parent(':not([class])').each(function () {
2544				var $this = $(this),
2545                    opts;
2546
2547				var pluginOptions = $this.data('plugin-options');
2548				if (pluginOptions)
2549					opts = jQuery.parseJSON(pluginOptions.replace(/'/g, '\"'));
2550
2551				$this.themePluginToggle(opts);
2552			});
2553		});
2554
2555	}
2556
2557}).apply(this, [jQuery]);
2558
2559// Word Rotate
2560(function ($) {
2561
2562	'use strict';
2563
2564	if ($.isFunction($.fn['themePluginwordRotate'])) {
2565
2566		$(function () {
2567			$('[data-plugin-word-rotate]:not(.manual), .word-rotate:not(.manual)').each(function () {
2568				var $this = $(this),
2569                    opts;
2570
2571				var pluginOptions = $this.data('plugin-options');
2572				if (pluginOptions)
2573					opts = jQuery.parseJSON(pluginOptions.replace(/'/g, '\"'));
2574
2575				$this.themePluginwordRotate(opts);
2576			});
2577		});
2578
2579	}
2580
2581}).apply(this, [jQuery]);
2582
2583// Commom Partials
2584(function ($) {
2585
2586	'use strict';
2587
2588	// Sticky Menu
2589	if (typeof theme.StickyMenu !== 'undefined') {
2590		theme.StickyMenu.initialize();
2591	}
2592
2593	// Nav Menu
2594	if (typeof theme.Nav !== 'undefined') {
2595		theme.Nav.initialize();
2596	}
2597
2598	if ($(window).width() < 992)
2599		fixedHeader();
2600
2601	$(window).on('resize', function () {
2602		fixedHeader();
2603	});
2604
2605}).apply(this, [jQuery]);
2606
2607// Fixed Header
2608function fixedHeader() {
2609
2610	var hasFixed = $('header').hasClass('fixedheader');
2611	var $header = $('header');
2612	if ($(window).width() < 992)
2613		$header.addClass('fixedheader');
2614	else {
2615		if (!hasFixed)
2616			$header.removeClass('fixedheader');
2617	}
2618}
2619
2620// Overlay Menu
2621function overlayHeader($overlayHeader, onePage) {
2622
2623	$('body').removeClass('overlay-effect');
2624	$overlayHeader.find('button.close-btn').remove();
2625	$overlayHeader.find('.overlay ul').removeClass('dl-menu, dl-subview');
2626	$overlayHeader.find('.overlay li').removeClass('dl-submenu, dl-subviewopen');
2627
2628	if (onePage) {
2629		$overlayHeader.find('.overlay').addClass('one-menu');
2630		$('.btn-responsive-nav').click(function () {
2631			$overlayHeader.find('.overlay').removeClass('one-menu');
2632		});
2633	}
2634
2635	if (!onePage) {
2636		$overlayHeader.find('.overlay').removeClass('animate-menu');
2637
2638	}
2639}
2640
2641// Pushdown & Inline Menu 
2642function inlineHeader(onePage) {
2643
2644	if (!onePage)
2645		$body.toggleClass('show-menu');
2646
2647	else {
2648		$('body').removeClass('show-menu');
2649		$body.find('.push-down ul').removeClass('dl-subview');
2650		$('.btn-responsive-nav').find('.fas').switchClass('fa-close', 'fa-bars');
2651	}
2652}
2653
2654function pushdownMenu(onePage) {
2655	$(".pushdown.collapse").addClass("nav-main-collapse-push");
2656	$("header").toggleClass("pushdownshow");
2657}
2658
2659var pushMenu = $(".pushdownHeader");
2660if (pushMenu.length > 0)
2661	$(".nav-main-collapse").removeClass("collapse");
2662$(".nav-main.pushdown").addClass("collapse");
2663$(".pushdown .scrollbar").hide();
2664
2665// Added below code to support backward compatibility
2666/* Circular Bars - Knob */
2667if (typeof ($.fn.knob) != "undefined") {
2668	$(".knob").knob({});
2669}
2670
2671$(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
2672	e.preventDefault();
2673});
2674
2675//Google Map
2676$(window).load(function () {
2677	$('.google-map img:not([alt])').attr('alt', 'Google Map');
2678});
2679
2680//Slide Menu
2681$('.nav-main-collapse.slidebar nav ul.nav-main li a').click(function () {
2682	$(this).parent().toggleClass('sub-open');
2683});
2684
2685$('.nav-main').find('.dropdown-toggle[href="#"], .dropdown-submenu [href="#"], .dropdown-toggle[href!="#"] .fa-caret-down, .dropdown-submenu a[href!="#"] .fa-caret-down').on('click', function (e) {
2686
2687	e.preventDefault();
2688
2689	if ($(window).width() > 991 && $(this).parents('.slidebar').length < 0)
2690		return this;
2691
2692	return this;
2693});
2694
2695(function ($) {
2696
2697	// Create a new instance of Slidebars
2698	var controller = new slidebars();
2699
2700	// Initialize Slidebars
2701	controller.init();
2702
2703	// Left Slidebar controls
2704	$('.btn-responsive-nav').on('click', function (event) {
2705		controller.toggle('slidebar');
2706	});
2707
2708	$('.close-icon .fa-times-circle').on('click', function (event) {
2709		$SideClose = $(".btn-responsive-nav .fa-times");
2710		if ($SideClose.length > 0)
2711			$(".btn-responsive-nav .fas").removeClass('fa-times').addClass('fa-bars');
2712		controller.close('slidebar');
2713	});
2714
2715})(jQuery);
2716// Video Background
2717(function (theme, $) {
2718
2719    theme = theme || {};
2720
2721    var instanceName = '__videobackground';
2722
2723    var PluginVideoBackground = function ($el, opts) {
2724        return this.initialize($el, opts);
2725    };
2726
2727    PluginVideoBackground.defaults = {
2728        overlay: true,
2729        volume: 1,
2730        playbackRate: 1,
2731        muted: true,
2732        loop: true,
2733        autoplay: true,
2734        position: '50% 50%',
2735        posterType: 'detect'
2736    };
2737
2738    PluginVideoBackground.prototype = {
2739        initialize: function ($el, opts) {
2740            this.$el = $el;
2741
2742            this
2743				.setData()
2744				.setOptions(opts)
2745				.build();
2746
2747            return this;
2748        },
2749
2750        setData: function () {
2751            this.$el.data(instanceName, this);
2752
2753            return this;
2754        },
2755
2756        setOptions: function (opts) {
2757            this.options = $.extend(true, {}, PluginVideoBackground.defaults, opts, {
2758                path: this.$el.data('video-path'),
2759                wrapper: this.$el
2760            });
2761
2762            return this;
2763        },
2764
2765        build: function () {
2766
2767            if (!($.isFunction($.fn.vide)) || (!this.options.path)) {
2768                return this;
2769            }
2770
2771            if (this.options.overlay) {
2772                this.options.wrapper.prepend(
2773					$('<div />').addClass('video-overlay')
2774				);
2775            }
2776
2777            this.options.wrapper.vide(this.options.path, this.options);
2778
2779            return this;
2780        }
2781    };
2782
2783    // expose to scope
2784    $.extend(theme, {
2785        PluginVideoBackground: PluginVideoBackground
2786    });
2787
2788    // jquery plugin
2789    $.fn.themePluginVideoBackground = function (opts) {
2790        return this.map(function () {
2791            var $this = $(this);
2792
2793            if ($this.data(instanceName)) {
2794                return $this.data(instanceName);
2795            } else {
2796                return new PluginVideoBackground($this, opts);
2797            }
2798
2799        });
2800    }
2801
2802}).apply(this, [window.theme, jQuery]);
2803
2804// Video Background
2805(function ($) {
2806
2807    'use strict';
2808
2809    if ($.isFunction($.fn['themePluginVideoBackground'])) {
2810
2811        $(function () {
2812            $('[data-plugin-video-background]:not(.manual)').each(function () {
2813                var $this = $(this),
2814					opts;
2815
2816                var pluginOptions = $this.data('plugin-options');
2817                if (pluginOptions)
2818                    opts = jQuery.parseJSON(pluginOptions.replace(/'/g, '\"'));
2819
2820                $this.themePluginVideoBackground(opts);
2821            });
2822        });
2823
2824    }
2825
2826}).apply(this, [jQuery]);
2827
2828// Parallax 
2829(function (theme, $) {
2830
2831	theme = theme || {};
2832
2833	var instanceName = '__parallax';
2834
2835	var PluginParallax = function ($el, opts) {
2836		return this.initialize($el, opts);
2837	};
2838
2839	PluginParallax.defaults = {
2840		speed: 1.5,
2841		horizontalPosition: '50%',
2842		offset: 0,
2843		parallaxHeight: '100vh'
2844	};
2845
2846	PluginParallax.prototype = {
2847		initialize: function ($el, opts) {
2848			if ($el.data(instanceName)) {
2849				return this;
2850			}
2851
2852			this.$el = $el;
2853
2854			this
2855				.setData()
2856				.setOptions(opts)
2857				.build();
2858
2859			return this;
2860		},
2861
2862		setData: function () {
2863			this.$el.data(instanceName, this);
2864
2865			return this;
2866		},
2867
2868		setOptions: function (opts) {
2869			this.options = $.extend(true, {}, PluginParallax.defaults, opts, {
2870				wrapper: this.$el
2871			});
2872
2873			return this;
2874		},
2875
2876		build: function () {
2877			var self = this,
2878				$window = $(window),
2879				offset,
2880				yPos,
2881				bgpos,
2882				background;
2883
2884			// Create Parallax Element
2885			background = $('<div class="parallax-background"></div>');
2886
2887			// Set Style for Parallax Element
2888			background.css({
2889				'background-image': 'url(' + self.options.wrapper.data('image-src') + ')',
2890				'background-size': 'cover',
2891				'position': 'absolute',
2892				'top': '-50px',
2893				'left': 0,
2894				'width': '100%',
2895				'height': self.options.parallaxHeight
2896			});
2897
2898			// Add Parallax Element on DOM
2899			self.options.wrapper.prepend(background);
2900
2901			// Set Overlfow Hidden and Position Relative to Parallax Wrapper
2902			self.options.wrapper.css({
2903				'position': 'relative',
2904				'overflow': 'hidden'
2905			});
2906
2907			// Parallax Effect on Scroll & Resize
2908			var parallaxEffectOnScrolResize = function () {
2909				$window.on('scroll resize', function () {
2910					offset = self.options.wrapper.offset();
2911					yPos = -($window.scrollTop() - (offset.top - 100)) / ((self.options.speed + 2));
2912					plxPos = (yPos < 0) ? Math.abs(yPos) : -Math.abs(yPos);
2913					if (self.options.offset > 0)
2914						self.options.offset = 0;
2915					background.css({
2916						'transform': 'translate3d(0, ' + ((plxPos) + (self.options.offset)) + 'px, 0)',
2917						'background-position-x': self.options.horizontalPosition
2918					});
2919				});
2920
2921				$window.trigger('scroll');
2922			}
2923
2924			if (!$.browser.mobile) {
2925				parallaxEffectOnScrolResize();
2926			} else {
2927				if (self.options.enableOnMobile == true) {
2928					parallaxEffectOnScrolResize();
2929				} else {
2930					self.options.wrapper.addClass('parallax-disabled');
2931				}
2932			}
2933
2934			return this;
2935		}
2936	};
2937
2938	// expose to scope
2939	$.extend(theme, {
2940		PluginParallax: PluginParallax
2941	});
2942
2943	// jquery plugin
2944	$.fn.themePluginParallax = function (opts) {
2945		return this.map(function () {
2946			var $this = $(this);
2947
2948			if ($this.data(instanceName)) {
2949				return $this.data(instanceName);
2950			} else {
2951				return new PluginParallax($this, opts);
2952			}
2953
2954		});
2955	}
2956
2957}).apply(this, [window.theme, jQuery]);
2958
2959// Parallax
2960(function ($) {
2961
2962    'use strict';
2963
2964    if ($.isFunction($.fn['themePluginParallax'])) {
2965
2966        $(function () {
2967            $('[data-plugin-parallax]:not(.manual)').each(function () {
2968                var $this = $(this),
2969                    opts;
2970
2971                var pluginOptions = $this.data('plugin-options');
2972
2973                if (pluginOptions)
2974                    opts = jQuery.parseJSON(pluginOptions.replace(/'/g, '\"'));
2975
2976                $this.themePluginParallax(opts);
2977            });
2978        });
2979
2980    }
2981
2982}).apply(this, [jQuery]);// Chart Circular
2983(function (theme, $) {
2984
2985    theme = theme || {};
2986
2987    var instanceName = '__chartCircular';
2988
2989    var PluginChartCircular = function ($el, opts) {
2990        return this.initialize($el, opts);
2991    };
2992
2993    PluginChartCircular.defaults = {
2994        accX: 0,
2995        accY: -150,
2996        delay: 1,
2997        barColor: '#0088CC',
2998        trackColor: '#f2f2f2',
2999        scaleColor: false,
3000        scaleLength: 5,
3001        lineCap: 'round',
3002        lineWidth: 13,
3003        size: 175,
3004        rotate: 0,
3005        animate: ({
3006            duration: 2500,
3007            enabled: true
3008        })
3009    };
3010
3011    PluginChartCircular.prototype = {
3012        initialize: function ($el, opts) {
3013            if ($el.data(instanceName)) {
3014                return this;
3015            }
3016
3017            this.$el = $el;
3018
3019            this
3020				.setData()
3021				.setOptions(opts)
3022				.build();
3023
3024            return this;
3025        },
3026
3027        setData: function () {
3028            this.$el.data(instanceName, this);
3029
3030            return this;
3031        },
3032
3033        setOptions: function (opts) {
3034            this.options = $.extend(true, {}, PluginChartCircular.defaults, opts, {
3035                wrapper: this.$el
3036            });
3037
3038            return this;
3039        },
3040
3041        build: function () {
3042            if (!($.isFunction($.fn.appear)) || !($.isFunction($.fn.easyPieChart))) {
3043                return this;
3044            }
3045
3046            var self = this,
3047				$el = this.options.wrapper,
3048				value = ($el.attr('data-percent') ? $el.attr('data-percent') : 0),
3049				percentEl = $el.find('.percent');
3050
3051            $.extend(true, self.options, {
3052                onStep: function (from, to, currentValue) {
3053                    percentEl.html(parseInt(currentValue));
3054                }
3055            });
3056
3057            $el.attr('data-percent', 0);
3058
3059            $el.appear(function () {
3060
3061                $el.easyPieChart(self.options);
3062
3063                setTimeout(function () {
3064
3065                    $el.data('easyPieChart').update(value);
3066                    $el.attr('data-percent', value);
3067
3068                }, self.options.delay);
3069
3070            }, {
3071                accX: self.options.accX,
3072                accY: self.options.accY
3073            });
3074
3075            return this;
3076        }
3077    };
3078
3079    // expose to scope
3080    $.extend(theme, {
3081        PluginChartCircular: PluginChartCircular
3082    });
3083
3084    // jquery plugin
3085    $.fn.themePluginChartCircular = function (opts) {
3086        return this.map(function () {
3087            var $this = $(this);
3088
3089            if ($this.data(instanceName)) {
3090                return $this.data(instanceName);
3091            } else {
3092                return new PluginChartCircular($this, opts);
3093            }
3094
3095        });
3096    }
3097
3098}).apply(this, [window.theme, jQuery]);
3099
3100// Chart.Circular
3101(function ($) {
3102
3103    'use strict';
3104
3105    if ($.isFunction($.fn['themePluginChartCircular'])) {
3106
3107        $(function () {
3108            $('[data-plugin-chart-circular]:not(.manual), .circular-bar-chart:not(.manual)').each(function () {
3109                var $this = $(this),
3110					opts;
3111
3112                var pluginOptions = $this.data('plugin-options');
3113                if (pluginOptions)
3114                    opts = jQuery.parseJSON(pluginOptions.replace(/'/g, '\"'));
3115
3116                $this.themePluginChartCircular(opts);
3117            });
3118        });
3119
3120    }
3121
3122}).apply(this, [jQuery]);// Sort
3123(function (theme, $) {
3124
3125    theme = theme || {};
3126
3127    var instanceName = '__sort';
3128
3129    var PluginSort = function ($el, opts) {
3130        return this.initialize($el, opts);
3131    };
3132
3133    PluginSort.defaults = {
3134        useHash: true,
3135        itemSelector: 'li',
3136        layoutMode: 'masonry',
3137        filter: '*',
3138        isOriginLeft: ($('html').attr('dir') == 'rtl' ? false : true)
3139    };
3140
3141    PluginSort.prototype = {
3142        initialize: function ($el, opts) {
3143            if ($el.data(instanceName)) {
3144                return this;
3145            }
3146
3147            this.$el = $el;
3148
3149            this
3150				.setData()
3151				.setOptions(opts)
3152				.build();
3153
3154            return this;
3155        },
3156
3157        setData: function () {
3158            this.$el.data(instanceName, this);
3159
3160            return this;
3161        },
3162
3163        setOptions: function (opts) {
3164            this.options = $.extend(true, {}, PluginSort.defaults, opts, {
3165                wrapper: this.$el
3166            });
3167
3168            return this;
3169        },
3170
3171        build: function () {
3172            if (!($.isFunction($.fn.isotope))) {
3173                return this;
3174            }
3175
3176            var self = this,
3177				$source = this.options.wrapper,
3178				$destination = $('.sort-destination[data-sort-id="' + $source.attr('data-sort-id') + '"]');
3179
3180            if ($destination.get(0)) {
3181
3182                self.$source = $source;
3183                self.$destination = $destination;
3184
3185                self.setParagraphHeight($destination);
3186
3187                $(window).load(function () {
3188
3189                    $destination.isotope(self.options).isotope('layout');
3190
3191                    self.$destination.isotope('on', 'layoutComplete', function (isoInstance, laidOutItems) {
3192                    	if (self.options.useHash && typeof isoInstance.options != 'undefined' && typeof isoInstance.options.filter != 'undefined') {
3193                            if (window.location.hash != '' || isoInstance.options.filter.replace('.', '') != '*') {
3194                                window.location.hash = isoInstance.options.filter.replace('.', '');
3195                            }
3196                        }
3197                    });
3198
3199                    self.events();
3200
3201                });
3202
3203            }
3204
3205            return this;
3206        },
3207
3208        events: function () {
3209            var self = this,
3210				filter = null;
3211
3212            self.$source.find('a').click(function (e) {
3213                e.preventDefault();
3214
3215                filter = $(this).parent().attr('data-option-value');
3216
3217                self.setFilter(filter);
3218
3219                return this;
3220            });
3221
3222            if (self.options.useHash) {
3223                self.hashEvents();
3224            }
3225
3226            return this;
3227        },
3228
3229        setFilter: function (filter) {
3230            var self = this;
3231
3232            //if (self.filter == filter) {
3233            //    return this;
3234            //}
3235
3236            self.$source.find('li.active').removeClass('active');
3237            self.$source.find('li[data-option-value="' + filter + '"]').addClass('active');
3238
3239            self.$destination.isotope({
3240                filter: filter
3241            });
3242
3243            self.filter = filter;
3244
3245            return this;
3246        },
3247
3248        hashEvents: function () {
3249            var self = this,
3250				hash = null,
3251				hashFilter = null,
3252				initHashFilter = '.' + location.hash.replace('#', '');
3253
3254            if (initHashFilter != '.' && initHashFilter != '.*') {
3255                self.setFilter(initHashFilter);
3256            }
3257
3258            $(window).bind('hashchange', function (e) {
3259
3260                hashFilter = '.' + location.hash.replace('#', '');
3261                hash = (hashFilter == '.' || hashFilter == '.*' ? '*' : hashFilter);
3262
3263                self.setFilter(hash);
3264
3265            });
3266
3267            return this;
3268        },
3269
3270        setParagraphHeight: function () {
3271            var self = this,
3272				minParagraphHeight = 0,
3273				paragraphs = $('span.thumb-info-caption p', self.$destination);
3274
3275            paragraphs.each(function () {
3276                if ($(this).height() > minParagraphHeight) {
3277                    minParagraphHeight = ($(this).height() + 10);
3278                }
3279            });
3280
3281            paragraphs.height(minParagraphHeight);
3282
3283            return this;
3284        }
3285
3286    };
3287
3288    // expose to scope
3289    $.extend(theme, {
3290        PluginSort: PluginSort
3291    });
3292
3293    // jquery plugin
3294    $.fn.themePluginSort = function (opts) {
3295        return this.map(function () {
3296            var $this = $(this);
3297
3298            if ($this.data(instanceName)) {
3299                return $this.data(instanceName);
3300            } else {
3301                return new PluginSort($this, opts);
3302            }
3303
3304        });
3305    }
3306
3307}).apply(this, [window.theme, jQuery]);
3308
3309// Sort
3310(function ($) {
3311
3312    'use strict';
3313
3314    if ($.isFunction($.fn['themePluginSort'])) {
3315
3316        $(function () {
3317            $('[data-plugin-sort]:not(.manual), .sort-source:not(.manual)').each(function () {
3318                var $this = $(this),
3319					opts;
3320
3321                var pluginOptions = $this.data('plugin-options');
3322                if (pluginOptions)
3323                    opts = jQuery.parseJSON(pluginOptions.replace(/'/g, '\"'));
3324
3325                $this.themePluginSort(opts);
3326            });
3327        });
3328
3329    }
3330
3331}).apply(this, [jQuery]);
3332
3333// Masonry
3334(function (theme, $) {
3335
3336    theme = theme || {};
3337
3338    var instanceName = '__masonry';
3339
3340    var PluginMasonry = function ($el, opts) {
3341        return this.initialize($el, opts);
3342    };
3343
3344    PluginMasonry.defaults = {
3345        itemSelector: 'li'
3346    };
3347
3348    PluginMasonry.prototype = {
3349        initialize: function ($el, opts) {
3350            if ($el.data(instanceName)) {
3351                return this;
3352            }
3353
3354            this.$el = $el;
3355
3356            this
3357				.setData()
3358				.setOptions(opts)
3359				.build();
3360
3361            return this;
3362        },
3363
3364        setData: function () {
3365            this.$el.data(instanceName, this);
3366
3367            return this;
3368        },
3369
3370        setOptions: function (opts) {
3371            this.options = $.extend(true, {}, PluginMasonry.defaults, opts, {
3372                wrapper: this.$el
3373            });
3374
3375            return this;
3376        },
3377
3378        build: function () {
3379            if (!($.isFunction($.fn.isotope))) {
3380                return this;
3381            }
3382
3383            this.options.wrapper.isotope(this.options);
3384
3385            return this;
3386        }
3387    };
3388
3389    // expose to scope
3390    $.extend(theme, {
3391        PluginMasonry: PluginMasonry
3392    });
3393
3394    // jquery plugin
3395    $.fn.themePluginMasonry = function (opts) {
3396        return this.map(function () {
3397            var $this = $(this);
3398
3399            $this.waitForImages(function () {
3400                if ($this.data(instanceName)) {
3401                    return $this.data(instanceName);
3402                } else {
3403                    return new PluginMasonry($this, opts);
3404                }
3405            });
3406
3407        });
3408    }
3409
3410}).apply(this, [window.theme, jQuery]);
3411
3412// Masonry
3413(function ($) {
3414
3415    'use strict';
3416
3417    if ($.isFunction($.fn['themePluginMasonry'])) {
3418
3419        $(function () {
3420            $('[data-plugin-masonry]:not(.manual)').each(function () {
3421                var $this = $(this),
3422					opts;
3423
3424                var pluginOptions = $this.data('plugin-options');
3425                if (pluginOptions)
3426                    opts = jQuery.parseJSON(pluginOptions.replace(/'/g, '\"'));
3427
3428                $this.themePluginMasonry(opts);
3429            });
3430        });
3431
3432    }
3433
3434}).apply(this, [jQuery]);// Carousel
3435(function (theme, $) {
3436
3437    theme = theme || {};
3438
3439    var instanceName = '__carousel';
3440
3441    var PluginCarousel = function ($el, opts) {
3442        return this.initialize($el, opts);
3443    };
3444
3445    PluginCarousel.defaults = {
3446        loop: true,
3447        responsive: {
3448            0: {
3449                items: 1
3450            },
3451            479: {
3452                items: 1
3453            },
3454            768: {
3455                items: 2
3456            },
3457            979: {
3458                items: 3
3459            },
3460            1199: {
3461                items: 4
3462            }
3463        },
3464        navText: []
3465    };
3466
3467    PluginCarousel.prototype = {
3468        initialize: function ($el, opts) {
3469            if ($el.data(instanceName)) {
3470                return this;
3471            }
3472
3473            this.$el = $el;
3474
3475            this
3476				.setData()
3477				.setOptions(opts)
3478				.build();
3479
3480            return this;
3481        },
3482
3483        setData: function () {
3484            this.$el.data(instanceName, this);
3485
3486            return this;
3487        },
3488
3489        setOptions: function (opts) {
3490            this.options = $.extend(true, {}, PluginCarousel.defaults, opts, {
3491                wrapper: this.$el
3492            });
3493
3494            return this;
3495        },
3496
3497        build: function () {
3498            if (!($.isFunction($.fn.owlCarousel))) {
3499                return this;
3500            }
3501
3502            var self = this,
3503				$el = this.options.wrapper,
3504				activeItemHeight = 0;
3505
3506            // Force RTL according to HTML dir attribute
3507            if ($('html').attr('dir') == 'rtl') {
3508                this.options = $.extend(true, {}, this.options, {
3509                    rtl: true
3510                });
3511            }
3512
3513            if (this.options.items == 1) {
3514                this.options.responsive = {}
3515            }
3516
3517            if (this.options.items > 4) {
3518                this.options = $.extend(true, {}, this.options, {
3519                    responsive: {
3520                        1199: {
3521                            items: this.options.items
3522                        }
3523                    }
3524                });
3525            }
3526
3527            // Auto Height
3528            $(window).afterResize(function () {
3529                activeItemHeight = $el.find('.owl-item.active').height();
3530                $el.find('.owl-stage-outer').height(activeItemHeight);
3531            });
3532
3533            this.options.wrapper.owlCarousel(this.options).addClass("owl-carousel-init");
3534
3535            return this;
3536        }
3537    };
3538
3539    // expose to scope
3540    $.extend(theme, {
3541        PluginCarousel: PluginCarousel
3542    });
3543
3544    // jquery plugin
3545    $.fn.themePluginCarousel = function (opts) {
3546        return this.map(function () {
3547            var $this = $(this);
3548
3549            if ($this.data(instanceName)) {
3550                return $this.data(instanceName);
3551            } else {
3552                return new PluginCarousel($this, opts);
3553            }
3554
3555        });
3556    }
3557
3558}).apply(this, [window.theme, jQuery]);
3559
3560// Carousel
3561(function ($) {
3562
3563    'use strict';
3564
3565    if ($.isFunction($.fn['themePluginCarousel'])) {
3566
3567        $(function () {
3568            $('[data-plugin-carousel]:not(.manual), .owl-carousel:not(.manual)').each(function () {
3569                var $this = $(this),
3570					opts;
3571
3572                var pluginOptions = $this.data('plugin-options');
3573                if (pluginOptions)
3574                    opts = jQuery.parseJSON(pluginOptions.replace(/'/g, '\"'));
3575
3576                $this.themePluginCarousel(opts);
3577            });
3578        });
3579
3580    }
3581
3582}).apply(this, [jQuery]);
3583
3584// Carousel Videos
3585(function ($) {
3586
3587    'use strict';
3588
3589    // Videos
3590    $('#videos').owlCarousel({
3591        items: 1,
3592        merge: true,
3593        loop: true,
3594        margin: 10,
3595        video: true,
3596        lazyLoad: true,
3597        center: true,
3598        responsive: {
3599            480: {
3600                items: 2
3601            },
3602            600: {
3603                items: 4
3604            }
3605        }
3606    })
3607
3608}).apply(this, [jQuery]);// Flickr
3609(function (theme, $) {
3610
3611    theme = theme || {};
3612
3613    var instanceName = '__flickr';
3614
3615    var PluginFlickr = function ($el, opts) {
3616        return this.initialize($el, opts);
3617    };
3618
3619    PluginFlickr.defaults = {
3620        flickrbase: '//api.flickr.com/services/feeds/',
3621        feedapi: 'photos_public.gne',
3622        limit: 6,
3623        qstrings: {
3624            lang: 'en-us',
3625            format: 'json',
3626            jsoncallback: '?'
3627        },
3628        cleanDescription: true,
3629        useTemplate: true,
3630        itemTemplate: '<li><a href="{{image_b}}" title="{{title}}"><span class="thumbnail"><img alt="flickr" src="{{image_s}}" /></span></a></li>',
3631        itemCallback: function () { }
3632    };
3633
3634    PluginFlickr.prototype = {
3635        initialize: function ($el, opts) {
3636            if ($el.data(instanceName)) {
3637                return this;
3638            }
3639
3640            this.$el = $el;
3641
3642            this
3643				.setData()
3644				.setOptions(opts)
3645				.build();
3646
3647            return this;
3648        },
3649
3650        setData: function () {
3651            this.$el.data(instanceName, this);
3652
3653            return this;
3654        },
3655
3656        setOptions: function (opts) {
3657            this.options = $.extend(true, {}, PluginFlickr.defaults, opts, {
3658                wrapper: this.$el
3659            });
3660
3661            return this;
3662        },
3663
3664        build: function () {
3665            if (!($.isFunction($.fn.jflickrfeed)) || !($.isFunction($.fn.magnificPopup))) {
3666                return this;
3667            }
3668
3669            var self = this;
3670
3671            self.options.wrapper.jflickrfeed(this.options, function (data) {
3672
3673                self.options.wrapper.magnificPopup({
3674                    delegate: 'a',
3675                    type: 'image',
3676                    gallery: {
3677                        enabled: true,
3678                        navigateByImgClick: true,
3679                        preload: [0, 1]
3680                    },
3681                    zoom: {
3682                        enabled: true,
3683                        duration: 300,
3684                        opener: function (element) {
3685                            return element.find('img');
3686                        }
3687                    }
3688                });
3689
3690            });
3691
3692            return this;
3693        }
3694    };
3695
3696    // expose to scope
3697    $.extend(theme, {
3698        PluginFlickr: PluginFlickr
3699    });
3700
3701    // jquery plugin
3702    $.fn.themePluginFlickr = function (opts) {
3703        return this.map(function () {
3704            var $this = $(this);
3705
3706            if ($this.data(instanceName)) {
3707                return $this.data(instanceName);
3708            } else {
3709                return new PluginFlickr($this, opts);
3710            }
3711
3712        });
3713    }
3714
3715}).apply(this, [window.theme, jQuery]);
3716
3717// Flickr
3718(function ($) {
3719
3720    'use strict';
3721
3722    if ($.isFunction($.fn['themePluginFlickr'])) {
3723
3724        $(function () {
3725            //Added ul.flickr-feed selector to support backward compatibility
3726            $('[data-plugin-flickr]:not(.manual), ul.flickr-feed').each(function () {
3727                var $this = $(this),
3728					opts;
3729
3730                var pluginOptions = $this.data('plugin-options');
3731                if (pluginOptions)
3732                    opts = jQuery.parseJSON(pluginOptions.replace(/'/g, '\"'));
3733
3734                $this.themePluginFlickr(opts);
3735            });
3736        });
3737
3738    }
3739
3740}).apply(this, [jQuery]);// Type
3741(function (theme, $) {
3742
3743    theme = theme || {};
3744
3745    var instanceName = '__typeWriter';
3746
3747    var PlugintypeWriter = function ($el, opts) {
3748        return this.initialize($el, opts);
3749    };
3750
3751    PlugintypeWriter.defaults = {
3752        typeSpeed: 150,
3753        backSpeed: 0,
3754        backDelay: 500,
3755        startDelay: 0,
3756        loop: false
3757    };
3758
3759    PlugintypeWriter.prototype = {
3760        initialize: function ($el, opts) {
3761            if ($el.data(instanceName)) {
3762                return this;
3763            }
3764
3765            this.$el = $el;
3766
3767            this
3768				.setData()
3769				.setOptions(opts)
3770                .build();
3771
3772            return this;
3773        },
3774
3775        setData: function () {
3776            this.$el.data(instanceName, this);
3777
3778            return this;
3779        },
3780
3781        setOptions: function (opts) {
3782            this.options = $.extend(true, {}, PlugintypeWriter.defaults, opts, {
3783                wrapper: this.$el
3784            });
3785
3786            return this;
3787        },
3788
3789        build: function () {
3790
3791            if (!($.isFunction(Typed))) {
3792                return this;
3793            }
3794            var self = this,
3795            $wrapper = $(self.options.wrapper);
3796
3797            if ($wrapper.find('> span').length > 0)
3798                element = '#' + $wrapper.find('> span').attr('id');
3799            else if ($wrapper.find('> input').length > 0)
3800                element = '#' + $wrapper.find('> input').attr('id');
3801
3802            if (element != null)
3803                typed = new Typed(element, self.options);
3804
3805            return this;
3806        }
3807    };
3808
3809    // expose to scope
3810    $.extend(theme, {
3811        PlugintypeWriter: PlugintypeWriter
3812    });
3813
3814    // jquery plugin
3815    $.fn.themePlugintypeWriter = function (opts) {
3816        return this.map(function () {
3817            var $this = $(this);
3818
3819            if ($this.data(instanceName)) {
3820                return $this.data(instanceName);
3821            } else {
3822                return new PlugintypeWriter($this, opts);
3823            }
3824
3825        });
3826    }
3827
3828}).apply(this, [window.theme, jQuery]);
3829
3830// Type
3831(function ($) {
3832
3833    'use strict';
3834
3835    if ($.isFunction($.fn['themePlugintypeWriter'])) {
3836
3837        $(function () {
3838            $('[data-plugin-type-writer]:not(.manual), .type-writer:not(.manual)').each(function () {
3839                var $this = $(this),
3840					opts;
3841
3842                var pluginOptions = $this.data('plugin-options');
3843                if (pluginOptions)
3844                    opts = jQuery.parseJSON(pluginOptions.replace(/'/g, '\"'));
3845
3846                $this.themePlugintypeWriter(opts);
3847            });
3848        });
3849
3850    }
3851
3852}).apply(this, [jQuery]);// Circle Slider
3853(function ($) {
3854
3855    'use strict';
3856
3857    if ($.isFunction($.fn.flipshow)) {
3858        var circleContainer = $('#fcSlideshow');
3859
3860        if (circleContainer.get(0)) {
3861            circleContainer.flipshow();
3862
3863            setTimeout(function circleFlip() {
3864                circleContainer.data().flipshow._navigate(circleContainer.find('div.fc-right span:first'), 'right');
3865                setTimeout(circleFlip, 3000);
3866            }, 3000);
3867        }
3868    }
3869
3870}).apply(this, [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.