function choice_accordion( em )
{
	// Uncheck all the radio buttons
	em.find( 'div.accordion-choice' ).children( 'div' ).hide();
	em.find( 'div.accordion-choice' ).find( 'input[type=radio]' )
		.attr( 'checked', false )
		.click( function( event ) {
			//event.preventDefault();
			if ( $( this ).siblings( 'div' ).css( 'display' ) == 'none' )
			{
				em.find( 'div.accordion-choice' ).children( 'div' ).slideUp( 'slow' );
				$( this ).siblings( 'div' ).slideDown( 'slow' );
			}
			
		} );
	
}

//Nice little function to make ajax loading a bit more flash
function ajaxLoadWithEffect( query, prefix, suffix, url, complete, data, type )
{
	$( query ).fadeOut( 'fast', function() { // Hide the content
		$( query ).html( prefix + ' <img src="images/ajax-loader.gif" style="vertical-align: middle" /> ' + suffix ).show( 'slide', 'fast' ); // Show spinner
		$.ajax( {
			url: url,
			data: data,
			type: ( type ? type : data ? 'POST' : 'GET' ),
			success: function ( html ) {
				//alert( content.attr( 'height' ) );
				$( query ).fadeOut( 'fast', function () {
					$( query ).html( html ).hide();
					$( query ).fadeIn( 'slow' );
					if ( typeof complete == 'function' )
						complete(); // Call any required callback
				} );
			}
		} );
		/*.load( url, [], function() { // Load the content
			 // When loaded hide it and make it appear nicely
			if ( typeof complete == 'function' )
				complete(); // Call any required callback
		} );	*/
		
	} );
}
