PageSourceSearch

https://ieu.com.pl/wp-content/themes/ieu__3/js/carousel.js

js ieu.com.pl collected 2026-09-26 08:16:18 UTC 12,957 bytes, 308 lines download raw bytes

1let slidd = document.getElementById('carousel-obertka');
2let dots = document.getElementsByClassName('carousel-dot');
3// let liteItem = document.getElementsByClassName('litebox-item');
4// let liteBox = document.querySelector('.litebox');
5//  let collectionImgLitebox = liteBox.querySelectorAll('.litebox-img')
6// let imgLitebox = liteBox.querySelector('.litebox-img')
7// let closeGallery = document.querySelector('.close-btt')
8// let liteOpen = document.getElementById('litebox-none-1')
9let swiperSlider = $('.carousel').find('.swiper_img');
10let mobSwiperSlider = $('.mob-gallery_container').find('.swiper-slide');
11let headElemBody = $('body');
12let pos = -10;
13let f = 1;
14 let j=0;
15
16  $(document).ready(function() {
17	swiperSlider.magnificPopup({
18		delegate: 'a',
19		type: 'image',
20		tLoading: 'Loading image #%curr%...',
21		mainClass: 'mfp-img-mobile',
22		gallery: {
23			enabled: true,
24			navigateByImgClick: true,
25			preload: [0,1] // Will preload 0 - before current, and 1 after the current image
26		},
27		image: {
28			tError: '<a href="%url%">The image #%curr%</a> could not be loaded.',
29			// titleSrc: function(item) {
30			// 	return item.el.attr('title') + '<small>by Marsel Van Oosten</small>';
31			// }
32		}
33	});
34
35    mobSwiperSlider.magnificPopup({
36		delegate: 'a',
37		type: 'image',
38		tLoading: 'Loading image #%curr%...',
39		mainClass: 'mfp-img-mobile__mobile',
40		gallery: {
41			enabled: true,
42			navigateByImgClick: true,
43			preload: [0,1] // Will preload 0 - before current, and 1 after the current image
44		},
45		image: {
46			tError: '<a href="%url%">The image #%curr%</a> could not be loaded.',
47			// titleSrc: function(item) {
48			// 	return item.el.attr('title') + '<small>by Marsel Van Oosten</small>';
49			// }
50		}
51	});
52
53
54    let scrollpos = window.scrollY
55
56
57    const scrollChange = 300
58    const add_class_on_scroll = () => $('.wrap').addClass('background');
59    const remove_class_on_scroll = () => $('.wrap').removeClass('background');
60
61
62    $(window).on("scroll", function() {
63        scrollpos = window.scrollY;
64        if (scrollpos >= scrollChange) { add_class_on_scroll() } else { remove_class_on_scroll() }
65    })
66  });
67
68
69
70function updateMargin(x) {
71    slidd.style.marginLeft = x + ('%');
72}
73
74
75function controlSlider() {
76    dots[f].toggleClass('carousel-dot-active');
77}
78
79$('#next-sl').click(function() {
80    if (f == dots.length - 1) {
81        return;
82    } else {
83        pos = pos - 44;
84        updateMargin(pos);
85        controlSlider();
86        f++;
87        controlSlider();
88    }
89})
90
91
92$('#prev-sl').click(function() {
93    if (f == 0) {
94        return;
95    } else {
96        pos = pos + 44;
97        updateMargin(pos);
98        controlSlider();
99        f--;
100        controlSlider();
101    }
102})
103
104const swiper = new Swiper('.swiper', {
105    slidesPerView: 1,
106    centeredSlides: true,
107    initialSlide: 1,
108    nested: true,
109    spaceBetween: 18,
110    shortSwipes: false,
111    scrollbar: {
112        el: '.swiper-scrollbar',
113        hide: false,
114        draggable: true,
115        dragSize: 133,
116    },
117    // mousewheel: {
118    //     invert: false,
119    //     eventsTarget: ".swiper-slide",
120    // },
121});
122
123
124const Countries = ['Afghanistan', 'Albania', 'Algeria', 'American Samoa', 'Andorra', 'Angola', 'Anguilla', 'Antigua and Barbuda', 'Argentina', 'Armenia', 'Aruba', 'Australia', 'Austria', 'Azerbaijan', 'Bangladesh', 'Barbados', 'Bahamas', 'Bahrain', 'Belarus', 'Belgium', 'Belize', 'Benin', 'Bermuda', 'Bhutan', 'Bolivia', 'Bosnia and Herzegovina', 'Botswana', 'Brazil', 'British Indian Ocean Territory', 'British Virgin Islands', 'Brunei Darussalam', 'Bulgaria', 'Burkina Faso', 'Burma', 'Burundi', 'Cambodia', 'Cameroon', 'Canada', 'Cape Verde', 'Cayman Islands', 'Central African Republic', 'Chad', 'Chile', 'China', 'Christmas Island', 'Cocos (Keeling) Islands', 'Colombia', 'Comoros', 'Congo-Brazzaville', 'Congo-Kinshasa', 'Cook Islands', 'Costa Rica', 'Croatia', 'Curagao', 'Cyprus', 'Czech Republic', 'Denmark', 'Djibouti', 'Dominica', 'Dominican Republic', 'East Timor', 'Ecuador', 'El Salvador', 'Egypt', 'Equatorial Guinea', 'Eritrea', 'Estonia', 'Ethiopia', 'Falkland Islands', 'Faroe Islands', 'Federated States of Micronesia', 'Fiji', 'Finland', 'France', 'French Guiana', 'French Polynesia', 'French Southern Lands', 'Gabon', 'Gambia', 'Georgia', 'Germany', 'Ghana', 'Gibraltar', 'Greece', 'Greenland', 'Grenada', 'Guadeloupe', 'Guam', 'Guatemala', 'Guernsey', 'Guinea', 'Guinea-Bissau', 'Guyana', 'Haiti', 'Heard and McDonald Islands', 'Honduras', 'Hong Kong', 'Hungary', 'Iceland', 'India', 'Indonesia', 'Iraq', 'Ireland', 'Isle of Man', 'Israel', 'Italy', 'Jamaica', 'Jap
124an', 'Jersey', 'Jordan', 'Kazakhstan', 'Kenya', 'Kiribati', 'Kuwait', 'Kyrgyzstan', 'Laos', 'Latvia', 'Lebanon', 'Lesotho', 'Liberia', 'Libya', 'Liechtenstein', 'Lithuania', 'Luxembourg', 'Macau', 'Macedonia', 'Madagascar', 'Malawi', 'Malaysia', 'Maldives', 'Mali', 'Malta', 'Marshall Islands', 'Martinique', 'Mauritania', 'Mauritius', 'Mayotte', 'Mexico', 'Moldova', 'Monaco', 'Mongolia', 'Montenegro', 'Montserrat', 'Morocco', 'Mozambique', 'Namibia', 'Nauru', 'Nepal', 'Netherlands', 'New Caledonia', 'New Zealand', 'Nicaragua', 'Niger', 'Nigeria', 'Niue', 'Norfolk Island', 'Northern Mariana Islands', 'Norway', 'Oman', 'Pakistan', 'Palau', 'Panama', 'Papua New Guinea', 'Paraguay', 'Peru', 'Philippines', 'Pitcairn Islands', 'Poland', 'Portugal', 'Puerto Rico', 'Qatar', 'Runion', 'Romania', 'Russia', 'Rwanda', 'Saint Barthlemy', 'Saint Helena', 'Saint Kitts and Nevis', 'Saint Lucia', 'Saint Martin', 'Saint Pierre and Miquelon', 'Saint Vincent', 'Samoa', 'San Marino', 'Sio Tom and Principe', 'Saudi Arabia', 'Senegal', 'Serbia', 'Seychelles', 'Sierra Leone', 'Singapore', 'Sint Maarten', 'Slovakia', 'Slovenia', 'Solomon Islands', 'Somalia', 'South Africa', 'South Georgia', 'South Korea', 'Spain', 'Sri Lanka', 'Sudan', 'Suriname', 'Svalbard and Jan Mayen', 'Sweden', 'Swaziland', 'Switzerland', 'Syria', 'Taiwan', 'Tajikistan', 'Tanzania', 'Thailand', 'Togo', 'Tokelau', 'Tonga', 'Trinidad and Tobago', 'Tunisia', 'Turkey', 'Turkmenistan', 'Turks and Caicos Islands', 'Tuvalu', 'Uganda', 'Ukraine', 'United Arab Emirates', 'United Kingdom', 'United States', 'Uruguay', 'Uzbekistan', 'Vanuatu', 'Vatican City', 'Vietnam', 'Venezuela', 'Wallis and Futuna', 'Western Sahara', 'Yemen', 'Zambia', 'Zimbabwe'];
125// const Faculties = ['Faculty of Medicine', 'Faculty of Dentistry', 'Faculty of Pharmacy', 'Faculty of Nursing', 'Language course'];
126
127function CountriesMass(count) {
128    let options = '';
129    for (const key of count) {
130        options = options.concat(`<option value="${key}"></option>`)
131    }
132    return options
133}
134
135$('#input_your_country')
136    .attr('list', 'your_country')
137    .after(`
138        <datalist id="your_country">
139            ${CountriesMass(Countries)}
140        </datalist>
141    `);
142
143// $('#input_your_program')
144// .attr('list', 'your_program')
145// .after(`
146//     <datalist id="your_program">
147//         ${CountriesMass(Faculties)}
148//     </datalist>
149// `);
150
151const swiperMob = new Swiper('.swiper_mob', {
152    slidesPerView: 1,
153    centeredSlides: true,
154    initialSlide: 1,
155    nested: true,
156    spaceBetween: 18,
157    shortSwipes: false,
158    freeMode: true,
159    scrollbar: {
160        el: '.swiper-scrollbar',
161        hide: false,
162        draggable: true,
163        dragSize: 38,
164    },
165    // mousewheel: {
166    //     invert: false,
167    //     eventsTarget: ".swiper-slide",
168    // },
169});
170
171
172// // scroll effects
173
174// // section schools top row
175// const scrollElemParentSchoolsTop = $('.cards-container .card-row:first-child');
176// const scrollElemChildSchoolsTop = $('.cards-container .card-row:first-child .cards');
177
178// //section schools bottom row
179// const scrollElemParentSchoolsBottom = $('.cards-container .card-row:last-child');
180// const scrollElemChildSchoolsBottom = $('.cards-container .card-row:last-child .cards');
181
182// //section why choose us
183// const scrollElemParentWhy = $('.why .choose-items');
184// const scrollElemChildSWhy = $('.why .choose-items');
185
186// //section Admissions
187// const scrollElemParentAdmissions = $('.admissions-content img');
188// const scrollElemChildSAdmissions = $('.admissions-content img');
189
190// //section education
191// const scrollElemParentEducation = $('.main-container.education .accordion');
192// const scrollElemChildEducation = $('.main-container.education .accordion .acc-box.visible-cont');
193// const scrollElemMiniChildEducation = $('.main-container.education .accordion .acc-mini-box.visible-cont');
194
195// //section news
196// const scrollElemParentNews = $('.news-container .second-tabs-content-active');
197// const scrollElemChildNews = $('.news-container .second-tabs-content-active .second-tabs-cart');
198
199// //section gallery
200// const scrollElemParentGallery = $('.gallery-container .carousel');
201// const scrollElemChildGallery = $('.gallery-container .carousel');
202
203// //section feedback
204// const scrollElemParentFeedback = $('.feedback-container .right-side');
205// const scrollElemChildFeedback = $('.feedback-container .right-side');
206
207// //section Join us
208// const scrollElemParentJoin = $('.join-us .contact_form');
209// const scrollElemChildJoin = $('.join-us .contact_form');
210
211// $(window).scroll(function() {
212
213//     if ($(window).scrollTop() >= (scrollElemParentSchoolsTop.offset().top - $(window).height() + 120)) {
214//         scrollElemChildSchoolsTop.map(function() {
215//             $(this).addClass('second-tabs-cart-scroll-active');
216//         });
217//     } else {
218//         scrollElemChildSchoolsTop.map(function() {
219//             $(this).removeClass('second-tabs-cart-scroll-active');
220//         });
221//     }
222// });
223
224// $(window).scroll(function() {
225//     if ($(window).scrollTop() >= (scrollElemParentSchoolsBottom.offset().top - $(window).height() + 120)) {
226//         scrollElemChildSchoolsBottom.map(function() {
227//             $(this).addClass('second-tabs-cart-scroll-active');
228//         });
229//     } else {
230//         scrollElemChildSchoolsBottom.map(function() {
231//             $(this).removeClass('second-tabs-cart-scroll-active');
232//         });
233//     }
234// });
235
236// $(window).scroll(function() {
237//     if ($(window).scrollTop() >= (scrollElemParentAdmissions.offset().top - $(window).height() + 80)) {
238//         scrollElemChildSAdmissions.addClass('second-tabs-cart-scroll-active');
239//     } else {
240//         scrollElemChildSAdmissions.removeClass('second-tabs-cart-scroll-active');
241//     }
242// });
243
244// $(window).scroll(function() {
245//     if ($(window).scrollTop() >= (scrollElemParentWhy.offset().top - $(window).height() + 80)) {
246//         scrollElemChildSWhy.addClass('second-tabs-cart-scroll-active');
247//     } else {
248//         scrollElemChildSWhy.removeClass('second-tabs-cart-scroll-active');
249//     }
250// });
251
252// $(window).scroll(function() {
253//     if ($(window).scrollTop() >= (scrollElemParentEducation.offset().top - $(window).height() + 120)) {
254//         scrollElemChildEducation.addClass('second-tabs-cart-scroll-active');
255//         scrollElemMiniChildEducation.addClass('second-tabs-cart-scroll-active');
256//     } else {
257//         scrollElemChildEducation.removeClass('second-tabs-cart-scroll-active');
258//         scrollElemMiniChildEducation.removeClass('second-tabs-cart-scroll-active');
259//     }
260// });
261
262// $(window).scroll(function() {
263//     if ($(window).scrollTop() >= (scrollElemParentNews.offset().top - $(window).height() + 50)) {
264//         scrollElemChildNews.map(function() {
265//             $(this).addClass('second-tabs-cart-scroll-active');
266//         });
267//     } else {
268//         scrollElemChildNews.map(function() {
269//             $(this).removeClass('second-tabs-cart-scroll-active');
270//         });
271//     }
272// });
273
274// $(window).scroll(function() {
275//     if ($(window).scrollTop() >= (scrollElemParentGallery.offset().top - $(window).height() + 50)) {
276//         scrollElemChildGallery.addClass('second-tabs-cart-scroll-active');
277//     } else {
278//         scrollElemChildGallery.removeClass('second-tabs-cart-scroll-active');
279//     }
280// });
281
282// $(window).scroll(function() {
283//     if ($(window).scrollTop() >= (scrollElemParentFeedback.offset().top - $(window).height() + 200)) {
284//         scrollElemChildFeedback.addClass('second-tabs-cart-scroll-active');
285//     } else {
286//         scrollElemChildFeedback.removeClass('second-tabs-cart-scroll-active');
287//     }
288// });
289
290// $(window).scroll(function() {
291//     if ($(window).scrollTop() >= (scrollElemParentJoin.offset().top - $(window).height() + 50)) {
292//         scrollElemChildJoin.addClass('second-tabs-cart-scroll-active');
293//     } else {
294//         scrollElemChildJoin.removeClass('second-tabs-cart-scroll-active');
295//     }
296// });
297
298// function testMyProject(parent, child) {
299//     console.log(parent);
300//     console.log(child);
301//     console.log($(parent));
302//     console.log($(child));
303// }
304
305// $(window).scroll(
306//     testMyProject(scrollElemParentSchoolsTop, scrollElemChildSchoolsTop),
307//     testMyProject(scrollElemParentGallery, scrollElemChildGallery)
308// )

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.