PageSourceSearch

https://www.isjneamt.ro/site/wp-content/themes/eduma/assets/js/thim-scripts.js?ver=5.0.4

js isjneamt.ro collected 2026-10-03 17:36:01 UTC 30,966 bytes, 952 lines download raw bytes

1/*
2* Re-structure JS
3* */
4(function ($) {
5	'use strict'
6
7	/*
8	* Helper functions
9	* */
10	function thim_get_url_parameters(sParam) {
11		var sPageURL = window.location.search.substring(1)
12
13		var sURLVariables = sPageURL.split('&')
14		for (var i = 0; i < sURLVariables.length; i++) {
15			var sParameterName = sURLVariables[i].split('=')
16
17			if (sParameterName[0] === sParam) {
18				return sParameterName[1]
19			}
20		}
21
22	}
23
24	var thim_eduma = {
25		el_thim_pop_up_login   : null,
26		el_loginpopopform      : null,
27		el_registerPopupForm   : null,
28		el_form_purchase_course: null,
29
30		ready: function () {
31			this.getElements()
32			if (this.el_thim_pop_up_login.length) {
33				this.el_loginpopopform = this.el_thim_pop_up_login.find('form[name=loginpopopform]')
34				this.el_registerPopupForm = this.el_thim_pop_up_login.find('form[name=registerformpopup]')
35				this.login_form_popup()
36			}
37
38			this.form_submission_validate()
39			this.thim_TopHeader()
40			this.ctf7_input_effect()
41			this.mobile_menu_toggle()
42			this.thim_backgroud_gradient()
43			this.thim_single_image_popup()
44			this.full_right(),
45			this.course_sidebar_right_offset_top();
46		},
47
48		getElements: function () {
49			this.el_thim_pop_up_login = $('#thim-popup-login')
50			this.el_form_purchase_course = $('form[name=purchase-course]')
51		},
52
53		load: function () {
54			this.thim_menu()
55			this.thim_carousel()
56			this.thim_contentslider()
57			this.counter_box()
58			if ($('#contact-form-registration').length) {
59 				this.thim_course_offline_popup_form_register();
60			}
61		},
62
63		resize: function () {
64			this.full_right()
65		},
66
67		validate_form: function (form) {
68			var valid = true,
69				email_valid = /[A-Z0-9._%+-]+@[A-Z0-9.-]+.[A-Z]{2,4}/igm
70
71			form.find('input.required').each(function () {
72				// Check empty value
73				if (!$(this).val()) {
74					$(this).addClass('invalid')
75					valid = false
76				}
77
78				// Uncheck
79				if ($(this).is(':checkbox') && !$(this).is(':checked')) {
80					$(this).addClass('invalid')
81					valid = false
82				}
83
84				// Check email format
85				if ('email' === $(this).attr('type')) {
86					if (!email_valid.test($(this).val())) {
87						$(this).addClass('invalid')
88						valid = false
89					}
90				}
91
92				// Check captcha
93				if ($(this).hasClass('captcha-result')) {
94					let captcha_1 = parseInt($(this).data('captcha1')),
95						captcha_2 = parseInt($(this).data('captcha2'))
96
97					if ((captcha_1 + captcha_2) !== parseInt($(this).val())) {
98						$(this).addClass('invalid').val('')
99						valid = false
100					}
101				}
102			})
103
104			// Check repeat password
105			if (form.hasClass('auto_login')) {
106				let $pw = form.find('input[name=password]'),
107					$repeat_pw = form.find('input[name=repeat_password]')
108
109				if ($pw.val() !== $repeat_pw.val()) {
110					$pw.addClass('invalid')
111					$repeat_pw.addClass('invalid')
112					valid = false
113				}
114			}
115
116			$('form input.required').on('focus', function () {
117				$(this).removeClass('invalid')
118			})
119
120			return valid
121		},
122
123		login_form_popup: function () {
124			var teduma = this
125
126			/*\$(document).on('click', 'body:not(".loggen-in") .thim-button-checkout',
127				function(e) {
128				  if ($(window).width() > 767) {
129					e.preventDefault();
130					if ($('#thim-popup-login').length) {
131					  $('body').addClass('thim-popup-active');
132					  $('#thim-popup-login').addClass('active');
133					} else {
134					  var redirect = $(this).data('redirect');
135					  window.location = redirect;
136					}
137				  } else {
138					e.preventDefault();
139					var redirect = $(this).data('redirect');
140					window.location = redirect;
141				  }
142				});*/
143
144			$(document).on('click', '#thim-popup-login .close-popup', function (event) {
145				event.preventDefault()
146				$('body').removeClass('thim-popup-active')
147				teduma.el_thim_pop_up_login.removeClass()
148
149				//Todo: remove param purchase course on login popup
150				teduma.el_loginpopopform.find('.params-purchase-code').remove()
151			})
152
153			$('body .thim-login-popup a.js-show-popup').on('click', function (event) {
154				event.preventDefault()
155
156				$('body').addClass('thim-popup-active')
157				teduma.el_thim_pop_up_login.addClass('active')
158				console.log(teduma.el_thim_pop_up_login);
159				if ($(this).hasClass('login')) {
160					teduma.el_thim_pop_up_login.addClass('sign-in')
161				} else {
162					teduma.el_thim_pop_up_login.addClass('sign-up')
163				}
164			})
165
166			//when login in single page event, show login-popup ,remove redirect to page account
167			$('body .widget_book-event a.js-show-popup').on('click', function (event) {
168				event.preventDefault()
169				$('body').addClass('thim-popup-active')
170				teduma.el_thim_pop_up_login.addClass('active')
171			})
172
173			teduma.el_thim_pop_up_login.find('.link-bottom a').on('click', function (e) {
174				e.preventDefault()
175
176				if ($(this).hasClass('login')) {
177					teduma.el_thim_pop_up_login.removeClass('sign-up').addClass('sign-in')
178				} else {
179					teduma.el_thim_pop_up_login.removeClass('sign-in').addClass('sign-up')
180				}
181			})
182
183			// Show login popup when click to LP buttons
184			$('body:not(".logged-in") .enroll-course .button-enroll-course, body:not(".logged-in") form.purchase-course:not(".guest_checkout") .button:not(.button-add-to-cart)').on('click', function (e) {
185				e.preventDefault()
186
187				if ($('body').hasClass('thim-popup-feature')) {
188					$('.thim-link-login.thim-login-popup .login').trigger('click')
189
190					// Add param purchase course to login and Register form if exists
191					teduma.add_params_purchase_course_to_el(teduma.el_loginpopopform)
192					teduma.add_params_purchase_course_to_el(teduma.el_registerPopupForm)
193
194				} else {
195					window.location.href = $(this).parent().find('input[name=redirect_to]').val()
196				}
197			})
198			$('.learn-press-content-protected-message .lp-link-login').on('click', function (e) {
199				e.preventDefault()
200
201				if ($('body').hasClass('thim-popup-feature')) {
202					$('.thim-link-login.thim-login-popup .login').trigger('click')
203					// Add param purchase course to login and Register form if exists
204					teduma.add_params_purchase_course_to_el(teduma.el_loginpopopform)
205					teduma.add_params_purchase_course_to_el(teduma.el_registerPopupForm)
206				} else {
207					window.location.href = $(this).href()
208				}
209			})
210
211			$(document).on('click', this.el_thim_pop_up_login, function (e) {
212				if ($(e.target).attr('id') === 'thim-popup-login') {
213					$('body').removeClass('thim-popup-active')
214					teduma.el_thim_pop_up_login.removeClass()
215
216					// remove param purchase course on login popup
217					teduma.el_loginpopopform.find('.params-purchase-code').remove()
218					teduma.el_registerPopupForm.find('.params-purchase-code').remove()
219				}
220			})
221
222			this.el_loginpopopform.submit(function (e) {
223				if (!thim_eduma.validate_form($(this))) {
224					e.preventDefault()
225					return false
226				}
227
228				var $elem = teduma.el_thim_pop_up_login.find('.thim-login-container')
229				$elem.addClass('loading')
230			})
231
232			teduma.el_thim_pop_up_login.find('form[name=registerformpopup]').on('submit', function (e) {
233				if (!thim_eduma.validate_form($(this))) {
234					e.preventDefault()
235					return false
236				}
237
238				var $elem = teduma.el_thim_pop_up_login.find('.thim-login-container')
239				$elem.addClass('loading')
240			})
241		},
242
243		/**
244		 * Add params purchase course to element
245		 * @purpose When register, login via buy course will send params purchase to action
246		 *
247		 * @param el
248		 * @since 4.2.6
249		 * @author tungnx
250		 */
251		add_params_purchase_course_to_el: function (el) {
252			var teduma = this
253
254			if (teduma.el_form_purchase_course.length) {
255				el.append('<p class="params-purchase-code"></p>')
256
257				var el_paramsPurchaseCode = el.find('.params-purchase-code')
258
259				$.each(teduma.el_form_purchase_course.find('input'), function (i) {
260					var inputName = $(this).attr('name')
261					var inputPurchaseCourse = $(this).clone()
262
263					if (el_paramsPurchaseCode.find('input[name=' + inputName + ']').length == 0) {
264						el_paramsPurchaseCode.append(inputPurchaseCourse)
265
266						if (inputName == 'add-to-cart') {
267							var urlHandleAjax = window.location.href.addQueryVar('r', Math.random())
268							var el_urlHandleAjax = '<input name="urlHandleAjax" value="' + urlHandleAjax + '" type="hidden">'
269							el_paramsPurchaseCode.append(el_urlHandleAjax)
270						}
271					}
272				})
273			}
274		},
275
276		form_submission_validate: function () {
277			// Form login
278			$('.form-submission-login form[name=loginform]').on('submit', function (e) {
279				if (!thim_eduma.validate_form($(this))) {
280					e.preventDefault()
281					return false
282				}
283			})
284
285			// Form register
286			$('.form-submission-register form[name=registerform]').on('submit', function (e) {
287				if (!thim_eduma.validate_form($(this))) {
288					e.preventDefault()
289					return false
290				}
291			})
292
293			// Form lost password
294			$('.form-submission-lost-password form[name=lostpasswordform]').on('submit', function (e) {
295				if (!thim_eduma.validate_form($(this))) {
296					e.preventDefault()
297					return false
298				}
299			})
300		},
301
302		thim_TopHeader: function () {
303			var header = $('#masthead'),
304				height_sticky_header = header.outerHeight(true),
305				content_pusher = $('#wrapper-container .content-pusher'),
306				top_site_main = $('#wrapper-container .top_site_main')
307
308			if (header.hasClass('header_overlay')) { // Header overlay
309				top_site_main.css({'padding-top': height_sticky_header + 'px'})
310				$(window).resize(function () {
311					let height_sticky_header = header.outerHeight(true)
312					top_site_main.css({'padding-top': height_sticky_header + 'px'})
313				})
314			} else { // Header default
315				content_pusher.css({'padding-top': height_sticky_header + 'px'})
316				$(window).resize(function () {
317					let height_sticky_header = header.outerHeight(true)
318					content_pusher.css({'padding-top': height_sticky_header + 'px'})
319				})
320
321			}
322		},
323
324		ctf7_input_effect: function () {
325			let $ctf7_edtech = $('.form_developer_course'),
326				$item_input = $ctf7_edtech.find('.field_item input'),
327				$submit_wrapper = $ctf7_edtech.find('.submit_row')
328
329			$item_input.focus(function () {
330				$(this).parent().addClass('focusing')
331			}).blur(function () {
332				$(this).parent().removeClass('focusing')
333			})
334
335			$submit_wrapper.on('click', function () {
336				$(this).closest('form').submit()
337			})
338		},
339
340		mobile_menu_toggle: function () {
341			$(document).on('click', '.menu-mobile-effect', function (e) {
342				e.stopPropagation()
343				$('body').toggleClass('mobile-menu-open')
344			})
345
346			$(document).on('click', '.mobile-menu-wrapper', function (e) {
347				$('body').removeClass('mobile-menu-open')
348			})
349
350			$(document).on('click', '.mobile-menu-inner', function (e) {
351				e.stopPropagation()
352			})
353		},
354
355		thim_menu: function () {
356
357			//Add class for masthead
358			var $header = $('#masthead.sticky-header'),
359				off_Top = ($('.content-pusher').length > 0) ? $('.content-pusher').offset().top : 0,
360				menuH = $header.outerHeight(),
361				latestScroll = 0
362			var $imgLogo = $('.site-header .thim-logo img'),
363				srcLogo = $($imgLogo).attr('src'),
364				dataRetina = $($imgLogo).data('retina'),
365				dataSticky = $($imgLogo).data('sticky'),
366				dataMobile = $($imgLogo).data('mobile'),
367				dataStickyMobile = $($imgLogo).data('sticky_mobile');
368			if ($(window).scrollTop() > 2) {
369				$header.removeClass('affix-top').addClass('affix')
370			}
371			if ($(window).outerWidth() < 769) {
372				if (dataMobile != null) {
373					$($imgLogo).attr('src', dataMobile);
374				}
375			} else {
376				if (window.devicePixelRatio > 1 && dataRetina != null) {
377					$($imgLogo).attr('src', dataRetina);
378				}
379			}
380
381			$(window).scroll(function () {
382				var current = $(this).scrollTop()
383				if (current > 2) {
384					$header.removeClass('affix-top').addClass('affix');
385					if ($(window).outerWidth() < 769) {
386						if (dataStickyMobile != null) {
387							$($imgLogo).attr('src', dataStickyMobile);
388						} else {
389							if (dataSticky != null) {
390								$($imgLogo).attr('src', dataSticky);
391							}
392						}
393					} else {
394						if (dataSticky != null) {
395							$($imgLogo).attr('src', dataSticky);
396						}
397					}
398				} else {
399					$header.removeClass('affix').addClass('affix-top');
400					if ($(window).outerWidth() < 769) {
401						if (dataMobile != null) {
402							$($imgLogo).attr('src', dataMobile);
403						} else if (srcLogo != null) {
404							$($imgLogo).attr('src', srcLogo);
405						}
406					} else {
407						if (window.devicePixelRatio > 1 && dataRetina != null) {
408							$($imgLogo).attr('src', dataRetina);
409						} else if (srcLogo != null) {
410							$($imgLogo).attr('src', srcLogo);
411						}
412					}
413				}
414
415				if (current > latestScroll && current > menuH + off_Top) {
416					if (!$header.hasClass('menu-hidden')) {
417						$header.addClass('menu-hidden')
418					}
419				} else {
420					if ($header.hasClass('menu-hidden')) {
421						$header.removeClass('menu-hidden')
422					}
423				}
424
425				latestScroll = current
426			})
427
428
429			//Submenu position
430			$('.wrapper-container:not(.mobile-menu-open) .site-header .navbar-nav > .menu-item').each(function () {
431				if ($('>.sub-menu', this).length <= 0) {
432					return
433				}
434
435				let elm = $('>.sub-menu', this),
436					off = elm.offset(),
437					left = off.left,
438					width = elm.width()
439
440				let navW = $('.thim-nav-wrapper').width(),
441					isEntirelyVisible = (left + width <= navW)
442
443				if (!isEntirelyVisible) {
444					elm.addClass('dropdown-menu-right')
445				} else {
446					let subMenu2 = elm.find('>.menu-item>.sub-menu')
447
448					if (subMenu2.length <= 0) {
449						return
450					}
451
452					let off = subMenu2.offset(),
453						left = off.left,
454						width = subMenu2.width()
455
456					let isEntirelyVisible = (left + width <= navW)
457
458					if (!isEntirelyVisible) {
459						elm.addClass('dropdown-left-side')
460					}
461				}
462			})
463
464			let $headerLayout = $('header#masthead')
465			let magicLine = function () {
466				if ($(window).width() > 768) {
467					//Magic Line
468					var menu_active = $(
469						'#masthead .navbar-nav>li.menu-item.current-menu-item,#masthead .navbar-nav>li.menu-item.current-menu-parent, #masthead .navbar-nav>li.menu-item.current-menu-ancestor')
470					if (menu_active.length > 0) {
471						menu_active.before('<span id="magic-line"></span>')
472						var menu_active_child = menu_active.find(
473							'>a,>span.disable_link,>span.tc-menu-inner'),
474							menu_left = menu_active.position().left,
475							menu_child_left = parseInt(menu_active_child.css('padding-left')),
476							magic = $('#magic-line')
477
478						magic.width(menu_active_child.width()).css('left', Math.round(menu_child_left + menu_left)).data('magic-width', magic.width()).data('magic-left', magic.position().left)
479
480					} else {
481						var first_menu = $(
482							'#masthead .navbar-nav>li.menu-item:first-child')
483						first_menu.before('<span id="magic-line"></span>')
484						var magic = $('#magic-line')
485						magic.data('magic-width', 0)
486					}
487
488					var nav_H = parseInt($('.site-header .navigation').outerHeight())
489					magic.css('bottom', nav_H - (nav_H - 90) / 2 - 64)
490					if ($headerLayout.hasClass('item_menu_active_top')) {
491						magic.css('bottom', nav_H - 2)
492					}
493					$('#masthead .navbar-nav>li.menu-item').on({
494						'mouseenter': function () {
495							var elem = $(this).find('>a,>span.disable_link,>span.tc-menu-inner'),
496								new_width = elem.width(),
497								parent_left = elem.parent().position().left,
498								left = parseInt(elem.css('padding-left'))
499							if (!magic.data('magic-left')) {
500								magic.css('left', Math.round(parent_left + left))
501								magic.data('magic-left', 'auto')
502							}
503							magic.stop().animate({
504								left : Math.round(parent_left + left),
505								width: new_width,
506							})
507						},
508						'mouseleave': function () {
509							magic.stop().animate({
510								left : magic.data('magic-left'),
511								width: magic.data('magic-width'),
512							})
513						},
514					})
515				}
516			}
517
518            if (!$headerLayout.hasClass('noline_menu_active')) {
519                magicLine()
520            }
521
522			var subMenuPosition = function (menuItem) {
523				var $menuItem = menuItem,
524					$container = $menuItem.closest('.container, .header_full'),
525					$subMenu = $menuItem.find('>.sub-menu'),
526					$menuItemWidth = $menuItem.width(),
527					$containerWidth = $container.width(),
528					$subMenuWidth = $subMenu.width(),
529					$subMenuDistance = $subMenuWidth / 2,
530					paddingContainer = 15
531
532			}
533		},
534
535		thim_carousel: function ($scope) {
536			if (jQuery().owlCarousel) {
537				$('.thim-gallery-images').owlCarousel({
538					autoplay   : false,
539					singleItem : true,
540					stopOnHover: true,
541				 	dots : true,
542					autoHeight : false,
543					loop: true,
544					loadedClass: 'owl-loaded owl-carousel',
545				})
546
547				$('.thim-carousel-wrapper').each(function () {
548					var item_visible = $(this).data('visible') ? parseInt(
549						$(this).data('visible')) : 4,
550						item_desktopsmall = $(this).data('desktopsmall') ? parseInt(
551							$(this).data('desktopsmall')) : item_visible,
552						itemsTablet = $(this).data('itemtablet') ? parseInt(
553							$(this).data('itemtablet')) : 2,
554						itemsMobile = $(this).data('itemmobile') ? parseInt(
555							$(this).data('itemmobile')) : 1,
556						pagination = !!$(this).data('pagination'),
557						navigation = !!$(this).data('navigation'),
558						autoplay = $(this).data('autoplay') ? parseInt(
559							$(this).data('autoplay')) : false,
560						navigation_text = ($(this).data('navigation-text') &&
561							$(this).data('navigation-text') === '2') ? [
562							'<i class=\'fa fa-long-arrow-left \'></i>',
563							'<i class=\'fa fa-long-arrow-right \'></i>',
564						] : [
565							'<i class=\'fa fa-chevron-left \'></i>',
566							'<i class=\'fa fa-chevron-right \'></i>',
567						]
568
569					$(this).owlCarousel({
570						items            : item_visible,
571						// itemsDesktop     : [1200, item_visible],
572						// itemsDesktopSmall: [1024, item_desktopsmall],
573						// itemsTablet      : [768, itemsTablet],
574						// itemsMobile      : [480, itemsMobile],
575						nav       : navigation,
576						dots       : pagination,
577						loop: true,
578						// dots       : true,
579						loadedClass: 'owl-loaded owl-carousel',
580						navContainerClass: 'owl-nav owl-buttons',
581						dotsClass :'owl-dots owl-pagination',
582						dotClass:'owl-page',
583						responsive:{
584							0:{
585								items:itemsMobile,
586								dots: true,
587								nav: false
588							},
589							480:{
590								items:itemsTablet
591							},
592 							1024:{
593								items:item_desktopsmall
594							},
595							1200:{
596								items:item_visible
597							}
598						},
599
600
601						lazyLoad         : true,
602						autoplay         : autoplay,
603						navText   : navigation_text,
604						afterAction      : function () {
605							var width_screen = $(window).width()
606							var width_container = $('#main-home-content').width()
607							var elementInstructorCourses = $('.thim-instructor-courses')
608							var button_full_left = $('.thim_full_right.thim-event-layout-6')
609							if (button_full_left.length) {
610								var full_left = (jQuery(window).width() - button_full_left.width()) / 2;
611								button_full_left.find('.owl-controls .owl-buttons').css("margin-left", "-" + full_left + "px")
612								button_full_left.find('.owl-controls .owl-buttons').css({
613									'margin-left' : '-' + full_left + 'px',
614									'padding-left': full_left + 'px',
615									'margin-right': full_left + 'px',
616								})
617							}
618							if (elementInstructorCourses.length) {
619								if (width_screen > width_container) {
620									var margin_left_value = (width_screen - width_container) / 2
621									$('.thim-instructor-courses .thim-course-slider-instructor .owl-controls .owl-buttons').css('left', margin_left_value + 'px')
622								}
623							}
624						}
625					})
626					// Wrap around nav & dots
627					$(this).each(function(index) {
628						$(this).find('.owl-nav, .owl-dots').wrapAll("<div class='owl-controls'></div>");
629					});
630				})
631
632				$('.thim-course-slider-instructor').each(function () {
633					var item_visible = $(this).data('visible') ? parseInt(
634						$(this).data('visible')) : 4,
635						item_desktopsmall = $(this).data('desktopsmall') ? parseInt(
636							$(this).data('desktopsmall')) : item_visible,
637						itemsTablet = $(this).data('itemtablet') ? parseInt(
638							$(this).data('itemtablet')) : 2,
639						itemsMobile = $(this).data('itemmobile') ? parseInt(
640							$(this).data('itemmobile')) : 1,
641						pagination = !!$(this).data('pagination'),
642						navigation = !!$(this).data('navigation'),
643						autoplay = $(this).data('autoplay') ? parseInt(
644							$(this).data('autoplay')) : false,
645						navigation_text = ($(this).data('navigation-text') &&
646							$(this).data('navigation-text') === '2') ? [
647							'<i class=\'fa fa-long-arrow-left \'></i>',
648							'<i class=\'fa fa-long-arrow-right \'></i>',
649						] : [
650							'<i class=\'fa fa-chevron-left \'></i>',
651							'<i class=\'fa fa-chevron-right \'></i>',
652						]
653
654					$(this).owlCarousel({
655						items            : item_visible,
656						// itemsDesktop     : [1400, item_desktopsmall],
657						// itemsDesktopSmall: [1024, itemsTablet],
658						// itemsTablet      : [768, itemsTablet],
659						// itemsMobile      : [480, itemsMobile],
660						responsive:{
661							0:{
662								items:itemsMobile
663							},
664							480:{
665								items:itemsTablet
666							},
667							1024:{
668								items:itemsTablet
669							},
670							1400:{
671								items:item_desktopsmall
672							}
673						},
674						nav       : navigation,
675						dots       : pagination,
676						loop: true,
677						lazyLoad         : true,
678						autoplay         : autoplay,
679						navigationText   : navigation_text,
680						loadedClass: 'owl-loaded owl-carousel',
681						navContainerClass: 'owl-nav owl-buttons',
682						dotsClass :'owl-dots owl-pagination',
683						dotClass:'owl-page',
684						afterAction      : function () {
685							var width_screen = $(window).width()
686							var width_container = $('#main-home-content').width()
687							var elementInstructorCourses = $('.thim-instructor-courses')
688
689							if (elementInstructorCourses.length) {
690								if (width_screen > width_container) {
691									var margin_left_value = (width_screen - width_container) / 2
692									$('.thim-instructor-courses .thim-course-slider-instructor .owl-controls .owl-buttons').css('left', margin_left_value + 'px')
693								}
694							}
695						}
696					})
697					// Wrap around nav & dots
698					$(this).each(function(index) {
699						$(this).find('.owl-nav, .owl-dots').wrapAll("<div class='owl-control
699s'></div>");
700					});
701				})
702
703				$('.thim-carousel-course-categories .thim-course-slider, .thim-carousel-course-categories-tabs .thim-course-slider').each(function () {
704					var item_visible = $(this).data('visible') ? parseInt($(this).data('visible')) : 7,
705						item_desktop = $(this).data('desktop') ? parseInt($(this).data('desktop')) : item_visible,
706						item_desktopsmall = $(this).data('desktopsmall')
707							? parseInt($(this).data('desktopsmall'))
708							: 6,
709						item_tablet = $(this).data('tablet') ? parseInt($(this).data('tablet')) : 4,
710						item_mobile = $(this).data('mobile') ? parseInt($(this).data('mobile')) : 2,
711						pagination = !!$(this).data('pagination'),
712						navigation = !!$(this).data('navigation'),
713						autoplay = $(this).data('autoplay') ? parseInt($(this).data('autoplay')) : false,
714						is_rtl = $('body').hasClass('rtl')
715
716					$(this).owlCarousel({
717						items            : item_visible,
718						// itemsDesktop     : [1800, item_desktop],
719						// itemsDesktopSmall: [1024, item_desktopsmall],
720						// itemsTablet      : [768, item_tablet],
721						// itemsMobile      : [480, item_mobile],
722						loop: true,
723						responsive:{
724
725							0:{
726								items:item_mobile
727							},
728							480:{
729								items:item_tablet
730							},
731							1024:{
732								items:item_desktopsmall
733							},
734							1800:{
735								items:item_desktop
736							}
737						},
738						nav       : navigation,
739						dots       : pagination,
740						loadedClass: 'owl-loaded owl-carousel',
741						autoplay         : autoplay,
742						navContainerClass: 'owl-nav owl-buttons',
743						dotsClass :'owl-dots owl-pagination',
744						dotClass:'owl-page',
745						navigationText   : [
746							'<i class=\'fa fa-chevron-left \'></i>',
747							'<i class=\'fa fa-chevron-right \'></i>',
748						],
749					})
750					// Wrap around nav & dots
751					$(this).each(function(index) {
752						$(this).find('.owl-nav, .owl-dots').wrapAll("<div class='owl-control
752s'></div>");
753					});
754				})
755			}
756		},
757
758		thim_contentslider: function ($scope) {
759			$('.thim-testimonial-slider').each(function () {
760				var elem = $(this),
761					item_visible = parseInt(elem.data('visible')),
762					item_time = parseInt(elem.data('time')),
763					autoplay = elem.data('auto') ? true : false,
764					item_ratio = elem.data('ratio') ? elem.data('ratio') : 1.18,
765					item_padding = elem.data('padding') ? elem.data('padding') : 15,
766					item_activepadding = elem.data('activepadding') ? elem.data(
767						'activepadding') : 0,
768					item_width = elem.data('width') ? elem.data('width') : 100,
769					mousewheel = !!elem.data('mousewheel')
770				if (jQuery().thimContentSlider) {
771					var testimonial_slider = $(this).thimContentSlider({
772						items            : elem,
773						itemsVisible     : item_visible,
774						mouseWheel       : mousewheel,
775						autoPlay         : autoplay,
776						pauseTime        : item_time,
777						itemMaxWidth     : item_width,
778						itemMinWidth     : item_width,
779						activeItemRatio  : item_ratio,
780						activeItemPadding: item_activepadding,
781						itemPadding      : item_padding,
782					})
783				}
784
785			})
786		},
787
788		counter_box: function () {
789			if (jQuery().waypoint) {
790				jQuery('.counter-box').waypoint(function () {
791					jQuery(this).find('.display-percentage').each(function () {
792						var percentage = jQuery(this).data('percentage')
793						jQuery(this).countTo({
794							from           : 0,
795							to             : percentage,
796							refreshInterval: 40,
797							speed          : 2000,
798						})
799					})
800				}, {
801					triggerOnce: true,
802					offset     : '80%',
803				})
804			}
805		},
806
807		thim_backgroud_gradient: function () {
808			var background_gradient = jQuery('.thim_overlay_gradient')
809			var background_gradient_2 = jQuery('.thim_overlay_gradient_2')
810			if (background_gradient.length) {
811				$('.thim_overlay_gradient rs-sbg-px > rs-sbg-wrap > rs-sbg').addClass('thim-overlayed')
812			}
813
814			if (background_gradient_2.length) {
815				$('.thim_overlay_gradient_2 rs-sbg-px > rs-sbg-wrap > rs-sbg').addClass('thim-overlayed')
816			}
817		},
818
819		thim_single_image_popup: function () {
820			if (jQuery().magnificPopup) {
821				$('.thim-single-image-popup').magnificPopup({
822					type: 'image',
823					zoom: {
824						enabled : true,
825						duration: 300,
826						easing  : 'ease-in-out',
827					}
828				})
829			}
830		},
831
832		full_right: function () {
833			$('.thim_full_right').each(function () {
834				var full_right = (jQuery(window).width() - jQuery(this).width()) / 2;
835				jQuery(this).children().css("margin-right", "-" + full_right + "px");
836			});
837			$('.thim_full_left').each(function () {
838				var full_left = (jQuery(window).width() - jQuery(this).width()) / 2;
839				jQuery(this).children().css("margin-left", "-" + full_left + "px");
840			});
841			$('.thim_coundown_full_left').each(function () {
842				var full_left = (jQuery(window).width() - jQuery(this).width()) / 2;
843				var number =   full_left + 'px';
844				jQuery(this).find('.thim-widget-countdown-box').parent().css({"margin-left": '-' + number, "padding-left": number});
845			});
846		},
847		thim_course_offline_popup_form_register : function() {
848			if ($('#contact-form-registration >.wpcf7').length) {
849				  var el = $('#contact-form-registration >.wpcf7');
850				// 		el_H = el.outerHeight(),
851				// 		win_H = $(window).height();
852				// if (win_H > el_H) {
853				// 	el.css('top', ( win_H - el_H ) / 2);
854				// }
855				el.append('<a href="#" class="thim-close fa fa-times"></a>');
856			}
857			$(document).on('click', '#contact-form-registration .wpcf7-form-control.wpcf7-submit', function () {
858				$(document).on('mailsent.wpcf7', function (event) {
859					setTimeout(function(){
860						$('body').removeClass('thim-contact-popup-active');
861						$('#contact-form-registration').removeClass('active');
862					}, 3000);
863				});
864			});
865			$(document).on('click', '.course-payment .thim-enroll-course-button', function (e) {
866				e.preventDefault();
867				$('body').addClass('thim-contact-popup-active');
868				$('#contact-form-registration').addClass('active');
869			});
870
871			$(document).on('click', '#contact-form-registration', function (e) {
872				if ($(e.target).attr('id') == 'contact-form-registration') {
873					$('body').removeClass('thim-contact-popup-active');
874					$('#contact-form-registration').removeClass('active');
875				}
876			});
877
878			$(document).on('click', '#contact-form-registration .thim-close', function (e) {
879				e.preventDefault();
880				$('body').removeClass('thim-contact-popup-active');
881				$('#contact-form-registration').removeClass('active');
882			});
883		},
884		course_sidebar_right_offset_top : function(){
885			var elementInfoTop = $('.course-info-top');
886			if(elementInfoTop.length){
887				var InfoTopHeight = elementInfoTop.innerHeight(),
888					elementInfoRight = $('.thim-style-content-layout_style_3 .sticky-sidebar');
889				elementInfoRight.css('margin-top', '-' + ( InfoTopHeight - 20 ) + 'px' );
890			}
891		}
892	}
893
894	$(document).ready(function () {
895		thim_eduma.ready();
896
897		$(window).resize(function () {
898			thim_eduma.resize()
899		})
900
901	})
902
903	$(window).on('load', function () {
904		thim_eduma.load();
905	})
906
907    $(window).on('elementor/frontend/init', function() {
908        elementorFrontend.hooks.addAction('frontend/element_ready/thim-carousel-post.default',
909            thim_eduma.thim_carousel)
910        elementorFrontend.hooks.addAction('frontend/element_ready/thim-twitter.default',
911            thim_eduma.thim_carousel)
912
913        elementorFrontend.hooks.addAction('frontend/element_ready/thim-courses.default',
914            thim_eduma.thim_carousel);
915
916        elementorFrontend.hooks.addAction('frontend/element_ready/thim-list-event.default',
917            thim_eduma.thim_carousel);
918
919        elementorFrontend.hooks.addAction('frontend/element_ready/thim-course-categories.default',
920            thim_eduma.thim_carousel)
921
922        elementorFrontend.hooks.addAction('frontend/element_ready/thim-our-team.default',
923            thim_eduma.thim_carousel)
924
925        elementorFrontend.hooks.addAction('frontend/element_ready/thim-gallery-images.default',
926            thim_eduma.thim_carousel)
927
928        elementorFrontend.hooks.addAction('frontend/element_ready/thim-list-instructors.default',
929            thim_eduma.thim_carousel)
930
931        elementorFrontend.hooks.addAction('frontend/element_ready/thim-testimonials.default',
932            thim_eduma.thim_carousel)
933
934        elementorFrontend.hooks.addAction('frontend/element_ready/thim-courses-collection.default',
935            thim_eduma.thim_carousel)
936
937        elementorFrontend.hooks.addAction('frontend/element_ready/thim-testimonials.default',
938            thim_eduma.thim_contentslider)
939
940        elementorFrontend.hooks.addAction('frontend/element_ready/thim-counters-box.default',
941            thim_eduma.counter_box)
942
943        elementorFrontend.hooks.addAction('frontend/element_ready/global', function($scope) {
944            var $carousel = $scope.find('.owl-carousel')
945            if ($carousel.length) {
946                var carousel = $carousel.data('owlCarousel')
947                carousel && carousel.reload()
948            }
949        })
950
951    })
952})(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.