/* MENU */

var timeout    = 100;
var closetimer = 0;
var ddmenuitem = 0;

function jsddm_open()
{  jsddm_canceltimer();
   jsddm_close();
   ddmenuitem = $(this).find('ul').css('visibility', 'visible');}

function jsddm_close()
{  if(ddmenuitem) ddmenuitem.css('visibility', 'hidden');}

function jsddm_timer()
{  closetimer = window.setTimeout(jsddm_close, timeout);}

function jsddm_canceltimer()
{  if(closetimer)
   {  window.clearTimeout(closetimer);
      closetimer = null;}}

$(document).ready(function()
{  $('#jsddm > li').bind('mouseover', jsddm_open)
   $('#jsddm > li').bind('mouseout',  jsddm_timer)});

document.onclick = jsddm_close;




/* Bubliny 

=====================
*/


/***********************************************
* Cool DHTML tooltip script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
/*
var offsetxpoint=-88 //Customize x offset of tooltip
var offsetypoint=20 //Customize y offset of tooltip
var ie=document.all
var ns6=document.getElementById && !document.all
var enabletip=false
if (ie||ns6)
  var tipobj=document.all? document.all["dhtmltooltip"] : document.getElementById? document.getElementById("dhtmltooltip") : ""
*/


function ietruebody(){
  //return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function ddrivetip(thetext){
  /*thecolor = 'transparent';
  thewidth = '178';
  if (ns6||ie){
    if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px"
    if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor=thecolor
    document.getElementById('dhtmltooltip-text').innerHTML=thetext
    enabletip=true
    return false
  }*/
}

function positiontip(e){
  /*if (enabletip){
    var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft;
    var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop;
    //Find out how close the mouse is to the corner of the window
    var rightedge=ie&&!window.opera? ietruebody().clientWidth-event.clientX-offsetxpoint : window.innerWidth-e.clientX-offsetxpoint-20
    var bottomedge=ie&&!window.opera? ietruebody().clientHeight-event.clientY-offsetypoint : window.innerHeight-e.clientY-offsetypoint-20
    
    var leftedge=(offsetxpoint<0)? offsetxpoint*(-1) : -1000
    
    //if the horizontal distance isn't enough to accomodate the width of the context menu
    if (rightedge<tipobj.offsetWidth)
      //move the horizontal position of the menu to the left by it's width
      tipobj.style.left=ie? ietruebody().scrollLeft+event.clientX-tipobj.offsetWidth+"px" : window.pageXOffset+e.clientX-tipobj.offsetWidth+"px"
    else if (curX<leftedge)
      tipobj.style.left="5px"
    else
      //position the horizontal position of the menu where the mouse is positioned
      tipobj.style.left=curX+offsetxpoint+"px"

    //same concept with the vertical position
    if (bottomedge<tipobj.offsetHeight){
      tipobj.style.top=ie? ietruebody().scrollTop+event.clientY-tipobj.offsetHeight-offsetypoint+"px" : window.pageYOffset+e.clientY-tipobj.offsetHeight-offsetypoint+"px"
      $("#dhtmltooltip > div:first").css({"background-image":"url('layout/bubble/bubble_top.png')", "height":"3px"});
      $("#dhtmltooltip > div:last").css({"background-image":"url('layout/bubble/bubble_bottom_arrow.png')", "height":"10px"});
    }
    else{
      tipobj.style.top=curY+offsetypoint+"px"
      $("#dhtmltooltip > div:first").css({"background-image":"url('layout/bubble/bubble_top_arrow.png')", "height":"10px"});
      $("#dhtmltooltip > div:last").css({"background-image":"url('layout/bubble/bubble_bottom.png')", "height":"3px"});
    }
    tipobj.style.visibility="visible"
  }*/
}

function hideddrivetip(){
  /*if (ns6||ie){
    enabletip=false
    tipobj.style.visibility="hidden"
    tipobj.style.left="-1000px"
    tipobj.style.backgroundColor=''
    tipobj.style.width=''
  }*/
}

