
function setImageBrowser() {
	
	if ($('box') != null) {
	
		var items = $$('#box span');
		
	    var nS2 = new noobSlide({
		    box: $('box'),            
		    items: items,		    
		    size: 198,
		    interval: 3000,
		    fxOptions: {
		        duration: 1000,
		        transition: Fx.Transitions.Pow.easeOut,
		        wait: false
		    },	    
		    addButtons: {
		        previous: $('prev1'),
		        //play: $('play1'),
		        //stop: $('stop1'),
		        next: $('next1')
		    }
	    });
	    
	    return true;
	    
	}
	
	return false;
	
}


window.addEvent('domready', function(){

	setImageBrowser();
});

function ImageCheck( oDiv )
{
    this._div    = oDiv;
    this._div.onmouseover = this.__mouseover;
    this._div.onmouseout  = this.__mouseout;
};
ImageCheck.prototype.__mouseover = function()
{
	
    this.firstChild.className = 'projectimage_on';
};
ImageCheck.prototype.__mouseout = function()
{
     this.firstChild.className = 'projectimage_off';
     
};

function initImageCheck()
{
    var aDiv = document.getElementsByTagName( "div" );
    for ( var i = 0; i < aDiv.length; ++i )
        if ( aDiv[ i ].className.match( /singleprojectoverview/ ) )  
            new ImageCheck( aDiv[ i ] );
}

function changeLarge( oImage )
{
    this._img    = oImage;
    this._img.onmouseover = this.__mouseover;
    this._img.onmouseout  = this.__mouseout;
};
changeLarge.prototype.__mouseover = function()
{
    document.getElementById( "piclarge" ).src = this.src.replace( /_small/, "_large" );
    this.className = 'projectimage_on';
};
changeLarge.prototype.__mouseout = function()
{
     this.className = 'projectimage_off';
};

function initChangeLarge()
{
    var aImage = document.getElementsByTagName( "img" );
    for ( var i = 0; i < aImage.length; ++i )
        if ( aImage[ i ].className.match( /projectimage_off/ ) )  
            new changeLarge( aImage[ i ] );
}

function menuChange( oDiv )
{
    this._div    = oDiv;
    this._div.onmouseover = this.__mouseover;
    this._div.onmouseout  = this.__mouseout;
};
menuChange.prototype.__mouseover = function()
{    
	if( this.className != "menuitem_active" )
    {
		this.className = 'menuitem_on';
    }
};
menuChange.prototype.__mouseout = function()
{
    if( this.className != "menuitem_active" )
    { 
		this.className = 'menuitem';
    }
};

function initMenu()
{
    var aDiv = document.getElementsByTagName( "div" );
    for ( var i = 0; i < aDiv.length; ++i )
        if ( aDiv[ i ].className.match( /menuitem/ ) )  
            new menuChange( aDiv[ i ] );
}