var isTouchDevice = false; var google; function alwaysReady() { $('body').addClass('js'); window.addEventListener('touchstart', function() { isTouchDevice = true; $('body').addClass('isTouchDevice'); }); $('#rd-menu-opener-input').attr("autocomplete", "off"); if ($('#rd-menu-opener-input').is(':checked')) { $('body').addClass('rdMenuVisible'); } $('#rd-menu-opener-input').change(function(){ if(this.checked) { $('body').addClass('rdMenuVisible'); } else { $('body').removeClass('rdMenuVisible'); } }); $('#search-form input[type="text"]').hide(); searchOpener = $('suchen'); searchOpener.click(function(e){ e.preventDefault(); $(this).hide(); $('#search-form input[type="text"]').fadeIn(200).focus(); $('#searchSubmit').fadeIn(200); }); $('#search-form').prepend(searchOpener); searchSubmit = $('>'); searchSubmit.click(function(){ $(this).closest('form').submit(); }); searchSubmit.insertAfter($('#search')); searchSubmit.hide(); $('.pic[data-title]').each(function(){ $('

' + $(this).data('title') + '

').appendTo($(this)); }); if ( $(window).width() > 540 ) { $('.pic-team').not('.empty').each(function(){ $(this).hover(function(){ if (isTouchDevice) return; $('.team-overlay').not($(this).find('.team-overlay')).trigger( "mouseout" ); $('.team-overlay').css({'z-index' : '99'}); img = $(this).find('.pic-caption-img'); startWidth = img.width(); startHeight = img.height(); if (!$(this).hasClass('hasOverlay')) { if ($(this).hasClass('odd')) { overlay = $('
'); } else { overlay = $('
'); } overlay.hover(function(){ },function(){ var hideLater = $(this); hideLater.removeClass('high'); hideLater.children('.caption').fadeOut(100); setTimeout(function(){ hideLater.css({'display' : 'none'}); }, 500); }); img.clone().appendTo(overlay); $(this).children('.caption').appendTo(overlay); $(this).append(overlay); $(this).addClass('hasOverlay') } var showLater = $(this).children('.team-overlay'); showLater.css({'z-index' : '100', 'display' : ''}); setTimeout(function(){ showLater.addClass('high'); showLater.children('.caption').fadeIn(1000); }, 100); }, function() { }); }); } if ( $('#map').length > 0 ) { //initMap(); } else { map = false; } } function initMap() { map = new google.maps.Map(document.getElementById('map'), { zoom: 18, center: new google.maps.LatLng(53.8362242, 9.9611459), mapTypeId: 'roadmap' }); var icons = { pin: { icon: 'media/marker.png' } }; var features = [ { position: new google.maps.LatLng(53.8362242, 9.9611459), type: 'pin' } ]; features.forEach(function(feature) { var marker = new google.maps.Marker({ position: feature.position, icon: icons[feature.type].icon, map: map }); }); }