(function($){
$.fn.listalign = function(options){
    var defaults = {
        height: 'auto',
        listselector: 'li',
        indexattr: 'itemindex',
        spacing: 10
    };

    var options = $.extend(defaults, options);

    return this.each(function(){
        obj = $(this);

        var lists = obj.children(options.listselector);

//        if(lists.length > 1){
            max = 0;

            //Determine maximum list item count
            lists.each(function(){
                thelist = $(this);
                max = thelist.children().length > max ? thelist.children().length : max;
            });

            for(i = 0; i < max; i++){
                rowheight = 0;
                lists.each(function(){
                    thelist = $(this);
                    children = thelist.children();
                    if(i < children.length){

                        listitem = $(this).children(':eq(' + i + ')');

                        rowheight = listitem.height() > rowheight ? listitem.height() : rowheight;

                        listitem.addClass('listalign' + i);

                        //alert(item.html());
                    }
                });

                $('.listalign' + i).height(rowheight + options.spacing);
            }

        //}
    });
};
})(jQuery);
