6*c?a+(b-a)*c*6:1>2*c?b:2>3*c?a+(b-a)*(2/3-c)*6:a}var f,g="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",h=/^([\-+])=\s*(\d+\.?\d*)/,i=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(a){return[a[1],a[2],a[3],a[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(a){return[2.55*a[1],2.55*a[2],2.55*a[3],a[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(a){return[a[1],a[2]/100,a[3]/100,a[4]]}}],j=a.Color=function(b,c,d,e){return new a.Color.fn.parse(b,c,d,e)},k={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},l={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},m=j.support={},n=a("")[0],o=a.each;n.style.cssText="background-color:rgba(1,1,1,.5)",m.rgba=n.style.backgroundColor.indexOf("rgba")>-1,o(k,function(a,b){b.cache="_"+a,b.props.alpha={idx:3,type:"percent",def:1}}),j.fn=a.extend(j.prototype,{parse:function(e,g,h,i){if(e===b)return this._rgba=[null,null,null,null],this;(e.jquery||e.nodeType)&&(e=a(e).css(g),g=b);var l=this,m=a.type(e),n=this._rgba=[];return g!==b&&(e=[e,g,h,i],m="array"),"string"===m?this.parse(d(e)||f._default):"array"===m?(o(k.rgba.props,function(a,b){n[b.idx]=c(e[b.idx],b)}),this):"object"===m?(e instanceof j?o(k,function(a,b){e[b.cache]&&(l[b.cache]=e[b.cache].slice())}):o(k,function(b,d){var f=d.cache;o(d.props,function(a,b){if(!l[f]&&d.to){if("alpha"===a||null==e[a])return;l[f]=d.to(l._rgba)}l[f][b.idx]=c(e[a],b,!0)}),l[f]&&a.inArray(null,l[f].slice(0,3))<0&&(l[f][3]=1,d.from&&(l._rgba=d.from(l[f])))}),this):void 0},is:function(a){var b=j(a),c=!0,d=this;return o(k,function(a,e){var f,g=b[e.cache];return g&&(f=d[e.cache]||e.to&&e.to(d._rgba)||[],o(e.props,function(a,b){return null!=g[b.idx]?c=g[b.idx]===f[b.idx]:void 0})),c}),c},_space:function(){var a=[],b=this;return o(k,function(c,d){b[d.cache]&&a.push(c)}),a.pop()},transition:function(a,b){var d=j(a),e=d._space(),f=k[e],g=0===this.alpha()?j("transparent"):this,h=g[f.cache]||f.to(g._rgba),i=h.slice();return d=d[f.cache],o(f.props,function(a,e){var f=e.idx,g=h[f],j=d[f],k=l[e.type]||{};null!==j&&(null===g?i[f]=j:(k.mod&&(j-g>k.mod/2?g+=k.mod:g-j>k.mod/2&&(g-=k.mod)),i[f]=c((j-g)*b+g,e)))}),this[e](i)},blend:function(b){if(1===this._rgba[3])return this;var c=this._rgba.slice(),d=c.pop(),e=j(b)._rgba;return j(a.map(c,function(a,b){return(1-d)*e[b]+d*a}))},toRgbaString:function(){var b="rgba(",c=a.map(this._rgba,function(a,b){return null==a?b>2?1:0:a});return 1===c[3]&&(c.pop(),b="rgb("),b+c.join()+")"},toHslaString:function(){var b="hsla(",c=a.map(this.hsla(),function(a,b){return null==a&&(a=b>2?1:0),b&&3>b&&(a=Math.round(100*a)+"%"),a});return 1===c[3]&&(c.pop(),b="hsl("),b+c.join()+")"},toHexString:function(b){var c=this._rgba.slice(),d=c.pop();return b&&c.push(~~(255*d)),"#"+a.map(c,function(a){return a=(a||0).toString(16),1===a.length?"0"+a:a}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),j.fn.parse.prototype=j.fn,k.hsla.to=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null,null,null,a[3]];var b,c,d=a[0]/255,e=a[1]/255,f=a[2]/255,g=a[3],h=Math.max(d,e,f),i=Math.min(d,e,f),j=h-i,k=h+i,l=.5*k;return b=i===h?0:d===h?60*(e-f)/j+360:e===h?60*(f-d)/j+120:60*(d-e)/j+240,c=0===j?0:.5>=l?j/k:j/(2-k),[Math.round(b)%360,c,l,null==g?1:g]},k.hsla.from=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null,null,null,a[3]];var b=a[0]/360,c=a[1],d=a[2],f=a[3],g=.5>=d?d*(1+c):d+c-d*c,h=2*d-g;return[Math.round(255*e(h,g,b+1/3)),Math.round(255*e(h,g,b)),Math.round(255*e(h,g,b-1/3)),f]},o(k,function(d,e){var f=e.props,g=e.cache,i=e.to,k=e.from;j.fn[d]=function(d){if(i&&!this[g]&&(this[g]=i(this._rgba)),d===b)return this[g].slice();var e,h=a.type(d),l="array"===h||"object"===h?d:arguments,m=this[g].slice();return o(f,function(a,b){var d=l["object"===h?a:b.idx];null==d&&(d=m[b.idx]),m[b.idx]=c(d,b)}),k?(e=j(k(m)),e[g]=m,e):j(m)},o(f,function(b,c){j.fn[b]||(j.fn[b]=function(e){var f,g=a.type(e),i="alpha"===b?this._hsla?"hsla":"rgba":d,j=this[i](),k=j[c.idx];return"undefined"===g?k:("function"===g&&(e=e.call(this,k),g=a.type(e)),null==e&&c.empty?this:("string"===g&&(f=h.exec(e),f&&(e=k+parseFloat(f[2])*("+"===f[1]?1:-1))),j[c.idx]=e,this[i](j)))})})}),j.hook=function(b){var c=b.split(" ");o(c,function(b,c){a.cssHooks[c]={set:function(b,e){var f,g,h="";if("transparent"!==e&&("string"!==a.type(e)||(f=d(e)))){if(e=j(f||e),!m.rgba&&1!==e._rgba[3]){for(g="backgroundColor"===c?b.parentNode:b;(""===h||"transparent"===h)&&g&&g.style;)try{h=a.css(g,"backgroundColor"),g=g.parentNode}catch(i){}e=e.blend(h&&"transparent"!==h?h:"_default")}e=e.toRgbaString()}try{b.style[c]=e}catch(i){}}},a.fx.step[c]=function(b){b.colorInit||(b.start=j(b.elem,c),b.end=j(b.end),b.colorInit=!0),a.cssHooks[c].set(b.elem,b.start.transition(b.end,b.pos))}})},j.hook(g),a.cssHooks.borderColor={expand:function(a){var b={};return o(["Top","Right","Bottom","Left"],function(c,d){b["border"+d+"Color"]=a}),b}},f=a.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(c),function(){function b(b){var c,d,e=b.ownerDocument.defaultView?b.ownerDocument.defaultView.getComputedStyle(b,null):b.currentStyle,f={};if(e&&e.length&&e[0]&&e[e[0]])for(d=e.length;d--;)c=e[d],"string"==typeof e[c]&&(f[a.camelCase(c)]=e[c]);else for(c in e)"string"==typeof e[c]&&(f[c]=e[c]);return f}function d(b,c){var d,e,g={};for(d in c)e=c[d],b[d]!==e&&(f[d]||(a.fx.step[d]||!isNaN(parseFloat(e)))&&(g[d]=e));return g}var e=["add","remove","toggle"],f={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};a.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(b,d){a.fx.step[d]=function(a){("none"!==a.end&&!a.setAttr||1===a.pos&&!a.setAttr)&&(c.style(a.elem,d,a.end),a.setAttr=!0)}}),a.fn.addBack||(a.fn.addBack=function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}),a.effects.animateClass=function(c,f,g,h){var i=a.speed(f,g,h);return this.queue(function(){var f,g=a(this),h=g.attr("class")||"",j=i.children?g.find("*").addBack():g;j=j.map(function(){var c=a(this);return{el:c,start:b(this)}}),f=function(){a.each(e,function(a,b){c[b]&&g[b+"Class"](c[b])})},f(),j=j.map(function(){return this.end=b(this.el[0]),this.diff=d(this.start,this.end),this}),g.attr("class",h),j=j.map(function(){var b=this,c=a.Deferred(),d=a.extend({},i,{queue:!1,complete:function(){c.resolve(b)}});return this.el.animate(this.diff,d),c.promise()}),a.when.apply(a,j.get()).done(function(){f(),a.each(arguments,function(){var b=this.el;a.each(this.diff,function(a){b.css(a,"")})}),i.complete.call(g[0])})})},a.fn.extend({addClass:function(b){return function(c,d,e,f){return d?a.effects.animateClass.call(this,{add:c},d,e,f):b.apply(this,arguments)}}(a.fn.addClass),removeClass:function(b){return function(c,d,e,f){return arguments.length>1?a.effects.animateClass.call(this,{remove:c},d,e,f):b.apply(this,arguments)}}(a.fn.removeClass),toggleClass:function(b){return function(c,d,e,f,g){return"boolean"==typeof d||void 0===d?e?a.effects.animateClass.call(this,d?{add:c}:{remove:c},e,f,g):b.apply(this,arguments):a.effects.animateClass.call(this,{toggle:c},d,e,f)}}(a.fn.toggleClass),switchClass:function(b,c,d,e,f){return a.effects.animateClass.call(this,{add:c,remove:b},d,e,f)}})}(),function(){function c(b,c,d,e){return a.isPlainObject(b)&&(c=b,b=b.effect),b={effect:b},null==c&&(c={}),a.isFunction(c)&&(e=c,d=null,c={}),("number"==typeof c||a.fx.speeds[c])&&(e=d,d=c,c={}),a.isFunction(d)&&(e=d,d=null),c&&a.extend(b,c),d=d||c.duration,b.duration=a.fx.off?0:"number"==typeof d?d:d in a.fx.speeds?a.fx.speeds[d]:a.fx.speeds._default,b.complete=e||c.complete,b}function d(b){return!b||"number"==typeof b||a.fx.speeds[b]?!0:"string"!=typeof b||a.effects.effect[b]?a.isFunction(b)?!0:"object"!=typeof b||b.effect?!1:!0:!0}a.extend(a.effects,{version:"1.11.4",save:function(a,c){for(var d=0;d").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e={width:b.width(),height:b.height()},f=document.activeElement;try{f.id}catch(g){f=document.body}return b.wrap(d),(b[0]===f||a.contains(b[0],f))&&a(f).focus(),d=b.parent(),"static"===b.css("position")?(d.css({position:"relative"}),b.css({position:"relative"})):(a.extend(c,{position:b.css("position"),zIndex:b.css("z-index")}),a.each(["top","left","bottom","right"],function(a,d){c[d]=b.css(d),isNaN(parseInt(c[d],10))&&(c[d]="auto")}),b.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),b.css(e),d.css(c).show()},removeWrapper:function(b){var c=document.activeElement;return b.parent().is(".ui-effects-wrapper")&&(b.parent().replaceWith(b),(b[0]===c||a.contains(b[0],c))&&a(c).focus()),b},setTransition:function(b,c,d,e){return e=e||{},a.each(c,function(a,c){var f=b.cssUnit(c);f[0]>0&&(e[c]=f[0]*d+f[1])}),e}}),a.fn.extend({effect:function(){function b(b){function c(){a.isFunction(f)&&f.call(e[0]),a.isFunction(b)&&b()}var e=a(this),f=d.complete,h=d.mode;(e.is(":hidden")?"hide"===h:"show"===h)?(e[h](),c()):g.call(e[0],d,c)}var d=c.apply(this,arguments),e=d.mode,f=d.queue,g=a.effects.effect[d.effect];return a.fx.off||!g?e?this[e](d.duration,d.complete):this.each(function(){d.complete&&d.complete.call(this)}):f===!1?this.each(b):this.queue(f||"fx",b)},show:function(a){return function(b){if(d(b))return a.apply(this,arguments);var e=c.apply(this,arguments);return e.mode="show",this.effect.call(this,e)}}(a.fn.show),hide:function(a){return function(b){if(d(b))return a.apply(this,arguments);var e=c.apply(this,arguments);return e.mode="hide",this.effect.call(this,e)}}(a.fn.hide),toggle:function(a){return function(b){if(d(b)||"boolean"==typeof b)return a.apply(this,arguments);var e=c.apply(this,arguments);return e.mode="toggle",this.effect.call(this,e)}}(a.fn.toggle),cssUnit:function(b){var c=this.css(b),d=[];return a.each(["em","px","%","pt"],function(a,b){c.indexOf(b)>0&&(d=[parseFloat(c),b])}),d}})}(),function(){var b={};a.each(["Quad","Cubic","Quart","Quint","Expo"],function(a,c){b[c]=function(b){return Math.pow(b,a+2)}}),a.extend(b,{Sine:function(a){return 1-Math.cos(a*Math.PI/2)},Circ:function(a){return 1-Math.sqrt(1-a*a)},Elastic:function(a){return 0===a||1===a?a:-Math.pow(2,8*(a-1))*Math.sin((80*(a-1)-7.5)*Math.PI/15)},Back:function(a){return a*a*(3*a-2)},Bounce:function(a){for(var b,c=4;a<((b=Math.pow(2,--c))-1)/11;);return 1/Math.pow(4,3-c)-7.5625*Math.pow((3*b-2)/22-a,2)}}),a.each(b,function(b,c){a.easing["easeIn"+b]=c,a.easing["easeOut"+b]=function(a){return 1-c(1-a)},a.easing["easeInOut"+b]=function(a){return.5>a?c(2*a)/2:1-c(-2*a+2)/2}})}(),a.effects});
;!function(a,b){"use strict";function c(){if(!e){e=!0;var a,c,d,f,g=-1!==navigator.appVersion.indexOf("MSIE 10"),h=!!navigator.userAgent.match(/Trident.*rv:11\./),i=b.querySelectorAll("iframe.wp-embedded-content");for(c=0;c1e3)g=1e3;else if(200>~~g)g=200;f.height=g}if("link"===d.message)if(h=b.createElement("a"),i=b.createElement("a"),h.href=f.getAttribute("src"),i.href=d.value,i.host===h.host)if(b.activeElement===f)a.top.location.href=d.value}else;}},d)a.addEventListener("message",a.wp.receiveEmbedMessage,!1),b.addEventListener("DOMContentLoaded",c,!1),a.addEventListener("load",c,!1)}(window,document);
;var slplus=slplus;var cslmap;var slp_Filter=function(id){var callbacks,method,topic=id&&slp.topics[id];if(!topic){if(typeof(jQuery.Callbacks)!=='undefined'){callbacks=jQuery.Callbacks();topic={publish:callbacks.fire,subscribe:callbacks.add,unsubscribe:callbacks.remove};}else{slp.log('jQuery 1.7.0+ required, '+jQuery.fn.version+' used instead. FAIL.');topic={publish:function(data){return data;}}}
if(id){slp.topics[id]=topic;}}
return topic;};var slp_LocationServices=function(){this.theService=null;this.LocationSupport=true;this.Initialized=false;this.location_timeout=null;this.lat=0.00;this.lng=0.00;this.errorCalled=false;this.__init=function(){this.Initialized=true;try{if(typeof navigator.geolocation==='undefined'){if(google.gears){this.theService=google.gears.factory.create('beta.geolocation');}else{this.LocationSupport=false;}}
else{this.theService=navigator.geolocation;}}catch(e){}};this.currentLocation=function(callback,errorCallback){if(!this.Initialized){this.__init();}
if(this.LocationSupport){if(this.theService){this.location_timeout=setTimeout(errorCallback,5000);this.theService.getCurrentPosition(callback,errorCallback,{maximumAge:60000,timeout:5000,enableHighAccuracy:true});}}else{errorCallback(null);}};};var slp_Marker=function(map,title,position,markerImage){this.__map=map;this.__title=title;this.__position=position;this.__gmarker=null;this.__markerImage=markerImage;this.__shadowImage=null;this.__init=function(){if(this.__markerImage===null){this.__gmarker=new google.maps.Marker({position:this.__position,map:this.__map.gmap,title:this.__title});}else{var shadowKey=this.__markerImage;if(typeof cslmap.shadows[shadowKey]==='undefined'){var shadow=this.__markerImage.replace('/_(.*?)\.png/','_shadow.html');jQuery.ajax({url:shadow,type:'HEAD',async:false,error:function(){cslmap.shadows[shadowKey]=slplus.plugin_url+'/images/icons/blank.png';},success:function(){cslmap.shadows[shadowKey]=shadow;}});}
this.__shadowImage=cslmap.shadows[shadowKey];this.buildMarker();}};this.buildMarker=function(){this.__gmarker=new google.maps.Marker({position:this.__position,map:this.__map.gmap,shadow:this.__shadowImage,icon:this.__markerImage,zIndex:0,title:this.__title});};this.__init();};var slp_Map=function(aMapCanvas){this.infowindow=new google.maps.InfoWindow();this.gmap=null;this.__mapCanvas=aMapCanvas;this.shadows=new Object;this.map_hidden=true;this.default_radius=40000;this.tilesLoaded=null;this.address=null;this.draggable=true;this.markers=null;this.usingSensor=false;this.mapHomeIconUrl=null;this.mapEndIconUrl=null;this.mapType=null;this.options=null;this.centerMarker=null;this.marker=null;this.bounds=null;this.homePoint=null;this.lastCenter=null;this.lastRadius=null;this.latest_response=null;this.geocoder=new google.maps.Geocoder();this.__init=function(){if(typeof slplus!=='undefined'){this.mapType=slplus.options.map_type;this.mapHomeIconUrl=slplus.options.map_home_icon;this.mapEndIconUrl=slplus.options.map_end_icon;var addressInput=this.getSearchAddress();if(typeof addressInput==='undefined'){this.address=slplus.options.map_center;}else{this.address=addressInput;}}else{alert('Store Locator Plus script not loaded properly.');}};this.__buildMap=function(center){var _this=this;if(this.gmap===null){this.options={center:center,mapTypeId:this.mapType,minZoom:1,zoom:parseInt(slplus.options.zoom_level),};if(typeof slplus.options.map_options_scrollwheel!=='undefined'){this.options['scrollwheel']=slplus.options.map_options_scrollwheel;}
if(typeof slplus.options.map_options_mapTypeControl!=='undefined'){this.options['mapTypeControl']=slplus.options.map_options_mapTypeControl;}
if(typeof slplus.options.map_options_scaleControl!=='undefined'){this.options['scaleControl']=slplus.options.map_options_scaleControl;}else{this.options['scaleControl']=true;}
if(slplus.options.google_map_style){jQuery.extend(this.options,{styles:JSON.parse(slplus.options.google_map_style)});}
slp_Filter('map_options').publish(this.options);this.gmap=new google.maps.Map(document.getElementById('map'),this.options);google.maps.event.addListener(this.gmap,'bounds_changed',function(){_this.__waitForTileLoad.call(_this);});if(this.show_home_marker()){this.homePoint=center;this.addMarkerAtCenter();}
if(slplus.options.immediately_show_locations!=='0'){var tag_to_search_for=this.saneValue('tag_to_search_for','');var radius=this.default_radius;slplus.options.initial_radius=slplus.options.initial_radius.replace(/\D/g,'');if(/^[0-9]+$/.test(slplus.options.initial_radius)){radius=slplus.options.initial_radius;}else{radius=this.saneValue('radiusSelect',this.default_radius);}
this.loadMarkers(center,radius,tag_to_search_for);}}};this.show_home_marker=function(){return(this.usingSensor||((slplus.options.immediately_show_locations!=='0')&&(slplus.options.no_homeicon_at_start!=='1')));};this.__waitForTileLoad=function(){var _this=this;if(this.__tilesLoaded===null){this.__tilesLoaded=google.maps.event.addListener(this.gmap,'tilesloaded',function(){_this.__tilesAreLoaded.call(_this);});}};this.__tilesAreLoaded=function(){jQuery('#map').find('img').css({'max-width':'none'});google.maps.event.removeListener(this.__tilesLoaded);this.__tilesLoaded=null;};this.addMarkerAtCenter=function(){if(this.centerMarker){this.centerMarker.__gmarker.setMap(null);}
if(this.homePoint){this.centerMarker=new slp_Marker(this,'',this.homePoint,this.mapHomeIconUrl);}};this.clearMarkers=function(){if(this.markers){for(markerNumber in this.markers){if(typeof this.markers[markerNumber]!=='undefined'){if(typeof this.markers[markerNumber].__gmarker!=='undefined'){this.markers[markerNumber].__gmarker.setMap(null);}}}
this.markers.length=0;if(!this.saneValue('addressInput','')){this.centerMarker=null;this.homePoint=null;}}};this.putMarkers=function(markerListNatural){this.markers=[];var sidebar=document.getElementById('map_sidebar');sidebar.innerHTML='';var markerCount=(markerListNatural)?markerListNatural.length:0;if(markerCount===0){if(this.homePoint){this.gmap.panTo(this.homePoint);}
document.getElementById('map_sidebar').innerHTML=''+slplus.options.message_no_results+'
';}else{var results_html={content:'',insert_rows_at:'#map_sidebar'};slp_Filter('location_results_header').publish(results_html);if(results_html.content.trim()){jQuery('#map_sidebar').append(results_html.content);}
var bounds=new google.maps.LatLngBounds();if(this.homePoint){bounds.extend(this.homePoint);}
var locationIcon;for(var markerNumber=0;markerNumber4)?markerListNatural[markerNumber].icon:this.mapEndIconUrl);this.markers.push(new slp_Marker(this,markerListNatural[markerNumber].data.sl_store,position,locationIcon));_this=this;google.maps.event.addListener(this.markers[markerNumber].__gmarker,'click',(function(infoData,marker){return function(){_this.show_map_bubble.call(_this,infoData,marker);}})(markerListNatural[markerNumber],this.markers[markerNumber]));if(sidebar){jQuery(results_html.insert_rows_at).append(this.createSidebar(markerListNatural[markerNumber]));jQuery(results_html.insert_rows_at+' span:empty').hide();jQuery('#slp_results_wrapper_'+markerListNatural[markerNumber].id).on('click',null,{'info':markerListNatural[markerNumber],'marker':this.markers[markerNumber]},_this.handle_location_result_click);}}
this.bounds=bounds;this.gmap.fitBounds(this.bounds);if(slplus.options.no_autozoom==='1'){this.gmap.setZoom(parseInt(slplus.options.zoom_level));}else{var current_zoom=this.gmap.getZoom();var zoom_tweak=parseInt(slplus.options.zoom_tweak);var new_zoom=current_zoom-zoom_tweak;if(markerCount<2){new_zoom=Math.min(new_zoom,15);}
this.gmap.setZoom(new_zoom);}}
jQuery('#map_sidebar').trigger('contentchanged');};this.handle_location_result_click=function(event){_this.show_map_bubble(event.data.info,event.data.marker);};this.show_map_bubble=function(infoData,marker){this.options={show_bubble:slplus.options.hide_bubble!=='1'};slp_Filter('map_options').publish(this.options);if(this.options.show_bubble){this.infowindow.setContent(this.createMarkerContent(infoData));this.infowindow.open(this.gmap,marker.__gmarker);}};this.doGeocode=function(){var _this=this;var geocoder_request=new Object();geocoder_request['address']=_this.address;geocoder_request['region']=((typeof slplus.options.map_region!=='undefined')&&(slplus.options.map_region))?slplus.options.map_region:'us';if(slplus.options.searchnear==='currentmap'){if(_this.gmap){geocoder_request['bounds']=_this.gmap.getBounds();}}
slp_Filter('geocoder_request').publish(geocoder_request);_this.geocoder.geocode(geocoder_request,function(results,status){if(status===google.maps.GeocoderStatus.OK&&results.length>0){var geocode_results={all:results,request:geocoder_request,best:results[0]};slp_Filter('geocode_results').publish(geocode_results);if(_this.gmap===null){_this.__buildMap(geocode_results.best.geometry.location);}
else{_this.homePoint=geocode_results.best.geometry.location;_this.addMarkerAtCenter();var tag_to_search_for=_this.saneValue('tag_to_search_for','');var radius=_this.saneValue('radiusSelect',this.default_radius);_this.loadMarkers(geocode_results.best.geometry.location,radius,tag_to_search_for);}}else{slp.log('Google JavaScript API geocoder failed with status '+status);slp.log('Address sent to Google: '+geocoder_request['address']);if(_this.gmap===null){slp.log('Map set to fallback lat/lng: '+this.slplus.options.map_center_lat+' , '+this.slplus.options.map_center_lng);_this.homePoint=new google.maps.LatLng(this.slplus.options.map_center_lat,this.slplus.options.map_center_lng);_this.__buildMap(_this.homePoint);_this.addMarkerAtCenter();}}});};this.__createAddress=function(aMarker){var address='';if(aMarker.address!==''){address+=aMarker.address;}
if(aMarker.address2!==''){address+=", "+aMarker.address2;}
if(aMarker.city!==''){address+=", "+aMarker.city;}
if(aMarker.state!==''){address+=", "+aMarker.state;}
if(aMarker.zip!==''){address+=", "+aMarker.zip;}
if(aMarker.country!==''){address+=", "+aMarker.country;}
return address;};this.createMarkerContent=function(thisMarker){thisMarker['fullAddress']=this.__createAddress(thisMarker);return slplus.options.bubblelayout.replace_shortcodes(thisMarker);};this.getSearchAddress=function(defaultAddress){var searchAddress=jQuery('#addressInput').val();if(!searchAddress){if((slplus.options.use_sensor!='0')&&(sensor.lat!==0.00)&&(sensor.lng!==0.00)){searchAddress=sensor.lat+','+sensor.lng;}else{searchAddress=defaultAddress;}}
return searchAddress;};this.saneValue=function(id,defaultValue){var name=document.getElementById(id);if(name===null){name=defaultValue;}
else{name=name.value;}
return name;};this.loadMarkers=function(center,radius,tags){if(center===null){center=this.gmap.getCenter();}
if(radius===null){radius=this.default_radius;}
this.lastCenter=center;this.lastRadius=radius;if(tags===null){tags='';}
var _this=this;var action={address:this.saneValue('addressInput','no address entered'),formdata:jQuery('#searchForm').serialize(),lat:center.lat(),lng:center.lng(),name:this.saneValue('nameSearch',''),options:slplus.options,radius:radius,tags:tags};if(slplus.options.immediately_show_locations!=='0'){action.action='csl_ajax_onload';slplus.options.immediately_show_locations='0';}else{action.action='csl_ajax_search';}
slp.send_ajax(action,_this.process_ajax_response);};this.process_ajax_response=function(response){valid_response=(typeof response.response!=='undefined');if(valid_response){valid_response=response.success;}
if(valid_response){cslmap.latest_response=response;cslmap.clearMarkers();slp_Filter('locations_found').publish(response.response);cslmap.putMarkers(response.response);jQuery('#map').trigger('markers_dropped');}else{if(window.console){slp.log('SLP server did not send back a valid JSONP response.');if(typeof response.response!=='undefined'){slp.log('Response: '+response.response);}
if(typeof response.message!=='undefined'){var sidebar=document.getElementById('map_sidebar');sidebar.innerHTML=response.message;}}}};this.tagFilter=function(){var tag_to_search_for=this.saneValue('tag_to_search_for','');this.loadMarkers(this.lastCenter,this.lastRadius,tag_to_search_for);jQuery('#map_box_image').hide();jQuery('#map_box_map').show();};this.searchLocations=function(){var append_this=typeof slplus.options.append_to_search!=='undefined'?slplus.options.append_to_search:'';var address=this.saneValue('addressInput','')+append_this;this.unhide_map();google.maps.event.trigger(this.gmap,'resize');if(address!==''){this.address=address;this.doGeocode();}else{var tag_to_search_for=this.saneValue('tag_to_search_for','');var radius=this.saneValue('radiusSelect',this.default_radius);this.loadMarkers(null,radius,tag_to_search_for);}};this.createSidebar=function(aMarker){aMarker.pro_tags='';if(jQuery.trim(aMarker.tags)!==''){var tagclass=aMarker.tags.replace(/\W/g,'_');aMarker.pro_tags='
'+aMarker.tags+'
';}
aMarker.city_state_zip='';if(jQuery.trim(aMarker.city)!==''){aMarker.city_state_zip+=aMarker.city;if(jQuery.trim(aMarker.state)!==''||jQuery.trim(aMarker.zip)!==''){aMarker.city_state_zip+=', ';}}
if(jQuery.trim(aMarker.state)!==''){aMarker.city_state_zip+=aMarker.state;if(jQuery.trim(aMarker.zip)!==''){aMarker.city_state_zip+=' ';}}
if(jQuery.trim(aMarker.zip)!==''){aMarker.city_state_zip+=aMarker.zip;}
aMarker.phone_with_label=(jQuery.trim(aMarker.phone)!=='')?slplus.options['label_phone']+aMarker.phone:'';aMarker.fax_with_label=(jQuery.trim(aMarker.fax)!=='')?slplus.options['label_fax']+aMarker.fax:'';var address=this.__createAddress(aMarker);aMarker.location_address=encodeURIComponent(address);aMarker.search_address=encodeURIComponent(this.getSearchAddress(this.address));aMarker.hours_sanitized=jQuery("").html(aMarker.hours).text();var inner_html={'content':slplus.options.results_layout.replace_shortcodes(aMarker),'finished':false};slp_Filter('wrap_location_results').publish(inner_html);if(!inner_html.finished){inner_html.content=''+
inner_html.content+'
';}
return inner_html.content;};this.unhide_map=function(){if(this.map_hidden){jQuery('#map_box_image').hide();jQuery('#map_box_map').show();this.map_hidden=false;}}
this.__init();};var slp=slp||{};slp.topics={};slp.setup_helpers=function(){String.prototype.replace_shortcodes=function(){var args=arguments;var thisMarker=args[0];var shortcode_complex_regex=/\[(\w+)\s+([\w\.]+)\s*(\w*)(?:[\s="]*)(\w*)(?:[\s"]*)\s*(\w*)(?:[\s="]*)(\w*)(?:[\s"]*)\]/g;return this.replace(shortcode_complex_regex,function(match,shortcode,attribute,modifier,modarg,modifier2,modarg2){switch(shortcode){case'slp_location':if(attribute==='latitude'){attribute='lat';}
if(attribute==='longitude'){attribute='lng';}
var value='';var field_name='';if(thisMarker[attribute]){value=thisMarker[attribute];field_name=attribute;}else if(attribute.indexOf('.')>1){var dot_notation_regex=/(\w+)/gi;var data_parts=attribute.match(dot_notation_regex);var marker_array_name=data_parts[0];if(!thisMarker[marker_array_name]){return'';}
var marker_array_field=data_parts[1];value=thisMarker[marker_array_name][marker_array_field];if(!value){return'';}
field_name=marker_array_name+'_'+marker_array_field;}else{return'';}
var output=value.shortcode_modifier({'modifier':modifier,'modarg':modarg,'field_name':field_name,'marker':thisMarker});if(modifier2){output=output.shortcode_modifier({'modifier':modifier2,'modarg':modarg2,'field_name':field_name,'marker':thisMarker});}
return output;case'slp_option':var options=slplus.options;slp_Filter('replace_shortcodes_options').publish(options);if(attribute==='name'){attribute=modarg;modarg='';}
if(!options[attribute]){return'';}
var output=options[attribute].shortcode_modifier({'modifier':modifier,'modarg':modarg,'field_name':attribute,'marker':thisMarker})
if(modifier2){output=output.shortcode_modifier({'modifier':modifier2,'modarg':modarg2,'field_name':attribute,'marker':thisMarker});}
return output;case'html':var output='';switch(attribute){case'br':output='
';break;case'closing_anchor':output='';break;default:break;}
output=output.shortcode_modifier({'modifier':modifier,'modarg':modarg,'field_name':'raw_html','marker':thisMarker});if(modifier2){output=output.shortcode_modifier({'modifier':modifier2,'modarg':modarg2,'field_name':'raw_html','marker':thisMarker});}
return output;case'slp_addon':return'';default:return match+' not supported';}});}
String.prototype.shortcode_modifier=function(){var args=arguments;var full_mod=args[0];var modifier=full_mod.modifier;var modarg=full_mod.modarg;var field_name=full_mod.field_name;var raw_output=true;if(field_name==='hours'){raw_output=false;}
var value=this;var prefix='';var suffix='';if(modifier){switch(modifier){case'ifset':if(!full_mod.marker[full_mod.modarg]){return'';}
break;case'suffix':switch(modarg){case'br':suffix='