jQuery(function(e)
{
	var tabs = $("#productSwitch").children().size() - 1;
	var index = 1;

	function Resize()
	{
		var height = $("#productSwitch > .productSwitchBox").eq(index - 1).height();
		$("#productSwitch").css("overflow", "hidden");
		$("#productSwitch").css("height", height).css("padding-bottom", "166px");
	}

	for( var i = index; i <= tabs; i++ )
	{
		$("#productSwitch > #productTabs > ul > li").eq(i - 1).addClass("tab-" + i.toString());
	}

	$("#productSwitch > .productSwitchBox:not(:first)").hide();

	$("#productSwitch > #productTabs > ul > li > a").click(function()
	{
		$(this).parent().parent().children().removeClass("selected");
		index = parseInt($(this).parent().attr("class").substring(4));
		$(this).parent().addClass("selected");

		$("#productSwitch > .productSwitchBox").fadeOut("slow");
		$("#productSwitch > .productSwitchBox").eq(index - 1).fadeIn("slow");

		sIFR.activate(kaufmann);
		sIFR.replace(kaufmann,
		{
			selector: "h3.black",
			css: [
			".sIFR-root { font-size: 22px; font-weight: bold; color: #000000; }",
			"a { color: #000000; text-decoration: none; }"
			],
			wmode: "transparent"
		});

		Resize();

		return false;
	});

	Resize();

});

