
jQuery.noConflict();
jQuery(document).ready(function($)
{ 	
	$("ul.sf-menu").supersubs({ 
		minWidth: 15,
		maxWidth: 15,
		extraWidth: 1 // ensure lines don't break due to slight rounding differences and fonts
	}).superfish({ 
		delay: 300,
		animation: { opacity:'show', height:'show' },
		speed: 300,
		autoArrows: true,
		dropShadows: true
	});
	
});

function reload()
{
	location.reload();	
}

function launch(url)
{
	alert(url);
	
	//window.open(url, 'popup', 'width=640,height=480,menubar=no,location=no,scrollbars=no,resizable=no'); 
	//window.blur(); 
	return false;
}



var tourPhotos = new Array();

function showTourPhoto(pic, thumb)
{
	var thumbs = document.getElementById('thumbs');
	
	document.getElementById('tourPhoto').src = 'images/' + pic + '.jpg';
	thumb.className = "selected";
}


var tourPhotos = new Array();
var tourPhotosIndex = 0;

tourPhotos[0] = "tour1.jpg|Beans in plain sauce, baked, refried, spiced, with or without meat.";
tourPhotos[1] = "tour2.jpg|Zacmi fillers assure accuracy.";
tourPhotos[2] = "tour3.jpg|CCM corn cutters.";
tourPhotos[3] = "tour4.jpg|Cream-based soup capacity.";
tourPhotos[4] = "tour5.jpg|&nbsp;";
tourPhotos[5] = "tour6.jpg|Clean, high-moisture Minnesota corn!";
tourPhotos[6] = "tour7.jpg|Dough mixing for pasta.";
tourPhotos[7] = "tour8.jpg|Electronic portion control.";
tourPhotos[8] = "tour9.jpg|Ravioli seam inspection.";
tourPhotos[9] = "tour10.jpg|Centralized distribution warehouses allow for flexible and prompt shipping.";
tourPhotos[10] = "tour11.jpg|Steritort used in product development, process determination."


function showTourPhoto(pic)
{		
		
	// make sure we are within the array boundaries...
	if(pic > tourPhotos.length-1) pic = 0;
	if(pic < 0) pic = tourPhotos.length - 1;
	
	var thumbs = document.getElementById('thumbs');
	var thumbsLinks = thumbs.getElementsByTagName('a');
	// remove all other selected states
	for(var i=0; i<thumbsLinks.length; i++)
	{
		thumbsLinks[i].className = '';
	}
	
	document.getElementById('thumb'+pic).className = "selected";
	
	var photoSpecs = tourPhotos[pic].split("|");
	document.getElementById('tourPhoto').src = '/images/' + photoSpecs[0];
	document.getElementById('caption').innerHTML = photoSpecs[1];
}

