$(document).ready(function() { 
/* ---- Funkce na mizeni textu z vyhledavani */ 
	
	
	$("a, acronym, th, td, span, div, img").easyTooltip();
	
	// Prevezme text z elementu label
	var labelTxt = $('#header form label').text();

	// Prida text z elementu label do vyhlevaciho pole - value
	$('#search-input').attr('value',labelTxt);
	
	// Focus & blur efekty
	$('#search-input').focus(function(){
		if ((this.value == '') || (this.value == labelTxt)) {
			$(this).val('');
			$(this).addClass('focus');
		}
	});
	$('#search-input').blur(function(){
		if (this.value == '') {
			$(this).val(labelTxt);
			$(this).removeClass('focus');
		}
	});
	
	
	$('.backtotop').click(function(){
		$('html, body').animate({scrollTop:0}, 'slow');
	});	
	
	
    $(".ajax-click").click(
    	function(e)
    	{
    		e.preventDefault();
			var param = $(this).attr('rel');
			showMore(param) ;
    
		}
	);
	
	
	$('#fav').jFav();	
	

	$('#slideIMG').innerfade({ 
        speed: 'slow',
				timeout: 3000,
				type: 'sequence',
				containerheight: '180px'
 }); 
 
 

	
/* end */
}); 


function delSRProw(id, date)
{
	var agree = window.confirm("Opravdu vymazat?");
	if (agree)
	{
		document.location.href="?date="+date+"&id="+id+"&del=1";
		tb_remove();
	}
}


function showMore(no)
{
	var link_text = $('#link'+no).html();
	if (link_text == 'zavřít')
	{
		$('#cely'+no).hide('fast');
		$('#link'+no).html('více');
	}
	else
	{
		$('#cely'+no).show('fast');
		$('#link'+no).html('zavřít');
	}
	
}