update the jquery function for tabs