", initialize: function () { this.setup(); }, /** * Setup method * * @returns {void} */ setup: function () { this._alignEvents(); }, _alignEvents: function () { // Lets start by getting all active days in the current calendar var days = this.scope.find('.cCalendar_date'); var currentPositions = []; var self = this; _.each( days, function (day) { var day = $( day ); var dayNumber = day.find('.cCalendar_dayNumber').text(); var weekStart = false; if( day.closest('td').is('tr > td:first-child') ){ weekStart = true; } // Get events for this day var events = day.find('.cEvents_ranged [data-eventID]'); // If there's no events, we can skip this day if( !events.length ){ currentPositions = []; return; } // Build a wrapper into which we'll move our events var wrapper = $("