// source --> http://indepthgeo.com/wp-content/plugins/siteorigin-panels/inc/../js/styling-25.min.js?ver=2.5.2 jQuery(function(t){var e=t(panelsStyles.fullContainer);0===e.length&&(e=t("body"));var r=function(){t(".siteorigin-panels-stretch.panel-row-style").each(function(){var r=t(this);r.css({"margin-left":0,"margin-right":0,"padding-left":0,"padding-right":0});var i=r.offset().left-e.offset().left,n=e.outerWidth()-i-r.parent().outerWidth();r.css({"margin-left":-i,"margin-right":-n,"padding-left":"full"===r.data("stretch-type")?i:0,"padding-right":"full"===r.data("stretch-type")?n:0});var a=r.find("> .panel-grid-cell");"full-stretched"===r.data("stretch-type")&&1===a.length&&a.css({"padding-left":0,"padding-right":0}),r.css({"border-left":0,"border-right":0})}),t(".siteorigin-panels-stretch.panel-row-style").length&&t(window).trigger("panelsStretchRows")};t(window).resize(r).load(r),r(),t("body").removeClass("siteorigin-panels-before-js")}); // source --> http://indepthgeo.com/wp-content/plugins/so-widgets-bundle/widgets/google-map/js/js-map.min.js?ver=1.8.5 function soGoogleMapInitialize(){new sowb.SiteOriginGoogleMap(window.jQuery).initMaps()}var sowb=window.sowb||{};sowb.SiteOriginGoogleMap=function(e){return{DEFAULT_LOCATIONS:["Addo Elephant National Park, R335, Addo","Cape Town, Western Cape, South Africa","San Francisco Bay Area, CA, United States","New York, NY, United States"],showMap:function(e,o,t){var i=Number(t.zoom);i||(i=14);var n="user_map_style",a={zoom:i,scrollwheel:t.scrollZoom,draggable:t.draggable,disableDefaultUI:t.disableUi,zoomControl:t.zoomControl,panControl:t.panControl,center:o,mapTypeControlOptions:{mapTypeIds:[google.maps.MapTypeId.ROADMAP,n]}},s=new google.maps.Map(e,a),r={name:t.mapName},l=t.mapStyles;if(l){var d=new google.maps.StyledMapType(l,r);s.mapTypes.set(n,d),s.setMapTypeId(n)}if(t.markerAtCenter&&(this.centerMarker=new google.maps.Marker({position:o,map:s,draggable:t.markersDraggable,icon:t.markerIcon,title:""})),t.keepCentered){var c;google.maps.event.addDomListener(s,"idle",function(){c=s.getCenter()}),google.maps.event.addDomListener(window,"resize",function(){s.setCenter(c)})}this.linkAutocompleteField(t.autocomplete,t.autocompleteElement,s,t),this.showMarkers(t.markerPositions,s,t),this.showDirections(t.directions,s,t)},linkAutocompleteField:function(o,t,i,n){if(o&&t){var a=function(e){this.inputAddress!=e&&(this.inputAddress=e,this.getLocation(this.inputAddress).done(function(e){i.setZoom(15),i.setCenter(e),this.centerMarker&&(this.centerMarker.setPosition(e),this.centerMarker.setTitle(this.inputAddress))}.bind(this)))}.bind(this),s=e(t);o.addListener("place_changed",function(){var e=o.getPlace();i.setZoom(15),e.geometry&&(i.setCenter(e.geometry.location),this.centerMarker&&this.centerMarker.setPosition(e.geometry.location))}.bind(this)),google.maps.event.addDomListener(t,"keypress",function(e){var o=e.keyCode||e.which;"13"==o&&e.preventDefault()}),s.focusin(function(){if(!this.resultsObserver){var o=document.querySelector(".pac-container");this.resultsObserver=new MutationObserver(function(){var o=e(e(".pac-item").get(0)),t=o.find(".pac-item-query").text(),i=o.find("span").not("[class]").text(),n=t+(i?", "+i:"");n&&a(n)});var t={attributes:!0,childList:!0,characterData:!0};this.resultsObserver.observe(o,t)}}.bind(this));var r=function(e){this.getGeocoder().geocode({location:e},function(o,t){if(t==google.maps.GeocoderStatus.OK&&o.length>0){var i=o[0].formatted_address;s.val(i),this.centerMarker&&(this.centerMarker.setPosition(e),this.centerMarker.setTitle(i))}}.bind(this))}.bind(this);i.addListener("click",function(e){r(e.latLng)}),this.centerMarker.addListener("dragend",function(e){r(e.latLng)})}},showMarkers:function(e,o,t){e&&e.length&&(this.infoWindows=[],e.forEach(function(e){var i=function(){this.getLocation(e.place).done(function(i){var n=new google.maps.Marker({position:i,map:o,draggable:t.markersDraggable,icon:t.markerIcon,title:""});if(e.hasOwnProperty("info")&&e.info){var a={content:e.info};e.hasOwnProperty("info_max_width")&&e.info_max_width&&(a.maxWidth=e.info_max_width);var s=t.markerInfoDisplay;a.disableAutoPan="always"===s;var r=new google.maps.InfoWindow(a);this.infoWindows.push(r);var l=s;"always"===s&&(l="click",r.open(o,n)),n.addListener(l,function(){r.open(o,n),"always"===s||t.markerInfoMultiple||this.infoWindows.forEach(function(e){e!==r&&e.close()})}.bind(this)),"mouseover"===s&&n.addListener("mouseout",function(){setTimeout(function(){r.close()},100)})}}.bind(this))}.bind(this);setTimeout(i,1e3*Math.random(),e)}.bind(this)))},showDirections:function(e,o){if(e){e.waypoints&&e.waypoints.length&&e.waypoints.map(function(e){e.stopover=Boolean(e.stopover)});var t=new google.maps.DirectionsRenderer;t.setMap(o);var i=new google.maps.DirectionsService;i.route({origin:e.origin,destination:e.destination,travelMode:e.travelMode.toUpperCase(),avoidHighways:e.avoidHighways,avoidTolls:e.avoidTolls,waypoints:e.waypoints,optimizeWaypoints:e.optimizeWaypoints},function(e,o){o===google.maps.DirectionsStatus.OK&&t.setDirections(e)})}},initMaps:function(){var o=e(".sow-google-map-autocomplete"),t=new e.Deferred;0===o.length?t.resolve():o.each(function(o,i){if("undefined"==typeof google.maps.places)return void t.reject('Sorry, we couldn\'t load the "places" library due to another plugin, so the autocomplete feature is not available.');var n=new google.maps.places.Autocomplete(i,{types:["address"]}),a=e(i).siblings(".sow-google-map-canvas");if(a.length>0){var s=a.data("options");s.autocomplete=n,s.autocompleteElement=i,this.getLocation(s.address).done(function(e){this.showMap(a.get(0),e,s),a.data("initialized",!0),t.resolve()}.bind(this)).fail(function(){a.append("

