first attempt at removing dependencies on jquery and jquery.cookie