function initializeAtriumMaps(){if($("#atriumMap").length>0&&iFrameConnections!=null){$(".maps .loader").show();var n=iFrameConnections.connections.indexOf(iFrameConnections.getConnection(atriumMapViewerURL));n>-1&&iFrameConnections.connections.splice(n,1);atriumIframeConnection=new IFrameConnection($("#atriumMap iframe").get(0).contentWindow,atriumMapViewerURL);initializeAtriumIframe();$(".list .row[data-item-id]").hover(function(){toggleIcon($(this),"mouseover")},function(){toggleIcon($(this),"default")})}}function initializeAtriumIframe(){atriumIframeInterval==null&&(clearInterval(atriumIframeInterval),atriumIframeInterval=setInterval(function(){initializeAtriumIframe()},100));atriumIframeConnection.request({method:"getCenter",callback:function(){clearInterval(atriumIframeInterval);atriumIframeInterval=null;loadAtriumSettings();$(".mapInteraction input:checkbox, .mapInteractionOverlay input:checkbox").each(function(n){$(this).parent().attr("class")=="category"?(!$(this).is(":checked")||$("#marker.add, #marker.edit").length>0)&&removeAtriumMarkers(n+1):toggleAtriumLayer(n+1,$(this))});$("#marker.add, #marker.edit, .maps.add, .maps.edit").length>0&&initializeAtriumMarkerAddMode(!0)}})}function showAtriumMap(){$(".maps .loader").hide();$("#atriumMap").css("visibility","visible")}function disableAtriumClicks(){atriumIframeConnection.addListener({event:"mapclick",once:!1,handler:function(){}})}function initializeAtriumMarkerAddMode(n){var t=$("input.rdX"),i=$("input.rdY"),f=$("input.latitude"),e=$("input.longitude"),r=$("input.center"),u=$("input.zoom");n&&($(".mapInteraction .categories").addClass("hide"),removeAtriumMarkers(0),r.length>0&&r.val()!="0"&&atriumIframeConnection.request({method:"setCenter",params:[parseFloat(r.val().split(",")[0]),parseFloat(r.val().split(",")[1])]}),u.length>0&&u.val()!="0"&&atriumIframeConnection.request({method:"zoomTo",params:parseFloat(u.val())}),t.length>0&&i.length>0&&t.val()!="0"&&i.val()!="0"&&atriumIframeConnection.request({method:"addMarkers",params:{layerId:0,markers:[{x:t.val().replace(settings.decimalSeparator,"."),y:i.val().replace(settings.decimalSeparator,"."),icon:"resources/icons/location.png",html:""}]}}),setInterval(function(){atriumIframeConnection.request({method:"getZoom",callback:function(n){typeof n!="undefined"&&n!=null&&$(".zoom").val(n)}})},1e3));atriumMapGlobal.listener=atriumIframeConnection.addListener({event:"mapclick",once:!0,handler:function(n){var r=n[0],u=n[1];t.length>0&&i.length>0&&(removeAtriumMarkers(0),atriumIframeConnection.request({method:"getZoom",callback:function(n){typeof n!="undefined"&&n!=null&&$(".zoom").val(n)}}),t.val(r.toString().replace(".",settings.decimalSeparator)),i.val(u.toString().replace(".",settings.decimalSeparator)),f.length>0&&e.length>0&&(f.val("0"),e.val("0")),atriumIframeConnection.request({method:"addMarkers",params:{layerId:0,markers:[{x:r,y:u,icon:"resources/icons/location.png",html:""}]}}),initializeAtriumMarkerAddMode(!1))}})}function removeAtriumMarkers(n){atriumIframeConnection.request({method:"removeMarkers",params:{layerId:n},callback:function(){showAtriumMap()}})}function toggleIcon(n,t){var r=[],u,i;for(atriumParams.center=null,atriumParams.fullscreen=null,atriumParams.zoomLevel=null,i=0;i<atriumParams.layers.length;i++)typeof atriumParams.layers[i].markers!="undefined"&&atriumParams.layers[i].markers!=null&&$.merge(r,atriumParams.layers[i].markers);for(u=parseInt(n.attr("data-item-id")),i=0;i<r.length;i++)if(typeof r[i].id!="undefined"&&r[i].id==u&&typeof r[i].icon[t]!="undefined"&&r[i].icon[t]!=null&&r[i].icon[t]!=""){r[i].icon.src=r[i].icon[t];loadAtriumSettings();toggleMarkersAndLayers();return}}function toggleAtriumLayer(n,t){atriumIframeConnection.request({method:"setLayerVisibility",params:{id:n,visibility:t.is(":checked")}})}function toggleMarkersAndLayers(){$(".mapInteraction input:checkbox, .mapInteractionOverlay input:checkbox").each(function(n){$(this).parent().attr("class")=="category"?(!$(this).is(":checked")||$("#marker.add, #marker.edit").length>0)&&removeAtriumMarkers(n+1):toggleAtriumLayer(n+1,$(this))})}function initializeGoogleMaps(){if($("#googleMapsMap").length>0){if($(".maps .loader").show(),map=createGoogleMapsMap(),googleMapsMapSettings.showMarkers&&initializeGoogleMapsMarkers(),initializeGoogleMapsLayers(),$("#marker.add, #marker.edit, .maps.add, .maps.edit").length>0&&google.maps.event.addListenerOnce(map,"idle",initializeGoogleMapsAddEditMode),$("#marker.add, #marker.edit, .maps").length>0&&$(".markerSearch").length>0&&(settings.google.APIKey!=""||globals.domain.indexOf("mett.nl")>-1)){var n=$(".markerSearch"),t=n.find("input:text");t.focus(function(){t.val()==settings.errors.invalidAddressText&&($(".markerSearch").removeClass("danger"),t.val(""))});n.find("input:button").click(function(){$("#marker.add, #marker.edit, .maps.add, .maps.edit").length>0?getMarkerCoordinates(n.find("input:text").val()):getMarkerCoordinates(n.find("input:text").val(),!1);$(".field.markerDelete").removeClass("hide")});t.keydown(function(t){if(t.keyCode==13)return t.preventDefault(),t.stopPropagation(),n.find("input:button").click(),!1});($("#marker.add, #marker.edit, .maps.add, .maps.edit").length>0||settings.communityID===2188&&settings.section.ID===186019)&&n.removeClass("hide")}$(".list .row[data-item-id]").hover(function(){triggerMarkerEvent(parseInt($(this).attr("data-item-id")),"mouseover")},function(){triggerMarkerEvent(parseInt($(this).attr("data-item-id")),"mouseout")});$(".maps .loader").hide();$("#googleMapsMap").css("visibility","visible").prop("title",settings.googleMaps.title);$(".categories .category input:checkbox").each(function(){$.fn.getQueryString("category")!=""?$(this).parent().find("label").html().toLowerCase()==$.fn.getQueryString("category").toLowerCase()?$(this).attr("checked",!1).click():$(this).attr("checked",!0).click():typeof $(this)[0].onclick=="function"&&$(this)[0].onclick()});$(".categories .category input:checkbox").change(function(){$(".categories .category input:checkbox:checked").length===0?$('.categories .toggleAll input[type="checkbox"]').attr("checked",!1):$(".categories .category input:checkbox:checked").length==$(".categories .category").length&&$('.categories .toggleAll input[type="checkbox"]:not(:checked)').click()});$(".categories .category").length>3&&($(".categories .toggleAll").removeClass("hide"),$('.categories .toggleAll input[type="checkbox"]').change(function(){this.checked?$('.categories .category input[type="checkbox"]:not(:checked)').click():$('.categories .category input[type="checkbox"]:checked').click()}))}}function createGoogleMapsMap(){var n,r=googleMapsMapSettings.latitude,u=googleMapsMapSettings.longitude,f=googleMapsMapSettings.zoomLevel,t=$(".center"),i=$(".zoom"),e;switch(googleMapsMapSettings.mapType){case"roadmap":mapType=google.maps.MapTypeId.ROADMAP;break;case"satellite":mapType=google.maps.MapTypeId.SATELLITE;break;case"hybrid":mapType=google.maps.MapTypeId.HYBRID;break;case"terrain":mapType=google.maps.MapTypeId.TERRAIN;break;default:mapType=google.maps.MapTypeId.ROADMAP}return $("#marker.add, #marker.edit").length>0&&(t.length>0&&t.val()!="0"&&(r=parseFloat(t.val().split(",")[0]),u=parseFloat(t.val().split(",")[1])),i.length>0&&i.val()!="0"&&(f=parseFloat(i.val()))),e={center:new google.maps.LatLng(r,u),zoom:f,mapTypeId:mapType,draggable:googleMapsMapSettings.draggable,mapTypeControl:googleMapsMapSettings.maptypeControl,scrollwheel:!1,zoomControl:googleMapsMapSettings.zoomControl,zoomControlOptions:{position:google.maps.ControlPosition.LEFT_TOP},streetViewControl:googleMapsMapSettings.streetviewControl,streetViewControlOptions:{position:google.maps.ControlPosition.LEFT_BOTTOM}},n=new google.maps.Map(document.getElementById("googleMapsMap"),e),googleMapsMapSettings.staticMap&&n.setOptions({draggable:!1,zoomControl:!1,scrollwheel:!1,streetViewControl:!1,mapTypeControl:!1,panControl:!1,keyboardShortcuts:!1,disableDoubleClickZoom:!0}),google.maps.event.addListener(n,"infowindowprepareopen",function(n){n[0].contentElem.innerHTML=n[0].contentElem.innerHTML.replace("_blank","_parent")}),googleMapsMapSettings.fullscreen&&n.panBy(0,$("#top").height()+$("#pathOptions").height()),n}function initializeGoogleMapsAddEditMode(){var n,f=0,i=$(".latitude"),r=$(".longitude"),s=$(".rdX"),h=$(".rdY"),e=$(".zoom"),t=$(".googleMapsMapTypeID"),u,c,o;if(i.length>0&&r.length>0){if(map.setOptions({draggableCursor:"crosshair"}),t.length>0&&google.maps.event.addListener(map,"maptypeid_changed",function(){switch(map.mapTypeId){case"roadmap":t.val("0");break;case"satellite":t.val("1");break;case"hybrid":t.val("2");break;case"terrain":t.val("3")}}),google.maps.event.addListener(map,"zoom_changed",function(){e.val(map.getZoom().toString())}),$(".mapInteraction .categories input:checkbox").prop("checked",!1),i.val()!=""&&r.val()!=""){for(u=0;u<googleMapsMarkerObjects.length;u++)googleMapsMarkerObjects[u].setMap(null);c=new google.maps.LatLng(parseFloat(i.val().replace(settings.decimalSeparator,".")),parseFloat(r.val().replace(settings.decimalSeparator,".")));n=new google.maps.Marker({position:c});googleMapsMarkerObjects=[];googleMapsMarkerObjects.push(n);n.setMap(map);$(".field.markerDelete").removeClass("hide")}o=new google.maps.OverlayView;o.draw=function(){};o.setMap(map);google.maps.event.addListener(map,"mousedown",function(n){f={x:n.pixel.x,y:n.pixel.y}});google.maps.event.addListener(map,"click",function(t){if(f.x==t.pixel.x&&f.y==t.pixel.y){for(var u=0;u<googleMapsMarkerObjects.length;u++)googleMapsMarkerObjects[u].setMap(null);n!=null&&n.setMap(null);n=new google.maps.Marker({position:t.latLng});googleMapsMarkerObjects=[];googleMapsMarkerObjects.push(n);n.setMap(map);i.val(t.latLng.lat().toString().replace(".",settings.decimalSeparator));r.val(t.latLng.lng().toString().replace(".",settings.decimalSeparator));s.length>0&&s.val("0");h.length>0&&h.val("0");e.length>0&&e.val(map.getZoom().toString());$(".field.markerDelete").removeClass("hide")}})}}function removeGoogleMapsColor(){typeof map!="undefined"&&map.setOptions({styles:[{featureType:"water",elementType:"geometry",stylers:[{color:"#e9e9e9"},{lightness:17}]},{featureType:"landscape",elementType:"geometry",stylers:[{color:"#f5f5f5"},{lightness:20}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:"#ffffff"},{lightness:17}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#ffffff"},{lightness:29},{weight:.2}]},{featureType:"road.arterial",elementType:"geometry",stylers:[{color:"#ffffff"},{lightness:18}]},{featureType:"road.local",elementType:"geometry",stylers:[{color:"#ffffff"},{lightness:16}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#f5f5f5"},{lightness:21}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#dedede"},{lightness:21}]},{elementType:"labels.text.stroke",stylers:[{visibility:"on"},{color:"#ffffff"},{lightness:16}]},{elementType:"labels.text.fill",stylers:[{saturation:36},{color:"#333333"},{lightness:40}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"transit",elementType:"geometry",stylers:[{color:"#f2f2f2"},{lightness:19}]},{featureType:"administrative",elementType:"geometry.fill",stylers:[{color:"#fefefe"},{lightness:20}]},{featureType:"administrative",elementType:"geometry.stroke",stylers:[{color:"#fefefe"},{lightness:17},{weight:1.2}]}]})}function initializeGoogleMapsMarkers(){for(var n,i,r=new google.maps.InfoWindow,t=0;t<googleMapsMarkers.length;t++)i=googleMapsMarkerIcons[googleMapsMarkers[t].iconID],typeof i=="undefined"||i==null?i=["",""]:$.each(i,function(n){$("<img />").src=i[n]}),n=new google.maps.Marker({id:googleMapsMarkers[t].id,position:new google.maps.LatLng(googleMapsMarkers[t].latitude,googleMapsMarkers[t].longitude),title:HTMLDecode(googleMapsMarkers[t].title),icon:i[0],defaultIcon:i[0],mouseOverIcon:i[1],optimized:!1}),googleMapsMapSettings.suppressInformationWindows||google.maps.event.addListener(n,"click",function(n,t){return function(){r.setContent(googleMapsMarkers[t].description);r.open(map,n)}}(n,t)),typeof n.mouseOverIcon!="undefined"&&n.mouseOverIcon!=null&&n.mouseOverIcon!=""&&n.mouseOverIcon!="/"&&(google.maps.event.addListener(n,"mouseover",function(){if(this.icon!=this.mouseOverIcon){for(var n=0;n<googleMapsMarkerObjects.length;n++)typeof googleMapsMarkerObjects[n].defaultIcon!="undefined"&&$.trim(googleMapsMarkerObjects[n].defaultIcon)!=""&&typeof googleMapsMarkerObjects[n].id!="undefined"&&googleMapsMarkerObjects[n]!=this.id&&googleMapsMarkerObjects[n].icon!=googleMapsMarkerObjects[n].defaultIcon&&(googleMapsMarkerObjects[n].icon=googleMapsMarkerObjects[n].defaultIcon,googleMapsMarkerObjects[n].setMap(map));this.setIcon(this.mouseOverIcon)}}),google.maps.event.addListener(n,"mouseout",function(){this.setIcon(this.defaultIcon)})),googleMapsMarkers[t].showInMapInitial?n.setMap(map):n.setMap(null),googleMapsMarkerObjects[t]=n}function HTMLDecode(n){return $("<div><\/div>").html(n).text()}function toggleGoogleMapsMarkers(n,t){for(var i=0;i<googleMapsMarkers.length;i++)googleMapsMarkers[i].iconID==n&&(t.is(":checked")?googleMapsMarkerObjects[i].setMap(map):googleMapsMarkerObjects[i].setMap(null))}function triggerMarkerEvent(n,t){for(var i=0;i<googleMapsMarkerObjects.length;i++)if(typeof googleMapsMarkerObjects[i].id!="undefined"&&googleMapsMarkerObjects[i].id==n){google.maps.event.trigger(googleMapsMarkerObjects[i],t);return}}function getMarkerCoordinates(n,t){typeof t=="undefined"&&(t=!0);n!=""&&(geocoder=new google.maps.Geocoder,geocoder.geocode({address:n},function(n,i){var u,r,f;if(i==google.maps.GeocoderStatus.OK)if($(".markerSearch").removeClass("danger"),$(".markerSearch #addressError").remove(),$(".markerSearch #addressInfo").remove(),$(".markerSearch input:text").removeAttr("aria-describedby"),$('<div id="addressInfo" class="clear">'+settings.errors.addressSelectedText+"<\/div>").insertAfter(".markerSearch .button"),t){for(u=0;u<googleMapsMarkerObjects.length;u++)googleMapsMarkerObjects[u].setMap(null);r=n[0].geometry.location;map.setCenter(r);f=new google.maps.Marker({map:map,position:r});$(".latitude").val(r.lat().toString().replace(".",settings.decimalSeparator));$(".longitude").val(r.lng().toString().replace(".",settings.decimalSeparator));googleMapsMarkerObjects=[];googleMapsMarkerObjects.push(f);f.setMap(map)}else n[0].geometry.location&&(map.setZoom(12),map.setCenter(n[0].geometry.location));else $(".markerSearch #addressError").remove(),$(".markerSearch #addressInfo").remove(),$(".markerSearch").addClass("danger"),$('<div id="addressError" class="clear icon-attention before">'+settings.errors.invalidAddressText+"<\/div>").insertAfter(".markerSearch .button"),$(".markerSearch input:text").attr("aria-describedby","addressError")}))}function initializeGoogleMapsLayers(){for(i=googleMapsLayers.length;i>0;--i){var n={};n.ID=i-1;n.name=googleMapsLayers[n.ID][0];n.URL=googleMapsLayers[n.ID][1];n.showByDefault=googleMapsLayers[n.ID][2];n.showInLegend=googleMapsLayers[n.ID][3];n.useAsDrawBoundaries=googleMapsLayers[n.ID][4];n.map=map;n.KMLlayer=null;(!n.showByDefault||n.useAsDrawBoundaries)&&(n.map=null);n.useAsDrawBoundaries||(n.KMLlayer=new google.maps.KmlLayer(n.URL,{map:n.map,preserveViewport:!0,clickable:$("#marker.add, #marker.edit, .maps.add, .maps.edit").length==0}));googleMapsLayerObjects[n.ID]=n}}function toggleGoogleMapsLayer(n,t){for(i=0;i<googleMapsLayerObjects.length;i++)if(!googleMapsLayerObjects[i].useAsDrawBoundaries&&googleMapsLayerObjects[i].name==n){t.is(":checked")?googleMapsLayerObjects[i].KMLlayer.setMap(map):googleMapsLayerObjects[i].KMLlayer.setMap(null);return}}var iFrameConnections=function(){return{connections:[],thisWindow:window}}(),map,googleMapsMarkerObjects,googleMapsLayerObjects;iFrameConnections.init=function(){this.thisWindow=window;this.thisWindow.removeEventListener("message",iFrameConnections.messageHandler);this.thisWindow.addEventListener("message",iFrameConnections.messageHandler);this.initialized=!0};iFrameConnections.addConnection=function(n){var t=this;t.initialized||t.init();t.connections.push(n)};iFrameConnections.getConnection=function(n){var i=this,r,t;for(r in i.connections)if(t=i.connections[r],t.targetOrigin==n)return t;return null};iFrameConnections.messageHandler=function(n){var a=this,f,t,s,e,l,r;if(n.origin=="https://mapviewer.mett.nl")if(f=iFrameConnections.getConnection(n.origin),f)if(t=typeof n.data!="object"?JSON.parse(n.data):n.data,t.type==="request"){var e=t,h=e.options.method,c=e.options.params,u=this;for(i=0;i<e.options.scope.split(".").length;i++)u=u[e.options.scope.split(".")[i]];s=u[h](c);f.response(t.requestId,s,n.origin)}else if(t.type==="response")e=f.requests[t.requestId],e&&(e.options.callback&&e.options.callback(t.responseText),delete f.request[t.requestId]);else if(t.type==="addListener"){var r=t,o=r.options.event,u=this;for(i=0;i<r.options.scope.split(".").length;i++)u=u[r.options.scope.split(".")[i]];l=u.addListener(o,function(n){f.fireEvent(t.listenerId,n);r.options.once&&u.removeListener(o,r.listenerId)},r.listenerId)}else if(t.type==="removeListener"){var r=t,o=r.options.event,u=this;for(i=0;i<r.options.scope.split(".").length;i++)u=u[r.options.scope.split(".")[i]];u.removeListener(o,r.listenerId)}else t.type==="event"&&(r=f.listeners[t.listenerId],r&&(r.options.handler&&r.options.handler(t.responseText),r.options.once===!0&&delete f.listeners[t.listenerId]));else throw"A request from "+n.origin+" is not allowed.";};IFrameConnection=function(n,t){this.requests={};this.listeners={};this.targetWindow=n;this.targetOrigin=t;iFrameConnections.addConnection(this)};IFrameConnection.prototype.request=function(n){var t=this,i={id:JSON.stringify(new Date),options:n},r;t.requests[i.id]=i;r={type:"request",requestId:i.id,options:{method:n.method,scope:n.scope,params:n.params}};t.targetWindow.postMessage(JSON.stringify(r),t.targetOrigin)};IFrameConnection.prototype.response=function(n,t){var i=this,r={type:"response",requestId:n,responseText:t};i.targetWindow.postMessage(JSON.stringify(r),i.targetOrigin)};IFrameConnection.prototype.addListener=function(n){var i=this,t={id:JSON.stringify(new Date),options:n},r;return i.listeners[t.id]=t,r={type:"addListener",listenerId:t.id,options:{event:n.event,once:n.once,scope:n.scope,handler:n.handler}},i.targetWindow.postMessage(JSON.stringify(r),i.targetOrigin),t};IFrameConnection.prototype.removeListener=function(n){var t=this,i;if(n)i={type:"removeListener",listenerId:n.id,options:{event:n.options.event,scope:n.options.scope}},t.targetWindow.postMessage(JSON.stringify(i),t.targetOrigin),t.listeners[n.id]&&delete t.listeners[n.id];else throw"Listener is null";};IFrameConnection.prototype.fireEvent=function(n,t){var i=this,r={type:"event",listenerId:n,responseText:t};i.targetWindow.postMessage(JSON.stringify(r),i.targetOrigin)};var atriumIframeConnection=null,atriumIframeInterval=null,atriumMapViewerURL="https://mapviewer.mett.nl",atriumMapGlobal={};$(window).load(function(){initializeAtriumMaps();typeof Sys!="undefined"&&typeof Sys.WebForms!="undefined"&&Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(function(){$("#atriumJavascript").remove();atriumIframeConnection!=null&&$(".center").length>0&&$(".zoom").length>0&&atriumIframeConnection.request({method:"getCenter",callback:function(n){typeof n!="undefined"&&n!=null&&($(".center").val(n),atriumIframeConnection.request({method:"getZoom",callback:function(n){typeof n!="undefined"&&n!=null&&$(".zoom").val(n)}}))}})});Sys.WebForms.PageRequestManager.getInstance().add_endRequest(function(){$("#atriumJavascript").length>0&&window.eval($("#atriumJavascript").html());setTimeout(function(){initializeAtriumMaps()},1e3)})});googleMapsMarkerObjects=[];googleMapsLayerObjects=[];$(window).load(function(){initializeGoogleMaps();typeof Sys!="undefined"&&typeof Sys.WebForms!="undefined"&&(Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(function(){$("#googleMapsJavascript").remove();map!=null&&$(".center").length>0&&$(".zoom").length>0&&typeof map.getCenter()!="undefined"&&($(".center").val(map.getCenter().toString().replace("(","").replace(")","").replace(" ","")),$(".zoom").val(map.getZoom().toString()))}),Sys.WebForms.PageRequestManager.getInstance().add_endRequest(function(){$("#googleMapsJavascript").length>0&&window.eval($("#googleMapsJavascript").html());initializeGoogleMaps()}))});$(window).load(function(){$("#toolbarTop .dropDownLink.markerAdd, .sectionOptions .button.markerAdd a").initializeMarkerAdd()});$(document).ready(function(){$.fn.initializeMaps();typeof Sys!="undefined"&&typeof Sys.WebForms!="undefined"&&Sys.WebForms.PageRequestManager.getInstance().add_endRequest(function(){$.fn.initializeMaps()})});$.fn.initializeMaps=function(){$("#maps.section, #eParticipation.section").initializeMapSection();$("#maps.item").initializeMapItem();$("#marker.add, #marker.edit").initializeMarkerAddEdit();$("#cms").initializeMapsCMS()};$.fn.initializeMapSection=function(){var n=$(this);if(n.length>0){if((typeof googleMapsMapSettings!="undefined"&&googleMapsMapSettings.fullscreen||typeof atriumParams!="undefined"&&atriumParams.fullscreen)&&$("#marker.add, #marker.edit").length==0)$("body").addClass("noScroll").scrollTop(0),$("#royalSlider, #path, #content, #toolbarBottom, #spacerBottom, #bottom").addClass("hide"),$("#total, #content, .maps").addClass("fullscreen"),$("#path").removeClass("hide"),$(".maps, .maps iframe").css("height",""),$("#content").html($("#toolbarTop, #toolbarBottom, .sectionOptions, .maps")).removeClass("hide"),$(".maps .loader").css("top","-"+$("#top").height()+"px");else if($(".maps").before('<a href="#skipMap" class="skipLink">'+settings.map.skip+"<\/a>"),$(".maps").after('<div id="skipMap" tabindex="-1"><\/div>'),$(".sectionTitle.add, .sectionTitle.edit").addClass("hide"),$("#royalSlider, .sectionTitle:first, #toolbarTop, .markers").removeClass("hide"),$(".mapInteraction").length==0&&($(".no-touch").length>0||$(".touch.desktop").length>0))switch(settings.googleMaps.categoriesLocation){case 0:$(".layout25-50-25").length>0||$(".layout33-33-33").length>0||$(".layout50-50").length>0||$(".layout75-25").length>0?$("#right").prepend('<div class="mapInteraction" />'):$("#left").prepend('<div class="mapInteraction" />');break;case 1:$(".sectionContent").prepend('<div class="mapInteraction" />');break;case 2:$(".sectionContent .maps").after('<div class="mapInteraction" />')}$(".legend input:checkbox").length>0&&($(".legend .categories input:checkbox").length>0&&$(".legend .categories").removeClass("hide"),$(".legend .layers input:checkbox").length>0&&$(".legend .layers").removeClass("hide"),$(".mapInteraction").length>0&&$(".mapInteraction").html("").html($(".legend")),$(".maps .toolbar .legend").length>0&&$(".maps .toolbar").show(),$(".legend").removeClass("hide"))}};$.fn.initializeMapItem=function(){var n=$(this);n.length>0&&($("#center").length>0&&$("#right").length>0?$("#right").prepend($(".maps")):$("#left").length>0&&$("#left").prepend($(".maps")))};$.fn.initializeMarkerAddEdit=function(){var n=$(this);n.length>0&&($("#royalSlider, .sectionTitle, #toolbarTop, .button.markerAdd").addClass("hide"),$(".markerTitle input:text").val()==""?($(".add").removeClass("hide"),$(".sectionTitle.add").focus()):($(".edit").removeClass("hide"),$(".sectionTitle.edit").focus()),$(".markerCategory select option").length>1&&($(".markerCategory select option:first").remove(),$(".markerCategory").removeClass("hide")),$(".tagsInput").initializeTags(),$(".markerReadMoreLink input:text").val()!=""&&($(".markerReadMore select").prop("selectedIndex",1),$(".markerReadMoreLink").removeClass("hide")),$(".markerReadMore select").change(function(){$(this).prop("selectedIndex")==1?$(".markerReadMoreLink").removeClass("hide"):$(".markerReadMoreLink").addClass("hide")}))};$.fn.initializeMapsCMS=function(){var n=$(this);n.length>0&&($("#categoryID").length>0&&$("#categoryID input").val().length>0||$("#layerID").length>0&&$("#layerID input").val().length>0?($(".edit").removeClass("hide"),$(".selectLayer input:checkbox").unbind("click").click(function(){$(".selectLayer input:checkbox").not($(this)).prop("checked",!1)})):$(".add").removeClass("hide"),$(".selectWMS").length>0&&($(".selectWMS input").is(":checked")?($(".selectWMSOptions, .selectLayerOptions").show(),$(".addWMSOptions").hide()):($(".selectWMSOptions, .selectLayerOptions").hide(),$(".addWMSOptions").show()),$(".selectWMS input").unbind("click").click(function(){$(".selectWMSOptions, .selectLayerOptions").show();$(".addWMSOptions").hide()})),$(".addWMS").length>0&&$(".addWMS input").unbind("click").click(function(){$(".addWMSOptions").show();$(".selectWMSOptions, .selectLayerOptions").hide()}),$(".layerSource").length>0&&$(".layerSource").val()!=""&&$(".selectLayerOptions").show(),$(".mapOptions .upload").each(function(n){var t=$(this);t.find(".itemID").val($(".pluploadInformation .itemID").val());t.find(".sectionIDs").val($(".pluploadInformation .sectionIDs").val());n==0?t.append($(".pluploadInformation .pluploadFileName").not(".pluploadFileNameMouseOver")):t.append($(".pluploadInformation .pluploadFileNameMouseOver"))}))};$.fn.initializeMarkerAdd=function(){$(this).length!=0&&$(this).unbind("click").click(function(){return $("#toolbarBottom .button.markerAdd input")[0].click(),!1})}