var navTopTimer = null;
var navTopTimerDelay = 250;
/* top and middle navigation */
$(function(){
	$('#top-nav').removeClass('no-js');
	$('#top-nav > ul > li').each(function(){
		$(this).hover(function(){
			clearTimeout(navTopTimer);
			var element = this;
			navTopTimer = setTimeout(function(){ element.className += ' over';}, navTopTimerDelay)
		},function(){
			clearTimeout(navTopTimer);
			this.className = this.className.replace(new RegExp('\\s*over', 'g'),'');
		});
	});
	$('#top-nav li li').each(function(){
		$(this).hover(function(){
			this.className += ' over';
		},function(){
			this.className = this.className.replace(new RegExp('\\s*over', 'g'),'');
		});
	});
});

//Super Flash Variable Passer
function flashPassVar(varName, varValue, movieName){
	var flashMovie = getFlashMovieObject(movieName)
	if (flashMovie)
		flashMovie.SetVariable(varName, varValue);
}
	
function flashGetVar(varName, movieName) {
	var flashMovie = getFlashMovieObject(movieName);
	return flashMovie.GetVariable(varName);
}

function getFlashMovieObject(movieName)
{
	if (window.document[movieName]) {
		return window.document[movieName];
	}
	if (navigator.appName.indexOf("Microsoft Internet")==-1) {
		if (document.embeds && document.embeds[movieName]) {
			return document.embeds[movieName]; 
		}
	} else { // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
		return document.getElementById(movieName);
	}
}