Been following simply javascript & its use of the Core library.

In the document access chapter, things make sense using Core library but having some probs trying to do the same execrcise in Prototype & Jquery. Below are the failed attempts at getting 2 exercises to work in prototype. Some help would be great. Thanks!

1.
Using core.js(This works)
var StyleObject =
{
init: function()
{
var body = document.getElementsByTagName("body")[0];
body.style.backgroundColor = "#000000";
body.style.color = "#FFFFFF";
}
};
Core.start(StyleObject);

1a.
Using prototype.js(This does not work)
//declaring the class
var StyleObject = Class.create();

//defining the rest of the class implementation
StyleObject.prototype = {

initialize: function() {
var body = document.getElementsByTagName("body")[0];
body.style.backgroundColor = "#000000";
body.style.color = "#FFFFFF";
}
};
new StyleObject();

2.
Using core.js(This works)
var changedClass =
{
init: function()
{
body = document.getElementsByTagName("body")[0];
Core.addClass(body, "unreadable");
}
};

Core.start(changedClass);

2a.
//declaring the class
Using prototype.js(This does not work)
var changedClass = Class.create();

//defining the rest of the class implementation
changedClass.prototype = {
initialize: function()
{
var body = document.getElementsByTagName("body")[0];
Element.addClassName(body, "unreadable");
}
};
new changedClass();