$(window).load(function() 
{
	$("#slider").nivoSlider({
		effect: 'fade',
		animSpeed: 1000,
		pauseTime: 5000,
		directionNav: false,
		controlNav: false,
		pauseOnHover: false,
		captionOpacity: 0
	});
});

$(document).ready(function() 
{
	$("#navigation .top_nav a.parent").click(function() 
	{
		$("#navigation .top_nav ul").hide();
		$(this).next().slideToggle();
		return false;
	});

	$("a.kurse").click(function() 
	{
		$("#kurse").show();
		$("#info").hide();
		$("#tabs a").removeClass("selected");
		$("#tabs a.kurse").addClass("selected");
		return false;
	});

	$("a.info").click(function() 
	{
		$("#kurse").hide();
		$("#info").show();
		$("#tabs a").removeClass("selected");
		$("#tabs a.info").addClass("selected");

		if ($(this).parent().attr("id") == "tabs") {	
			return false;
		}
	});

	$("#frame .text a").each(function() {
		if ($(this).attr("href") == "#" && !$(this).hasClass("info")) {
			$(this).parents("p").next("table").hide();
			$(this).click(function() {
				$(this).parents("p").next("table").slideToggle();
				return false;
			});
		}
	});

	$("#cart input.remove_item").click(function() 
	{
		$("#remove_item_form #item_id").val($(this).attr("id"));
		$("#remove_item_form").submit();
		return false;
	});
});
