PageSourceSearch

https://www.ocma.org/Portals/_default/Skins/Porto/OCMAInnerBC.js?cdv=1348

js ocma.org collected 2026-10-02 05:11:16 UTC 94,205 bytes, 3,878 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					$('header').find(".btn-responsive-nav").removeAttr('style');
1503				}
1504				else if ($nav.hasClass('overlay')) {
1505					$nav.parents('header').addClass('overlayHeader');
1506					$('header').find(".btn-responsive-nav").removeAttr('style');
1507				}
1508				else if ($nav.hasClass('push-down')) {
1509					$nav.parents('header').addClass('inlineHeader');
1510					$('header').find(".btn-responsive-nav").removeAttr('style');
1511				}
1512				else if ($nav.hasClass('pushdown')) {
1513					$nav.parents('header').addClass('pushdownHeader');
1514					$('header').find(".btn-responsive-nav").removeAttr('style');
1515				}
1516				else if ($('.navbar-collapse').hasClass('slidebar')) {
1517					$('header').addClass('slideHeader');
1518					$('header').find(".btn-responsive-nav").removeAttr('style');
1519				}
1520
1521
1522				//Dropdown Menu Keyboard Focus
1523				$(document).click(function () {
1524					$('.dropdown').removeClass('focused');
1525					$('.dropdown-submenu').removeClass('focused');
1526				});
1527
1528				$('header .nav > li > a').focus(function () {
1529					if ($('.dropdown').hasClass('focused'))
1530						$('.dropdown').removeClass('focused');
1531					$('.dropdown-submenu').removeClass('focused');
1532					$(this).siblings('.dropdown-menu').parent().addClass('focused');
1533				});
1534
1535				$('header .dropdown-submenu > a').focus(function () {
1536					if ($('.dropdown-submenu').hasClass('focused'))
1537						$('.dropdown-submenu').removeClass('focused');
1538					$(this).siblings('.dropdown-menu').parent().addClass('focused');
1539				});
1540
1541
1542				//Header Animate in Mobile 
1543				function animateHeader() {
1544
1545					if ($(window).width() < 992) {
1546
1547						if ($('header').hasClass('ddrheader')) {
1548
1549							$('header .navbar-collapse').on('show.bs.collapse', function () {
1550
1551								$('header .header-body').css('max-height', $('header').outerHeight() + 330);
1552
1553								$('.header-body').animate({
1554									'min-height': ($('.navbar-collapse').height() + $('.header-body').outerHeight()),
1555								}, 500);
1556
1557								$('.header-body').css("overflow", "hidden");
1558								$("header .search-block").removeClass("show");
1559							});
1560
1561							$('header .navbar-collapse').on('hide.bs.collapse', function () {
1562								$('.header-body').animate({
1563									'min-height': headerBodyHeight
1564								}, 250);
1565							});
1566
1567							$('header .navbar-collapse').on('hidden.bs.collapse', function () {
1568								setTimeout(function () {
1569									$('.header-body').removeAttr("style");
1570								}, 270);
1571							});
1572
1573						}
1574
1575						else if ($('header').hasClass('pushdownHeader')) {
1576							$('header .navbar-collapse').on('show.bs.collapse', function () {
1577
1578								$('header .header-body').css('max-height', $('header').outerHeight() + 330);
1579
1580								$('.header-body').animate({
1581									'min-height': ($('.pushdown.nav-main-collapse-push').height() + $('.header-body').outerHeight())
1582								}, 500);
1583
1584								$('.header-body .nav-main-collapse').animate({
1585									'height': '100%'
1586								});
1587
1588								$('.header-body').css("overflow", "hidden");
1589								$("header .search-block").removeClass("show");
1590							});
1591
1592							$('header .navbar-collapse').on('hide.bs.collapse', function () {
1593								$('.header-body').animate({
1594									'min-height': headerBodyHeight
1595								}, 250);
1596							});
1597
1598							$('header .navbar-collapse').on('hidden.bs.collapse', function () {
1599								setTimeout(function () {
1600									$('.header-body').removeAttr("style");
1601								}, 270);
1602							});
1603						}
1604					}
1605					else {
1606						$('.header-body').css('height', 'auto');
1607					}
1608				}
1609
1610				animateHeader();
1611
1612				// Setup Menu
1613				$('.btn-responsive-nav').click(function () {
1614
1615					if ($('header').hasClass('overlayHeader')) {
1616
1617						$body.addClass('overlay-effect');
1618
1619						if ($('header .close-btn').length == 0) {
1620							var close = $('<button type="button" class="close-btn"><em class="fas fa-times"></em></button>');
1621							$('header .btn-responsive-nav').before(close);
1622						}
1623
1624						$('.overlay-effect .overlayHeader .close-btn').click(function () {
1625							if ($('body').hasClass('overlay-effect'))
1626								overlayHeader($('.overlayHeader'), false);
1627						});
1628					} else
1629						$(this).find('.fas').toggleClass('fa-bars fa-times');
1630
1631					if ($nav.hasClass('push-down'))
1632						inlineHeader(false);
1633
1634				});
1635
1636				//Overlay Menu
1637
1638				$('.overlayHeader .overlay-dropdown a .fa-caret-right').click(function (e) {
1639					e.preventDefault();
1640				});
1641
1642				$('.overlayHeader .overlay-dropdown > a').click(function () {
1643
1644					$('.overlayHeader .overlay').removeClass('animate-menu');
1645
1646					$('.overlayHeader .overlay .nav').hide("drop", {
1647						direction: "right"
1648					}, 50);
1649					$('.overlayHeader .overlay .nav').show("drop", {
1650						direction: "right"
1651					}).delay(100);
1652
1653					$('.overlayHeader .overlay .nav').addClass('dl-subview');
1654					$(this).parent().addClass('dl-subviewopen');
1655				});
1656
1657				$('.overlayHeader .overlay-dropdown-submenu > a').click(function () {
1658
1659					$('.overlayHeader .overlay').removeClass('animate-menu');
1660
1661					$(this).parents().removeClass('dl-subviewopen');
1662
1663					$('.overlayHeader .overlay .nav').hide("drop", {
1664						direction: "right"
1665					}, 50);
1666					$('.overlayHeader .overlay .nav').show("drop", {
1667						direction: "right"
1668					}).delay(100);
1669
1670					$('.overlayHeader .overlay-menu').addClass('dl-menu');
1671					$(this).parent().addClass('dl-submenu');
1672					$(this).parent().parent().parent().addClass('dl-menuopen dl-subview');
1673				});
1674
1675				$('.overlayHeader .overlay .icon-back').click(function () {
1676
1677					if ($('.overlayHeader .overlay li').hasClass('dl-menuopen')) {
1678
1679						$('.overlayHeader .overlay li.dl-subview').addClass('dl-subviewopen').removeClass('dl-subview dl-menuopen');
1680						$('.overlayHeader .overlay ul').removeClass('dl-menu');
1681						$('.overlayHeader .overlay li').removeClass('dl-submenu');
1682						$('.overlayHeader .overlay').addClass('animate-menu');
1683					} else if ($('.overlayHeader .overlay li').hasClass('dl-subviewopen')) {
1684
1685						$('.overlayHeader').find(".animate-menu").removeClass('animate-menu');
1686
1687						setTimeout(function () {
1688							$('.overlayHeader .overlay ul').removeClass('dl-subview');
1689							$('.overlayHeader .overlay li').removeClass('dl-subviewopen');
1690							$('.overlayHeader .overlay').addClass('animate-menu');
1691						}, 50);
1692					}
1693				});
1694
1695				//Inline Menu
1696
1697				$(".inline-menu.nav-main .nav").hide();
1698
1699				$('.inlineHeader .push-menu a .fa-caret-right').click(function (e) {
1700					e.preventDefault();
1701				});
1702
1703				$('.menu-set > a').click(function () {
1704
1705					$('.push-menu').removeClass('push-animate');
1706
1707					$('.push-menu .nav').hide("drop", {
1708						direction: "right"
1709					}, 50);
1710					$('.push-menu .nav').show("drop", {
1711						direction: "right"
1712					}).delay(100);
1713
1714					$('.push-menu ul.nav').addClass('dl-subview');
1715					$(this).parent().addClass('dl-subviewopen');
1716				});
1717
1718				$('li.menu-set > ul.pushdown-menu > li.pushdown-sub  > a').click(function () {
1719
1720					$('.push-menu .push-down').removeClass('push-animate');
1721
1722					$('ul.pushdown-menu').addClass('subview');
1723					$(this).parent().addClass('subviewopen');
1724
1725					$('.push-menu .nav').hide("drop", {
1726						direction: "right"
1727					}, 50);
1728					$('.push-menu .nav').show("drop", {
1729						direction: "right"
1730					}).delay(100);
1731				});
1732
1733				$('li.pushdown-sub-menu > a').click(function () {
1734
1735					$('.push-menu .push-down').removeClass('push-animate');
1736
1737					$(this).parent().parent().addClass('sub-view');
1738					$(this).parent().addClass('open');
1739
1740					$('.push-menu .nav').hide("drop", {
1741						direction: "right"
1742					}, 50);
1743					$('.push-menu .nav').show("drop", {
1744						direction: "right"
1745					}).delay(100);
1746				});
1747
1748				$('.backicon').click(function () {
1749
1750					if ($('li.pushdown-sub').hasClass('subviewopen')) {
1751
1752						$('li.pushdown-sub').removeClass('subviewopen');
1753						$('ul.pushdown-menu').removeClass('subview');
1754						$('.push-down').addClass('push-animate');
1755					} else if ($('li').hasClass('dl-subviewopen')) {
1756
1757						$('.push-menu').find(".push-animate").removeClass('push-animate');
1758
1759						setTimeout(function () {
1760							$('ul').removeClass('dl-subview');
1761							$('li').removeClass('dl-subviewopen');
1762							$('.push-down').addClass('push-animate');
1763						}, 100);
1764					}
1765				});
1766
1767				//Pushdown Menu
1768
1769				$(".pushdownHeader .btn-responsive-nav").hide();
1770				$(".pushdown .scrollbar").hide();
1771
1772				$(".nav-main.pushdown").addClass("collapse");
1773
1774				if ($(".pushdownHeader").length > 0)
1775					$(".nav-main-collapse").removeClass("collapse");
1776
1777				if ($nav.hasClass('pushdown')) {
1778					$(".btn-push-nav").click(function () {
1779						pushdownMenu();
1780						$(".pushdown .scrollbar").show();
1781					});
1782				}
1783
1784				$('nav.pushdown ul.nav-main li a').click(function () {
1785					$(this).parent().toggleClass('resp-active');
1786				});
1787
1788				$(window).on('scroll resize', function () {
1789					$(".pushdownHeader .btn-responsive-nav").hide();
1790				});
1791
1792				if ($(".pushdownHeader").length > 0) {
1793
1794					if (($header.hasClass('flat-header')) || ($header.hasClass('newHeader'))) {
1795						$('header div.social-icons').css('margin-right', '40px');
1796					}
1797				}
1798
1799				//Resize
1800				$(window).on('resize', function () {
1801					changeVerticalMenu();
1802					showSearch();
1803					animateSearch();
1804					animateHeader();
1805					changeWidgets();
1806
1807					$('header').find(".btn-responsive-nav").removeAttr('style');
1808				});
1809
1810				// Add Arrows
1811				if ($(window).width() > 991)
1812					$header.find('.dropdown-toggle, .dropdown:not(.mega-menu-item) .dropdown-submenu > a').append($('<i />').addClass('fas fa-caret-down'));
1813				else
1814					$header.find('.dropdown-toggle, .dropdown .dropdown-submenu > a').append($('<i />').addClass('fas fa-caret-down'));
1815
1816				if ($(window).width() < 992) {
1817					$(".navbar-collapse ul li.mega-menu-item").each(function () {
1818						if (!$(this).find(".dropdown-menu > li").length)
1819							$(this).find(".fa-caret-down").hide();
1820					});
1821				}
1822
1823				// Mobile Arrows
1824				$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) {
1825					e.preventDefault();
1826
1827					if ($(window).width() < 992) {
1828
1829						$(this).closest('li').toggleClass('opened');
1830
1831						if ($(this).closest('li').hasClass('opened')) {
1832							$('header.ddrheader .header-body').css({
1833								"height": $(this).closest('li').height() + $('.header-body').height(),
1834								"max-height": parseInt($('header').css('min-height')) + 330
1835							});
1836						}
1837						else {
1838							setTimeout(function () {
1839								$('header.ddrheader .header-body').css({
1840									"height": "auto",
1841									"min-height": $('.navbar-collapse').height() + parseInt($('header').css('min-height')),
1842									"max-height": $('.navbar-collapse').height() + parseInt($('header').css('min-height'))
1843								});
1844							}, 100);
1845						}
1846					}
1847				});
1848
1849				// Anchors Position
1850				$('[data-hash]').each(function () {
1851
1852					var target = $(this).attr('href'),
1853						offset = ($(this).is("[data-hash-offset]") ? $(this).data('hash-offset') : 0);
1854
1855					if ($(target).get(0)) {
1856						$(this).on('click', function (e) {
1857							e.preventDefault();
1858
1859							if (!$(e.target).is('i')) {
1860
1861								// Close Collapse if Opened
1862								$(this).parents('.collapse.show').collapse('hide');
1863
1864								self.scrollToTarget(target, offset);
1865							}
1866							return;
1867						});
1868					}
1869				});
1870
1871				// Mobile Redirect - (Ignores the Dropdown from Bootstrap)
1872				$('.mobile-redirect').on('click', function () {
1873					if ($(window).width() < 992) {
1874						self.location = $(this).attr('href');
1875					}
1876				});
1877
1878				// Dropdown Menu Check Visible Space
1879				$("#mainMenu li.dropdown").hover(function () {
1880
1881					if ($(window).width() < 767) return;
1882
1883					var menuItem = $(this);
1884					var subMenu = $(this).find("> ul.dropdown-menu");
1885
1886					var screenWidth = $(window).width(),
1887						menuItemWidth = menuItem.width(),
1888						subMenuWidth = subMenu.width(),
1889						menuItemPosRight = subMenu.offset().left + subMenu.width();
1890
1891					if (menuItemPosRight > screenWidth) {
1892						subMenu.css("margin-left", "-" + ((subMenuWidth - menuItemWidth) + 10) + "px");
1893						subMenu.css('border-radius', '0');
1894					} else
1895						subMenu.css("margin-left", '2px');
1896				});
1897
1898				// Submenu Check Visible Space
1899				$("#mainMenu li.dropdown-submenu").hover(function () {
1900
1901					if ($(window).width() < 767) return;
1902
1903					var subMenu = $(this).find("ul.dropdown-menu");
1904
1905					if (!subMenu.get(0)) return;
1906
1907					var screenWidth = $(window).width(),
1908						subMenuWidth = subMenu.width(),
1909						subMenuParentWidth = $(this).parent().width(),
1910						subMenuPosRight = subMenu.offset().left + subMenu.width();
1911
1912					if (subMenuPosRight > screenWidth)
1913						subMenu.css("margin-left", "-" + (subMenuParentWidth + subMenuWidth + 10) + "px");
1914					else
1915						subMenu.css("margin-left", 0);
1916				});
1917
1918				return this;
1919			},
1920
1921			scrollToTarget: function (target, offset) {
1922				var self = this;
1923
1924				$('body').addClass('scrolling');
1925
1926				$('html, body').animate({
1927					scrollTop: $(target).offset().top - offset
1928				}, self.options.scrollDelay, self.options.scrollAnimation, function () {
1929					$('body').removeClass('scrolling');
1930				});
1931
1932				return this;
1933
1934			}
1935
1936		}
1937
1938	});
1939
1940}).apply(this, [window.theme, jQuery]);
1941
1942// Sticky Menu
1943(function (theme, $) {
1944
1945	theme = theme || {};
1946
1947	var initialized = false;
1948
1949	$.extend(theme, {
1950
1951		StickyMenu: {
1952
1953			defaults: {
1954				wrapper: $('header'),
1955				stickyEnabled: true,
1956				stickyEnableOnBoxed: true,
1957				stickyEnableOnMobile: true,
1958				stickyWithGap: true,
1959				stickyChangeLogoSize: true,
1960				stickyBodyPadding: false,
1961				menuAfterHeader: false,
1962				alwaysStickyEnabled: false,
1963				stickyForceHeaderTop: false,
1964				logoPaddingTop: 28,
1965				logoSmallHeight: 40
1966			},
1967
1968			initialize: function ($wrapper, opts, sw) {
1969				if (!sw && initialized) {
1970					return this;
1971				}
1972
1973				initialized = true;
1974				this.$wrapper = ($wrapper || this.defaults.wrapper);
1975
1976				this
1977			.setOptions(opts)
1978			.build()
1979			.events();
1980
1981				return this;
1982			},
1983
1984			setOptions: function (opts) {
1985				this.options = $.extend(true, {}, this.defaults, opts, this.$wrapper.data('plugin-options'));
1986
1987				return this;
1988			},
1989
1990			build: function () {
1991				if (!this.options.stickyEnableOnBoxed && $('body').hasClass('boxed') || !this.options.stickyEnabled) {
1992					return this;
1993				}
1994
1995				var self = this,
1996					$window = $(window);
1997				$body = $('body'),
1998				$header = self.$wrapper,
1999				$headerContainer = $header.parent(),
2000				$headerNavItems = $header.find('ul.nav-main > li > a'),
2001				$logoWrapper = $header.find('.logo'),
2002				$logo = $logoWrapper.find('img'),
2003				logoHeight = $logo.height(),
2004				logoPaddingTop = parseInt($logo.attr('data-sticky-padding') ? $logo.attr('data-sticky-padding') : self.options.logoPaddingTop),
2005				logoSmallHeight = parseInt($logo.attr('data-sticky-height') ? $logo.attr('data-sticky-height') : self.options.logoSmallHeight),
2006				headerHeight = $header.height(),
2007				stickyGap = 0;
2008
2009				if (logoHeight == 0) {
2010					setTimeout(function () {
2011						logoHeight = $logo.height();
2012					}, 400);
2013				} else {
2014
2015					if ($('header').outerHeight() > 0)
2016						$('header').css('min-height', $('header').outerHeight());
2017				}
2018
2019				if (this.options.menuAfterHeader) {
2020					$headerContainer.css('min-height', $header.height());
2021				}
2022
2023				$window.afterResize(function () {
2024					$headerContainer.css('min-height', $header.height());
2025				});
2026
2027				self.checkStickyMenu = function () {
2028
2029					if ((!self.options.stickyEnableOnBoxed && $body.hasClass('boxed')) || ($window.width() < 991 && !self.options.stickyEnableOnMobile)) {
2030						self.stickyMenuDeactivate();
2031						$header.removeClass('fixed')
2032						return false;
2033					}
2034
2035					if (self.options.stickyWithGap && headerHeight > 0) {
2036						stickyGap = ((headerHeight - 15) - logoSmallHeight);
2037					} else {
2038						stickyGap = 0;
2039					}
2040
2041					// Menu After Header
2042					if (!this.options.menuAfterHeader) {
2043
2044						if ($window.scrollTop() > stickyGap) {
2045							self.stickyMenuActivate();
2046						} else {
2047							self.stickyMenuDeactivate();
2048						}
2049
2050					} else {
2051
2052						if ($window.scrollTop() > $headerContainer.offset().top) {
2053							$header.addClass('fixed');
2054						} else {
2055							$header.removeClass('fixed');
2056						}
2057
2058					}
2059
2060				}
2061
2062				self.stickyMenuActivate = function () {
2063
2064					if ($body.hasClass('sticky-menu-active')) {
2065						return false;
2066					}
2067
2068					logoHeight = $logo.height();
2069
2070					$logo.stop(true, true);
2071
2072					$body.addClass('sticky-menu-active').removeClass('sticky-menu-deactive');
2073
2074					if (self.options.stickyBodyPadding) {
2075						$body.css('padding-top', headerHeight);
2076					}
2077
2078					// Flat Menu Items
2079					if ($header.hasClass('flat-menu')) {
2080						$headerNavItems.addClass('sticky-menu-active');
2081					}
2082
2083					if (self.options.stickyChangeLogoSize) {
2084
2085						$logoWrapper.addClass('logo-sticky-active');
2086
2087						$logo.animate({
2088							height: logoSmallHeight,
2089							top: logoPaddingTop + 'px'
2090						}, 200, function () {
2091							$.event.trigger({
2092								type: 'stickyMenu.active'
2093							});
2094						});
2095
2096					} else {
2097						$.event.trigger({
2098							type: 'stickyMenu.active'
2099						});
2100					}
2101
2102					if (self.options.stickyForceHeaderTop) {
2103						$header.css('top', self.options.stickyForceHeaderTop);
2104					}
2105
2106				}
2107
2108				self.stickyMenuDeactivate = function () {
2109
2110					if ($body.hasClass('sticky-menu-active')) {
2111
2112						$body.removeClass('sticky-menu-active').addClass('sticky-menu-deactive');
2113
2114						if (self.options.stickyBodyPadding) {
2115							$body.css('padding-top', 0);
2116						}
2117
2118						// Flat Menu Items
2119						if ($header.hasClass('flat-menu')) {
2120							$headerNavItems.removeClass('sticky-menu-active');
2121						}
2122
2123						if (self.options.stickyChangeLogoSize) {
2124
2125							$logoWrapper.removeClass('logo-sticky-active');
2126
2127							$logo.animate({
2128								height: logoHeight,
2129								top: '0px'
2130							}, 200, function () {
2131								$.event.trigger({
2132									type: 'stickyMenu.deactive'
2133								});
2134								$window.trigger('resize');
2135							});
2136
2137						} else {
2138							$.event.trigger({
2139								type: 'stickyMenu.deactive'
2140							});
2141						}
2142
2143					}
2144
2145					if (self.options.stickyForceHeaderTop) {
2146						$header.css('top', '0');
2147					}
2148
2149				}
2150
2151				if (!self.options.alwaysStickyEnabled) {
2152
2153					$body.addClass('sticky-menu-deactive');
2154
2155					self.checkStickyMenu();
2156
2157				} else {
2158
2159					$body.addClass('sticky-menu-active always-sticky').removeClass('sticky-menu-deactive');
2160
2161					if (self.options.stickyBodyPadding) {
2162						$body.css('padding-top', $header.height() + ($header.hasClass('narrow') ? 0 : 22));
2163					}
2164
2165				}
2166
2167				return this;
2168			},
2169
2170			events: function () {
2171				var self = this;
2172
2173				if (!this.options.stickyEnableOnBoxed && $('body').hasClass('boxed')) {
2174					return this;
2175				}
2176
2177				if (!self.options.alwaysStickyEnabled) {
2178					$(window).on('scroll resize', function () {
2179						if (self.options.stickyEnabled)
2180							self.checkStickyMenu();
2181						else {
2182							if ($(window).scrollTop() > 0)
2183								$('body').addClass('sticky-disable');
2184							else
2185								$('body').removeClass('sticky-disable');
2186						}
2187					});
2188				}
2189				$('.btn-responsive-nav').on('click', function (e) {
2190					e.preventDefault();
2191				});
2192
2193				return this;
2194			}
2195
2196		}
2197
2198	});
2199
2200}).apply(this, [window.theme, jQuery]);
2201
2202// Scroll to Top
2203(function (theme, $) {
2204
2205	theme = theme || {};
2206
2207	$.extend(theme, {
2208
2209		PluginScrollToTop: {
2210
2211			defaults: {
2212				wrapper: $('body'),
2213				offset: 150,
2214				buttonClass: 'scroll-to-top',
2215				iconClass: 'fa fa-chevron-up',
2216				delay: 500,
2217				visibleMobile: false,
2218				label: false
2219			},
2220
2221			initialize: function (opts) {
2222				initialized = true;
2223
2224				this
2225			.setOptions(opts)
2226			.build()
2227			.events();
2228
2229				return this;
2230			},
2231
2232			setOptions: function (opts) {
2233				this.options = $.extend(true, {}, this.defaults, opts);
2234
2235				return this;
2236			},
2237
2238			build: function () {
2239				var self = this,
2240					$el;
2241
2242				// Base HTML Markup
2243				$el = $('<a />')
2244					.addClass(self.options.buttonClass)
2245					.attr({
2246						'href': '#',
2247					})
2248					.append(
2249						$('<i />')
2250						.addClass(self.options.iconClass).html('<span class="scroll-indent">scroller</span>')
2251					);
2252
2253				// Visible Mobile
2254				if (!self.options.visibleMobile) {
2255					$el.addClass('hidden-mobile');
2256				}
2257
2258				// Label
2259				if (self.options.label) {
2260					$el.append(
2261			$('<span />').html(self.options.label)
2262		);
2263				}
2264
2265				this.options.wrapper.append($el);
2266
2267				this.$el = $el;
2268
2269				return this;
2270			},
2271
2272			events: function () {
2273				var self = this,
2274					_isScrolling = false;
2275
2276				// Click Element Action
2277				self.$el.on('click', function (e) {
2278					e.preventDefault();
2279					$('body, html').animate({
2280						scrollTop: 0
2281					}, self.options.delay);
2282					return false;
2283				});
2284
2285				// Show/Hide Button on Window Scroll event.
2286				$(window).scroll(function () {
2287
2288					if (!_isScrolling) {
2289
2290						_isScrolling = true;
2291
2292						if ($(window).scrollTop() > self.options.offset) {
2293
2294							self.$el.stop(true, true).addClass('visible');
2295							_isScrolling = false;
2296
2297						} else {
2298
2299							self.$el.stop(true, true).removeClass('visible');
2300							_isScrolling = false;
2301
2302						}
2303
2304					}
2305
2306				});
2307
2308				return this;
2309			}
2310
2311		}
2312
2313	});
2314
2315}).apply(this, [window.theme, jQuery]);
2316
2317// Parallax
2318(function (theme, $) {
2319
2320	theme = theme || {};
2321
2322	$.extend(theme, {
2323
2324		PluginParallax: {
2325
2326			defaults: {
2327				itemsSelector: '.parallax-background',
2328				offset: 0,
2329				horizontalPosition: '50%',
2330				speed: 1.5,
2331				horizontalScrolling: false
2332			},
2333
2334			initialize: function (opts) {
2335
2336				this
2337			.setOptions(opts)
2338			.build();
2339
2340				return this;
2341			},
2342
2343			setOptions: function (opts) {
2344				this.options = $.extend(true, {}, this.defaults, opts);
2345
2346				return this;
2347			},
2348
2349			build: function () {
2350				if (!($.isFunction($.fn.stellar)) || typeof (Modernizr.touch) == 'undefined') {
2351					return this;
2352				}
2353
2354				var self = this;
2355
2356				$(window).load(function () {
2357
2358					if (!Modernizr.touch) {
2359						$.stellar(self.options).addClass('parallax-ready');
2360					} else {
2361						$(self.options.itemsSelector).addClass('parallax-touch');
2362						$(window).on('scroll resize', function () {
2363							yPos = -($(window).scrollTop()) / ((self.options.speed + 2));
2364							plxPos = (yPos < 0) ? Math.abs(yPos) : -Math.abs(yPos);
2365							bgpos = self.options.horizontalPosition + ' ' + yPos + 'px';
2366							$(self.options.itemsSelector).css('background-position', bgpos);
2367						});
2368					}
2369
2370				});
2371
2372				return this;
2373			}
2374
2375		}
2376
2377	});
2378
2379}).apply(this, [window.theme, jQuery]);
2380
2381// Commom Plugins
2382(function ($) {
2383
2384	'use strict';
2385
2386	// Scroll to Top Button.
2387	if (typeof theme.PluginScrollToTop !== 'undefined') {
2388		theme.PluginScrollToTop.initialize();
2389	}
2390
2391	// Parallax
2392	if (typeof theme.PluginParallax !== 'undefined') {
2393		theme.PluginParallax.initialize();
2394	}
2395
2396	// Tooltips
2397	if ($.isFunction($.fn['tooltip'])) {
2398
2399		//Added rel selector to support backward compatibility
2400		$('[data-tooltip]:not(.manual), [data-plugin-tooltip]:not(.manual), a[rel=tooltip]').tooltip();
2401	}
2402
2403	// Popover
2404	if ($.isFunction($.fn['popover'])) {
2405		$(function () {
2406			$('[data-plugin-popover]:not(.manual)').each(function () {
2407				var $this = $(this),
2408                    opts;
2409
2410				var pluginOptions = $this.data('plugin-options');
2411				if (pluginOptions)
2412					opts = jQuery.parseJSON(pluginOptions.replace(/'/g, '\"'));
2413
2414				$this.popover(opts);
2415			});
2416		});
2417	}
2418
2419	// Match Height
2420	if ($.isFunction($.fn['matchHeight'])) {
2421
2422		$('.match-height').matchHeight();
2423
2424		// Featured Boxes
2425		$('.featured-boxes .featured-box').matchHeight();
2426
2427		// Featured Box Full
2428		$('.featured-box-full').matchHeight();
2429
2430	}
2431
2432}).apply(this, [jQuery]);
2433
2434// Counter
2435(function ($) {
2436
2437	'use strict';
2438
2439	if ($.isFunction($.fn['themePluginCounter'])) {
2440
2441		$(function () {
2442			$('[data-plugin-counter]:not(.manual), .counters [data-to]').each(function () {
2443				var $this = $(this),
2444                    opts;
2445
2446				var pluginOptions = $this.data('plugin-options');
2447				if (pluginOptions)
2448					opts = jQuery.parseJSON(pluginOptions.replace(/'/g, '\"'));
2449
2450				$this.themePluginCounter(opts);
2451			});
2452		});
2453
2454	}
2455
2456}).apply(this, [jQuery]);
2457
2458// Match Height
2459(function ($) {
2460
2461	'use strict';
2462
2463	if ($.isFunction($.fn['themePluginMatchHeight'])) {
2464
2465		$(function () {
2466			$('[data-plugin-match-height]:not(.manual)').each(function () {
2467				var $this = $(this),
2468                    opts;
2469
2470				var pluginOptions = $this.data('plugin-options');
2471				if (pluginOptions)
2472					opts = jQuery.parseJSON(pluginOptions.replace(/'/g, '\"'));
2473
2474				$this.themePluginMatchHeight(opts);
2475			});
2476		});
2477
2478	}
2479
2480}).apply(this, [jQuery]);
2481
2482// Sticky
2483(function ($) {
2484
2485	'use strict';
2486
2487	if ($.isFunction($.fn['themePluginSticky'])) {
2488
2489		$(function () {
2490			$('[data-plugin-sticky]:not(.manual)').each(function () {
2491				var $this = $(this),
2492                    opts;
2493
2494				var pluginOptions = $this.data('plugin-options');
2495				if (pluginOptions)
2496					opts = jQuery.parseJSON(pluginOptions.replace(/'/g, '\"'));
2497
2498				$this.themePluginSticky(opts);
2499			});
2500		});
2501
2502	}
2503
2504}).apply(this, [jQuery]);
2505
2506// Move Cloud
2507(function ($) {
2508
2509	'use strict';
2510
2511	if ($('.cloud').get(0)) {
2512		var moveCloud = function () {
2513			$('.cloud').animate({
2514				'top': '+=20px'
2515			}, 3000, 'linear', function () {
2516				$('.cloud').animate({
2517					'top': '-=20px'
2518				}, 3000, 'linear', function () {
2519					moveCloud();
2520				});
2521			});
2522		};
2523
2524		moveCloud();
2525	}
2526
2527}).apply(this, [jQuery]);
2528
2529// Toggle
2530(function ($) {
2531
2532	'use strict';
2533
2534	if ($.isFunction($.fn['themePluginToggle'])) {
2535
2536		$(function () {
2537
2538			//Added toogle class to support backward compatibility
2539			$('[data-plugin-toggle]:not(.manual), .toogle').each(function () {
2540				var $this = $(this),
2541                    opts;
2542
2543				var pluginOptions = $this.data('plugin-options');
2544				if (pluginOptions)
2545					opts = jQuery.parseJSON(pluginOptions.replace(/'/g, '\"'));
2546
2547				$this.themePluginToggle(opts);
2548			});
2549
2550			//Added toggle class to support backward compatibility
2551			$('section.toggle').parent(':not([class])').each(function () {
2552				var $this = $(this),
2553                    opts;
2554
2555				var pluginOptions = $this.data('plugin-options');
2556				if (pluginOptions)
2557					opts = jQuery.parseJSON(pluginOptions.replace(/'/g, '\"'));
2558
2559				$this.themePluginToggle(opts);
2560			});
2561		});
2562
2563	}
2564
2565}).apply(this, [jQuery]);
2566
2567// Word Rotate
2568(function ($) {
2569
2570	'use strict';
2571
2572	if ($.isFunction($.fn['themePluginwordRotate'])) {
2573
2574		$(function () {
2575			$('[data-plugin-word-rotate]:not(.manual), .word-rotate:not(.manual)').each(function () {
2576				var $this = $(this),
2577                    opts;
2578
2579				var pluginOptions = $this.data('plugin-options');
2580				if (pluginOptions)
2581					opts = jQuery.parseJSON(pluginOptions.replace(/'/g, '\"'));
2582
2583				$this.themePluginwordRotate(opts);
2584			});
2585		});
2586
2587	}
2588
2589}).apply(this, [jQuery]);
2590
2591// Commom Partials
2592(function ($) {
2593
2594	'use strict';
2595
2596	// Sticky Menu
2597	if (typeof theme.StickyMenu !== 'undefined') {
2598		theme.StickyMenu.initialize();
2599	}
2600
2601	// Nav Menu
2602	if (typeof theme.Nav !== 'undefined') {
2603		theme.Nav.initialize();
2604	}
2605
2606	if ($(window).width() < 992)
2607		fixedHeader();
2608
2609	$(window).on('resize', function () {
2610		fixedHeader();
2611	});
2612
2613}).apply(this, [jQuery]);
2614
2615// Fixed Header
2616function fixedHeader() {
2617
2618	var hasFixed = $('header').hasClass('fixedheader');
2619	var $header = $('header');
2620	if ($(window).width() < 992)
2621		$header.addClass('fixedheader');
2622	else {
2623		if (!hasFixed)
2624			$header.removeClass('fixedheader');
2625	}
2626}
2627
2628// Overlay Menu
2629function overlayHeader($overlayHeader, onePage) {
2630
2631	$('body').removeClass('overlay-effect');
2632	$overlayHeader.find('button.close-btn').remove();
2633	$overlayHeader.find('.overlay ul').removeClass('dl-menu, dl-subview');
2634	$overlayHeader.find('.overlay li').removeClass('dl-submenu, dl-subviewopen');
2635
2636	if (onePage) {
2637		$overlayHeader.find('.overlay').addClass('one-menu');
2638		$('.btn-responsive-nav').click(function () {
2639			$overlayHeader.find('.overlay').removeClass('one-menu');
2640		});
2641	}
2642
2643	if (!onePage) {
2644		$overlayHeader.find('.overlay').removeClass('animate-menu');
2645
2646	}
2647}
2648
2649// Pushdown & Inline Menu 
2650function inlineHeader(onePage) {
2651
2652	if (!onePage)
2653		$body.toggleClass('show-menu');
2654
2655	else {
2656		$('body').removeClass('show-menu');
2657		$body.find('.push-down ul').removeClass('dl-subview');
2658		$('.btn-responsive-nav').find('.fas').switchClass('fa-close', 'fa-bars');
2659	}
2660}
2661
2662function pushdownMenu(onePage) {
2663	$(".pushdown.collapse").addClass("nav-main-collapse-push");
2664	$("header").toggleClass("pushdownshow");
2665}
2666
2667var pushMenu = $(".pushdownHeader");
2668if (pushMenu.length > 0)
2669	$(".nav-main-collapse").removeClass("collapse");
2670$(".nav-main.pushdown").addClass("collapse");
2671$(".pushdown .scrollbar").hide();
2672
2673// Added below code to support backward compatibility
2674/* Circular Bars - Knob */
2675if (typeof ($.fn.knob) != "undefined") {
2676	$(".knob").knob({});
2677}
2678
2679$(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
2680	e.preventDefault();
2681});
2682
2683//Google Map
2684$(window).load(function () {
2685	$('.google-map img:not([alt])').attr('alt', 'Google Map');
2686});
2687
2688//Slide Menu
2689$('.nav-main-collapse.slidebar nav ul.nav-main li a').click(function () {
2690	$(this).parent().toggleClass('sub-open');
2691});
2692
2693$('.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) {
2694
2695	e.preventDefault();
2696
2697	if ($(window).width() > 991 && $(this).parents('.slidebar').length < 0)
2698		return this;
2699
2700	return this;
2701});
2702
2703(function ($) {
2704
2705	// Create a new instance of Slidebars
2706	var controller = new slidebars();
2707
2708	// Initialize Slidebars
2709	controller.init();
2710
2711	// Left Slidebar controls
2712	$('.btn-responsive-nav').on('click', function (event) {
2713		controller.toggle('slidebar');
2714	});
2715
2716	$('.close-icon .fa-times-circle').on('click', function (event) {
2717		$SideClose = $(".btn-responsive-nav .fa-times");
2718		if ($SideClose.length > 0)
2719			$(".btn-responsive-nav .fas").removeClass('fa-times').addClass('fa-bars');
2720		controller.close('slidebar');
2721	});
2722
2723})(jQuery);
2724// Video Background
2725(function (theme, $) {
2726
2727    theme = theme || {};
2728
2729    var instanceName = '__videobackground';
2730
2731    var PluginVideoBackground = function ($el, opts) {
2732        return this.initialize($el, opts);
2733    };
2734
2735    PluginVideoBackground.defaults = {
2736        overlay: true,
2737        volume: 1,
2738        playbackRate: 1,
2739        muted: true,
2740        loop: true,
2741        autoplay: true,
2742        position: '50% 50%',
2743        posterType: 'detect'
2744    };
2745
2746    PluginVideoBackground.prototype = {
2747        initialize: function ($el, opts) {
2748            this.$el = $el;
2749
2750            this
2751				.setData()
2752				.setOptions(opts)
2753				.build();
2754
2755            return this;
2756        },
2757
2758        setData: function () {
2759            this.$el.data(instanceName, this);
2760
2761            return this;
2762        },
2763
2764        setOptions: function (opts) {
2765            this.options = $.extend(true, {}, PluginVideoBackground.defaults, opts, {
2766                path: this.$el.data('video-path'),
2767                wrapper: this.$el
2768            });
2769
2770            return this;
2771        },
2772
2773        build: function () {
2774
2775            if (!($.isFunction($.fn.vide)) || (!this.options.path)) {
2776                return this;
2777            }
2778
2779            if (this.options.overlay) {
2780                this.options.wrapper.prepend(
2781					$('<div />').addClass('video-overlay')
2782				);
2783            }
2784
2785            this.options.wrapper.vide(this.options.path, this.options);
2786
2787            return this;
2788        }
2789    };
2790
2791    // expose to scope
2792    $.extend(theme, {
2793        PluginVideoBackground: PluginVideoBackground
2794    });
2795
2796    // jquery plugin
2797    $.fn.themePluginVideoBackground = function (opts) {
2798        return this.map(function () {
2799            var $this = $(this);
2800
2801            if ($this.data(instanceName)) {
2802                return $this.data(instanceName);
2803            } else {
2804                return new PluginVideoBackground($this, opts);
2805            }
2806
2807        });
2808    }
2809
2810}).apply(this, [window.theme, jQuery]);
2811
2812// Video Background
2813(function ($) {
2814
2815    'use strict';
2816
2817    if ($.isFunction($.fn['themePluginVideoBackground'])) {
2818
2819        $(function () {
2820            $('[data-plugin-video-background]:not(.manual)').each(function () {
2821                var $this = $(this),
2822					opts;
2823
2824                var pluginOptions = $this.data('plugin-options');
2825                if (pluginOptions)
2826                    opts = jQuery.parseJSON(pluginOptions.replace(/'/g, '\"'));
2827
2828                $this.themePluginVideoBackground(opts);
2829            });
2830        });
2831
2832    }
2833
2834}).apply(this, [jQuery]);
2835
2836// Parallax 
2837(function (theme, $) {
2838
2839	theme = theme || {};
2840
2841	var instanceName = '__parallax';
2842
2843	var PluginParallax = function ($el, opts) {
2844		return this.initialize($el, opts);
2845	};
2846
2847	PluginParallax.defaults = {
2848		speed: 1.5,
2849		horizontalPosition: '50%',
2850		offset: 0,
2851		parallaxHeight: '100vh'
2852	};
2853
2854	PluginParallax.prototype = {
2855		initialize: function ($el, opts) {
2856			if ($el.data(instanceName)) {
2857				return this;
2858			}
2859
2860			this.$el = $el;
2861
2862			this
2863				.setData()
2864				.setOptions(opts)
2865				.build();
2866
2867			return this;
2868		},
2869
2870		setData: function () {
2871			this.$el.data(instanceName, this);
2872
2873			return this;
2874		},
2875
2876		setOptions: function (opts) {
2877			this.options = $.extend(true, {}, PluginParallax.defaults, opts, {
2878				wrapper: this.$el
2879			});
2880
2881			return this;
2882		},
2883
2884		build: function () {
2885			var self = this,
2886				$window = $(window),
2887				offset,
2888				yPos,
2889				bgpos,
2890				background;
2891
2892			// Create Parallax Element
2893			background = $('<div class="parallax-background"></div>');
2894
2895			// Set Style for Parallax Element
2896			background.css({
2897				'background-image': 'url(' + self.options.wrapper.data('image-src') + ')',
2898				'background-size': 'cover',
2899				'position': 'absolute',
2900				'top': '-50px',
2901				'left': 0,
2902				'width': '100%',
2903				'height': self.options.parallaxHeight
2904			});
2905
2906			// Add Parallax Element on DOM
2907			self.options.wrapper.prepend(background);
2908
2909			// Set Overlfow Hidden and Position Relative to Parallax Wrapper
2910			self.options.wrapper.css({
2911				'position': 'relative',
2912				'overflow': 'hidden'
2913			});
2914
2915			// Parallax Effect on Scroll & Resize
2916			var parallaxEffectOnScrolResize = function () {
2917				$window.on('scroll resize', function () {
2918					offset = self.options.wrapper.offset();
2919					yPos = -($window.scrollTop() - (offset.top - 100)) / ((self.options.speed + 2));
2920					plxPos = (yPos < 0) ? Math.abs(yPos) : -Math.abs(yPos);
2921					if (self.options.offset > 0)
2922						self.options.offset = 0;
2923					background.css({
2924						'transform': 'translate3d(0, ' + ((plxPos) + (self.options.offset)) + 'px, 0)',
2925						'background-position-x': self.options.horizontalPosition
2926					});
2927				});
2928
2929				$window.trigger('scroll');
2930			}
2931
2932			if (!$.browser.mobile) {
2933				parallaxEffectOnScrolResize();
2934			} else {
2935				if (self.options.enableOnMobile == true) {
2936					parallaxEffectOnScrolResize();
2937				} else {
2938					self.options.wrapper.addClass('parallax-disabled');
2939				}
2940			}
2941
2942			return this;
2943		}
2944	};
2945
2946	// expose to scope
2947	$.extend(theme, {
2948		PluginParallax: PluginParallax
2949	});
2950
2951	// jquery plugin
2952	$.fn.themePluginParallax = function (opts) {
2953		return this.map(function () {
2954			var $this = $(this);
2955
2956			if ($this.data(instanceName)) {
2957				return $this.data(instanceName);
2958			} else {
2959				return new PluginParallax($this, opts);
2960			}
2961
2962		});
2963	}
2964
2965}).apply(this, [window.theme, jQuery]);
2966
2967// Parallax
2968(function ($) {
2969
2970    'use strict';
2971
2972    if ($.isFunction($.fn['themePluginParallax'])) {
2973
2974        $(function () {
2975            $('[data-plugin-parallax]:not(.manual)').each(function () {
2976                var $this = $(this),
2977                    opts;
2978
2979                var pluginOptions = $this.data('plugin-options');
2980
2981                if (pluginOptions)
2982                    opts = jQuery.parseJSON(pluginOptions.replace(/'/g, '\"'));
2983
2984                $this.themePluginParallax(opts);
2985            });
2986        });
2987
2988    }
2989
2990}).apply(this, [jQuery]);// Chart Circular
2991(function (theme, $) {
2992
2993    theme = theme || {};
2994
2995    var instanceName = '__chartCircular';
2996
2997    var PluginChartCircular = function ($el, opts) {
2998        return this.initialize($el, opts);
2999    };
3000
3001    PluginChartCircular.defaults = {
3002        accX: 0,
3003        accY: -150,
3004        delay: 1,
3005        barColor: '#0088CC',
3006        trackColor: '#f2f2f2',
3007        scaleColor: false,
3008        scaleLength: 5,
3009        lineCap: 'round',
3010        lineWidth: 13,
3011        size: 175,
3012        rotate: 0,
3013        animate: ({
3014            duration: 2500,
3015            enabled: true
3016        })
3017    };
3018
3019    PluginChartCircular.prototype = {
3020        initialize: function ($el, opts) {
3021            if ($el.data(instanceName)) {
3022                return this;
3023            }
3024
3025            this.$el = $el;
3026
3027            this
3028				.setData()
3029				.setOptions(opts)
3030				.build();
3031
3032            return this;
3033        },
3034
3035        setData: function () {
3036            this.$el.data(instanceName, this);
3037
3038            return this;
3039        },
3040
3041        setOptions: function (opts) {
3042            this.options = $.extend(true, {}, PluginChartCircular.defaults, opts, {
3043                wrapper: this.$el
3044            });
3045
3046            return this;
3047        },
3048
3049        build: function () {
3050            if (!($.isFunction($.fn.appear)) || !($.isFunction($.fn.easyPieChart))) {
3051                return this;
3052            }
3053
3054            var self = this,
3055				$el = this.options.wrapper,
3056				value = ($el.attr('data-percent') ? $el.attr('data-percent') : 0),
3057				percentEl = $el.find('.percent');
3058
3059            $.extend(true, self.options, {
3060                onStep: function (from, to, currentValue) {
3061                    percentEl.html(parseInt(currentValue));
3062                }
3063            });
3064
3065            $el.attr('data-percent', 0);
3066
3067            $el.appear(function () {
3068
3069                $el.easyPieChart(self.options);
3070
3071                setTimeout(function () {
3072
3073                    $el.data('easyPieChart').update(value);
3074                    $el.attr('data-percent', value);
3075
3076                }, self.options.delay);
3077
3078            }, {
3079                accX: self.options.accX,
3080                accY: self.options.accY
3081            });
3082
3083            return this;
3084        }
3085    };
3086
3087    // expose to scope
3088    $.extend(theme, {
3089        PluginChartCircular: PluginChartCircular
3090    });
3091
3092    // jquery plugin
3093    $.fn.themePluginChartCircular = function (opts) {
3094        return this.map(function () {
3095            var $this = $(this);
3096
3097            if ($this.data(instanceName)) {
3098                return $this.data(instanceName);
3099            } else {
3100                return new PluginChartCircular($this, opts);
3101            }
3102
3103        });
3104    }
3105
3106}).apply(this, [window.theme, jQuery]);
3107
3108// Chart.Circular
3109(function ($) {
3110
3111    'use strict';
3112
3113    if ($.isFunction($.fn['themePluginChartCircular'])) {
3114
3115        $(function () {
3116            $('[data-plugin-chart-circular]:not(.manual), .circular-bar-chart:not(.manual)').each(function () {
3117                var $this = $(this),
3118					opts;
3119
3120                var pluginOptions = $this.data('plugin-options');
3121                if (pluginOptions)
3122                    opts = jQuery.parseJSON(pluginOptions.replace(/'/g, '\"'));
3123
3124                $this.themePluginChartCircular(opts);
3125            });
3126        });
3127
3128    }
3129
3130}).apply(this, [jQuery]);// Sort
3131(function (theme, $) {
3132
3133    theme = theme || {};
3134
3135    var instanceName = '__sort';
3136
3137    var PluginSort = function ($el, opts) {
3138        return this.initialize($el, opts);
3139    };
3140
3141    PluginSort.defaults = {
3142        useHash: true,
3143        itemSelector: 'li',
3144        layoutMode: 'masonry',
3145        filter: '*',
3146        isOriginLeft: ($('html').attr('dir') == 'rtl' ? false : true)
3147    };
3148
3149    PluginSort.prototype = {
3150        initialize: function ($el, opts) {
3151            if ($el.data(instanceName)) {
3152                return this;
3153            }
3154
3155            this.$el = $el;
3156
3157            this
3158				.setData()
3159				.setOptions(opts)
3160				.build();
3161
3162            return this;
3163        },
3164
3165        setData: function () {
3166            this.$el.data(instanceName, this);
3167
3168            return this;
3169        },
3170
3171        setOptions: function (opts) {
3172            this.options = $.extend(true, {}, PluginSort.defaults, opts, {
3173                wrapper: this.$el
3174            });
3175
3176            return this;
3177        },
3178
3179        build: function () {
3180            if (!($.isFunction($.fn.isotope))) {
3181                return this;
3182            }
3183
3184            var self = this,
3185				$source = this.options.wrapper,
3186				$destination = $('.sort-destination[data-sort-id="' + $source.attr('data-sort-id') + '"]');
3187
3188            if ($destination.get(0)) {
3189
3190                self.$source = $source;
3191                self.$destination = $destination;
3192
3193                self.setParagraphHeight($destination);
3194
3195                $(window).load(function () {
3196
3197                    $destination.isotope(self.options).isotope('layout');
3198
3199                    self.$destination.isotope('on', 'layoutComplete', function (isoInstance, laidOutItems) {
3200                    	if (self.options.useHash && typeof isoInstance.options != 'undefined' && typeof isoInstance.options.filter != 'undefined') {
3201                            if (window.location.hash != '' || isoInstance.options.filter.replace('.', '') != '*') {
3202                                window.location.hash = isoInstance.options.filter.replace('.', '');
3203                            }
3204                        }
3205                    });
3206
3207                    self.events();
3208
3209                });
3210
3211            }
3212
3213            return this;
3214        },
3215
3216        events: function () {
3217            var self = this,
3218				filter = null;
3219
3220            self.$source.find('a').click(function (e) {
3221                e.preventDefault();
3222
3223                filter = $(this).parent().attr('data-option-value');
3224
3225                self.setFilter(filter);
3226
3227                return this;
3228            });
3229
3230            if (self.options.useHash) {
3231                self.hashEvents();
3232            }
3233
3234            return this;
3235        },
3236
3237        setFilter: function (filter) {
3238            var self = this;
3239
3240            //if (self.filter == filter) {
3241            //    return this;
3242            //}
3243
3244            self.$source.find('li.active').removeClass('active');
3245            self.$source.find('li[data-option-value="' + filter + '"]').addClass('active');
3246
3247            self.$destination.isotope({
3248                filter: filter
3249            });
3250
3251            self.filter = filter;
3252
3253            return this;
3254        },
3255
3256        hashEvents: function () {
3257            var self = this,
3258				hash = null,
3259				hashFilter = null,
3260				initHashFilter = '.' + location.hash.replace('#', '');
3261
3262            if (initHashFilter != '.' && initHashFilter != '.*') {
3263                self.setFilter(initHashFilter);
3264            }
3265
3266            $(window).bind('hashchange', function (e) {
3267
3268                hashFilter = '.' + location.hash.replace('#', '');
3269                hash = (hashFilter == '.' || hashFilter == '.*' ? '*' : hashFilter);
3270
3271                self.setFilter(hash);
3272
3273            });
3274
3275            return this;
3276        },
3277
3278        setParagraphHeight: function () {
3279            var self = this,
3280				minParagraphHeight = 0,
3281				paragraphs = $('span.thumb-info-caption p', self.$destination);
3282
3283            paragraphs.each(function () {
3284                if ($(this).height() > minParagraphHeight) {
3285                    minParagraphHeight = ($(this).height() + 10);
3286                }
3287            });
3288
3289            paragraphs.height(minParagraphHeight);
3290
3291            return this;
3292        }
3293
3294    };
3295
3296    // expose to scope
3297    $.extend(theme, {
3298        PluginSort: PluginSort
3299    });
3300
3301    // jquery plugin
3302    $.fn.themePluginSort = function (opts) {
3303        return this.map(function () {
3304            var $this = $(this);
3305
3306            if ($this.data(instanceName)) {
3307                return $this.data(instanceName);
3308            } else {
3309                return new PluginSort($this, opts);
3310            }
3311
3312        });
3313    }
3314
3315}).apply(this, [window.theme, jQuery]);
3316
3317// Sort
3318(function ($) {
3319
3320    'use strict';
3321
3322    if ($.isFunction($.fn['themePluginSort'])) {
3323
3324        $(function () {
3325            $('[data-plugin-sort]:not(.manual), .sort-source:not(.manual)').each(function () {
3326                var $this = $(this),
3327					opts;
3328
3329                var pluginOptions = $this.data('plugin-options');
3330                if (pluginOptions)
3331                    opts = jQuery.parseJSON(pluginOptions.replace(/'/g, '\"'));
3332
3333                $this.themePluginSort(opts);
3334            });
3335        });
3336
3337    }
3338
3339}).apply(this, [jQuery]);
3340
3341// Masonry
3342(function (theme, $) {
3343
3344    theme = theme || {};
3345
3346    var instanceName = '__masonry';
3347
3348    var PluginMasonry = function ($el, opts) {
3349        return this.initialize($el, opts);
3350    };
3351
3352    PluginMasonry.defaults = {
3353        itemSelector: 'li'
3354    };
3355
3356    PluginMasonry.prototype = {
3357        initialize: function ($el, opts) {
3358            if ($el.data(instanceName)) {
3359                return this;
3360            }
3361
3362            this.$el = $el;
3363
3364            this
3365				.setData()
3366				.setOptions(opts)
3367				.build();
3368
3369            return this;
3370        },
3371
3372        setData: function () {
3373            this.$el.data(instanceName, this);
3374
3375            return this;
3376        },
3377
3378        setOptions: function (opts) {
3379            this.options = $.extend(true, {}, PluginMasonry.defaults, opts, {
3380                wrapper: this.$el
3381            });
3382
3383            return this;
3384        },
3385
3386        build: function () {
3387            if (!($.isFunction($.fn.isotope))) {
3388                return this;
3389            }
3390
3391            this.options.wrapper.isotope(this.options);
3392
3393            return this;
3394        }
3395    };
3396
3397    // expose to scope
3398    $.extend(theme, {
3399        PluginMasonry: PluginMasonry
3400    });
3401
3402    // jquery plugin
3403    $.fn.themePluginMasonry = function (opts) {
3404        return this.map(function () {
3405            var $this = $(this);
3406
3407            $this.waitForImages(function () {
3408                if ($this.data(instanceName)) {
3409                    return $this.data(instanceName);
3410                } else {
3411                    return new PluginMasonry($this, opts);
3412                }
3413            });
3414
3415        });
3416    }
3417
3418}).apply(this, [window.theme, jQuery]);
3419
3420// Masonry
3421(function ($) {
3422
3423    'use strict';
3424
3425    if ($.isFunction($.fn['themePluginMasonry'])) {
3426
3427        $(function () {
3428            $('[data-plugin-masonry]:not(.manual)').each(function () {
3429                var $this = $(this),
3430					opts;
3431
3432                var pluginOptions = $this.data('plugin-options');
3433                if (pluginOptions)
3434                    opts = jQuery.parseJSON(pluginOptions.replace(/'/g, '\"'));
3435
3436                $this.themePluginMasonry(opts);
3437            });
3438        });
3439
3440    }
3441
3442}).apply(this, [jQuery]);// Carousel
3443(function (theme, $) {
3444
3445    theme = theme || {};
3446
3447    var instanceName = '__carousel';
3448
3449    var PluginCarousel = function ($el, opts) {
3450        return this.initialize($el, opts);
3451    };
3452
3453    PluginCarousel.defaults = {
3454        loop: true,
3455        responsive: {
3456            0: {
3457                items: 1
3458            },
3459            479: {
3460                items: 1
3461            },
3462            768: {
3463                items: 2
3464            },
3465            979: {
3466                items: 3
3467            },
3468            1199: {
3469                items: 4
3470            }
3471        },
3472        navText: []
3473    };
3474
3475    PluginCarousel.prototype = {
3476        initialize: function ($el, opts) {
3477            if ($el.data(instanceName)) {
3478                return this;
3479            }
3480
3481            this.$el = $el;
3482
3483            this
3484				.setData()
3485				.setOptions(opts)
3486				.build();
3487
3488            return this;
3489        },
3490
3491        setData: function () {
3492            this.$el.data(instanceName, this);
3493
3494            return this;
3495        },
3496
3497        setOptions: function (opts) {
3498            this.options = $.extend(true, {}, PluginCarousel.defaults, opts, {
3499                wrapper: this.$el
3500            });
3501
3502            return this;
3503        },
3504
3505        build: function () {
3506            if (!($.isFunction($.fn.owlCarousel))) {
3507                return this;
3508            }
3509
3510            var self = this,
3511				$el = this.options.wrapper,
3512				activeItemHeight = 0;
3513
3514            // Force RTL according to HTML dir attribute
3515            if ($('html').attr('dir') == 'rtl') {
3516                this.options = $.extend(true, {}, this.options, {
3517                    rtl: true
3518                });
3519            }
3520
3521            if (this.options.items == 1) {
3522                this.options.responsive = {}
3523            }
3524
3525            if (this.options.items > 4) {
3526                this.options = $.extend(true, {}, this.options, {
3527                    responsive: {
3528                        1199: {
3529                            items: this.options.items
3530                        }
3531                    }
3532                });
3533            }
3534
3535            // Auto Height
3536            $(window).afterResize(function () {
3537                activeItemHeight = $el.find('.owl-item.active').height();
3538                $el.find('.owl-stage-outer').height(activeItemHeight);
3539            });
3540
3541            this.options.wrapper.owlCarousel(this.options).addClass("owl-carousel-init");
3542
3543            return this;
3544        }
3545    };
3546
3547    // expose to scope
3548    $.extend(theme, {
3549        PluginCarousel: PluginCarousel
3550    });
3551
3552    // jquery plugin
3553    $.fn.themePluginCarousel = function (opts) {
3554        return this.map(function () {
3555            var $this = $(this);
3556
3557            if ($this.data(instanceName)) {
3558                return $this.data(instanceName);
3559            } else {
3560                return new PluginCarousel($this, opts);
3561            }
3562
3563        });
3564    }
3565
3566}).apply(this, [window.theme, jQuery]);
3567
3568// Carousel
3569(function ($) {
3570
3571    'use strict';
3572
3573    if ($.isFunction($.fn['themePluginCarousel'])) {
3574
3575        $(function () {
3576            $('[data-plugin-carousel]:not(.manual), .owl-carousel:not(.manual)').each(function () {
3577                var $this = $(this),
3578					opts;
3579
3580                var pluginOptions = $this.data('plugin-options');
3581                if (pluginOptions)
3582                    opts = jQuery.parseJSON(pluginOptions.replace(/'/g, '\"'));
3583
3584                $this.themePluginCarousel(opts);
3585            });
3586        });
3587
3588    }
3589
3590}).apply(this, [jQuery]);
3591
3592// Carousel Videos
3593(function ($) {
3594
3595    'use strict';
3596
3597    // Videos
3598    $('#videos').owlCarousel({
3599        items: 1,
3600        merge: true,
3601        loop: true,
3602        margin: 10,
3603        video: true,
3604        lazyLoad: true,
3605        center: true,
3606        responsive: {
3607            480: {
3608                items: 2
3609            },
3610            600: {
3611                items: 4
3612            }
3613        }
3614    })
3615
3616}).apply(this, [jQuery]);// Flickr
3617(function (theme, $) {
3618
3619    theme = theme || {};
3620
3621    var instanceName = '__flickr';
3622
3623    var PluginFlickr = function ($el, opts) {
3624        return this.initialize($el, opts);
3625    };
3626
3627    PluginFlickr.defaults = {
3628        flickrbase: '//api.flickr.com/services/feeds/',
3629        feedapi: 'photos_public.gne',
3630        limit: 6,
3631        qstrings: {
3632            lang: 'en-us',
3633            format: 'json',
3634            jsoncallback: '?'
3635        },
3636        cleanDescription: true,
3637        useTemplate: true,
3638        itemTemplate: '<li><a href="{{image_b}}" title="{{title}}"><span class="thumbnail"><img alt="flickr" src="{{image_s}}" /></span></a></li>',
3639        itemCallback: function () { }
3640    };
3641
3642    PluginFlickr.prototype = {
3643        initialize: function ($el, opts) {
3644            if ($el.data(instanceName)) {
3645                return this;
3646            }
3647
3648            this.$el = $el;
3649
3650            this
3651				.setData()
3652				.setOptions(opts)
3653				.build();
3654
3655            return this;
3656        },
3657
3658        setData: function () {
3659            this.$el.data(instanceName, this);
3660
3661            return this;
3662        },
3663
3664        setOptions: function (opts) {
3665            this.options = $.extend(true, {}, PluginFlickr.defaults, opts, {
3666                wrapper: this.$el
3667            });
3668
3669            return this;
3670        },
3671
3672        build: function () {
3673            if (!($.isFunction($.fn.jflickrfeed)) || !($.isFunction($.fn.magnificPopup))) {
3674                return this;
3675            }
3676
3677            var self = this;
3678
3679            self.options.wrapper.jflickrfeed(this.options, function (data) {
3680
3681                self.options.wrapper.magnificPopup({
3682                    delegate: 'a',
3683                    type: 'image',
3684                    gallery: {
3685                        enabled: true,
3686                        navigateByImgClick: true,
3687                        preload: [0, 1]
3688                    },
3689                    zoom: {
3690                        enabled: true,
3691                        duration: 300,
3692                        opener: function (element) {
3693                            return element.find('img');
3694                        }
3695                    }
3696                });
3697
3698            });
3699
3700            return this;
3701        }
3702    };
3703
3704    // expose to scope
3705    $.extend(theme, {
3706        PluginFlickr: PluginFlickr
3707    });
3708
3709    // jquery plugin
3710    $.fn.themePluginFlickr = function (opts) {
3711        return this.map(function () {
3712            var $this = $(this);
3713
3714            if ($this.data(instanceName)) {
3715                return $this.data(instanceName);
3716            } else {
3717                return new PluginFlickr($this, opts);
3718            }
3719
3720        });
3721    }
3722
3723}).apply(this, [window.theme, jQuery]);
3724
3725// Flickr
3726(function ($) {
3727
3728    'use strict';
3729
3730    if ($.isFunction($.fn['themePluginFlickr'])) {
3731
3732        $(function () {
3733            //Added ul.flickr-feed selector to support backward compatibility
3734            $('[data-plugin-flickr]:not(.manual), ul.flickr-feed').each(function () {
3735                var $this = $(this),
3736					opts;
3737
3738                var pluginOptions = $this.data('plugin-options');
3739                if (pluginOptions)
3740                    opts = jQuery.parseJSON(pluginOptions.replace(/'/g, '\"'));
3741
3742                $this.themePluginFlickr(opts);
3743            });
3744        });
3745
3746    }
3747
3748}).apply(this, [jQuery]);// Type
3749(function (theme, $) {
3750
3751    theme = theme || {};
3752
3753    var instanceName = '__typeWriter';
3754
3755    var PlugintypeWriter = function ($el, opts) {
3756        return this.initialize($el, opts);
3757    };
3758
3759    PlugintypeWriter.defaults = {
3760        typeSpeed: 150,
3761        backSpeed: 0,
3762        backDelay: 500,
3763        startDelay: 0,
3764        loop: false
3765    };
3766
3767    PlugintypeWriter.prototype = {
3768        initialize: function ($el, opts) {
3769            if ($el.data(instanceName)) {
3770                return this;
3771            }
3772
3773            this.$el = $el;
3774
3775            this
3776				.setData()
3777				.setOptions(opts)
3778                .build();
3779
3780            return this;
3781        },
3782
3783        setData: function () {
3784            this.$el.data(instanceName, this);
3785
3786            return this;
3787        },
3788
3789        setOptions: function (opts) {
3790            this.options = $.extend(true, {}, PlugintypeWriter.defaults, opts, {
3791                wrapper: this.$el
3792            });
3793
3794            return this;
3795        },
3796
3797        build: function () {
3798
3799            if (!($.isFunction(Typed))) {
3800                return this;
3801            }
3802            var self = this,
3803            $wrapper = $(self.options.wrapper);
3804
3805            if ($wrapper.find('> span').length > 0)
3806                element = '#' + $wrapper.find('> span').attr('id');
3807            else if ($wrapper.find('> input').length > 0)
3808                element = '#' + $wrapper.find('> input').attr('id');
3809
3810            if (element != null)
3811                typed = new Typed(element, self.options);
3812
3813            return this;
3814        }
3815    };
3816
3817    // expose to scope
3818    $.extend(theme, {
3819        PlugintypeWriter: PlugintypeWriter
3820    });
3821
3822    // jquery plugin
3823    $.fn.themePlugintypeWriter = function (opts) {
3824        return this.map(function () {
3825            var $this = $(this);
3826
3827            if ($this.data(instanceName)) {
3828                return $this.data(instanceName);
3829            } else {
3830                return new PlugintypeWriter($this, opts);
3831            }
3832
3833        });
3834    }
3835
3836}).apply(this, [window.theme, jQuery]);
3837
3838// Type
3839(function ($) {
3840
3841    'use strict';
3842
3843    if ($.isFunction($.fn['themePlugintypeWriter'])) {
3844
3845        $(function () {
3846            $('[data-plugin-type-writer]:not(.manual), .type-writer:not(.manual)').each(function () {
3847                var $this = $(this),
3848					opts;
3849
3850                var pluginOptions = $this.data('plugin-options');
3851                if (pluginOptions)
3852                    opts = jQuery.parseJSON(pluginOptions.replace(/'/g, '\"'));
3853
3854                $this.themePlugintypeWriter(opts);
3855            });
3856        });
3857
3858    }
3859
3860}).apply(this, [jQuery]);// Circle Slider
3861(function ($) {
3862
3863    'use strict';
3864
3865    if ($.isFunction($.fn.flipshow)) {
3866        var circleContainer = $('#fcSlideshow');
3867
3868        if (circleContainer.get(0)) {
3869            circleContainer.flipshow();
3870
3871            setTimeout(function circleFlip() {
3872                circleContainer.data().flipshow._navigate(circleContainer.find('div.fc-right span:first'), 'right');
3873                setTimeout(circleFlip, 3000);
3874            }, 3000);
3875        }
3876    }
3877
3878}).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.