// For IE hover flicker bug
try {
  document.execCommand('BackgroundImageCache', false, true);
} catch(e) {}

// Hello jQuery!
$(document).ready(function(){
// First, let's tell tag the page when javascript is on.
	$("body").addClass("jsOn");

// IE6 checker for browser checking
	if(jQuery.browser.version == 6.0 && $.browser.msie) {
		ie6 = true;
	}

// See Also
	// first item class
	$("#extra .seeAlso ul li:first").addClass("first");
	// arrows
	$("#extra .seeAlso li a").append("<span>&nbsp;&raquo;</span>")
// Profile layer
	$("#extra .profile img:first").addClass("first");
	$("#extra .profile").hover(
		function () {
			$(this).parent(this).addClass("active");
		}, 
		function () {
			$(this).parent(this).removeClass("active");
		}
    );

// NavSwitch
	$(".navSwitch li:first").addClass("first active");

	$(".b_majorsMinors").click(function() {
		$(".b_schoolsDepts").parent().removeClass("active");
		$(this).parent().addClass("active");
		$("#l_majorsMinors").show();
		$("#l_schoolsDepts").hide();
		return false;
	})
	$(".b_schoolsDepts").click(function() {
		$(".b_majorsMinors").parent().removeClass("active");
		$(this).parent().addClass("active");
		$("#l_majorsMinors").hide();
		$("#l_schoolsDepts").show();
		return false;
	})

// Academics L2
	$("#content .layer:first").addClass("active");

//Block module
	$("#extra .block a").hover(
		function () {
			$(this).parent().parent(this).addClass("activeBlock");
		}, 
		function () {
			$(this).parent().parent(this).removeClass("activeBlock");
		}
    );

// Wrap all submit buttons in a div (they must have class="submit")
	$("input.submit").wrap("<div></div>");

// zebra tables
	$("table").each(function(){
		$("tr:nth-child(odd)").addClass("odd");
	});
}); // Bye-bye jQuery!