//document.onmousemove=positiontip



/*
=====================
*/



/* TINY MCE */
/*
tinyMCE.init({
		// General options
		
		mode : "specific_textareas",
		editor_selector : "clanek-obsah",
		theme : "advanced",
		plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
		onchange_callback : "autoSaveCasovac",
		// Theme options
		theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,formatselect,fontselect,fontsizeselect,|,forecolor,backcolor",
		theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,image,cleanup,code,|,preview",
		theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr",
		theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,|,print,|,ltr,rtl,|,fullscreen",
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left",
		theme_advanced_statusbar_location : "bottom",
		theme_advanced_resizing : true,
		file_browser_callback : "fileBrowserCallBack",
		// Example content CSS (should be your site CSS)
		//content_css : "style.css",

		// Drop lists for link/image/media/template dialogs
		template_external_list_url : "lists/template_list.js",
		external_link_list_url : "lists/link_list.js",
		external_image_list_url : "lists/image_list.js",
		media_external_list_url : "lists/media_list.js",

		// Replace values for the template plugin
		template_replace_values : {
			username : "Some User",
			staffid : "991234"
		}
	});
*/


	
	$().ready(function() {
		$('textarea.tinymce').tinymce({
			// Location of TinyMCE script
			script_url : '/js/tiny_mce/tiny_mce.js',

			// General options
			theme : "advanced",
			//mode : "specific_textareas",
			//editor_selector : "clanek-obsah",
			
			plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",

			// Theme options
		theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,formatselect,fontselect,fontsizeselect,|,forecolor,backcolor",
		theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,image,cleanup,code,|,preview",
		theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr",
		theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,|,print,|,ltr,rtl,|,fullscreen",
			theme_advanced_toolbar_location : "top",
			theme_advanced_toolbar_align : "left",
			theme_advanced_statusbar_location : "bottom",
			theme_advanced_resizing : true,

			// Example content CSS (should be your site CSS)
			//content_css : "css/content.css",

			// Drop lists for link/image/media/template dialogs
			template_external_list_url : "lists/template_list.js",
			external_link_list_url : "lists/link_list.js",
			external_image_list_url : "lists/image_list.js",
			media_external_list_url : "lists/media_list.js",

			// Replace values for the template plugin
			template_replace_values : {
				username : "Some User",
				staffid : "991234"
			}
		});
	});
	










/*
*
* Změna jména ticketu
*
*/
function zmena_nazvu_ticketu(hodnota){
	$.ajax({
		url: 'ajax.php?akce=zmena_jmena_ticketu&nazev='+hodnota,
		type: "GET",
		succes: function(feedback){
			$("#hlaska").html("Úspěšně změněn název tiketu");
		}		
		});
}

/*
 *
 * Pokud jsme na strance sazky tak refreshneme obsah
 *
 */
function refresh_sazek(pod_kategorie,kategorie){
	$.ajax({
			url: 'sazky.php',
			type: "GET",
			data: "akce=ukaz_sazku&pod_kategorie="+pod_kategorie+"&kategorie="+kategorie,
			 //complete: function(){},
			success: function(feedback){
				$("#hlavni-obsah-stranky").html(feedback);
			}
		// error: function(){}
		});
}



/*
*
* Funkce pro zobrazení a skrytí prvků webu
*
*/
function zobraz(id){

		//$("#"+id).show("blind", {}, 500);
	  $("#"+id).wrap('<div/>').slideDown(function () {
      $("#"+id).show();
    	});	 
}


function skryjZobraz(id){
	

/*		
      jQuery.fn.slideFadeToggle = function(speed, easing, callback) {
        return this.animate({opacity: 'toggle', height: 'toggle'}, speed, easing, callback); 
      };
      $("div#box1").next().fadeToggle('slow');
*/

	if(document.getElementById(id).style.display == "none"){
		//$("#"+id).show("blind", {}, 500);
	  $("#"+id).wrap('<div/>').slideDown(function () {
      $("#"+id).show();
    	});
	}else{
		//$("div#"+id).hide("blind", {}, 1000);
		//$("#"+id).hide("blind", { direction: "vertical" }, 500);
		//$("#"+id).show("blind", {}, 500);
	  $("#"+id).wrap('<div/>').slideUp(function () {
      $("#"+id).hide();
    	});	  

	}
}


