(function($) {
    
    $.fn.menuSeparators = function(options){
        
        // default configuration properties
        var defaults = {
            separatorText:        '<li class="separator">|</li>',
            showLastSeparator:    false
        };
        
        var options = $.extend(defaults, options);  
        
        var max = this.length - 1;
        var index = 0;
        
        this.each(function() {
            index++;
            if (options.showLastSeparator || index <= max) {
                $(this).after(options.separatorText);
            }
        });
        
    }

})(jQuery);
