function ffFix() 
{ 
  	if (navigator.userAgent.indexOf("Firefox/3.0") != -1)
	{
		document.getElementById("main").style.width = "703px";
		document.getElementById("footer").style.width = "703px";
	}
}
function initNav()
{
	if (typeof document.body.style.maxHeight == 'undefined')
	{
		var nav = document.getElementById("main-nav");
		if(nav)
		{
			var lis = nav.getElementsByTagName("li");
			for (var i=0; i<lis.length; i++)
			{
				lis[i].onmouseover = function()
				{
					this.className += " hover";
				}
				lis[i].onmouseout = function()
				{
					this.className = this.className.replace(" hover", "");
				}
			}
		}
	}
}
if (window.addEventListener)
	window.addEventListener("load", ffFix, false);
else if (window.attachEvent)
{
	window.attachEvent("onload", ffFix);
	window.attachEvent("onload", initNav);
}


var i=1;
		
function swapImage(){
		
		if (i == 3) {
			i = 1;
		}
		else {
			i++;
		}
		$('#header').css({background: "url('images/bg-header_"+i+".jpg') no-repeat #000000"});
		
	}

$('document').ready(function(){
	
	 jQuery.fn.slowEach = function( interval, callback ) {
        var array = this;
        if( ! array.length ) return;
        var i = 0;
        next();
        function next() {
            if( callback.call( array[i], i, array[i] ) !== false )
                if( ++i < array.length )
                    setTimeout( next, interval );
        }
    }; 
	
	setInterval("swapImage()",5000);
	
});