$(document).ready(function() {
	$("#login input:text").labelify({ labeledClass: "labelHighlight" });

	$("#login .right_link").click(function() {
		$("#login_lightbox").jqmShow();
	});

	$("#featured_trip table.feed tr.feed_entry:last").css("border-bottom", "medium none");

	$("#ticker #slide_control_panel .slide_control").each(function() {
		$(this).click(function(e) {
			e.preventDefault();
			var index = $(this).attr("index");

			// add the 'selected' class to this button and remove it from the others
			$("#ticker #slide_control_panel .slide_control span.button").each(function() {
				$("a", this).removeClass("selected");
			});
			$("span.button a", this).addClass("selected");

			// hide all ticker slides
			$("#ticker #slides .slide").each(function() {
				$(this).hide();
			});

			// show the slide linked to this button
			$("#ticker #slides #slide"+index).show();

			// show the spire if it's the first slide
			if(index == 1) {
				$("#spire_wrap").show();
			} else {
				$("#spire_wrap").hide();
			}
		});
	});
});

