function poslatOdkazEmailem(e)
{
	var href = e.href;
	href = href + "?link=" + encodeURIComponent(window.location.href);
	// + "&title=" + encodeURIComponent(document.title);
	window.location = href; 
	return true;
}

// presumed public domain, http://stackoverflow.com/questions/275931/how-do-you-make-an-element-flash-in-jquery 
jQuery.fn.flashBackgroundColor = function( color, duration )
{
    var current = this.css('background-color');
    this.animate({ backgroundColor: 'rgb(' + color + ')'}, duration / 2);
    this.animate({ backgroundColor: current}, duration / 2);
}

function prihlaseniZobrazitABliknout(typ)
{
	var blok = '';
	if (typ == 'media')
		blok = 'tabLoginMedia';
	else if (typ == '6smysl')
		blok = 'tabLogin6smysl';
	else if (typ == 'servis')
		blok = 'tabLoginServis';
	
	$('#loginLayout').show();
	
	if (blok != '')
	{
		$('#'+blok+'Zalozka').click();
		$('#'+blok).flashBackgroundColor('200,200,255', 1000);
	}
		
	return true;
}

function mediaZatrzitko(e)
{
	var url = document.location.href.replace(/&kosik_\w+=[^&]+/, '');
	if (e.checked)
		url += '&kosik_pridat=' + e.value;
	else
		url += '&kosik_odebrat=' + e.value;
	window.location = url;
}

