﻿$(document).ready(function(){        
        if(!$.browser.msie)
        {
            var tbody = $('#scrollableTbody');            
            if(tbody != null)
            {
                var tbodyOriginalHeight = tbody.height();
                var preferedFontSize = $('input').css("font-size");        
                var rowHeight = 25; //25px
                switch(preferedFontSize)
                {
                    case "10.6667px":
                        rowHeight = 25; //25px
                        break;
                    case "13.3333px":
                        rowHeight = 30;
                        break;
                    case "16px":
                        rowHeight = 35;
                        break;
                }
                                            
                var rowCount = tbody.children().size();
                var neededHeight = rowHeight * rowCount;
                
                if(neededHeight < tbodyOriginalHeight)
                {
                    tbody.children().css("height",rowHeight+"px");
                    tbody.height(neededHeight);                        
                }     
            }                                       
        }        
    });
