	image = Math.ceil(Math.random()*6);

$(function(){
	//$('#photoset').attr('src','images/ps'+image+'.jpg');
	$('a[rel=external]').click(function(){this.target='_blank'});
	$('.dropdown>li').hover(function(){$(this).addClass('hover')},function(){$(this).removeClass('hover')});
	$('.dropdown>li>ul>li, #syslog').hover(function(){$(this).addClass('hover')},function(){$(this).removeClass('hover')});
	$('.dropdown li,#local li').css('cursor','pointer').click(
				function(e){if(this.firstChild.href){e.stopPropagation();window.location=this.firstChild.href;}}
			);
	$('.dropdown>li').each(
				function(){if(this.firstChild.href==window.location) $(this).addClass('flag');}
			);
	$('.dropdown>li>ul a').each(
				function(){if(this.href==window.location) $(this).parent().parent().parent().addClass('flag');}
			);
	$('#local a').each(
				function(){if(this.href==window.location) $(this).addClass('flag');}
			);
	
	
	$('#local li li').hover(
				function(e){if(this.firstChild.href){e.stopPropagation();$(this.firstChild).addClass('hover')}},
				function(){$(this.firstChild).removeClass('hover')}
	);
	
	$('#spotlights div:first-child, .dropdown li:first-child, #content h1:first-child').addClass('first-child');
	
});