Object.prototype.hasOwnProperty.call(window,"tribe_ev")&&(tribe_ev.geoloc={map:[],geocoder:[],geocodes:[],bounds:[],markers:[],refine:!1}),function(a,b,c,d,e,f,g,h){c.extend(tribe_ev.fn,{has_address:function(a,b){for(var c=0;c1&&!e.has_address(b,f.geocodes))e.print_geo_options();else{var g=d[0].geometry.location.lat(),h=d[0].geometry.location.lng();g&&c("#tribe-bar-geoloc-lat").val(g),h&&c("#tribe-bar-geoloc-lng").val(h),a&&"function"==typeof a&&(c("#tribe_events_filter_item_geofence").length&&c("#tribe_events_filter_item_geofence").show(),a())}}):(c("#tribe-bar-geoloc-lat, #tribe-bar-geoloc-lng").val(""),a&&"function"==typeof a&&(c("#tribe_events_filter_item_geofence").length&&(c("#tribe_events_filter_item_geofence input").prop("checked",!1),c("#tribe_events_filter_item_geofence").hide().find("select").prop("selectedIndex",0)),a()))}else a&&"function"==typeof a&&a()},print_geo_options:function(){c("#tribe-geo-links").empty(),c("#tribe-geo-options").show();var a=[];f.refine=!0;for(var b=0;b").text(d).attr("href","#").addClass("tribe-geo-option-link").data("index",b).appendTo("#tribe-geo-links"),h.map_view()&&e.map_add_marker(f.geocodes[b].geometry.location.lat(),f.geocodes[b].geometry.location.lng(),d))}f.refine=!1},pro_tooltips:function(){c("#tribe-events").on("mouseenter",'div[id*="tribe-events-event-"], div[id*="tribe-events-daynum-"]:has(a), div.event-is-recurring',function(){var a=0,b=c(this);if(c("body").hasClass("tribe-events-week")&&b.tribe_has_attr("data-tribejson"))if(b.parents(".tribe-grid-allday").length){var d=b.find(".tribe-events-tooltip");if(!d.length){var e=b.data("tribejson");b.find("div").append(tribe_tmpl("tribe_tmpl_tooltip",e)),d=b.find(".tribe-events-tooltip")}a=b.outerHeight()+6,d.css("bottom",a).show()}else{var d=b.find(".tribe-events-tooltip");if(!d.length){var e=b.data("tribejson");b.append(tribe_tmpl("tribe_tmpl_tooltip",e)),d=b.find(".tribe-events-tooltip")}var f,g,h,i=c(".tribe-week-grid-wrapper"),j=b.parent(),k=j.parent(),l=Math.ceil(k.width()),m=Math.ceil(b.width()),n=Math.ceil(d.outerWidth()),o=i.height(),p=i.scrollTop(),q=j.position(),r=b.position(),s=Math.ceil(r.top),t=p-s,u=j.hasClass("tribe-events-right"),v={};d.hasClass("hovered")||d.data("ow",n).addClass("hovered"),f=u?Math.ceil(q.left)-20:l-m-Math.ceil(q.left),n=n>=f?f:d.data("ow")>f?f:d.data("ow"),v=u?{right:m+20,bottom:"auto",width:n+"px"}:{left:m+20,bottom:"auto",width:n+"px"},d.css(v),g=d.height(),t>=0?t+=5:(h=t+o,t=g>h?h-g-8:5),d.css("top",t).show()}})},process_geocoding:function(a,b){var c={address:a,bounds:new google.maps.LatLngBounds(new google.maps.LatLng(TribeEventsPro.geocenter.min_lat,TribeEventsPro.geocenter.min_lng),new google.maps.LatLng(TribeEventsPro.geocenter.max_lat,TribeEventsPro.geocenter.max_lng))};f.geocoder.geocode(c,function(a,c){return c==google.maps.GeocoderStatus.OK?(b(a),a):c==google.maps.GeocoderStatus.ZERO_RESULTS?(GeoLoc.map_view&&spin_end(),c):c})},set_recurrence:function(a){a?(g.recurrence=!0,tribe_storage&&tribe_storage.setItem("tribeHideRecurrence","1")):(g.recurrence=!1,tribe_storage&&tribe_storage.setItem("tribeHideRecurrence","0"))}}),c.extend(tribe_ev.tests,{hide_recurrence:function(){return c("#tribeHideRecurrence:checked").length?!0:!1}}),c(b).ready(function(){c(".tribe-bar-geoloc-filter").length&&c(".tribe-bar-geoloc-filter").append('
');var i=c("#tribe-events"),j=c("#tribe-bar-geoloc"),k=c("#tribe-geo-options"),l=!1;e.pro_tooltips(),h.hide_recurrence()&&e.set_recurrence(!0),g.recurrence=h.hide_recurrence(),i.on("click","#tribeHideRecurrence",function(){g.popping=!1,g.do_string=!0,g.paged=1,l=c(this).is(":checked")?!0:!1,e.set_recurrence(l),c(d).trigger("tribe_ev_updatingRecurrence").trigger("tribe_ev_runAjax")}),c(d).on("tribe_ev_preCollectBarParams",function(){if(j.length){var a=j.val();a.length?"map"===g.view_target&&(g.url_params.action="tribe_geosearch"):c("#tribe-bar-geoloc-lat, #tribe-bar-geoloc-lng").val("")}tribe_storage&&"1"===tribe_storage.getItem("tribeHideRecurrence")&&"month"!==g.view_target&&"week"!==g.view_target&&(g.url_params.tribeHideRecurrence="1")}),h.map_view()||(k.length&&(i.on("click",".tribe-geo-option-link",function(a){a.preventDefault(),a.stopPropagation();var b=c(this);c(".tribe-geo-option-link").removeClass("tribe-option-loaded"),b.addClass("tribe-option-loaded"),j.val(b.text()),c("#tribe-bar-geoloc-lat").val(f.geocodes[b.data("index")].geometry.location.lat()),c("#tribe-bar-geoloc-lng").val(f.geocodes[b.data("index")].geometry.location.lng()),e.pre_ajax(function(){c(d).trigger("tribe_ev_runAjax"),k.hide()})}),c(b).on("click",function(){k.hide()})),e.snap("#tribe-geo-wrapper","#tribe-geo-wrapper","#tribe-events-footer .tribe-events-nav-previous a, #tribe-events-footer .tribe-events-nav-next a")),c("#wp-toolbar").on("click",".tribe-split-single a, .tribe-split-all a",function(){var b="";return b=c(this).parent().hasClass("tribe-split-all")?TribeEventsPro.recurrence.splitAllMessage:TribeEventsPro.recurrence.splitSingleMessage,a.confirm(b)?void 0:!1})})}(window,document,jQuery,tribe_ev.events,tribe_ev.fn,tribe_ev.geoloc,tribe_ev.state,tribe_ev.tests,tribe_debug);