// JavaScript Document for Order Request / Quote Form

// Toggles the visibility of the "Product Name" listings when the "Product Type" is selected.
$(document).ready(function(){
	$("#form_select2").change(function () {
		var str = "";
		var div = "";
		var none = ".none";
		var blank = ".blank";
		$("#form_select2 option:selected").each(function () {
			str += $(this).val();
			div += "." + str;
			$("#select_products > select").css("display", "none").filter(div).css("display","block").filter(none).css("opacity",".5");
			$(blank).css("opacity",".6");
		});
	}).trigger('change');
});

// Resets the "Product Name" field to its original format when reset/clear button is pressed.
$(document).ready(function(){
	var none = ".none";
	$(".clear").click(function () {
		$("#select_products > select").css("display", "none").filter(none).css("display","block").css("opacity",".5");});
});

