
/******************************************************************************
 *
 *	PROJECT: reefLESS Classifieds Software
 *	VERSION: 3.0
 *	LISENSE: RL48Q80UC8TJ - http://www.reefless.com/license-agreement.html
 *	DOMAIN: www.yachtsourceonline.com
 *	FILE: INDEX.PHP
 *
 *	This script is a commercial software and any kind of using it must be 
 *	coordinate with reefLESS Owners Team and be agree to reefLESS License Agreement
 *
 *	This block may not be removed from this file or any other files with out 
 *	permission of reefLESS respective owners.
 *
 *	Copyrights reefLESS Classifieds Software | 2009
 *	http://www.reefless.com/
 *
 ******************************************************************************/

/** ----------- no using -----------
*
* @paccage jQuery script
*
* account registration (step 1) manager
* 
**/
$(document).ready(function(){
	$('#reg_step1').click(
		function(){
			var last_elem = $('input[@id^=step1-]:last').attr('id').split('-')[1];
			var step1_fields = "Array( ";

			$('input[@id^=step1-]').each(
				function(){
					var elem = $(this).attr('id').split('-')[1];
					var val = $(this).val();
					step1_fields += "Array( '" + elem + "', '" + val + "' )";

					if ($(this).attr('id').split('-')[1] != last_elem)
					{
						step1_fields += ', ';
					}
				}
			);
			
			step1_fields += " )";

			eval( "xajax_registration( $('#type_selector').val(), " +step1_fields+ " )" );
			$('#step1_loading').fadeIn('normal');
		}
	);
});

/**
*
* @paccage jQuery script
*
* account types description manageer
* 
**/
$(document).ready(
	function (){
		$('#type_selector').change(
			function(){
				var object = $(this).val();
				
				//show description
				$('#type_desc_container div').slideUp('fast');
				$('#type_'+object).slideDown('fast');
				
				//reload additional fields block
				$('#reg_step2').slideUp('slow');
				$('#additional_fields').html('');
				
				//show next button
				$('#next1').slideDown('normal');
			}
		);
	}
);
