PageSourceSearch

https://www.betternotbitterwidower.com/wp-content/themes/corpus/js/main.js?ver=2.19.0

js betternotbitterwidower.com collected 2026-10-09 03:45:32 UTC 76,192 bytes, 2,299 lines download raw bytes

1// ================================================================================== //
2
3
4	// # Document on Ready
5	// # Document on Resize
6	// # Document on Scroll
7	// # Document on Load
8
9
10	// # Header Settings
11	// # Feature Parallax
12	// # Parallax Section
13	// # Feature Section
14	// # Resize Feature
15	// # Responsive Menu
16	// # Set Equal Columns Height
17	// # Video Resize
18	// # Set Section Size
19	// # Isotope
20	// # Footer Settings
21	// # Page Basic
22	// # Basic Elements
23
24// ================================================================================== //
25
26var EUTHEM = EUTHEM || {};
27var enableFeatureParallax = false;
28var enableParallax = false;
29var sideAreaBtnAppear = true;
30var parallaxbgOffset = 2;
31
32(function($) {
33
34	'use strict';
35
36	// # Document on Ready
37	// ============================================================================= //
38	EUTHEM.documentReady = {
39		init: function(){
40			EUTHEM.header.showMenuItems();
41			EUTHEM.sectionSettings.init();
42			EUTHEM.responsiveMenu.sideArea();
43			EUTHEM.pageBasic.init();
44			EUTHEM.isotope.init();
45			EUTHEM.isotope.noIsoFilters();
46			EUTHEM.setColumnHeight.init();
47			EUTHEM.basicElements.init();
48			EUTHEM.footerSettings.init();
49			EUTHEM.mainMenu.init();
50			EUTHEM.pageBasic.showSideAreaBtn();
51			if( $('#eut-feature-section').length > 0 ){
52				EUTHEM.featureSection.init();
53			}
54		}
55	};
56
57
58	// # Document on Resize
59	// ============================================================================= //
60		EUTHEM.documentResize = {
61		init: function(){
62
63			EUTHEM.sectionSettings.init();
64			EUTHEM.responsiveMenu.sideAreaWidth( '#eut-main-menu-responsive' );
65			EUTHEM.resizer.init( '.eut-feature-section-inner' );
66			EUTHEM.isotope.elementSize();
67			EUTHEM.basicElements.iconBox();
68			EUTHEM.footerSettings.init();
69			if( $('#eut-header').data('fullscreen') === 'yes' ) {
70				EUTHEM.featureSection.fullScreen( '#eut-feature-section' );
71			}
72
73		}
74	};
75
76
77	// # Document on Scroll
78	// ============================================================================= //
79	EUTHEM.documentScroll = {
80		init: function(){
81			if( $('#eut-feature-section').length > 0 && $('#eut-feature-section').data('effect') == 'parallax' ){
82				EUTHEM.featureParallax.init( '#eut-feature-section' );
83			}
84			EUTHEM.parallaxSection.init();
85			EUTHEM.header.sticky();
86			EUTHEM.featureSection.stopSlider();
87			EUTHEM.pageBasic.anchorSticky();
88			EUTHEM.pageBasic.onePageMenu();
89			EUTHEM.pageBasic.stickySidebarScroll();
90			EUTHEM.pageBasic.showSideAreaBtn();
91		}
92	};
93
94
95	// # Document on Load
96	// ============================================================================= //
97	EUTHEM.documentLoad = {
98		init: function(){
99			EUTHEM.basicElements.iconBox();
100		}
101	};
102
103
104	// # Header Settings
105	// ============================================================================= //
106	EUTHEM.header = {
107		showMenuItems: function(){
108			var $menuItem    = $('#eut-main-menu').find('> ul > li'),
109				$menu        = $('#eut-main-menu'),
110				$btn         = $('.eut-advanced-menu-button');
111
112			$btn.on('click',function(){
113				$(this).addClass('hide');
114				$menu.addClass('show-menu').removeClass('hide-menu');
115				$menuItem.each(function(i){
116					var $that = $(this);
117					if( $that.hasClass('show') ) return;
118					setTimeout(function() {
119						if( $menu.hasClass('hide-menu') ) return;
120						$that.addClass('show');
121					},250 * i );
122				});
123			});
124		},
125		sticky: function(){
126			var $header              = $('#eut-header'),
127				$stickyHeader        = $('#eut-inner-header'),
128				$featureSection      = $('#eut-feature-section'),
129				headerHeight         = $stickyHeader.height(),
130				shrinkSize           = $('#eut-header-wrapper').height(),
131				stickyType           = $header.data('sticky-header'),
132				stickyDevice         = $header.data('device-sticky-header'),
133				scroll               = $(window).scrollTop(),
134				topBarHeight         = $('#eut-top-bar').length > 0 ? $('#eut-top-bar').height() : 0,
135				topOffset            = topBarHeight,
136				offset               = 350;
137
138			if( $header.data('header-position') === 'below-feature' && $featureSection.length > 0 ) {
139				topOffset = topBarHeight + $featureSection.height() - shrinkSize;
140				offset = $featureSection.height() + 350;
141			}
142			if( $(window).width() + scrollBarWidth > tabletPortrait ) {
143
144				if( stickyType === 'advanced' ) {
145					advancedSticky();
146				}
147				if( stickyType === 'simply' ) {
148					simplySticky();
149				}
150				if( stickyType === 'shrink' ) {
151					shrink();
152				}
153			} else if( stickyDevice == 'yes' ) {
154				simplySticky();
155			}
156
157			function advancedSticky() {
158
159				var $menuItem    = $('#eut-main-menu').find('> ul > li'),
160					$menu        = $('#eut-main-menu'),
161					$btn         = $('.eut-advanced-menu-button'),
162					itemLength   = $menuItem.length;
163
164				$menu.addClass('hide-menu');
165
166				if( scroll > topOffset ) {
167					$header.addClass('eut-header-sticky');
168					$stickyHeader.css({ 'position' : 'fixed', 'top' : wpBarHeight });
169					$menu.addClass('show-menu').removeClass('hide-menu');
170					$btn.addClass('hide').removeClass('show');
171					showMenuItems();
172
173				} else {
174					$menu.removeClass('show-menu').addClass('hide-menu');
175					$header.removeClass('eut-header-sticky');
176					$stickyHeader.css({ 'position' : '', 'top' : '' });
177					$menuItem.removeClass('show');
178					$btn.removeClass('hide').addClass('show');
179				}
180
181				function showMenuItems(){
182					$menuItem.each(function(i){
183						var $that = $(this);
184						if( $that.hasClass('show') ) return;
185						setTimeout(function() {
186							if( $menu.hasClass('hide-menu') ) return;
187							$that.addClass('show');
188						},250 * i );
189					});
190				}
191			}
192
193			function simplySticky() {
194
195				if( scroll > topOffset ) {
196					$header.addClass('eut-header-sticky');
197					$stickyHeader.css({ 'position' : 'fixed', 'top' : wpBarHeight });
198				} else {
199					$header.removeClass('eut-header-sticky');
200					$stickyHeader.css({ 'position' : '', 'top' : '' });
201				}
202
203			}
204
205			function shrink() {
206
207				if( scroll > topOffset ) {
208					$header.addClass('eut-header-sticky');
209					$stickyHeader.css({ 'position' : 'fixed', 'top' : wpBarHeight, 'height': shrinkSize/2, 'line-height': shrinkSize/2 + 'px' });
210					$stickyHeader.find('.eut-logo').css({ 'height': shrinkSize/2 });
211					$stickyHeader.find('.eut-menu-options').css({ 'height': shrinkSize/2, 'line-height': shrinkSize/2 + 'px' });
212				} else {
213					$header.removeClass('eut-header-sticky');
214					$stickyHeader.css({ 'position' : '', 'top' : '', 'height': shrinkSize, 'line-height': shrinkSize + 'px' });
215					$stickyHeader.find('.eut-logo').css({ 'height': shrinkSize });
216					$stickyHeader.find('.eut-menu-options').css({ 'height': shrinkSize, 'line-height': shrinkSize + 'px' });
217				}
218
219			}
220		}
221	};
222
223	// # Feature Parallax
224	// ============================================================================= //
225	EUTHEM.featureParallax = {
226		init: function( section ){
227			var scroll          = $(window).scrollTop(),
228				$section        = $( section ),
229				sectionHeight   = $section.height()/2,
230				$parallaxEl     = $section.find('.eut-bg-wrapper'),
231				$content        = $section.find('.eut-feature-content'),
232				$arrowGoTo      = $('#eut-goto-section-wrapper'),
233				elementHeight   = $section.height(),
234				parallaxOffset  = $section.offset().top,
235				tranform        = scroll * 0.2,
236				tranformOpacity = scroll/sectionHeight;
237
238			if( ( $(window).width() + scrollBarWidth < tabletPortrait || isMobile.any() ) && enableFeatureParallax === false ) return;
239
240			if( ( elementHeight + parallaxOffset + 100 ) > scroll ) {
241				if( scroll > parallaxOffset ) {
242					$parallaxEl.find('.eut-bg-image').stop(true,true).transition({ y: tranform },0);
243					$content.css({  opacity: 1 - tranformOpacity });
244					$arrowGoTo.stop(true,true).transition({ opacity: 1 - tranformOpacity *2 },0);
245				} else {
246					$parallaxEl.find('.eut-bg-image').transition({ y: 0 },0);
247					$content.css({  opacity: 1 });
248					$arrowGoTo.transition({ opacity: 1 },0);
249				}
250			}
251
252		}
253	};
254
255	// # Parallax Section
256	// ============================================================================= //
257	EUTHEM.parallaxSection = {
258		init: function(){
259			var windowHeight = $(window).height(),
260				$selector    = $('.eut-section[data-image-type="parallax"]'),
261				scroll       = $(window).scrollTop();
262
263			if( !$selector.length > 0 ) return;
264
265			$selector.each(function(){
266
267				var $that          = $(this),
268					topPosition    = $that.offset().top,
269					sectionHeight  = $that.outerHeight(),
270					bgHeight       = sectionHeight * parallaxbgOffset,
271					scrollPos      = topPosition - scroll,
272					bgMovement     = bgHeight - sectionHeight,
273					scrollMovement = windowHeight + sectionHeight,
274					intPos         = scrollPos + sectionHeight,
275					transformY     = ( ( ( bgMovement ) / ( scrollMovement ) ) * intPos ).toFixed(2),
276					$parallaxBg    = $that.find('.eut-bg-image');
277
278				if( isMobile.any() && enableParallax === false ) {
279					$parallaxBg.css({ 'height' : '100%' });
280				} else {
281					$parallaxBg.css({ 'height' : bgHeight });
282					if( scroll > topPosition - windowHeight && scroll < topPosition + sectionHeight ) {
283						$parallaxBg.stop(true,true).transition({ y: - transformY },0);
284					} else {
285						$parallaxBg.stop(true,true).transition({ y: 0 },0);
286					}
287				}
288
289			});
290
291		}
292	};
293
294	// # Feature Section
295	// ============================================================================= //
296	EUTHEM.featureSection = {
297		init: function(){
298			EUTHEM.featureAnim.initPos( '#eut-feature-title' );
299			EUTHEM.featureSection.featureImageLoad( '#eut-feature-section' );
300			if( $('#eut-header').data('fullscreen') === 'yes' ) {
301				EUTHEM.featureSection.fullScreen( '#eut-feature-section' );
302			} else {
303				EUTHEM.resizer.init( '.eut-feature-section-inner' );
304			}
305		},
306		fullScreen: function( section ){
307			var $featureSection = $( section ),
308				windowHeight    = $(window).height(),
309				headerHeight    = $('#eut-header').data('overlap') == 'no' ? $('#eut-header-wrapper').height() : 0,
310				topBarHeight    = $('#eut-top-bar').length ? $('#eut-top-bar').outerHeight() : 0,
311				sectionItem     = $featureSection.find('.eut-feature-section-inner').data('item'),
312				sectionHeight   = windowHeight - headerHeight - topBarHeight;
313
314			$featureSection.css( 'height', sectionHeight);
315			$featureSection.find('.eut-feature-section-inner').css( 'height', sectionHeight);
316			$featureSection.find('.eut-slider-item').css( 'height', sectionHeight);
317			if( sectionItem === 'map' ) {
318				$featureSection.find('.eut-map').css( 'height', sectionHeight);
319			}
320		},
321		featureImageLoad: function( section ){
322
323			var $featureSection = $( section ),
324				$bgImage        = $featureSection.find('.eut-bg-image'),
325				sectionItem     = $featureSection.find('.eut-feature-section-inner').data('item'),
326				totalBgImage    = $bgImage.length;
327
328			// Video Item
329			if( sectionItem === 'video' ) {
330				EUTHEM.featureAnim.startAnim( '#eut-feature-title' );
331			}
332
333			// Title Item
334			if( sectionItem === 'title' ) {
335				EUTHEM.featureAnim.startAnim( '#eut-feature-title' );
336			}
337
338			var waitImgDone = function() {
339				totalBgImage--;
340				if (!totalBgImage) {
341
342					// Image Item
343					if( sectionItem === 'image' ) {
344						$bgImage.animate({ 'opacity' : 1 },900,function(){
345							EUTHEM.featureAnim.startAnim( '#eut-feature-title' );
346						});
347					}
348
349					// Slider Item
350					if( sectionItem === 'slider' ) {
351						EUTHEM.featureSection.featureSlider();
352					}
353
354				}
355			};
356			$bgImage.each(function () {
357				function imageUrl(input) {
358					return input.replace(/"/g,"").replace(/url\(|\)$/ig, "");
359				}
360				var image = new Image(),
361					$that = $(this);
362				image.src = imageUrl($that.css('background-image'));
363				$(image).load(waitImgDone).error(waitImgDone);
364			});
365		},
366		featureSlider: function(){
367
368			var $slider         = $('#eut-feature-slider'),
369				$bgImage        = $slider.find('.eut-bg-image'),
370				pauseHover      = $slider.attr('data-slider-pause') == 'yes' ? true : '',
371				sliderSpeed     = parseInt( $slider.attr('data-slider-speed') ) ? parseInt( $slider.attr('data-slider-speed') ) : 6000,
372				transition      = $slider.attr('data-slider-transition') != 'slide' ? $slider.attr('data-slider-transition') : false;
373
374			// Init Slider
375			$slider.owlCarousel({
376				navigation      : false,
377				pagination      : false,
378				autoHeight      : false,
379				slideSpeed      : 800,
380				paginationSpeed : 800,
381				afterAction     : EUTHEM.featureSection.sliderAction,
382				singleItem      : true,
383				autoPlay        : true,
384				stopOnHover     : pauseHover,
385				baseClass       : 'owl-carousel',
386				theme           : 'eut-theme',
387				transitionStyle : transition
388			});
389
390			$bgImage.animate({ 'opacity' : 1 },900,function(){
391				$slider.trigger('owl.play',sliderSpeed);
392			});
393
394			// Slider Navigation
395			$slider.parent().find('.eut-carousel-next').click(function(){
396				$slider.trigger('owl.next');
397			});
398			$slider.parent().find('.eut-carousel-prev').click(function(){
399				$slider.trigger('owl.prev');
400			});
401
402		},
403		stopSlider: function(){
404			var $scroll     = $(window).scrollTop(),
405				$slider     = $('#eut-feature-slider'),
406				sliderSpeed = parseInt( $slider.attr('data-slider-speed') ) ? parseInt( $slider.attr('data-slider-speed') ) : 6000;
407
408			if( $scroll > 10 ){
409				$slider.trigger('owl.stop');//Stop Carousel
410			} else {
411				$slider.trigger('owl.play',sliderSpeed);//Play Carousel
412			}
413		},
414		sliderAction: function(){
415			var $currentSlide      = this.$owlItems.eq(this.currentItem),
416				$prevSlide         = this.$owlItems.eq(this.prevItem),
417				$currentSliderItem = $currentSlide.find('.eut-feature-content'),
418				$prevSliderItem    = $prevSlide.find('.eut-feature-content'),
419				sliderColor        = $currentSlide.find('.eut-slider-item ').attr('data-style'),
420				color              = 'eut-' + sliderColor,
421				sliderArrowColor   = $currentSlide.find('.eut-slider-item').attr('data-arrow-color'),
422				sliderArrowAlign   = $currentSlide.find('.eut-slider-item').attr('data-arrow-align'),
423				arrowColor         = 'eut-' + sliderArrowColor,
424				arrowAlign         = 'eut-align-' + sliderArrowAlign;
425
426			// Slider Animation
427			EUTHEM.featureAnim.initPos( $currentSliderItem );
428			EUTHEM.featureAnim.startAnim( $currentSliderItem );
429
430			// Set Header Color
431			$('#eut-header').removeClass('eut-default eut-light eut-dark').addClass(color);
432
433			// Set Navigation Color
434			$('#eut-feature-section .eut-carousel-navigation').removeClass('eut-default eut-light eut-dark').addClass(color);
435
436			//Set Bottom Arrow
437			$('#eut-goto-section-wrapper').removeClass().addClass(arrowAlign);
438			$('.eut-goto-section').removeClass().addClass('eut-goto-section eut-icon-nav-
438down').addClass(arrowColor);
439		},
440		resizeVideo: function( selector ){
441			var $parent         = selector,
442				$video          = $parent.find('video'),
443				videoWidth      = $video.width(),
444				videoHeight     = $video.height(),
445				containerWidth  = $parent.outerWidth(),
446				containerHeight = $parent.outerHeight(),
447				newSize         = EUTHEM.featureSection.videoSettings( containerWidth, containerHeight, videoWidth, videoHeight );
448
449			$video.width(newSize.newWidth).height(newSize.newHeight);
450			// Remove Spinner
451			EUTHEM.featureSection.removeSpinner( $('#eut-feature-section') );
452		},
453		videoSettings: function( containerWidth, containerHeight, videoWidth, videoHeight ){
454			var initW = videoWidth,
455				initH = videoHeight,
456				ratio = initH / initW;
457			videoWidth   = containerWidth;
458			videoHeight  = containerWidth * ratio;
459			if(videoHeight < containerHeight){
460				videoHeight  = containerHeight;
461				videoWidth   = videoHeight / ratio;
462			}
463			return {
464				newWidth  : parseInt(videoWidth),
465				newHeight : parseInt(videoHeight)
466			};
467		}
468	};
469
470	// # Resize Feature
471	// ============================================================================= //
472	EUTHEM.resizer = {
473		init: function( section ){
474
475			var $selector  = $( section ),
476				initWidth  = tabletLandscape,
477				initHeight = $selector.data('height'),
478				minHeight  = 320,
479				newSize    = this.calSize( initWidth, initHeight );
480			if( $selector.data('item') === 'revslider' ) {
481				return;
482			}
483			if( $(window).width() + scrollBarWidth >= initWidth ) {
484				$selector.css({ 'height': initHeight, 'min-height': minHeight });
485				$selector.parent().css({ 'height': initHeight, 'min-height': minHeight });
486				$('#eut-feature-slider').find('.eut-slider-item ').css({ 'height': initHeight, 'min-height': minHeight });
487			} else {
488				$selector.css({ 'height': newSize.newHeight, 'min-height': minHeight });
489				$selector.parent().css({ 'height': newSize.newHeight, 'min-height': minHeight });
490				$('#eut-feature-slider').find('.eut-slider-item ').css({ 'height': newSize.newHeight, 'min-height': minHeight });
491			}
492		},
493		calSize: function( initWidth, initHeight ){
494			var ratio     = initHeight / initWidth,
495				height    = $(window).width() * ratio;
496
497			return {
498				newHeight : parseInt(height)
499			};
500		}
501	};
502
503	// # Feature Content Animations
504	// ============================================================================= //
505	EUTHEM.featureAnim = {
506		settings: function( section ){
507			var animDelay    = 300,
508				contentItems = {
509					title       : $(section).find(' .eut-title '),
510					description : $(section).find(' .eut-description '),
511					button1     : $(section).find(' .eut-btn:first-child '),
512					button2     : $(section).find(' .eut-btn:last-child ')
513				};
514
515			return { items: contentItems, delay: animDelay };
516		},
517		initPos: function( section ){
518
519			var $section = $( section ),
520				settings = EUTHEM.featureAnim.settings( section ),
521				items    = settings.items;
522
523			$.each( items, function( key, item ) {
524				if( $section.hasClass('eut-fade-in-up') ) {
525					$(item).stop(true,true).transition({ y: 200, opacity: 0 },0);
526				} else if( $section.hasClass('eut-fade-in-down') ) {
527					$(item).stop(true,true).transition({ y: -200, opacity: 0 },0);
528				} else if( $section.hasClass('eut-fade-in-left') ) {
529					$(item).stop(true,true).transition({ x: -200, opacity: 0 },0);
530				} else if( $section.hasClass('eut-fade-in-right') ) {
531					$(item).stop(true,true).transition({ x: 200, opacity: 0 },0);
532				} else {
533					$(item).stop(true,true).transition({ x: 0, opacity: 0 },0);
534				}
535			});
536
537		},
538		startAnim: function( section ){
539
540			var $section = $( section ),
541				settings = EUTHEM.featureAnim.settings( section ),
542				items    = settings.items,
543				delay    = settings.delay,
544				cnt      = 1;
545
546			$.each( items, function( key, item ) {
547				cnt++;
548				if( $section.hasClass('eut-fade-in-up') || $section.hasClass('eut-fade-in-down') ) {
549					$(item).transition({ y: 0, opacity: 1, delay: cnt * delay },1200,'cubic-bezier(0,0.9,0.3,1)', {queue: false});
550				} else if( $section.hasClass('eut-fade-in-left') || $section.hasClass('eut-fade-in-right') ) {
551					$(item).transition({ x: 0, opacity: 1, delay: cnt * delay },1200,'cubic-bezier(0,0.9,0.3,1)', {queue: false});
552				} else {
553					$(item).transition({ x: 0, opacity: 1, delay: cnt * delay },1200,'cubic-bezier(0,0.9,0.3,1)', {queue: false});
554				}
555			});
556
557		}
558	};
559
560	// # Responsive Menu
561	// ============================================================================= //
562	EUTHEM.responsiveMenu = {
563		sideArea: function(){
564			var $sideArea     = $('.eut-side-area'),
565				$sideBtn      = $('.eut-toggle-sidearea'),
566				$menuBtn      = $('.eut-toggle-responsive-menu'),
567				$closeBtn     = $sideArea.find('.eut-close-menu-button'),
568				$bodyOverlay  = $('<div id="eut-sidearea-overlay" class="eut-body-overlay"></div>'),
569				$themeWrapper = $('#eut-theme-wrapper'),
570				areaWidth     = 0;
571			if( !$sideArea.length > 0 ) {
572				return;
573			}
574
575			this.menuWidget( '#eut-main-menu-responsive .eut-menu');
576
577			// Append Overlay on body
578			$bodyOverlay.appendTo('#eut-theme-wrapper');
579
580			$menuBtn.on('click',function(e){
581				var area = '#eut-main-menu-responsive';
582				// Calculate Width
583				areaWidth = EUTHEM.responsiveMenu.sideAreaWidth( area );
584
585				// Set Area side Height
586				EUTHEM.responsiveMenu.sideAreaHeight( area );
587
588				e.preventDefault();
589				if( $(area).hasClass('open') ) {
590					closeSideArea( area );
591					$(area).removeClass('open');
592				} else {
593					openSideArea( area );
594					$(area).addClass('open');
595				}
596			});
597
598			$sideBtn.on('click',function(e){
599				var area = '#eut-side-area';
600				// Calculate Width
601				areaWidth = EUTHEM.responsiveMenu.sideAreaWidth( area );
602
603				// Set Area side Height
604				EUTHEM.responsiveMenu.sideAreaHeight( area );
605
606				e.preventDefault();
607				if( $(area).hasClass('open') ) {
608					closeSideArea( area );
609					$(area).removeClass('open');
610				} else {
611					openSideArea( area );
612					$(area).addClass('open');
613				}
614			});
615
616			$closeBtn.on('click',function(e){
617				e.preventDefault();
618				closeSideArea();
619				$sideArea.removeClass('open');
620			});
621
622			$bodyOverlay.on('click',function(){
623				closeSideArea();
624				$sideArea.removeClass('open');
625			});
626
627			// For One Page
628			var $link = $sideArea.find('a[href*="#"]:not( [href="#"] )');
629			$link.on('click',function(){
630				var target = $(this.hash);
631				if ( target.length && ( target.hasClass('eut-section') || target.hasClass('eut-bookmark') ) ) {
632					closeSideArea();
633				}
634			});
635
636			// Open Side Area
637			function openSideArea( area ) {
638				$bodyOverlay.fadeIn();
639				$(area).stop(true, false).transition({ x: - areaWidth },900,'cubic-bezier(0,0.9,0.3,1)',function(){
640					$closeBtn.stop(true, false).transition({ y: 200, delay: 200 },900,'cubic-bezier(0,0.9,0.3,1)');
641				});
642			}
643			// Close Side Area
644			function closeSideArea() {
645				$themeWrapper.css({ 'height' : 'auto' });
646				$sideArea.stop(true, false).transition({ x: 0 },900,'cubic-bezier(0,0.9,0.3,1)',function(){
647					$closeBtn.stop(true, false).transition({ y: 0 },900,'cubic-bezier(0,0.9,0.3,1)');
648					$bodyOverlay.fadeOut();
649					$sideArea.css('position','').find('.eut-scroller').scrollTop( 0 );
650				});
651			}
652
653		},
654		sideAreaWidth: function( area ){
655			var windowWidth  = $(window).width(),
656				areaWidth    = windowWidth / 4,
657				minWidth     = 500;
658			if( $(window).width() + scrollBarWidth <= mobileScreen ) {
659				areaWidth = windowWidth;
660			} else if( areaWidth < minWidth ) {
661				areaWidth = minWidth;
662			}
663
664			$(area).css({ 'width' : areaWidth });
665			return areaWidth;
666		},
667		sideAreaHeight: function( area ){
668			if( $(area).length > 0 ) {
669				var windowHeight   = $(window).height(),
670					sideAreaHeight = $(area).find('.eut-area-content').outerHeight() + 200,
671					$themeWrapper  = $('#eut-theme-wrapper'),
672					$scroller      = $(area).find('.eut-scroller'),
673					sideHeight     = 0;
674
675				if( sideAreaHeight > windowHeight ){
676					sideHeight = sideAreaHeight;
677				} else {
678					sideHeight = windowHeight;
679				}
680
681				if( $(window).width() + scrollBarWidth <= mobileScreen ) {
682					$scroller.css({ 'height' : 'auto' });
683					$(area).css({ 'position' : 'absolute','height' : sideHeight });
684					$themeWrapper.css({ 'height' : sideHeight, 'overflow' : 'hidden' });
685				} else {
686					$scroller.css({ 'height' : windowHeight - 150 });
687					$scroller.niceScroll({autohidemode:"hidden"});
688					$themeWrapper.css({ 'height' : 'auto', 'overflow' : 'visible' });
689				}
690			}
691		},
692		menuWidget: function( element ){
693
694			var $menu     = $( element ),
695				$menuItem = $menu.find('li.menu-item-has-children'),
696				$arrow    = $('<i class="eut-arrow"></i>');
697
698			// Add Arrows
699			$arrow.appendTo( $menuItem );
700
701			$menuItem.find('.eut-arrow').on('tap click', function(){
702				var $that    = $(this),
703					$subMenu = $that.parent().toggleClass('open').find(' > ul');
704				if( $subMenu.is(':visible') ) {
705					$subMenu.slideUp(200,function(){
706						if( $menu.parent().is('.eut-scroller') ) {
707							$menu.parent().getNiceScroll().resize();
708							// Set Area side Height
709							EUTHEM.responsiveMenu.sideAreaHeight( '#eut-main-menu-responsive' );
710						}
711					});
712				} else {
713					$subMenu.slideDown(200,function(){
714						if( $menu.parent().is('.eut-scroller') ) {
715							$menu.parent().getNiceScroll().resize();
716							// Set Area side Height
717							EUTHEM.responsiveMenu.sideAreaHeight( '#eut-main-menu-responsive' );
718						}
719					});
720				}
721			});
722
723		}
724	};
725
726	// # Set Equal Columns Height
727	// ============================================================================= //
728	EUTHEM.setColumnHeight = {
729		init : function(){
730			var section = $('.eut-section.eut-custom-height');
731
732			section.each(function(){
733				var $section = $( this );
734				$section.imagesLoaded('always',function(){
735					var columns = $section.hasClass('eut-column-has-gap') ? $section.find('.eut-column-wrapper') : $section.find('.eut-column'),
736						middle = $section.hasClass('eut-middle-content') ? true : false,
737						resizeTimeout;
738
739					if (EUTHEM.setColumnHeight.limit( $section ) ) {
740						EUTHEM.setColumnHeight.updateParams( columns, middle, EUTHEM.setColumnHeight.onEnd );
741					} else {
742						EUTHEM.setColumnHeight.resetCol( columns );
743						EUTHEM.setColumnHeight.onEnd( columns );
744					}
745
746					$(window).on('resize', function(){
747						window.clearTimeout(resizeTimeout);
748						resizeTimeout = window.setTimeout(function () {
749							EUTHEM.setColumnHeight.resetCol( columns );
750							if (EUTHEM.setColumnHeight.limit( $section ) ) {
751								EUTHEM.setColumnHeight.updateParams( columns, middle, EUTHEM.setColumnHeight.onEnd );
752							}
753						}, 200);
754					});
755				});
756			});
757		},
758		updateParams : function( columns, middle, callback ){
759			var columnMaxH = 0;
760			columns.each(function(){
761				( $(this).outerHeight(true) > columnMaxH ) ? columnMaxH = $(this).outerHeight(true) : columnMaxH = columnMaxH;
762			});
763
764			for (var i = 0; i < columns.length; i++) {
765				var $col = $(columns[i]);
766
767				if( middle ) {
768					EUTHEM.setColumnHeight.middleCol( $col, columnMaxH );
769				} else {
770					EUTHEM.setColumnHeight.equalCol( columns, columnMaxH );
771				}
772
773				if( i === columns.length - 1 && callback && typeof callback === 'function' ) {
774					callback(columns);
775				}
776
777			}
778		},
779		getHeight : function( el ){
780			var elHeight = el.outerHeight();
781			return elHeight;
782		},
783		getMaxHeight : function( el ){
784			var maxHeight = el.parents('.eut-section').height();
785			return maxHeight;
786		},
787		equalCol : function( el, height ){
788			el.css({
789				'height' : height
790			});
791		},
792		middleCol : function( el, height ){
793
794			el.addClass('eut-reset-padding');
795			if( !el.find('.eut-middle-wrapper').length ) {
796				el.wrapInner( '<div class="eut-middle-wrapper"></div>' );
797			}
798			var $content = el.find('.eut-middle-wrapper'),
799				contentH = $content.outerHeight(true),
800				space = (height - contentH)/2;
801			$content.css({
802				'padding-top' : space,
803				'padding-bottom' : space
804			});
805		},
806		resetCol : function(el) {
807			el.css({
808				'height' : ''
809			});
810			el.removeClass('eut-reset-padding');
811			el.find('.eut-middle-wrapper').css({
812				'padding-top' : '',
813				'padding-bottom' : ''
814			});
815		},
816		limit : function( section ){
817			var screenSize = section.data('tablet-portrait-equal-columns') != undefined ? mobileScreen : tabletPortrait,
818				windowWidth = $(window).width() + scrollBarWidth,
819				limit = true;
820			if( ( windowWidth <= tabletLandscape && section.find('.eut-tablet-column-1').length ) || windowWidth <= screenSize ) {
821				limit = false;
822			}
823			return limit;
824		},
825		onEnd : function( el ){
826			el.css({
827				'visibility' : 'visible'
828			});
829		}
830	};
831
832	// # Video Resize
833	// ============================================================================= //
834	EUTHEM.videoResize = {
835		init: function( $selector ){
836			setTimeout(function(){
837				EUTHEM.videoResize.videoSettings( $selector );
838			},100);
839
840			$(window).resize(function(){
841				setTimeout(function(){
842					EUTHEM.videoResize.videoSettings( $selector );
843				},1000);
844			});
845		},
846		videoSettings: function( $selector ){
847			var $video          = $selector.find('video'),
848				containerWidth  = $selector.parent().outerWidth(),
849				containerHeight = $selector.parent().outerHeight(),
850				ratio           = 16 / 9,
851				videoHeight     = containerHeight,
852				videoWidth      = videoHeight * ratio;
853
854				if( videoWidth < containerWidth ) {
855					videoWidth   = containerWidth,
856					videoHeight  = containerWidth * ratio;
857				}
858
859			$video.width( videoWidth ).height( videoHeight );
860		}
861	};
862
863	// # Set Section Size
864	// ============================================================================= //
865	EUTHEM.sectionSettings = {
866		init: function(){
867
868			var section       = '#eut-main-content .eut-section',
869				parentSection = '#eut-content-area, #eut-post-area, #eut-portfolio-area',
870				windowWidth      = $(window).width(),
871				windowHeight     = $(window).height(),
872				themeWidth       = $('#eut-theme-wrapper').width(),
873				contentWidth     = $(parentSection).width(),
874				sidebarWidth     = $('#eut-sidebar').length && ( windowWidth + scrollBarWidth > tabletPortrait ) ? $('#eut-sidebar').outerWidth() : 0,
875				headerHeight     = $('#eut-header').attr('data-sticky-header') != 'none' ? $('#eut-inner-header').outerHeight() : 0,
876				fieldBarHeight   = $('.eut-fields-bar').length ? $('.eut-fields-bar').outerHeight() : 0,
877				conteinerWidth   = contentWidth + sidebarWidth,
878				space            = (themeWidth - conteinerWidth)/2,
879				sidebarSpace     = themeWidth - contentWidth;
880
881			$(section).each(function(){
882				var $section      = $(this),
883					heightMode    = $section.attr('data-full-height'),
884					sectionType   = $section.attr('data-section-type'),
885					bgImageType   = $section.attr('data-image-type');
886
887				if( $section.parent().parent().is('.eut-blog-item') ) {
888					$section.css({ 'visibility': 'visible' });
889					return;
890				}
891				if( sectionType == 'fullwidth-background' ){
892					fullBg($section);
893				}
894				if( sectionType == 'fullwidth-element' ){
895					fullElement($section);
896				}
897				if( bgImageType == 'animated' ){
898					animatedBg($section);
899				}
900				if( heightMode == 'yes' ) {
901					fullHeight($section);
902				}
903
904			});
905
906			function fullBg( section ) {
907				if( $('.eut-right-sidebar').length && ( windowWidth + scrollBarWidth >= tabletPortrait ) ) {
908					section.css({ 'visibility': 'visible', 'padding-left':space, 'padding-right': sidebarSpace, 'margin-left': -space, 'margin-right': -sidebarSpace});
909				}
910				else if( $('.eut-left-sidebar').length && ( windowWidth + scrollBarWidth >= tabletPortrait ) ) {
911					section.css({ 'visibility': 'visible', 'padding-left':sidebarSpace, 'padding-right': space, 'margin-left': -sidebarSpace, 'margin-right': -space});
912				} else {
913					section.css({ 'visibility': 'visible', 'padding-left':space, 'padding-right': space, 'margin-left': -space, 'margin-right': -space});
914				}
915			}
916
917			function fullElement( section ) {
918				if( $('.eut-right-sidebar').length && ( windowWidth + scrollBarWidth >= tabletPortrait ) ) {
919					section.css({ 'visibility': 'visible', 'padding-left':0, 'padding-right': sidebarSpace, 'margin-left': -space, 'margin-right': -sidebarSpace});
920				}
921				else if( $('.eut-left-sidebar').length && ( windowWidth + scrollBarWidth >= tabletPortrait ) ) {
922					section.css({ 'visibility': 'visible', 'padding-left':sidebarSpace, 'padding-right': 0, 'margin-left': -sidebarSpace, 'margin-right': -space});
923				} else {
924					section.css({ 'visibility': 'visible', 'padding-left':0, 'padding-right': 0, 'margin-left': -space, 'margin-right': -space});
925				}
926			}
927
928			function fullHeight( section ) {
929				var sectionHeight = $( section ).find('.eut-row').outerHeight(),
930					space = ( windowHeight - headerHeight - fieldBarHeight - sectionHeight )/2;
931				section.css({ 'visibility': 'visible',  'padding-top' : 0, 'padding-bottom' : 0});
932				if(sectionHeight > (windowHeight - headerHeight)){
933					section.css({ 'visibility': 'visible', 'padding-top':40, 'padding-bottom': 40});
934				} else {
935					section.css({ 'visibility': 'visible', 'padding-top':space, 'padding-bottom': space});
936				}
937			}
938
939			function animatedBg( section ) {
940				section.mouseenter(function() {
941					section.addClass('zoom');
942				});
943				section.mouseleave(function() {
944					section.removeClass('zoom');
945				});
946			}
947		}
948	};
949
950
951	// # Isotope
952	// ============================================================================= //
953	EUTHEM.isotope = {
954
955		init: function() {
956			var $selector = $('.eut-isotope');
957			$selector.each(function(){
958				var $that        = $(this),
959					$container   = $that.find('.eut-isotope-container'),
960					$isotopItem  = $container.find('.eut-isotope-item'),
961					$curCategory = $that.find('.eut-current-category'),
962					layout       = $that.data('layout') !== '' ? $that.data('layout') : 'fitRows',
963					dataSpinner  = $that.data('spinner');
964
965				if( dataSpinner == 'yes' ) {
966					EUTHEM.isotope.spinner( $that );
967				}
968				EUTHEM.isotope.isotopeInit( $container, layout, dataSpinner );
969
970				$that.find('.eut-filter li').click(function(){
971					var $filter  = $(this),
972						selector = $filter.attr('data-filter'),
973						title    = $filter.html();
974
975					if( $curCategory.length > 0 ){
976						$curCategory.find('span').html( title );
977					}
978
979					$container.isotope({
980						filter: selector
981					});
982					$(this).addClass('selected').siblings().removeClass('selected');
983				});
984			});
985		},
986		isotopeInit: function( $container, layout, dataSpinner ){
987			$container.imagesLoaded( function() {
988				EUTHEM.isotope.elementSize();
989				$container.isotope({
990					resizable: true,
991					itemSelector: '.eut-isotope-item',
992					layoutMode: layout
993				});
994				if( dataSpinner == 'yes' ) {
995					setTimeout(function() {
996						EUTHEM.isotope.removeSpinner( $container );
997					},2000);
998				} else {
999					$container.animate({'opacity': 1},600);
1000				}
1001
1002				EUTHEM.isotope.relayout( $container );
1003
1004			});
1005		},
1006		spinner: function( $element ){
1007			var $spinner = $('<div class="eut-loader"></div>');
1008			$spinner.appendTo( $element );
1009		},
1010		removeSpinner: function( $container ){
1011			$container.parent().find('.eut-loader').fadeOut(600,function(){
1012				$container.animate({'opacity': 1},600);
1013			});
1014		},
1015		elementSize : function(){
1016			var $selector = $('.eut-isotope');
1017
1018			$selector.each(function(){
1019				var $that = $(this),
1020					$container = $that.find('.eut-isotope-container'),
1021					$element   = $that.find('.eut-isotope-item'),
1022					$slider    = $that.find('.eut-slider'),
1023					columns    = EUTHEM.isotope.defineColumns( $that ),
1024					gap        = 0;
1025
1026				if( $that.parents('.eut-section').data('section-type') == 'fullwidth-element' && $that.hasClass('eut-with-gap') ) {
1027					gap = - 40;
1028				} else if( $that.parents('.eut-section').data('section-type') != 'fullwidth-element' && $that.hasClass('eut-with-gap') ) {
1029					gap = 40;
1030				}
1031
1032				var elementW = Math.floor(( $that.outerWidth() + gap - 0.5 )) / columns;
1033
1034				$element.css({ 'width': elementW });
1035
1036				// Item Width * 2
1037				if( columns != 1 ) {
1038					$that.find('.eut-image-large-square').css({ 'width': elementW * 2 });
1039					$that.find('.eut-image-landscape').css({ 'width': elementW * 2 }).find('.eut-media').css({ 'height': elementW - Math.abs(gap) });
1040					$that.find('.eut-image-portrait').css({ 'width': elementW }).find('.eut-media').css({ 'height': ( elementW * 2 ) - Math.abs(gap) });
1041				}
1042
1043				// Item Column 2
1044				if( columns == 2 ) {
1045					$that.find('.eut-image-large-square').css({ 'width': elementW * 2 });
1046					$that.find('.eut-image-landscape').css({ 'width': elementW  }).find('.eut-media').css({ 'height': ( elementW / 2 ) - Math.abs(gap) });
1047					$that.find('.eut-image-portrait').css({ 'width': elementW }).find('.eut-media').css({ 'height': ( elementW * 2 ) - Math.abs(gap) });
1048				}
1049
1050				// Item Column 1
1051				if( columns == 1 ) {
1052					$that.find('.eut-image-large-square').css({ 'width': elementW });
1053					$that.find('.eut-image-landscape').css({ 'width': elementW  }).find('.eut-media').css({ 'height': ( elementW / 2 ) - Math.abs(gap) });
1054					$that.find('.eut-image-portrait').css({ 'width': elementW }).find('.eut-media').css({ 'height': elementW - Math.abs(gap) });
1055				}
1056
1057				// Init Slider Again
1058				$slider.each(function(){
1059					var $that     = $(this),
1060						owlSlider = $that.data('owlCarousel');
1061					owlSlider.reinit();
1062				});
1063
1064				setTimeout( function(){
1065					EUTHEM.isotope.relayout( $container );
1066
1067					// Fix Columns Height
1068					if( $container.parents('.eut-section').hasClass('eut-flex-row') ){
1069						EUTHEM.setColumnHeight.init();
1070					}
1071
1072				}, 1000 );
1073			});
1074
1075		},
1076		defineColumns : function( element ){
1077			var windowWidth = $(window).width() + scrollBarWidth,
1078				$element    = element,
1079				columns     = {
1080					desktop  : $element.data('columns'),
1081					tabletL   : $element.data('columns-tablet-landscape'),
1082					tabletP   : $element.data('columns-tablet-portrait'),
1083					mobille  : $element.data('columns-mobile')
1084				};
1085
1086			if ( windowWidth > tabletLandscape ) {
1087				columns = columns.desktop;
1088			} else if ( windowWidth > tabletPortrait && windowWidth < tabletLandscape ) {
1089				columns = columns.tabletL;
1090			} else if ( windowWidth > mobileScreen && windowWidth < tabletPortrait ) {
1091				columns = columns.tabletP;
1092			} else {
1093				columns = columns.mobille;
1094			}
1095			return columns;
1096		},
1097		relayout: function( $container ){
1098			$container.isotope('layout');
1099		},
1100		noIsoFilters: function() {
1101			var $selector = $('.eut-non-isotope');
1102			$selector.each(function(){
1103				var $that = $(this);
1104				$that.find('.eut-filter li').click(function(){
1105					var selector = $(this).attr('data-filter');
1106					if ( '*' == selector ) {
1107						$that.find('.eut-non-isotope-item').fadeIn('1000');
1108					} else {
1109						$that.find('.eut-non-isotope-item').hide();
1110						$that.find(selector).fadeIn('1000');
1111					}
1112					$(this).addClass('selected').siblings().removeClass('selected');
1113				});
1114			});
1115		}
1116	};
1117
1118	// # Footer Settings
1119	// ============================================================================= //
1120	EUTHEM.footerSettings = {
1121		init: function(){
1122			this.footerSize( '#eut-footer .eut-section' );
1123			this.fixedFooter();
1124		},
1125		footerSize: function(section) {
1126			$( section ).each(function(){
1127				var $that = $(this),
1128					sectionType = $that.attr('data-section-type');
1129				if( sectionType == 'fullwidth-background' ){
1130					footerFullBg($that);
1131				}
1132				if( sectionType == 'fullwidth-element' ){
1133					footerFullElement($that);
1134				}
1135			});
1136
1137			function footerFullBg(element){
1138				var themeWidth     = $('#eut-theme-wrapper').width(),
1139					contentWidth   = element.parent().width(),
1140					space          = (themeWidth - contentWidth)/2;
1141				element.css({ 'visibility': 'visible', 'padding-left':space, 'padding-right': space, 'margin-left': -space, 'margin-right': -space});
1142			}
1143
1144			function footerFullElement(element){
1145				var themeWidth    = $('#eut-theme-wrapper').width(),
1146					contentWidth  = element.parent().width(),
1147					space         = (themeWidth - contentWidth)/2;
1148				element.css({ 'visibility': 'visible', 'padding-left':0, 'padding-right': 0, 'margin-left': -space, 'margin-right': -space});
1149			}
1150
1151		},
1152		fixedFooter: function(){
1153			var $footer      = $('#eut-footer'),
1154				sticky       = $footer.data('sticky-footer'),
1155				windowHeight = $(window).height(),
1156				footerHeight = $footer.outerHeight();
1157
1158			if( sticky != 'yes' || isMobile.any() ) return;
1159
1160			if( footerHeight > windowHeight ) {
1161				$('#eut-footer').removeClass('eut-sticky-footer').prev().css('margin-bottom',0);
1162			} else {
1163				$('#eut-footer').addClass('eut-sticky-footer').prev().css('margin-bottom',footerHeight);
1164			}
1165		}
1166	};
1167
1168	// # Page Basic
1169	// ============================================================================= //
1170	EUTHEM.pageBasic = {
1171		init: function(){
1172
1173			this.bodyLoader();
1174			this.gotoFirstSection();
1175			this.removeVideoBg();
1176			this.bgLoader();
1177			this.imageLoader();
1178			this.fitVid();
1179			this.anchorBar();
1180			this.searchModal();
1181			this.onePageSettings();
1182			this.hovers();
1183			this.stickySidebar();
1184			this.backtoTop();
1185			this.lightBox();
1186			this.socialShareLinks();
1187
1188		},
1189		bodyLoader: function(){
1190			var $body     = $('body'),
1191				$overflow = $('#eut-loader-overflow'),
1192				$loader   = $('#eut-loader');
1193
1194			$body.imagesLoaded(function(){
1195				$loader.fadeOut();
1196				$overflow.delay(200).fadeOut(700,function(){
1197					EUTHEM.basicElements.animAppear();
1198				});
1199			});
1200		},
1201		gotoFirstSection: function(){
1202			var $selector       = $('#eut-feature-section .eut-goto-section'),
1203				$nextSection    = $('#eut-main-content .eut-section').first().length ? $('#eut-main-content .eut-section').first() : $('#eut-main-content'),
1204				headerHeight    = 0,
1205				fieldBarHeight  = $('.eut-fields-bar').length ? $('.eut-fields-bar').outerHeight() : 0;
1206
1207			if( $('#eut-header').data('sticky-header') == 'simply' || $('#eut-header').data('sticky-header') == 'advanced' ) {
1208				headerHeight = $('#eut-header-wrapper').height() -1;
1209			} else if( $('#eut-header').data('sticky-header') == 'shrink' ){
1210				headerHeight = $('#eut-header-wrapper').height() / 2;
1211			} else {
1212				headerHeight = 0;
1213			}
1214
1215			if( $nextSection.length ) {
1216				$selector.on('click',function(){
1217					$('html,body').animate({
1218						scrollTop: $nextSection.offset().top - headerHeight - fieldBarHeight
1219					}, 1000);
1220					return false;
1221				});
1222			}
1223		},
1224		bgLoader: function() {
1225			$('#eut-main-content .eut-bg-image, #eut-footer .eut-bg-image').each(function () {
1226				function imageUrl(input) {
1227					return input.replace(/"/g,"").replace(/url\(|\)$/ig, "");
1228				}
1229				var image = new Image(),
1230					$that = $(this);
1231				image.src = imageUrl($that.css('background-image'));
1232				image.onload = function () {
1233					$that.addClass('show');
1234				};
1235			});
1236		},
1237		imageLoader: function(){
1238			var selectors  = {
1239				singleImage  : '.eut-image',
1240				media        : '.eut-media'
1241			};
1242			$.each(selectors, function(key, value){
1243				if( $(this).length ){
1244					var item     = $(this),
1245						imgLoad  = imagesLoaded( item );
1246					imgLoad.on( 'always', function() {
1247						if( $(value).parent().is('#eut-single-media') ){
1248							$(value).find('img').animate({ 'opacity': 1 },1000);
1249						} else {
1250							$(value).find('img').css('opacity', 1);
1251						}
1252					});
1253				}
1254			});
1255		},
1256		removeVideoBg: function(){
1257			var videoBg = $('.eut-bg-video');
1258			if( isMobile.any() ) {
1259				videoBg.parent().find('.eut-bg-image').css('opacity',1);
1260				videoBg.remove();
1261			} else {
1262				$('.eut-bg-wrapper').each(function () {
1263					var bgImage = $(this).find('.eut-bg-image');
1264					var bgVideo = $(this).find('.eut-bg-video');
1265					if ( bgVideo.length ) {
1266						var videoElement = $(this).find('.eut-bg-video video');
1267						var canPlayVideo = false;
1268						$(this).find('.eut-bg-video source').each(function(){
1269							if ( videoElement.get(0).canPlayType( $(this).attr('type') ) ) {
1270								canPlayVideo = true;
1271							}
1272						});
1273						if(canPlayVideo) {
1274							bgImage.remove();
1275							// Resize Video
1276							EUTHEM.videoResize.init( $(this) );
1277						} else {
1278							bgVideo.remove();
1279							bgImage.css('opacity',1);
1280						}
1281					}
1282				});
1283			}
1284		},
1285		fitVid: function(){
1286			$('.eut-video, .eut-media').fitVids();
1287			$('iframe[src*="youtube"]').parent().fitVids();
1288			$('iframe[src*="vimeo"]').parent().fitVids();
1289		},
1290		anchorBar: function(){
1291			var $anchor = $('#eut-anchor-menu');
1292			if( !$anchor.length > 0 ) return;
1293
1294			var $btn  = $anchor.find('.eut-menu-button'),
1295				$menu = $anchor.find(' > ul');
1296			$btn.on('click',function(){
1297				$menu.slideToggle(300);
1298			});
1299		},
1300		anchorSticky: function(){
1301			var $anchor        = $('#eut-anchor-menu');
1302			if( !$anchor.length > 0 ) return;
1303
1304			var $anchorWrapper = $('#eut-anchor-menu-wrapper'),
1305				headerHeight   = $('#eut-header').data('sticky-header') != 'none' ? $('#eut-inner-header').height() : 0,
1306				anchorTop      = $anchorWrapper.offset().top,
1307				offset         = anchorTop - headerHeight,
1308				scroll         = $(window).scrollTop();
1309			if( !$anchor.length > 0 ) return;
1310
1311			if ( scroll >= offset ) {
1312				$anchor.addClass('eut-sticky').css({ 'top' : headerHeight });
1313			} else {
1314				$anchor.removeClass('eut-sticky').css({ 'top' : '' });
1315			}
1316		},
1317		searchModal: function(){
1318			var $btn           = $('.eut-toggle-search-modal'),
1319				$bodyOverlay   = $('<div id="eut-search-overlay" class="eut-body-overlay"></div>'),
1320				$searchContent = $('#eut-search-modal');
1321
1322			// Append Overlay on body
1323			$bodyOverlay.appendTo('#eut-theme-wrapper');
1324
1325			$btn.on('click',function(e){
1326				e.preventDefault();
1327				openSearchModal();
1328			});
1329
1330			$('.eut-search-placeholder').on('click',function(){
1331				$searchContent.find('.eut-search-placeholder').addClass('hide');
1332				$searchContent.find('.eut-search-textfield').show().focus();
1333			});
1334
1335			$('.eut-close-search').on('click',function(){
1336				closeSearchModal();
1337			});
1338
1339			// Open Search Modal
1340			function openSearchModal() {
1341				$bodyOverlay.fadeIn(function(){
1342					$searchContent.fadeIn();
1343				});
1344			}
1345
1346			// Close Search Modal
1347			function closeSearchModal() {
1348				$searchContent.fadeOut(function(){
1349					$bodyOverlay.fadeOut();
1350					$searchContent.find('.eut-search-placeholder').removeClass('hide');
1351					$searchContent.find('.eut-search-textfield').hide();
1352				});
1353			}
1354		},
1355		shrinkHeaderHeight : function(){
1356			var headerHeight = 0,
1357				stickyType   = $('#eut-header').data('sticky-header'),
1358				deviceSticky = $('#eut-header').data('device-sticky-header');
1359
1360			if( stickyType != 'none' && $(window).width() + scrollBarWidth > tabletPortrait && $('#eut-header').length > 0 ){
1361				if( stickyType == 'simply' || stickyType == 'advanced' ) {
1362					headerHeight = $('#eut-inner-header').outerHeight();
1363				}
1364				if( stickyType == 'shrink' ) {
1365					headerHeight = $('#eut-header-wrapper').outerHeight() / 2;
1366				}
1367			}
1367 else if( deviceSticky == 'yes' && $(window).width() + scrollBarWidth < tabletPortrait && $('#eut-header').length > 0 ){
1368				headerHeight = $('#eut-inner-header').outerHeight();
1369			}
1370			return headerHeight;
1371		},
1372		onePageSettings: function(){
1373			var headerHeight   = EUTHEM.pageBasic.shrinkHeaderHeight(),
1374				stickyType     = $('#eut-header').data('sticky-header'),
1375				fieldBarHeight = $('.eut-fields-bar').length ? $('.eut-fields-bar').outerHeight() : 0;
1376
1377			$('a[href*="#"]:not( [href="#"] )').click(function(e) {
1378				var target = $(this.hash);
1379				if ( target.length && ( target.hasClass('eut-section') || target.hasClass('eut-bookmark') ) ) {
1380					$('html,body').animate({
1381						scrollTop: target.offset().top - headerHeight - fieldBarHeight + 1
1382					}, 1000);
1383					return false;
1384				}
1385			});
1386		},
1387		onePageMenu: function(){
1388			var $section = $('#eut-main-content .eut-section[id]');
1389			if (!$section.length > 0 ) return;
1390
1391			var headerHeight   = EUTHEM.pageBasic.shrinkHeaderHeight(),
1392				fieldBarHeight = $('.eut-fields-bar').length ? $('.eut-fields-bar').outerHeight() : 0,
1393				offsetTop      = headerHeight + fieldBarHeight + wpBarHeight,
1394				scroll         = $(window).scrollTop();
1395
1396			$section.each(function(){
1397				var $that         = $(this),
1398					currentId     = $that.attr('id'),
1399					sectionOffset = $that.offset().top - offsetTop;
1400
1401				if (sectionOffset <= scroll && sectionOffset + $that.outerHeight() > scroll ) {
1402					$('a[href*="#' + currentId + '"]').parent().addClass('active');
1403				}
1404				else{
1405					$('a[href*="#' + currentId + '"]').parent().removeClass("active");
1406				}
1407
1408			});
1409		},
1410		hovers: function(){
1411			var $hoverItem = $('.eut-image-hover');
1412			if ( !isMobile.any() ) {
1413				$hoverItem.unbind('click');
1414				$hoverItem.unbind('mouseenter mouseleave').bind('mouseenter mouseleave', function() {
1415					$(this).toggleClass('hover');
1416				});
1417			} else {
1418				$hoverItem.on('touchend', function(e) {
1419					var $item = $(this);
1420					if ( $item.hasClass('hover') ) {
1421						return true;
1422					} else {
1423						$item.addClass('hover');
1424						$hoverItem.not(this).removeClass('hover');
1425						e.preventDefault();
1426						return false;
1427					}
1428				});
1429				$(document).on('touchstart touchend', function(e) {
1430					if ( !$hoverItem.is(e.target) && $hoverItem.has(e.target).length === 0 ) {
1431						$hoverItem.removeClass('hover');
1432					}
1433				});
1434			}
1435		},
1436		stickySidebar: function(){
1437			var $item    = $('#eut-sidebar.eut-fixed-sidebar');
1438
1439			if( !$item.length ) {
1440				return;
1441			}
1442			var itemId          = $item.attr('id'),
1443				itemWidth       = $item.outerWidth() - 1,
1444				itemFloat       = 'left';
1445
1446			if( $('#eut-main-content .eut-right-sidebar').length ) {
1447				itemFloat = 'right';
1448			}
1449
1450			if( !$item.length > 0 || isMobile.any() ) {
1451				return false;
1452			}
1453			// Create A Helper Wrapper
1454			$item.wrap('<div id="' + itemId + '-wrapper"></div>' );
1455			$item.parent().css({
1456				'width'    : itemWidth,
1457				'float'    : itemFloat,
1458				'position' : 'relative'
1459			});
1460			$item.css({
1461				'width'    : itemWidth,
1462				'position' : 'static'
1463			});
1464		},
1465		stickySidebarScroll: function(){
1466			var $content        = $('#eut-content-area'),
1467				$item           = $('#eut-sidebar.eut-fixed-sidebar');
1468
1469				if( !$item.length ) {
1470					return;
1471				}
1472
1473			var itemHeight      = $item.outerHeight(),
1474				headerHeight    = $('#eut-header').data('sticky-header') != 'none' ? $('#eut-inner-header').outerHeight() : 0,
1475				fieldBarHeight  = $('.eut-fields-bar').length ? $('.eut-fields-bar').outerHeight() : 0,
1476				offset          = headerHeight + fieldBarHeight + 30,
1477				windowHeight    = $(window).height(),
1478				contentHeight   = $content.outerHeight(),
1479				contentTop      = $content.offset().top,
1480				contentBottom   = contentTop + contentHeight;
1481
1482			if( !$item.length > 0 || itemHeight > windowHeight || isMobile.any() ) {
1483				return false;
1484			}
1485
1486			if( ( $(window).scrollTop() > contentTop - offset ) && ( $(window).scrollTop() < contentBottom - ( offset + itemHeight ) )){
1487				$item.css({'position':'fixed', 'top': offset });
1488			}
1489			else if( $(window).scrollTop() > contentTop ){
1490				$item.css({'position':'absolute', 'top': contentHeight - itemHeight });
1491			}
1492			else if( $(window).scrollTop() < contentTop ){
1493				$item.css({'position':'static', 'top':'auto' });
1494			}
1495		},
1496		backtoTop: function() {
1497			var selectors  = {
1498				topBtn     : '.eut-top-btn',
1499				dividerBtn : '.eut-divider-backtotop',
1500				topLink    : 'a[href="#eut-goto-header"]'
1501			};
1502			// Show backtoTop Button
1503			if( $('#eut-header').attr('data-backtotop') != 'no' ) {
1504				var btnUp = $('<div/>', {'class':'eut-top-btn fa fa-angle-up'});
1505					btnUp.appendTo('#eut-theme-wrapper');
1506
1507				$(window).on('scroll', function() {
1508					if ($(this).scrollTop() > 600) {
1509						$('.eut-top-btn').addClass('show');
1510						$('.eut-side-area-button').addClass('push');
1511					} else {
1512						$('.eut-top-btn').removeClass('show');
1513						$('.eut-side-area-button').removeClass('push');
1514					}
1515				});
1516			}
1517			$.each(selectors, function(key, value){
1518				$(value).on('click', function(){
1519					$('html, body').animate({scrollTop: 0}, 900);
1520				});
1521			});
1522
1523		},
1524		showSideAreaBtn: function(){
1525			var $btn         = $('.eut-side-area-button'),
1526				$featureArea = $('#eut-feature-section'),
1527				fullscreen   = $('#eut-header').data('fullscreen'),
1528				scroll       = $(window).scrollTop(),
1529				windowHeight = $(window).height();
1530
1531			if( $btn.length > 0 ) {
1532				if( $featureArea.length > 0 && fullscreen === 'yes' && sideAreaBtnAppear === false ){
1533					if( scroll > windowHeight/3 ) {
1534						$btn.addClass('show');
1535					} else {
1536						$btn.removeClass('show');
1537					}
1538				} else {
1539					$btn.addClass('show');
1540				}
1541			}
1542		},
1543		lightBox: function(){
1544			//IMAGE
1545			$('.eut-image-popup').each(function() {
1546				$(this).magnificPopup({
1547					type: 'image',
1548					preloader: false,
1549					fixedBgPos: true,
1550					fixedContentPos: true,
1551					removalDelay: 200,
1552					callbacks: {
1553						beforeOpen: function() {
1554							var mfpWrap = this.wrap;
1555							this.bgOverlay.fadeIn(200);
1556							addSpinner( mfpWrap );
1557						},
1558						imageLoadComplete: function() {
1559							var $spinner = this.wrap.find('.eut-loader'),
1560								$content = this.container;
1561							removeSpinner( $spinner, $content );
1562
1563						},
1564						beforeClose: function() {
1565							this.wrap.fadeOut(100);
1566							this.bgOverlay.fadeOut(100);
1567						},
1568					},
1569					image: {
1570						verticalFit: true,
1571						titleSrc: function(item) {
1572							var title   = item.el.data( 'title' ) ? item.el.data( 'title' ) : '',
1573								caption = item.el.data('desc') ? '<br><small>' + item.el.data('desc') + '</small>' : '';
1574							if ( '' === title ) {
1575								title   = item.el.find('.eut-title').html() ? item.el.find('.eut-title').html() : '';
1576							}
1577							if ( '' === caption ) {
1578								caption = item.el.find('.eut-caption').html() ? '<br><small>' + item.el.find('.eut-caption').html() + '</small>' : '';
1579							}
1580							return title + caption;
1581						}
1582					}
1583				});
1584			});
1585			$('.eut-gallery-popup, .eut-post-gallery-popup').each(function() {
1586				$(this).magnificPopup({
1587					delegate: 'a',
1588					type: 'image',
1589					preloader: false,
1590					fixedBgPos: true,
1591					fixedContentPos: true,
1592					removalDelay: 200,
1593					callbacks: {
1594						beforeOpen: function() {
1595							var mfpWrap = this.wrap;
1596							this.bgOverlay.fadeIn(200);
1597							addSpinner( mfpWrap );
1598						},
1599						imageLoadComplete: function() {
1600							var $spinner = this.wrap.find('.eut-loader'),
1601								$content = this.container;
1602							removeSpinner( $spinner, $content );
1603
1604						},
1605						beforeClose: function() {
1606							this.wrap.fadeOut(100);
1607							this.bgOverlay.fadeOut(100);
1608						},
1609					},
1610					gallery: {
1611						enabled:true
1612					},
1613					image: {
1614						tError: '<a href="%url%">The image #%curr%</a> could not be loaded.',
1615						titleSrc: function(item) {
1616							var title   = item.el.data( 'title' ) ? item.el.data( 'title' ) : '',
1617								caption = item.el.data('desc') ? '<br><small>' + item.el.data('desc') + '</small>' : '';
1618							if ( '' === title ) {
1619								title   = item.el.find('.eut-title').html() ? item.el.find('.eut-title').html() : '';
1620							}
1621							if ( '' === caption ) {
1622								caption = item.el.find('.eut-caption').html() ? '<br><small>' + item.el.find('.eut-caption').html() + '</small>' : '';
1623							}
1624							return title + caption;
1625						}
1626					}
1627				});
1628			});
1629
1630			if( 1 == eut_main_data.eut_wp_gallery_popup ) {
1631				$('.gallery').each(function() {
1632					$(this).magnificPopup({
1633						delegate: 'a',
1634						type: 'image',
1635						preloader: false,
1636						fixedBgPos: true,
1637						fixedContentPos: true,
1638						removalDelay: 200,
1639						callbacks: {
1640							beforeOpen: function() {
1641								var mfpWrap = this.wrap;
1642								this.bgOverlay.fadeIn(200);
1643								addSpinner( mfpWrap );
1644							},
1645							imageLoadComplete: function() {
1646								var $spinner = this.wrap.find('.eut-loader'),
1647									$content = this.container;
1648								removeSpinner( $spinner, $content );
1649
1650							},
1651							beforeClose: function() {
1652								this.wrap.fadeOut(100);
1653								this.bgOverlay.fadeOut(100);
1654							},
1655						},
1656						gallery: {
1657							enabled:true
1658						},
1659						image: {
1660							tError: '<a href="%url%">The image #%curr%</a> could not be loaded.',
1661							titleSrc: function(item) {
1662								var title   = item.el.closest('.gallery-item').find('.gallery-caption').html() ? item.el.closest('.gallery-item').find('.gallery-caption').html() : '';
1663								return title;
1664							}
1665						}
1666					});
1667				});
1668			}
1669			//VIDEOS
1670			if ( $('#eut-body').hasClass( 'eut-privacy-video-embeds-disabled' ) ) {
1671				$('.eut-youtube-popup, .eut-vimeo-popup, .eut-video-popup').each(function() {
1672					$(this).attr({"target" : "_blank"});
1673				});
1674			} else {
1675				$('.eut-youtube-popup, .eut-vimeo-popup, .eut-video-popup').each(function() {
1676					$(this).magnificPopup({
1677						disableOn: 0,
1678						type: 'iframe',
1679						preloader: false,
1680						fixedBgPos: true,
1681						fixedContentPos: true,
1682						removalDelay: 200,
1683						callbacks: {
1684							beforeOpen: function() {
1685								var mfpWrap = this.wrap;
1686								this.bgOverlay.fadeIn(200);
1687								addSpinner( mfpWrap );
1688							},
1689							open: function() {
1690								var $spinner = this.wrap.find('.eut-loader'),
1691									$content = this.container;
1692								removeSpinner( $spinner, $content );
1693							},
1694							beforeClose: function() {
1695								this.wrap.fadeOut(100);
1696								this.bgOverlay.fadeOut(100);
1697							},
1698						}
1699					});
1700				});
1701			}
1702			$('.eut-page-popup').each(function() {
1703				$(this).magnificPopup({
1704					disableOn: 0,
1705					type: 'iframe',
1706					preloader: false,
1707					fixedBgPos: true,
1708					fixedContentPos: true,
1709					removalDelay: 200,
1710					callbacks: {
1711						beforeOpen: function() {
1712							var mfpWrap = this.wrap;
1713							this.bgOverlay.fadeIn(200);
1714							addSpinner( mfpWrap );
1715						},
1716						open: function() {
1717							var $spinner = this.wrap.find('.eut-loader'),
1718								$content = this.container;
1719							removeSpinner( $spinner, $content );
1720						},
1721						beforeClose: function() {
1722							this.wrap.fadeOut(100);
1723							this.bgOverlay.fadeOut(100);
1724						},
1725					}
1726				});
1727			});
1728
1729			function addSpinner( mfpWrap ){
1730				var spinner = '<div class="eut-loader"></div>';
1731				$(spinner).appendTo( mfpWrap );
1732			}
1733
1734			function removeSpinner( spinner, content ){
1735				setTimeout(function(){
1736					spinner.fadeOut(1000, function(){
1737						content.animate({'opacity':1},600);
1738					});
1739				}, 700);
1740			}
1741		},
1742		socialShareLinks: function(){
1743			$('.eut-social-share-facebook').click(function (e) {
1744				e.preventDefault();
1745				window.open( 'https://www.facebook.com/sharer/sharer.php?u=' + $(this).attr('href'), "facebookWindow", "height=380,width=660,resizable=0,toolbar=0,menubar=0,status=0,location=0,scrollbars=0" );
1746				return false;
1747			});
1748			$('.eut-social-share-twitter').click(function (e) {
1749				e.preventDefault();
1750				window.open( 'http://twitter.com/intent/tweet?text=' + encodeURIComponent( $(this).attr('title') ) + ' ' + $(this).attr('href'), "twitterWindow", "height=450,width=660,resizable=0,toolbar=0,menubar=0,status=0,location=0,scrollbars=0" );
1751				return false;
1752			});
1753			$('.eut-social-share-linkedin').click(function (e) {
1754				e.preventDefault();
1755				window.open( 'http://www.linkedin.com/shareArticle?mini=true&url=' + $(this).attr('href') + '&title=' + encodeURIComponent( $(this).attr('title') ), "linkedinWindow", "height=500,width=820,resizable=0,toolbar=0,menubar=0,status=0,location=0,scrollbars=0" );
1756				return false;
1757			});
1758			$('.eut-social-share-googleplus').click(function (e) {
1759				e.preventDefault();
1760				window.open( 'https://plus.google.com/share?url=' + $(this).attr('href'), "googleplusWindow", "height=600,width=600,resizable=0,toolbar=0,menubar=0,status=0,location=0,scrollbars=0" );
1761				return false;
1762			});
1763			$('.eut-social-share-pinterest').click(function (e) {
1764				e.preventDefault();
1765				window.open( 'http://pinterest.com/pin/create/button/?url=' + $(this).attr('href') + '&media=' + $(this).data('pin-img') + '&description=' + encodeURIComponent( $(this).attr('title') ), "pinterestWindow", "height=600,width=600,resizable=0,toolbar=0,menubar=0,status=0,location=0,scrollbars=0" );
1766				return false;
1767			});
1768			$('.eut-social-share-reddit').click(function (e) {
1769				e.preventDefault();
1770				window.open( '//www.reddit.com/submit?url=' + $(this).attr('href'), "redditWindow", "height=600,width=820,resizable=0,toolbar=0,menubar=0,status=0,location=0,scrollbars=0" );
1771				return false;
1772			});
1773			$('.eut-like-counter-link').click(function (e) {
1774				e.preventDefault();
1775				var link = $(this);
1776				var id = link.data('post-id'),
1777					counter = link.parent().find('.eut-like-counter');
1778
1779				var ajaxurl = eut_main_data.ajaxurl;
1780
1781				$.ajax({type: 'POST', url: ajaxurl, data: 'action=eut_likes_callback&eut_likes_id=' + id, success: function(result) {
1782					counter.html(result);
1783				}});
1784				return false;
1785			});
1786		}
1787	};
1788
1789	// # Basic Elements
1790	// ============================================================================= //
1791	EUTHEM.basicElements = {
1792		init: function(){
1793			this.pieChart();
1794			this.progressBars();
1795			this.counter();
1796			this.slider();
1797			this.carousel();
1798			this.testimonial();
1799			this.accordionToggle();
1800			this.tabs();
1801			this.vcAccordion();
1802			this.vcTab();
1803			this.infoBox();
1804			this.expandableInfo();
1805			if( !$('#eut-loader-overflow').length > 0 ) {
1806				this.animAppear();
1807			}
1808		},
1809		pieChart: function(){
1810
1811			$('.eut-chart-number').each(function() {
1812				var $element = $(this),
1813					delay       = $element.parent().attr('data-delay') !== '' ? parseInt( $element.parent().attr('data-delay') ) : 0,
1814					chartSize   = '170';
1815
1816				$element.css({ 'width' : chartSize, 'height' : chartSize, 'line-height' : chartSize + 'px' });
1817
1818				$element.appear(function() {
1819					setTimeout(function () {
1820						EUTHEM.basicElements.pieChartInit( $element );
1821					}, delay);
1822				});
1823			});
1824
1825		},
1826		pieChartInit: function( $element ){
1827
1828			var activeColor = $element.data('pie-active-color') !== '' ? $element.data('pie-active-color') : 'rgba(0,0,0,1)',
1829				pieColor    = $element.data('pie-color') !== '' ? $element.data('pie-color') : 'rgba(0,0,0,0.1)',
1830				pieLineCap  = $element.data('pie-line-cap') !== '' ? $element.data('pie-line-cap') : 'round',
1831				lineSize    = $element.data('pie-line-size') !== '' ? $element.data('pie-line-size') : '6',
1832				chartSize   = '170';
1833
1834
1835			$element.easyPieChart({
1836				barColor: activeColor,
1837				trackColor: pieColor,
1838				scaleColor: false,
1839				lineCap: pieLineCap,
1840				lineWidth: lineSize,
1841				animate: 1500,
1842				size: chartSize
1843			});
1844		},
1845		progressBars: function(){
1846			var selector = '.eut-progress-bar';
1847			$(selector).each(function() {
1848				$(this).appear(function() {
1849
1850					var val         = $(this).attr('data-value'),
1851						percentage  = $('<span class="eut-percentage">'+ val + '%'+'</span>');
1852
1853					$(this).find('.eut-bar-line').animate({ width: val + '%' }, 1600);
1854					if( $(this).parent().hasClass('eut-style-1') ) {
1855						percentage.appendTo($(this).find('.eut-bar')).animate({ left: val + '%' }, 1600);
1856					} else {
1857						percentage.appendTo($(this).find('.eut-bar-title'));
1858					}
1859
1860				});
1861			});
1862		},
1863		counter: function(){
1864			var selector = '.eut-counter-item span';
1865			$(selector).each(function(i){
1866				var elements = $(selector)[i],
1867					thousandsSeparator = $(this).attr('data-thousands-separator') !== '' ? $(this).attr('data-thousands-separator') : ',';
1868				$(elements).attr('id','eut-counter-' + i );
1869				var delay = $(this).parents('.eut-counter').attr('data-delay') !== '' ? parseInt( $(this).parents('.eut-counter').attr('data-delay') ) : 200,
1870					options = {
1871						useEasing    : true,
1872						useGrouping  : true,
1873						separator    : $(this).attr('data-thousands-separator-vis') !== 'yes' ? thousandsSeparator : '',
1874						decimal      : $(this).attr('data-decimal-separator') !== '' ? $(this).attr('data-decimal-separator') : '.',
1875						prefix       : $(this).attr('data-prefix') !== '' ? $(this).attr('data-prefix') : '',
1876						suffix       : $(this).attr('data-suffix') !== '' ? $(this).attr('data-suffix') : ''
1877					},
1878					counter = new countUp( $(this).attr('id') , $(this).attr('data-start-val'), $(this).attr('data-end-val'), $(this).attr('data-decimal-points'), 2.5, options);
1879				$(this).appear(function() {
1880					setTimeout(function () {
1881						counter.start();
1882					}, delay);
1883				});
1884			});
1885		},
1886		slider: function( settings ){
1887
1888			var $element  = $('.eut-slider:not(#eut-feature-slider)');
1889
1890				$element.each(function(){
1891					var $that = $(this),
1892						carouselSettings = {
1893							sliderSpeed     : ( parseInt( $that.attr('data-slider-speed') ) ) ? parseInt( $that.attr('data-slider-speed') ) : 3000,
1894							paginationSpeed : ( parseInt( $that.attr('data-pagination-speed') ) ) ? parseInt( $that.attr('data-pagination-speed') ) : 400,
1895							autoHeight      : $that.attr('data-slider-autoheight') == 'yes' ? true : false,
1896							sliderPause     : $that.attr('data-slider-pause') == 'yes' ? true : false,
1897							autoPlay        : $that.attr('data-slider-autoplay') != 'no' ? true : false,
1898							baseClass       : 'eut-carousel',
1899							pagination      : $that.parents('.eut-element').hasClass('eut-isotope') ? true : false,
1900						};
1901
1902					carouselInit( $that, carouselSettings );
1903					customNav( $that );
1904				});
1905
1906			// Init Slider
1907			function carouselInit( $element, settings ){
1908				$element.owlCarousel({
1909					navigation      : false,
1910					pagination      : settings.pagination,
1911					autoHeight      : settings.autoHeight,
1912					slideSpeed      : settings.paginationSpeed,
1913					paginationSpeed : settings.paginationSpeed,
1914					singleItem      : true,
1915					autoPlay        : settings.autoPlay,
1916					stopOnHover     : settings.sliderPause,
1917					baseClass       : 'owl-carousel',
1918					theme           : 'eut-theme'
1919				});
1920				// Carousel Element Speed
1921				if( settings.autoPlay === true ){
1922					$element.trigger( 'owl.play', settings.sliderSpeed );
1923				}
1924			}
1925
1926			// Slider Navigation
1927			function customNav( $element ){
1928				$element.parent().find('.eut-carousel-next').click(function(){
1929					$element.trigger('owl.next');
1930				});
1931				$element.parent().find('.eut-carousel-prev').click(function(){
1932					$element.trigger('owl.prev');
1933				});
1934			}
1935
1936		},
1937		carousel: function(){
1938
1939			var $carousel = $('.eut-carousel');
1940
1941			$carousel.each(function(){
1942				var $that = $(this),
1943					carouselSettings = {
1944						sliderSpeed : ( parseInt( $that.attr('data-slider-speed') ) ) ? parseInt( $that.attr('data-slider-speed') ) : 3000,
1945						paginationSpeed : ( parseInt( $that.attr('data-pagination-speed') ) ) ? parseInt( $that.attr('data-pagination-speed') ) : 400,
1946						autoHeight  : $that.attr('data-slider-autoheight') == 'yes' ? true : '',
1947						sliderPause : $that.attr('data-slider-pause') == 'yes' ? true : false,
1948						autoPlay    : $that.attr('data-slider-autoplay') != 'no' ? true : false,
1949						itemNum     : parseInt( $that.attr('data-items')),
1950						itemsTablet : [768,2],
1951						baseClass   : 'eut-carousel'
1952					};
1953
1954				carouselInit( $that, carouselSettings );
1955				customNav( $that );
1956
1957			});
1958			// Init Carousel
1959			function carouselInit( $element, settings ){
1960				$element.owlCarousel({
1961					navigation        : false,
1962					pagination        : false,
1963					autoHeight        : settings.autoHeight,
1964					slideSpeed        : 400,
1965					paginationSpeed   : settings.paginationSpeed,
1966					singleItem        : false,
1967					items             : settings.itemNum,
1968					autoPlay          : settings.autoPlay,
1969					stopOnHover       : settings.sliderPause,
1970					baseClass         : 'eut-carousel-element',
1971					theme             : '',
1972					itemsDesktop      : false,
1973					itemsDesktopSmall : false,
1974				 	itemsTablet       : settings.itemsTablet
1975				});
1976
1977				// Carousel Element Speed
1978				if( settings.autoPlay === true ){
1979					$element.trigger('owl.play',settings.sliderSpeed);
1980				}
1981				$element.css('visibility','visible');
1982			}
1983
1984			// Carousel Navigation
1985			function customNav( $element ){
1986				$element.parent().find('.eut-carousel-next').click(function(){
1987					$element.trigger('owl.next');
1988				});
1989				$element.parent().find('.eut-carousel-prev').click(function(){
1990					$element.trigger('owl.prev');
1991				});
1992			}
1993		},
1994		testimonial: function(){
1995
1996			var $testimonial = $('.eut-testimonial');
1997
1998			$testimonial.each(function(){
1999				var $that = $(this),
2000					carouselSettings = {
2001						sliderSpeed : ( parseInt( $that.attr('data-slider-speed') ) ) ? parseInt( $that.attr('data-slider-speed') ) : 3000,
2002						paginationSpeed : ( parseInt( $that.attr('data-pagination-speed') ) ) ? parseInt( $that.attr('data-pagination-speed') ) : 400,
2003						autoHeight  : $that.attr('data-slider-autoheight') == 'yes' ? true : '',
2004						sliderPause : $that.attr('data-slider-pause') == 'yes' ? true : false,
2005						autoPlay    : $that.attr('data-slider-autoplay') != 'no' ? true : false,
2006						itemNum     : parseInt( $that.attr('data-items')),
2007						baseClass   : 'eut-testimonial'
2008					};
2009
2010				carouselInit( $that, carouselSettings );
2011
2012			});
2013			// Init Carousel
2014			function carouselInit( $element, settings ){
2015				$element.owlCarousel({
2016					navigation        : false,
2017					pagination        : true,
2018					autoHeight        : settings.autoHeight,
2019					slideSpeed        : 400,
2020					paginationSpeed   : settings.paginationSpeed,
2021					singleItem        : true,
2022					autoPlay          : settings.autoPlay,
2023					stopOnHover       : settings.sliderPause,
2024					baseClass         : 'eut-testimonial-element',
2025					theme             : '',
2026				});
2027
2028				// Carousel Element Speed
2029				if( settings.autoPlay === true ){
2030					$element.trigger('owl.play',settings.sliderSpeed);
2031				}
2032			}
2033		},
2034		iconBox: function(){
2035			var $parent   = $('.eut-row'),
2036				arrHeight = [];
2037
2038			$parent.each(function(){
2039				var $iconBox  = $(this).find('.eut-box-icon.eut-advanced-hover');
2040				if( !$iconBox.length ) return;
2041
2042				if( isMobile.any() ) {
2043					$iconBox.removeClass('eut-advanced-hover');
2044					return;
2045				}
2046
2047				$iconBox.css({ 'height' : '', 'padding-top' : '' });
2048				$iconBox.each(function(){
2049					var $that          = $(this),
2050						$iconBoxHeigth = $that.height();
2051
2052					arrHeight.push( $iconBoxHeigth );
2053				});
2054
2055				var maxHeight   = Math.max.apply(Math,arrHeight) + 20,
2056					iconHeight  = $iconBox.find('.eut-wrapper-icon').height(),
2057					paddingTop  = ( maxHeight - iconHeight )/2;
2058
2059				$iconBox.css({ 'height' : maxHeight, 'padding-top' : paddingTop });
2060				setTimeout(function() {
2061					$iconBox.addClass('active');
2062				}, 300);
2063
2064				$iconBox.unbind('mouseenter mouseleave').bind('mouseenter mouseleave', function() {
2065					$(this).toggleClass('hover');
2066				});
2067
2068			});
2069		},
2070		accordionToggle: function(){
2071			$('.eut-toggle-wrapper.eut-first-open').each(function(){
2072				$(this).find('li').first().addClass('active');
2073			});
2074			$('.eut-toggle-wrapper li.active').find('.eut-title').addClass('active');
2075			$('.eut-toggle-wrapper li .eut-title').click(function () {
2076				$(this)
2077					.toggleClass('active')
2078					.next().slideToggle(350);
2079			});
2080			$('.eut-accordion-wrapper.eut-first-open').each(function(){
2081				$(this).find('li').first().addClass('active');
2082			});
2083			$('.eut-accordion-wrapper li.active').find('.eut-title').addClass('active');
2084			$('.eut-accordion-wrapper li .eut-title').click(function () {
2085				$(this)
2086					.toggleClass('active').next().slideToggle(350)
2087					.parent().siblings().find('.eut-title').removeClass('active')
2088					.next().slideUp(350);
2089			});
2090		},
2091		tabs: function(){
2092			$('.eut-tabs-title li').click(function () {
2093				$(this).addClass('active').siblings().removeClass('active');
2094				$(this).parent().parent().find('.eut-tabs-wrapper').find('.eut-tab-content').eq($(this).index()).addClass('active').siblings().removeClass('active');
2095			});
2096			$('.eut-tabs-title').each(function(){
2097				$(this).find('li').first().click();
2098			});
2099		},
2100		vcAccordion: function(){
2101			var $target = $('.vc_tta-accordion').find('a[data-vc-accordion]'),
2102				$panel = $('.vc_tta-panel');
2103			if( $panel.find('.eut-isotope').length ) {
2104				setTimeout(function(){
2105					EUTHEM.isotope.init();
2106				},100);
2107			}
2108			$target.on('click',function(){
2109				if( $panel.find('.eut-isotope').length ) {
2110					setTimeout(function(){
2111						EUTHEM.isotope.init();
2112					},100);
2113				}
2114			});
2115		},
2116		vcTab: function(){
2117			var $target = $('.vc_tta-tabs').find('a[data-vc-tabs]'),
2118				$panel = $('.vc_tta-panel');
2119			if( $panel.find('.eut-isotope').length ) {
2120				setTimeout(function(){
2121					EUTHEM.isotope.init();
2122				},100);
2123			}
2124			$target.on('click',function(){
2125				if( $panel.find('.eut-isotope').length ) {
2126					setTimeout(function(){
2127						EUTHEM.isotope.init();
2128					},100);
2129				}
2130			});
2131		},
2132		infoBox: function(){
2133			var infoMessage = $('.eut-message'),
2134			closeBtn = infoMessage.find($('.eut-close'));
2135			closeBtn.click(function () {
2136				$(this).parent().slideUp(150);
2137			});
2138		},
2139		animAppear: function(){
2140			if(isMobile.any()) {
2141				$('.eut-animated-item').css('opacity',1);
2142			} else {
2143				$('.eut-animated-item').each(function() {
2144					var timeDelay = $(this).attr('data-delay');
2145					$(this).appear(function() {
2146					var $that = $(this);
2147						setTimeout(function () {
2148							$that.addClass('eut-animated');
2149						}, timeDelay);
2150					},{accX: 0, accY: -150});
2151				});
2152			}
2153		},
2154		expandableInfo: function(){
2155			var $item = $('.eut-expandable-info');
2156			$item.each(function(){
2157				var $that         = $(this),
2158					$wrapper      = $that.parents('.eut-section'),
2159					$content      = $that.find('.eut-expandable-info-content'),
2160					paddingTop    = parseInt( $wrapper.css('padding-top') ),
2161					paddingBottom = parseInt( $wrapper.css('padding-bottom') );
2162
2163				$wrapper.addClass('eut-pointer-cursor');
2164				$wrapper.on('click',function(){
2165
2166					var headerHeight   = $('#eut-header').data('sticky-header') != 'none' ? $('#eut-inner-header').outerHeight() : 0,
2167						fieldBarHeight = $('.eut-fields-bar').length ? $('.eut-fields-bar').outerHeight() : 0,
2168						offset         = $(this).offset().top,
2169						distance       = offset - ( headerHeight + fieldBarHeight );
2170
2171					if( $content.is(":visible") ){
2172						$content.slideUp( 600, function(){
2173							$content.removeClass('show');
2174						});
2175					} else {
2176
2177						$('html,body').animate({
2178							scrollTop: distance
2179						}, 600,function(){
2180							$content.slideDown( function(){
2181								$content.addClass('show');
2182								return;
2183							});
2184						});
2185					}
2186				});
2187				$wrapper.mouseenter(function() {
2188					$(this).css({ 'padding-top' : paddingTop + 40, 'padding-bottom' : paddingBottom + 40 });
2189				});
2190				$wrapper.mouseleave(function() {
2191					$(this).css({ 'padding-top' : paddingTop, 'padding-bottom' : paddingBottom });
2192				});
2193			});
2194		}
2195	};
2196
2197	// # Main Menu
2198	// ============================================================================= //
2199	EUTHEM.mainMenu = {
2200
2201		menu      : '#eut-main-menu',
2202		menuItem  : '#eut-main-menu li',
2203
2204		init: function() {
2205			$(this.menuItem).mouseenter(function() {
2206				var itemHover = $(this);
2207
2208				EUTHEM.mainMenu.menuPosition(itemHover);
2209
2210				itemHover.find( ' > ul ' ).addClass('active');
2211			});
2212			$(this.menuItem).mouseleave(function() {
2213				var itemHover = $(this);
2214				itemHover.find( ' > ul ' ).removeClass('active');
2215			});
2216			$(this.menuItem).find( ' > a[href="#"]').on('click',function(e){
2217				e.preventDefault();
2218			});
2219
2220			// Fix Double Click on devices without responsive menu
2221			if( isMobile.any() ) {
2222				EUTHEM.mainMenu.deviceMenu();
2223			}
2224
2225		},
2226		menuPosition: function(item){
2227			var containerWidth  = $(this.menu).parent().outerWidth(),
2228				subMenu         = item.find(' > ul '),
2229				subMenuWidth    = subMenu.width(),
2230				windowWidth     = $(window).width(),
2231				menuPositionX   = item.offset().left;
2232
2233			if ( !item.hasClass('megamenu') && (menuPositionX + subMenuWidth) > ( windowWidth - containerWidth )/2 + containerWidth) {
2234				subMenu.addClass('eut-position-right');
2235			}
2236		},
2237		deviceMenu: function(){
2238			var $menuItem = $(this.menuItem);
2239			$menuItem.bind('touchstart touchend', function(e) {
2240				var $item = $(this);
2241				$item.siblings().removeClass('open-submenu').find( ' > ul ' ).removeClass('active');
2242				if( $item.hasClass('menu-item-has-children') && $item.find('> a').attr('href') != '#' ) {
2243					if( !$item.hasClass('open-submenu') ) {
2244						$item.find( ' > ul ' ).addClass('active');
2245						e.preventDefault();
2246						$item.addClass('open-submenu');
2247					}
2248				}
2249			});
2250		}
2251	};
2252
2253
2254	//////////////////////////////////////////////////////////////////////////////////////////////////////
2255	// GLOBAL VARIABLES
2256	//////////////////////////////////////////////////////////////////////////////////////////////////////
2257	var largeScreen = 2048;
2258	var tabletLandscape = 1200;
2259	var tabletPortrait = 1023;
2260	var mobileScreen = 767;
2261
2262	var wpBarHeight = $('#eut-body').hasClass('admin-bar') ? 32 : 0;
2263	var isMobile = {
2264		Android: function() {
2265			return navigator.userAgent.match(/Android/i);
2266		},
2267		BlackBerry: function() {
2268			return navigator.userAgent.match(/BlackBerry/i);
2269		},
2270		iOS: function() {
2271			return navigator.userAgent.match(/iPhone|iPad|iPod/i);
2272		},
2273		Opera: function() {
2274			return navigator.userAgent.match(/Opera Mini/i);
2275		},
2276		Windows: function() {
2277			return navigator.userAgent.match(/IEMobile/i);
2278		},
2279		any: function() {
2280			return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());
2281		}
2282	};
2283
2284	// Scrollbar Width
2285	var parent, child, scrollBarWidth;
2286
2287	if( scrollBarWidth === undefined ) {
2288		parent          = $('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo('body');
2289		child           = parent.children();
2290		scrollBarWidth  = child.innerWidth()-child.height(99).innerWidth();
2291		parent.remove();
2292	}
2293
2294	$(document).ready(function(){ EUTHEM.documentReady.init(); });
2295	$(window).afterResize(function(){ EUTHEM.documentResize.init(); });
2296	$(window).load(function(){ EUTHEM.documentLoad.init(); });
2297	$(window).on('scroll', function() { EUTHEM.documentScroll.init(); });
2298
2299})(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.