File: /var/www/vhosts/creativefellows.nl/kjs.creativefellows.nl/public/js/app-min.js
var map,companyImage,companyMarker;$(document).foundation().ready((function(){$("#header .toggle-navigation").toggleSearchNavigation(),$(document.links).filter((function(){return this.hostname!=window.location.hostname})).attr("target","_blank"),$("#acceptCookie").on("click",(function(e){e.preventDefault();$(this).closest(".cookies");$.ajax({type:"POST",url:"/accept-cookies",success:function(e){$("#cookies").slideUp("fast")}})})),$(".form-response").checkIsSent(),$("#header").fixednav(),$(".row-default .cell, .image-impression img").each((function(e,o){$(o).hasClass("no-transition")||$(o).visible(!0)&&$(o).addClass("already-visible")})),$(window).scroll((function(e){$(".row-default .cell, .image-impression img").each((function(e,o){$(o).hasClass("no-transition")||$(o).visible(!0)&&$(o).addClass("come-in")}))})),googleMaps()})),$.fn.visible=function(e){var o=$(this),t=$(window),a=t.scrollTop(),n=a+t.height(),i=o.offset().top,s=i+o.height();return(!0===e?i:s)<=n&&(!0===e?s:i)>=a},$.fn.checkIsSent=function(){return this.each((function(){var e=$(this);e.init=function(){var o=e.getUrlParameter("s");e.getUrlParameter("id"),e.getUrlParameter("h");1==o&&$("html, body").animate({scrollTop:e.offset().top-200},1e3)},e.getUrlParameter=function(e){var o,t,a=decodeURIComponent(window.location.search.substring(1)).split("&");for(t=0;t<a.length;t++)if((o=a[t].split("="))[0]===e)return void 0===o[1]||o[1]},e.init()}))},$.fn.toggleSearchNavigation=function(){var e=null,o=new Foundation.ResponsiveToggle(".toggle-menu"),t=$(this);$(".close-search"),$("#search-products");$(this).on("click",(function(o){$(this).toggleClass("open"),$("#header").toggleClass("navigation-open"),0==$(".shade-out").length?a():e=$(".shade-out"),$(this).hasClass("open")?e.addClass("is-open").hide().fadeIn("fast"):e.removeClass("is-open").fadeOut(1e3),$("#responsive-menu > ul a").each((function(){$(this).click((function(e){$(this).toggleClass("is-active")}))}))})),$(".toggle-search").on("click",(function(e){$("#header").toggleClass("navigation-open"),$("#header").hasClass("navigation-open")&&setTimeout((function(){$("#q").focus()}),100)})),$(".close-search").on("click",(function(e){$("#header").toggleClass("navigation-open")}));var a=function(){(e=$('<div class="shade-out"></div>').hide()).insertAfter("#header"),e.on("click",(function(e){n(),o.toggleMenu("close"),t.toggleClass("open")}))},n=function(){e.removeClass("is-open").delay(500).fadeOut("fast"),stopVideo(loaded_video_id)}},$.fn.fixednav=function(){var e=$("#header").height(),o=$("#header, .sticky-subnavigation");function t(){return window.pageYOffset}$(window).scroll((function(){var a=t();a>=e?o.addClass("has-scrolled"):o.removeClass("has-scrolled"),a})),t()>=e&&o.addClass("has-scrolled")};var panorama,bounds,markers=[],activeMarker=null,markerImage=null;function googleMaps(){$("#school-locator").length&&$.ajax({url:"/locations"+filterLocation(),method:"GET",success:function(e){e&&mapLocations(e)}})}function filterLocation(){return $("#school-locator").attr("data-filter")}function mapLocations(e){var o=0,t=0;$.each(e,(function(e,a){o+=a.lat,t+=a.long}));var a=o/e.length,n=t/e.length;if(0==o)a=52.1365119;if(0==t)n=4.6520323;bounds=new google.maps.LatLngBounds;var i={zoom:12,center:new google.maps.LatLng(a,n),mapTypeId:google.maps.MapTypeId.ROADMAP,mapTypeControl:!1,scrollwheel:!1,draggable:!0,mapTypeControlOptions:{style:google.maps.MapTypeControlStyle.DROPDOWN_MENU},navigationControl:!1,navigationControlOptions:{style:google.maps.NavigationControlStyle.SMALL},mapTypeId:google.maps.MapTypeId.ROADMAP,styles:[{featureType:"administrative",elementType:"labels.text.fill",stylers:[{color:"#444444"}]},{featureType:"landscape",elementType:"all",stylers:[{color:"#e3edc5"}]},{featureType:"poi",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"all",stylers:[{saturation:-100},{lightness:45}]},{featureType:"road.highway",elementType:"all",stylers:[{visibility:"simplified"}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:"#ffffff"}]},{featureType:"road.arterial",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"transit",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"all",stylers:[{color:"#dde6e8"},{visibility:"on"}]}]};map=new google.maps.Map(document.getElementById("school-locator"),i),google.maps.event.addDomListener(window,"resize",(function(){var e=map.getCenter();google.maps.event.trigger(map,"resize"),map.setCenter(e)})),$("#school-locator").append('<div class="location-info" id="location-details" style="display:none;"></div>'),$.each(e,(function(o,t){addMarker(t.lat,t.long,t.name,t.intro,t.link,t.image,$("#school-locator").attr("data-themecolor"),150*o,bounds,e.length,o+1)}))}activeMarker=null,markerImage=null;function addMarker(e,o,t,a,n,i,s,l,r,c,p){window.setTimeout((function(){var i="https://www.google.nl/maps/vt/icon/name=assets/icons/poi/tactile/pinlet_shadow_v3-2-medium.png,assets/icons/poi/tactile/pinlet_outline_v3-2-medium.png,assets/icons/poi/tactile/pinlet_v3-2-medium.png&highlight=ff000000,ffffff,"+s+",ffffff?scale=1.25",l=new google.maps.LatLng(e,o),p=new google.maps.MarkerImage(i),g=new google.maps.Marker({position:l,map:map,icon:p,animation:google.maps.Animation.DROP});r.extend(g.position),1==c?(map.setZoom(14),map.setCenter(g.getPosition())):map.fitBounds(r),google.maps.event.addListener(g,"click",(function(){var e="<h3>"+t+"</h3>";e+="<p>"+a+"</p>",e+='<p><a href="'+n+'">Meer informatie</a></p>',$("#location-details").html(e).show(),map.setZoom(14),map.setCenter(g.getPosition())})),markers.push(g)}),l)}function getHTML(e){return $("<div />").append($(e).clone()).html()}function showLocations(){$(".locations a.show-inline").click((function(e){e.preventDefault();var o=this.attributes.position.value.split(","),t=(this.attributes.locationtype.value,getHTML($(this).next())),a=new google.maps.LatLng(o[0],o[1]);$("#location-details").html(t).show(),$("html, body").animate({scrollTop:$("#map-canvas").offset().top},500),map.getStreetView().setVisible(!1),map.panTo(a),map.setZoom(15)}))}function hideMarkers(e){for(var o=0;o<markers.length;o++)markers[o].setMap(e);console.log("hide markers")}