<commit_before>(function(){

	var map, mapOptions, mapDiv;

	function initialize() {

		mapOptions = {
			center: new google.maps.LatLng( 40.7347809539, -111.916627902 ),
			zoom: 10
		};

		mapDiv = document.getElementById( 'store-map' );

		map = new google.maps.Map( mapDiv, mapOptions );

		if ( ! _.isUndefined( storeLocations ) ) {

			_.each( storeLocations, function( store, i ) {

				var storeLat = parseFloat( store.lat );
				var storeLng = parseFloat( store.lng );
				var position = new google.maps.LatLng( storeLat, storeLng );

				var marker = new google.maps.Marker( {
					position: position,
					title: store.name,
					map: map
				} );

			} );

		}

	}

	if ( 'undefined' !== typeof( google ) ) {

		google.maps.event.addDomListener(window, 'load', initialize);

	}

})();<commit_msg>Add store details on marker click.<commit_after>(function(){

	var map, mapOptions, mapDiv, markers, infoWindow;
	
	var infoWindowTemplate = _.template(
		'<div id="store-info-window">' +
			'<div>' +
				'<a href="<%= permalink %>">' +
					'<%= image %>' +
				'</a>' +
			'</div>' +
			'<div class="store-details">' +
				'<h4><a href="<%= permalink %>"><%= name %></a></h4>' +
				'<a href="<%= telLink %>"><%= phoneNumber %></a>' +
				'<p><%= hours %></p>' +
			'</div>' +
		'</div>'
	);

	function initialize() {

		mapOptions = {
			center: new google.maps.LatLng( 40.7347809539, -111.916627902 ),
			zoom: 10
		};

		mapDiv = document.getElementById( 'store-map' );

		map = new google.maps.Map( mapDiv, mapOptions );

		infoWindow = new google.maps.InfoWindow( {
			maxWidth: 400
		} );

		if ( ! _.isUndefined( storeLocations ) ) {

			markers = _.map( storeLocations, function( store, idx ) {

				var storeLat = parseFloat( store.latitude );
				var storeLng = parseFloat( store.longitude );
				var position = new google.maps.LatLng( storeLat, storeLng );

				var marker = new google.maps.Marker( {
					position: position,
					title: store.name,
					map: map
				} );

				google.maps.event.addListener( marker, 'click', function() {
					openStoreInfo( idx );
				} );

				return marker;

			} );

		}

	}

	function openStoreInfo( markerIdx ) {

		infoWindow.close();
		infoWindow.setContent( infoWindowTemplate( storeLocations[markerIdx] ) );
		infoWindow.open( map, markers[markerIdx] );

	}

	if ( 'undefined' !== typeof( google ) ) {

		google.maps.event.addDomListener(window, 'load', initialize);

	}

})();
{'fraction_non_alphanumeric': 0.17403767403767403, 'fraction_numerical': 0.02334152334152334, 'mean_word_length': 3.0716666666666668, 'pattern_counts': {'":': 0, '<': 26, '<?xml version=': 0, '>': 26, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6958860', 'n_tokens_mistral': 1049, 'n_tokens_neox': 830, 'n_words': 184}