// source --> https://plexi-studio.com/wp-content/plugins/wp-google-map-gold/assets/js/maps.js?ver=4.9.3 (function($,window,document,undefined){function Map_Control(options){this.options=options;}Map_Control.prototype.create_element=function(controlDiv,map,html_element){var controlUI=document.createElement('div');controlUI.style.backgroundColor='#fff';controlUI.style.border='2px solid #fff';controlUI.style.borderRadius='3px';controlUI.style.boxShadow='0 2px 6px rgba(0,0,0,.3)';controlUI.style.cursor='pointer';controlUI.style.marginBottom='22px';controlUI.style.textAlign='center';controlUI.title='Click to recenter the map';controlDiv.appendChild(controlUI);var controlText=document.createElement('div');controlText.style.color='rgb(25,25,25)';controlText.style.fontFamily='Roboto,Arial,sans-serif';controlText.style.fontSize='16px';controlText.style.lineHeight='38px';controlText.style.paddingLeft='5px';controlText.style.paddingRight='5px';controlText.innerHTML=html_element;controlUI.appendChild(controlText);google.maps.event.addDomListener(controlUI,'click',function(){map.setCenter(new google.maps.LatLng(41.85,-87.65));});};function overlay_generator(tileSize,options){this.tileSize=tileSize;this.overlay_options=options;}overlay_generator.prototype.getTile=function(coord,zoom,ownerDocument){var div=ownerDocument.createElement("div");div.innerHTML=coord;div.style.width="200px";div.style.height="300px";div.style.fontSize=this.overlay_options.font_size+"px";div.style.borderStyle=this.overlay_options.border_style;div.style.borderWidth=this.overlay_options.border_width+"px";div.style.borderColor=this.overlay_options.border_color;return div;};function GoogleMaps(element,map_data){var options;this.element=element;this.map_data=$.extend({},{},map_data);options=this.map_data.map_options;this.settings=$.extend({"zoom":"5","map_type_id":"ROADMAP","scroll_wheel":true,"map_visual_refresh":false,"pan_control":true,"pan_control_position":"TOP_LEFT","zoom_control":true,"zoom_control_style":"SMALL","zoom_control_position":"TOP_LEFT","map_type_control":true,"map_type_control_style":"HORIZONTAL_BAR","map_type_control_position":"RIGHT_TOP","scale_control":true,"street_view_control":true,"street_view_control_position":"TOP_LEFT","overview_map_control":true,"center_lat":"40.6153983","center_lng":"-74.2535216","draggable":true},{},options);this.container=$("div[rel='"+$(this.element).attr("id")+"']");var suppress_markers=false;if(typeof this.map_data.map_tabs!='undefined'&&typeof this.map_data.map_tabs.direction_tab!='undefined'){suppress_markers=this.map_data.map_tabs.direction_tab.suppress_markers;}this.directionsService=new google.maps.DirectionsService();this.directionsDisplay=new google.maps.DirectionsRenderer({suppressMarkers:suppress_markers,});this.drawingmanager={};this.geocoder=new google.maps.Geocoder();this.places=[];this.show_places=[];this.categories={};this.tabs=[];this.all_shapes=[];this.wpgmp_polylines=[];this.wpgmp_polygons=[];this.wpgmp_circles=[];this.wpgmp_shape_events=[];this.wpgmp_rectangles=[];this.per_page_value=0;this.current_amenities=[];this.route_directions=[];this.search_area='';this.markerClusterer=null;this.init();}GoogleMaps.prototype={init:function(){var map_obj=this;var center=new google.maps.LatLng(map_obj.settings.center_lat,map_obj.settings.center_lng);map_obj.map=new google.maps.Map(map_obj.element,{zoom:parseInt(map_obj.settings.zoom),center:center,disableDoubleClickZoom:(map_obj.settings.scroll_wheel!='false'),scrollwheel:(map_obj.settings.scroll_wheel!='false'),panControl:(map_obj.settings.pan_control===true),panControlOptions:{position:eval("google.maps.ControlPosition."+map_obj.settings.pan_control_position)},zoomControl:(map_obj.settings.zoom_control===true),zoomControlOptions:{style:eval("google.maps.ZoomControlStyle."+map_obj.settings.zoom_control_style),position:eval("google.maps.ControlPosition."+map_obj.settings.zoom_control_position)},mapTypeControl:(map_obj.settings.map_type_control==true),mapTypeControlOptions:{style:eval("google.maps.MapTypeControlStyle."+map_obj.settings.map_type_control_style),position:eval("google.maps.ControlPosition."+map_obj.settings.map_type_control_position)},scaleControl:(map_obj.settings.scale_control==true),streetViewControl:(map_obj.settings.street_view_control==true),streetViewControlOptions:{position:eval("google.maps.ControlPosition."+map_obj.settings.street_view_control_position)},overviewMapControl:(map_obj.settings.overview_map_control==true),overviewMapControlOptions:{opened:map_obj.settings.overview_map_control},draggable:map_obj.settings.draggable,mapTypeId:eval("google.maps.MapTypeId."+map_obj.settings.map_type_id),styles:eval(map_obj.map_data.styles)});map_obj.map_loaded();map_obj.responsive_map();map_obj.create_markers();map_obj.display_markers();if(typeof map_obj.map_data.street_view!='undefined'){map_obj.set_streetview(center);}if(typeof map_obj.map_data.weather_layer!='undefined'){map_obj.set_weather_layer();}if(typeof map_obj.map_data.bicyle_layer!='undefined'){map_obj.set_bicyle_layer();}if(typeof map_obj.map_data.traffic_layer!='undefined'){map_obj.set_traffic_layer();}if(typeof map_obj.map_data.transit_layer!='undefined'){map_obj.set_transit_layer();}if(typeof map_obj.map_data.panoramio_layer!='undefined'){map_obj.set_panoramic_layer();}if(typeof map_obj.map_data.overlay_setting!='undefined'){map_obj.set_overlay();}if(map_obj.settings.display_45_imagery=='45'){map_obj.set_45_imagery();}if(typeof map_obj.map_data.map_visual_refresh===true){map_obj.set_visual_refresh();}if(typeof map_obj.map_data.marker_cluster!='undefined'){map_obj.set_marker_cluster();}if(typeof map_obj.map_data.panning_control!='undefined'){map_obj.set_panning_control();}if(typeof map_obj.map_data.kml_layer!='undefined'){map_obj.set_kml_layer();}if(typeof map_obj.map_data.fusion_layer!='undefined'){map_obj.set_fusion_layer();}if(typeof map_obj.map_data.shapes!='undefined'){if(typeof map_obj.map_data.shapes.shape!='undefined'){map_obj.opened_info=new google.maps.InfoWindow();if(typeof map_obj.map_data.shapes.shape.polygons!='undefined')map_obj.create_polygon();if(typeof map_obj.map_data.shapes.shape.polylines!='undefined')map_obj.create_polyline();if(typeof map_obj.map_data.shapes.shape.circles!='undefined')map_obj.create_circle();if(typeof map_obj.map_data.shapes.shape.rectangles!='undefined')map_obj.create_rectangle();}}if(typeof map_obj.map_data.routes!='undefined'){map_obj.create_routes();}if(typeof map_obj.map_data.listing!='undefined'){if(typeof map_obj.map_data.listing.default_sorting!='undefined'){map_obj.sorting(map_obj.map_data.listing.default_sorting.orderby,map_obj.map_data.listing.default_sorting.inorder);}}if(typeof map_obj.map_data.listing!='undefined'){map_obj.display_filters_listing();$.each(map_obj.map_data.listing.filters,function(key,filter){$(map_obj.container).find('select[name="'+filter+'"]').on('change',function(){map_obj.update_filters();});});$(map_obj.container).find('select[name="map_sorting"]').on('change',function(){var order_data=$(this).val().split("_");if(order_data[0]!==''&&order_data[1]!==''){map_obj.sorting(order_data[0],order_data[1]);map_obj.update_places_listing();}});$(map_obj.container).find('select[name="map_radius"]').on('change',function(){var search_data=$(map_obj.container).find('input[name="wpgmp_search_input"]').val();if(search_data.length>=2&&$(this).val()!=''){map_obj.geocoder.geocode({"address":search_data},function(results,status){if(status==google.maps.GeocoderStatus.OK){map_obj.search_area=results[0].geometry.location;map_obj.update_filters();}});}else{map_obj.search_area='';map_obj.update_filters();}});$(map_obj.container).find('select[name="map_perpage_location_sorting"]').on('change',function(){map_obj.per_page_value=$(this).val();map_obj.update_filters();});$(map_obj.container).find('input[name="wpgmp_search_input"]').on('keyup',function(){$(map_obj.container).find('select[name="map_radius"]').val('');map_obj.search_area='';map_obj.update_filters();});$(map_obj.container).find(".location_pagination"+map_obj.map_data.map_property.map_id).pagination(map_obj.show_places.length,{callback:map_obj.display_places_listing,map_data:map_obj,items_per_page:map_obj.map_data.listing.pagination.listing_per_page,prev_text:wpgmp_local.prev,next_text:wpgmp_local.next});$(map_obj.container).find('.wpgmp_locations').responsiveEqualHeightGrid();}$('.wpgmp-shape-delete').click(function(){map_obj.deleteSelectedShape();$('.hiderow').hide();});$('select[name="shape_stroke_opacity"]').change(function(){map_obj.set_shapes_options(map_obj.selectedShape);});$('select[name="shape_stroke_weight"]').change(function(){map_obj.set_shapes_options(map_obj.selectedShape);});$('select[name="shape_stroke_color"]').change(function(){map_obj.set_shapes_options(map_obj.selectedShape);});$('select[name="shape_fill_opacity"]').change(function(){map_obj.set_shapes_options(map_obj.selectedShape);});$('select[name="shape_fill_color"]').change(function(){map_obj.set_shapes_options(map_obj.selectedShape);});$('input[name="shape_click_url"]').change(function(){map_obj.set_shapes_options(map_obj.selectedShape);});$('textarea[name="shape_click_message"]').blur(function(){map_obj.set_shapes_options(map_obj.selectedShape);});$("textarea[name='shape_path']").blur(function(){var cordinates=$(this).val().split(' ');if(cordinates.length==1){cordinates=$(this).val().split("\n");}var path=[];$.each(cordinates,function(ind,cordinate){var latlng=cordinate.split(',');path.push(new google.maps.LatLng(latlng[0],latlng[1]));});map_obj.selectedShape.setPath(path);});$("input[name='shape_radius']").blur(function(){var radius=parseFloat($(this).val());map_obj.selectedShape.setRadius(radius);});$("input[name='shape_center']").blur(function(){var latlng=$(this).val().split(',');map_obj.selectedShape.setCenter(new google.maps.LatLng(parseFloat(latlng[0]),parseFloat(latlng[1])));});$("input[name='shape_northeast']").blur(function(){var ea=$(this).val().split(',');var sw=$("input[name='shape_southwest']").val().split(',');map_obj.selectedShape.setBounds(new google.maps.LatLngBounds(new google.maps.LatLng(parseFloat(sw[0]),parseFloat(sw[1])),new google.maps.LatLng(parseFloat(ea[0]),parseFloat(ea[1]))));});$("input[name='shape_southwest']").blur(function(){var sw=$(this).val().split(',');var ea=$("input[name='shape_northeast']").val().split(',');map_obj.selectedShape.setBounds(new google.maps.LatLngBounds(new google.maps.LatLng(parseFloat(sw[0]),parseFloat(sw[1])),new google.maps.LatLng(parseFloat(ea[0]),parseFloat(ea[1]))));});$("input[name='shape_center']").blur(function(){var latlng=$(this).val().split(',');map_obj.selectedShape.setCenter(new google.maps.LatLng(parseFloat(latlng[0]),parseFloat(latlng[1])));});$('input[name="wpgmp_save_drawing"]').click(function(){var all_shapes_cordinate=[];all_shapes_cordinate.push('polylines='+map_obj.wpgmp_save_polylines().join('::'));all_shapes_cordinate.push('polygons='+map_obj.wpgmp_save_polygons().join('::'));all_shapes_cordinate.push('circles='+map_obj.wpgmp_save_circles().join('::'));all_shapes_cordinate.push('rectangles='+map_obj.wpgmp_save_rectangles().join('::'));map_obj.wpgmp_save_shapes(all_shapes_cordinate);});if(typeof map_obj.map_data.shapes!='undefined'){if(map_obj.map_data.shapes.drawing_editable===true){$('.wpgmp-overview .color').wpColorPicker({change:function(event,ui){map_obj.set_shapes_options(map_obj.selectedShape);}});}}if(typeof map_obj.map_data.map_tabs!='undefined'){this.map_widgets();$(map_obj.element).find(".wpgmp_toggle_main_container").find("div[id^='wpgmp_tab_']").css("display","none");if(map_obj.settings.infowindow_filter_only===false){$(map_obj.element).find(".wpgmp_specific_category_item").attr("checked",true);$(map_obj.element).find(".wpgmp_specific_location_item").attr("checked",true);}if(this.map_data.map_tabs.category_tab.select_all===true){$(map_obj.element).find('input[name="wpgmp_select_all"]').click(function(){if($(this).is(":checked")){$(map_obj.element).find(".wpgmp_specific_category_item").attr("checked",true);}else{$(map_obj.element).find(".wpgmp_specific_category_item").attr("checked",false);}map_obj.update_filters();});}$(map_obj.element).find(".wpgmp_toggle_container").click(function(){$(map_obj.element).find(".wpgmp_toggle_main_container").slideToggle("slow");if($(this).text()==wpgmp_local.hide){$(this).text(wpgmp_local.show);}else{$(this).text(wpgmp_local.hide);}});if(map_obj.map_data.map_tabs.hide_tabs_default===true){$(map_obj.element).find(".wpgmp_toggle_container").trigger('click');}$(map_obj.element).find(".wpgmp_specific_route_item").attr("checked",true);$(map_obj.element).find(".wpgmp_toggle_main_container").find("div[id^='wpgmp_tab_']").first().css("display","block");$(map_obj.element).on('click',"li[class^='wpgmp-tab-'] a",function(){$(map_obj.element).find("li[class^='wpgmp-tab-'] a").removeClass('active');$(this).addClass('active');$(map_obj.element).find(".wpgmp_toggle_main_container").find("div[id^='wpgmp_tab_']").css("display","none");$(map_obj.element).find(".wpgmp_toggle_main_container").find("#wpgmp_tab_"+$(this).parent().attr('rel')).css("display","block");});$(map_obj.element).find(".wpgmp_toggle_main_container").on('change',".wpgmp_specific_category_item",function(){if($(this).is(":checked")===false)$(this).parent().find('.wpgmp_specific_location_item').attr('checked',false);else $(this).parent().find('.wpgmp_specific_location_item').attr('checked',true);map_obj.update_filters();});$(map_obj.element).find(".wpgmp_toggle_main_container").on('change',".wpgmp_specific_route_item",function(){var selected_route=map_obj.route_directions[$(this).val()];if($(this).is(":checked")===false){selected_route.setMap(null);}else{selected_route.setMap(map_obj.map);}});$(map_obj.element).find(".wpgmp_toggle_main_container").on('change',".wpgmp_specific_location_item",function(){map_obj.update_filters();});if(this.map_data.map_tabs.direction_tab.dir_tab===true){$(this.element).find(".wpgmp_find_direction").click(function(){var start=$(map_obj.element).find('.start_point');var end=$(map_obj.element).find('.end_point');var travel_mode=$(map_obj.element).find('select[name="travel_mode"]').val();var travel_unit=$(map_obj.element).find('select[name="travel_unit"]').val();var direction_panel=$(map_obj.element).find('.directions-panel');var current_address='';if($(start).val()===""){$(start).focus();return false;}if($(end).val()===""){$(end).focus();return false;}var options={"start":start.val(),"end":end.val(),"mode":travel_mode,"unit":travel_unit,"direction_panel":direction_panel[0],"map":map_obj.map};console.log(options);map_obj.find_direction(options);});}$(this.element).find(".wpgmp_find_nearby_button").click(function(){var target=$(this).parent().parent();var lat=$(target).find(".wpgmp_auto_suggest").data('latitude');var lon=$(target).find(".wpgmp_auto_suggest").data('longitude');var radius=$(map_obj.element).find("input[name='wpgmp_radius']").val();var dim=$(map_obj.element).find("select[name='wpgmp_route_dimension']").val();var amenities=$(map_obj.element).find('input[name^="wpgmp_place_types"]:checked');var divide_by=1.60934;var service;if(dim=='miles'){divide_by=1.60934;}else{divide_by=1;}var circle_radius_meters=parseInt(radius)*divide_by*1000;if(amenities.length>0){if(map_obj.current_amenities.length>0){$.each(map_obj.current_amenities,function(am,amenity){amenity.marker.setMap(null);});}map_obj.amenity_infowindow=new google.maps.InfoWindow();var place_types=[];$.each(amenities,function(index,amenity){place_types.push($(amenity).val());});var request={location:new google.maps.LatLng(lat,lon),radius:circle_radius_meters,types:place_types};service=new google.maps.places.PlacesService(map_obj.map);service.nearbySearch(request,function(results,status){if(status==google.maps.places.PlacesServiceStatus.OK){for(var i=0;i'+tab.title+'';else content+='
  • '+tab.title+'
  • ';});content+='';content+='
    ';$.each(this.tabs,function(index,tab){content+='
    ';content+=tab.content;content+='
    ';});content+='
    '+wpgmp_local.hide+'
    ';return content;},map_widgets:function(){var content='';if(this.map_data.map_tabs.category_tab.cat_tab===true)this.widget_category();if(this.map_data.map_tabs.direction_tab.dir_tab===true)this.widget_directions();if(this.map_data.map_tabs.nearby_tab.near_tab===true)this.widget_nearby();if(this.map_data.map_tabs.route_tab.display_route_tab===true)this.widget_route_tab();if(typeof this.map_data.map_tabs.extension_tabs!='undefined'){this.widget_extensions_tab();}content+=this.show_tabs();$(this.element).append(content);},widget_extensions_tab:function(){var map_obj=this;var new_tabs=map_obj.map_data.map_tabs.extension_tabs;if(typeof new_tabs!='undefined'&&new_tabs.length>0){$.each(new_tabs,function(index,tab){map_obj.add_tab(tab.title,tab.content);});}},widget_route_tab:function(){var route_data=this.map_data.map_tabs.route_tab.route_tab_data;var content='';if(this.map_data.map_tabs.route_tab.display_route_tab_data===true){content+='
    ';if(route_data){$.each(route_data,function(index,route){content+='
    ';content+='';var box='';content+=''+route.route_title+box+'';content+='
    ';content+='
    ';});}content+='
    ';}this.add_tab(this.map_data.map_tabs.route_tab.route_tab_title,content);},widget_nearby:function(){var content='
    ';content+='

     

    ';content+='

      

    ';if(typeof this.map_data.map_tabs.nearby_tab.nearby_amenities!='undefined'){var all_amenities=this.map_data.map_tabs.nearby_tab.nearby_amenities;if(all_amenities){content+='
    '+wpgmp_local.show_amenities+'';$.each(all_amenities,function(index,amenity){content+=" "+amenity;});}}content+='
    ';content+='

    ';this.add_tab(this.map_data.map_tabs.nearby_tab.nearby_tab_title,content);},widget_directions:function(){var content='';content='
    ';if(this.map_data.map_tabs.route_start_location=="textbox"){content+='

     

    ';}else if(this.map_data.map_tabs.route_start_location=="selectbox"){content+='

    ';}if(this.map_data.map_tabs.route_end_location=="textbox"){content+='

    ';}else if(this.map_data.map_tabs.route_end_location=="selectbox"){content+='

    ';}content+='

    ';content+='

    ';this.add_tab(this.map_data.map_tabs.direction_tab.direction_tab_title,content);},widget_category:function(){var map_obj=this;if(map_obj.map_data.map_tabs.category_tab.select_all===true){var content='  '+wpgmp_local.select_all+'
    ';}else{var content='';}var categories_tab_data={};if(typeof map_obj.map_data.places!='undefined'){$.each(map_obj.map_data.places,function(index,place){if(typeof place.categories!='undefined'){$.each(place.categories,function(index,categories){if(typeof categories.type!="undefined"&&categories.type=='category'&&categories.name){if(typeof categories_tab_data[categories.id]=="undefined"){categories_tab_data[categories.id]={};categories_tab_data[categories.id]['data']=[];}categories_tab_data[categories.id]['cat_id']=categories.id;categories_tab_data[categories.id]['cat_title']=categories.name;categories_tab_data[categories.id]['cat_marker_icon']=categories.icon;var redirect_permalink="";if(place.location.redirect_permalink)redirect_permalink=place.location.redirect_permalink;var redirect_custom_link="";if(place.location.redirect_custom_link)redirect_custom_link=place.location.redirect_custom_link;categories_tab_data[categories.id]['data'].push({"cat_location_id":place.id,"cat_location_title":place.title,"cat_location_address":place.address,"cat_location_zoom":place.location.zoom,"onclick_action":place.location.onclick_action,"redirect_permalink":redirect_permalink,"redirect_custom_link":redirect_custom_link,});}});}});}var category_orders=[];if(typeof categories_tab_data!='undefined'){$.each(categories_tab_data,function(index,categories){if(map_obj.map_data.map_tabs.category_tab.cat_order_by=='count'){category_orders.push(categories.data.length);}else{category_orders.push(categories.cat_title);}});}category_orders.sort();var ordered_categories=[];$.each(category_orders,function(index,cat_title){$.each(categories_tab_data,function(index,categories){var compare_with;if(map_obj.map_data.map_tabs.category_tab.cat_order_by=='count'){compare_with=categories.data.length;}else{compare_with=categories.cat_title;}if(cat_title==compare_with){ordered_categories.push(categories);}});});if(typeof ordered_categories!='undefined'){$.each(ordered_categories,function(index,categories){var category_image='';if(typeof categories.cat_marker_icon!='undefined'){category_image='';}content+='
    ';content+='';if(map_obj.map_data.map_tabs.category_tab.show_count===true){location_count=" ("+categories.data.length+")";}else{location_count="";}content+=''+categories.cat_title+location_count+category_image+'';if(map_obj.map_data.map_tabs.category_tab.hide_location!==true){content+='
    ';content+='';content+='
    ';}content+='
    ';});}map_obj.add_tab(map_obj.map_data.map_tabs.category_tab.cat_tab_title,content);},sorting:function(order_by,in_order){switch(order_by){case'category':this.places.sort(this.sortByCategory);this.show_places.sort(this.sortByCategory);if(in_order=='desc'){this.places.reverse();this.show_places.reverse();}break;case'title':this.map_data.places.sort(this.sortByTitle);this.show_places.sort(this.sortByTitle);if(in_order=='desc'){this.places.reverse();this.show_places.reverse();}break;case'address':this.map_data.places.sort(this.sortByAddress);this.show_places.sort(this.sortByAddress);if(in_order=='desc'){this.places.reverse();this.show_places.reverse();}break;}},sortByCategory:function(a,b){if(b.categories[0]&&a.categories[0]){if(a.categories[0].name&&b.categories[0].name){var a_val=a.categories[0].name.toLowerCase();var b_val=b.categories[0].name.toLowerCase();return((a_valb_val)?1:0));}}},sortByTitle:function(a,b){var a_val=a.title.toLowerCase();var b_val=b.title.toLowerCase();return((a_valb_val)?1:0));},sortByAddress:function(a,b){var a_val=a.address.toLowerCase();var b_val=b.address.toLowerCase();return((a_valb_val)?1:0));},update_filters:function(){var filters;if(typeof this.map_data.listing!='undefined'){filters=$.map(this.map_data.listing.filters,function(filter,i){var val=$('select[name="'+filter+'"]');return{name:val.attr('name'),val:val.val()};});}this.apply_filters(filters);},apply_filters:function(filters){var map_obj=this;var showAll=true;var show=true;map_obj.show_places=[];if(typeof map_obj.map_data.places!='undefined'){$.each(map_obj.map_data.places,function(place_key,place){show=true;enable_search_term=false;if(typeof map_obj.map_data.listing!='undefined'){if(map_obj.map_data.listing.display_search_form===true){search_term=$(map_obj.map_data.listing.listing_container+' input[name="wpgmp_search_input"]').val();search_term=search_term.toLowerCase();if(search_term.length>0){enable_search_term=true;}}}if(typeof filters!='undefined'){$.each(filters,function(filter_key,filter){var in_category=false;if(filter.val){if(typeof place.categories!='undefined'){$.each(place.categories,function(cat_index,category){if(category.id==filter.val)in_category=true;});}if(in_category===false)show=false;}else{filter.val="";}if(enable_search_term===true&&show===true){in_category=false;if(typeof place.categories!='undefined'){$.each(place.categories,function(cat_index,category){if(category.name&&category.name.indexOf(search_term)>=0)in_category=true;});}if(place.title.toLowerCase().indexOf(search_term)>=0){show=true;}else if(place.content.toLowerCase().indexOf(search_term)>=0){show=true;}else if(place.location.lat.toLowerCase().indexOf(search_term)>=0){show=true;}else if(place.location.lng.toLowerCase().indexOf(search_term)>=0){show=true;}else if(place.address&&place.address.toLowerCase().indexOf(search_term)>=0){show=true;}else if(place.location.state&&place.location.state.toLowerCase().indexOf(search_term)>=0){show=true;}else if(place.location.country&&place.location.country.toLowerCase().indexOf(search_term)>=0){show=true;}else if(place.location.postal_code&&place.location.postal_code.toLowerCase().indexOf(search_term)>=0){show=true;}else if(place.location.city&&place.location.city.toLowerCase().indexOf(search_term)>=0){show=true;}else if(typeof map_obj.search_area!='undefined'&&map_obj.search_area!=''&&map_obj.wpgmp_within_radius(place,map_obj.search_area)===true){show=true;}else{show=false;}}});}if(typeof map_obj.map_data.map_tabs!='undefined'){if(map_obj.map_data.map_tabs.category_tab.cat_tab===true&&show!=false){var all_selected_category=$('.wpgmp_specific_category_item:checked');var in_checked_category=false;if(all_selected_category.length===0){if(typeof place.categories!='undefined'){$.each(place.categories,function(cat_index,category){if(category.id==='')in_checked_category=true;});}}$.each(all_selected_category,function(index,selected_category){var all_not_selected_location=$(selected_category).parent().find('.wpgmp_specific_location_item:not(:checked)');if(typeof place.categories!='undefined'){$.each(place.categories,function(cat_index,category){if(category.id==='')in_checked_category=true;else if(category.id==$(selected_category).val()){in_checked_category=true;place.marker.setIcon(category.icon);}});}if(all_not_selected_location.length!==0){$.each(all_not_selected_location,function(index_loc,not_selected_location){if(place.id==$(not_selected_location).val()){in_checked_category=false;}});}});if(in_checked_category===false)show=false;else show=true;}}place.marker.visible=show;place.marker.setVisible(show);place.infowindow.close();place.marker.setAnimation(null);if(show===true)map_obj.show_places.push(place);});}if(typeof map_obj.map_data.listing!='undefined')map_obj.update_places_listing();if(typeof map_obj.map_data.marker_cluster!='undefined'){map_obj.set_marker_cluster();}},create_perpage_option:function(){var map_obj=this;var options='';var content='';content+='';return content;},create_sorting:function(){var options='';var content='';if(this.map_data.listing.display_sorting_filter===true){content+='';}return content;},create_radius:function(){var options='';var content='';if(this.map_data.listing.display_radius_filter===true){content+='';}return content;},create_filters:function(){var options='';var filters={};var places=this.map_data.places;var wpgmp_listing_filter=this.map_data.listing;var wpgmp_alltfilter=wpgmp_listing_filter.display_taxonomies_all_filter;$.each(places,function(index,place){if(typeof place.categories=='undefined'){place.categories={};}$.each(place.categories,function(cat_index,category){if(typeof filters[category.type]=='undefined'){filters[category.type]={};}if(category.name){filters[category.type][category.name]=category.id;}});});var content='';$.each(filters,function(index,options){if(wpgmp_listing_filter.display_category_filter===true&&index=="category"){content+='';}else if(wpgmp_listing_filter.display_taxonomies_filter===true){if(wpgmp_alltfilter===null)return false;if(wpgmp_alltfilter.indexOf(index)>-1){content+='';}}});return content;},update_places_listing:function(){var map_obj=this;if(map_obj.per_page_value>0)map_obj.per_page_value=map_obj.per_page_value;else map_obj.per_page_value=map_obj.map_data.listing.pagination.listing_per_page;$(map_obj.container).find(".location_pagination"+map_obj.map_data.map_property.map_id).pagination(map_obj.show_places.length,{callback:map_obj.display_places_listing,map_data:map_obj,items_per_page:map_obj.per_page_value,prev_text:wpgmp_local.prev,next_text:wpgmp_local.next});},display_filters_listing:function(){var wpgmpgl=this.map_data.listing.list_grid;var content='
    ';content+=this.display_filters();content+="
    ";content+="
    ";$(this.map_data.listing.listing_container).html(content);},display_filters:function(){var content='';content+='
    '+this.map_data.listing.listing_header+'
    ';if(this.map_data.listing.display_search_form===true){content+='
    ';}content+='
    '+this.create_filters()+this.create_sorting()+'';if(this.map_data.listing.display_location_per_page_filter===true){content+=' '+this.create_perpage_option()+' ';}content+=' '+this.create_radius()+' ';if(this.map_data.listing.display_print_option===true){content+=' '+wpgmp_local.img_print;}if(this.map_data.listing.display_grid_option===true){content+=' '+wpgmp_local.img_grid+wpgmp_local.img_list;}content+='
    ';return content;},find_direction:function(options){var map_obj=this;var request={origin:options.start,destination:options.end,optimizeWaypoints:true,travelMode:eval("google.maps.TravelMode."+options.mode),unitSystem:eval("google.maps.UnitSystem."+options.unit)};console.log(request);map_obj.directionsService=new google.maps.DirectionsService();map_obj.directionsService.route(request,function(response,status){if(status==google.maps.DirectionsStatus.OK){map_obj.directionsDisplay.setMap(map_obj.map);map_obj.directionsDisplay.setDirections(response);if(false==map_obj.map_data.map_tabs.direction_tab.suppress_markers){map_obj.directionsDisplay.setPanel(options.direction_panel);$(options.direction_panel).css('display','block');}}});},display_places_listing:function(page_index,jq){var content='';var map_obj=this;var items_per_page=10;if(map_obj.items_per_page)items_per_page=map_obj.items_per_page;else items_per_page=map_obj.map_data.map_data.listing.pagination.listing_per_page;var data_source=map_obj.map_data.show_places;var listing_container=map_obj.map_data.map_data.listing.listing_container;var listing_placeholder=map_obj.map_data.map_data.listing.listing_placeholder;var max_elem=Math.min((page_index+1)*items_per_page,data_source.length);var link='';if(max_elem>0){for(var i=page_index*items_per_page;i'+place.title+'';}else if(place.location.onclick_action=="post"){link=''+place.title+'';}else if(place.location.onclick_action=="custom_link"){link=''+place.title+'';}}var image=[];var category_name=[];var wpgmp_arr={};if(place.categories){for(c=0;c");}if(place.categories[c].type=='category'&&place.categories[c].name!=''){category_name.push(place.categories[c].name);}if(place.categories[c].type!='category'){if(typeof place.categories[c].name=="undefined")continue;if(place.categories[c].name)var sep=',';if(typeof wpgmp_arr[place.categories[c].type]=="undefined")wpgmp_arr[place.categories[c].type]='';wpgmp_arr[place.categories[c].type]+=place.categories[c].name+sep;}}}var replaceData={"{marker_id}":place.id,"{marker_title}":link,"{marker_address}":place.address,"{marker_latitude}":place.location.lat,"{marker_longitude}":place.location.lng,"{marker_city}":place.location.city,"{marker_state}":place.location.state,"{marker_country}":place.location.country,"{marker_postal_code}":place.location.postal_code,"{marker_zoom}":place.location.zoom,"{marker_icon}":image,"{marker_category}":category_name.join(","),"{marker_message}":place.content,"{wpgmp_listing_html}":place.listing_hook};if(typeof place.location.extension_fields!='undefined'){for(var extra in place.location.extension_fields){if(!place.location.extension_fields[extra]){replaceData['{'+extra+'}']='';}else{replaceData['{'+extra+'}']=place.location.extension_fields[extra];}}}if(typeof place.location.extra_fields!='undefined'){for(var extra in place.location.extra_fields){if(!place.location.extra_fields[extra]){replaceData['{'+extra+'}']='';}else{replaceData['{'+extra+'}']=place.location.extra_fields[extra];}}}if(wpgmp_arr){for(var n in wpgmp_arr){replaceData["{"+n+"}"]=wpgmp_remove_last_comma(wpgmp_arr[n]);}}function wpgmp_remove_last_comma(strng){var n=strng.lastIndexOf(",");var a=strng.substring(0,n) return a;}temp_listing_placeholder=temp_listing_placeholder.replace(/{[^{}]+}/g,function(match){if(match in replaceData){return(replaceData[match]);}else{return("");}});content+=temp_listing_placeholder;}}}else{content="
    "+wpgmp_local.wpgmp_location_no_results+"
    ";}content+='
    ';$(listing_container).find(".wpgmp_categories").html(content);$(listing_container).find('.wpgmp_locations').responsiveEqualHeightGrid();return false;},open_infowindow:function(current_place){var map_obj=this;$.each(this.map_data.places,function(key,place){if(parseInt(place.id)==parseInt(current_place)&&place.marker.visible===true){place.marker.setMap(map_obj.map);if(typeof map_obj.map_data.marker_cluster!='undefined'){map_obj.map.setZoom(parseInt(map_obj.map_data.marker_cluster.marker_zoom_level));}place.infowindow.open(map_obj.map,place.marker);if(typeof map_obj.settings.infowindow_click_change_center!='undefined'&&map_obj.settings.infowindow_click_change_center==true){map_obj.map.setCenter(place.marker.getPosition());}if(typeof map_obj.settings.infowindow_click_change_zoom!='undefined'&&map_obj.settings.infowindow_click_change_zoom>0){map_obj.map.setZoom(map_obj.settings.infowindow_click_change_zoom);}var bounce_on_event=map_obj.settings.infowindow_bounce_animation;if(bounce_on_event=='click'){map_obj.toggle_bounce(place.marker);}}else{place.infowindow.close();place.marker.setAnimation(null);}});},place_info:function(place_id){var place_obj;$.each(this.places,function(index,place){if(parseInt(place.id)==parseInt(place_id)){place_obj=place;}});return place_obj;},create_routes:function(){var map_obj=this;if(this.map_data.routes){$.each(this.map_data.routes,function(index,routeobj){var directionsService=new google.maps.DirectionsService();var route_polyline={strokeColor:routeobj.route_stroke_color,strokeOpacity:routeobj.route_stroke_opacity,strokeWeight:routeobj.route_stroke_weight,clickable:false};var renderer_options={draggable:routeobj.route_marker_draggable,suppressMarkers:true,suppressInfoWindows:true,preserveViewport:true,polylineOptions:route_polyline,};var start=routeobj.start_location_data;var end=routeobj.end_location_data;var waypts=[];if(typeof routeobj.way_points!='undefined'){$.each(routeobj.way_points,function(point_index,place){waypts.push({location:place,stopover:true});});}var request={origin:start,destination:end,waypoints:waypts,optimizeWaypoints:routeobj.route_optimize_waypoints,travelMode:eval("google.maps.TravelMode."+routeobj.route_travel_mode),unitSystem:eval("google.maps.UnitSystem."+routeobj.route_unit_system),};directionsService.route(request,function(response,status){if(status==google.maps.DirectionsStatus.OK){directionsDisplay=new google.maps.DirectionsRenderer(renderer_options);directionsDisplay.setMap(map_obj.map);directionsDisplay.setDirections(response);directionsDisplay.setPanel($(".directions-panel-route"+routeobj.route_id+"").get(0));if(typeof routeobj.route_id!='undefined'){map_obj.route_directions[routeobj.route_id]=directionsDisplay;}}else{console.log(routeobj);console.log(""+wpgmp_local.wpgmp_route_not_avilable+"");}});});}},enable_drawing:function(){var map_obj=this;map_obj.drawingmanager=new google.maps.drawing.DrawingManager({drawingMode:null,drawingControl:true,drawingControlOptions:{position:google.maps.ControlPosition.TOP_CENTER,drawingModes:[google.maps.drawing.OverlayType.CIRCLE,google.maps.drawing.OverlayType.POLYGON,google.maps.drawing.OverlayType.POLYLINE,google.maps.drawing.OverlayType.RECTANGLE]},circleOptions:{fillColor:'#003dce',strokeColor:'#003dce',strokeWeight:'1',strokeOpacity:'0.5',zindex:1,fillOpacity:'0.5',editable:false,draggable:false},polygonOptions:{fillColor:'#003dce',strokeColor:'#003dce',strokeWeight:'1',strokeOpacity:'0.5',zindex:1,fillOpacity:'0.5',editable:false,draggable:false},polylineOptions:{fillColor:'#003dce',strokeColor:'#003dce',strokeWeight:'1',strokeOpacity:'0.5',zindex:1,fillOpacity:'0.5',editable:false,draggable:false},rectangleOptions:{fillColor:'#003dce',strokeColor:'#003dce',strokeWeight:'1',strokeOpacity:'0.5',zindex:1,fillOpacity:'0.5',editable:false,draggable:false}});map_obj.drawingmanager.setMap(map_obj.map);map_obj.event_listener(map_obj.drawingmanager,'circlecomplete',function(circle){map_obj.wpgmp_circles.push(circle);map_obj.wpgmp_shape_complete(circle,'circle');});map_obj.event_listener(map_obj.drawingmanager,'polygoncomplete',function(polygon){map_obj.wpgmp_polygons.push(polygon);map_obj.wpgmp_shape_complete(polygon,'polygon');});map_obj.event_listener(map_obj.drawingmanager,'polylinecomplete',function(polyline){map_obj.wpgmp_polylines.push(polyline);map_obj.wpgmp_shape_complete(polyline,'polyline');});map_obj.event_listener(map_obj.drawingmanager,'rectanglecomplete',function(rectangle){map_obj.wpgmp_rectangles.push(rectangle);map_obj.wpgmp_shape_complete(rectangle,'rectangle');});},create_polygon:function(){var map_obj=this;$.each(this.map_data.shapes.shape.polygons,function(index,polygon){var path=[];$.each(polygon.cordinates,function(ind,cordinate){var latlng=cordinate.split(',');path.push(new google.maps.LatLng(latlng[0],latlng[1]));});polygon.reference=new google.maps.Polygon({paths:path,strokeColor:polygon.settings.stroke_color,strokeOpacity:polygon.settings.stroke_opacity,strokeWeight:polygon.settings.stroke_weight,fillColor:polygon.settings.fill_color,fillOpacity:polygon.settings.fill_opacity});if(typeof map_obj.map_data.shapes!='undefined'){if(map_obj.map_data.shapes.drawing_editable===true){map_obj.event_listener(polygon.reference,"click",function(){map_obj.setSelection(polygon.reference);map_obj.get_shapes_options(polygon.reference,'polygon');});}else if(polygon.events.url!==''||polygon.events.message!==''){map_obj.event_listener(polygon.reference,"click",function(){if(polygon.events.url===''&&polygon.events.message!==''){var bounds=new google.maps.LatLngBounds();polygon.reference.getPath().forEach(function(element,index){bounds.extend(element);});$.each(map_obj.places,function(key,place){place.infowindow.close();});map_obj.opened_info.setPosition(bounds.getCenter());map_obj.opened_info.setContent(polygon.events.message);map_obj.opened_info.open(map_obj.map,this);}else{window.location=polygon.events.url;}});}}polygon.reference.setMap(map_obj.map);map_obj.wpgmp_polygons.push(polygon.reference);map_obj.wpgmp_shape_events.push({'shape':polygon.reference,'url':polygon.events.url,'message':polygon.events.message});});},create_polyline:function(){var map_obj=this;$.each(this.map_data.shapes.shape.polylines,function(index,polyline){var path=[];if(typeof polyline.cordinates!='undefined'){$.each(polyline.cordinates,function(ind,cordinate){var latlng=cordinate.split(',');path.push(new google.maps.LatLng(latlng[0],latlng[1]));});polyline.reference=new google.maps.Polyline({path:path,strokeColor:polyline.settings.stroke_color,strokeOpacity:polyline.settings.stroke_opacity,strokeWeight:polyline.settings.stroke_weight});if(typeof map_obj.map_data.shapes!='undefined'){if(map_obj.map_data.shapes.drawing_editable===true){map_obj.event_listener(polyline.reference,"click",function(){map_obj.setSelection(polyline.reference);map_obj.get_shapes_options(polyline.reference,'polyline');});}else if(polyline.events.url!==''||polyline.events.message!==''){map_obj.event_listener(polyline.reference,"click",function(){if(polyline.events.url===''&&polyline.events.message!==''){var bounds=new google.maps.LatLngBounds();polyline.reference.getPath().forEach(function(element,index){bounds.extend(element);});$.each(map_obj.places,function(key,place){place.infowindow.close();});map_obj.opened_info.setPosition(bounds.getCenter());map_obj.opened_info.setContent(polyline.events.message);map_obj.opened_info.open(map_obj.map,this);}else if(polyline.events.url!==''){window.location=polyline.events.url;}});}}}if(typeof polyline.reference!='undefined'){polyline.reference.setMap(map_obj.map);map_obj.wpgmp_polylines.push(polyline.reference);map_obj.wpgmp_shape_events.push({'shape':polyline.reference,'url':polyline.events.url,'message':polyline.events.message});}});},event_listener:function(obj,type,func){google.maps.event.addListener(obj,type,func);},create_circle:function(){var map_obj=this;$.each(this.map_data.shapes.shape.circles,function(index,circle){var path;$.each(circle.cordinates,function(ind,cordinate){var latlng=cordinate.split(',');path=new google.maps.LatLng(latlng[0],latlng[1]);});circle.reference=new google.maps.Circle({fillColor:circle.settings.fill_color,fillOpacity:circle.settings.fill_opacity,strokeColor:circle.settings.stroke_color,strokeOpacity:circle.settings.stroke_opacity,strokeWeight:circle.settings.stroke_weight,center:path,radius:parseInt(circle.settings.radius)});if(typeof map_obj.map_data.shapes!='undefined'){if(map_obj.map_data.shapes.drawing_editable===true){map_obj.event_listener(circle.reference,"click",function(){map_obj.setSelection(circle.reference);map_obj.get_shapes_options(circle.reference,'circle');});}else if(circle.events.url!==''||circle.events.message!==''){map_obj.event_listener(circle.reference,"click",function(){if(circle.events.url===''&&circle.events.message!==''){$.each(map_obj.places,function(key,place){place.infowindow.close();});map_obj.opened_info.setPosition(circle.reference.getCenter());map_obj.opened_info.setContent(circle.events.message);map_obj.opened_info.open(map_obj.map,this);}else if(circle.events.url!==''){window.location=circle.events.url;}});}}circle.reference.setMap(map_obj.map);map_obj.wpgmp_circles.push(circle.reference);map_obj.wpgmp_shape_events.push({'shape':circle.reference,'url':circle.events.url,'message':circle.events.message});});},create_rectangle:function(){var map_obj=this;$.each(this.map_data.shapes.shape.rectangles,function(index,rectangle){var left_latlng=rectangle.cordinates[0].split(',');var right_latlng=rectangle.cordinates[1].split(',');var path=new google.maps.LatLngBounds(new google.maps.LatLng(left_latlng[0],left_latlng[1]),new google.maps.LatLng(right_latlng[0],right_latlng[1]));rectangle.reference=new google.maps.Rectangle({bounds:path,fillColor:rectangle.settings.fill_color,fillOpacity:rectangle.settings.fill_opacity,strokeColor:rectangle.settings.stroke_color,strokeOpacity:rectangle.settings.stroke_opacity,strokeWeight:rectangle.settings.stroke_weight});if(typeof map_obj.map_data.shapes!='undefined'){if(map_obj.map_data.shapes.drawing_editable===true){map_obj.event_listener(rectangle.reference,"click",function(){map_obj.setSelection(rectangle.reference);map_obj.get_shapes_options(rectangle.reference,'rectangle');});}else if(rectangle.events.url!==''||rectangle.events.message!==''){map_obj.event_listener(rectangle.reference,"click",function(){if(rectangle.events.url===''&&rectangle.events.message!==''){$.each(map_obj.places,function(key,place){place.infowindow.close();});map_obj.opened_info.setPosition(rectangle.reference.getBounds().getCenter());map_obj.opened_info.setContent(rectangle.events.message);map_obj.opened_info.open(map_obj.map,this);}else if(rectangle.events.url!==''){window.location=rectangle.events.url;}});}}rectangle.reference.setMap(map_obj.map);map_obj.wpgmp_rectangles.push(rectangle.reference);map_obj.wpgmp_shape_events.push({'shape':rectangle.reference,'url':rectangle.events.url,'message':rectangle.events.message,});});},get_shapes_options:function(shape,type){$(".hiderow").show();$("input[name='shape_fill_color']").val(shape.fillColor);$("input[name='shape_fill_color']").parent().parent().find('.wp-color-result').css('background-color',shape.fillColor);$("select[name='shape_fill_opacity']").val(shape.fillOpacity);$("input[name='shape_stroke_color']").val(shape.strokeColor);$("input[name='shape_stroke_color']").parent().parent().find('.wp-color-result').css('background-color',shape.strokeColor);$("select[name='shape_stroke_opacity']").val(shape.strokeOpacity);$("select[name='shape_stroke_weight']").val(shape.strokeWeight);$("textarea[name='shape_path']").parent().hide();$("input[name='shape_radius']").parent().hide();$("input[name='shape_center']").parent().hide();$("input[name='shape_northeast']").parent().hide();$("input[name='shape_southwest']").parent().hide();var all_shape_events=this.wpgmp_shape_events;$.each(all_shape_events,function(i,shape_event){if(shape_event.shape==shape){$("input[name='shape_click_url']").val(shape_event.url);$("textarea[name='shape_click_message']").val(shape_event.message);}});if(type=='circle'){$("input[name='shape_radius']").parent().show();$("input[name='shape_radius']").val(shape.getRadius());$("input[name='shape_center']").parent().show();$("input[name='shape_center']").val(shape.getCenter().lat()+','+shape.getCenter().lng());}else if(type=='rectangle'){$("input[name='shape_northeast']").parent().show();$("input[name='shape_northeast']").val(shape.getBounds().getNorthEast().lat()+','+shape.getBounds().getNorthEast().lng());$("input[name='shape_southwest']").parent().show();$("input[name='shape_southwest']").val(shape.getBounds().getSouthWest().lat()+','+shape.getBounds().getSouthWest().lng());}else{var polygon_cordinate=[];var cordinates=shape.getPath();cordinates.forEach(function(latlng,index){var latlngin=[latlng.lat(),latlng.lng()];if(latlng.lat()!==""&&latlng.lng()!=="")polygon_cordinate.push(latlngin);});$("textarea[name='shape_path']").parent().show();$("textarea[name='shape_path']").val(polygon_cordinate.join(' '));}},set_shapes_options:function(shape){var polyOptions2={fillColor:$("input[name='shape_fill_color']").val(),fillOpacity:$("select[name='shape_fill_opacity']").val(),strokeColor:$("input[name='shape_stroke_color']").val(),strokeOpacity:$("select[name='shape_stroke_opacity']").val(),strokeWeight:$("select[name='shape_stroke_weight']").val(),};shape.setOptions(polyOptions2);var all_shape_events=this.wpgmp_shape_events;$.each(all_shape_events,function(i,shape_event){if(shape_event.shape==shape){shape_event.url=$("input[name='shape_click_url']").val();shape_event.message=$("textarea[name='shape_click_message']").val();}});},wpgmp_save_shapes:function(allcordinate){$("input[name='shapes_values']").val(allcordinate.join("|"));},wpgmp_shape_complete:function(shape,type){var map_obj=this;map_obj.setSelection(shape);map_obj.drawingmanager.setDrawingMode(null);if(typeof map_obj.map_data.shapes!='undefined'){if(map_obj.map_data.shapes.drawing_editable===true){map_obj.event_listener(shape,'click',function(){map_obj.setSelection(shape);map_obj.get_shapes_options(shape,type);});map_obj.wpgmp_shape_events.push({'shape':shape,'url':'','message':''});}}},wpgmp_save_polylines:function(){var all_polylines=[];var map_obj=this;var wpgmp_polylines=map_obj.wpgmp_polylines;var all_shape_events=map_obj.wpgmp_shape_events;for(var i=0;imaxX)x=maxX;if(ymaxY)y=maxY;panning_map_obj.setCenter(new google.maps.LatLng(y,x));});google.maps.event.addListener(panning_map_obj,"zoom_changed",function(){if(panning_map_obj.getZoom()'+place.content+'';}place.infowindow=new google.maps.InfoWindow({content:content});if(place.location.infowindow_default_open===true){map_obj.openInfoWindow(place);}else if(map_obj.settings.default_infowindow_open===true){map_obj.openInfoWindow(place);}var on_event=map_obj.settings.infowindow_open_event;var bounce_on_event=map_obj.settings.infowindow_bounce_animation;map_obj.event_listener(place.marker,on_event,function(){$.each(map_obj.places,function(key,prev_place){prev_place.infowindow.close();prev_place.marker.setAnimation(null);});map_obj.openInfoWindow(place);if(bounce_on_event=='click'){map_obj.toggle_bounce(place.marker);}});if(bounce_on_event=='mouseover'&&on_event!='mouseover'){map_obj.event_listener(place.marker,'mouseover',function(){place.marker.setAnimation(google.maps.Animation.BOUNCE);});map_obj.event_listener(place.marker,'mouseout',function(){place.marker.setAnimation(null);});}if(bounce_on_event!=''){google.maps.event.addListener(place.infowindow,'closeclick',function(){place.marker.setAnimation(null);});}map_obj.places.push(place);}else{remove_keys.push(key);}});$.each(remove_keys,function(index,value){places.splice(value,1);});},toggle_bounce:function(marker){if(marker.getAnimation()!==null){marker.setAnimation(null);}else{marker.setAnimation(google.maps.Animation.BOUNCE);}},display_markers:function(){var map_obj=this;map_obj.show_places=[];map_obj.categories=[];var categories={};for(var i=0;i0){map_obj.map.setZoom(map_obj.settings.infowindow_click_change_zoom);}if(this.map_data.map_tabs&&this.map_data.map_tabs.direction_tab&&this.map_data.map_tabs.direction_tab.dir_tab===true){$(this.element).find('.start_point').val(place.address);}}},};$.fn.maps=function(options,places){this.each(function(){if(!$.data(this,"wpgmp_maps")){$.data(this,"wpgmp_maps",new GoogleMaps(this,options,places));}});return this;};}(jQuery,window,document));