/* Start here */
window.addEvent('domready', function() {
    if (empty()) {
        initHeader();
        buildBase();
        getMedia(startid);
        setPagingEvent(forwardel);
        setEvent("a#imprint", mainel);
		setEvent("a.clink", contentel);
        fadeIn(footerel);

        if (document.getElementById(filterel))
        {
            setFilterEvent("choose");
        }
        if (document.getElementById(channelel)) 
        {
            setEvent("a." + sidebarclass, 'content');
        }
    }
});

function switchKubus ( color, el )
{
    switch ( color ) {
        case 'white':
            switchColor("#ffffff", el);
        break;
        case 'red':
            switchColor("#6f1100", el);
        break;
        default:
            switchColor("#ffffff", el);
        break;
    }
    return color;
}

function switchColor(color, element) {
    style = new Fx.Styles(element, {
        duration: smoothness
    });
    
    style.start({
        'background-color': color
    });
}