/*
* 
* Výpis historie uživatele 
*
*/


function zmena_historie_fce()
{
	if (document.nova_zprava.komu.value.length < 3){
		$("#zpravy_obsah").html("Pokračujte vyplněním příjemce");
	}else{
		$.ajax({
			url: 'ajax.php?akce=historie&nick='+document.nova_zprava.komu.value,
			type: "GET",
			 //complete: function(){},
			success: function(feedback){
				$("#zpravy_obsah").html(feedback);			
			}
		// error: function(){}
		});
	}
}




function otevrit_roletku(co){
	var skryta = document.getElementById("skryta").value; 
	if (skryta == 1){
		co.src = "layout/zpravy/icon_zavrit-roletku.jpg";
		document.getElementById("skryta").value = "0";
			
	}else{
		co.src = "layout/zpravy/icon_otevrit-roletku.jpg";
		document.getElementById("skryta").value = "1";	
	}
	zpravy_komu();
}

function zpravy_klik(co){
	var skryta = document.getElementById("skryta").value;
	document.getElementById("komu").value = co.innerHTML;
	if(skryta == "1"){
		//otevrit_roletku(document.getElementById("roletka"));
		zrusit_rolet();
	}
	zmena_historie_fce();
}

function zpravy_najeti(kde){
	kde.style.backgroundColor= "#EAEAEA";
}

function zpravy_odjeti(kde){
	kde.style.backgroundColor= "white";
}

function zrusit_rolet(){
	if (document.getElementById("skryta").value == "1"){document.getElementById('komu_vyber').style.display = 'none';}
}




/* AJAX pro roletku s uzivatelema */
function zpravy_komu()
{
	document.getElementById("komu_vyber").style.display = "";
	var delka = document.getElementById("komu").value.length;
	if (document.getElementById("skryta").value == "1"){
    if (parseFloat(delka) > 1) {document.getElementById("komu_vyber").style.display = "block"; var povolit = true;}else{
		document.getElementById("komu_vyber").style.display = 'none'; var povolit = false;
	}
	}else{
		povolit = true;
		document.getElementById("komu_vyber").style.display = "block";
	}
	if (povolit){
            
            
        $.ajax({
			url: 'ajax.php',
			type: "GET",
			data: 'akce=roletka&nick=' + document.getElementById("komu").value,
			 //complete: function(){},
			success: function(feedback){
                                    document.getElementById("komu_vyber").innerHTML = '';
                                    var vstup = feedback;	
                                    var kde = vstup.indexOf("/||/");
                                    document.getElementById("komu_vyber").innerHTML =  vstup.substr(0,kde);

                                            var pocet = vstup.substr(kde + 4);		
                                            if (pocet < 5){
                                                    document.getElementById("komu_vyber").style.height = (pocet) * 25 + "px";
                                            }
                                            /*var temp = new Array();
                                    temp = vstup.split('[NEXT-LINE]');

                                    for (var i = 0; i < temp.length - 1; i++){
                                                    document.getElementById("komu_vyber").innerHTML += '<div class="vyber_radek">'+ temp[i] +'</div>';	
                                            }


                                    */
			}
		// error: function(){}
		});  
            
            
        
//     var url =  'ajax.php?akce=roletka&nick=' + document.getElementById("komu").value;
//     if (url != 0)
//     {
//        if (window.ActiveXObject)
//        {
//          httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
//        }
//        else
//        {
//          httpRequest = new XMLHttpRequest();
//        }
//        httpRequest.open("GET", url, true);
//        httpRequest.onreadystatechange= function () {processRequest(); } ;
//        httpRequest.send(null);
//      }
//      else
//      {
//
//        document.getElementById("mistoZobrazeni").innerHTML = "";
//        
//      }
    }
}

