// JavaScript Document var Fintech = function () { //var resBreakpointMd = CommonFunctions.getResponsiveBreakpoint('md'); var handleBookingMaxheight = function () { $('.bookmaxheight').css('height', 'inherit'); var highestBox = 0; $('.bookmaxheight').each(function () { //alert($(this).height()) if ($(this).height() > highestBox) { highestBox = $(this).innerHeight(); } }); $('.bookmaxheight').css('height', highestBox); }; // Set proper height for sidebar and content. The content and sidebar height must be synced always. return { init: function () { handleBookingMaxheight(); } }; }(); //common rules function parallaxMouse() { if ($('#parallax').length) { var scene = document.getElementById('parallax'); var parallax = new Parallax(scene); }; }; $(function () { parallaxMouse(); $('a.requestquote[href^="#"]').on('click', function (e) { e.preventDefault(); var target = this.hash; var $target = $(target); $('html, body').stop().animate({ 'scrollTop': $target.offset().top }, 900, 'swing', function () { window.location.hash = target; }); }); }); // new WOW().init(); $(window).scroll(function () { var scroll = $(window).scrollTop(); if (scroll >= 300) { $(".navbar-top").addClass("header-fix"); } else { $(".navbar-top").removeClass("header-fix"); } }); // Back to top start $(document).ready(function () { $(window).scroll(function () { if ($(this).scrollTop() > 50) { $('#back-to-top').fadeIn(); } else { $('#back-to-top').fadeOut(); } }); // scroll body to 0px on click $('#back-to-top').click(function () { $('body,html').animate({ scrollTop: 0 }, 400); return false; }); }); window['navbarSupportedContentShow'] = () => { $("#navbarSupportedContent").modal({ keyboard: false, //remove option to close with keyboard backdrop: 'static' }); } window['navbarSupportedContenthide'] = () => { document.getElementById("navbarSupportedContent").className = "navbar-collapse collapse"; } $('body').click(function () { if ($("#navbarSupportedContent").hasClass('navbar-collapse collapse show') == true) { $("#navbarSupportedContent").modal("hide"); } }); // function openNav() { // document.getElementById("navbarSupportedContent").style.width = "520px"; // setTimeout(() => { // $("#navbarSupportedContent").addClass('collapse navbar-collapes show') // }, 100); // } // function closeNav() { // document.getElementById("navbarSupportedContent").style.width = "0"; // $("#navbarSupportedContent").removeClass('collapse navbar-collapes'); // } // Back to top End $(function () { /* Initialize Carousel */ var paused = 0; $('#HomeSlider').carousel({ interval: 1000, pause: 0 }); /* Play trigger */ $('#toggleCarousel').click(function () { var state = (paused) ? 'cycle' : 'pause'; paused = (paused) ? 0 : 1; $('#HomeSlider').carousel(state); $(this).find('i').toggleClass('fa-play fa-pause'); }); }); // $(function() { // $(".btn-mega-menu").one("mouseover", function(e){ // $(".card-mega-menu").removeClass("active") // }) // }); // $(document).ready(function () { // $('.btn-mega-menu').hover(function () { // $('.card-mega-menu').addClass('active'); // }, // function () { // $('.card-mega-menu').removeClass('active'); // }); // $('.card-mega-menu').hover(function () { // $('.card-mega-menu').addClass('active'); // }, // function () { // $('.card-mega-menu').removeClass('active'); // }); // });