﻿/* event landing */

$(function() {
	$("#plcSideContent1 .datecontent").shadow();

	if (!$("body").is(".edit-mode")) {
		$("<div></div>").addClass("dropdown").html("<span>Select a section</span>").insertAfter(".relatedlinks h2");
		$(".relatedlinks ul").appendTo(".relatedlinks .dropdown");

		//jquerified suckerfish menu for related links.
		$(".relatedlinks .dropdown, .relatedlinks .dropdown span, .relatedlinks ul").hover(function() {
			$("ul", $(this).parent()).css("left", "auto");
		}, function() {
			$("ul", $(this).parent()).css("left", "-999px");
		});
	}

	// hide the events for today if they show up first in the list
	var today = new Date();
	var today_format = (today.getMonth() + 1) + "." + today.getDate() + "." + today.getFullYear().toString().substring(2, 4);
	if ($("#plcContent1 .eventlist li:first h3:contains('" + today_format + "')").length > 0)
		$("#plcContent1 .eventlist li:gt(0):has(h3):first").prevAll().hide();
});