Heating the intra-cluster medium by jet-inflated bubbles