//
//IF DOCUMENT READY LOADED
//
$(document).ready(function() {
	//
	//MODEFY THE COMMENTS
	//
	
	$("ul.commentlist li:not('ul.commentlist li ul li')").each(function(){
		
		if($("ul.children", this).length) {
			var EndType = 'children';
		}
		else 
		{
			var EndType = 'single';
		}
		$(this).addClass(EndType);
	});
	

	//
	//FORM MOD
	//
	$('input, textarea').each(function () {
		if ($(this).val() == '') {
			$(this).val($(this).attr('defaultvalue'));
		}
	}).focus(function () {
		$(this).removeClass('inputerror');
		if ($(this).val() == $(this).attr('defaultvalue')) {
			$(this).val('');
		}
	}).blur(function () {
		if ($(this).val() == '') {
			$(this).val($(this).attr('defaultvalue'));
		}
	});		
	
	//
	// OVERVIEW COMMENTS NUMBERS
	//
	$(".comment-nu").css("opacity","0.5");
	$(".comment-nu").hover(function () {
		$(this).stop().animate({
			opacity: 1
			}, 'slow');
		},
		function () {
			$(this).stop().animate({
				opacity: 0.5
			}, 'slow');
	});

	

	
//END DOCUMENTS FUNCTIONS
});


