$(function(){ $("#_cb_accept").hover( function (e) { $(this).css( "background" , "#000000"); }, function () { $(this).css( "background" , "#d0011b"); }); $("#_cb_accept").click( function (e) { e.preventDefault(); var expirationDate = new Date(); expirationDate.setTime(expirationDate.getTime() + (30 * 24 * 60 * 60 * 1000)); // add 30 days var expires = "expires="+ expirationDate.toUTCString(); document.cookie = "agreed_cookie_policy=accepted;" + expires + ";path=/"; $("#cb_cookie_policy_popup").slideUp(800); }); $("#_cb_read_more").hover( function (e) { $(this).css( "background" , "#000000"); }, function () { $(this).css( "background" , "#404040"); }); function getCookie(cname) { var name = cname + "="; var decodedCookie = decodeURIComponent(document.cookie); var ca = decodedCookie.split(';'); for(var i = 0; i