refactored javascript/jQuery for HTML table