// JavaScript Document
	$('#menu_holder').hide();
	$('#tabOpener').toggle(
		
		function(){
			$('#tabwrapper').css('background-position','0 -31px');
			$('#allFooterWrapper').height(223);
			$('#tabbed_footer').animate({
//				height: '150px',
				bottom:'72px'
				}, 500, function(){
					$('#menu_holder').fadeIn();
					// load first
					$('#carousel_wrapper').load('http://www.bagnomio.it/marchi/1.htm', function(){
				 		$('#carousel_wrapper').preloadify({ ondone:function(){
							$("#carousel_wrapper").jCarouselLite({ visible:6, btnNext: ".next", btnPrev: ".prev", mouseWheel: true, circular: false });
						}});
					}) // load END
				}) // animate END
				$('#menu_marchi a').click(function(){
					num = $(this).attr('rel');
					$('#menu_holder .selected').removeClass('selected');
					$(this).addClass('selected');
					Cufon.refresh(); //alert('http://www.bagnomio.it/marchi/'+num+'.htm');
					$('#carousel_wrapper').load('http://www.bagnomio.it/marchi/'+num+'.htm', function(){
				 		$('#carousel_wrapper').preloadify({ ondone:function(){
							$("#carousel_wrapper").jCarouselLite({ visible:6, btnNext: ".next", btnPrev: ".prev", mouseWheel: true, circular: false });
						}});
					}) // load END
				})
		},

		function(){
			
			$('#tabbed_footer').animate({
//				height: '92px',
				bottom:'-42px'
				}, 500, function(){
					$('#tabwrapper').css('background-position','0 0');
					$('#carousel_wrapper').html('');
					$('#menu_holder').fadeOut();
					$('#allFooterWrapper').height(110);
				})
		}
	);
