$(function() {
	/* Setup Tabs */
	$('.tab_section').not(':first').hide();
	var setwidth = $('.tab_section:first').width();
	$('.tab_section').width(setwidth);
	$('.tabs a').each(function() {
		var setwidth = $(this).width();
		$(this).width(setwidth);
	}).click(
			function(e) {
				e.preventDefault();
				$('.tab_section').hide();
				$('.current_tab').removeClass('current_tab');

				$($(this).attr('href')).show();
				$(this).addClass('current_tab');

				$('.tabs .red').removeClass('red').addClass('blk');
				$('.current_tab.blk,.current_tab .blk').removeClass('blk').addClass('red');
				eCurve2();
			});
	
	/* Add Curves */
	eCurve2();
	
	/* Training Progress */
	var step = $('#training_progress').attr('class');
	if(step != "s1") { 
		$('#training_progress').css({'background':'#343434 url(/content/'+document.domain+'/images/training/progress_bg.gif) no-repeat top left'});
		$('#training_progress .s1').addClass('complete');
		$('#training_progress .s1').nextUntil('.'+step).addClass('complete'); 
	}
	
	if(step == "s11"){ $('#training_progress, #training_progress .s10').css({backgroundColor:'#B30011'}); }

	var sub_step = $('#training_steps').attr('class');
	if(sub_step != "a") {
		$('#training_steps  a:contains("a")').addClass('complete'); 
		$('#training_steps a:contains("a")').nextUntil('a:contains("'+sub_step+'")').addClass('complete'); 
	}	

	$("#userStatus").focus(function(){
		$("#userStatus").val('');
		$("#wallPostSubmitArea").show();
	});	

	$(".wallPostComments textarea").click(function(){ 
		$("#"+this.id).siblings().show();
	});
	
});
