jQuery does not have native cookie functions.
While I completely agree this should be done server-side and would never do this myself... You can do this entirely with plain-old Javascript.
I've put together a function that should suit your purposes. It returns true only if they've visited 6 pages where each page was different than the immediately preceding page.
function mySiteTracker() {
var pageCounter = readCookie('pageCounter');
var pageLast = readCookie('pageLast');
var pageInt = 0;
if (pageCounter) {
pageInt = parseInt(pageCounter);
if (pageInt > 5) return true;
if (window.location.href == pageLast) return false;
}
createCookie('pageCounter',(pageInt + 1));
createCookie('pageLast',window.location.href);
return false;
}
//The following 2 functions providing the get/set
//functionality are MODIFIED from: http://www.quirksmode.org/js/cookies.html
function createCookie(name,value) {
document.cookie = name+"="+value+"; path=/";
}
function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}
I didn't specifically test this... let me know if you have any issues.