function initFairMap(){var n=document.getElementById("fairMapCanvas"),i=$(n).data("lng"),r=$(n).data("lat"),t=new google.maps.LatLng(i,r),u={center:t,zoom:15,mapTypeId:google.maps.MapTypeId.ROADMAP},f=new google.maps.Map(n,u),e={url:"/assets/images/icn_bubble_map.png",size:new google.maps.Size(51,38),origin:new google.maps.Point(0,0),anchor:new google.maps.Point(0,0)},o=new google.maps.Marker({position:t,map:f,icon:e,shape:{coord:[1,1,1,38,30,38,30,1],type:"poly"},zIndex:1,anchorPoint:new google.maps.Point(15,8)})}function loadMapsAPI(){typeof google=="object"&&typeof google.maps=="object"?typeof InfoBox=="object"?initMap():$.ajax({url:"/assets/javascripts/infobox.min.js",dataType:"script",cache:!0,success:function(){initMap()}}):$.ajax({url:"//maps.googleapis.com/maps/api/js?key="+GMapsAPIKey,dataType:"script",cache:!0,success:function(){$.ajax({url:"/assets/javascripts/infobox.min.js",dataType:"script",cache:!0,success:function(){initMap()}})}})}function initMap(){$("#fairMapCanvas").get(0)?initFairMap():map._init()}function acceptMaps(){Cookies.set("GMapAllowed","true",{expires:options.expires,path:"/",sameSite:"lax"});loadMapsAPI()}var kaeser=kaeser||{},map;kaeser.Map=function(){var n=undefined,y="show-map",f="active",i="inactive",e=!1,t=[],o=[],r=$("#mapCanvas"),s=$(".map > .spacer"),c=-130,l=110,p=-10,u=-100,w=function(){$(".map .accordion .element .head").on("click",function(){var a=$(this).height(),r,i;if(a>20?$(".map .spacer .accordion .active .head").addClass("head headheight"):$(".map .spacer .accordion .active .head").removeClass("headheight"),r=$(this).parent().find(".infoBox"),r.get(0)){var s=r.attr("rel").split(","),v=s[0],y=s[1],f=$(this).parent().index();for(i=0;i20?$(".map .spacer .accordion .active .head:eq(0)").addClass("head headheight"):$(".map .spacer .accordion .active .head:eq(0)").removeClass("headheight")},k=function(){$(".map .accordion .element span").length&&$(".map .accordion .element .infoBox").unwrap("span")},d=function(n,t){google.maps.event.addListener(n,"click",function(){$($(".map .accordion .element")[t]).find(".head").trigger("click")})},g=function(i){var u=i.index(),f=i.find(".infoBox");if(f.get(0)){var s={},h=new google.maps.Size(-206,-15),c="25px";kaeser.viewportSize.isPhone()&&(s={width:"290px"},h=new google.maps.Size(-156,-40),c="10px 14px");var l=f.attr("rel").split(","),a=l[0],v=l[1],y=f.html(),e=new google.maps.Marker({map:n,position:new google.maps.LatLng(a,v),icon:"/assets/images/icn_bubble_map.png"}),p={content:y,boxClass:"infoBox",closeBoxURL:"/assets/images/close.png",closeBoxMargin:c,alignBottom:!0,boxStyle:s,pixelOffset:h},r=new InfoBox(p);o[u]=e;kaeser.viewportSize.isPhone()||r.open(n,e);d(e,u);i.hasClass("active")?r.setVisible(!0):r.setVisible(!1);t[u]=r}},a=function(){var n=$(".map .accordion .element");n.length===1&&r.height(600);n.each(function(){g($(this))})},nt=function(){var i={mapTypeId:google.maps.MapTypeId.ROADMAP},t=null;if($(".map .accordion .element.active").length){var f=$(".map .accordion .element.active .infoBox").attr("rel").split(","),e=f[0],o=f[1];i.center=new google.maps.LatLng(e,o);i.zoom=15}else t=new google.maps.LatLngBounds,$(".map .accordion .element .infoBox").each(function(n,i){var r=$(i).attr("rel").split(","),u=r[0].trim(),f=r[1].trim();t.extend(new google.maps.LatLng(u,f))});n=new google.maps.Map(r.get(0),i);t!=null?(n.setCenter(t.getCenter()),n.fitBounds(t),n.panToBounds(t)):$("body").attr("dir")!=undefined&&$("body").attr("dir").toLowerCase()=="rtl"?n.panBy(l,u):n.panBy(c,u)},tt=function(){kaeser.viewportSize.isPhone()&&$(".accordion > .element").length>1&&s.find(".accordion > .element.active").removeClass("active")},v,h;this._addTabSelection=function(){if($(".container .map").find("nav.map-selection").length==0){var n=$("