function toggleSubNav(divID) {

	theSubMenu="#"+divID+"SubNav";
	theMenuSection="#"+divID+"Menu";
	offState=divID+"Nav";
	onState=divID+"NavOn";
	
	//change the section outline
	if ($(theMenuSection).hasClass(onState)) {
		$(theMenuSection).removeClass(onState);	
		$(theMenuSection).addClass(offState);	
	}
	else {
		$(theMenuSection).removeClass(offState);	
		$(theMenuSection).addClass(onState);	
	}
	
	//slide sub nav up or down
	slideSpeed="slow"; //equivalent to 600 milliseconds
	slideSpeed=500;
	$(theSubMenu).slideToggle(slideSpeed);	

}

function preparePopup() {
	$(document).ready(function(){
		//$(".popupWindow").colorbox();
		$(".contactPopupWindow").colorbox({width:740, height:500,iframe:true});
		$(".orderPopupWindow").colorbox({width:740, height:520,iframe:true});
		$(".downloadPopupWindow").colorbox({width:410, height:570,iframe:true});
		$(".casePopupWindow").colorbox({width:980, height:560,iframe:true});
		$("a[href='http://www.faradayknowledge.com/_fixed/contact_form.php']").colorbox({width:740, height:520,iframe:true});
		
	});
}


