/***************** Waypoints ******************/ $('.article').waypoint(function() { $('.header').addClass("magictime spaceOutUp"); }, { offset: -2 }); $('.header').waypoint(function() { $('.header').removeClass("magictime spaceOutUp"); }, { offset: -2 }); $(document).ready(function() { $('.wp1').waypoint(function() { $('.wp1').addClass('animated fadeInLeft'); }, { offset: '10%' }); $('.wp2').waypoint(function() { $('.wp2').addClass('animated fadeInUp'); }, { offset: '35%' }); $('.wp3').waypoint(function() { $('.wp3').addClass('animated fadeInDown'); }, { offset: '55%' }); $('.wp4').waypoint(function() { $('.wp4').addClass('animated fadeInDown'); }, { offset: '75%' }); $('.wp5').waypoint(function() { $('.wp5').addClass('animated fadeInUp'); }, { offset: '75%' }); $('.wp6').waypoint(function() { $('.wp6').addClass('animated fadeInDown'); }, { offset: '75%' }); }); /***************** bounce - trigger ******************/ $('.trigger').addClass('animated bounce'); setInterval(function() { $('.trigger').removeClass('animated bounce') }, 5000); setInterval(function() { $('.trigger').addClass('animated bounce') }, 10000); /***************** Slide-In Nav ******************/ /* $(window).load(function() { $('.nav_slide_button').click(function() { $('.pull').slideToggle(); }); }); */ /***************** Smooth Scrolling ******************/ $(function() { $('a[href*=#]:not([href=#])').click(function() { if (location.pathname.replace(/^\//, '') === this.pathname.replace(/^\//, '') && location.hostname === this.hostname) { var target = $(this.hash); target = target.length ? target : $('[name=' + this.hash.slice(1) + ']'); if (target.length) { $('html,body').animate({ scrollTop: target.offset().top }, 2000); return false; } } }); }); /***************** Nav Transformicon ******************/ /* document.querySelector("#nav-toggle").addEventListener("click", function() { this.classList.toggle("active"); }); */ /***************** Overlays ******************/ $(document).ready(function(){ if (Modernizr.touch) { // show the close overlay button $(".close-overlay").removeClass("hidden"); // handle the adding of hover class when clicked $(".img").click(function(e){ if (!$(this).hasClass("hover")) { $(this).addClass("hover"); } }); // handle the closing of the overlay $(".close-overlay").click(function(e){ e.preventDefault(); e.stopPropagation(); if ($(this).closest(".img").hasClass("hover")) { $(this).closest(".img").removeClass("hover"); } }); } else { // handle the mouseenter functionality $(".img").mouseenter(function(){ $(this).addClass("hover"); }) // handle the mouseleave functionality .mouseleave(function(){ $(this).removeClass("hover"); }); } }); /***************** Flexsliders ******************/ $(window).load(function() { $('#portfolioSlider').flexslider({ animation: "slide", directionNav: false, controlNav: true, touch: false, pauseOnHover: true, start: function() { $.waypoints('refresh'); } }); $('#servicesSlider').flexslider({ animation: "slide", directionNav: false, controlNav: true, touch: true, pauseOnHover: true, start: function() { $.waypoints('refresh'); } }); $('#teamSlider').flexslider({ animation: "slide", directionNav: false, controlNav: true, touch: true, pauseOnHover: true, start: function() { $.waypoints('refresh'); } }); }); /***************** Modal-Boxes ******************/ $('#print1').click(function(){ $('#print1Modal').modal('toggle'); $('#print1slider').flexslider({ animation: "slide", directionNav: true, controlNav: true, touch: true, pauseOnHover: false, }); }); $('#print2').click(function(){ $('#print2Modal').modal('toggle'); $('#print2slider').flexslider({ animation: "slide", directionNav: true, controlNav: true, touch: true, pauseOnHover: false, }); }); $('#print3').click(function(){ $('#print3Modal').modal('toggle'); $('#print3slider').flexslider({ animation: "slide", directionNav: true, controlNav: true, touch: true, pauseOnHover: false, }); }); $('#web1').click(function(){ $('#web1Modal').modal('toggle'); $('#web1slider').flexslider({ animation: "slide", directionNav: true, controlNav: true, touch: true, pauseOnHover: false, }); }); $('#web2').click(function(){ $('#web2Modal').modal('toggle'); $('#web2slider').flexslider({ animation: "slide", directionNav: true, controlNav: true, touch: true, pauseOnHover: false, }); }); $('#web3').click(function(){ $('#web3Modal').modal('toggle'); $('#web3slider').flexslider({ animation: "slide", directionNav: true, controlNav: true, touch: true, pauseOnHover: false, }); }); $('#kompetenz1').click(function(){ $('#kompetenz1Modal').modal('toggle'); $('#kompetenz1slider').flexslider({ animation: "slide", directionNav: true, controlNav: true, touch: true, pauseOnHover: false, }); }); $('#kompetenz2').click(function(){ $('#kompetenz2Modal').modal('toggle'); $('#kompetenz2slider').flexslider({ animation: "slide", directionNav: true, controlNav: true, touch: true, pauseOnHover: false, }); }); $('#kompetenz3').click(function(){ $('#kompetenz3Modal').modal('toggle'); $('#kompetenz3slider').flexslider({ animation: "slide", directionNav: true, controlNav: true, touch: true, pauseOnHover: false, smoothHeight: true, }); }); $('#kompetenz4').click(function(){ $('#kompetenz4Modal').modal('toggle'); $('#kompetenz4slider').flexslider({ animation: "slide", directionNav: true, controlNav: true, touch: true, pauseOnHover: false, }); }); $('#kompetenz5').click(function(){ $('#kompetenz5Modal').modal('toggle'); $('#kompetenz5slider').flexslider({ animation: "slide", directionNav: true, controlNav: true, touch: true, pauseOnHover: false, }); }); $('#kompetenz6').click(function(){ $('#kompetenz6Modal').modal('toggle'); $('#kompetenz6slider').flexslider({ animation: "slide", directionNav: true, controlNav: true, touch: true, pauseOnHover: false, }); }); /***************** Footer-Slider ******************/ $('#footerSlides').flexslider({ animation: "slide", directionNav: false, controlNav: false, touch: true, start: function() { $.waypoints('refresh'); } });