  /* SEMINARE */
  function openSeminar(id) {
    $('#' + id).toggle();
    if ($('#' + id).css('display') == 'none') {
      $('#' + id).prev().removeClass('noneborder');

    }else{
      $('#' + id).prev().addClass('noneborder');    

    }
  }

$(document).ready(function() {
	$('.oinw').click(function() {
	    var href = $(this).attr('href');
	
		if (href != '#') {
            window.open(href);
		}
		return false;
	});

  /* SEMINARE HOVER */
  $('tbody>tr.sem').hover(function() {
    if ($(this).hasClass('bgseminare') == false) {
      $(this).addClass('bgseminare');
    }else{
      $(this).removeClass('bgseminare');    
    }
  });

  /* ERR HLASKY */
  if($('#header .msg').length > 0) {
    setTimeout("$('#header .msg').fadeOut('slow')", 5000);
  }
  if($('#content .register .msg').length > 0) {
    setTimeout("$('#content .register .msg').fadeOut('slow')", 5000);
  }
  if($('#content .preposlat .msg').length > 0) {
    setTimeout("$('#content .preposlat .msg').fadeOut('slow')", 5000);
  }
  if($('#content .zapomenute-heslo .msg').length > 0) {
    setTimeout("$('#content .zapomenute-heslo .msg').fadeOut('slow')", 5000);
  }

  /* LOGIN */
  $('#username').val('Přihlašovací jméno');
  $('#password').val('******');
  
  $('#username').focus(function() {
    if($(this).val() == 'Přihlašovací jméno') {
      $(this).val('');      
    }
  }).click(function() {
    if($(this).val() == 'Přihlašovací jméno') {
      $(this).val('');      
    }
  });
  
  $('#password').focus(function() {
    if($(this).val() == '******') {
      $(this).val('');      
    }
  }).click(function() {
    if($(this).val() == '******') {
      $(this).val('');      
    }
  });

  $('#username').blur(function() {
    if ($(this).val() == '') {
      $(this).val('Přihlašovací jméno');
    }
  });
  $('#password').blur(function() {
    if ($(this).val() == '') {
      $(this).val('******');
    }
  });
});
