How to keep accordion drop-down menu open when opening a new page?

Try this:


<html>
	<head>
		<title>Accordion test</title>
		<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
		<script type="text/javascript">
			$(document).ready( function() {
				
				// initialize accordion
				$('#Accordion ul').each( function() {
					var currentURI = window.location.href;
					var links = $('a', this);
					var collapse = true;
					for (var i = 0; i < links.size(); i++) {
						var elem = links.eq(i);
						var href = elem.attr('href');
						var hrefLength = href.length;
						var compareTo = currentURI.substr(-1*hrefLength);
						
						if (href == compareTo) {
							collapse = false;
							break;
						}
					};
					if (collapse) {
						$(this).hide();
					}
				});
				
				$("#Accordion").delegate('span', 'click', function() {
					var ul = $(this).next('ul');
					if (ul.is(':visible')) {
						ul.slideUp(500);
					} else {
						$('#Accordion ul').not(ul).slideUp(500);
						ul.slideDown(500);
					}
				});
			});
		</script>
</html>
<body>
	<ul id="Accordion">
		<li>
			<span>PEOPLE</span>
			<ul>
				<li><strong>+</strong> <a href="index.php?show=philip&tiffany">PHILIP & TIFFANY</a></li>
				<li><strong>+</strong> <a href="index.php?show=heindo">HEINDO</a></li>            
				<li><strong>+</strong> <a href="index.php?show=juan">JUAN</a></li>
				<li><strong>+</strong> <a href="index.php?show=bettina">BETTINA</a></li>
				<li><strong>+</strong> <a href="index.php?show=adam">ADAM</a></li>
				<li><strong>+</strong> <a href="index.php?show=hazel">HAZEL</a></li>
				<li><strong>+</strong> <a href="index.php?show=ashton">ASHTON</a></li>
				<li><strong>+</strong> <a href="index.php?show=martina">MARTINA</a></li>
				<li><strong>+</strong> <a href="index.php?show=ava">AVA</a></li>
				<li><strong>+</strong> <a href="index.php?show=michelle">MICHELLE</a></li>
				<li><strong>+</strong> <a href="index.php?show=red">RED</a></li>
				<li><strong>+</strong> <a href="index.php?show=erin">ERIN</a></li>
				<li><strong>+</strong> <a href="index.php?show=scotty">SCOTTY</a></li>
			</ul>
		</li>
		<li>
			<span>EVENTS</span>
			<ul>
				<li><strong>+</strong> <a href="index.php?show=events-coming-soon">COMING SOON</a></li>
			</ul>
		</li>
		<li>
			<span>LANDSCAPES</span>
			<ul>
				<li><strong>+</strong> <a href="index.php?show=landscapes-coming-soon">COMING SOON</a></li>
			</ul>
		</li>
		<li>
			<span>INFO</span>
			<ul>
				<li><strong>+</strong> <a href="index.php?show=info-coming-soon">COMING SOON</a></li>
			</ul>
		</li>
	</ul>
</body>
</html>

Note I’ve added the <span>'s to the top level menu items, i.e., <span>PEOPLE</span>, <span>EVENTS</span>, etc.
Without these <span>s it will not work.