/*
 * (c) Copyright 2009 Hen's Teeth Network. All rights reserved. www.hens-teeth.net
 */

// Iterates over select menus to see if an option other than "Select" is selected
// If not, it tells the user to select an option
function verify_item_option()
{
	var flagAllSelected = true;
	
	// Find all the select menus in the opbject with id = product_option_table
	/// If the selected value is still "Select" then set the falg to FALSE
	$("#product_option_table").find("select").each(function(o){
		if ("Select" === $(this).find("option:selected").text()) 
		{
			flagAllSelected = false;
		}
	});
	
	if (! flagAllSelected)
	{
		alert("Please select from all options before adding this product to your cart.");
	}
	
	return flagAllSelected;
}
$("#item_form").submit(verify_item_option);