
 
 
$(document).ready(function(){	
	//mainmenu();
	
	
});




/*
function mainmenu() {
	alert('mainmenu');
	$(" #nav ul ").css({display: "none"}); // Opera Fix
	$(" #nav li").hover(function() {
		$(this).find('ul:first').css({visibility: "visible",display: "none"}).show(400);
		},
		function() {
			$(this).find('ul:first').css({visibility: "hidden"});
		}
	);
}
*/


/*
function openWineExplorerWindow() {
	//alert('openWineExplorerWindow');
	window.open('http://www.banfiwineexplorer.com/', 'Explorer', 'height=400,width=900,status=yes,toolbar=no,menubar=no,location=no,resizable=yes');
	
	return false;
}
*/



function showSavingData() {
	var content = $('#savingData span').clone();
	
	
	// get the form legend
	$('#editLegend span').append(content);
	

	
}


function hideSavingData() {
	// get the form legend
	$('#editLegend span span').remove();
}


function showDataSaved() {
	var content = $('#dataSaved span').clone();
	
	
	// get the form legend
	$('#editLegend span').append(content);
	
	setTimeout("hideSavingData()", 5000);
}


/*
function initWinePopUps() {
	
	$('a.wineDetailLink').click(
			function () {
				//alert('wineDetailLink ' + this.name);
				var popup_id = 'wineDetails' + this.name;
				//alert('popup_id = ' + popup_id);
				
				
				
				// get the document width and height
				var doc_width = $(window).width();
				var doc_height = $(window).height();
				//alert('doc_width = ' + doc_width);
				
				// get the popup width and height
				var popup_width = $('#' + popup_id).width();
				var popup_height = $('#' + popup_id).height();
				//alert('popup_width = ' + popup_width);
				
				var left = (doc_width - popup_width) / 2;
				
				var top = 10;
				/*
				if (popup_height > doc_height) {
					// if the popup is taller than the window switch the position type so the user can scroll the popup
					$('#' + popup_id).css('position', 'absolute');
					
					// place the top of the popup at the top of the clicked element
					var position = $(this).position();
					top = position.top;
				} else {
					// if the popup is smaller than the window switch the position type so the popup top is relative to the viewport and always appears in the window
					$('#' + popup_id).css('position', 'fixed');
					top = (doc_height - popup_height) / 4;
				}*
				
				var alert_str = 'popup_id = ' + popup_id + "\n";
				alert_str += 'left = ' + Math.round(left) + "\n";
				alert_str += 'top = ' + Math.round(top) + "\n";
				//alert(alert_str);

				
				$('#' + popup_id).css('top', Math.round(top));
				$('#' + popup_id).css('left', Math.round(left));
				$('#' + popup_id).show();
				
				
				return false;
			}
		);
		
		
		
		
		$('.wineDetailClosePopupLink a').click(
			function () {
				$('.wineDetailsPopUp').hide();
				
				return false;
			}
		);
} // end initWinePopUps
*/
				
				