/* =================================================================== Author : Valid Theme Template Name : Dostart - Startup Landing Page Version : 1.0 * ================================================================= */ (function($) { "use strict"; $(document).ready(function() { /* ================================================== # Wow Init ===============================================*/ var wow = new WOW({ boxClass: 'wow', // animated element css class (default is wow) animateClass: 'animated', // animation css class (default is animated) offset: 0, // distance to the element when triggering the animation (default is 0) mobile: true, // trigger animations on mobile devices (default is true) live: true // act on asynchronously loaded content (default is true) }); wow.init(); /* ================================================== # Tooltip Init ===============================================*/ $('[data-toggle="tooltip"]').tooltip(); /* ================================================== # Fun Factor Init ===============================================*/ $('.timer').countTo(); $('.fun-fact').appear(function() { $('.timer').countTo(); }, { accY: -100 }); /* ================================================== # Magnific popup init ===============================================*/ $(".popup-link").magnificPopup({ type: 'image', // other options }); $(".popup-gallery").magnificPopup({ type: 'image', gallery: { enabled: true }, // other options }); $(".popup-youtube, .popup-vimeo, .popup-gmaps").magnificPopup({ type: "iframe", mainClass: "mfp-fade", removalDelay: 160, preloader: false, fixedContentPos: false }); $('.magnific-mix-gallery').each(function() { var $container = $(this); var $imageLinks = $container.find('.item'); var items = []; $imageLinks.each(function() { var $item = $(this); var type = 'image'; if ($item.hasClass('magnific-iframe')) { type = 'iframe'; } var magItem = { src: $item.attr('href'), type: type }; magItem.title = $item.data('title'); items.push(magItem); }); $imageLinks.magnificPopup({ mainClass: 'mfp-fade', items: items, gallery: { enabled: true, tPrev: $(this).data('prev-text'), tNext: $(this).data('next-text') }, type: 'image', callbacks: { beforeOpen: function() { var index = $imageLinks.index(this.st.el); if (-1 !== index) { this.goTo(index); } } } }); }); /* ================================================== # Success Stories Carousel ===============================================*/ $('.stories-carusel').owlCarousel({ loop: true, nav: false, dots: true, autoplay: true, items: 1, navText: [ "", "" ], }); /* ================================================== # Banner Carousel ===============================================*/ $('.banner-carousel').owlCarousel({ loop: true, nav: false, dots: true, autoplay: true, items: 1, navText: [ "", "" ], }); /* ================================================== # Our Offer Carousel ===============================================*/ $('.our-offer-carousel').owlCarousel({ loop: true, margin: 30, nav: false, navText: [ "", "" ], dots: true, autoplay: true, responsive: { 0: { items: 1 }, 600: { items: 2 }, 1000: { items: 3 } } }); /* ================================================== # Blog Carousel ===============================================*/ $('.blog-carousel').owlCarousel({ loop: true, margin: 30, nav: false, navText: [ "", "" ], dots: true, autoplay: true, responsive: { 0: { items: 1 }, 768: { items: 2 }, 1024: { items: 3 } } }); /* ================================================== # Team Carousel ===============================================*/ $('.team-carousel').owlCarousel({ loop: true, margin: 30, nav: false, navText: [ "", "" ], dots: true, autoplay: true, responsive: { 0: { items: 1 }, 768: { items: 2 }, 1024: { items: 3 } } }); /* ================================================== # Testomonails Carousel ===============================================*/ $('.testimonial-items').owlCarousel({ loop: true, nav: false, dots: true, autoplay: true, items: 1, navText: [ "", "" ], }); /* ================================================== # Clients Carousel ===============================================*/ $('.clients-items').owlCarousel({ loop: true, margin: 20, nav: false, navText: [ "", "" ], dots: false, autoplay: true, responsive: { 0: { items: 2 }, 768: { items: 3 }, 1024: { items: 3 } } }); /* ================================================== Contact Form Validations ================================================== */ $('.contact-form').each(function() { var formInstance = $(this); formInstance.submit(function() { var action = $(this).attr('action'); $("#message").slideUp(750, function() { $('#message').hide(); $('#submit') .after('') .attr('disabled', 'disabled'); $.post(action, { name: $('#name').val(), email: $('#email').val(), phone: $('#phone').val(), comments: $('#comments').val() }, function(data) { document.getElementById('message').innerHTML = data; $('#message').slideDown('slow'); $('.contact-form img.loader').fadeOut('slow', function() { $(this).remove() }); $('#submit').removeAttr('disabled'); } ); }); return false; }); }); }); // end document ready function /* ================================================== Preloader Init ===============================================*/ $(window).on('load', function (event) { $('.se-pre-con').delay(700).fadeOut(500); }); })(jQuery); // End jQuery