jQuery not deleting cookie before resetting it
===

I'm trying to use Javascript to update some cookies for a website. It should look to see if an existing cookie as a certain value. If so, delete the cookie and replace it. 

Instead, it's adding the new cookie without removing the original.


Here's my code

    $(document).ready(function(){
	if(getCookie('ref') == 'na') {
		$.cookie('ref', null, { path: '/', expires: -5 });
		$.cookie('ref', Base64.encode(document.referrer), { expires: 365 });
	}

    });

Here's the cookie library I'm  using: https://github.com/carhartl/jquery-cookie

What am I doing wrong?
