$(function() {
	$("a[rel^=Lightbox]").lightBox();
});

$(document).ready(function(){
	// Alert scroll
	if($('#Alert > div').size() > 0) {
		ScrollAlerts = function() {
			var FirstAlert = $('#Alert div:first-child').get(0);
			$('#Alert > div').animate({
					top : "-=27"
			}, 1000, '', function(){
				if($(this).get(0) == FirstAlert) {
					$(FirstAlert).remove();
					$(FirstAlert).appendTo('#Alert');
				}
				$(this).css('top', '0px');
			});
		}
		setInterval("ScrollAlerts()", 5000);
	}
	
	// Top Level Menu hovers
	$('.MenuItem_TopLevel').hover(function(){
		$(this).css('background-color', '#ffffff');
		$(this).css('border', '1px solid #8e8a87');
		//$(this).children('div.Submenu').slideDown('fast');
		$(this).children('div.Submenu').css('display', 'block');
	}, function() {
		$(this).css('background-color', '#d4d5d0');
		$(this).css('border', '1px solid #d4d5d0');
		//$(this).children('div.Submenu').slideUp('fast');
		$(this).children('div.Submenu').css('display', 'none');
	});
	
	// Submenu hovers
	$('.MenuItem').hover(function(){
		//$(this).children('.Submenu').slideDown('fast');
		$(this).children('.Submenu').css('display', 'block');
	}, function() {
		//$(this).children('.Submenu').slideUp('fast');
		$(this).children('.Submenu').css('display', 'none');
	});
	
});
