// this is the common js file that will get included on every page

// do the magic for the main menu
$(document).ready(function(){  			
	$("a.mainmenuitem").mouseover(function(){
		$("#home").slideUp("fast");
		$("#register").slideUp("fast");
		$("#"+this.name).slideDown("fast");
	});
	$("div.dropdown").click(function(){ $("#"+this.id).slideUp("fast"); });
 });

// this function asks the user to verify their action one more time before moving on
function redLight(){
	msg = "This action cannot be undone, are you sure you wish to continue?";
	return confirm(msg);
}

// this function helps to hide email addresses from being stripped off of the pages by bots
function jemail(user, domain, suffix, linkText, cssClass){
	var cssText = "";
	if(cssClass){
		cssText = ' class="'+cssClass+'"';
	}
	if(linkText){
		document.write('<a href="'+'mailto:'+user+'@'+domain+'.'+suffix+'"'+cssText+'>'+linkText+'</a>');
	} else{
		document.write('<a href="'+'mailto:'+user+'@'+domain+'.'+suffix+'"'+cssText+'>'+user+'@'+domain+'.'+suffix+'</a>');
	}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  	window.open(theURL,winName,features);
}