$(document).ready(function(){
	//look for parent elements and hide their children
	$("#side-nav ul").parent().filter("li").addClass("parent");
	$("li.parent ul").hide();
	
	//check for selected elements children and show them
	$("li.parent.selected").addClass("open");
	$("li.selected > ul").show();
	
	//add class to link element (for browsers with no support for child selectors)
	$("li.selected > a").addClass("selected-link");
});