function reHour() {
  var datum = new Date();
  if(datum.getMinutes()<10) {
    var min = "0"+datum.getMinutes().toString();
  }
  else {
    var min = datum.getMinutes();
  }
  document.getElementById("hodiny").innerHTML = datum.getHours()+":"+min;
  setTimeout("reHour()", 1000); 
}

function fbs_click() {
  u=location.href;
  t=document.title;
  window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');
  return false;
}

$(document).ready(function(){
  //reHour();
  $("#mainMenu li").hover(function(){
    $('a:first',this).addClass("hover");
    $('ul:first',this).css('display', 'block');
    $('ul:first li',this).hover(function(){
      $('ul:first',this).css('display', 'block');
    },function(){
      $('ul:first',this).css('display', 'none');
    });
  },function(){
    $('ul:first',this).css('display', 'none');
    $('a:first',this).removeClass("hover");
  });
});

// profil
function vlozitFotku() {
  if(document.getElementById("insFoto").style.display == "block") {
    document.getElementById("insFoto").style.display = "none";
  }
  else {
    document.getElementById("insFoto").style.display = "block";
  }
}
function vlozitFolder() {
  if(document.getElementById("insFotoFolder").style.display == "block") {
    document.getElementById("insFotoFolder").style.display = "none";
  } else {
    document.getElementById("insFotoFolder").style.display = "block";          
  }
}
function kont() {
  if(document.fi.foto.value != "") {
    return true;
  }
  else {
    alert("Je potřeba vybrat soubor fotografie.");
    return false;
  }
}
