$extend( RA, {
	
	initTabs: function()
	{
		RA._currentSearch = 'location';
		RA._currentTab = $( 'tab_location' );
		RA._currentContainer = $( 'container_location' );
	
		var tabs =  [ 'location', 'name', 'styles' ];
		
		tabs.each( function( tab ) {
		
			$( 'tab_' + tab ).addEvent( 'click', function(e) {
			
				e.stop();
				
				// Handle Type
				RA._currentSearch = tab;
				
				// Handle Tab
				if ( RA._currentTab ) {
					RA._currentTab.removeClass( 'current' );
					RA._currentTab.removeClass( 'selected' );
				}	
				
				this.addClass( 'current' );
				this.addClass( 'selected' );
				
				RA._currentTab = this;
			
				// Handle Elements
				if ( RA._currentContainer )
					RA._currentContainer.hide();
					
				$( 'container_' + tab ).show();
				
				RA._currentContainer = $( 'container_' + tab );
				
				$log( 'Current tab is: ' + tab );
				
				switch( tab )
				{
					case 'location':
						$( 'heading_hint' ).set( 'html', 'Enter a suburb or select a state below' );
						$( 'find_member_form' ).setProperty( 'action', '/Site/ReikiAustralia/Page/LocationResults'  );
						$( 'typeOfSearch' ).set( 'value', 'location' );
					break;

					case 'name':
						$( 'heading_hint' ).set( 'html', 'Enter a name into the field below' );
						$( 'find_member_form' ).setProperty( 'action', '/Site/ReikiAustralia/Page/SearchResults'  );
						$( 'typeOfSearch' ).set( 'value', 'normal' );
					break;

					case 'styles':
						$( 'heading_hint' ).set( 'html', 'Select a style below' );
						$( 'find_member_form' ).setProperty( 'action', '/Site/ReikiAustralia/Page/SearchResults' );
						$( 'typeOfSearch' ).set( 'value', 'normal' );
					break;
				}
				
			
			});
		
		});
	
	}
	
});

window.addEvent( 'domready', function() {

	RA._initHooks = [ RA.initTabs() ];

});
