PageSourceSearch

https://medicinecollege.uoanbar.edu.iq/js/script.js

js uoanbar.edu.iq collected 2026-10-02 06:31:00 UTC 6,826 bytes, 268 lines download raw bytes

1jQuery(function ($) {
2	'use strict';
3
4	/* ----------------------------------------------------------- */
5	/*  Fixed header
6	/* ----------------------------------------------------------- */
7	$(window).on('scroll', function () {
8
9		// fixedHeader on scroll
10		function fixedHeader() {
11			var headerTopBar = $('.top-bar').outerHeight();
12			var headerOneTopSpace = $('.header-one .logo-area').outerHeight();
13
14			var headerOneELement = $('.header-one .site-navigation');
15			var headerTwoELement = $('.header-two .site-navigation');
16
17			if ($(window).scrollTop() > headerTopBar + headerOneTopSpace) {
18				$(headerOneELement).addClass('navbar-fixed');
19				$('.header-one').css('margin-bottom', headerOneELement.outerHeight());
20			} else {
21				$(headerOneELement).removeClass('navbar-fixed');
22				$('.header-one').css('margin-bottom', 0);
23			}
24			if ($(window).scrollTop() > headerTopBar) {
25				$(headerTwoELement).addClass('navbar-fixed');
26				$('.header-two').css('margin-bottom', headerTwoELement.outerHeight());
27			} else {
28				$(headerTwoELement).removeClass('navbar-fixed');
29				$('.header-two').css('margin-bottom', 0);
30			}
31		}
32		fixedHeader();
33
34
35		// Count Up
36		function counter() {
37			var oTop;
38			if ($('.counterUp').length !== 0) {
39				oTop = $('.counterUp').offset().top - window.innerHeight;
40			}
41			if ($(window).scrollTop() > oTop) {
42				$('.counterUp').each(function () {
43					var $this = $(this),
44						countTo = $this.attr('data-count');
45					$({
46						countNum: $this.text()
47					}).animate({
48						countNum: countTo
49					}, {
50						duration: 1000,
51						easing: 'swing',
52						step: function () {
53							$this.text(Math.floor(this.countNum));
54						},
55						complete: function () {
56							$this.text(this.countNum);
57						}
58					});
59				});
60			}
61		}
62		counter();
63
64
65		// scroll to top btn show/hide
66		function scrollTopBtn() {
67			var scrollToTop = $('#back-to-top'),
68				scroll = $(window).scrollTop();
69			if (scroll >= 50) {
70				scrollToTop.fadeIn();
71			} else {
72				scrollToTop.fadeOut();
73			}
74		}
75		scrollTopBtn();
76	});
77
78
79	$(document).ready(function () {
80
81		// navSearch show/hide
82		function navSearch() {
83			$('.nav-search').on('click', function () {
84				$('.search-block').fadeIn(350);
85			});
86			$('.search-close').on('click', function () {
87				$('.search-block').fadeOut(350);
88			});
89		}
90		navSearch();
91
92		// navbarDropdown
93		function navbarDropdown() {
94			if ($(window).width() < 992) {
95				$('.site-navigation .dropdown-toggle').on('click', function () {
96					$(this).siblings('.dropdown-menu').animate({
97						height: 'toggle'
98					}, 300);
99				});
100
101				var navbarHeight = $('.site-navigation').outerHeight();
102				$('.site-navigation .navbar-collapse').css('max-height', 'calc(100vh - ' + navbarHeight + 'px)');
103			}
104		}
105		navbarDropdown();
106
107
108		// back to top
109		function backToTop() {
110			$('#back-to-top').on('click', function () {
111				$('#back-to-top').tooltip('hide');
112				$('body,html').animate({
113					scrollTop: 0
114				}, 800);
115				return false;
116			});
117		}
118		backToTop();
119
120
121		// banner-carousel
122		function bannerCarouselOne() {
123			var $c=$('.banner-carousel.banner-carousel-1');
124			if(!$c.length||$c.children('.banner-carousel-item').length===0)return;
125			$c.slick({
126				rtl:true,
127				slidesToShow: 1,
128				slidesToScroll: 1,
129				autoplay: true,
130				dots: true,
131				speed: 600,
132				arrows: true,
133				prevArrow: '<button type="button" class="carousel-control left" aria-label="carousel-control"><i class="fas fa-chevron-left"></i></button>',
134				nextArrow: '<button type="button" class="carousel-control right" aria-label="carousel-control"><i class="fas fa-chevron-right"></i></button>'
135			});
136			$c.slickAnimation();
137		}
138		bannerCarouselOne();
139
140
141		// banner Carousel Two
142		function bannerCarouselTwo() {
143			$('.banner-carousel.banner-carousel-2').slick({
144				fade: true,
145				slidesToShow: 1,
146				slidesToScroll: 1,
147				autoplay: true,
148				dots: false,
149				speed: 600,
150				arrows: true,
151				prevArrow: '<button type="button" class="carousel-control left" aria-label="carousel-control"><i class="fas fa-chevron-left"></i></button>',
152				nextArrow: '<button type="button" class="carousel-control right" aria-label="carousel-control"><i class="fas fa-chevron-right"></i></button>'
153			});
154		}
155		bannerCarouselTwo();
156
157
158		// pageSlider
159		function pageSlider() {
160			$('.page-slider').slick({
161				fade: true,
162				slidesToShow: 1,
163				slidesToScroll: 1,
164				autoplay: true,
165				dots: false,
166				speed: 600,
167				arrows: true,
168				prevArrow: '<button type="button" class="carousel-control left" aria-label="carousel-control"><i class="fas fa-chevron-left"></i></button>',
169				nextArrow: '<button type="button" class="carousel-control right" aria-label="carousel-control"><i class="fas fa-chevron-right"></i></button>'
170			});
171		}
172		pageSlider();
173
174
175		// Shuffle js filter and masonry
176		function projectShuffle() {
177			if ($('.shuffle-wrapper').length !== 0) {
178				var Shuffle = window.Shuffle;
179				var myShuffle = new Shuffle(document.querySelector('.shuffle-wrapper'), {
180					itemSelector: '.shuffle-item',
181					sizer: '.shuffle-sizer',
182					buffer: 1
183				});
184				$('input[name="shuffle-filter"]').on('change', function (evt) {
185					var input = evt.currentTarget;
186					if (input.checked) {
187						myShuffle.filter(input.value);
188					}
189				});
190				$('.shuffle-btn-group label').on('click', function () {
191					$('.shuffle-btn-group label').removeClass('active');
192					$(this).addClass('active');
193				});
194			}
195		}
196		projectShuffle();
197
198
199		// testimonial carousel
200		function testimonialCarousel() {
201			$('.testimonial-slide').slick({
202				slidesToShow: 1,
203				slidesToScroll: 1,
204				dots: true,
205				speed: 600,
206				arrows: false
207			});
208		}
209		testimonialCarousel();
210
211
212		// team carousel
213		function teamCarousel() {
214			$('.team-slide').slick({
215				dots: false,
216				infinite: false,
217				speed: 300,
218				slidesToShow: 4,
219				slidesToScroll: 2,
220				arrows: true,
221				prevArrow: '<button type="button" class="carousel-control left" aria-label="carousel-control"><i class="fas fa-chevron-left"></i></button>',
222				nextArrow: '<button type="button" class="carousel-control right" aria-label="carousel-control"><i class="fas fa-chevron-right"></i></button>',
223				responsive: [{
224						breakpoint: 992,
225						settings: {
226							slidesToShow: 3,
227							slidesToScroll: 3
228						}
229					},
230					{
231						breakpoint: 768,
232						settings: {
233							slidesToShow: 2,
234							slidesToScroll: 2
235						}
236					},
237					{
238						breakpoint: 481,
239						settings: {
240							slidesToShow: 1,
241							slidesToScroll: 1
242						}
243					}
244				]
245			});
246		}
247		teamCarousel();
248
249
250		// media popup
251		function mediaPopup() {
252			$('.gallery-popup').colorbox({
253				rel: 'gallery-popup',
254				transition: 'slideshow',
255				innerHeight: '500'
256			});
257			$('.popup').colorbox({
258				iframe: true,
259				innerWidth: 600,
260				innerHeight: 400
261			});
262		}
263		mediaPopup();
264
265	});
266
267
268});

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.