document.addEventListener("DOMContentLoaded", function () {
if (window.innerWidth <= 768) {
const modal = document.getElementById("mobileModal");
const closeBtn = modal.querySelector(".btn-close");
// Show modal
modal.classList.add("show");
// Close modal on button click
closeBtn.addEventListener("click", () => {
modal.classList.remove("show");
});
}
});
$(document).ready(function () {
// Delay to make sure swiper elements are fully added from CDN script
setTimeout(function () {
$('.h_alumni_list [role="group"]').each(function () {
const tag = $(this).prop('tagName').toLowerCase();
if (tag !== 'div') {
$(this).removeAttr('role');
console.log('Removed role="group" from <' + tag + '> inside .h_alumni_list');
}
});
}, 300); // Delay slightly if swiper is injected dynamically
});
(function ($) {
"use strict";
adjustMaxContent();
adjustBodyPadding();
// Anchor Smooth Scroll Start
jQuery(function ($) {
function scrollToHash(hash) {
var target = $(hash);
$("html,body").animate({ scrollTop: target.offset().top - 120 },
"linear"
);
}
$('a[href*="#"]:not([href="#"])').click(function () {
scrollToHash(this.hash);
});
$(window).on("load", function () {
if (location.hash) {
scrollToHash(location.hash);
}
});
});
// Header sticky
$(window).scroll(function () {
var sticky = $("body"),
scroll = $(window).scrollTop();
if (scroll >= 100) sticky.addClass("sticky");
else sticky.removeClass("sticky");
});
// Body Padding Adjustment Start
function adjustBodyPadding() {
const header = document.querySelector('.main_header');
const body = document.querySelector('.inner_main');
if (header && body) {
setTimeout(function () {
const headerHeight = header.offsetHeight;
body.style.paddingTop = headerHeight + 'px';
}, 100);
}
}
// Call the function on page load
window.addEventListener('load', adjustBodyPadding);
// Call the function on window resize to keep it responsive
window.addEventListener('resize', adjustBodyPadding);
// Body Padding Adjustment End
$(document).ready(function () {
function setDropmenuPadding() {
// Find the active list item
let activeLi = $(".hamb_panel ul > li.active");
if (activeLi.length) {
// Get the height and position of the active li
let liOffsetTop = activeLi.position().top;
// Apply padding-top to .hamb_dropmenu
$(".hamb_dropmenu").css("padding-top", liOffsetTop + "px");
}
}
function initializeFirstDropmenu() {
let firstDropmenu = $(".dropmenu:first");
firstDropmenu.addClass("active");
let firstTarget = firstDropmenu.data("target");
if (firstTarget) {
$(firstTarget).addClass("show");
}
setDropmenuPadding(); // Set padding for the first dropmenu
}
initializeFirstDropmenu();
// Hover event for dropmenu
$(".dropmenu").hover(function () {
if ($(this).hasClass("active")) return;
// Remove active class and 'show' class from siblings
$(this).siblings(".dropmenu").removeClass("active").each(function () {
let siblingTarget = $(this).data("target");
if (siblingTarget) {
$(siblingTarget).removeClass("show");
}
});
// Add active class to the hovered element
$(this).addClass("active");
// Show the target of the hovered element
let o = $(this).data("target");
if (o) {
$(o).addClass("show").siblings().removeClass("show");
// Check if no item from .drop_menu1 is shown, then hide hamb_menu_item
if (!$(".drop_menu1").hasClass("show")) {
$(".hamb_dropmenu").find(".hamb_menu_item").removeClass("show");
}
}
setDropmenuPadding(); // Set padding when hovering a dropmenu
});
// Close button click event
$(".ham_close").click(function () {
$(".dropmenu").removeClass("active");
$(".hamb_dropmenu").removeClass("show");
$(".hamb_menu_item").removeClass("show");
initializeFirstDropmenu();
});
// Hover event for
elements in the .hamb_panel
$(".hamb_panel>ul>li").hover(function () {
// Remove active class and hide previous hamb_dropmenu
$(".hamb_panel>ul>li").removeClass("active");
$(".hamb_dropmenu").removeClass("show");
// Add active class to hovered
$(this).addClass("active");
// Show corresponding hamb_dropmenu based on data-target or other logic
let target = $(this).data("target");
if (target) {
$(target).addClass("show");
// Set padding-top of hamb_dropmenu according to the active li
setDropmenuPadding();
}
});
});
$(".ham_btn").click(function () {
$(this).toggleClass("active");
$(".hamb_side").toggleClass("active");
});
$(".ham_close").click(function () {
$(".hamb_side").removeClass("active");
});
// Mobile Menu
function togglePanel(panelToShow, activeElement) {
const isActive = $(panelToShow).hasClass("show");
$(".mobile-program-panel, .mobile-admission-panel, .mobile-contact-panel, .mobile-menulist-panel").removeClass("show");
if (!isActive) {
$(panelToShow).addClass("show");
}
$(".program_tab, .admission_tab, .contact_tab, .menu_tab").removeClass("active");
if (!isActive) {
$(activeElement).addClass("active");
}
}
$(".program_tab").click(function () {
togglePanel(".mobile-program-panel", this);
});
$(".admission_tab").click(function () {
togglePanel(".mobile-admission-panel", this);
});
$(".contact_tab").click(function () {
togglePanel(".mobile-contact-panel", this);
});
$(".menu_tab").click(function () {
togglePanel(".mobile-menulist-panel", this);
});
// Mobile Menu Tab End
$(".menu_mobile li a").click(function (e) {
// remove the active class with every click
var same = $(this).hasClass("active");
var siblings = $(this).parent(".menu_item").parent().children();
siblings.find("a.active + .sub_menu").slideUp();
siblings.find("a").removeClass("active");
if ($(this).next().hasClass("sub_menu") && !same) {
e.preventDefault();
$(this).addClass("active");
$(this).next(".sub_menu").slideDown();
}
});
// Revel Animation End
$(window).resize(function () {
adjustMaxContent();
});
function adjustMaxContent() {
let containerWidth = $(".container").width()
//console.log([...containerWidth]);
// containerWidth = $([...containerWidth][2]).width();
let windowWidth = $("body").width();
windowWidth = windowWidth > 1920 ? 1920 : windowWidth;
let maxContentWidth = (windowWidth - (windowWidth - containerWidth) / 2) + 13;
if (windowWidth >= 1400) {
$(".max-content-xxl").css("max-width", `${maxContentWidth}px`);
$(".max-content-xl").css("max-width", `${maxContentWidth}px`);
$(".max-content-lg").css("max-width", `${maxContentWidth}px`);
$(".max-content-md").css("max-width", `${maxContentWidth}px`);
$(".max-content-sm").css("max-width", `${maxContentWidth}px`);
$(".max-content").css("max-width", `${maxContentWidth}px`);
} else if (windowWidth >= 1200) {
$(".max-content-xxl").css("max-width", "");
$(".max-content-xl").css("max-width", `${maxContentWidth}px`);
$(".max-content-lg").css("max-width", `${maxContentWidth}px`);
$(".max-content-md").css("max-width", `${maxContentWidth}px`);
$(".max-content-sm").css("max-width", `${maxContentWidth}px`);
$(".max-content").css("max-width", `${maxContentWidth}px`);
} else if (windowWidth >= 992) {
$(".max-content-xxl").css("max-width", "");
$(".max-content-xl").css("max-width", "");
$(".max-content-lg").css("max-width", `${maxContentWidth}px`);
$(".max-content-md").css("max-width", `${maxContentWidth}px`);
$(".max-content-sm").css("max-width", `${maxContentWidth}px`);
$(".max-content").css("max-width", `${maxContentWidth}px`);
} else if (windowWidth >= 768) {
$(".max-content-xxl").css("max-width", "");
$(".max-content-xl").css("max-width", "");
$(".max-content-lg").css("max-width", "");
$(".max-content-md").css("max-width", `${maxContentWidth}px`);
$(".max-content-sm").css("max-width", `${maxContentWidth}px`);
$(".max-content").css("max-width", `${maxContentWidth}px`);
} else if (windowWidth >= 575) {
$(".max-content-xxl").css("max-width", "");
$(".max-content-xl").css("max-width", "");
$(".max-content-lg").css("max-width", "");
$(".max-content-md").css("max-width", "");
$(".max-content-sm").css("max-width", `${maxContentWidth}px`);
$(".max-content").css("max-width", `${maxContentWidth}px`);
} else {
$(".max-content-xxl").css("width", "");
$(".max-content-xl").css("width", "");
$(".max-content-lg").css("width", "");
$(".max-content-md").css("width", "");
$(".max-content-sm").css("width", "");
$(".max-content").css("width", `${maxContentWidth}px`);
}
}
// Menu Adjust End
// gallery box Start
$('.gallery_custom').each(function () {
// console.log('kjaskd')
let target = `.gallery${$(this).data('albumid')}`;
$(target).rbox({});
})
// gallery box End
})(jQuery);
// Swiper: Slider
$(function () {
// Owl Carousel
if ($(".owl-carousel") && $(".owl-carousel")?.length) {
var owl = $(".owl-carousel");
owl.owlCarousel({
items: 1,
margin: 10,
loop: true,
nav: true,
autoplay: true
});
}
});
// Open the search panel when the search icon is clicked
$('.search-toggle').click(function () {
$('.search').addClass('open'); // Show the search panel
$('.overlay').addClass('open'); // Optionally, show an overlay
});
// Close the search panel when the close button is clicked
$('.close-btn').click(function () {
$('.search').removeClass('open'); // Hide the search panel
$('.overlay').removeClass('open'); // Optionally, hide the overlay
$('.overlay1').removeClass('open'); // Optionally, hide the overlay
});
$('#toggle').click(function () {
$(this).toggleClass('active');
$('#overlay1').toggleClass('open');
});
// Mobile Bottom Sticky
$(function () {
$('.mobile-bottom-menu .togglee').click(function () {
if ($(this).hasClass('active')) {
$('.side-menu').removeClass('show-menu');
$(this).removeClass('active');
} else {
$(this).addClass('active');
}
$(this).parent().siblings().children().removeClass('active');
});
});
$(document).ready(function () {
$(".course_sec").on("click", function () {
$(".course-brands_wrap").toggleClass("show");
$(".admissions-services_wrap").removeClass("show1");
$(".contact_wrap").removeClass("show2");
$(".menu_wrap").removeClass("show3");
$(".enquiry_panel_wrap").removeClass("show");
});
});
$(document).ready(function () {
$(".enquiry_pan").on("click", function () {
$(".enquiry_panel_wrap").toggleClass("show");
$(".course-brands_wrap").removeClass("show");
$(".admissions-services_wrap").removeClass("show1");
$(".contact_wrap").removeClass("show2");
$(".menu_wrap").removeClass("show3");
});
});
$(document).ready(function () {
$(".admissions-services").on("click", function () {
$(".admissions-services_wrap").toggleClass("show1");
$(".course-brands_wrap").removeClass("show");
$(".contact_wrap").removeClass("show2");
$(".menu_wrap").removeClass("show3");
$(".enquiry_panel_wrap").removeClass("show");
});
});
// $(document).ready(function () {
// $(".contact").on("click", function () {
// $(".contact_wrap").toggleClass("show2");
// $(".course-brands_wrap").removeClass("show");
// $(".admissions-services_wrap").removeClass("show1");
// $(".menu_wrap").removeClass("show3");
// $(".enquiry_panel_wrap").removeClass("show");
// });
// });
$(document).ready(function () {
$(".menu").on("click", function () {
$(".menu_wrap").toggleClass("show3");
$(".course-brands_wrap").removeClass("show");
$(".admissions-services_wrap").removeClass("show1");
$(".contact_wrap").removeClass("show2");
$(".enquiry_panel_wrap").removeClass("show");
});
});
document.addEventListener('DOMContentLoaded', function () {
// Get all the h4 elements with class 'toggle-header'
const toggleHeaders = document.querySelectorAll('.toggle-header');
// Add click event listener to each header
toggleHeaders.forEach(function (header) {
header.addEventListener('click', function () {
// Find the corresponding under this
const ul = header.nextElementSibling;
// Toggle the clicked
ul.classList.toggle('open');
// Toggle the 'active' class on the clicked header
header.classList.toggle('active');
// If the header is being closed (i.e., it's already active), remove 'active' from it
if (!header.classList.contains('active')) {
ul.classList.remove('open'); // Close the corresponding
}
// Remove 'active' class from all other headers if clicked header is closed
toggleHeaders.forEach(function (item) {
if (item !== header) {
item.classList.remove('active');
item.nextElementSibling.classList.remove('open'); // Close any other s
}
});
});
});
});
if ($(window).width() >= 992) {
function wipeOn() {
var wipers = document.querySelectorAll('.image');
wipers.forEach(function (wipers) {
var rect = wipers.getBoundingClientRect();
if (rect.top < (window.innerHeight - 200 || document.documentElement.clientHeight)) {
wipers.classList.add('reveal-image');
}
});
};
window.addEventListener('load', wipeOn);
window.addEventListener('scroll', wipeOn);
window.addEventListener('resize', wipeOn);
}
///course Internship-slider--//
var swiper = new Swiper(".intopportunitie_slider", {
slidesPerView: 4,
autoplay: {
delay: 2000,
},
speed: 1000,
loop: true,
pagination: {
el: ".swiper-pagination",
clickable: true,
},
breakpoints: {
0: {
slidesPerView: 2,
spaceBetween: 10,
},
375: {
slidesPerView: 2,
spaceBetween: 10,
},
400: {
slidesPerView: 3,
spaceBetween: 10,
},
768: {
slidesPerView: 4,
spaceBetween: 10,
},
1024: {
slidesPerView: 5,
spaceBetween: 15,
},
},
});
AOS.init({
once: true
});
$(document).ready(function(){
// Add a hover event listener to the element with the class "your-element"
$(".indrop_menu.adm_hover").hover(
function() {
// Mouse enters: add class
$(this).addClass("show_megamenu");
},
function() {
// Mouse leaves: remove class
$(this).removeClass("show_megamenu");
}
);
$(".close_megamenu figure").click(function() {
$(".indrop_menu.adm_hover").removeClass("show_megamenu");
});
});
/*--UIKA-14041994-05-02-2025-css-start--*/
$(".notifpoup_link").click(function(){
$(".notification_puop").toggleClass("show_puop");
$("body").toggleClass("popup_hadow");
});
$(".close_icon").click(function(){
$(".notification_puop").removeClass("show_puop");
$("body").removeClass("popup_hadow");
});
/*--UIKA-14041994-05-02-2025-css-end--*/
setTimeout(function () {
var s = document.createElement("script");
s.type = "text/javascript";
s.async = true;
s.src = "https://widgets.in5.nopaperforms.com/emwgts.js";
document.body.appendChild(s);
}, 8000);
function closeFunction() {
var x = document.getElementById("chatbox");
if (x.style.display === "none") {
x.style.display = "block";
$('.online-chat').hide();
$("#iframe_ids").show();
} else {
x.style.display = "none";
$('.online-chat').show();
$("#iframe_ids").hide();
}
}
//*****************************
// setTimeout(function () {
// var s = document.createElement("script");
// s.type = "text/javascript";
// s.async = true;
// s.defer = true;
// s.src = "https://chatbot.in5.nopaperforms.com/en-gb/backend/bots/niaachtbtscpt.js/52516246b00d46979/70b3067433a041579e0a303c175da112"; document.body.appendChild(s);
// }, 10000);
//*****************************
$(function () {
$('#backBtn').on('click', function (e) {
e.preventDefault();
if (window.history.length > 1) {
window.history.back();
} else {
window.location.href = '/';
}
});
});
//
const faqItems = document.querySelectorAll(".faq-item");
faqItems.forEach(function(item) {
const question = item.querySelector(".faq-question");
question.addEventListener("click", function() {
const isActive = item.classList.contains("active");
faqItems.forEach(function(faq) {
faq.classList.remove("active");
});
if (!isActive) {
item.classList.add("active");
}
});
});
window.jotformEmbedHandler(
"iframe[id='JotFormIFrame-262213040359044']",
"https://form.jotform.com/"
);