Más o menos, por intuición del código jQuery, lo que haces es cambiar el rel del link según la cookie y cambiar la cookie con el rel del div, pero ahora lo difícil está en coger la imagen de fondo del body. Prueba con esto, pero no sé si funcionará:
Código Javascript
:
Ver originalfunction change(){
return 'background:url(/../../images/backgrounds/'+rand(50)+'.gif)';
}
if($.cookie("img")) {
$("body").attr("style",$("body").attr("style")+$.cookie("img"));
}
$(document).ready(function() {
$("#back_change").click(function() {
var img=$("body").attr("style")+change();
$("body").attr("style", img);
$.cookie("img",img, {expires: 365, path: '/'});
return false;
});
});
Saludos (: