var markers = (function($, L, document) {
    var clusterMarkers = {
        _markerMap: null,
        _defaultIcon: null,
        _activeIcon: null,
        activateMarker: function(id) {
            var activeMarker = this._markerMap[id];
            var activeIcon = this._activeIcon;
            this.zoomToShowLayer(activeMarker, function(){
                activeMarker.setIcon(activeIcon);
            });
        },
        deactivateMarker: function(id) {
            var previousActiveMarker = this._markerMap[id];  
            if (previousActiveMarker) {
                previousActiveMarker.setIcon(this._defaultIcon);
            }
        }
    };

    function ProjectMarkers() {
        var projectMarkers = L.MarkerClusterGroup.extend({
            includes: clusterMarkers,
            initialize: function(options) {
                this._markerMap = {};
                this._defaultIcon = new L.Icon.Default();
                this._activeIcon = new L.Icon.Default({iconUrl: 
                                             './images/marker-icon-red.png'});
                L.MarkerClusterGroup.prototype.initialize.call(this, options);        
            },
            addMarkers: function(geojson) {
                var that = this;
                var geoJsonLayer = L.geoJson(geojson, { 
                    pointToLayer: function(feature, latlng) {
                        var marker = L.marker(latlng, {id: feature.id});
                        var activeIcon = that._activeIcon;
                        marker.on('click', function() {
                            this.setIcon(activeIcon);
                            $(document).trigger('projectMarkerClick', [this.options.id]);
                        });
                        that._markerMap[feature.id] = marker;
                        return marker;
                    }
                });
                this.addLayer(geoJsonLayer);
            }
        });
        return new projectMarkers();
    }

    function ArticleMarkers() {
        var articleMarkers = L.MarkerClusterGroup.extend({
            includes: clusterMarkers,
            initialize: function(options) {
                this._markerMap = {};
                this._defaultIcon = new L.Icon.Default();
                this._activeIcon = new L.Icon.Default({iconUrl: 
                                             './images/marker-icon-red.png'});
                L.MarkerClusterGroup.prototype.initialize.call(this, options);        
            },
            addMarker: function(index, lat, lon) {
                var latlng = new L.LatLng(lat, lon);
                var marker = L.marker(latlng, {id: index});
                var activeIcon = this._activeIcon;
                marker.on('click', function() {
                    this.setIcon(activeIcon);
                    $(document).trigger('articleMarkerClick', [this.options.id]);
                }); 
                this._markerMap[index] = marker;
                this.addLayer(marker);
            }
        });
        return new articleMarkers();
    }

    function EarthquakeMarkers() {
        var earthquakeMarkers = L.GeoJSON.extend({
            _markerMap: {},
            initialize: function(data, options) {
                L.GeoJSON.prototype.initialize.call(this,data, {
                    onEachFeature: L.Util.bind(this._onEachFeature, this)
                });
            },
            options: {
                    pointToLayer: function(feature, latlng) {
                        return L.circleMarker(latlng, {radius: 10});
                    }
                },
                _onEachFeature: function(feature, layer) {
                    this._markerMap[feature.id] = layer;
                }
            });
            return new earthquakeMarkers(null);
    }

    return {
        ProjectMarkers: ProjectMarkers,
        ArticleMarkers: ArticleMarkers,
        EarthquakeMarkers: EarthquakeMarkers
    };
})($, L, this.document);

@@ -660,149 +660,15 @@
  %7D;%0A
-%0A    function ProjectMarkers() %7B%0A        var projectMarkers = L.MarkerClusterGroup.extend(%7B%0A            includes: clusterMarkers,%0A       
     
+var
  ini
@@ -666,33 +666,34 @@
   var initialize
-:
+ =
  function(option
@@ -1024,33 +1024,190 @@
        %0A    
-        %7D
+%7D;%0A    function ProjectMarkers() %7B%0A        var projectMarkers = L.MarkerClusterGroup.extend(%7B%0A            includes: clusterMarkers,%0A            initialize: initialize
 ,%0A          
@@ -1992,32 +1992,123 @@
  projectMarkers(
+%7BspiderfyDistanceMultiplier:1,%0A                                  showCoverageOnHover:false%7D
 );%0A    %7D%0A%0A    fu
@@ -2258,368 +2258,18 @@
 ze: 
-function(options) %7B%0A                this._markerMap = %7B%7D;%0A                this._defaultIcon = new L.Icon.Default();%0A                this._activeIcon = new L.Icon.Default(%7BiconUrl: %0A                                             './images/marker-icon-red.png'%7D);%0A                L.MarkerClusterGroup.prototype.initialize.call(this, options);        %0A            %7D
+initialize
 ,%0A  
@@ -2784,32 +2784,32 @@
   %7D%0A        %7D);%0A
-
         return n
@@ -2826,16 +2826,107 @@
 Markers(
+%7BspiderfyDistanceMultiplier:1,%0A                                  showCoverageOnHover:false%7D
 );%0A    %7D

Refactor marker initialization