jQuery(document).ready(function(){
/*change class of menu item for current parent category*/
	//get url of page with jquery.url.js
	var url = purl();
	//get the first segment of the url
	var trim_url = url.segment(1);
	//get rid of everything after the -
	trim_url = trim_url.split("-");
	var trim_url_1 = trim_url[0];
	//get rid of .html
	trim_url_1 = trim_url_1.split(".");

	//iterate through categories
	jQuery(".navMainCats li a").each(function() {
		//get link href
		var menu_url = jQuery(this).attr("href");
		//convert to purl object
		var trim_menu = purl(menu_url);
		//get first segment of url
		var trim_menu = trim_menu.segment(1);
		//trim off .html
		var trim_menu = trim_menu.split(".");
		//if it matches above, apply active style
		if(trim_menu[0] == trim_url_1[0]) {
			jQuery(this).parent().addClass("active");
		}
	});
});
