/* ================================================================ 
This copyright notice must be untouched at all times.
Copyright (c) 2008 Stu Nicholls - stunicholls.com - all rights reserved.
=================================================================== */
 
 
$(document).ready(function() {
 
$("ul#nav ul").hide();
$('ul#nav li:has(ul)').each(function(i) {
$(this).children().slideUp(400);
});

/*===================================================
MODIFICATION - Global Private Funding
====================================================*/
 
 
$('ul#nav li.p1open:has(ul)').each(function(i) {
$(this).children().slideToggle(400);
});


$('ul#nav li.p2open:has(ul)').each(function(i) {
$(this).children().slideToggle(400);
});

$('ul#nav li.p3open:has(ul)').each(function(i) {
$(this).children().slideToggle(400);
});

/*================================================END MODIFICATION*/

 
$('li.p1:has(ul)').click(function(event){
		if (this == event.target) {
		current = this;
		$('ul#nav li:has(ul)').each(function(i) {
		if (this != current) {$(this).children().slideUp(400);}
		});
		$(this).children("ul:eq(0)").slideToggle(400);
 
 
		}
	});
 
 
$('li.p2:has(ul)').click(function(event){
		if (this == event.target) {
		current = this;
		$('li.p2:has(ul)').each(function(i) {
		if (this != current) {$(this).children().slideUp(400);}
		});
		$('li.p3:has(ul)').each(function(i) {
		if (this != current) {$(this).children().slideUp(400);}
		});
		$(this).children("ul:eq(0)").slideToggle(400); 
 
 
		}
	});
 
 
$('li.p3:has(ul)').click(function(event){
		if (this == event.target) {
		current = this;
		$('li.p3:has(ul)').each(function(i) {
		if (this != current) {$(this).children().slideUp(400);}
		});
		$(this).children("ul:eq(0)").slideToggle(400); 
 
		}
	});


/*===================================================
MODIFICATION - Global Private Funding
====================================================*/

 $('li.p1open:has(ul)').click(function(event){
		if (this == event.target) {
		current = this;
		$('ul#nav li:has(ul)').each(function(i) {
		if (this != current) {$(this).children().slideUp(400);}
		});
		$(this).children("ul:eq(0)").slideToggle(400);
 
 
		}
	});


$('li.p2open:has(ul)').click(function(event){
		if (this == event.target) {
		current = this;
		$('li.p2:has(ul)').each(function(i) {
		if (this != current) {$(this).children().slideUp(400);}
		});
		$('li.p3:has(ul)').each(function(i) {
		if (this != current) {$(this).children().slideUp(400);}
		});
		$(this).children("ul:eq(0)").slideToggle(400); 
 
 
		}
	});

$('li.p3open:has(ul)').click(function(event){
		if (this == event.target) {
		current = this;
		$('li.p3:has(ul)').each(function(i) {
		if (this != current) {$(this).children().slideUp(400);}
		});
		$(this).children("ul:eq(0)").slideToggle(400); 
 
		}
	});

/*================================================END MODIFICATION*/
 
});