// Adds the class "open_category" to the "Accessories"
// node if we're in one of it's child classes

$(document).ready(function() {
	// get the visible category name
	var section = $("h3.category_name").text();
	
	// if the category name equals "Accessories"
	if (section == "Grips") {
		// Open the last node of the menu (in our case, "Accessories")
		$("#menu_container ul li:last-child").addClass("open_category");
	};

	// same for "Headcovers"
	if (section == "Headcovers") {
		$("#menu_container ul li:last-child").addClass("open_category");
	};
	
	// and "Hats"
	if (section == "Hats") {
		$("#menu_container ul li:last-child").addClass("open_category");
	};
	
});
