			var default_lat            = 44.968684;
			var default_lng            = -93.215561;
			var default_radius            = 25;
			var zoom_level                = '9';
			var scrollwheel            = '0';
			var draggable              = '1';
			var map_width                = '100%';
			var map_height                = '350px';
			var special_text            = '';
			var units                    = 'mi';
			var limit                    = '20';
			var plugin_url                = 'http://smartdrugtesting.com/wp-content/plugins/simplemap';
			var visit_website_text        = 'Schedule Your Test';
			var get_directions_text        = 'Get Directions';
			var location_tab_text        = 'Location';
			var description_tab_text    = 'Description';
			var phone_text                = 'Phone';
			var fax_text                = 'Fax';
			var email_text                = 'Email';

			var taxonomy_text = {};
								taxonomy_text.sm_category = 'Categories';
										taxonomy_text.sm_tag = 'Tags';
								var noresults_text            = 'No results found.';
			var default_domain            = '.com';
			var address_format            = 'town, province postalcode';
			var siteurl                    = 'http://smartdrugtesting.com';
			var map;
			var geocoder;
			var autoload                = 'some';
			var auto_locate                = '';
			var markersArray = [];
			var infowindowsArray = [];

			function clearInfoWindows() {
			if (infowindowsArray) {
			for (var i=0;i
			<infowindowsArray.length;i++) {
			infowindowsArray[i].close();
			}
			}
			}

			function clearOverlays() {
			if (markersArray) {
			for (var i=0;i
			<markersArray.length;i++) {
			markersArray[i].setMap(null);
			}
			}
			}

			//function load_simplemap( lat, lng, aspid, ascid, asma ) {
			function load_simplemap( lat, lng, aspid, ascid, asma, shortcode_zoom_level, map_type, shortcode_autoload, shortcode_scrollwheel, shortcode_draggable ) {

			zoom_level  = shortcode_zoom_level;
			autoload    = shortcode_autoload;
			scrollwheel = shortcode_scrollwheel;
			draggable   = shortcode_draggable;
			
			if ( lat == 0 ) {
			lat = '44.968684';
			}

			if ( lng == 0 ) {
			lng = '-93.215561';
			}

			var latlng = new google.maps.LatLng( lat, lng );
			var myOptions = {
			zoom: parseInt(zoom_level),
			center: latlng,
			scrollwheel: scrollwheel,
			draggable: draggable,
			mapTypeId: google.maps.MapTypeId[map_type]
			};
			map = new google.maps.Map( document.getElementById( "simplemap" ), myOptions );

			// Adsense for Google Maps
						}

			function codeAddress() {
			// if this is modified, modify mirror function in general-options-js php function
			var d_address = document.getElementById("default_address").value;

			geocoder = new google.maps.Geocoder();
			geocoder.geocode( { 'address': d_address }, function( results, status ) {
			if ( status == google.maps.GeocoderStatus.OK ) {
			var latlng = results[0].geometry.location;
			document.getElementById("default_lat").value = latlng.lat();
			document.getElementById("default_lng").value = latlng.lng();
			} else {
			alert("Geocode was not successful for the following reason: " + status);
			}
			});
			}

			function codeNewAddress() {
			if (document.getElementById("store_lat").value != '' && document.getElementById("store_lng").value != '') {
			document.new_location_form.submit();
			}
			else {
			var address = '';
			var street = document.getElementById("store_address").value;
			var city = document.getElementById("store_city").value;
			var state = document.getElementById("store_state").value;
			var country = document.getElementById("store_country").value;

			if (street) { address += street + ', '; }
			if (city) { address += city + ', '; }
			if (state) { address += state + ', '; }
			address += country;

			geocoder = new google.maps.Geocoder();
			geocoder.geocode( { 'address': address }, function( results, status ) {
			if ( status == google.maps.GeocoderStatus.OK ) {
			var latlng = results[0].geometry.location;
			document.getElementById("store_lat").value = latlng.lat();
			document.getElementById("store_lng").value = latlng.lng();
			document.new_location_form.submit();
			} else {
			alert("Geocode was not successful for the following reason: " + status);
			}
			});
			}
			}

			function codeChangedAddress() {
			var address = '';
			var street = document.getElementById("store_address").value;
			var city = document.getElementById("store_city").value;
			var state = document.getElementById("store_state").value;
			var country = document.getElementById("store_country").value;

			if (street) { address += street + ', '; }
			if (city) { address += city + ', '; }
			if (state) { address += state + ', '; }
			address += country;

			geocoder = new google.maps.Geocoder();
			geocoder.geocode( { 'address': address }, function( results, status ) {
			if ( status == google.maps.GeocoderStatus.OK ) {
			var latlng = results[0].geometry.location;
			document.getElementById("store_lat").value = latlng.lat();
			document.getElementById("store_lng").value = latlng.lng();
			} else {
			alert("Geocode was not successful for the following reason: " + status);
			}
			});
			}

			function searchLocations( is_search ) {
            clearInfoWindows();
			// Init searchData
			var searchData = {};
			searchData.taxes = {};

			// Set defaults for search form fields
			searchData.name    = '';
			searchData.address    = '';
			searchData.city    = '';
			searchData.state    = '';
			searchData.zip        = '';
			searchData.country    = '';

			if ( null != document.getElementById('location_search_name_field') ) {
			searchData.name = document.getElementById('location_search_name_field').value;
			}

			if ( null != document.getElementById('location_search_address_field') ) {
			searchData.address = document.getElementById('location_search_address_field').value;
			}

			if ( null != document.getElementById('location_search_city_field') ) {
			searchData.city = document.getElementById('location_search_city_field').value;
			}

			if ( null != document.getElementById('location_search_country_field') ) {
			searchData.country = document.getElementById('location_search_country_field').value;;
			}

			if ( null != document.getElementById('location_search_state_field') ) {
			searchData.state = document.getElementById('location_search_state_field').value;
			}

			if ( null != document.getElementById('location_search_zip_field') ) {
			searchData.zip = document.getElementById('location_search_zip_field').value;
			}

			if ( null != document.getElementById('location_search_distance_field') ) {
			searchData.radius = document.getElementById('location_search_distance_field').value;
			}

			searchData.lat            = document.getElementById('location_search_default_lat').value;
			searchData.lng            = document.getElementById('location_search_default_lng').value;
			searchData.limit        = document.getElementById('location_search_limit').value;
			searchData.searching    = document.getElementById('location_is_search_results').value;

			// Do SimpleMap Taxonomies
			
					// Do taxnonomy for checkboxes
					searchData.taxes.sm_category = '';
					var checks_found = false;
					jQuery( 'input[rel=location_search_sm_category_field]' ).each( function() {
					checks_found = true;
					if ( jQuery( this ).attr( 'checked' ) && jQuery( this ).attr( 'value' ) != null ) {
					searchData.taxes.sm_category += jQuery( this ).attr( 'value' ) + ',';
					}
					});

					// Do taxnonomy for select box if checks weren't found
					if ( false == checks_found ) {
					jQuery( 'option[rel=location_search_sm_category_select_val]' ).each( function() {
					if ( jQuery( this ).attr( 'selected' ) && jQuery( this ).attr( 'value' ) != null ) {
					searchData.taxes.sm_category += jQuery( this ).attr( 'value' ) + ',';
					}
					});
					}

					
					// Do taxnonomy for checkboxes
					searchData.taxes.sm_tag = '';
					var checks_found = false;
					jQuery( 'input[rel=location_search_sm_tag_field]' ).each( function() {
					checks_found = true;
					if ( jQuery( this ).attr( 'checked' ) && jQuery( this ).attr( 'value' ) != null ) {
					searchData.taxes.sm_tag += jQuery( this ).attr( 'value' ) + ',';
					}
					});

					// Do taxnonomy for select box if checks weren't found
					if ( false == checks_found ) {
					jQuery( 'option[rel=location_search_sm_tag_select_val]' ).each( function() {
					if ( jQuery( this ).attr( 'selected' ) && jQuery( this ).attr( 'value' ) != null ) {
					searchData.taxes.sm_tag += jQuery( this ).attr( 'value' ) + ',';
					}
					});
					}

					
			var query = '';
			var start = 0;

			if ( searchData.address && searchData.address != '' ) {
			query += searchData.address + ', ';
			}

			if ( searchData.city && searchData.city != '' ) {
			query += searchData.city + ', ';
			}

			if ( searchData.state && searchData.state != '' ) {
			query += searchData.state + ', ';
			}

			if ( searchData.zip && searchData.zip != '' ) {
			query += searchData.zip + ', ';
			}

			if ( searchData.country && searchData.country != '' ) {
			query += searchData.country + ', ';
			}

			// Query
			if ( query != null ) {
			query = query.slice(0, -2);
			}

			if ( searchData.limit == '' || searchData.limit == null ) {
			searchData.limit = 0;
			}

			if ( searchData.radius == '' || searchData.radius == null ) {
			searchData.radius = 0;
			}

			// Taxonomies
			
					if ( searchData.taxes.sm_category != null ) {
					var _sm_category = searchData.taxes.sm_category.slice(0, -1);
					} else {
					var _sm_category = '';
					}

					// Append available taxes logic if no taxes are selected but limited taxes were passed through shortcode as available
					if ( '' != document.getElementById('avail_sm_category').value && '' == _sm_category ) {
					_sm_category = 'OR,' + document.getElementById('avail_sm_category').value;
					}

					searchData.taxes.sm_category = _sm_category;

					
					if ( searchData.taxes.sm_tag != null ) {
					var _sm_tag = searchData.taxes.sm_tag.slice(0, -1);
					} else {
					var _sm_tag = '';
					}

					// Append available taxes logic if no taxes are selected but limited taxes were passed through shortcode as available
					if ( '' != document.getElementById('avail_sm_tag').value && '' == _sm_tag ) {
					_sm_tag = 'OR,' + document.getElementById('avail_sm_tag').value;
					}

					searchData.taxes.sm_tag = _sm_tag;

					
			// Load default location if query is empty
			if ( query == '' || query == null ) {

			if ( searchData.lat != 0 && searchData.lng != 0 )
			query = searchData.lat + ', ' + searchData.lng;
			else
			query = '44.968684, -93.215561';

			}

			// Searching
			if ( 1 == searchData.searching || 1 == is_search ) {
			is_search = 1;
			searchData.source = 'search';
			} else {
			is_search = 0;
			searchData.source = 'initial_load';
			}

			geocoder.geocode( { 'address': query }, function( results, status ) {
			if ( status == google.maps.GeocoderStatus.OK ) {
			searchData.center = results[0].geometry.location;
			if ( 'none' != autoload || is_search ) {
			if ( 'all' == autoload && is_search != 1 ) {
			searchData.radius = 0;
			searchData.limit = 0;
			}

			if (! searchData.center) {
			searchData.center = new GLatLng( 44.9799654, -93.2638361 );
			}
			searchData.query_type = 'all';
			searchData.mapLock = 'unlock';
			searchData.homeAddress = query;

			searchLocationsNear(searchData);
			}
			}
			});
			}

			function searchLocationsNear(searchData) {
			// Radius
			if ( searchData.radius != null && searchData.radius != '' ) {
			searchData.radius = parseInt( searchData.radius );

			if ( units == 'km' ) {
			searchData.radius = parseInt( searchData.radius ) / 1.609344;
			}
			} else if ( autoload == 'all' ) {
			searchData.radius = 0;
			} else {
			if ( units == 'mi' ) {
			searchData.radius = parseInt( default_radius );
			} else if ( units == 'km' ) {
			searchData.radius = parseInt( default_radius ) / 1.609344;
			}
			}

			// Build search URL
			
			var searchUrl = siteurl + '/?sm-xml-search=1&lat=' + searchData.center.lat() + '&lng=' + searchData.center.lng() + '&radius=' + searchData.radius + '&namequery=' + searchData.homeAddress + '&query_type=' + searchData.query_type  + '&limit=' + searchData.limit + '&sm_category=' + searchData.taxes.sm_category + '&sm_tag=' + searchData.taxes.sm_tag + '&locname=' + searchData.name + '&address=' + searchData.address + '&city=' + searchData.city + '&state=' + searchData.state + '&zip=' + searchData.zip + '&pid=978410';

							// Display Updating Message and hide search results
				if ( jQuery( "#simplemap" ).is(":visible") ) {
				jQuery( "#simplemap" ).hide();
				jQuery( "#simplemap-updating" ).show();
				}
						jQuery( "#results" ).html( '' );

			jQuery.get( searchUrl, {}, function(data) {
							// Hide Updating Message
				if ( jQuery( "#simplemap-updating" ).is(":visible") ) {
				jQuery( "#simplemap-updating" ).hide();
				jQuery( "#simplemap" ).show();
				}
			
			clearOverlays();

			var results = document.getElementById('results');
			results.innerHTML = '';

			var markers = jQuery( eval( data ) );
			if (markers.length == 0) {
			results.innerHTML = '<h3>' + noresults_text + '</h3>';
			map.setCenter( searchData.center );
			return;
			}

			var bounds = new google.maps.LatLngBounds();
			markers.each( function () {
			var locationData = this;
			locationData.distance = parseFloat(locationData.distance);
			locationData.point = new google.maps.LatLng(parseFloat(locationData.lat), parseFloat(locationData.lng));
			locationData.homeAddress = searchData.homeAddress;

			var marker = createMarker(locationData);
			var sidebarEntry = createSidebarEntry(marker, locationData, searchData);
			results.appendChild(sidebarEntry);
			bounds.extend(locationData.point);
			});

			// Make centeral marker on search
			if ( 'search' == searchData.source && true) {
			var searchMarkerOptions = {};
			searchMarkerOptions.map = map;
			searchMarkerOptions.position = searchData.center;

			searchMarkerOptions.icon = new google.maps.MarkerImage(
			'http://smartdrugtesting.com/wp-content/plugins/simplemap/inc/images/blue-dot.png',
			new google.maps.Size(20, 32),
			new google.maps.Point(0,0),
			new google.maps.Point(0,32)
			);

			var searchMarkerTitle = '';
			if ( '' != searchData.address ) {
			searchMarkerTitle += searchData.address + ' ';
			}
			if ( '' != searchData.city ) {
			searchMarkerTitle += searchData.city + ' ';
			}
			if ( '' != searchData.state ) {
			searchMarkerTitle += searchData.state + ' ';
			}
			if ( '' != searchData.zip ) {
			searchMarkerTitle += searchData.zip + ' ';
			}

			var searchMarker = new google.maps.Marker( searchMarkerOptions );
			searchMarker.title = searchMarkerTitle;
			markersArray.push(searchMarker);
			bounds.extend(searchMarkerOptions.position);
			}

			// If the search button was clicked, limit to a 15px zoom
			if ( 'search' == searchData.source ) {
			map.fitBounds( bounds );
			if ( map.getZoom() > 15 ) {
			map.setZoom( 15 );
			}
			} else {
			// If initial load of map, zoom to default settings
			map.setZoom(parseInt(zoom_level));
			}

			// Paranoia - fix container sizing bug -- pdb
			google.maps.event.addListener(map, "idle", function(){
			google.maps.event.trigger(map, 'resize');
			});
			});
			}

			function stringFilter(s) {
			filteredValues = "emnpxt%";     // Characters stripped out
			var i;
			var returnString = "";
			for (i = 0; i < s.length; i++) {  // Search through string and append to unfiltered values to returnString.
			var c = s.charAt(i);
			if (filteredValues.indexOf(c) == -1) returnString += c;
			}
			return returnString;
			}

			function createMarker( locationData ) {

			// Init tax heights
			locationData.taxonomyheights = [];

			// Allow plugin users to define Maker Options (including custom images)
			var markerOptions = {};
			if ( 'function' == typeof window.simplemapCustomMarkers ) {
			markerOptions = simplemapCustomMarkers( locationData );
			}

			// Allow developers to turn of description in bubble. (Return true to hide)
			
			markerOptions.map = map;
			markerOptions.position = locationData.point;
			var marker = new google.maps.Marker( markerOptions );
			marker.title = locationData.name;
			markersArray.push(marker);

			var mapwidth;
			var mapheight;
			var maxbubblewidth;
			var maxbubbleheight;

			mapwidth = document.getElementById("simplemap");
			if ( typeof mapwidth != 'undefined' ) {
			mapwidth = mapwidth.offsetWidth;
			} else {
			if ( typeof map_width != 'undefined' ) {
			mapwidth = Number(stringFilter(map_width));
			} else {
			mapwidth = 400;
			}
			}

			mapheight = document.getElementById("simplemap");
			if ( typeof mapheight != 'undefined' ) {
			mapheight = mapheight.offsetHeight;
			} else {
			if ( typeof map_height != 'undefined' ) {
			mapheight = Number(stringFilter(map_height));
			} else {
			mapheight = 200;
			}
			}
			maxbubblewidth = Math.round(mapwidth / 1.5);
			maxbubbleheight = Math.round(mapheight / 2.2);

			var fontsize = 12;
			var lineheight = 12;

			if (locationData.taxes.sm_category && locationData.taxes.sm_category != '' ) {
			var titleheight = 3 + Math.floor((locationData.name.length + locationData.taxes.sm_category.length) * fontsize / (maxbubblewidth * 1.5));
			} else {
			var titleheight = 3 + Math.floor((locationData.name.length) * fontsize / (maxbubblewidth * 1.5));
			}

			var addressheight = 2;
			if (locationData.address2 != '') {
			addressheight += 1;
			}
			if (locationData.phone != '' || locationData.fax != '') {
			addressheight += 1;
			if (locationData.phone != '') {
			addressheight += 1;
			}
			if (locationData.fax != '') {
			addressheight += 1;
			}
			}

			for (jstax in locationData.taxes) {
			if ( locationData.taxes[jstax] !== '' ) {
			locationData.taxonomyheights[jstax] = 3 + Math.floor((locationData.taxes[jstax][length]) * fontsize / (maxbubblewidth * 1.5));
			}
			}
			var linksheight = 2;

			var totalheight = titleheight + addressheight;
			for (jstax in locationData.taxes) {
			if ( 'sm_category' != jstax ) {
			totalheight += locationData.taxonomyheights[jstax];
			}
			}
			totalheight = (totalheight + 1) * fontsize;

			if (totalheight > maxbubbleheight) {
			totalheight = maxbubbleheight;
			}

			if ( isNaN( totalheight ) || totalheight > maxbubbleheight ) {
			totalheight = maxbubbleheight;
			}

			var html = '<div class="markertext" style="background-color:#fff;padding:10px;max-width: ' + maxbubblewidth + 'px; height: ' + totalheight + 'px; overflow-y: auto; overflow-x: hidden;">';
				html += '<h3 style="margin-top: 0; padding-top: 0; border-top: none;">';

				if ( '' != locationData.permalink ) {
					html += '<a href="' + locationData.permalink + '">';
				}
				html += locationData.name;

				if ( '' != locationData.permalink ) {
					html += '</a>';
				}

				if (locationData.taxes.sm_category && locationData.taxes.sm_category != null && locationData.taxes.sm_category != '' ) {
					html += '<br /><span class="bubble_category">' + locationData.taxes.sm_category + '</span>';
				}

				html += '</h3>';

				html += '<p class="buble_address">' + locationData.address;
				if (locationData.address2 != '') {
					html += '<br />' + locationData.address2;
				}

				// Address Data
				if (address_format == 'town, province postalcode') {
					html += '<br />' + locationData.city + ', ' + locationData.state + ' ' + locationData.zip + '</p>';
				} else if (address_format == 'town province postalcode') {
					html += '<br />' + locationData.city + ' ' + locationData.state + ' ' + locationData.zip + '</p>';
				} else if (address_format == 'town-province postalcode') {
					html += '<br />' + locationData.city + '-' + locationData.state + ' ' + locationData.zip + '</p>';
				} else if (address_format == 'postalcode town-province') {
					html += '<br />' + locationData.zip + ' ' + locationData.city + '-' + locationData.state + '</p>';
				} else if (address_format == 'postalcode town, province') {
					html += '<br />' + locationData.zip + ' ' + locationData.city + ', ' + locationData.state + '</p>';
				} else if (address_format == 'postalcode town') {
					html += '<br />' + locationData.zip + ' ' + locationData.city + '</p>';
				} else if (address_format == 'town postalcode') {
					html += '<br />' + locationData.city + ' ' + locationData.zip + '</p>';
				}

				// Phone and Fax Data
				if (locationData.phone != null && locationData.phone != '') {
					html += '<p class="bubble_contact"><span class="bubble_phone">' + phone_text + ': ' + locationData.phone + '</span>';
					if (locationData.email != null && locationData.email != '') {
						html += '<br />' + email_text + ': <a class="bubble_email" href="mailto:' + locationData.email + '">' + locationData.email + '</a>';
					}
					if (locationData.fax != null && locationData.fax != '') {
						html += '<br /><span class="bubble_fax">' + fax_text + ': ' + locationData.fax + '</span>';
					}
					html += '</p>';
				} else if (locationData.fax != null && locationData.fax != '') {
					html += '<p>' + fax_text + ': ' + locationData.fax + '</p>';
				}

				html += '<p class="bubble_tags">';

				for (jstax in locationData.taxes) {
					if ( 'sm_category' == jstax ) {
						continue;
					}
					if ( locationData.taxes[jstax] != null && locationData.taxes[jstax] != '' ) {
						html += taxonomy_text[jstax] + ': ' + locationData.taxes[jstax] + '<br />';
					}
				}
				html += '</p>';

					var dir_address = locationData.point.toUrlValue(10);
					var dir_address2 = '';
					if (locationData.address) { dir_address2 += locationData.address; }
					if (locationData.city) { if ( '' != dir_address2 ) { dir_address2 += ' '; } dir_address2 += locationData.city; };
					if (locationData.state) { if ( '' != dir_address2 ) { dir_address2 += ' '; } dir_address2 += locationData.state; };
					if (locationData.zip) { if ( '' != dir_address2 ) { dir_address2 += ' '; } dir_address2 += locationData.zip; };
					if (locationData.country) { if ( '' != dir_address2 ) { dir_address2 += ' '; } dir_address2 += locationData.country; };

					if ( '' != dir_address2 ) { dir_address = locationData.point.toUrlValue(10) + '(' + escape( dir_address2 ) + ')'; };

				html += '		<p class="bubble_links"><a class="bubble_directions" href="http://google' + default_domain + '/maps?saddr=' + locationData.homeAddress + '&daddr=' + dir_address + '" target="_blank">' + get_directions_text + '</a>';
								if (locationData.url != '') {
				html += '			<span class="bubble_website">&nbsp;|&nbsp;<a href="' + locationData.url + '" title="' + locationData.name + '" target="_blank">' + visit_website_text + '</a></span>';
								}
				html += '		</p>';

				if (locationData.description != '' && locationData.description != null) {
					var numlines = Math.ceil(locationData.description.length / 40);
					var newlines = locationData.description.split('<br />').length - 1;
					var totalheight2 = 0;

					if ( locationData.description.indexOf('<img') == -1) {
						totalheight2 = (numlines + newlines + 1) * fontsize;
					}
					else {
						var numberindex = locationData.description.indexOf('height=') + 8;
						var numberend = locationData.description.indexOf('"', numberindex);
						var imageheight = Number(locationData.description.substring(numberindex, numberend));

						totalheight2 = ((numlines + newlines - 2) * fontsize) + imageheight;
					}

					if (totalheight2 > maxbubbleheight) {
						totalheight2 = maxbubbleheight;
					}

					//marker.openInfoWindowTabsHtml([new GInfoWindowTab(location_tab_text, html), new GInfoWindowTab(description_tab_text, html2)], {maxWidth: maxbubblewidth});
					// tabs aren't possible with the Google Maps api v3
					html += '<hr /><div class="bubble_content">' + locationData.description + '</div>';
				}

				html += '	</div>';
/**
 * @name InfoBox
 * @version 1.1.13 [March 19, 2014]
 * @author Gary Little (inspired by proof-of-concept code from Pamela Fox of Google)
 * @copyright Copyright 2010 Gary Little [gary at luxcentral.com]
 */
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('7 8(a){a=a||{};r.s.1R.2k(2,3d);2.Q=a.1v||"";2.1H=a.1B||J;2.S=a.1G||0;2.H=a.1z||1h r.s.1Y(0,0);2.B=a.U||1h r.s.2E(0,0);2.15=a.13||t;2.1p=a.1t||"2h";2.1m=a.F||{};2.1E=a.1C||"3g";2.P=a.1j||"3b://38.r.33/2Y/2T/2N/1r.2K";3(a.1j===""){2.P=""}2.1f=a.1x||1h r.s.1Y(1,1);3(q a.A==="p"){3(q a.18==="p"){a.A=L}v{a.A=!a.18}}2.w=!a.A;2.17=a.1n||J;2.1I=a.2g||"2e";2.16=a.1l||J;2.4=t;2.z=t;2.14=t;2.V=t;2.E=t;2.R=t}8.9=1h r.s.1R();8.9.25=7(){5 i;5 f;5 a;5 d=2;5 c=7(e){e.20=L;3(e.1i){e.1i()}};5 b=7(e){e.30=J;3(e.1Z){e.1Z()}3(!d.16){c(e)}};3(!2.4){2.4=1e.2S("2Q");2.1d();3(q 2.Q.1u==="p"){2.4.O=2.G()+2.Q}v{2.4.O=2.G();2.4.1a(2.Q)}2.2J()[2.1I].1a(2.4);2.1w();3(2.4.6.D){2.R=L}v{3(2.S!==0&&2.4.Z>2.S){2.4.6.D=2.S;2.4.6.2D="2A";2.R=L}v{a=2.1P();2.4.6.D=(2.4.Z-a.W-a.11)+"12";2.R=J}}2.1F(2.1H);3(!2.16){2.E=[];f=["2t","1O","2q","2p","1M","2o","2n","2m","2l"];1o(i=0;i<f.1L;i++){2.E.1K(r.s.u.19(2.4,f[i],c))}2.E.1K(r.s.u.19(2.4,"1O",7(e){2.6.1J="2j"}))}2.V=r.s.u.19(2.4,"2i",b);r.s.u.T(2,"2f")}};8.9.G=7(){5 a="";3(2.P!==""){a="<2d";a+=" 2c=\'"+2.P+"\'";a+=" 2b=11";a+=" 6=\'";a+=" U: 2a;";a+=" 1J: 29;";a+=" 28: "+2.1E+";";a+="\'>"}K a};8.9.1w=7(){5 a;3(2.P!==""){a=2.4.3n;2.z=r.s.u.19(a,"1M",2.27())}v{2.z=t}};8.9.27=7(){5 a=2;K 7(e){e.20=L;3(e.1i){e.1i()}r.s.u.T(a,"3m");a.1r()}};8.9.1F=7(d){5 m;5 n;5 e=0,I=0;3(!d){m=2.1D();3(m 3l r.s.3k){3(!m.26().3h(2.B)){m.3f(2.B)}n=m.26();5 a=m.3e();5 h=a.Z;5 f=a.24;5 k=2.H.D;5 l=2.H.1k;5 g=2.4.Z;5 b=2.4.24;5 i=2.1f.D;5 j=2.1f.1k;5 o=2.23().3c(2.B);3(o.x<(-k+i)){e=o.x+k-i}v 3((o.x+g+k+i)>h){e=o.x+g+k+i-h}3(2.17){3(o.y<(-l+j+b)){I=o.y+l-j-b}v 3((o.y+l+j)>f){I=o.y+l+j-f}}v{3(o.y<(-l+j)){I=o.y+l-j}v 3((o.y+b+l+j)>f){I=o.y+b+l+j-f}}3(!(e===0&&I===0)){5 c=m.3a();m.39(e,I)}}}};8.9.1d=7(){5 i,F;3(2.4){2.4.37=2.1p;2.4.6.36="";F=2.1m;1o(i 35 F){3(F.34(i)){2.4.6[i]=F[i]}}2.4.6.32="31(0)";3(q 2.4.6.X!=="p"&&2.4.6.X!==""){2.4.6.2Z="\\"2X:2W.2V.2U(2R="+(2.4.6.X*1X)+")\\"";2.4.6.2P="2O(X="+(2.4.6.X*1X)+")"}2.4.6.U="2M";2.4.6.M=\'1c\';3(2.15!==t){2.4.6.13=2.15}}};8.9.1P=7(){5 c;5 a={1b:0,1g:0,W:0,11:0};5 b=2.4;3(1e.1s&&1e.1s.1W){c=b.2L.1s.1W(b,"");3(c){a.1b=C(c.1V,10)||0;a.1g=C(c.1U,10)||0;a.W=C(c.1T,10)||0;a.11=C(c.1S,10)||0}}v 3(1e.2I.N){3(b.N){a.1b=C(b.N.1V,10)||0;a.1g=C(b.N.1U,10)||0;a.W=C(b.N.1T,10)||0;a.11=C(b.N.1S,10)||0}}K a};8.9.2H=7(){3(2.4){2.4.2G.2F(2.4);2.4=t}};8.9.1y=7(){2.25();5 a=2.23().2C(2.B);2.4.6.W=(a.x+2.H.D)+"12";3(2.17){2.4.6.1g=-(a.y+2.H.1k)+"12"}v{2.4.6.1b=(a.y+2.H.1k)+"12"}3(2.w){2.4.6.M="1c"}v{2.4.6.M="A"}};8.9.2B=7(a){3(q a.1t!=="p"){2.1p=a.1t;2.1d()}3(q a.F!=="p"){2.1m=a.F;2.1d()}3(q a.1v!=="p"){2.1Q(a.1v)}3(q a.1B!=="p"){2.1H=a.1B}3(q a.1G!=="p"){2.S=a.1G}3(q a.1z!=="p"){2.H=a.1z}3(q a.1n!=="p"){2.17=a.1n}3(q a.U!=="p"){2.1q(a.U)}3(q a.13!=="p"){2.22(a.13)}3(q a.1C!=="p"){2.1E=a.1C}3(q a.1j!=="p"){2.P=a.1j}3(q a.1x!=="p"){2.1f=a.1x}3(q a.18!=="p"){2.w=a.18}3(q a.A!=="p"){2.w=!a.A}3(q a.1l!=="p"){2.16=a.1l}3(2.4){2.1y()}};8.9.1Q=7(a){2.Q=a;3(2.4){3(2.z){r.s.u.Y(2.z);2.z=t}3(!2.R){2.4.6.D=""}3(q a.1u==="p"){2.4.O=2.G()+a}v{2.4.O=2.G();2.4.1a(a)}3(!2.R){2.4.6.D=2.4.Z+"12";3(q a.1u==="p"){2.4.O=2.G()+a}v{2.4.O=2.G();2.4.1a(a)}}2.1w()}r.s.u.T(2,"2z")};8.9.1q=7(a){2.B=a;3(2.4){2.1y()}r.s.u.T(2,"21")};8.9.22=7(a){2.15=a;3(2.4){2.4.6.13=a}r.s.u.T(2,"2y")};8.9.2x=7(a){2.w=!a;3(2.4){2.4.6.M=(2.w?"1c":"A")}};8.9.2w=7(){K 2.Q};8.9.1A=7(){K 2.B};8.9.2v=7(){K 2.15};8.9.2u=7(){5 a;3((q 2.1D()==="p")||(2.1D()===t)){a=J}v{a=!2.w}K a};8.9.3i=7(){2.w=J;3(2.4){2.4.6.M="A"}};8.9.3j=7(){2.w=L;3(2.4){2.4.6.M="1c"}};8.9.2s=7(c,b){5 a=2;3(b){2.B=b.1A();2.14=r.s.u.2r(b,"21",7(){a.1q(2.1A())})}2.1N(c);3(2.4){2.1F()}};8.9.1r=7(){5 i;3(2.z){r.s.u.Y(2.z);2.z=t}3(2.E){1o(i=0;i<2.E.1L;i++){r.s.u.Y(2.E[i])}2.E=t}3(2.14){r.s.u.Y(2.14);2.14=t}3(2.V){r.s.u.Y(2.V);2.V=t}2.1N(t)};',62,210,'||this|if|div_|var|style|function|InfoBox|prototype||||||||||||||||undefined|typeof|google|maps|null|event|else|isHidden_|||closeListener_|visible|position_|parseInt|width|eventListeners_|boxStyle|getCloseBoxImg_|pixelOffset_|yOffset|false|return|true|visibility|currentStyle|innerHTML|closeBoxURL_|content_|fixedWidthSet_|maxWidth_|trigger|position|contextListener_|left|opacity|removeListener|offsetWidth||right|px|zIndex|moveListener_|zIndex_|enableEventPropagation_|alignBottom_|isHidden|addDomListener|appendChild|top|hidden|setBoxStyle_|document|infoBoxClearance_|bottom|new|stopPropagation|closeBoxURL|height|enableEventPropagation|boxStyle_|alignBottom|for|boxClass_|setPosition|close|defaultView|boxClass|nodeType|content|addClickHandler_|infoBoxClearance|draw|pixelOffset|getPosition|disableAutoPan|closeBoxMargin|getMap|closeBoxMargin_|panBox_|maxWidth|disableAutoPan_|pane_|cursor|push|length|click|setMap|mouseover|getBoxWidths_|setContent|OverlayView|borderRightWidth|borderLeftWidth|borderBottomWidth|borderTopWidth|getComputedStyle|100|Size|preventDefault|cancelBubble|position_changed|setZIndex|getProjection|offsetHeight|createInfoBoxDiv_|getBounds|getCloseClickHandler_|margin|pointer|relative|align|src|img|floatPane|domready|pane|infoBox|contextmenu|default|apply|touchmove|touchend|touchstart|dblclick|mouseup|mouseout|addListener|open|mousedown|getVisible|getZIndex|getContent|setVisible|zindex_changed|content_changed|auto|setOptions|fromLatLngToDivPixel|overflow|LatLng|removeChild|parentNode|onRemove|documentElement|getPanes|gif|ownerDocument|absolute|mapfiles|alpha|filter|div|Opacity|createElement|en_us|Alpha|Microsoft|DXImageTransform|progid|intl|MsFilter|returnValue|translateZ|WebkitTransform|com|hasOwnProperty|in|cssText|className|www|panBy|getCenter|http|fromLatLngToContainerPixel|arguments|getDiv|setCenter|2px|contains|show|hide|Map|instanceof|closeclick|firstChild'.split('|'),0,{}));

				google.maps.event.addListener(marker, 'click', function() {
					clearInfoWindows();
					var infowidth = 0;
					if ( maxbubblewidth <= 100 ) {
						infowidth = document.getElementById("simplemap");
						if ( typeof infowidth != 'undefined' ) {
							infowidth = infowidth.offsetWidth;
						} else {
							infowidth = 400;
						}
					    infowidth = infowidth * (maxbubblewidth / 100.0);
					}
					if ( infowidth < maxbubblewidth ) infowidth = maxbubblewidth;
					infowidth = parseInt(infowidth) + 'px';
/*
					var infowindow = new google.maps.InfoWindow({
						maxWidth: infowidth,
						content: html
					});
*/

					var infowindow = new InfoBox({
						maxWidth: infowidth
						,content: html
		,disableAutoPan: false
		,pixelOffset: new google.maps.Size(-80,-80)
		,alignBottom: true
		,zIndex: null
		,boxStyle: {
		  opacity: 1.0
		 ,fontSize:'11pt'
		 }
		,closeBoxURL: "http://www.google.com/intl/en_us/mapfiles/close.gif"
		,infoBoxClearance: new google.maps.Size(1, 1)
		,isHidden: false
		,pane: "floatPane"
		,enableEventPropagation: true

					});
					infowindow.open(map, marker);
					infowindowsArray.push(infowindow);
					window.location = '#map_top';
				});

				return marker;
			}

			function createSidebarEntry(marker, locationData, searchData) {
				var div = document.createElement('div');

				// Beginning of result
				var html = '<div id="location_' + locationData.postid + '" class="result">';

				// Flagged special
				if (locationData.special == 1 && special_text != '') {
					html += '<div class="special">' + special_text + '</div>';
				}

				// Name & distance
				html += '<div class="result_name">';
				html += '<h3 style="margin-top: 0; padding-top: 0; border-top: none;">';
				if (locationData.permalink != null && locationData.permalink != '') {
					html += '<a href="' + locationData.permalink + '">';
				}
				html += locationData.name;
				if (locationData.permalink != null && locationData.permalink != '') {
					html += '</a>';
				}

				if (locationData.distance.toFixed(1) != 'NaN') {
					if (units == 'mi') {
						html+= ' <small class="result_distance">' + locationData.distance.toFixed(1) + ' miles</small>';
					}
					else if (units == 'km') {
						html+= ' <small class="result_distance">' + (locationData.distance * 1.609344).toFixed(1) + ' km</small>';
					}
				}
				html += '</h3></div>';

				// Address
				html += '<div class="result_address"><address>' + locationData.address;
				if (locationData.address2 != '') {
					html += '<br />' + locationData.address2;
				}

				if (address_format == 'town, province postalcode') {
					html += '<br />' + locationData.city + ', ' + locationData.state + ' ' + locationData.zip + '</address></div>';
				}
				else if (address_format == 'town province postalcode') {
					html += '<br />' + locationData.city + ' ' + locationData.state + ' ' + locationData.zip + '</address></div>';
				}
				else if (address_format == 'town-province postalcode') {
					html += '<br />' + locationData.city + '-' + locationData.state + ' ' + locationData.zip + '</address></div>';
				}
				else if (address_format == 'postalcode town-province') {
					html += '<br />' + locationData.zip + ' ' + locationData.city + '-' + locationData.state + '</address></div>';
				}
				else if (address_format == 'postalcode town, province') {
					html += '<br />' + locationData.zip + ' ' + locationData.city + ', ' + locationData.state + '</address></div>';
				}
				else if (address_format == 'postalcode town') {
					html += '<br />' + locationData.zip + ' ' + locationData.city + '</address></div>';
				}
				else if (address_format == 'town postalcode') {
					html += '<br />' + locationData.city + ' ' + locationData.zip + '</address></div>';
				}

				// Phone, email, and fax numbers
				html += '<div class="result_phone">';
				if (locationData.phone != null && locationData.phone != '') {
                html += '<span class="result_phone"><a class="btn btn-small btn-primary" href="tel:' + locationData.phone + '"><span><i class="fa fa-phone-square"></i>  ' + locationData.phone + '</span></a></span>';
				}
				if (locationData.email != null && locationData.email != '') {
					html += '<span class="result_email">' + email_text + ': <a href="mailto:' + locationData.email + '">' + locationData.email + '</a></span>';
				}
				if (locationData.fax != null && locationData.fax != '') {
					html += '<span class="result_fax">' + fax_text + ': ' + locationData.fax + '</span>';
				}
				html += '</div>';

				// Links section
				html += '<div class="result_links">';

				// Visit Website link
				html += '<div class="result_website">';
				if (locationData.url != null && locationData.url != 'http://' && locationData.url != '') {
					html += '<a class="btn btn-small btn-warning" href="' + locationData.url + '" title="' + locationData.name + '" target="_blank">' + visit_website_text + '</a>';
				}
				html += '</div>';

				// Get Directions link
				if (locationData.distance.toFixed(1) != 'NaN') {
					var dir_address = locationData.point.toUrlValue(10);
					var dir_address2 = '';
					if (locationData.address) { dir_address2 += locationData.address; }
					if (locationData.city) { if ( '' != dir_address2 ) { dir_address2 += ' '; } dir_address2 += locationData.city };
					if (locationData.state) { if ( '' != dir_address2 ) { dir_address2 += ' '; } dir_address2 += locationData.state };
					if (locationData.zip) { if ( '' != dir_address2 ) { dir_address2 += ' '; } dir_address2 += locationData.zip };
					if (locationData.country) { if ( '' != dir_address2 ) { dir_address2 += ' '; } dir_address2 += locationData.country };
					if ( '' != dir_address2 ) { dir_address += '(' + escape( dir_address2 ) + ')' };

					html += '<a class="result_directions" href="http://google' + default_domain + '/maps?saddr=' + searchData.homeAddress + '&daddr=' + dir_address + '" target="_blank">' + get_directions_text + '</a>';
				}
				html += '</div>';
				html += '<div style="clear: both;"></div>';

				
				// Taxonomy lists
				for (jstax in locationData.taxes) {
					if ( locationData.taxes[jstax] != null && locationData.taxes[jstax] != '' ) {
						html += '<div class="' + jstax + '_list"><small><strong>' + taxonomy_text[jstax] + ':</strong> ' + locationData.taxes[jstax] + '</small></div>';
					}
				}

				// End of result
				html += '</div>';

				div.innerHTML = html;
				div.style.cursor = 'pointer';
				div.style.margin = 0;
				google.maps.event.addDomListener(div, 'click', function() {
					google.maps.event.trigger(marker, 'click');
				});
				return div;
			}
			