	$(function() {

		//-------- advanced example
		$('.ddl-selector li a.selected').live('click', function() {
			//check if the options are visible
			if( $('.ddl-selector li a.option:visible').length > 1) {
				//hide the options if currently displaying
				$('.ddl-selector li a.option:not(.selected)').hide();			
			} else {
				//show the options if hidden
				$('.ddl-selector li a.option:not(.selected)').show();			
			}
			return false;
		}); 
		
		//check for selecting a new option
		$('.ddl-selector li a.option:not(.selected)').live('click', function() {
			//change over the selected class
			$('.ddl-selector li a').removeClass('selected');
			//apply this to the new selection
			$(this).addClass('selected');
			//slide up the selected option
			$('.ddl-selector li a.option:not(.selected)').hide();			
			return false;
		});

		
	});


