Changed getCookie calls into $.cookie