// ON LOAD
$(document).ready(function(){

	setTimeout("col3height()", 500);

	if ($("#l-nm").val()=='') { $("#l-nm").val('UŽIVATELSKÉ JMÉNO'); }
	$("#l-nm").focus(function(){
		if($(this).val()=='UŽIVATELSKÉ JMÉNO'){ $(this).val(''); }
	});
	
	if (rs_hp) {
		$("#hp-reader").html(rrfc);
	}
	
	if ($("#l-pw-p").val()=='') { $("#l-pw-p").css("display","none"); $("#l-pw-t").css("display","inline"); }
	$("#l-pw-t").focus(function(){
		$("#l-pw-t").css("display","none"); $("#l-pw-p").css("display","inline").focus();
	});
	
	$("#readed-bottom DIV.ow:last").css("border-right","0");
	
	
	$("#z-readed").mouseover(function(){
		$("#z-commen").removeClass().addClass("unact").css("border-left","0").css("border-right","1px solid white");
		$("#z-middle").removeClass().addClass("re-act");
		$(this).removeClass().addClass("active").css("border-right","0").css("border-left","1px solid #C5C7C8").blur();
		$("#readed2, #commen1, #commen2").css("display","none"); $("#readed1").css("display","block");
		return false;
	});
	$("#z-commen").mouseover(function(){
		$("#z-readed").removeClass().addClass("unact").css("border-right","0").css("border-left","1px solid white");
		$("#z-middle").removeClass().addClass("co-act");
		$(this).removeClass().addClass("active").css("border-left","0").css("border-right","1px solid #C5C7C8").blur();
		$("#readed1, #readed2, #commen2").css("display","none"); $("#commen1").css("display","block");
		return false;
	});
	
	var d_big_img = $("#big-img-src").html();
	if (d_big_img!="") {
		$("#big-img").html(d_big_img);
		var d_dx = get_xPos("respekt")+1;
		var bi_h = $("#big-img IMG").attr("height");
		$("#big-img-bg").css("left",d_dx+"px");
		$("#big-img").css("left",d_dx+"px");
		$("#big-img IMG").attr("title", "Kliknutím zavřete");
		
		$("#big-img").click(function(){
			$("#big-img-bg").hide("normal");
			$("#big-img").hide("normal");
			return false;
		});
	}
	$("#big-img-a").click(function(){
		if (d_big_img!="") {
			$("#big-img-bg").css("top",(page_ay+5)+"px").css("height",(bi_h+40)+"px").fadeTo(0, 0.95).show("fast");
			$("#big-img").css("top",(page_ay+25)+"px");
			$("#big-img").show("normal");
		}
		return false;
	});
	$(".authoritative_entry .comm-text-spam").html('příspěvek autora');
	
	if (document.getElementById("comm-count-to")==null) { $("#comm").css("display","none"); } else { $("#comm-count-to").append($("#comm-count-from").html()); }
	
});
