
function init_box(u){

if(u == 'up')
{
$("#up_1").css("color", "#707070").css("background", "url(css/default/images/grey/tab_first.png)");
$("#up_2").css("color", "#707070").css("background", "url(css/default/images/grey/tab_mid.png)");
$("#up_3").css("color", "#707070").css("background", "url(css/default/images/grey/tab_last.png)");
$("#up_content_1").hide();
$("#up_content_2").hide();
$("#up_content_3").hide();
}
else
{
$("#bot_1").css("color", "#707070").css("background", "url(css/default/images/grey/tab_first.png)");
$("#bot_2").css("color", "#707070").css("background", "url(css/default/images/grey/tab_mid.png)");
$("#bot_3").css("color", "#707070").css("background", "url(css/default/images/grey/tab_last.png)");
$("#bot_content_1").hide();
$("#bot_content_2").hide();
$("#bot_content_3").hide();
}

};


$(function(){

$("#up_1").css("color", "#ff6600").css("background", "url(css/default/images/grey/tab_first_h.png)");
$("#up_content_2").hide();
$("#up_content_3").hide();

$("#bot_1").css("color", "#ff6600").css("background", "url(css/default/images/grey/tab_first_h.png)");
$("#bot_content_2").hide();
$("#bot_content_3").hide();



$("#up_1").click(function(){
init_box('up');

$(this).css("color", "#ff6600").css("background", "url(css/default/images/grey/tab_first_h.png)");
$("#up_content_1").fadeIn('slow');

});

$("#up_2").click(function(){
init_box('up');
$(this).css("color", "#ff6600").css("background", "url(css/default/images/grey/tab_mid_h.png)");

$("#up_content_2").fadeIn('slow');

});

$("#up_3").click(function(){
init_box('up');
$(this).css("color", "#ff6600").css("background", "url(css/default/images/grey/tab_last_h.png)");

$("#up_content_3").fadeIn('slow');

});

$("#bot_1").click(function(){
init_box();
$(this).css("color", "#ff6600").css("background", "url(css/default/images/grey/tab_first_h.png)");

$("#bot_content_1").fadeIn('slow');

});

$("#bot_2").click(function(){
init_box();
$(this).css("color", "#ff6600").css("background", "url(css/default/images/grey/tab_mid_h.png)");

$("#bot_content_2").fadeIn('slow');

});

$("#bot_3").click(function(){
init_box();
$(this).css("color", "#ff6600").css("background", "url(css/default/images/grey/tab_last_h.png)");

$("#bot_content_3").fadeIn('slow');

});

	
	
	if($(".selected_tab3").css("display") == "block")
	{
		init_box('up');
		
		$(".selected_tab3").css("color", "#ff6600").css("background", "url(css/default/images/grey/tab_last_h.png)");
		$("#up_content_3").show();
	}
	else
	{
		$("#up_1").css("color", "#ff6600").css("background", "url(css/default/images/grey/tab_first_h.png)");
		$("#up_content_2").hide();
		$("#up_content_3").hide();
		
	}



});

