document.observe( 'dom:loaded', function(){

	if( $( 'pricing' ) ) {
	
		var amounts		= Array();
		
		amounts[0]	= {};
		amounts[0].starter 	= '&pound;0';
		amounts[0].plus		= '&pound;15';
		amounts[0].gold		= '&pound;35';
		amounts[0].premier	= '&pound;65';
		
		amounts[1]	= {};
		amounts[1].starter	= '&#36;0';
		amounts[1].plus		= '&#36;25';
		amounts[1].gold		= '&#36;58';
		amounts[1].premier	= '&#36;108';
	
		Event.observe( 'pricing', 'change', function(i) {
			
			var value = $( 'pricing' ).value;
			
			//$( 'starter-price' ).innerHTML	= amounts[value].starter + ' per month';
			
			changeLink( 'starter-link', value );
			
			$( 'plus-price' ).innerHTML		= amounts[value].plus + ' per month';
			
			changeLink( 'plus-link', value );
			
			$( 'gold-price' ).innerHTML		= amounts[value].gold + ' per month';

			changeLink( 'gold-link', value );

			$( 'premier-price' ).innerHTML	= amounts[value].premier + ' per month';

			changeLink( 'premier-link', value );
		
		});
	
	}

});

changeLink = function( id, type ) {
	
	if( type == 0 ) {
		type = 'uk';
	} else {
		type = 'usa';
	}

	var parts = $( id ).href.split( '/' );
	
	if( parts[ 7 ] != undefined ) {
	
		parts[ 7 ] = type;
		
		$( id ).href = parts.join('/');
	
	} else {
		
		$( id ).href = $( id ).href + '/' + type;
	
	}

}
