The problem is this line in your html:
tpj.noConflict(); // line: 267 (tpj points to jQuery)
Which causes jQuery to restore $ to its previous value (which is
undefined). You can either remove that line or, if that causes other bugs (I don’t see why it would in your case), change the
jQuery‘s in the cookie close script (line 567 – 571 in your html).