/* Cookie function */
function getCookie(name) {
var matches = document.cookie.match(new RegExp(
"(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)"
));
return matches ? decodeURIComponent(matches[1]) : undefined;
}
if (getCookie('isVisited')) {
// меняем CSS
} else {
// Устанавливаем куки
document.cookie = 'isVisited=true; path=/';
}