(function(window,undefined) {'use strict';var height_fixed_header=100,speed=500,moving_frequency=15,links=document.getElementsByTagName('a'),href;for(var i=0;i1&&href.indexOf('#')!=-1) {links[i].onclick=function() {toggle_menu();var element,href=this.attributes.href.nodeValue.toString(),url=href.substr(0,href.indexOf('#')),id=href.substr(href.indexOf('#')+1);if(element=document.getElementById(id)) {var hop_count=(speed-(speed%moving_frequency))/moving_frequency,getScrollTopDocumentAtBegin=getScrollTopDocument(),gap=(getScrollTopElement(element)-getScrollTopDocumentAtBegin)/hop_count;if(window.history&&typeof window.history.pushState=='function') window.history.pushState({},undefined,url+'#'+id);for(var i=1;i<=hop_count;i++) {(function() {var hop_top_position=gap*i;setTimeout(function(){window.scrollTo(0,hop_top_position+getScrollTopDocumentAtBegin);},moving_frequency*i);})();} return false;}};}} var getScrollTopElement=function(e) {var top=height_fixed_header*-1;if(!typeof event==="undefined")event.preventDefault();while(e.offsetParent!=undefined&&e.offsetParent!=null) {top+=e.offsetTop+(e.clientTop!=null?e.clientTop:0);e=e.offsetParent;} return top;};var getScrollTopDocument=function() {return window.pageYOffset!==undefined?window.pageYOffset:document.documentElement.scrollTop!==undefined?document.documentElement.scrollTop:document.body.scrollTop;};})(window);(function(root,name,make){if(typeof module!='undefined'&&module['exports'])module['exports']=make();else root[name]=make();}(this,'verge',function(){var xports={},win=typeof window!='undefined'&&window,doc=typeof document!='undefined'&&document,docElem=doc&&doc.documentElement,matchMedia=win['matchMedia']||win['msMatchMedia'],mq=matchMedia?function(q){return!!matchMedia.call(win,q).matches;}:function(){return false;},viewportW=xports['viewportW']=function(){var a=docElem['clientWidth'],b=win['innerWidth'];return a=0&&r.left<=viewportW();};xports['inY']=function(el,cushion){var r=rectangle(el,cushion);return!!r&&r.bottom>=0&&r.top<=viewportH();};xports['inViewport']=function(el,cushion){var r=rectangle(el,cushion);return!!r&&r.bottom>=0&&r.right>=0&&r.top<=viewportH()&&r.left<=viewportW();};return xports;}));(function(){var MutationObserver,Util,WeakMap,getComputedStyle,getComputedStyleRX,__bind=function(fn,me){return function(){return fn.apply(me,arguments);};},__indexOf=[].indexOf||function(item){for(var i=0,l=this.length;i=viewTop;};WOW.prototype.util=function(){return this._util!=null?this._util:this._util=new Util();};WOW.prototype.disabled=function(){return!this.config.mobile&&this.util().isMobile(navigator.userAgent);};return WOW;})();}).call(this);var wow=new WOW({boxClass:'wow',mobile:false,live:true});wow.init();function toggle_menu(){if(window.innerWidth>943){var mobimenu=document.getElementById('mainmenu');if(mobimenu.classList.contains('fadeIn')){}else{}}else{var mobimenu=document.getElementById('mainmenu');if(mobimenu.classList.contains('fadeIn')){window.location.hash="";document.getElementsByClassName('checkbox').checked=false;mobimenu.classList.remove('animated');mobimenu.classList.remove('fadeIn');mobimenu.classList.add('animated');mobimenu.classList.add('fadeOut');mobimenu.classList.add('hideblock');document.getElementById('mobimenu_label').style.background='url(images/ico_menu.png) #ff8c00 no-repeat center center';document.getElementById('mobimenu_label').style.backgroundSize='65% 65%';}else{window.location.hash="header";mobimenu.classList.remove('fadeOut');mobimenu.classList.remove('hideblock');mobimenu.classList.add('showblock');mobimenu.classList.add('animated');mobimenu.classList.add('fadeIn');document.getElementById('mobimenu_label').style.background='url(images/ico_menu.png) #ffc37f no-repeat center center';document.getElementById('mobimenu_label').style.backgroundSize='65% 65%';}}} if(window.matchMedia){var mq=window.matchMedia("(min-width: 59em)");mq.addListener(WidthChange);WidthChange(mq);} function WidthChange(mq){if(mq.matches){var mobimenu=document.getElementById('mainmenu');if(mobimenu.classList.contains('animated')){mobimenu.classList.remove('fadeOut');mobimenu.classList.remove('animated');}} else{}} function init(){var scrolling=false;document.getElementsByClassName('mstart')[0].addEventListener('click',function(e){history.pushState(null,null,'#start');scrolling=e.target;ga('send','event','menuklick','start');var myVar=setTimeout(function(){foo()},480);function foo() {scrolling=false;}}) document.getElementsByClassName('mleistungen')[0].addEventListener('click',function(e){scrolling=e.target;ga('send','event','menuklick','leistungen');var myVar=setTimeout(function(){foo()},500);function foo() {scrolling=false;}}) document.getElementsByClassName('mkontakt')[0].addEventListener('click',function(e){scrolling=e.target;ga('send','event','menuklick','kontakt');var myVar=setTimeout(function(){foo()},500);function foo() {scrolling=false;}}) window.addEventListener('scroll',function(e){var distanceY=window.pageYOffset||document.documentElement.scrollTop,shrinkOn=100,header=document.querySelector("header");if(distanceY>shrinkOn){header.classList.add("smaller");}else{if(header.classList.contains("smaller")){header.classList.remove("smaller");}} var menu=document.getElementById('mainmenu').querySelectorAll("ul > li");var footer=document.getElementsByTagName('footer')[0];if(window.verge.scrollY()>3300){footer.classList.remove("shrink");} if(window.verge.inViewport(document.getElementById('start'))){menu[0].classList.add("active");menu[1].classList.remove("active");menu[2].classList.remove("active");footer.classList.add('foot_visible');if(footer.classList.contains("shrink")){footer.classList.remove("shrink");} if(!scrolling){history.pushState(null,null,'#start');ga('send','event','scroll','start');}}else if(window.verge.inViewport(document.getElementById('leistungen'))){menu[1].classList.add("active");menu[0].classList.remove("active");menu[2].classList.remove("active");footer.classList.add('shrink');if(!scrolling){history.pushState(null,null,'#leistungen');ga('send','event','scroll','leistungen');}}else if(window.verge.inViewport(document.getElementById('referenzen'))){menu[2].classList.add("active");menu[0].classList.remove("active");menu[1].classList.remove("active");if(!scrolling){history.pushState(null,null,'#referenzen');}}else if(window.verge.inViewport(document.getElementById('kontakt'))){menu[0].classList.remove("active");menu[1].classList.remove("active");menu[2].classList.add("active");if(!footer.classList.contains("shrink")&&!window.verge.inViewport(document.getElementById("impressum")))footer.classList.add("shrink");if(!scrolling){history.pushState(null,null,'#kontakt');ga('send','event','scroll','kontakt');}}else if(window.verge.inViewport(document.getElementById("impressum"))){footer.classList.remove("shrink");}});} window.onload=init();(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create','UA-7339322-1','auto');ga('send','pageview');