function init(){
	// images that are rollovers can use the "rollover" calss an automatically get the "_over" image
    $$('.rollover').each(function(img) {
        var src = img.getProperty('src');
        var extension = src.substring(src.lastIndexOf('.'), src.length)
		new Asset.images([src.replace(extension,'_over' + extension)]); // preload the rollover image
        img.addEvent('mouseenter', function() {
			img.setProperty('src', src.replace(extension, '_over' + extension));
        });
        img.addEvent('mouseleave', function() {
            img.setProperty('src', src);
        });
    });
}


var mainNavOpenPx = -40;
var mainNavClosedPx = -188;
function toggleNainNav(){
	var elem = $('MainNavPopup');
	if(elem.getStyle('bottom') == (mainNavOpenPx+'px')){
		closeMainNav();
	} 
	else if(elem.getStyle('bottom') == (mainNavClosedPx+'px') || elem.getStyle('bottom') == '0px')
	{
		openMainNav();
	}
}
function closeMainNav(){
	
	var elem = $('MainNavPopup');
	if(elem.getStyle('bottom') == (mainNavOpenPx+'px')){
		$('MainNavHeader').setProperty('src','images/allservices_closed.gif'); 
		var myFx = new Fx.Tween(elem);
		myFx.start('bottom', mainNavOpenPx, mainNavClosedPx);
	}
}
function openMainNav(){
	var elem = $('MainNavPopup');
	if(elem.getStyle('bottom') == (mainNavClosedPx+'px') || elem.getStyle('bottom') == '0px'){
		$('MainNavHeader').setProperty('src','images/allservices_open.gif'); 
		var myFx = new Fx.Tween(elem);
		myFx.start('bottom', mainNavClosedPx, mainNavOpenPx);
	}
}