$(function() { /* Demo Scripts for Bootstrap Carousel and Animate.css */ $('.navbar').affix({ offset: { top: $('.header-inner').height() } }); //Function to animate slider captions function doAnimations( elems ) { //Cache the animationend event in a variable var animEndEv = 'webkitAnimationEnd animationend'; elems.each(function () { var $this = $(this), $animationType = $this.data('animation'); $this.addClass($animationType).one(animEndEv, function () { $this.removeClass($animationType); }); }); } //Variables on page load var $myCarousel = $('#home-slider'), $firstAnimatingElems = $myCarousel.find('.item:first').find("[data-animation ^= 'animated']"); //Initialize carousel $myCarousel.carousel(); //Animate captions in first slide on page load doAnimations($firstAnimatingElems); //Pause carousel $myCarousel.carousel('pause'); //Other slides to be animated on carousel slide event $myCarousel.on('slide.bs.carousel', function (e) { var $animatingElems = $(e.relatedTarget).find("[data-animation ^= 'animated']"); doAnimations($animatingElems); }); // Project Scroll Js $('#home-blog .item').each(function(){ var next = $(this).next(); if (!next.length) { next = $(this).siblings(':first'); } next.children(':first-child').clone().appendTo($(this)); for (var i=0;i<1;i++) { next=next.next(); if (!next.length) { next = $(this).siblings(':first'); } next.children(':first-child').clone().appendTo($(this)); } }); // Aos Animation js AOS.init({ easing: 'ease-in-out-sine' }); //main menu on hover jQuery(document).ready(function() { jQuery('.nav li.dropdown').hover(function() { jQuery(this).addClass('open'); }, function() { jQuery(this).removeClass('open'); }); }); /*-- Page Scroll To Top Section ---------------*/ jQuery(document).ready(function () { jQuery(window).scroll(function () { if (jQuery(this).scrollTop() > 100) { jQuery('.hc_scrollup').fadeIn(); } else { jQuery('.hc_scrollup').fadeOut(); } }); jQuery('.hc_scrollup').click(function () { jQuery("html, body").animate({ scrollTop: 0 }, 600); return false; }); }); //------PhotoBox Js------------// !(function(){ 'use stnonerict'; // finally, initialize photobox on all retrieved images $('#gallery').photobox('.photobox_a'); $('#gallery').photobox('.photobox_a:first', { thumbs:false, time:0 }, imageLoaded); function imageLoaded(){ console.log('image has been loaded...' ); } })(); });