function processRequest()
{
//  if (httpRequest.readyState == 4)
//  {
//    if(httpRequest.status == 200)
//    {
//
//    }
//    else
//    {
//        alert("Chyba pri nacitani stanky"+ httpRequest.status +":"+ httpRequest.statusText);
//    }
//  }
}


/* KONEC PRO AJAX NAROLETKU */

function odeslani_tiketu_prepocet_kurs(){
	if (!isNaN(document.getElementById('hodnota_sazky').value)){
		document.getElementById('moznavyhra').innerHTML = Math.round(document.getElementById('celkovy_kurs').innerHTML * document.getElementById('hodnota_sazky').value) + ',-';
	}else{
		document.getElementById('moznavyhra').innerHTML = "Sázka musí být celé číslo";
	}
}




function zapas_detail(id){
	var id = 'zapas_' + id;
	if(document.getElementById(id).style.display == ""){
		//document.getElementById(id).style.display = "none";
      $("#"+id).fadeOut("def");
	}else{
		//document.getElementById(id).style.display = "";
      $("#"+id).fadeIn("def");
	}
}


function najeti(co){
	document.getElementById(co).style.backgroundImage = 'url(layout/horni_menu/1px_potlacene.jpg)';
}

function odjeti(co){
	document.getElementById(co).style.backgroundImage = 'url(layout/horni_menu/1px_nepotlacene.jpg)';
}


function leve_menu_akce(co){
	if (document.getElementById(co).style.display == 'none'){
		//document.getElementById(co).style.display = '';
		$("#"+co).slideDown("slow");
		document.getElementById(co + '_sipka').src = 'layout/sipka_poklik.gif';
	}else{
		//document.getElementById(co).style.display = 'none';
		$("#"+co).slideUp("slow");
		document.getElementById(co + '_sipka').src = 'layout/sipka_normal.gif';
		
	}
}


function leve_podmenu_najeti(co){
	document.getElementById(co).style.backgroundImage = 'url(layout/leve_menu/podklad_otevrene_menu__po.jpg)';
	document.getElementById(co).style.textDecoration = 'underline'; 	
}

function leve_podmenu_odjeti(co){
	document.getElementById(co).style.backgroundImage = 'url(layout/leve_menu/podklad_otevrene_menu.jpg)';
	document.getElementById(co).style.textDecoration = 'none';
}

function add_match_zmena_hry(co){
	//location.replace('index.php?pg=_zapasy&amp;akce=add&amp;game='+co.value);
        location.replace('index.php?pg=_zapasy&akce=add&game='+co.value);
}

function list_zapasy_zmena_hry(co){
	location.replace('index.php?pg=_zapasy&akce=list&game='+co.value);
}


function list_tymy_zmena_hry(co){
	location.replace('index.php?pg=_tymy&akce=list&game='+co.value);
}
function list_tymy_zmena_narodnost(co){
var hra = document.getElementById("list-tymy-zmena-hry").value;
  location.replace('index.php?pg=_tymy&akce=list&game='+hra+'&narodnost='+co.value);
}

function list_mapy_zmena_hry(co){
	location.replace('index.php?pg=_mapy&akce=list&game='+co.value);
}

function list_ligy_zmena_hry(co){
	location.replace('index.php?pg=_ligy&akce=list&game='+co.value);
}


function pollVote(cid,option,hash){
	$("#poll"+cid).html('<img src="layout/ajax-loader.gif" alt="Loading">');
	$.ajax({
		url: 'ajax.php?akce=pollVote&cid='+cid+'&option='+option+'&hash='+hash,
		type: "GET",
		success	: function(feedback){
			$("#poll"+cid).html(feedback);
		}
		});
	
}

