Ajax add to cart

So I created a custom hook that goes on the index.tpl page and it has a custom cart icon that I want to put amount of cart and items in it.{$smarty.session.cart.amount} {$lang.items}. The problem is when someone adds to cart this is not refreshed to show the new amount until you reload the page. I am wondering what I can do to force it to fresh that part so it shows, I know if I use the blocks and add a cart it will work but for my application I cant do it that way so any help would be appreciated.