
/*var rand=Math.floor(Math.random()*3);
var img1='url('+rand+'.jpg)';
var img2=img1;
document.write(img2);

document.write("url(bg"+rand+".jpg)");
*/

$(document).ready(function(){
	
	//Fix Errors - http://www.learningjquery.com/2009/01/quick-tip-prevent-animation-queue-buildup/
	
	//Remove outline from links
	$("#topnav a").click(function(){

		$(this).blur();
	});
	
	//When mouse rolls over
	$("#topnav li").mouseover(function(){


var rand=Math.floor(Math.random()*5);
var img1='url(http://omega.am/wp-content/themes/twentyten/images/bg'+rand+'.jpg)';
var img2=img1;

$(this).css('background-image',img2);
$(this).stop().animate({height:'150px'},{queue:false, duration:600, easing: 'easeOutBounce'})
	});
	
	//When mouse is removed
	$("#topnav li").mouseout(function(){
		$(this).stop().animate({height:'35px'},{queue:false, duration:600, easing: 'easeOutBounce'})
	});
	
});
