// source --> https://fpacademy.nl/wp-content/plugins/woocommerce/assets/js/frontend/add-to-cart.min.js?ver=3.6.5 jQuery(function(e){if("undefined"==typeof wc_add_to_cart_params)return!1;function t(){e(document.body).on("click",".add_to_cart_button",this.onAddToCart).on("click",".remove_from_cart_button",this.onRemoveFromCart).on("added_to_cart",this.updateButton).on("added_to_cart",this.updateCartPage).on("added_to_cart removed_from_cart",this.updateFragments)}t.prototype.onAddToCart=function(t){var a=e(this);if(a.is(".ajax_add_to_cart")){if(!a.attr("data-product_id"))return!0;t.preventDefault(),a.removeClass("added"),a.addClass("loading");var r={};e.each(a.data(),function(t,a){r[t]=a}),e(document.body).trigger("adding_to_cart",[a,r]),e.post(wc_add_to_cart_params.wc_ajax_url.toString().replace("%%endpoint%%","add_to_cart"),r,function(t){t&&(t.error&&t.product_url?window.location=t.product_url:"yes"!==wc_add_to_cart_params.cart_redirect_after_add?e(document.body).trigger("added_to_cart",[t.fragments,t.cart_hash,a]):window.location=wc_add_to_cart_params.cart_url)})}},t.prototype.onRemoveFromCart=function(t){var a=e(this),r=a.closest(".woocommerce-mini-cart-item");t.preventDefault(),r.block({message:null,overlayCSS:{opacity:.6}}),e.post(wc_add_to_cart_params.wc_ajax_url.toString().replace("%%endpoint%%","remove_from_cart"),{cart_item_key:a.data("cart_item_key")},function(t){t&&t.fragments?e(document.body).trigger("removed_from_cart",[t.fragments,t.cart_hash,a]):window.location=a.attr("href")}).fail(function(){window.location=a.attr("href")})},t.prototype.updateButton=function(t,a,r,o){(o=void 0!==o&&o)&&(o.removeClass("loading"),o.addClass("added"),wc_add_to_cart_params.is_cart||0!==o.parent().find(".added_to_cart").length||o.after(' '+wc_add_to_cart_params.i18n_view_cart+""),e(document.body).trigger("wc_cart_button_updated",[o]))},t.prototype.updateCartPage=function(){var t=window.location.toString().replace("add-to-cart","added-to-cart");e.get(t,function(t){e(".shop_table.cart:eq(0)").replaceWith(e(t).find(".shop_table.cart:eq(0)")),e(".cart_totals:eq(0)").replaceWith(e(t).find(".cart_totals:eq(0)")),e(".cart_totals, .shop_table.cart").stop(!0).css("opacity","1").unblock(),e(document.body).trigger("cart_page_refreshed"),e(document.body).trigger("cart_totals_refreshed")})},t.prototype.updateFragments=function(t,a){a&&(e.each(a,function(t){e(t).addClass("updating").fadeTo("400","0.6").block({message:null,overlayCSS:{opacity:.6}})}),e.each(a,function(t,a){e(t).replaceWith(a),e(t).stop(!0).css("opacity","1").unblock()}),e(document.body).trigger("wc_fragments_loaded"))},new t}); // source --> https://fpacademy.nl/wp-content/plugins/js_composer/assets/js/vendors/woocommerce-add-to-cart.js?ver=5.4.5 window.jQuery( document ).ready( function ( $ ) { $( 'body' ).on( 'adding_to_cart', function ( event, $button, data ) { $button && $button.hasClass( 'vc_gitem-link' ) && $button .addClass( 'vc-gitem-add-to-cart-loading-btn' ) .parents( '.vc_grid-item-mini' ) .addClass( 'vc-woocommerce-add-to-cart-loading' ) .append( $( '
' ) ); } ).on( 'added_to_cart', function ( event, fragments, cart_hash, $button ) { if ( 'undefined' === typeof($button) ) { $button = $( '.vc-gitem-add-to-cart-loading-btn' ); } $button && $button.hasClass( 'vc_gitem-link' ) && $button .removeClass( 'vc-gitem-add-to-cart-loading-btn' ) .parents( '.vc_grid-item-mini' ) .removeClass( 'vc-woocommerce-add-to-cart-loading' ) .find( '.vc_wc-load-add-to-loader-wrapper' ).remove(); } ); } ); // source --> https://fpacademy.nl/wp-content/themes/deasil-child/assets/js/custom_inology.js?ver=5.2.9 function detectScreenSize(dwidth) { if (dwidth >= 1281) { return -2; } else if (dwidth >= 1025 && dwidth <= 1280) { return -2; } else if (dwidth >= 768 && dwidth <= 1024) { return -2; } else if (dwidth >= 481 && dwidth <= 767) { return 0; } else if (dwidth >= 320 && dwidth <= 480) { return 0; } else { return 0; } } var lastScrollTop = 0; jQuery(window).scroll(function (event) { let len = jQuery('#menu-primary-menu > li').length; console.log(len); var currentScrollPos = jQuery(this).scrollTop(); let dwidth = jQuery(document).width(); slice_number = detectScreenSize(dwidth); // console.debug('currentScrollPos', currentScrollPos); // console.debug('lastScrollTop', lastScrollTop); if (currentScrollPos > lastScrollTop && currentScrollPos > 30) { // downscroll code dwidth = jQuery(document).width(); jQuery('#menu-primary-menu > li').slice(slice_number).fadeIn("slow").show(); } else if (currentScrollPos < lastScrollTop && currentScrollPos < 30) { // upscroll code dwidth = jQuery(document).width(); jQuery('#menu-primary-menu > li').slice(slice_number).fadeOut("slow").hide(); } lastScrollTop = currentScrollPos; }); //jQuery(document).ready(function() { // // let len = jQuery('#menu-primary-menu').length(); // console.log(len); //}); // source --> https://fpacademy.nl/wp-content/themes/deasil-child/assets/js/main_inology.js?ver=5.2.9 (function($){ "use strict"; $(document).ready(function(){ deasil_stickyNavbarShrink('nav-menu'); deasil_reponsiveNav('nav-menu'); deasil_navwidthresponsive(); deasil_heightAdjust(); $('.auto-menu .page_item_has_children > a, .auto-menu .menu-item-has-children > a').append(''); $('.auto-menu .page_item_has_children > a, .auto-menu .menu-item-has-children > a').on('click touchend', function (e){ e.preventDefault(); $(this).siblings('ul.children, ul.sub-menu').toggle(); }); if($(window).width() > 768){ $('.woocommerce .products .item-desc').deasil_equalHeight(); $('#footer [class^="col-"]').deasil_equalHeight(); $('.team-member .member').deasil_equalHeight(); } $('[data-toggle="tooltip"]').tooltip({container: 'body'}); $('.datepicker, #datepicker').datepicker(); $('[data-toggle="popover"]').popover(); if (!$("body").hasClass("rtl")) { deasil_hideloading(); } }); $(window).on('resize', function(){ deasil_stickyNavbarShrink('nav-menu'); deasil_reponsiveNav('nav-menu'); deasil_navwidthresponsive(); deasil_heightAdjust(); if($(window).width() > 768){ $('.woocommerce .products .item-desc').deasil_equalHeight(); $('#footer [class^="col-"]').deasil_equalHeight(); $('.team-member .member').deasil_equalHeight(); } else{ $('.woocommerce .products .item-desc').css('height', ''); $('#footer [class^="col-"]').css('height', ''); $('.team-member .member').css('height', ''); } }); $(window).load(function(){ if( $('html').attr('dir') == 'rtl' ){ $('[data-vc-full-width="true"]').each( function(i,v){ $(this).css('right' , $(this).css('left') ).css( 'left' , 'auto'); }); deasil_hideloading(); } }); function deasil_showloading(){ $('.pre-loader').show(); } function deasil_hideloading(){ $('.pre-loader').fadeOut('slow'); } /*preloader ends*/ function deasil_stickyNavbarShrink(getnav){ // var aboveHeight = $('.nav-menu').height(); var aboveHeight = 2; var winwidth = $(window).width(); if(winwidth >= 768){ console.debug($(window).scrollTop()); if ($(window).scrollTop() > aboveHeight){ $('.'+getnav).addClass('fixed'); } else { $('.'+getnav).removeClass('fixed'); } /*when scroll*/ $(window).scroll(function(){ if ($(window).scrollTop() > aboveHeight){ $('.'+getnav).addClass('fixed'); } else { $('.'+getnav).removeClass('fixed'); } }); } else{ $('.'+getnav).removeClass('fixed'); $(window).scroll(function(){ $('.'+getnav).removeClass('fixed'); }); } } function deasil_reponsiveNav(getnav){ deasil_navigationprevent(); var winwidth = $(window).width(); $('.'+getnav+' nav .dropdown').unbind(); if(winwidth > 768){ $('.'+getnav+' nav .dropdown').on({ mouseenter: function(){ $(this).children('.dropdown-menu').stop( true, true ).slideDown('fast'); $('.dropdown').removeClass('open'); $(this).toggleClass('open'); }, mouseleave: function(){ $(this).children('.dropdown-menu').stop( true, true ).hide(); $(this).removeClass('open'); } }); } else{ $('.'+getnav+' nav .dropdown').off('mouseover'); $('.'+getnav+' nav .dropdown-menu').removeAttr('style'); } } /*prevents click in small device*/ function deasil_navigationprevent(){ $('a.dropdown-toggle').on('click',function(e){ var winwidth = $(window).width(); if(winwidth <= 768){ e.preventDefault(); } }); } function deasil_navwidthresponsive(){ var navbarwidth = $('#primary-menu > ul').width() + $('.navbar-header').width() + 120; if(navbarwidth > $(window).width()){ $('body').addClass('static-menu'); } else{ $('body').removeClass('static-menu'); } } function deasil_heightAdjust(){ var winwidth = $(window).width(); var winheight = $(window).height(); var textheight = $('.center-txt').height(); var bodyheight = 0; var top = 0; if(winheight > 700 || winheight > winwidth){ bodyheight = winheight; $('.full-height').css('min-height', bodyheight+'px'); if(winwidth < 768){ $('.full-height').css('min-height', (bodyheight - $('.nav-menu').height())+'px'); } } else{ bodyheight = 700; $('.full-height').css('min-height', bodyheight+'px'); } $(".center-txt").each(function() { var content_height = $('.center-txt').height(); $(this).css('top', (($(this).closest('.main-img').height() - content_height)/2+'px')); }); } /*footer equal height*/ $.fn.extend({ deasil_equalHeight: function(){ var heights = $(this).map(function () { return $(this).height(); }).get(), maxHeight = Math.max.apply(null, heights); $(this).height(maxHeight); } }); })(jQuery); // source --> https://fpacademy.nl/wp-content/plugins/foobox-image-lightbox/free/js/foobox.free.min.js?ver=2.6.0 /**! * FooBox - A jQuery plugin for responsive lightboxes * @version 2.1.8 * @link http://fooplugins.com/plugins/foobox-jquery * @copyright Steven Usher & Brad Vincent 2014 * @license Released under the MIT license. * You are free to use FooBox jQuery in personal projects as long as this copyright header is left intact. */ !function(a,b,c,undefined){if(a&&b){b.FooBox={defaults:{affiliate:{enabled:!0,prefix:"Powered by ",url:"http://fooplugins.com/plugins/foobox/"},alwaysInit:!1,closeOnOverlayClick:!0,containerCssClass:"fbx-instance",countMessage:"item %index of %total",error:"Could not load the item",excludes:".fbx-link, .nofoobox",externalSelector:"a[data-foobox],input[data-foobox]",fitToScreen:!1,hideScrollbars:!0,loadDelay:0,loaderTimeout:600,modalClass:"",preload:!1,rel:null,resizeSpeed:300,selector:"a",showButtons:!0,showCount:!0,style:"fbx-rounded",theme:"fbx-light",transitionInSpeed:200,transitionOutSpeed:200,initCallback:null,loop:!0},version:"2.0.10",instances:[],ready:function(b){(Function("/*@cc_on return true@*/")()?"complete"===document.readyState:"loading"!==document.readyState)?b(a):setTimeout(function(){FooBox.ready(b)},1)}},FooBox.$=a,FooBox.format=function(a,b,c){var d,e,f=arguments[0];for(d=0;d-1||a.indexOf("crios")>-1,FooBox.browser.isChrome&&(FooBox.browser.css+=" fbx-chrome"),FooBox.browser.isSafari=a.indexOf("safari")>-1&&!FooBox.browser.isChrome,FooBox.browser.isSafari&&(FooBox.browser.css+=" fbx-safari",FooBox.browser.isLtSafari10=/constructor/i.test(b.HTMLElement)),FooBox.browser.isFirefox=c.indexOf("firefox")>-1,FooBox.browser.isFirefox&&(FooBox.browser.css+=" fbx-firefox");var e=c.indexOf("msie "),f=c.indexOf("trident/"),g=c.indexOf("edge/");if(FooBox.browser.isIE=e>-1||f>-1||g>-1,FooBox.browser.isIE){if(e>-1)FooBox.browser.version=parseInt(c.substring(e+5,c.indexOf(".",e)),10);else if(f>-1){var h=c.indexOf("rv:");FooBox.browser.version=parseInt(c.substring(h+3,c.indexOf(".",h)),10)}else g>-1&&(FooBox.browser.version=parseInt(c.substring(g+5,c.indexOf(".",g)),10));FooBox.browser.css=FooBox.format("fbx-ie fbx-ie{0}",FooBox.browser.version)}},supportsTransitions:function(){var a,b=document.body||document.documentElement,c=b.style,d="transition";if("string"==typeof c[d])return!0;a=["Moz","Webkit","Khtml","O","ms"],d=d.charAt(0).toUpperCase()+d.substr(1);for(var e=0;e0&&-1!==a.indexOf(b)},hasProperties:function(a){if("object"!=typeof a)return!1;var b;for(b in a)if(a.hasOwnProperty(b))return!0;return!1},get:function(a,b){if(FooBox.options.isMultipart(b,".")){var c=b.substring(0,b.indexOf(".")),d=b.substring(b.indexOf(".")+1);return a[c]=a[c]||{},FooBox.options.get(a[c],d)}return a[b]},set:function(a,b,c){if(FooBox.options.isMultipart(b,".")){var d=b.substring(0,b.indexOf(".")),e=b.substring(b.indexOf(".")+1);a[d]=a[d]||{},FooBox.options.set(a[d],e,c)}else a[b]=c},merge:function(a,b,c){var d,e=Array.prototype.slice.call(arguments);for(a=e.shift(),b=e.shift(),FooBox.options._merge(a,b),d=0;d'),c.element.append('
');var b=a('
');b.append('
'),b.append('
');var d=a('
');d.append(b),d.append(''),d.append(''),d.append(''),d.append(''),d.append(''),c.element.append('
'),c.element.append(d),c.FooBox.raise("foobox.setupHtml"),a("body").append(c.element)}},options:function(a){var b;c.element.removeClass().addClass("fbx-modal").addClass(FooBox.format("fbx-{0}",c.FooBox.id)).addClass(c.FooBox.element.data("style")||a.style).addClass(c.FooBox.element.data("theme")||a.theme).addClass(c.FooBox.element.data("modal-class")).addClass(a.modalClass).data("fbx_instance",c.FooBox),c.element.addClass(FooBox.browser.css),b=a.affiliate.enabled?"":"none",c.element.find(".fbx-credit").css("display",b),a.affiliate.enabled&&(c.element.find(".fbx-credit > a").attr("href",a.affiliate.url),c.element.find(".fbx-credit > a > em").text(a.affiliate.prefix)),b=a.showCount&&c.FooBox.items.multiple()?"":"none",c.element.find(".fbx-count").css("display",b),a.showButtons&&c.FooBox.items.multiple()||c.element.addClass("fbx-no-buttons"),c.FooBox.raise("foobox.setupOptions")},bind:function(){1==c.FooBox.options.closeOnOverlayClick&&c.element.off("click.foobox").on("click.foobox",function(b){1==c.FooBox.options.closeOnOverlayClick&&a(b.target).is(".fbx-modal")&&c.close()}),c.element.find(".fbx-close").off("click.foobox").on("click.foobox",function(a){a.preventDefault(),a.stopPropagation(),c.close()}).end().find(".fbx-prev").off("click.foobox").on("click.foobox",function(b){b.preventDefault(),b.stopPropagation(),a(this).hasClass("fbx-disabled")||c.prev()}).end().find(".fbx-next").off("click.foobox").on("click.foobox",function(b){b.preventDefault(),b.stopPropagation(),a(this).hasClass("fbx-disabled")||c.next()})}},this.prioritize=function(){FooBox.instances.length>1&&c.element.nextAll(".fbx-modal:last").after(c.element)},this.preload=function(){if(1==c.FooBox.options.preload){var a=c.FooBox.items.prev();a&&a.handler.preload(a);var b=c.FooBox.items.next();b&&b.handler.preload(b)}},this.show=function(b){function e(a){if(c.loaderTimeout.stop(),c.element.removeClass("fbx-loading"),c._busy=!1,d.error(a),!c.FooBox.raise("foobox.onError",{error:a}).isDefaultPrevented()){var e=c.FooBox.items.error(f.index);null!=e&&c.show(b)}}b=b||!1,c._first=b,c._busy=!0,c._closed=!1,a("body").addClass("fbx-active"),c.FooBox.options.hideScrollbars&&a("html").addClass("fbx-no-scroll");var f=c.FooBox.items.current();1==f.error?c.element.addClass("fbx-error"):c.element.removeClass("fbx-error"),c.element.hasClass("fbx-show")||(c.prioritize(),c.element.addClass("fbx-loading").find(".fbx-inner").css({width:"100px",height:"100px","margin-top":"-50px","margin-left":"-50px"}));var g=c.element.find(".fbx-item-current"),h=c.element.find(".fbx-item-next");if(h.hide().css("opacity","0"),c.element.find(".fbx-count").text(c.FooBox.options.countMessage.replace("%index",""+(c.FooBox.items.indexes.current+1)).replace("%total",""+c.FooBox.items.array.length)),c.FooBox.raise("foobox.beforeLoad",{item:f}).isDefaultPrevented())return void(c._busy=!1);if(f.handler.hasChanged(f)){var i=f.index,j=f.element.get(0);f=f.handler.parse(f.element);var k=c.FooBox.raise("foobox.parseItem",{element:f.element,item:f});j.index=k.fb.item.index=i,c.FooBox.items.array[i]=k.fb.item}c.preload(),c.loaderTimeout.start(function(){c.element.addClass("fbx-loading")},c.FooBox.options.loaderTimeout),setTimeout(function(){c.checkForLoop(f),f.handler.load(f,h,function(a){return 1==c._closed?void(c._busy=!1):void c.transitionOut(g,function(){return 1==c._closed?void(c._busy=!1):void c.resize(a,h,function(){return 1==c._closed?void(c._busy=!1):(c.loaderTimeout.stop(),h.show(),void c.transitionIn(h,function(){return 1==c._closed?void(c._busy=!1):(h.add(g).toggleClass("fbx-item-next fbx-item-current"),g.empty(),void(c.element.hasClass("fbx-show")?(c.element.removeClass("fbx-loading"),c.FooBox.raise("foobox.afterLoad",{item:f}),c._busy=!1):c.FooBox.raise("foobox.beforeShow",{item:f}).isDefaultPrevented()||(c.element.removeClass("fbx-loading").addClass("fbx-show"),c.FooBox.raise("foobox.afterShow",{item:f}),c.FooBox.raise("foobox.afterLoad",{item:f}),c._busy=!1)))},e))},e)},e)},e)},c.FooBox.options.loadDelay)},this.checkForLoop=function(a){1!=c.FooBox.options.loop&&(c.element.find(".fbx-prev, .fbx-next").removeClass("fbx-disabled"),c.FooBox.items.is.first(a)&&c.element.find(".fbx-prev").addClass("fbx-disabled"),c.FooBox.items.is.last(a)&&c.element.find(".fbx-next").addClass("fbx-disabled"))},this.resize=function(b,d,e,f){try{if(0===b.width||0===b.height)return void(a.isFunction(f)&&f(FooBox.format("Invalid size supplied. Width = {0}, Height = {1}",b.width,b.height)));var g=c.FooBox.items.current(),h=new FooBox.Size(b.width,b.height),i=c.element.find(".fbx-inner"),j=c.element.find(".fbx-inner-spacer"),k=parseInt(j.css("padding-top"),0),l=parseInt(j.css("padding-bottom"),0),m=parseInt(j.css("padding-left"),0),n=parseInt(j.css("padding-right"),0),o=parseInt(i.css("border-top-width"),0),p=parseInt(i.css("border-bottom-width"),0),q=parseInt(i.css("border-left-width"),0),r=parseInt(i.css("border-right-width"),0),s=parseInt(i.css("padding-left"),0),t=k+l+2*s+o+p,u=m+n+2*s+q+r,v=new FooBox.Size(parseInt(i.css("width"),0),parseInt(i.css("height"),0)),w=new FooBox.Size(c.element.width()-u,c.element.height()-t),x=w.width/b.width;b.height*x>w.height&&(x=w.height/b.height),c.FooBox.options.fitToScreen===!0||1==g.proportion&&(b.height>w.height||b.width>w.width)?(b.height=Math.floor(b.height*x),b.width=Math.floor(b.width*x)):0==g.proportion&&(b.height>w.height&&(b.height=w.height),b.width>w.width&&(b.width=w.width)),b.height<100&&(b.height=100),b.width<100&&(b.width=100);var y=-(b.height/2+s+(l-k/2)/2)+(q+r)/2,z=-(b.width/2+s+(q+r)/2);if(v.equalTo(b))i.css({height:b.height,width:b.width,"margin-top":y,"margin-left":z}),c.overflow(g,h,b,d),c.FooBox.raise("foobox.afterResize",{item:g,size:b}),a.isFunction(e)&&e();else if(!c.FooBox.raise("foobox.beforeResize",{item:g,size:b,offset:{top:y,left:z},error:f,success:e}).isDefaultPrevented())if(y=-(b.height/2+s+(l-k/2)/2)+(q+r)/2,z=-(b.width/2+s+(q+r)/2),c.element.hasClass("fbx-show"))if(FooBox.browser.supportsTransitions()){var A=c.FooBox.options.resizeSpeed/1e3,B="all "+A+"s ease-in-out";i.css({WebkitTransition:B,MozTransition:B,MsTransition:B,OTransition:B,transition:B}),i.css({height:b.height,width:b.width,"margin-top":y,"margin-left":z}),setTimeout(function(){i.css({WebkitTransition:"",MozTransition:"",MsTransition:"",OTransition:"",transition:""}),c.overflow(g,h,b,d),c.FooBox.raise("foobox.afterResize",{item:g,size:b}),a.isFunction(e)&&e(b)},c.FooBox.options.resizeSpeed)}else i.animate({height:b.height,width:b.width,"margin-top":y,"margin-left":z},c.FooBox.options.resizeSpeed,function(){c.overflow(g,h,b,d),c.FooBox.raise("foobox.afterResize",{item:g,size:b}),a.isFunction(e)&&e(b)});else i.css({height:b.height,width:b.width,"margin-top":y,"margin-left":z}),c.overflow(g,h,b,d),c.FooBox.raise("foobox.afterResize",{item:g,size:b}),a.isFunction(e)&&e()}catch(C){a.isFunction(f)&&f(C)}},this.overflow=function(a,b,d,e){var f=e.find(".fbx-item");1==a.overflow&&(d.width<.8*b.width||d.height<.8*b.height)||1==a.overflow&&0==a.proportion&&(d.width0?(c.element.data("fbx_instance",c),c.options.containerCssClass&&c.element.addClass(c.options.containerCssClass),c.setup.bind(),c.modal.init(b,c.options),FooBox.handlers.call(c,"init",c.element,c.options),c.raise("foobox.initialized"),a.isFunction(c.options.initCallback)&&c.options.initCallback.call(c)):c.destroy()},this.reinit=function(a){c.options=FooBox.options.merge(c.options,a||{}),c.items.init(!0),c.items.array.length>0?(c.setup.bind(),c.modal.reinit(c.options),FooBox.handlers.call(c,"reinit",c.options),c.raise("foobox.reinitialized")):c.destroy()},this.destroy=function(){FooBox.addons.call(c,"destroy"),FooBox.handlers.call(c,"destroy"),c.items.destroy(),c.modal.destroy(),c.element.removeClass("fbx-instance fbx-item").data({fbx_instance:null,fbx_p_instance:null}),c.id==FooBox.instances.length?FooBox.instances.splice(c.id-1,1):FooBox.instances[c.id-1]=null,c.raise("foobox.destroy")},this.setup={bind:function(){a(c.options.externalSelector).off("click.fooboxExternal").on("click.fooboxExternal",function(b){b.preventDefault();var c=a(this).data("foobox"),d=a(c),e=d.data("fbx_instance")||d.data("fbx_p_instance");return d.length>0&&e instanceof FooBox.Instance&&e.modal instanceof FooBox.Modal&&e.modal.show(!0),!1})}},this.items={array:[],indexes:{prev:-1,current:0,next:1,direction:"*",set:function(a){var b=c.items.indexes.current;a=a||0,a=a>c.items.array.length-1?0:0>a?c.items.array.length-1:a;var d=a-1,e=a+1;c.items.indexes.current=a,c.items.indexes.prev=0>d?c.items.array.length-1:d,c.items.indexes.next=e>c.items.array.length-1?0:e,c.items.indexes.direction=c.items.indexes._direction(b,a,c.items.array.length-1)},_direction:function(a,b,c){return 0==b&&a==c?">":b==c&&0==a?"<":b>a?">":a>b?"<":"*"}},new_array:function(b){b=b||!1;var d,e,f,g=0;if(1==b){if(c.items.array.length>0){for(var h=0;h0){d.filter&&a.isArray(d.filter.items)&&(e=d.filter.items.slice(0));var f=a.map(e,function(a){return a.$anchor?a.$anchor.get(0):null});a(f).not(c.options.excludes).off("click.item").filter(function(){return c.items.add(this)}).on("click.item",c.items.clicked),c.element.on("click.item",".fbx-link",c.items.clicked)}else c.element.find(c.options.selector).not(c.options.excludes).off("click.item").filter(function(){return c.items.add(this)}).on("click.item",c.items.clicked),c.element.on("click.item",".fbx-link",c.items.clicked);c.items.rel()},destroy:function(){c.element.off("click.item",".fbx-link",c.items.clicked);var b,d;for(d=0;d0&&e<=c.items.array.length-1&&(d=c.items.array[e]),d},parse:function(b,d){b=FooBox.isjQuery(b)?b:a(b);for(var e,f,g=0;gb&&1==c.items.array[b].error)return c.items.array[b];var e,f,g=FooBox.handlers.get(c,"html"),h=!1;if(null==g&&(g=new d(c)),null!==c.options.error.match(/^#/i)&&a(c.options.error).length>0)e=a(c.options.error),h=!0;else{var i=FooBox.format('

