!function(e){"use strict";function t(){e(".ct-googleMap").length>0&&"object"==typeof google&&"object"==typeof google.maps&&e(".ct-googleMap").each(function(){var t="",a=e(this),o=a.data("location"),i=a.data("zoom"),l=!0,s=a.data("marker"),p=a.attr("data-mapImage");l=device.mobile()||device.tablet()||device_height<768?!1:!0;var r=-30;validatedata(a.data("offset"))&&(r=a.data("offset")),validatedata(o)&&(a.gmap3({marker:{address:o,options:{visible:s},callback:function(e){t=e.getPosition()}},map:{options:{zoom:i,styles:[{featureType:"water",elementType:"geometry",stylers:[{color:"#193341"}]},{featureType:"landscape",elementType:"geometry",stylers:[{color:"#2c5a71"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#29768a"},{lightness:-37}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#406d80"}]},{featureType:"transit",elementType:"geometry",stylers:[{color:"#406d80"}]},{elementType:"labels.text.stroke",stylers:[{visibility:"on"},{color:"#3e606f"},{weight:2},{gamma:.84}]},{elementType:"labels.text.fill",stylers:[{color:"#ffffff"}]},{featureType:"administrative",elementType:"geometry",stylers:[{weight:.6},{color:"#1a3541"}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#2c5a71"}]}],mapTypeId:google.maps.MapTypeId.ROADMAP,scrollwheel:!1,disableDoubleClickZoom:!1,draggable:l,mapTypeControlOptions:{mapTypeIds:[]}},events:{idle:function(){a.data("idle")||(a.gmap3("get").panBy(0,r),a.data("idle",!0))}}},overlay:{address:o,options:{content:"<div class='ct-mapBox' style='z-index: 999;'><span class='ct-mapBox-image'><img src='"+p+"'></span></div>",offset:{y:-50,x:0}}}}),google.maps.event.addDomListener(window,"resize",function(){setTimeout(function(){a.gmap3("get").setCenter(t),a.gmap3("get").panBy(0,r)},400)}),a.css("min-height",a.data("height")+"px")),a.parent().parent().hasClass("hidemap")&&a.parent().animate({height:"0px"},500)})}var a=e(".ct-googleMap--accordion .ct-googleMap");e(".ct-googleMap--accordion .ct-js-mapToogle").on("click",function(){var t=e(this),o=t.parent().find(".ct-googleMap-container");t.html('<i class="fa fa-map-marker"></i> Hide map'==t.html()?'<i class="fa fa-map-marker"></i> Show map':'<i class="fa fa-map-marker"></i> Hide map'),"0"!=o.height()?o.animate({height:"0px"},500):(o.animate({height:a.data("height")+"px"},500),setTimeout(function(){e("html, body").animate({scrollTop:o.offset().top-180},2e3)},500))}),t()}(jQuery);