
// Main Slider
$('#banner_slider').owlCarousel({
	// animateOut: 'slideInRight',
	// animateIn: 'slideInLeft',
	loop: true,
	autoplay: true,
	autoplayTimeout: 6000,
	items:1,
	margin:0,
	dots: true,
	nav: true,
	smartSpeed:3000
});







$(document).ready(function() {
	$('.menu_open').click(function() {
		$('.mob_menu').addClass("active");
	});
	$(".menu_close").click(function() {
		$(".mob_menu").removeClass("active");
	});

});

$(document).ready(function() {
	$('.menu_open').click(function() {
		$('.site_hp').addClass("active");
	});
	$(".menu_close").click(function() {
		$(".site_hp").removeClass("active");
	});

});

$(window).scroll(function() {
	var x = $(this).scrollTop();
	var w = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
	if (w > 991) {
		$('.bg').css('background-position', '50% ' + parseInt(-x / 7) + 'px');
	}
});

var btn = $('#backToTop');

$(window).scroll(function() {
  if ($(window).scrollTop() > 300) {
	btn.addClass('show');
  } else {
	btn.removeClass('show');
  }
});

btn.on('click', function(e) {
  e.preventDefault();
  $('html, body').animate({scrollTop:0}, '300');
});

//accordian
var acc = document.getElementsByClassName("accordion");
var i;

for (i = 0; i < acc.length; i++) {
  acc[i].addEventListener("click", function() {
    this.classList.toggle("active");
    var panel = this.nextElementSibling;
    if (panel.style.display === "block") {
      panel.style.display = "none";
    } else {
      panel.style.display = "block";
    }
  });
}



/*-----NEW JS CODE for Forgot Password---
Dt. 12.06.2024-----------------------*/
function lauchFp(){
document.getElementById("login-modal").style.display="none";
document.getElementById("fp-modal").style.display="block";
}
function loginFpReset(){
if (document.getElementById("collapseExample").className==="collapse")
document.getElementById("login-modal").style.display="block";
document.getElementById("fp-modal").style.display="none";
}
/*----NEW JS CODE ENDS here----------*/