﻿$(document).ready(function () {
    $.fn.equalizeLiColumns = function () {
        var $container = $(this);
        var maxHeight = $container.height();
        var $tabs = $(this).children('li');

        setHeightOfChildrenLis($container)

        function setHeightOfChildrenLis($container) {
            var i = 0;
            $container.children('li').each(function () {
                $(this).height(maxHeight);

                if (i == 0) {
                    $(this).addClass('left');
                } else if (i > 0 && i < $tabs.length - 1) {
                    $(this).addClass('middle');
                } else $(this).addClass('right');

                i++;
                
            });
        };
    };
});
