function getLocation() {
  if (navigator.geolocation) {
    navigator.geolocation.getCurrentPosition(showPosition,showError);
  } else { 
    console.error("Geolocation is not supported by this browser.");
  }
}

function showPosition(position) {
    initialize(position.coords.latitude, position.coords.longitude);
}

function showError(error) {
  switch(error.code) {
    case error.PERMISSION_DENIED:
      x.innerHTML = "User denied the request for Geolocation."
      break;
    case error.POSITION_UNAVAILABLE:
      x.innerHTML = "Location information is unavailable."
      break;
    case error.TIMEOUT:
      x.innerHTML = "The request to get user location timed out."
      break;
    case error.UNKNOWN_ERROR:
      x.innerHTML = "An unknown error occurred."
      break;
  }
}

function initialize(lat, lng) {
  var mapOptions = {
    center: new google.maps.LatLng(lat, lng),
    zoom: 15
  };
  var map = new google.maps.Map(document.getElementById("map-canvas"),
      mapOptions);
  // Create marker 
  var marker = new google.maps.Marker({
    map: map,
    position: new google.maps.LatLng(lat, lng),
    title: 'U bent hier'
  });

  // Add circle overlay and bind to marker
  var circle = new google.maps.Circle({
    map: map,
    radius: 400,
    fillColor: '#fc4c02',
    strokeWeight: 0
  });
  circle.bindTo('center', marker, 'position');

}

document.addEventListener('DOMContentLoaded', function () {
  getLocation();

  var nodes;
  nodes = document.querySelectorAll('.navigation');
  for (var i=0; i<nodes.length; i++){
    nodes[i].addEventListener('click', function(){
      var currentPage = document.querySelector('.page.current');
      var targetPage = document.getElementById(this.dataset.target);
      var self = this;

      currentPage.classList.add(this.dataset.animationout);
      targetPage.classList.add('current');
      targetPage.classList.add(this.dataset.animationin);
      targetPage.classList.add('on-top');
    
      var onEndAnimationCurrentPage = function(){
        if (self.dataset.animationout){
          this.classList.remove(self.dataset.animationout);
        }
        this.classList.remove('current');
        console.log('current ', "animationend");
        currentPage.removeEventListener("animationend", onEndAnimationCurrentPage);
      }
      var onEndAnimationTargetPage = function(){
         if (self.dataset.animationin){
          this.classList.remove(self.dataset.animationin);
         }
         targetPage.classList.remove('on-top');
         console.log('target ', "animationend");
         targetPage.removeEventListener("animationend", onEndAnimationTargetPage);
      };
      currentPage.addEventListener("animationend", onEndAnimationCurrentPage, false);

      targetPage.addEventListener("animationend", onEndAnimationTargetPage, false);
    })
  }
});

@@ -1362,16 +1362,484 @@
 ');%0A%0A%7D%0A%0A
+function vendorEventName(name, el)%7B%0A  var vendor = %5B%22webkit%22, %22moz%22, %22MS%22, %22o%22, %22%22%5D;%0A  if (!el)%7Bel=document.documentElement%7D%0A  if(name.toLowerCase() in el)%7Breturn name.toLowerCase();%7D%0A  for (var i = 0; i %3C vendor.length; i++) %7B%0A    if (vendor%5Bi%5D+name in el)%7B%0A      return vendor%5Bi%5D+name;%0A    %7Delse if (vendor%5Bi%5D+name.toLowerCase() in el)%7B%0A      return vendor%5Bi%5D+name.toLowerCase();%0A    %7D%0A  %7D%0A  throw %22Event %22 + name + %22 is not supported for element %22 + el.tagName;%0A%7D%0A%0A
 document
@@ -1908,16 +1908,43 @@
 ion();%0A%0A
+  /*%0A   * Navigation%0A   */%0A
   var no
@@ -2494,32 +2494,33 @@
 Page = function(
+e
 )%7B%0A        if (s
@@ -2686,38 +2686,30 @@
 'current ', 
-%22animationend%22
+e.type
 );%0A        c
@@ -2735,38 +2735,30 @@
 entListener(
-%22animationend%22
+e.type
 , onEndAnima
@@ -2821,32 +2821,33 @@
 Page = function(
+e
 )%7B%0A         if (
@@ -3027,51 +3027,482 @@
  ', 
-%22animationend%22);%0A         targetPage.remove
+e.type);%0A         targetPage.removeEventListener(e.type, onEndAnimationTargetPage);%0A      %7D;%0A%0A      currentPage.addEventListener(%22animationend%22, onEndAnimationCurrentPage, false);%0A      currentPage.addEventListener(%22webkitAnimationEnd%22, onEndAnimationCurrentPage, false);%0A      currentPage.addEventListener(%22oanimationend%22, onEndAnimationCurrentPage, false);%0A      currentPage.addEventListener(%22MSAnimationEnd%22, onEndAnimationCurrentPage, false);%0A      %0A      targetPage.add
 Even
@@ -3543,32 +3543,39 @@
 mationTargetPage
+, false
 );%0A      %7D;%0A    
@@ -3571,17 +3571,98 @@
     
-%7D
+targetPage.addEventListener(%22webkitAnimationEnd%22, onEndAnimationTargetPage, false)
 ;%0A      
 curr
@@ -3649,38 +3649,37 @@
 , false);%0A      
-curren
+targe
 tPage.addEventLi
@@ -3678,32 +3678,33 @@
 dEventListener(%22
+o
 animationend%22, o
@@ -3708,38 +3708,37 @@
 , onEndAnimation
-Curren
+Targe
 tPage, false);%0A%0A
@@ -3736,17 +3736,16 @@
 false);%0A
-%0A
       ta
@@ -3767,33 +3767,35 @@
 ntListener(%22
-a
+MSA
 nimation
 end%22, onEndA
@@ -3774,33 +3774,33 @@
 ner(%22MSAnimation
-e
+E
 nd%22, onEndAnimat

Fix for webkit browsers