/*featuredFullClickTab = document.getElementById("featuredFullClick1");
height1 = document.getElementById("featuredTitle1");
height2 = document.getElementById("featuredImg1");
height3 = document.getElementById("linkFeatured1");
alert(200 - (height1.style.height + height2.style.height + height3.style.height));
featuredFullClickTab.style.height = 200 - (height1.style.height + height2.style.height + height3.style.height);*/

function setFeaturedTabWhite(obj){
	obj.style.color = "#8a8a8a";
	obj.style.backgroundImage = 'url(/medias/img/featuredtab.png)';
	var name = obj.id;
	var nb = name.substr(-1);
	setFeaturedInsideTabWhite("linkFeatured"+nb);
	var h3 = document.getElementById("h3id"+nb);
	h3.style.height = "0px";
	h3.style.width = "0px";
	h3.style.backgroundColor = "";
}

function setFeaturedTabBlue(obj){
	obj.style.color = "white";
	obj.style.backgroundImage = 'url(/medias/img/featuredtabhover.png)';
	var name = obj.id;
	var nb = name.substr(-1);
	setFeaturedInsideTabBlue("linkFeatured"+nb);
	var h3 = document.getElementById("h3id"+nb);
	h3.style.height = "7px";
	h3.style.width = "30px";
	h3.style.backgroundColor = "#004f71";
}

function setFeaturedInsideTabWhite(varlink){
	var obj = document.getElementById(varlink);
	obj.style.color = "#8a8a8a";
}

function setFeaturedInsideTabBlue(varlink){
	var obj = document.getElementById(varlink);
	obj.style.color = "white";
}

/*Archives*/
$(document).ready(function(){
	if($("#arc_lweek").html()!=""){
		$("#arc_result").hide();
		$("#arc_result").show('slow');
	}
	
	if($("#arc_lweek").html()!=""){
		$("#arc_lweek").hide();	
		var arc_lweek_status = false;
		$("#arc_lweek_link").click(function(event){
			if(arc_lweek_status == false){
				$("#arc_lweek").show('slow');
				arc_lweek_status = true;
			}
			else{
				$("#arc_lweek").hide('slow');
				arc_lweek_status = false;
			}
		});
	}
	
	if($("#arc_lmonth").html()!=""){
		$("#arc_lmonth").hide();
		var arc_lmonth_status = false;
		$("#arc_lmonth_link").click(function(event){
			if(arc_lmonth_status == false){
				$("#arc_lmonth").show('slow');
				arc_lmonth_status = true;
			}
			else{
				$("#arc_lmonth").hide('slow');
				arc_lmonth_status = false;
			}
		});
	}
	
	if($("#arc_lyear").html()!=""){
		$("#arc_lyear").hide();
		var arc_lyear_status = false;
		$("#arc_lyear_link").click(function(event){
			if(arc_lyear_status == false){
				$("#arc_lyear").show('slow');
				arc_lyear_status = true;
			}
			else{
				$("#arc_lyear").hide('slow');
				arc_lyear_status = false;
			}
		});
	}
 });
