var ie6 = false;
$(document).ready(function () {
	if(jQuery.browser.version == "6.0" && jQuery.browser.msie){
		ie6 = true;
	}
	if(ie6) {
		initNavigation();
		fixPostsHeight();
		
		
	}


	initInputTextEvents("#contextuelPart");
	initInputTextEvents("#commentaires_form");

});

function fixPostsHeight(){
	var posts = $("#allposts .seePost");
	posts.each(function(){	
		var height = $(this).parent().height();
		$(this).height(height);
	});
}



function initInputTextEvents(elm){
	var input = elm +" .text input";
	var textarea = elm +" .textarea textarea";
	$(input+","+textarea).each(function(){
		this.value = this.defaultValue;
	});
	$(input+","+textarea).bind("focus",function(){
		if($(this).attr("value") == this.defaultValue) this.value = ""
	});
	$(input+","+textarea).bind("blur",function(){
		if($(this).attr("value") == "") this.value = this.defaultValue
	});
}

function initNavigation(){
	var menu = $("#menu");
	$("#menu .cat").hover(
	function () {	
			$(this).find(".navN2").css("display","block");
		},
		function () {	
			$(this).find(".navN2").css("display","none");
		}
	);
}



