You can do this with CSS only with relative easing and use a div with absolute positioning to unobtrusive act as the body.
DEMO http://jsfiddle.net/kevinPHPkevin/Hc7UW/3/
#body {
background: #ccc;
position: absolute;
-webkit-transition: all 1s ease-in-out;
-moz-transition: all 1s ease-in-out;
-o-transition: all 1s ease-in-out;
transition: all 1s ease-in-out;
}
a.one:hover ~ #body {
background: blue;
}
a.two:hover ~ #body {
background: red;
}
a.three:hover ~ #body {
background: yellow;
}
You can find out more info here
EDITED - jQuery version also
The way to select a parent, ie body you would need to use jQuery. It can be very easy to apply. The way i would do it, so then i don't have to create a lot of classes etc, is by giving the a
an id
that is the name color. Then I would use that as the identifier for the color.
DEMO http://jsfiddle.net/kevinPHPkevin/Hc7UW/5/
$('a').hover(function(){
$('body').css('background', this.id);
}, function(){
$('body').css('background', '#ccc');
});