function switchTab(tabGroup, amount, who){
	document["now"+tabGroup]=who;
	$("#"+tabGroup+"Tab li").each(function(i){
		if($(this).data("n")==document["now"+tabGroup]){
			$(this).addClass("nowTab");
		}else{
			$(this).removeClass();
		}
	});
	var visibleJQ=$("#"+tabGroup+"CT .tabCTBlock:visible");
	visibleJQ.hide();
	var targetJQ=$("#"+tabGroup+"CT .tabCTBlock:eq("+(document["now"+tabGroup]-1)+")");
	targetJQ.show();
}

function initSwitchTab(tabGroup, amount, who){
	$(document).ready(function(){
		$("#"+tabGroup+"Tab li").each(function(i){
			$(this).data("n", (i+1));
		});
		$("#"+tabGroup+"Tab li a").each(function(i){
			$(this).data("n", (i+1));
			$(this).focus(function(){
				this.blur();
			}).click(function(){
				switchTab(tabGroup, amount, $(this).data("n"));
				return false;
			});
		});
		$("#"+tabGroup+"CT .tabCTBlock").hide();
		$("#"+tabGroup+"CT .tabCTBlock").each(function(i){
			$(this).data("n", (i+1));
		});
		$("#"+tabGroup+"Tab li a:eq("+(who-1)+")").trigger("click");
	});
}

$(document).ready(function(){
	$(".productList li:nth-child(3n-2)").addClass("firstInRow");
	$(".classList li:nth-child(3n-2)").addClass("firstInRow");
});



