function update_field(element,id) {
	
	var choice = new Array();
	for (i=0;i<element.options.length;i++) {
		if (element.options[i].selected) {
			choice[choice.length] = element.options[i].value;
		}
	}
	$('#' + id).attr('value',choice.join(','));
	
}

$(document).ready(function(){

	$('.navigation ul li').hover(function() {
		$(this).find('dl').show();
	},function(){
		$(this).find('dl').hide();
	});
	
	//*
	$('.ways ul li.level1 a').click(function(){
		//$('ul.level2').hide();
		$('.ways ul li.level1').removeClass('level11');
		id = $(this).attr('id').substr(3);
		$('.sub-' + id).slideToggle(100);//css('display','block');//toggle();
	});
	//*/
	
	$("dl.photos dd a").fancybox({
		'overlayShow': true
	});
	$(".gallery .block .img a").fancybox({
		'overlayShow': true
	}); 
	
});
