function accordian(listName) {
	
	//initially hide any child lists of the parent - just as a precaution
	jQuery('#' + listName + ' ul > li')
	.hide();
	
	//now open the first list as a default
	
	jQuery('#' + listName + ' ul:first > li')
	.slideDown(800);

//now set the image pointer to the open indicator	
	jQuery('#' + listName + ' li img')
	.filter(':first')
	.filter('.smallActive')
	.attr('src','images/viewResortsRotated.gif');	
	
	//setup the actions when a li of the top level is clicked .........
	jQuery('#' + listName + ' li')
	.click(function(e) {
	e.stopPropagation()
	
	
	//any visible sublists we need to hide
	jQuery('#' + listName).find('ul li')
	.filter(':visible')
	.slideUp(300);
	//and then reset the image pointers on all lists	
	jQuery('#' + listName).find('li img')
	.filter('.smallActive')
	.attr('src','images/viewResorts.gif');		
	
	if(jQuery(this).find('ul li:first').is(':hidden')){

		jQuery(this).find('ul li')
		.slideToggle(800);

		jQuery(this).find('img')	
		.filter('.smallActive')
		.attr('src','images/viewResortsRotated.gif');			
		
	}
	
		});	
		
		

	//change the background image of the list item if needed
		
	jQuery('#' + listName + ' li ul li').hover(function(){
				
		jQuery(this).css({'background-image':'url(images/blackBullet.gif)'});
		
		}, function(){
			
		jQuery(this).css('background-image','url(images/blueBullet.gif)');		
					
		});		
		
	
}



function destinationImage(listName) {
	
	//go get the first image of the resort and display in the country list
		
	jQuery('#' + listName + ' ul > li > a').mouseover(function(){	
	
	
	var country = '#' + jQuery(this).parents().find('ul').attr('id')
	
	//alert(country)
		
	jQuery.ajax({
		
			type: 'GET',
			timeout: 5000,
			url: 'getDestinationImage.asp',
			data: { id: jQuery(this).attr('class') },
			error:function (xhr, ajaxOptions, thrownError){
                    //alert(xhr.status);
                    //alert(thrownError);
                } ,
			success: function(data){ jQuery(country + ' li.destinationImage').html(data); }	
			//success: function(data){ alert(data); }	

		});	//close ajax call	
		
	});
	
	
	
}	