There were no results for the place you entered. Please try another.

"),t.reject()})}}.bind(this)),t.always(function(){e(".sow-google-map-canvas").each(function(o,t){var i=e(t);if(i.data("initialized"))return!0;var n=i.data("options"),a=n.address;if(!a){var s=n.markerPositions;s&&s.length&&(a=s[0].place)}this.getLocation(a).done(function(e){this.showMap(i.get(0),e,n),i.data("initialized")}.bind(this)).fail(function(){i.append("

There were no results for the place you entered. Please try another.

")})}.bind(this))}.bind(this)).fail(function(e){console.log(e)})},getGeocoder:function(){return this._geocoder||(this._geocoder=new google.maps.Geocoder),this._geocoder},getLocation:function(o){var t,i=new e.Deferred,n={address:o};if(o&&o.indexOf(",")>-1){var a=o.split(",");a&&2===a.length&&(t=new google.maps.LatLng(a[0],a[1]),isNaN(t.lat())||isNaN(t.lng())||(n={location:{lat:t.lat(),lng:t.lng()}}))}if(n.hasOwnProperty("location"))i.resolve(n.location);else if(n.hasOwnProperty("address")){if(!n.address){var s=parseInt(Math.random()*this.DEFAULT_LOCATIONS.length);n.address=this.DEFAULT_LOCATIONS[s]}this.getGeocoder().geocode(n,function(e,t){t===google.maps.GeocoderStatus.OK?i.resolve(e[0].geometry.location):t===google.maps.GeocoderStatus.OVER_QUERY_LIMIT?setTimeout(this.getLocation,1e3*Math.random(),o):t===google.maps.GeocoderStatus.ZERO_RESULTS&&i.reject(t)})}return i}}},jQuery(function(e){sowb.setupGoogleMaps=function(){var o,t=[];e(".sow-google-map-canvas").each(function(i,n){var a=e(n),s=a.data("options");s&&("undefined"!=typeof s.libraries&&null!==s.libraries&&(t=t.concat(s.libraries)),!o&&s.apiKey&&(o=s.apiKey))});var i="undefined"!=typeof window.google&&"undefined"!=typeof window.google.maps;if(i)soGoogleMapInitialize();else{var n="https://maps.googleapis.com/maps/api/js?callback=soGoogleMapInitialize";t&&t.length&&(n+="&libraries="+t.join(",")),o&&(n+="&key="+o),e("body").append('