"use strict"; var theme = function () { // --------------------------------------------------------------------------------------- // prevent empty links function handlePreventEmptyLinks() { $('a[href=#]').click(function (event) { event.preventDefault(); }); } // --------------------------------------------------------------------------------------- // Placeholdem function handlePlaceholdem() { Placeholdem(document.querySelectorAll('[placeholder]')); } // --------------------------------------------------------------------------------------- // add hover class for correct view on mobile devices function handleHoverClass() { var hover = $('.thumbnail'); hover.hover( function () { $(this).addClass('hover'); }, function () { $(this).removeClass('hover'); } ); } // --------------------------------------------------------------------------------------- // superfish menu function handleSuperFish() { $('ul.sf-menu').superfish(); $('ul.sf-menu a').click(function() { $('body').scrollspy('refresh'); }); } // --------------------------------------------------------------------------------------- // create mobile menu from exist superfish menu function handleMobileMenu() { var $menu = $('.navigation > ul'), optionsList = ''; $menu.find('li').each(function () { var $this = $(this), $anchor = $this.children('a'), depth = $this.parents('ul').length - 1, indent = ''; if (depth) { while (depth > 0) { indent += ' ::: '; depth--; } } optionsList += ''; }).end().parent().parent().find('#mobile-menu').append('
'); $('.mobile-menu').on('change', function () { window.location = $(this).val(); }); } // Smooth scrolling // --------------------------------------------------------------------------------------- function handleSmoothScroll(){ $(".sf-menu a, .scroll-to").click(function () { //var headerH = $('header').outerHeight(); var headerH = 0; $(".sf-menu a").removeClass('active'); $(this).addClass('active'); $("html, body").animate({ scrollTop: $($(this).attr("href")).offset().top - headerH + "px" }, { duration: 1200, easing: "easeInOutExpo" }); return false; }); } // --------------------------------------------------------------------------------------- // prettyPhoto function handlePrettyPhoto() { $("a[data-gal^='prettyPhoto']").prettyPhoto({ theme: 'dark_square' }); } // --------------------------------------------------------------------------------------- // Scroll totop button function handleToTopButton() { $(window).scroll(function () { if ($(this).scrollTop() > 1) { $('.to-top').css({bottom: "0"}); } else { $('.to-top').css({bottom: "-100px"}); } }); $('.to-top').click(function () { $('html, body').animate({scrollTop: '0px'}, 800); return false; }); } // --------------------------------------------------------------------------------------- // preloader $(window).load(function() { $('#status').fadeOut(); $('#preloader').delay(350).fadeOut('slow'); }); // --------------------------------------------------------------------------------------- // Build EasyPieChart function buildEasyPieChart () { $('.chart').easyPieChart({ easing: 'easeOutBounce', size: 190, animate: 2000, lineCap: 'square', lineWidth: 17, barColor: '#c92843', trackColor: '#f2f2f2', scaleColor: false, onStep: function (from, to, percent) { $(this.el).find('.percent').text(Math.round(percent) + '%'); } }); } // --------------------------------------------------------------------------------------- // // INIT FUNCTIONS // --------------------------------------------------------------------------------------- return { onResize: function() { //resizeSlider(); }, init: function () { handlePreventEmptyLinks(); handlePlaceholdem(); handleHoverClass(); handleSuperFish(); handleMobileMenu(); handleSmoothScroll(); handlePrettyPhoto(); handleToTopButton(); }, // easyPieChart initEasyPieChart: function () { var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent); if (isMobile == false) { $('.chart').waypoint(function (){ buildEasyPieChart(); }, { offset: '95%' }); } else { buildEasyPieChart(); } }, // Main Slider initMainSlider: function () { $("#main-slider").owlCarousel({ responsiveRefreshRate : 100, navigation: true, // Show next and prev buttons pagination: false, navigationText: ["",""], mouseDrag : false, slideSpeed: 300, paginationSpeed: 400, singleItem: true, autoPlay: true //"singleItem:true" is a shortcut for: //items: 1, //itemsDesktop: false, //itemsDesktopSmall: false, //itemsTablet: false, //itemsMobile: false }); }, // Partners Slider initPartnerSlider: function () { $("#partners").owlCarousel({ items: 6, itemsDesktop: false, itemsDesktopSmall: [991, 5], itemsTablet: [768, 3], itemsMobile: [479, 2], autoPlay: true, pagination: false }); }, // Images Carousel initImageCarousel: function () { $(".img-carousel").owlCarousel({ navigation: true, // Show next and prev buttons pagination: true, // Show pagination navigationText: ["",""], slideSpeed: 300, paginationSpeed: 400, singleItem: true, autoPlay: true }); $(".img-carousel .next").click(function () { $(".img-carousel").trigger('owl.next'); return false; }); $(".img-carousel .prev").click(function () { $(".img-carousel").trigger('owl.prev'); return false; }); }, // Google map initGoogleMap: function() { var map; function initialize() { var mapOptions = { scrollwheel: false, zoom: 9, center: new google.maps.LatLng(53.1100456,6.8244792) }; map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); // Markers var Locatie1 = new google.maps.LatLng(53.1062782,6.8750998);var Locatie2 = new google.maps.LatLng(53.1041602,7.0032406);var Locatie3 = new google.maps.LatLng(52.7552660,6.9169098);var Locatie4 = new google.maps.LatLng(53.2221620,6.5282907);var Locatie5 = new google.maps.LatLng(52.7858037,6.8975851);var Locatie6 = new google.maps.LatLng(53.2361350,6.6021913);var Locatie7 = new google.maps.LatLng(53.2210464,6.5714006);var Locatie8 = new google.maps.LatLng(53.1025672,7.0060634);var Locatie9 = new google.maps.LatLng(53.3288530,6.7456937);var Locatie10 = new google.maps.LatLng(53.1357196,6.4145997);var Locatie11 = new google.maps.LatLng(52.9250498,6.7993799);var Locatie12 = new google.maps.LatLng(53.1718265,6.6052429);var Locatie13 = new google.maps.LatLng(52.8624228,6.5150102);var Locatie14 = new google.maps.LatLng(52.9810472,6.9656094);var Locatie15 = new google.maps.LatLng(52.9776332,6.9682255);var Locatie16 = new google.maps.LatLng(53.0049066,6.7610121);var Locatie17 = new google.maps.LatLng(52.5760835,6.5988880);var Locatie18 = new google.maps.LatLng(53.2731950,7.0297912);var Locatie19 = new google.maps.LatLng(53.1426654,7.0355728);var Locatie20 = new google.maps.LatLng(53.1105141,6.8843196);var Locatie21 = new google.maps.LatLng(52.8807148,6.7187900);var Locatie22 = new google.maps.LatLng(52.9888005,6.5824420);var Locatie23 = new google.maps.LatLng(53.2032293,6.5738312);var Locatie24 = new google.maps.LatLng(53.3277728,6.5223535);var Locatie25 = new google.maps.LatLng(53.1403599,6.5710629);var klant1 = new google.maps.Marker({title:'..',position: Locatie1,map: map,icon: 'http://www.web-demo.nl/marker.png'});var klant2 = new google.maps.Marker({title:'Fidarda',position: Locatie2,map: map,icon: 'http://www.web-demo.nl/marker.png'});var klant3 = new google.maps.Marker({title:'Viviani',position: Locatie3,map: map,icon: 'http://www.web-demo.nl/marker.png'});var klant4 = new google.maps.Marker({title:'CSG',position: Locatie4,map: map,icon: 'http://www.web-demo.nl/marker.png'});var klant5 = new google.maps.Marker({title:'SKOD',position: Locatie5,map: map,icon: 'http://www.web-demo.nl/marker.png'});var klant6 = new google.maps.Marker({title:'VCOG',position: Locatie6,map: map,icon: 'http://www.web-demo.nl/marker.png'});var klant7 = new google.maps.Marker({title:'Praedinius Gymnasium',position: Locatie7,map: map,icon: 'http://www.web-demo.nl/marker.png'});var klant8 = new google.maps.Marker({title:'VCO-MOG',position: Locatie8,map: map,icon: 'http://www.web-demo.nl/marker.png'});var klant9 = new google.maps.Marker({title:'Marenland',position: Locatie9,map: map,icon: 'http://www.web-demo.nl/marker.png'});var klant10 = new google.maps.Marker({title:'Opo Noordenveld',position: Locatie10,map: map,icon: 'http://www.web-demo.nl/marker.png'});var klant11 = new google.maps.Marker({title:'CONOD',position: Locatie11,map: map,icon: 'http://www.web-demo.nl/marker.png'});var klant12 = new google.maps.Marker({title:'Maartens College',position: Locatie12,map: map,icon: 'http://www.web-demo.nl/marker.png'});var klant13 = new google.maps.Marker({title:'KITS Primair',position: Locatie13,map: map,icon: 'http://www.web-demo.nl/marker.png'});var klant14 = new google.maps.Marker({title:'Opron',position: Locatie14,map: map,icon: 'http://www.web-demo.nl/marker.png'});var klant15 = new google.maps.Marker({title:'Scholengroep Perspectief',position: Locatie15,map: map,icon: 'http://www.web-demo.nl/marker.png'});var klant16 = new google.maps.Marker({title:'Stichting PrimAH',position: Locatie16,map: map,icon: 'http://www.web-demo.nl/marker.png'});var klant17 = new google.maps.Marker({title:'Stichting Chrono',position: Locatie17,map: map,icon: 'http://www.web-demo.nl/marker.png'});var klant18 = new google.maps.Marker({title:'Dollard College Woldendorp',position: Locatie18,map: map,icon: 'http://www.web-demo.nl/marker.png'});var klant19 = new google.maps.Marker({title:'SOOOG',position: Locatie19,map: map,icon: 'http://www.web-demo.nl/marker.png'});var klant20 = new google.maps.Marker({title:'PICTO',position: Locatie20,map: map,icon: 'http://www.web-demo.nl/marker.png'});var klant21 = new google.maps.Marker({title:'OPO Borger-Odoorn',position: Locatie21,map: map,icon: 'http://www.web-demo.nl/marker.png'});var klant22 = new google.maps.Marker({title:'Terra Assen',position: Locatie22,map: map,icon: 'http://www.web-demo.nl/marker.png'});var klant23 = new google.maps.Marker({title:'Terra Groningen',position: Locatie23,map: map,icon: 'http://www.web-demo.nl/marker.png'});var klant24 = new google.maps.Marker({title:'Terra Winsum',position: Locatie24,map: map,icon: 'http://www.web-demo.nl/marker.png'});var klant25 = new google.maps.Marker({title:'Terra Eelde',position: Locatie25,map: map,icon: 'http://www.web-demo.nl/marker.png'});var desc1 = new google.maps.InfoWindow({content: ""});var desc2 = new google.maps.InfoWindow({content: "Fidarda"});var desc3 = new google.maps.InfoWindow({content: "Viviani"});var desc4 = new google.maps.InfoWindow({content: "CSG Groningen"});var desc5 = new google.maps.InfoWindow({content: "Stichting Katholiek Onderwijs Drenthe"});var desc6 = new google.maps.InfoWindow({content: "Vereniging Christelijk Onderwijs Groningen"});var desc7 = new google.maps.InfoWindow({content: "Praedinius Gymnasium"});var desc8 = new google.maps.InfoWindow({content: "VCO Midden- en Oost-Groningen"});var desc9 = new google.maps.InfoWindow({content: "Stichting Openbaar Onderwijs Marenland"});var desc10 = new google.maps.InfoWindow({content: "OPO Noordenveld"});var desc11 = new google.maps.InfoWindow({content: "CONOD"});var desc12 = new google.maps.InfoWindow({content: "Maartens College"});var desc13 = new google.maps.InfoWindow({content: "KITS Primair"});var desc14 = new google.maps.InfoWindow({content: "Scholengroep Opron"});var desc15 = new google.maps.InfoWindow({content: "Scholengroep Perspectief"});var desc16 = new google.maps.InfoWindow({content: "Stichting PrimAH"});var desc17 = new google.maps.InfoWindow({content: "Stichting Chrono"});var desc18 = new google.maps.InfoWindow({content: "Dollard College Woldendorp"});var desc19 = new google.maps.InfoWindow({content: "SOOOG"});var desc20 = new google.maps.InfoWindow({content: "PICTO"});var desc21 = new google.maps.InfoWindow({content: "OPO Borger-Odoorn"});var desc22 = new google.maps.InfoWindow({content: "Terra Assen"});var desc23 = new google.maps.InfoWindow({content: "Terra Groningen"});var desc24 = new google.maps.InfoWindow({content: "Terra Winsum"});var desc25 = new google.maps.InfoWindow({content: "Terra Eelde"});google.maps.event.addListener(klant1, "click", function (e) { desc1.open(map, this); });google.maps.event.addListener(klant2, "click", function (e) { desc2.open(map, this); });google.maps.event.addListener(klant3, "click", function (e) { desc3.open(map, this); });google.maps.event.addListener(klant4, "click", function (e) { desc4.open(map, this); });google.maps.event.addListener(klant5, "click", function (e) { desc5.open(map, this); });google.maps.event.addListener(klant6, "click", function (e) { desc6.open(map, this); });google.maps.event.addListener(klant7, "click", function (e) { desc7.open(map, this); });google.maps.event.addListener(klant8, "click", function (e) { desc8.open(map, this); });google.maps.event.addListener(klant9, "click", function (e) { desc9.open(map, this); });google.maps.event.addListener(klant10, "click", function (e) { desc10.open(map, this); });google.maps.event.addListener(klant11, "click", function (e) { desc11.open(map, this); });google.maps.event.addListener(klant12, "click", function (e) { desc12.open(map, this); });google.maps.event.addListener(klant13, "click", function (e) { desc13.open(map, this); });google.maps.event.addListener(klant14, "click", function (e) { desc14.open(map, this); });google.maps.event.addListener(klant15, "click", function (e) { desc15.open(map, this); });google.maps.event.addListener(klant16, "click", function (e) { desc16.open(map, this); });google.maps.event.addListener(klant17, "click", function (e) { desc17.open(map, this); });google.maps.event.addListener(klant18, "click", function (e) { desc18.open(map, this); });google.maps.event.addListener(klant19, "click", function (e) { desc19.open(map, this); });google.maps.event.addListener(klant20, "click", function (e) { desc20.open(map, this); });google.maps.event.addListener(klant21, "click", function (e) { desc21.open(map, this); });google.maps.event.addListener(klant22, "click", function (e) { desc22.open(map, this); });google.maps.event.addListener(klant23, "click", function (e) { desc23.open(map, this); });google.maps.event.addListener(klant24, "click", function (e) { desc24.open(map, this); });google.maps.event.addListener(klant25, "click", function (e) { desc25.open(map, this); }); } google.maps.event.addDomListener(window, 'load', initialize); } }; }();