Код:
<!-- Переключение фона --> <style>#ChangeStyle{position:relative;z-index:100;margin-top: 75px;}#ChangeStyle td{cursor:pointer;width:20px;height:20px;}#ChangeStyle td i{display:none!important}</style><span class="StyleChang"></span><table cellspacing="8" align=left id='ChangeStyle'><tr> <td style="background-image:url(https://forumupload.ru/uploads/001b/cd/b7/2/847835.png);background-repeat:no-repeat;><i> body { background:url(https://forumupload.ru/uploads/001b/cd/b7/2/915787.jpg) fixed top center!important;background-size:cover!important;background-repeat:no-repeat; } </i></td> <td bgcolor=#e98078 title="закат"><i> body { background:url(https://forumupload.ru/uploads/001b/cd/b7/2/916127.jpg) fixed top center!important;background-size:cover!important;background-repeat:no-repeat; } </i></td> <td bgcolor=#6961b0 title="ночь"><i> body { background:url(https://forumupload.ru/uploads/001b/cd/b7/2/672221.jpg) fixed top center!important;background-size:cover!important;background-repeat:no-repeat; } </i></td> </tr></table><script type="text/javascript">$('#ChangeStyle td').each(function(i){$(this).attr("alt",i)});function setcookie(a,b,c){if(c){var d=new Date();d.setDate(d.getDate()+c)}if(a&&b)document.cookie=a+'='+b+(c?'; expires='+d.toUTCString():'');else return false}function getcookie(a){var b=new RegExp(a+'=([^;]){1,}');var c=b.exec(document.cookie);if(c)c=c[0].split('=');else return false;return c[1]?c[1]:false}function clearSet(L){if(L){setcookie("#ChangeStyle",L,30);$("span.StyleChang").html('<style>'+$("#ChangeStyle td[alt='"+L+"']").find("i").html()+'</style>')}};$('#ChangeStyle td').click(function(){clearSet($(this).attr("alt"))});var Lmem=getcookie("#ChangeStyle");clearSet(Lmem);</script>