function imageSwapper( x, y ){

	$$( '.img_link' ).removeClass( 'active' );
	$$( '.swapper' ).setStyle( 'display', 'none' );
	$( y ).setStyle( 'display', 'block');
	$( x ).addClass( 'active');

};

function initAboutTabs() {

	var menuAnchors = $( 'about_tab_nav' ).getElements( 'a' );

	for ( var i = 0; i < menuAnchors.length; i++ ) {

		if ( menuAnchors[ i ].getAttribute( 'href' ) && menuAnchors[ i ].getAttribute( 'rel' ) == 'swap' ) {

			menuAnchors[ i ].addEvent( 'click', function() {
				
				swapAboutContent( this.id, this.title );

			});

		}

	}

}

function swapAboutContent( _id, _header ) {
	
	// Set the active state on the selected link
	var tabs = $$( '#about_content .tab_content' );
	
	for ( var i = 0; i < tabs.length; i++ ) {

		tabs[ i ].setStyle( 'display', 'none' );		

	}

	var newID = 'content_' + _id;
	
	$( 'about_tab_header' ).set( 'html', _header );

	var content = $( newID ).setStyle( 'display', 'block' );
	
}

window.addEvent( 'load', function() {
							  
	initAboutTabs();
	
});
