Code:
if($("#container").hasClass('red')){
$("#container").css({"border":"1px solid #c13333","background":"#efefef"});
}
Be warned though If you are using ajax on a set of code that color will not take affect unless you load that cookie before the ajax is loaded which can be done in css and jquery like so
Code:
/* CSS Below */
html,body{
visiblity:hidden;
}
// Jquery below
document.getElementsByTagName("html")[0].style.visibility = "visible";
document.getElementsByTagName("body")[0].style.visibility = "visible";