I want to display the current time in the full jquery calendar as long as slotMinutes is 15


Below is my code for review
$.createFullCalendarWithCurrentTime = function (selectCallback, eventsCallback, mouseOverCallback, options, eventRenderCallback, curTime) {
var mintime = 7;
var maxtime = 22;
var slotsTable = undefined;
var calendar = undefined;
calendar = $('#calendar').fullCalendar({
unselectAuto: false,
header: { left: 'prev', center: 'title', right: 'next' },
titleFormat: { week: "MMMM dd, yyyy{ - MMMM dd, yyyy}" },
defaultView: "agendaWeek",
columnFormat: { week: 'dddd' },
eventBackgroundColor: options && options["eventBackgroundColor"] ? options["eventBackgroundColor"] : "#FFEB00",
eventBorderColor: "#FFEB00",
eventTextColor: options && options["eventTextColor"] ? options["eventTextColor"] : "#333333",
axisFormat: 'h(:mm) tt',
aspectRatio: 0.1,
buttonText: { prev: '', next: '' },
selectable: (selectCallback != null && $.isFunction(selectCallback) ? true : false),
selectHelper: true,
editable: false,
allDaySlot: false,
slotMinutes: 15,
minTime: 7,
maxTime: 22,
firstDay: 1,
eventMouseover: mouseOverCallback,
viewDisplay: function () {
if (!slotsTable) {
for (var i = 0; i < maxtime - mintime; i++) {
$(".fc-slot" + (i * 2 + (i * 2 + 2)) + ".fc-minor>th").html(((mintime + i) < 12 ? (mintime + i) : ((mintime + i) == 12) ? 12 : (mintime + i) % 12) + ":30 " + (mintime + i < 12 ? "am" : "pm"));
$(".fc-slot" + (i * 2 + (i * 2 + 2)) + ".fc-minor>th").addClass("innerHours");
}
slotsTable = $(".fc-agenda-slots").clone();
slotsTable.addClass("cloned");
slotsTable
.css("position", "absolute")
.css("top", "-12px")
.css("z-index", "-100");
$(".fc-agenda-slots th").css("visibility", "hidden");
slotsTable.find("td").css("visibility", "hidden");
$("#minTime").html(mintime + " am");
$("#maxTime").html(maxtime % 12 + " pm");
}
$(".fc-agenda-slots").parent().append(slotsTable);
$(".fc-slot0>th").html("");
var offset = slotsTable.find(".fc-slot0>th").offset();
$(".septimo").css("top", offset.top);
$(".septimo").css("left", offset.left);
$(".septimo").css("width", slotsTable.find(".fc-slot0>th").width());
offset = slotsTable.find("tr:last-child>th").offset();
$(".veintidos").css("top", offset.top + slotsTable.find("tr:last-child>th").height());
$(".veintidos").css("left", offset.left);
$(".veintidos").css("width", slotsTable.find("tr:last-child>th").width());
try {
setTimeline();
} catch (err) { }
},
select: selectCallback,
events: eventsCallback,
eventRender: eventRenderCallback
});
return calendar;
};
function setTimeline(view) {
var parentDiv = jQuery(".fc-agenda-slots:visible").parent();
var timeline = parentDiv.children(".timeline");
if (timeline.length == 0) {
timeline = jQuery("<hr>").addClass("timeline");
parentDiv.prepend(timeline);
}
var curTime = new Date();
var curCalView = jQuery("#calendar").fullCalendar('getView');
if (curCalView.visStart < curTime && curCalView.visEnd > curTime) {
timeline.show();
} else {
timeline.hide();
return;
}
var curSeconds = (curTime.getHours() * 60 * 60) + (curTime.getMinutes() * 60) + curTime.getSeconds();
var percentOfDay = curSeconds / 86400;
var hgt = parentDiv.height();
var topLoc = Math.floor(parentDiv.height() * percentOfDay);
timeline.css("top", topLoc + "px");
if (curCalView.name == "agendaWeek") {
var dayCol = jQuery(".fc-today:visible");
var left = dayCol.position().left + 1;
var width = dayCol.width() - 2;
timeline.css({
});
}
};