function changeMainSmallArea(main,sub,type,subtype){
	if (sub == "left"){
		$("#main-panel-"+main+"-small-header-text-left").attr("src","layout/button/"+type+"-selected.png")
		$("#main-panel-"+main+"-small-header-text-right").attr("src","layout/button/"+subtype+".png")
	}else{
		$("#main-panel-"+main+"-small-header-text-left").attr("src","layout/button/"+subtype+".png")
		$("#main-panel-"+main+"-small-header-text-right").attr("src","layout/button/"+type+"-selected.png")		
	}
	
	//$("#main-panel-"+main+"-small-main").html('<img src="layout/ajax-loader.gif" alt="Loader">');
	
	$("#main-panel-"+main+"-small-main").fadeOut("fast");
	
	$.ajax({
		url: "ajax.php?akce=changeMainSmallArea&type="+type,
		type: "GET",
		success	: function(feedback){
			$("#main-panel-"+main+"-small-main").html(feedback);
			$("#main-panel-"+main+"-small-main").fadeIn("fast");		
		}
		});
}


function addBet(matchId,type,option,hash){
	
	$("#line-"+matchId+" > .bet-line-cell-voted").removeClass("bet-line-cell-voted");
	//this.className = 'bet-line-cell-voted';
	
	$("#bet-matchid-"+matchId+'-option-'+option).parent().addClass("bet-line-cell-voted");
	$("#ticket-main").html('<img src="layout/ajax-loader.gif" alt="Loading" />');
	
	
	$.ajax({
		url: 'ajax.php',
		type: "POST",
		data: 'akce=addBet&matchId='+matchId+'&type='+type+'&option='+option+'&hash='+hash,
		success	: function(feedback){
			$("#ticket-main").html(feedback);
		}
		});
}

function deleteBet(matchid,type,option,id,hash,course,page){
	$("#tiket_zapas_"+id).remove();
	$.ajax({
			url: 'ajax.php',
			type: "POST",
			data: "id="+id+"&akce=deleteBet&hash="+hash+"&page="+page,
			success: function(feedback){
				if ($("#bet-matchid-"+matchid+"-option-"+option).length){
					$("#bet-matchid-"+matchid+"-option-"+option).parent().removeClass("bet-line-cell-voted");
				}
				$("#totalCours").html(Math.round(($("#totalCours").html() / course)*100)/100);
				
				
				if (page){
					$("#ticket-send").html(feedback);
				}
				
			}
			
		// error: function(){}
		});		
}


function deleteTicket(id,actual){
	$("#tickets").fadeOut("fast");
	$.ajax({
		url: 'ajax.php',
		type: "POST",
		data: "id="+id+"&akce=deleteTicket",
		success: function(feedback){
			$("#tickets").html(feedback);
			$("#tickets").fadeIn("slow");
		}
	});
	
	if (actual){
		$("#ticket-main").fadeOut("fast");
		$.ajax({
			url: 'ajax.php',
			type: 'POST',
			data: 'id='+id+'&akce=refreshTicket',
			success: function(feedback){
				$("#ticket-main").html(feedback);
				$("#ticket-main").fadeIn("slow");
			}
		});				
	}
	
}

function setDefaultTicket(id){
	$("#ticket-main").fadeOut("fast");
		$.ajax({
			url: 'ajax.php',
			type: 'POST',
			data: 'id='+id+'&akce=setDefaultTicket',
			success: function(feedback){
				$("#ticket-main").html(feedback);
				$("#ticket-main").fadeIn("slow");
			}
		});				
}


function ticketMoreInfo(id){
	if ($("#ticket-more-info-"+id).css("display") == "none"){
		$("#ticket-more-info-"+id).slideDown();
		$("#ticket-more-info-icon-"+id).attr('src','layout/icon/minus.png');
	}else{
		$("#ticket-more-info-"+id).slideUp();
		$("#ticket-more-info-icon-"+id).attr('src','layout/icon/plus.png');
	}
}


