var LeftIsExtended = 0;

function slideLeftSideBar(){

	new Effect.toggle('LeftSideBarContents', 'blind', {scaleX: 'true', scaleY: 'true;', scaleContent: false});
	
	if(LeftIsExtended==0){
		$('LeftSideBarTab').childNodes[0].src = $('LeftSideBarTab').childNodes[0].src.replace(/(\.[^.]+)$/, '-active$1');
		
		new Effect.Fade('LeftSideBarContents',
   	{ duration:1.0, from:0.0, to:1.0 });
		
		LeftIsExtended++;
	}
	else{
		$('LeftSideBarTab').childNodes[0].src = $('LeftSideBarTab').childNodes[0].src.replace(/-active(\.[^.]+)$/, '$1');
		
		new Effect.Fade('LeftSideBarContents',
   	{ duration:1.0, from:1.0, to:0.0 });
		
		LeftIsExtended=0;
	}
	
}

function init(){
	Event.observe('LeftSideBarTab', 'click', slideLeftSideBar, true);
    //Open the Routes when we first start up
	slideLeftSideBar();
}

Event.observe(window, 'load', init, true);