// source --> http://indepthgeo.com/wp-content/themes/vantage/inc/mobilenav/js/mobilenav.min.js?ver=1.6.0 jQuery(function(i){i.fn.mnShowFrame=function(){var e=i(this);return e.css({right:i(document).width()}).show().animate({right:0},"fast",function(){i(window).resize()}),e},i.fn.mnHideFrame=function(){var e=i(this);e.add(".mobile-nav-frame").css({right:0}).animate({right:i(document).width()},"fast",function(){i(this).hide(),i(window).resize()}),i("body").animate({"padding-left":0},"fast")};var e=[];i(".so-mobilenav-standard").each(function(){var n=i(this).data("id");if("undefined"!=typeof e[n])return!0;e[n]=!0;var a,t=i(this).next();i("#so-mobilenav-mobile-"+n).next();i(document).on("click",'a.mobilenav-main-link[data-id="'+n+'"]',function(e){if(e.preventDefault(),null==a){a=i('

'+mobileNav.text.navigate+'

').appendTo("body"),a.find(".title").prepend(''+mobileNav.mobileMenuClose+""),mobileNav.search&&i("").insertAfter(a.find(".title")),a.find(".close").click(function(i){i.preventDefault(),a.mnHideFrame()}),i(window).resize(function(){a.is(":visible")&&(a.hide(),a.width(i(window).width()),a.show())}),i("body").bind("orientationchange",function(){i(window).resize()}),activeSlide=null,showSlide=function(i){a.find(".slides-container .slide").hide(),activeSlide=a.find(".slides-container .slide").eq(i).show(),0==i?a.find("a.back").hide():a.find("a.back").show(),0!=i?a.find(".title h3").html(activeSlide.data("title")):a.find(".title h3").html(mobileNav.text.navigate)},a.find("a.back").click(function(){var i=activeSlide.data("parent-slide");return void 0!=i&&showSlide(i),!1});var n=function(e){var t=i('
').appendTo(a.find(".slides-container"));return e.find("> li").each(function(){var e=i(this),d=i("").html(e.find("> a").html()).attr("href",e.find("> a").attr("href")).addClass("link"),l=i("
  • ").append(d);if(l.find('a[href!="#"]').click(function(i){a.mnHideFrame()}),t.find("ul").append(l),e.find("> ul").length>0){var s=i('');l.prepend(s);var r=e.find("> ul").eq(0),o=n(r);o.data("parent-slide",t.index()),o.data("title",d.html()),l.find("a.next").click(function(){return showSlide(o.index()),!1}),l.find('a[href="#"]').not(".next").click(function(){return s.click(),!1})}}),t};n(t.find("ul").eq(0)),showSlide(0)}return i(window).resize(),a.mnShowFrame(),showSlide(0),!1})})}); // 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('