function (days, textColor, bgColor) { var nodes = $('td', this).not('.z-outside'); nodes.each(function () { var day = parseInt($(this).attr('_dt')); if (jQuery.inArray(day, days) > -1) { $(this).css({color: textColor, backgroundColor: bgColor}); } }); } function () { var nodes = $('td', this).not('.z-outside'); nodes.each(function () { $(this).css({color: "black", backgroundColor: "white"}); }); }