$(document).ready(function() {
	
		/* PRELOAD IMAGES */
		$(window).bind("load", function() {
		$(".headerleft img").each(function(key, elm) {
		$().attr( "src", $(this).attr("src").replace(".png", "_on.png"));
		});
		});
		
		
        /*SWITCH GUI*/
       	$(".switch").hover(function() {
		$(this).addClass("switchon");					
		},
		function() {
		$(this).removeClass("switchon");
		});
		
		
		 /*THUMB GUI*/
		var basePhoto = $("#prodphoto").attr("src");
		
        $().find(".prodthumb").hover(function() {
		var thisPhoto = $(this).attr("src");
		$("#prodphoto").attr("src",thisPhoto);
		},
		function() {
		$("#prodphoto").attr("src",basePhoto);
		});
		
		
        /*SLIDER GUI*/
		$().find(".slidertitle").css("opacity", '0');
       	$(".sliderimage").hover(function() {
		$(this).parent().next().next(".slidertitle").animate({opacity: '1'}, 250);					
		},
		function() {
		$(this).parent().next().next(".slidertitle").animate({opacity: '0'}, 500);
		});
		
		
		/*REQUIRED FORM FIELDS*/
		$().find(".requiredfield, .requiredfield2").each(function(i){
			$(this).parent().prev().prepend("<span class=\"highlight\">*</span> ");
		});
		
		
		/*HOMEPAGE SLIDER*/
        
});


function submitOrder(choiceQuantity) {
var choiceSet = 0;

	if (document.setform.choice.length > 0) {
	
		for (var i = 0; i < document.setform.choice.length; i++) {
		
			if (document.setform.choice[i].checked == true) {
			document.orderform.choice.value = document.setform.choice[i].value;
			choiceSet = 1;
			break;
			}
		
		}
	
	}
	else {
	document.orderform.choice.value = document.setform.choice.value;
	choiceSet = 1;
	}
	
	//if (!choiceSet) {
	//alert('Please select a product choice.');
	//return false;
	//}

	if (document.setform.discount) {
	document.orderform.discountcode.value = document.setform.discount.value;
	}

document.orderform.submit();
return true;
}