PageSourceSearch

https://ivydene.co.uk/wp-content/themes/medilink/assets/js/main.js?ver=2.0.7

js ivydene.co.uk collected 2026-10-05 23:51:23 UTC 23,866 bytes, 847 lines download raw bytes

1jQuery(document).ready(function ($) {
2	"use strict";
3
4	function alignModal() {
5		var modalDialog = $(this).find(".modal-dialog");
6		// Applying the top margin on modal dialog to align it vertically center
7		modalDialog.css("margin-top", Math.max(0, ($(window).height() - modalDialog.height()) / 2));
8	}
9
10	// Align modal when it is displayed
11	$(".modal").on("shown.bs.modal", alignModal);
12
13	// Align modal when user resize the window
14	$(window).on("resize", function () {
15		$(".modal:visible").each(alignModal);
16	});
17
18	var a = $('.offscreen-navigation .menu');
19	if (a.length) {
20		$(".menu-item-has-children").append("<span></span>");
21		$(".page_item_has_children").append("<span></span>");
22
23		a.children("li").addClass("menu-item-parent");
24
25		$('.menu-item-has-children > span').on('click', function () {
26			$(this).siblings('a').first().toggleClass('opened');
27			var _self = $(this),
28				sub_menu = _self.parent().find('>.sub-menu');
29			if (_self.hasClass('open')) {
30				sub_menu.slideUp();
31				_self.removeClass('open');
32			} else {
33				sub_menu.slideDown();
34				_self.addClass('open');
35			}
36		});
37		$('.page_item_has_children > span').on('click', function () {
38			var _self = $(this),
39				sub_menu = _self.parent().find('>.children');
40			if (_self.hasClass('open')) {
41				sub_menu.slideUp();
42				_self.removeClass('open');
43			} else {
44				sub_menu.slideDown();
45				_self.addClass('open');
46			}
47		});
48
49		$('.offscreen-navigation .menu-item-parent > a, .offscreen-navigation .menu-item-has-children a').on('click', function () {
50			setTimeout(function () {
51				$('.mean-bar .sidebarBtn').trigger('click');
52			}, 300)
53		});
54	}
55
56	$('.mean-bar .sidebarBtn').on('click', function (e) {
57		e.preventDefault();
58		if ($('.rt-slide-nav').is(":visible")) {
59			$('.rt-slide-nav').slideUp();
60			$('body').removeClass('slidemenuon');
61		} else {
62			$('.rt-slide-nav').slideDown();
63			$('body').addClass('slidemenuon');
64		}
65	});
66
67	$("body").mouseover(function (el) {
68		if ($(window).width() <= 1400) {
69			if (el.pageY <= 11000) {
70				$('.class-schedule-wrap1 table tbody tr td .schedule-item-wrapper:hover .media').css('bottom', 'calc(100% - 150px)')
71			} else {
72				$('.class-schedule-wrap1 table tbody tr td .schedule-item-wrapper:hover .media').css('bottom', 'calc(100% + 15px)')
73			}
74		}
75	});
76
77	$('#site-navigation').navpoints({
78		updateHash: true
79	});
80
81	$('.rt-content, .rt-sidebar').theiaStickySidebar({
82		// Settings
83		additionalMarginTop: 200,
84		additionalMarginBottom: 200
85	});
86
87	//*loadmore ajax*/
88	$('.departments_info').on('click', 'a.departments_title', function (e) {
89		e.preventDefault();
90		var _this = $(this),
91			id = _this.data('id'),
92			target = _this.parents('#department-lode-area').find('.sigle-department-data');
93
94		$.ajax({
95			url: medilinkObj.ajaxurl,
96			data: { action: 'rt_single_department', id: id },
97			type: 'POST',
98			beforeSend: function () {
99				target.find('.loading').fadeIn('slow');
100			},
101			success: function (resp) {
102				target.find('.loading').fadeOut('slow');
103				target.html(resp.html);
104			},
105			error: function (e) {
106			}
107		});
108		return false;
109	});
110
111	$('.loadmore').on('click', 'a.rt-loadmore', function (e) {
112		e.preventDefault();
113		var _this = $(this),
114			container = _this.parents('.rt-departments'),
115			wtgetData = container.data("settings"),
116			paged = container.attr('data-paged'),
117			contentWrap = container.find('.menu-list'),
118			loadmore = container.find('.loadmore'),
119			loadmorebtntxt = loadmore.find('a').text();
120		$.ajax({
121			url: medilinkObj.ajaxurl,
122			data: { action: 'rt_loadmore_department', data: wtgetData, page: parseInt(paged, 10) },
123			type: 'POST',
124			beforeSend: function () {
125				loadmore.find('a').text(medilinkObj.loading);
126			},
127			success: function (resp) {
128				console.log(resp);
129				container.attr('data-paged', parseInt(resp.page));
130				if (resp.remaining) {
131					loadmore.find('a').text(loadmorebtntxt);
132				} else {
133					loadmore.find('a').text(medilinkObj.no_more).attr('disabled', true);
134				}
135				var t = $(resp.html)
136				t.find('.rtin-item').addClass('test');
137				contentWrap.append(resp.html);
138			},
139			error: function (e) {
140				console.log(e);
141			}
142		});
143
144	});
145
146	//Doctor Load More
147	$('.loading-button').on('click', 'a.doctor-loadmore', function (e) {
148		e.preventDefault();
149		var _this = $(this),
150			container = _this.parents('.rt-doctor'),
151			wtgetData = container.data("settings"),
152			paged = container.attr('data-paged'),
153			contentWrap = container.find('.doctor-list'),
154			loadmore = container.find('.loading-button'),
155			loadmorebtntxt = loadmore.find('a').text();
156		$.ajax({
157			url: medilinkObj.ajaxurl,
158			data: { action: 'rt_loadmore_doctor', data: wtgetData, page: parseInt(paged, 10) },
159			type: 'POST',
160			beforeSend: function () {
161				loadmore.find('a').text(medilinkObj.loading);
162			},
163			success: function (resp) {
164				console.log(resp);
165				container.attr('data-paged', parseInt(resp.page));
166				if (resp.remaining) {
167					loadmore.find('a').text(loadmorebtntxt);
168				} else {
169					loadmore.find('a').text(medilinkObj.no_more).attr('disabled', true);
170				}
171				var t = $(resp.html)
172				t.find('.rtin-item').addClass('test');
173				contentWrap.append(resp.html);
174			},
175			error: function (e) {
176				console.log(e);
177			}
178		});
179
180	});
181
182	//Header Search
183	$('a[href="#header-search"]').on("click", function (event) {
184		event.preventDefault();
185		$("#header-search").addClass("open");
186		$('#header-search > form > input[type="search"]').focus();
187	});
188
189	$("#header-search, #header-search button.close").on("click keyup", function (event) {
190		if (
191			event.target === this ||
192			event.target.className === "close" ||
193			event.keyCode === 27
194		) {
195			$(this).removeClass("open");
196		}
197	});
198
199	/* Scroll to top */
200	$('.scrollToTop, .scrollToToptext').on('click', function () {
201		$('html, body').animate({ scrollTop: 0 }, 800);
202		return false;
203	});
204	$(window).scroll(function () {
205		if ($(this).scrollTop() > 100) {
206			$('.scrollToTop, .scrollToToptext').fadeIn();
207		} else {
208			$('.scrollToTop, .scrollToToptext').fadeOut();
209		}
210	});
211
212	/* Search Box */
213	$(".search-box-area").on('click', '.search-button, .search-close', function (event) {
214		event.preventDefault();
215		if ($('.search-text').hasClass('active')) {
216			$('.search-text, .search-close').removeClass('active');
217		}
218		else {
219			$('.search-text, .search-close').addClass('active');
220		}
221		return false;
222	});
223
224	/*-------------------------------------
225	Menu fixded
226	-------------------------------------*/
227	if ($('header .header-main').length && $('header .header-main').hasClass('header-sticky')) {
228		var header_position = $('header .header-main').offset(),
229			lastScroll = 100;
230		$(window).on('scroll load', function (event) {
231			var st = $(this).scrollTop();
232			if (st > header_position.top) {
233				($(".header-table").length) ? $('header .header-table').addClass("header-fixed") : $('header .header-main').addClass("header-fixed");
234			} else {
235				($(".header-table").length) ? $('header .header-table').removeClass("header-fixed") : $('header .header-main').removeClass("header-fixed");
236			}
237			if (st > lastScroll && st > header_position.top) {
238				($(".header-table").length) ? $('header .header-table').addClass("hidden-menu") : $('header .header-main').addClass("hidden-menu");
239			} else if (st <= lastScroll) {
240				($(".header-table").length) ? $('header .header-table').removeClass("hidden-menu") : $('header .header-main').removeClass("hidden-menu");
241			}
242			lastScroll = st;
243			if (st === 0) {
244				($(".header-table").length) ? $('header .header-table').removeClass("header-fixed") : $('header .header-main').removeClass("header-fixed");
245			}
246		});
247	}
248
249	var makeSticky = function () {
250		if ($(".masthead-container").length > 0) {
251			var stc = $(".site-content ");
252			var out = $(".site-header");
253			var headertop = $(".header-top-bar");
254			var s = $(".masthead-container");
255			var sw = $(".non-trheader .site-wrp");
256			var pos = stc.position();
257			var tHeight = out.outerHeight();
258			$(window).scroll(function () {
259				var windowpos = $(window).scrollTop();
260				if (windowpos >= pos.top + 1) {
261					//s.removeClass("animated fadeIn");
262					sw.removeClass("opt-slideInUp");
263					s.addClass("stick animated slideInDown");
264					sw.addClass("opt-slideInUp");
265					sw.css('padding-top', tHeight + 'px');
266					headertop.addClass("animated slideInDown");
267				} else {
268					s.removeClass("stick animated slideInDown");
269					//s.addClass("animated slideInUp");
270					sw.removeClass("opt-slideInUp");
271					headertop.removeClass("animated slideInDown");
272					//s.addClass("animated fadeIn");
273					sw.css('padding-top', 0);
274				}
275			});
276		}
277	}
278	if ($('body').hasClass('non-stick')) {
279		makeSticky();
280	}
281
282
283	/* MeanMenu - Mobile Menu */
284	/*$('#site-navigation nav').meanmenu({
285	meanMenuContainer: '#meanmenu',
286	meanScreenWidth: medilinkObj.meanWidth,
287	removeElements: "#masthead",
288	siteLogo: medilinkObj.siteLogo
289	});
290	*/
291
292	/* Header Right Menu */
293	$('.additional-menu-area').on('click', '.side-menu-trigger', function (e) {
294		e.preventDefault();
295		var width = $('.sidenav').width();
296		if (width == 280) {
297			$('.sidenav').width(0);
298		}
299		else {
300			$('.sidenav').width(280);
301		}
302	});
303	$('.additional-menu-area').on('click', '.closebtn', function (e) {
304		e.preventDefault();
305		$('.sidenav').width(0);
306	});
307
308	/* Mega Menu */
309	$('.site-header .main-navigation ul > li.mega-menu').each(function () {
310		// total num of columns
311		var items = $(this).find(' > ul.sub-menu > li').length;
312		// screen width
313		var bodyWidth = $('body').outerWidth();
314		// main menu link width
315		var parentLinkWidth = $(this).find(' > a').outerWidth();
316		// main menu position from left
317		var parentLinkpos = $(this).find(' > a').offset().left;
318
319		var width = items * 220;
320		var left = (width / 2) - (parentLinkWidth / 2);
321
322		var linkleftWidth = parentLinkpos + (parentLinkWidth / 2);
323		var linkRightWidth = bodyWidth - (parentLinkpos + parentLinkWidth);
324
325		// exceeds left screen
326		if ((width / 2) > linkleftWidth) {
327			$(this).find(' > ul.sub-menu').css({
328				width: width + 'px',
329				right: 'inherit',
330				left: '-' + parentLinkpos + 'px'
331			});
332		}
333		// exceeds right screen
334		else if ((width / 2) > linkRightWidth) {
335			$(this).find(' > ul.sub-menu').css({
336				width: width + 'px',
337				left: 'inherit',
338				right: '-' + linkRightWidth + 'px'
339			});
340		}
341		else {
342			$(this).find(' > ul.sub-menu').css({
343				width: width + 'px',
344				left: '-' + left + 'px'
345			});
346		}
347	});
348	// Scripts needs loading inside content area
349	rdtheme_content_ready_scripts();
350	/* WooCommerce */
351	rdtheme_wc_scripts($);
352	rdtheme_imgslider_scripts($);
353
354});
355
356(function ($) {
357	"use strict";
358
359	/*-------------------------------------
360	 Select2 activation code
361	 -------------------------------------*/
362	$(document).ready(function() {
363		if ($('select.select2').length) {
364			$('select.select2').select2({
365				theme: 'classic',
366				dropdownAutoWidth: true,
367				width: '100%'
368			});
369		}
370	});
371
372	// Window Load+Resize
373	$(window).on('load resize', function () {
374		// Define the maximum height for mobile menu
375		var wHeight = $(window).height();
376		wHeight = wHeight - 50;
377		$('.mean-nav > ul').css('max-height', wHeight + 'px');
378	});
379
380	// Window Load
381	$(window).on('load', function () {
382		// Owl Slider
383		rdtheme_content_load_scripts();
384		// Preloader
385		$('#preloader').fadeOut('slow', function () {
386			$(this).remove();
387		});
388		rdtheme_imgslider_scripts();
389	});
390	// Slider Resize
391	$(window).on('resize', function () {
392		rdtheme_slider_fullscreen();
393		rdtheme_imgslider_scripts();
394	});
395
396	// Sticky Menu Resize
397	$(window).on('resize', function () {
398		if ($(".masthead-container").length > 0) {
399			var s = $(".masthead-container");
400			var sw = $(".site-wrp");
401			var pos = s.position();
402			var tHeight = s.outerHeight();
403			$(window).scroll(function () {
404				var windowpos = $(window).scrollTop();
405				if (windowpos >= pos.top + 1) {
406					s.removeClass("slideInUp");
407					sw.removeClass("opt-slideInUp");
408					s.addClass("stick animated slideInDown");
409					sw.addClass("opt-slideInUp");
410					//sw.css('padding-top', tHeight + 'px');				
411				} else {
412					s.removeClass("stick animated slideInDown");
413					sw.removeClass("opt-slideInUp");
414					s.addClass("animated slideInUpCustonAnimetion");
415					//sw.css('padding-top', 0);
416				}
417			});
418		}
419
420	});
421
422	// Elementor
423	$(window).on('elementor/frontend/init', function () {
424		if (elementorFrontend.isEditMode()) {
425			elementorFrontend.hooks.addAction('frontend/element_ready/widget', function () {
426				rdtheme_content_ready_scripts()
427				rdtheme_content_load_scripts();
428				rdtheme_imgslider_scripts();
429
430			});
431		}
432	});
433
434})(jQuery);
435
436
437function rdtheme_content_ready_scripts() {
438	var $ = jQuery;
439
440	/* Counter */
441	if (typeof $.fn.counterUp == 'function') {
442		$('.rt-el-counter .rt-counter-num').counterUp({
443			delay: $(this).data('rtsteps'),
444			time: $(this).data('rtspeed')
445		});
446	}
447
448	/*-------------------------------------
449	Tween-Max
450	-------------------------------------*/
451
452	$(".motion-effects-wrap").mousemove(function (e) {
453		parallaxIt(e, ".motion-effects1", -100);
454		parallaxIt(e, ".motion-effects2", -200);
455		parallaxIt(e, ".motion-effects3", 100);
456		parallaxIt(e, ".motion-effects4", 200);
457		parallaxIt(e, ".motion-effects5", -50);
458		parallaxIt(e, ".motion-effects6", 50);
459	});
460	function parallaxIt(e, target_class, movement) {
461		let $wrap = $(e.target).parents(".motion-effects-wrap");
462		if (!$wrap.length) return;
463		let $target = $wrap.find(target_class);
464		let relX = e.pageX - $wrap.offset().left;
465		let relY = e.pageY - $wrap.offset().top;
466		TweenMax.to($target, 1, {
467			x: ((relX - $wrap.width() / 2) / $wrap.width()) * movement,
468			y: ((relY - $wrap.height() / 2) / $wrap.height()) * movement,
469		});
470	}
471
472	/* Slider */
473	if (typeof $.fn.nivoSlider == 'function') {
474		$('.rt-nivoslider').nivoSlider({
475			effect: 'boxRainReverse',
476			slices: 15,
477			boxCols: 8,
478			boxRows: 4,
479			animSpeed: 500,
480			pauseTime: 3000,
481			startSlide: 0,
482			directionNav: true,
483			controlNav: true,
484			controlNavThumbs: false,
485			pauseOnHover: false,
486			manualAdvance: true,
487			prevText: '',
488			nextText: '',
489			randomStart: false,
490			beforeChange: function () { },
491			afterChange: function () { },
492			slideshowEnd: function () { },
493			lastSlide: function () { },
494			afterLoad: function () { }
495		});
496		rdtheme_slider_fullscreen();
497	}
498}
499
500function rdtheme_content_load_scripts() {
501	var $ = jQuery;
502
503	//Parallax Scene for Icons
504	if ($('.parallax-scene-1').length) {
505		var scene = $('.parallax-scene-1').get(0);
506		var parallaxInstance = new Parallax(scene);
507	}
508	if ($('.parallax-scene-2').length) {
509		var scene = $('.parallax-scene-2').get(0);
510		var parallaxInstance = new Parallax(scene);
511	}
512	if ($('.parallax-scene-3').length) {
513		var scene = $('.parallax-scene-3').get(0);
514		var parallaxInstance = new Parallax(scene);
515	}
516
517	if ($('.rt-paroller').length) {
518		$('.rt-paroller').paroller({
519		});
520	}
521
522	//Slick Carousel 
523	var slickOptions1 = {
524		slidesToShow: 1,
525		slidesToScroll: 1,
526		arrows: true,
527		autoplay: false,
528		asNavFor: '.carousel-nav',
529		prevArrow: '<span class="slick-prev slick-navigation"><i class="fa fa-angle-left" aria-hidden="true"></i></span>',
530		nextArrow: '<span class="slick-next slick-navigation"><i class="fa fa-angle-right" aria-hidden="true"></i></span>'
531	}
532	var slickOptions2 = {
533		slidesToShow: 5,
534		slidesToScroll: 1,
535		asNavFor: '.carousel-content',
536		dots: false,
537		arrows: true,
538		centerPadding: '0px',
539		focusOnSelect: true,
540		responsive: [{
541			breakpoint: 991,
542			settings: {
543				slidesToShow: 3,
544				slidesToScroll: 1
545			}
546		}, {
547			breakpoint: 767,
548			settings: {
549				slidesToShow: 3,
550				slidesToScroll: 1
551			}
552		}, {
553			breakpoint: 479,
554			settings: {
555				slidesToShow: 1,
556				slidesToScroll: 1
557			}
558		}]
559	}
560
561	if (medilinkObj.rtl == 'yes') {
562		// options 1
563		slickOptions1.rtl = true;
564		slickOptions1.prevArrow = '<span class="slick-prev slick-navigation"><i class="fa fa-angle-right" aria-hidden="true"></i></span>';
565		slickOptions1.nextArrow = '<span class="slick-next slick-navigation"><i class="fa fa-angle-left" aria-hidden="true"></i></span>';
566
567		// options 2
568		slickOptions2.rtl = true;
569
570	}
571	//console.log('slickOptions2', slickOptions2);
572	var SlickCarousel = $('.slick-carousel-wrap');
573
574	if (SlickCarousel.length) {
575		SlickCarousel.find('.carousel-content').slick(slickOptions1);
576		SlickCarousel.find('.carousel-nav').slick(slickOptions2);
577	}
578
579	var slickRtl = false;
580	if (medilinkObj.rtl == 'yes') {
581		var slickRtl = true;
582	}
583	$(".slider-for").not('.slick-initialized').slick({
584		rtl: slickRtl,
585		slidesToShow: 1,
586		slidesToScroll: 1,
587		arrows: false,
588		asNavFor: ".slider-nav",
589		transformEnabled: false,
590	});
591	$(".slider-nav").not('.slick-initialized').slick({
592		slidesToShow: 4,
593		slidesToScroll: 1,
594		asNavFor: ".slider-for",
595		dots: false,
596		arrows: true,
597		centerMode: false,
598		focusOnSelect: true,
599	});
600
601
602	/*-------------------------------------
603	   Masonry
604	   -------------------------------------*/
605	var galleryIsoContainer = $('.no-equal-gallery');
606	if (galleryIsoContainer.length) {
607		var blogGallerIso = galleryIsoContainer.imagesLoaded(function () {
608			blogGallerIso.isotope({
609				itemSelector: '.no-equal-item',
610				masonry: {
611					columnWidth: '.no-equal-item'
612				}
613			});
614		});
615	}
616
617	/*-------------------------------------
618   Popup
619   -------------------------------------*/
620	var yPopup = $(".popup-youtube");
621	if (yPopup.length) {
622		yPopup.magnificPopup({
623			disableOn: 700,
624			type: 'iframe',
625			mainClass: 'mfp-fade',
626			removalDelay: 160,
627			preloader: false,
628			fixedContentPos: false
629		});
630	}
631	if ($('.zoom-gallery').length) {
632		$('.zoom-gallery').each(function () { // the containers for all your galleries
633			$(this).magnificPopup({
634				delegate: 'a.ne-zoom', // the selector for gallery item
635				type: 'image',
636				gallery: {
637					enabled: true
638				}
639			});
640		});
641	}
642
643	/* Owl Slider */
644	if (typeof $.fn.owlCarousel == 'function') {
645
646		$(".owl-custom-nav .owl-next").on('click', function () {
647			$(this).closest('.owl-wrap').find('.owl-carousel').trigger('next.owl.carousel');
648		});
649		$(".owl-custom-nav .owl-prev").on('click', function () {
650			$(this).closest('.owl-wrap').find('.owl-carousel').trigger('prev.owl.carousel');
651		});
652
653		$(".rt-owl-carousel").each(function () {
654			var options = $(this).data('carousel-options');
655			if (medilinkObj.rtl == 'yes') {
656				options['rtl'] = true; //@rtl
657				options['navText'] = ["<i class='fa fa-angle-right'></i>", "<i class='fa fa-angle-left'></i>"];
658			}
659			$(this).owlCarousel(options);
660		});
661	}
662
663	/* Isotope */
664	/* var $grid = $('.rt-masonry-grid').imagesLoaded( function() {
665	 $grid.masonry({
666			 // set itemSelector so .grid-sizer is not used in layout
667			 itemSelector: '.rt-grid-item',
668			 // use element for option
669			 columnWidth: '.rt-grid-sizer',
670			 percentPosition: true
671		 });
672	 });*/
673
674
675
676
677	if (typeof $.fn.isotope == 'function') {
678		var $rtGalleryContainer = $('.rt-isotope-wrapper .rt-isotope-content');
679		$rtGalleryContainer.isotope({
680			filter: '*',
681			animationOptions: {
682				duration: 750,
683				easing: 'linear',
684				queue: false
685			}
686		});
687
688		$('.rt-isotope-tab a').on('click', function () {
689			var $parent = $(this).closest('.rt-isotope-wrapper'),
690				selector = $(this).attr('data-filter');
691
692			$parent.find('.rt-isotope-tab .current').removeClass('current');
693			$(this).addClass('current');
694			$isotope_instance = $parent.find('.rt-isotope-content').isotope({
695				filter: selector,
696				getSortData: {
697					custom_order: '[data-custom_order]', // value of attribute   
698				},
699				animationOptions: {
700					duration: 750,
701					easing: 'linear',
702					queue: false
703				}
704			});
705			//console.log('isotope_instance', $isotope_instance);			
706			setTimeout(function () {
707				$isotope_instance.isotope({ sortBy: 'custom_order' });
708			}, 500)
709
710			return false;
711		});
712	}
713
714
715
716	/*
717		if (typeof $.fn.isotope == 'function') {
718			var $rtGalleryContainer = $('.rt-isotope-wrapper .rt-isotope-content');
719			$rtGalleryContainer.isotope({
720				filter: '*',
721				animationOptions: {
722					duration: 750,
723					easing: 'linear',
724					queue: false
725				}
726			});
727	
728			$('.rt-isotope-tab a').on('click',function(){
729				var $parent = $(this).closest('.rt-isotope-wrapper'),
730				selector = $(this).attr('data-filter');
731	
732				$parent.find('.rt-isotope-tab .current').removeClass('current');
733				$(this).addClass('current');     
734				$parent.find('.rt-isotope-content').isotope({
735					filter: selector,
736					animationOptions: {
737						duration: 750,
738						easing: 'linear',
739						queue: false
740					}
741				});
742				return false;
743			});    	
744		}*/
745}
746
747function rdtheme_wc_scripts($) {
748	/* Shop change view */
749	$('#shop-view-mode li a').on('click', function () {
750		$('body').removeClass('product-grid-view').removeClass('product-list-view');
751
752		if ($(this).closest('li').hasClass('list-view-nav')) {
753			$('body').addClass('product-list-view');
754			Cookies.set('shopview', 'list');
755		}
756		else {
757			$('body').addClass('product-grid-view');
758			Cookies.remove('shopview');
759		}
760		return false;
761	});
762
763
764}
765
766function rdtheme_slider_fullscreen() {
767	var $ = jQuery;
768	$('.rt-el-slider').each(function () {
769		var width = $(window).width(),
770			left = $(this).offset().left,
771			$container = $(this).find('.rt-nivoslider');
772		if (width < 1921) {
773			$container.css('margin-left', -left).width(width);
774		}
775		else {
776			leftAlt = left - (width - 1920) / 2;
777			$container.css('margin-left', -leftAlt).width(1920);
778		}
779		$container.css('opacity', 1);
780	});
781}
782
783
784function rdtheme_imgslider_scripts($) {
785	var $ = jQuery;
786
787	if ($('.rt-thumbnails-owl-carousel').length) {
788
789
790		if (!$.fn.owlCarousel) {
791			return;
792		}
793
794		var thumbnail_owl_carousel = jQuery(".thumbnails-owl-carousel");
795
796		var rtltrue = false;
797		if (medilinkObj.rtl == 'yes') {
798			rtltrue = true;
799		}
800		if (thumbnail_owl_carousel) {
801			thumbnail_owl_carousel.owlCarousel({
802				items: 1,
803				rtl: rtltrue
804			});
805		}
806
807
808		// 1) ASSIGN EACH 'DOT' A NUMBER
809		dotcount = 1;
810		jQuery('.thumbnails-owl-carousel .owl-dot').each(function () {
811			jQuery(this).addClass('dotnumber' + dotcount);
812			jQuery(this).attr('data-info', dotcount);
813			dotcount = dotcount + 1;
814		});
815
816		// 2) ASSIGN EACH 'SLIDE' A NUMBER
817		slidecount = 1;
818
819		jQuery('.thumbnails-owl-carousel .owl-item').not('.cloned').each(function () {
820			jQuery(this).addClass('slidenumber' + slidecount);
821			slidecount = slidecount + 1;
822		});
823
824		// SYNC THE SLIDE NUMBER IMG TO ITS DOT COUNTERPART (E.G SLIDE 1 IMG TO DOT 1 BACKGROUND-IMAGE)
825		jQuery('.thumbnails-owl-carousel .owl-dot').each(function () {
826
827			grab = jQuery(this).data('info');
828
829			slidegrab = jQuery('.slidenumber' + grab + ' img').attr('src');
830			console.log(slidegrab);
831
832			jQuery(this).css("background-image", "url(" + slidegrab + ")");
833
834		});
835
836		// THIS FINAL BIT CAN BE REMOVED AND OVERRIDEN WITH YOUR OWN CSS OR FUNCTION, I JUST HAVE IT
837		// TO MAKE IT ALL NEAT 
838		amount = jQuery('.thumbnails-owl-carousel .owl-dot').length;
839		gotowidth = 100 / amount;
840
841		jQuery('.thumbnails-owl-carousel .owl-dot').css("width", gotowidth + "%");
842		newwidth = jQuery('.thumbnails-owl-carousel .owl-dot').width();
843		jQuery('.thumbnails-owl-carousel .owl-dot').css("height", newwidth + "px");
844
845
846	}
847}

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.