1// Default 3.0.0 2function email_output(user,domain,tld,text,get,tag){email=user+'@'+domain+'.'+tld;if(!text)text=email;if(tag)tag=' '+tag;document.write('<a href="mailto:'+email+get+'"'+tag+'>'+text+'</a>');} 3function window_open(url,name,features){popup=window.open(url,name,features);popup.focus();} 4 5// Custom 6$(function(){ 7 $.datepicker.setDefaults({dateFormat: 'dd.mm.yy', regional: ''}); 8 $('.datepicker').datepicker($.datepicker.regional[$('html').attr('lang')]); 9 10 $('#showmenu').click(function() { 11 var $body = $('body'); 12 $('#nav').toggleClass('mobilemenu'); 13 if(!$body.hasClass('showmobilemenu')) 14 setTimeout(function(){ $body.toggleClass('showmobilemenu'); }, 1000); 15 else 16 $body.toggleClass('showmobilemenu'); 17 }); 18 19 $('#popup-closer').click(function(e) { 20 e.preventDefault(); 21 $('#popup-overlay').remove(); 22 }); 23 24 $('.popup-closer').click(function(e) { 25 e.preventDefault(); 26 $(this).closest('.popup-overlay').hide(); 27 }); 28 29 $('#micheline_sommeliere').click(function() { 30 $('#sommelier-award-overlay').show(); 31 }); 32 33 // Google Analytics Trackings Laden 34 if(typeof gtag === "function") { 35 if (window.fetch) { 36 // Es wird versucht collect ohne Parameter aufzurufen, wenn dies nicht funtkioniert wird GA von einen Plugin geblock oder GA ist Down 37 fetch('https://www.google-analytics.com/collect').then(function (response) { 38 if (!response.ok) { 39 throw Error(response.statusText); 40 } 41 // Externe Link Klicks tracken 42 trackOutgoingLinks = function(event){ 43 var el = event.srcElement || event.target; 44 while(el && (typeof el.tagName == 'undefined' || el.tagName.toLowerCase() != 'a' || !el.href)){ 45 el = el.parentNode; 46 } 47 if(el && el.href){ 48 var link = el.href, 49 compare_link = link; 50 if(compare_link.indexOf('?') !== -1) 51 compare_link = compare_link.substr(0, compare_link.indexOf('?')); 52 if(compare_link.indexOf(location.host) == -1 && !compare_link.match(/^javascript\:/i)){ 53 var hitbackcnt = 0; 54 var hitBack = function(link, target){ 55 if(hitbackcnt > 0) 56 return false; 57 hitbackcnt++; 58 target ? window.open(link, target) : window.location.href = link; 59 }; 60 var target = (el.target && !el.target.match(/^_(self|parent|top)$/i)) ? el.target : false; 61 gtag('event', 'Klick', { 62 'event_category': 'Externer Link', 63 'event_label': link, 64 'event_callback': function() { 65 hitBack(link, target); 66 } 67 }); 68 event.preventDefault ? event.preventDefault() : event.returnValue = !1; 69 } 70 } 71 } 72 var w = window; 73 if(w.addEventListener) { 74 w.addEventListener("load",function() { 75 document.body.addEventListener("click", trackOutgoingLinks,!1) 76 },!1); 77 } else { 78 w.attachEvent && w.attachEvent("onload",function() { 79 document.body.attachEvent("onclick", trackOutgoingLinks) 80 }); 81 } 82 83 // Telefon Tracking 84 $('.ga_event_telefon').click(function () { 85 gtag('event', 'Klick', { 86 'event_category': 'Telefon', 87 'event_label': $(this).attr('href').replace('tel:', '') 88 }); 89 }); 90 91 // E-Mail Tracking 92 $('.ga_event_email').click(function () { 93 gtag('event', 'Klick', { 94 'event_category': 'E-Mail', 95 'event_label': $(this).attr('href').replace('mailto:', '') 96 }); 97 }); 98 }).then(function (response) { 99 }).catch(function (error) { 100 // Client Blocked GA 101 }); 102 } 103 } 104});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.