function tabs()
{
	var $t = $("#tabs");	
	var $n = $(".navigation", $t);
	var $c = $(".content", $t);
	var inAnimation = false;
	
	$n.find("a").removeClass("active");
	$n.find("a:eq(0)").addClass("active");
	
	$c.find(".tab").hide();
	$($n.find("a.active").attr("href")).show().addClass("active");
	
	$("a", $n).click(function(){
		if($(this).is(".active") || inAnimation) return false;
		
		$n.find("a").removeClass("active");
		$(this).addClass("active");
		
		$c.find(".active").removeClass("active").hide();
		inAnimation = true;
		$($(this).attr("href")).fadeIn("fast", function(){
			inAnimation = false;
			$(this).addClass('active');
		});
		
		return false;
	});
}


$(document).ready(function(){	
	$("#search select").selectbox();
	
	
	var img2cache = new Array("navigation-first.jpg", "navigation-active.jpg");
	var imagesWithCache = new Array();
	for(i=0; i<img2cache.length; i++)
	{
		imagesWithCache[i] = new Image();
		imagesWithCache[i].src = "css/images/" + img2cache[i];
	}
	
	
	if($.browser.msie && $.browser.version.substr(0,1) == 6 && typeof(DD_belatedPNG)!='undefined') { 
	//	DD_belatedPNG.fix('#sales #members ul li img');
	}
	
	tabs();
});