function newTicket(){
	$("#tickets").fadeOut("fast");
		$.ajax({
			url: 'ajax.php',
			type: 'POST',
			data: 'akce=newTicket',
			success: function(feedback){
				$("#tickets").html(feedback);
				$("#tickets").fadeIn("slow");
			}
		});			
}


function rankOrder(order,type,skip,step){
	
	$("#rank-main").fadeOut("fast");
	
	if (skip == undefined || skip == 0){
		if ($("#rank-arrow-"+order+"-desc").length){
			var orderType = "asc";
		}else{
			var orderType = "desc";
		}
	}else{
		if ($("#rank-arrow-"+order+"-desc").length){
			var orderType = "desc";
		}else{
			var orderType = "asc";
		}
	}
	
	$.ajax({
			url: 'ajax.php',
			type: 'POST',
			data: 'akce=rankOrder&order='+order+'&orderType='+orderType+'&type='+type+'&skip='+skip+'&step='+step,
			success: function(feedback){
				$("#rank-main").html(feedback);
				$("#rank-main").fadeIn("slow");
			}
		});	
	
}


function showForumTopic(){	
	if ($("#pridatkomentar").attr("src") == "layout/button/add-topic.jpg"){
		$("#pridatkomentar").attr("src","layout/button/add-topic-selected.jpg");
		
		$("#pridat-topic-box").slideDown("slow");
	}else{
		
		$("#pridat-topic-box").slideUp("slow",function (){$("#pridatkomentar").attr("src","layout/button/add-topic.jpg");});
		
	}
	
}


function showForumMessage(){
	if ($("#pridatkomentar").attr("src") == "layout/button/addMessage.jpg"){
		$("#pridatkomentar").attr("src","layout/button/addMessage-selected.jpg");
		
		$("#pridat-komentar-box").slideDown("slow");
	}else{
		
		$("#pridat-komentar-box").slideUp("slow",function (){$("#pridatkomentar").attr("src","layout/button/addMessage.jpg");});
		
	}
	
}


function showFormChangePw(){
	$("#mainInformation").slideUp("normal",
		function (){

		$("#leftTopTitle").html("Změna hesla");
		$("#changePassword").slideDown("normal");
		
	});
	
}

function showMainInformation(){
	$("#changePassword").slideUp("normal",
		function (){

		$("#leftTopTitle").html("Obecné informace");
		$("#mainInformation").slideDown("normal");
		
	});
	
}

function changePw(){
	
	newPw = $("#newPw").attr("value");
	newPw2 = $("#newPw2").attr("value");
	oldPw = $("#oldPw").attr("value");
	hash = $("#hash").attr("value");
	
	$.ajax({
		
		url: 'ajax.php',
			type: 'POST',
			data: 'akce=changePw&newPw='+newPw+'&newPw2='+newPw2+'&oldPw='+oldPw+'&hash='+hash,
			success: function(feedback){
				$("#changePasswordCallback").html(feedback);
		}
		
	})
	
}


function inviteYourFriend(){
	
	$("#inviteYourFriend-button").fadeOut("normal",function (){
		
		$("#inviteYourFriend-form").fadeIn("normal");
		
	})
	
}

function inviteYourFriendClose(){
	
	$("#inviteYourFriend-form").fadeOut("normal",function (){
		
		$("#inviteYourFriend-button").fadeIn("normal");
		
	})
	
}


function inviteYourFriendSend(){
	
		email = $("#inviteYourFriend-email").attr("value");
	
		$.ajax({
		
		url: 'ajax.php',
			type: 'POST',
			data: 'akce=inviteYourFriend&email='+email,
			success: function(feedback){
				$("#inviteYourFriend-response").html(feedback);
				$("#inviteYourFriend-email").attr('value','');
		}
		
	})
	
}

function againActiveAccount(id){
	$.ajax({	
		url: 'ajax.php',
		type: 'POST',
		data: 'akce=againActivateAccount&id='+id,
		success: function(feedback){
			$("#hlaska").html(feedback);
		}
	})
}