{0}

',c.options.error);e=a(i)}return f=new FooBox.Item(g.type,e.get(0),g),f.selector=1==h?c.options.error:null,f.index=b,f.error=!0,f.title=e.data("title")||null,f.description=e.data("description")||null,f.width=e.data("width")||240||null,f.height=e.data("height")||240||null,f.content=1==h?null:e,f.fullscreen=!0,f.handler=g,c.items.array[b]=f,f},first:function(a){for(var b=null,d=0;d1},clicked:function(a){return a.preventDefault(),c.items.indexes.set(this.index),c.modal.show(!0),!1}},this},FooBox.open=function(b){if(1==FooBox.isDeepLink)return null;var c,d=null;if("object"==typeof b){var e=document.createElement("a");a(e).foobox(b),d=a(e).data("fbx_instance")}else"number"==typeof b?c=b:(c=parseInt(b||0),c=isNaN(c)?0:c),c=c>FooBox.instances.length-1?FooBox.instances.length-1:0>c?0:c,d=FooBox.instances[c];return null!=d&&d.modal instanceof FooBox.Modal?(d.modal.show(!0),d):null},FooBox.close=function(){var a,b=[],c=null;for(a=0;a0&&a.maxHeight>0&&(a.width>a.maxWidth||a.height>a.maxHeight)){ var c=a.width>a.height?a.maxWidth/a.width:a.maxHeight/a.height;a.width*=c,a.height*=c}return new b.Size(a.width,a.height)}return new b.Size(0,0)},this.hasChanged=function(a){if(b.isjQuery(a.element)){var c=d.FooBox.options.images.findUrl(d.FooBox,a.element);return a.url!=c}return!1}},b.handlers.register(b.ImageHandler,c)}(jQuery,window.FooBox),function(a,b){var c={keyboard:{enabled:!0,preventDefault:!1,stopPropagation:!1}};b.Keyboard=function(a){this.FooBox=a;var c=this;this.preinit=function(a){c.handlers.unbind(!0),a.on({"foobox.initialized foobox.reinitialized":c.handlers.initialized,"foobox.setupHtml":c.handlers.setupHtml})},this.destroy=function(){c.handlers.unbind(!0)},this.handlers={unbind:function(a){a=a||!1,a&&c.FooBox.element.off({"foobox.initialized foobox.reinitialized":c.handlers.initialized,"foobox.setupHtml":c.handlers.setupHtml}),c.FooBox.element.off("foobox.afterLoad",c.handlers.afterLoad),b.isjQuery(c.FooBox.modal.element)&&c.FooBox.modal.element.off("keydown.foobox",c.handlers.onKeydown)},initialized:function(){c.handlers.unbind(),1==c.FooBox.options.keyboard.enabled&&(c.FooBox.element.on("foobox.afterLoad",c.handlers.afterLoad),b.isjQuery(c.FooBox.modal.element)&&c.FooBox.modal.element.on("keydown.foobox",c.handlers.onKeydown))},setupHtml:function(a){a.fb.modal.attr("tabindex",0)},afterLoad:function(a){a.fb.modal.focus()},onKeydown:function(a){var b=c.FooBox.modal,d=c.FooBox.options.keyboard;b.element.hasClass("fbx-show")&&(b.element.hasClass("fbx-fullscreen-mode")||27!==a.which?c.FooBox.items.multiple()&&37===a.which?b.prev():c.FooBox.items.multiple()&&39===a.which&&b.next():b.close(),1==d.preventDefault&&a.preventDefault(),1==d.stopPropagation&&a.stopPropagation(),c.FooBox.raise("foobox.keydown",{keyCode:a.which}))}}},b.addons.register(b.Keyboard,c)}(jQuery,window.FooBox),function(a,b){var c={hideNavOnMobile:!1,resizeTimeout:300,breakpoints:{phone:640,tablet:1024},iosInterval:200};b.BPInfo=function(c){var d="undefined"!=typeof window.devicePixelRatio&&b.browser.isMobile?window.devicePixelRatio:1;this.width=(window.innerWidth||document.documentElement.clientWidth||(document.body?document.body.offsetWidth:0))/d,this.height=(window.innerHeight||document.documentElement.clientHeight||(document.body?document.body.offsetHeight:0))/d,this.orientation=this.width>this.height?"fbx-landscape":"fbx-portrait";var e,f=null;if(a.isArray(c))for(var g=0;g=c?(e=!0,d.iosRedraw()):(null==e||1==e)&&c>=h&&(e=!1,d.iosRedraw()),d.timers.ios.start(d.handlers.ios,d.FooBox.options.iosInterval)}},this.setup={breakpoints:function(){d.breakpoint.values=[],d.breakpoint.names="";for(var a in d.FooBox.options.breakpoints)d.FooBox.options.breakpoints.hasOwnProperty(a)&&(d.breakpoint.values.push({name:d.fixName(a),width:d.FooBox.options.breakpoints[a]}),d.breakpoint.names+=d.fixName(a)+" ");d.breakpoint.values.sort(function(a,b){return a.width-b.width})}},this.iosRedraw=function(){window.scrollTo(0,document.body.scrollTop),a(window).trigger("resize")},this.fixName=function(a){return/^fbx-[a-zA-Z0-9]/.test(a)?a:"fbx-"+a},this.style=function(){var a=new b.BPInfo(d.breakpoint.values),c=d.FooBox.modal.element;c.removeClass(d.breakpoint.names).removeClass("fbx-desktop fbx-landscape fbx-portrait").addClass(a.breakpoint).addClass(a.orientation),d.FooBox.options.hideNavOnMobile===!0?c.addClass("fbx-no-nav"):c.removeClass("fbx-no-nav")}},b.Responsive.metaCheck=function(){var b=a("meta[name=viewport]"),c=b.attr("content");if(b.length>0&&"string"==typeof c){for(var d=c.split(","),e=!1,f=!1,g=0;g",{"class":"fbx-caption"}),e=a("",{"class":"fbx-open-caption",html:"…"}).on("click.captions",d.handlers.toggleCaptions);"string"==typeof b.fb.options.modalClass&&-1!=b.fb.options.modalClass.indexOf("fbx-sticky-caption")?b.fb.modal.append(c,e):(b.fb.modal.find(".fbx-stage").append(c),b.fb.modal.find(".fbx-inner").append(e))},setupOptions:function(a){a.fb.modal.find(".fbx-caption").addClass(d.animation())},close:function(a){1!=a.fb.options.captions.onlyShowOnHover&&a.fb.modal.find(".fbx-caption").addClass(d.animation())},beforeLoad:function(a){1!=a.fb.options.captions.onlyShowOnHover&&a.fb.modal.find(".fbx-caption").addClass(d.animation())},afterLoad:function(a){var b=a.fb.item;return!b||b.error||b.captionLoaded||(a.fb.instance.raise("foobox.alterCaption",{element:a.fb.element,item:b}),b.captionLoaded=!0),1==a.fb.options.captions.onlyShowOnHover?void d.update():void(0==a.fb.options.captions.onlyShowOnClick&&d.show())},onError:function(a){a.fb.modal.find(".fbx-caption").addClass(d.animation())},parseItem:function(c){var e=c.fb.options.captions;if(c.fb.item.captions&&0!=e.enabled){var f,g,h="";if(null!=c.fb.element){var i=a(c.fb.element).data("titleSource")||a(c.fb.instance.element).data("titleSource")||e.titleSource,j=a(c.fb.element).data("descSource")||a(c.fb.instance.element).data("descSource")||e.descSource;"none"!=i&&(f=c.fb.element.data("captionTitle")||c.fb.element.data("title")||d.text(c.fb.element,i)),"none"!=j&&(g=c.fb.element.data("captionDesc")||c.fb.element.data("description")||d.text(c.fb.element,j))}else f=c.fb.item.title,g=c.fb.item.description;f=null==f||"undefined"==typeof f?"":f+"",g=null==g||"undefined"==typeof g?"":g+"",f&&f==g&&(g=null),h="string"==typeof f&&f.length>0?b.format('
{0}
',f):h,h="string"==typeof g&&g.length>0?h+b.format('
{0}
',g):h,c.fb.item.title=f,c.fb.item.description=g,c.fb.item.caption=h,c.fb.instance.raise("foobox.createCaption",{element:c.fb.element,item:c.fb.item})}}},this.text=function(b,c){var e;switch(c){case"find":e=a.trim(b.data("enviraCaption")||b.data("title")||b.attr("title")||b.find("img:first").data("title")||b.find("img:first").data("alt")||b.find("img:first").attr("title")||b.find("img:first").attr("alt"));break;case"image_find":e=a.trim(b.find("img:first").data("title")||b.find("img:first").data("alt")||b.find("img:first").attr("title")||b.find("img:first").attr("alt"));break;case"image":e=a.trim(b.find("img:first").data("title")||b.find("img:first").attr("title"));break;case"image_alt":e=a.trim(b.find("img:first").data("alt")||b.find("img:first").attr("alt"));break;case"anchor":e=a.trim(b.data("enviraCaption")||b.data("title")||b.attr("title"));break;default:e=null}return d.FooBox.options.captions.prettify&&(e=d.prettifier(e)),e},this.animation=function(){switch(d.FooBox.options.captions.animation){case"fade":return"fbx-fade-caption";case"slide":return"fbx-slide-caption";default:return"fbx-hide-caption"}},this.hide=function(){var a=d.FooBox.items.current(),b=d.FooBox.modal.element.find(".fbx-caption");return d.FooBox.options.captions.enabled&&a.captions&&"string"==typeof a.caption&&0!=a.caption.length?(b.addClass(d.animation()),void d.FooBox.raise("foobox.captionsHide",{item:a})):void b.addClass("fbx-hide-caption")},this.show=function(){var a=d.FooBox,c=a.items.current(),e=a.modal.element.find(".fbx-caption");return!a.options.captions.enabled||!c.captions||"string"!=typeof c.caption||0==c.caption.length||a.modal.element.hasClass("fbx-captions-hidden")||b.isjQuery(c.element)&&c.element.hasClass("no-captions")?void e.addClass("fbx-hide-caption"):(d.update(),e.removeClass("fbx-fade-caption fbx-slide-caption fbx-hide-caption"),void d.FooBox.raise("foobox.captionsShow",{item:c}))},this.update=function(){var c=d.FooBox.items.current(),e=d.FooBox.modal.element.find(".fbx-caption");e.html(c.caption).find('a[href^="#"]').filter(function(){var c=a(this).attr("href"),d=a(c),e=d.data("fbx_instance")||d.data("fbx_p_instance");return d.length>0&&e instanceof b.Instance?(a(this).data("hrefTarget",d.get(0)),!0):!1}).off("click.captions").on("click.captions",function(c){c.preventDefault();var e=a(this).data("hrefTarget"),f=a(e).data("fbx_instance")||a(e).data("fbx_p_instance");return f instanceof b.Instance&&(d.FooBox.modal.close(),f.items.indexes.set(e.index),f.modal.show()),!1}),a("
",{"class":"fbx-close-caption",html:"×"}).on("click.captions",d.handlers.toggleCaptions).prependTo(e)},this.prettifier=function(a){return"string"!=typeof a?null:(a=a.replace(/\s*-\d+/g,"").replace(/\s*_\d+/g,"").replace(/-/g," ").replace(/_/g," "),a=a.replace(/\w\S*/g,function(a){return-1!=a.indexOf("#")?a:a.charAt(0).toUpperCase()+a.substr(1).toLowerCase()}))}},b.addons.register(b.Captions,c)}(jQuery,window.FooBox),function(a,b){var c={wordpress:{enabled:!1}};b.Wordpress=function(c){this.FooBox=c;var d=this;this.preinit=function(a){d.handlers.unbind(!0),a.on("foobox.createCaption",d.handlers.onCreateCaption)},this.destroy=function(){d.handlers.unbind(!0)},this.handlers={unbind:function(a){a=a||!1,a&&d.FooBox.element.off("foobox.createCaption",d.handlers.onCreateCaption)},onCreateCaption:function(c){var d=c.fb.options,e=c.fb.instance.element,f=c.fb.item.element,g="",h=c.fb.item.title,i=c.fb.item.description;if(1==d.wordpress.enabled&&b.isjQuery(f)){var j=f.data("captionTitle")||f.data("title"),k=f.data("captionDesc")||f.data("description");if(e.hasClass("gallery"))d.captions.overrideTitle===!1&&(h=j||f.parents(".gallery-item:first").find(".wp-caption-text:first").html()||f.parents(".gallery-item:first").find(".gallery-caption:first").html()||h||""),d.captions.overrideDesc===!1&&(i=k||f.find("img").attr("alt")||i||"");else if(e.hasClass("wp-caption")||f.hasClass("wp-caption"))d.captions.overrideTitle===!1&&(h=j||f.find("img").attr("title")||f.parents(".wp-caption:first").find(".wp-caption-text:first").html()||h||""),d.captions.overrideDesc===!1&&(i=k||f.find("img").attr("alt")||i||"");else if(f.parents(".wp-caption:first").length>0)d.captions.overrideTitle===!1&&(h=j||f.parents(".wp-caption:first").find("img").attr("title")||f.parents(".wp-caption:first").find(".wp-caption-text:first").html()||h||""),d.captions.overrideDesc===!1&&(i=k||f.parents(".wp-caption:first").find("img").attr("alt")||i||"");else if(e.hasClass("tiled-gallery"))d.captions.overrideTitle===!1&&(h=j||f.parents(".tiled-gallery-item:first").find(".tiled-gallery-caption").html()||f.find("img").data("image-title")||f.find("img").attr("title")||h||""),d.captions.overrideDesc===!1&&(i=k||a.trim(f.find("img").data("image-description")).replace(/(^

)|(<\/p>$)/gi,"")||i||"");else{if(!e.hasClass("wp-block-gallery")&&!e.hasClass("wp-block-image"))return;d.captions.overrideTitle===!1&&(h=j||f.parents("figure:first").find("figcaption").html()||h||""),d.captions.overrideDesc===!1&&(i=k||i||"")}h+="",i+="",h=h||"",i=i||"";var l=a("

"),m=l.html(h).text(),n=l.html(i).text();(a.trim(h)==a.trim(i)||m==n)&&(i=null),g="string"==typeof h&&h.length>0?b.format('
{0}
',h):g,g="string"==typeof i&&i.length>0?g+b.format('
{0}
',i):g,c.fb.item.title=h,c.fb.item.description=i,c.fb.item.caption=g}}}},b.addons.register(b.Wordpress,c)}(jQuery,window.FooBox),function(a,b){var c={pan:{enabled:!0,showOverview:!0,position:"fbx-top-right"}};b.Pan=function(c){this.FooBox=c;var d,e,f,g,h=this,i=!1,j=!1,k=null,l=null,m=null,n=null,o=null,p=0;this.preinit=function(a){h.handlers.unbind(!0),a.on({"foobox.initialized foobox.reinitialized":h.handlers.initialized})},this.destroy=function(){h.handlers.unbind(!0)},this.setOverview=function(){var a=parseInt(n.css("max-width")),b=parseInt(n.css("max-height")),c=a/k.width,d=b/k.height;p=c>d?d:c;var e=k.width*p,f=k.height*p;n.width(e).height(f).css("background-image","url("+k.url+")")},this.setViewport=function(){var a=m.width(),b=m.height(),c=a*p,d=b*p;o.width(c).height(d)},this.disableCaptionImageClick=function(){var a=h.FooBox.modal.element,c=b.objects.get("addons",h.FooBox,function(a){return a instanceof b.Captions});c&&a.find(".fbx-item-current, .fbx-item-next").off("click.captions",c.handlers.toggleCaptions)},this.enableCaptionImageClick=function(){var a=h.FooBox.modal.element,c=b.objects.get("addons",h.FooBox,function(a){return a instanceof b.Captions});c&&a.find(".fbx-item-current, .fbx-item-next").on("click.captions",c.handlers.toggleCaptions)},this.handlers={unbind:function(a){a=a||!1,a&&h.FooBox.element.off({"foobox.initialized foobox.reinitialized":h.handlers.initialized}),h.FooBox.element.off({"foobox.afterLoad":h.handlers.onAfterLoad,"foobox.showOverflow":h.handlers.onShowOverflow,"foobox.hideOverflow foobox.beforeLoad":h.handlers.onHideOverflow}),h.FooBox.modal instanceof b.Modal&&b.isjQuery(h.FooBox.modal.element)&&h.FooBox.modal.element.find(".fbx-stage").off({mousedown:h.handlers.onMouseDown,mousemove:h.handlers.onMouseMove,mouseup:h.handlers.onMouseUp}).removeClass("fbx-pannable fbx-panning")},initialized:function(a){h.handlers.unbind(),a.fb.options.pan.enabled===!0&&h.FooBox.element.on({"foobox.close":h.handlers.onMouseUp,"foobox.afterLoad":h.handlers.onAfterLoad,"foobox.showOverflow":h.handlers.onShowOverflow,"foobox.hideOverflow foobox.beforeLoad":h.handlers.onHideOverflow})},onAfterLoad:function(a){i===!0&&"image"==a.fb.item.handler.type&&(h.setOverview(),h.setViewport())},onShowOverflow:function(b){"image"==b.fb.item.handler.type&&(i===!0?(h.setOverview(),h.setViewport()):(i=!0,h.disableCaptionImageClick(),k=b.fb.item,m=h.FooBox.modal.element.addClass("fbx-pannable-item").find(".fbx-stage").on({mousedown:h.handlers.onMouseDown,mousemove:h.handlers.onMouseMove,"mouseup mouseleave":h.handlers.onMouseUp}).addClass("fbx-pannable"),l=b.fb.container,b.fb.options.pan.showOverview===!0&&(n=a("
",{"class":"fbx-pan-overview"}).addClass(b.fb.options.pan.position).on("click",h.handlers.onOverviewClick).appendTo(m),o=a("
",{"class":"fbx-pan-viewport"}).appendTo(n),l.on("scroll",h.handlers.onScroll),h.setOverview(),h.setViewport())))},onHideOverflow:function(a){i===!0&&(i=!1,h.enableCaptionImageClick(),a.fb.options.pan.showOverview===!0&&n.remove(),l.off("scroll",h.handlers.onScroll),m.off({mousedown:h.handlers.onMouseDown,mousemove:h.handlers.onMouseMove,"mouseup mouseleave":h.handlers.onMouseUp}).removeClass("fbx-pannable fbx-panning"),h.FooBox.modal.element.removeClass("fbx-pannable-item"))},onMouseDown:function(a){if(i===!0){a.preventDefault(),m.addClass("fbx-panning");var b=l.get(0);j=!0,d=a.pageX,e=a.pageY,f=b.scrollLeft,g=b.scrollTop}},onMouseMove:function(a){if(j===!0&&i===!0){var b=l.get(0);b.scrollLeft=f-(a.pageX-d),b.scrollTop=g-(a.pageY-e)}},onMouseUp:function(){i===!0&&(j=!1,m.removeClass("fbx-panning"),d=0,e=0,f=0,g=0)},onScroll:function(){var a=l.get(0),b=a.scrollTop/k.height*100,c=a.scrollLeft/k.width*100;o.css({top:b+"%",left:c+"%"})},onOverviewClick:function(b){var c=a(this).offset(),d=(b.pageX-c.left)/p,e=(b.pageY-c.top)/p,f=d-l.width()/2,g=e-l.height()/2;l.animate({scrollTop:g,scrollLeft:f},300)}}},b.addons.register(b.Pan,c)}(jQuery,window.FooBox),function(a,b){var c={swipe:{enabled:!0,min:80}};b.Swipe=function(a){this.FooBox=a,this.isMoving=!1;var c,d=this;this.preinit=function(a){d.handlers.unbind(!0),a.on("foobox.initialized foobox.reinitialized",d.handlers.initialized)},this.destroy=function(){d.handlers.unbind(!0)},this.handlers={unbind:function(a){a=a||!1,a&&d.FooBox.element.off("foobox.initialized foobox.reinitialized",d.handlers.initialized),d.FooBox.modal instanceof b.Modal&&b.isjQuery(d.FooBox.modal.element)&&d.FooBox.modal.element.off({touchstart:d.handlers.onTouchStart,touchmove:d.handlers.onTouchMove})},initialized:function(a){d.handlers.unbind(),a.fb.options.swipe.enabled===!0&&a.fb.modal.on("touchstart",d.handlers.onTouchStart)},onTouchStart:function(a){var b=a.originalEvent.touches||a.touches;1==b.length&&d.FooBox.items.multiple()&&(c=b[0].pageX,d.isMoving=!0,d.FooBox.modal.element.on("touchmove",d.handlers.onTouchMove))},onTouchMove:function(a){if(d.isMoving){var b=a.originalEvent.touches||a.touches,e=b[0].pageX,f=c-e;Math.abs(f)>=d.FooBox.options.swipe.min&&(d.cancelTouch(),f>0?(d.FooBox.raise("foobox.swipeRight"),d.FooBox.modal.next()):(d.FooBox.raise("foobox.swipeLeft"),d.FooBox.modal.prev()))}}},this.cancelTouch=function(){d.FooBox.modal.element.off("touchmove",d.handlers.onTouchMove),c=null,d.isMoving=!1}},b.addons.register(b.Swipe,c)}(jQuery,window.FooBox); // source --> https://fpacademy.nl/wp-content/plugins/deasil-core/js/jquery.waypoints.js?ver=5.2.2 /*! Waypoints - 4.0.1 Copyright © 2011-2016 Caleb Troughton Licensed under the MIT license. https://github.com/imakewebthings/waypoints/blob/master/licenses.txt */ (function() { 'use strict' var keyCounter = 0 var allWaypoints = {} /* http://imakewebthings.com/waypoints/api/waypoint */ function Waypoint(options) { if (!options) { throw new Error('No options passed to Waypoint constructor') } if (!options.element) { throw new Error('No element option passed to Waypoint constructor') } if (!options.handler) { throw new Error('No handler option passed to Waypoint constructor') } this.key = 'waypoint-' + keyCounter this.options = Waypoint.Adapter.extend({}, Waypoint.defaults, options) this.element = this.options.element this.adapter = new Waypoint.Adapter(this.element) this.callback = options.handler this.axis = this.options.horizontal ? 'horizontal' : 'vertical' this.enabled = this.options.enabled this.triggerPoint = null this.group = Waypoint.Group.findOrCreate({ name: this.options.group, axis: this.axis }) this.context = Waypoint.Context.findOrCreateByElement(this.options.context) if (Waypoint.offsetAliases[this.options.offset]) { this.options.offset = Waypoint.offsetAliases[this.options.offset] } this.group.add(this) this.context.add(this) allWaypoints[this.key] = this keyCounter += 1 } /* Private */ Waypoint.prototype.queueTrigger = function(direction) { this.group.queueTrigger(this, direction) } /* Private */ Waypoint.prototype.trigger = function(args) { if (!this.enabled) { return } if (this.callback) { this.callback.apply(this, args) } } /* Public */ /* http://imakewebthings.com/waypoints/api/destroy */ Waypoint.prototype.destroy = function() { this.context.remove(this) this.group.remove(this) delete allWaypoints[this.key] } /* Public */ /* http://imakewebthings.com/waypoints/api/disable */ Waypoint.prototype.disable = function() { this.enabled = false return this } /* Public */ /* http://imakewebthings.com/waypoints/api/enable */ Waypoint.prototype.enable = function() { this.context.refresh() this.enabled = true return this } /* Public */ /* http://imakewebthings.com/waypoints/api/next */ Waypoint.prototype.next = function() { return this.group.next(this) } /* Public */ /* http://imakewebthings.com/waypoints/api/previous */ Waypoint.prototype.previous = function() { return this.group.previous(this) } /* Private */ Waypoint.invokeAll = function(method) { var allWaypointsArray = [] for (var waypointKey in allWaypoints) { allWaypointsArray.push(allWaypoints[waypointKey]) } for (var i = 0, end = allWaypointsArray.length; i < end; i++) { allWaypointsArray[i][method]() } } /* Public */ /* http://imakewebthings.com/waypoints/api/destroy-all */ Waypoint.destroyAll = function() { Waypoint.invokeAll('destroy') } /* Public */ /* http://imakewebthings.com/waypoints/api/disable-all */ Waypoint.disableAll = function() { Waypoint.invokeAll('disable') } /* Public */ /* http://imakewebthings.com/waypoints/api/enable-all */ Waypoint.enableAll = function() { Waypoint.Context.refreshAll() for (var waypointKey in allWaypoints) { allWaypoints[waypointKey].enabled = true } return this } /* Public */ /* http://imakewebthings.com/waypoints/api/refresh-all */ Waypoint.refreshAll = function() { Waypoint.Context.refreshAll() } /* Public */ /* http://imakewebthings.com/waypoints/api/viewport-height */ Waypoint.viewportHeight = function() { return window.innerHeight || document.documentElement.clientHeight } /* Public */ /* http://imakewebthings.com/waypoints/api/viewport-width */ Waypoint.viewportWidth = function() { return document.documentElement.clientWidth } Waypoint.adapters = [] Waypoint.defaults = { context: window, continuous: true, enabled: true, group: 'default', horizontal: false, offset: 0 } Waypoint.offsetAliases = { 'bottom-in-view': function() { return this.context.innerHeight() - this.adapter.outerHeight() }, 'right-in-view': function() { return this.context.innerWidth() - this.adapter.outerWidth() } } window.Waypoint = Waypoint }()); (function() { 'use strict' function requestAnimationFrameShim(callback) { window.setTimeout(callback, 1000 / 60) } var keyCounter = 0 var contexts = {} var Waypoint = window.Waypoint var oldWindowLoad = window.onload /* http://imakewebthings.com/waypoints/api/context */ function Context(element) { this.element = element this.Adapter = Waypoint.Adapter this.adapter = new this.Adapter(element) this.key = 'waypoint-context-' + keyCounter this.didScroll = false this.didResize = false this.oldScroll = { x: this.adapter.scrollLeft(), y: this.adapter.scrollTop() } this.waypoints = { vertical: {}, horizontal: {} } element.waypointContextKey = this.key contexts[element.waypointContextKey] = this keyCounter += 1 if (!Waypoint.windowContext) { Waypoint.windowContext = true Waypoint.windowContext = new Context(window) } this.createThrottledScrollHandler() this.createThrottledResizeHandler() } /* Private */ Context.prototype.add = function(waypoint) { var axis = waypoint.options.horizontal ? 'horizontal' : 'vertical' this.waypoints[axis][waypoint.key] = waypoint this.refresh() } /* Private */ Context.prototype.checkEmpty = function() { var horizontalEmpty = this.Adapter.isEmptyObject(this.waypoints.horizontal) var verticalEmpty = this.Adapter.isEmptyObject(this.waypoints.vertical) var isWindow = this.element == this.element.window if (horizontalEmpty && verticalEmpty && !isWindow) { this.adapter.off('.waypoints') delete contexts[this.key] } } /* Private */ Context.prototype.createThrottledResizeHandler = function() { var self = this function resizeHandler() { self.handleResize() self.didResize = false } this.adapter.on('resize.waypoints', function() { if (!self.didResize) { self.didResize = true Waypoint.requestAnimationFrame(resizeHandler) } }) } /* Private */ Context.prototype.createThrottledScrollHandler = function() { var self = this function scrollHandler() { self.handleScroll() self.didScroll = false } this.adapter.on('scroll.waypoints', function() { if (!self.didScroll || Waypoint.isTouch) { self.didScroll = true Waypoint.requestAnimationFrame(scrollHandler) } }) } /* Private */ Context.prototype.handleResize = function() { Waypoint.Context.refreshAll() } /* Private */ Context.prototype.handleScroll = function() { var triggeredGroups = {} var axes = { horizontal: { newScroll: this.adapter.scrollLeft(), oldScroll: this.oldScroll.x, forward: 'right', backward: 'left' }, vertical: { newScroll: this.adapter.scrollTop(), oldScroll: this.oldScroll.y, forward: 'down', backward: 'up' } } for (var axisKey in axes) { var axis = axes[axisKey] var isForward = axis.newScroll > axis.oldScroll var direction = isForward ? axis.forward : axis.backward for (var waypointKey in this.waypoints[axisKey]) { var waypoint = this.waypoints[axisKey][waypointKey] if (waypoint.triggerPoint === null) { continue } var wasBeforeTriggerPoint = axis.oldScroll < waypoint.triggerPoint var nowAfterTriggerPoint = axis.newScroll >= waypoint.triggerPoint var crossedForward = wasBeforeTriggerPoint && nowAfterTriggerPoint var crossedBackward = !wasBeforeTriggerPoint && !nowAfterTriggerPoint if (crossedForward || crossedBackward) { waypoint.queueTrigger(direction) triggeredGroups[waypoint.group.id] = waypoint.group } } } for (var groupKey in triggeredGroups) { triggeredGroups[groupKey].flushTriggers() } this.oldScroll = { x: axes.horizontal.newScroll, y: axes.vertical.newScroll } } /* Private */ Context.prototype.innerHeight = function() { /*eslint-disable eqeqeq */ if (this.element == this.element.window) { return Waypoint.viewportHeight() } /*eslint-enable eqeqeq */ return this.adapter.innerHeight() } /* Private */ Context.prototype.remove = function(waypoint) { delete this.waypoints[waypoint.axis][waypoint.key] this.checkEmpty() } /* Private */ Context.prototype.innerWidth = function() { /*eslint-disable eqeqeq */ if (this.element == this.element.window) { return Waypoint.viewportWidth() } /*eslint-enable eqeqeq */ return this.adapter.innerWidth() } /* Public */ /* http://imakewebthings.com/waypoints/api/context-destroy */ Context.prototype.destroy = function() { var allWaypoints = [] for (var axis in this.waypoints) { for (var waypointKey in this.waypoints[axis]) { allWaypoints.push(this.waypoints[axis][waypointKey]) } } for (var i = 0, end = allWaypoints.length; i < end; i++) { allWaypoints[i].destroy() } } /* Public */ /* http://imakewebthings.com/waypoints/api/context-refresh */ Context.prototype.refresh = function() { /*eslint-disable eqeqeq */ var isWindow = this.element == this.element.window /*eslint-enable eqeqeq */ var contextOffset = isWindow ? undefined : this.adapter.offset() var triggeredGroups = {} var axes this.handleScroll() axes = { horizontal: { contextOffset: isWindow ? 0 : contextOffset.left, contextScroll: isWindow ? 0 : this.oldScroll.x, contextDimension: this.innerWidth(), oldScroll: this.oldScroll.x, forward: 'right', backward: 'left', offsetProp: 'left' }, vertical: { contextOffset: isWindow ? 0 : contextOffset.top, contextScroll: isWindow ? 0 : this.oldScroll.y, contextDimension: this.innerHeight(), oldScroll: this.oldScroll.y, forward: 'down', backward: 'up', offsetProp: 'top' } } for (var axisKey in axes) { var axis = axes[axisKey] for (var waypointKey in this.waypoints[axisKey]) { var waypoint = this.waypoints[axisKey][waypointKey] var adjustment = waypoint.options.offset var oldTriggerPoint = waypoint.triggerPoint var elementOffset = 0 var freshWaypoint = oldTriggerPoint == null var contextModifier, wasBeforeScroll, nowAfterScroll var triggeredBackward, triggeredForward if (waypoint.element !== waypoint.element.window) { elementOffset = waypoint.adapter.offset()[axis.offsetProp] } if (typeof adjustment === 'function') { adjustment = adjustment.apply(waypoint) } else if (typeof adjustment === 'string') { adjustment = parseFloat(adjustment) if (waypoint.options.offset.indexOf('%') > - 1) { adjustment = Math.ceil(axis.contextDimension * adjustment / 100) } } contextModifier = axis.contextScroll - axis.contextOffset waypoint.triggerPoint = Math.floor(elementOffset + contextModifier - adjustment) wasBeforeScroll = oldTriggerPoint < axis.oldScroll nowAfterScroll = waypoint.triggerPoint >= axis.oldScroll triggeredBackward = wasBeforeScroll && nowAfterScroll triggeredForward = !wasBeforeScroll && !nowAfterScroll if (!freshWaypoint && triggeredBackward) { waypoint.queueTrigger(axis.backward) triggeredGroups[waypoint.group.id] = waypoint.group } else if (!freshWaypoint && triggeredForward) { waypoint.queueTrigger(axis.forward) triggeredGroups[waypoint.group.id] = waypoint.group } else if (freshWaypoint && axis.oldScroll >= waypoint.triggerPoint) { waypoint.queueTrigger(axis.forward) triggeredGroups[waypoint.group.id] = waypoint.group } } } Waypoint.requestAnimationFrame(function() { for (var groupKey in triggeredGroups) { triggeredGroups[groupKey].flushTriggers() } }) return this } /* Private */ Context.findOrCreateByElement = function(element) { return Context.findByElement(element) || new Context(element) } /* Private */ Context.refreshAll = function() { for (var contextId in contexts) { contexts[contextId].refresh() } } /* Public */ /* http://imakewebthings.com/waypoints/api/context-find-by-element */ Context.findByElement = function(element) { return contexts[element.waypointContextKey] } window.onload = function() { if (oldWindowLoad) { oldWindowLoad() } Context.refreshAll() } Waypoint.requestAnimationFrame = function(callback) { var requestFn = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || requestAnimationFrameShim requestFn.call(window, callback) } Waypoint.Context = Context }()); (function() { 'use strict' function byTriggerPoint(a, b) { return a.triggerPoint - b.triggerPoint } function byReverseTriggerPoint(a, b) { return b.triggerPoint - a.triggerPoint } var groups = { vertical: {}, horizontal: {} } var Waypoint = window.Waypoint /* http://imakewebthings.com/waypoints/api/group */ function Group(options) { this.name = options.name this.axis = options.axis this.id = this.name + '-' + this.axis this.waypoints = [] this.clearTriggerQueues() groups[this.axis][this.name] = this } /* Private */ Group.prototype.add = function(waypoint) { this.waypoints.push(waypoint) } /* Private */ Group.prototype.clearTriggerQueues = function() { this.triggerQueues = { up: [], down: [], left: [], right: [] } } /* Private */ Group.prototype.flushTriggers = function() { for (var direction in this.triggerQueues) { var waypoints = this.triggerQueues[direction] var reverse = direction === 'up' || direction === 'left' waypoints.sort(reverse ? byReverseTriggerPoint : byTriggerPoint) for (var i = 0, end = waypoints.length; i < end; i += 1) { var waypoint = waypoints[i] if (waypoint.options.continuous || i === waypoints.length - 1) { waypoint.trigger([direction]) } } } this.clearTriggerQueues() } /* Private */ Group.prototype.next = function(waypoint) { this.waypoints.sort(byTriggerPoint) var index = Waypoint.Adapter.inArray(waypoint, this.waypoints) var isLast = index === this.waypoints.length - 1 return isLast ? null : this.waypoints[index + 1] } /* Private */ Group.prototype.previous = function(waypoint) { this.waypoints.sort(byTriggerPoint) var index = Waypoint.Adapter.inArray(waypoint, this.waypoints) return index ? this.waypoints[index - 1] : null } /* Private */ Group.prototype.queueTrigger = function(waypoint, direction) { this.triggerQueues[direction].push(waypoint) } /* Private */ Group.prototype.remove = function(waypoint) { var index = Waypoint.Adapter.inArray(waypoint, this.waypoints) if (index > -1) { this.waypoints.splice(index, 1) } } /* Public */ /* http://imakewebthings.com/waypoints/api/first */ Group.prototype.first = function() { return this.waypoints[0] } /* Public */ /* http://imakewebthings.com/waypoints/api/last */ Group.prototype.last = function() { return this.waypoints[this.waypoints.length - 1] } /* Private */ Group.findOrCreate = function(options) { return groups[options.axis][options.name] || new Group(options) } Waypoint.Group = Group }()) ;(function() { 'use strict' var $ = window.jQuery var Waypoint = window.Waypoint function JQueryAdapter(element) { this.$element = $(element) } $.each([ 'innerHeight', 'innerWidth', 'off', 'offset', 'on', 'outerHeight', 'outerWidth', 'scrollLeft', 'scrollTop' ], function(i, method) { JQueryAdapter.prototype[method] = function() { var args = Array.prototype.slice.call(arguments) return this.$element[method].apply(this.$element, args) } }) $.each([ 'extend', 'inArray', 'isEmptyObject' ], function(i, method) { JQueryAdapter[method] = $[method] }) Waypoint.adapters.push({ name: 'jquery', Adapter: JQueryAdapter }) Waypoint.Adapter = JQueryAdapter }()) ;(function() { 'use strict' var Waypoint = window.Waypoint function createExtension(framework) { return function() { var waypoints = [] var overrides = arguments[0] if (framework.isFunction(arguments[0])) { overrides = framework.extend({}, arguments[1]) overrides.handler = arguments[0] } this.each(function() { var options = framework.extend({}, overrides, { element: this }) if (typeof options.context === 'string') { options.context = framework(this).closest(options.context)[0] } waypoints.push(new Waypoint(options)) }) return waypoints } } if (window.jQuery) { window.jQuery.fn.waypoint = createExtension(window.jQuery) } if (window.Zepto) { window.Zepto.fn.waypoint = createExtension(window.Zepto) } }()) ; // source --> https://fpacademy.nl/wp-content/plugins/deasil-core/js/countnumbers.js?ver=5.2.9 /*! * jquery.counterup.js 1.0 * * Copyright 2013, Benjamin Intal http://gambit.ph @bfintal * Released under the GPL v2 License * * Date: Nov 26, 2013 */ (function( $ ){ "use strict"; $(document).ready(function(){ var countThis = $('.counter'); countThis.counterUp({ delay: 30, time: 3000 }); }); $.fn.counterUp = function( options ) { // Defaults var settings = $.extend({ 'time': 400, 'delay': 10 }, options); return this.each(function(){ // Store the object var $this = $(this); var $settings = settings; var counterUpper = function() { if(!$this.data('counterupTo')){ $this.data('counterupTo',$this.text()); } var divisions = $settings.time / $settings.delay; var num = $this.data('counterupTo'); var nums = [num]; var isComma = /[0-9]+,[0-9]+/.test(num); num = num.replace(/,/g, ''); var isInt = /^[0-9]+$/.test(num); var isFloat = /^[0-9]+\.[0-9]+$/.test(num); var decimalPlaces = isFloat ? (num.split('.')[1] || []).length : 0; // Generate list of incremental numbers to display for (var i = divisions; i >= 1; i--) { // Preserve as int if input was int var newNum = parseInt(num / divisions * i); // Preserve float if input was float if (isFloat) { newNum = parseFloat(num / divisions * i).toFixed(decimalPlaces); } // Preserve commas if input had commas if (isComma) { while (/(\d+)(\d{3})/.test(newNum.toString())) { newNum = newNum.toString().replace(/(\d+)(\d{3})/, '$1'+','+'$2'); } } nums.unshift(newNum); } $this.data('counterup-nums', nums); $this.text('0'); // Updates the number until we're done var f = function() { if (!$this.data('counterup-nums')) { return; } $this.text($this.data('counterup-nums').shift()); if ($this.data('counterup-nums').length) { setTimeout($this.data('counterup-func'), $settings.delay); } else { delete $this.data('counterup-nums'); $this.data('counterup-nums', null); $this.data('counterup-func', null); } }; $this.data('counterup-func', f); // Start the count up setTimeout($this.data('counterup-func'), $settings.delay); }; // Perform counts when the element gets into view $this.waypoint(counterUpper, { offset: '100%', triggerOnce: true }); }); }; })( jQuery );