(function ($) {
    $.fn.firstLastChild = function (options) {

        var defaults = {
            firstClass: 'first-child',
            lastClass: 'last-child'
        };
        var options = $.extend(defaults, options);

        return this.each(function () {
            if ($(this).is(':first-child')) { $(this).addClass(options.firstClass); }
            else if ($(this).is(':last-child')) { $(this).addClass(options.lastClass); }
        });
    };
})(jQuery);
