installed jquery plugin for cookies and changed how it worked