﻿/// <reference path="/Scripts/jquery.intellisense.js"/>

jQuery(document).ready(function()
{
	Global.initTopSearch();
	Global.initSectionOverview()
});

var Global =
{
	initTopSearch: function()
	{
		var defaultText = "Keyword Search";
		jQuery("#SearchForm input").val(defaultText).mousedown(function()
		{
			if (this.value == defaultText) this.value = "";
		});
	},

	initSectionOverview: function()
	{
		var maxHeight = 0;
		var allItems = jQuery("#SectionOverviews li");
		allItems.each(function(i)
		{
			var item = jQuery(this);
			if (i < 3) item.addClass("TopRow");
			var itemHeight = item.height();
			if (itemHeight > maxHeight) maxHeight = itemHeight;
		}).height(maxHeight).addClass("Adjusted");
	}
};
