$(document).ready(function(){
  
  $('#vypis_bytu tr').mouseover(function() {
    if ($(this).hasClass("even") || $(this).hasClass("odd"))
      $(this).addClass("hover");
  }, function(){
    $(this).removeClass("hover");
  });  
  
  $('#vypis_bytu tr').mouseout(function() {
    $(this).removeClass("hover");
  });  
  
//   $("#vypis_bytu tr").hover(function(){
//     if ($(this).hasClass("even") || $(this).hasClass("odd"))
//       $(this).addClass("hover");
//   }, function(){
//     $(this).removeClass("hover");
//   });
  
  
  $("#vypis_bytu tr").click(function(){
    if (typeof($(this).children("td:first").children("a:first").attr("href")) != 'undefined')
      location.href = $(this).children("td:first").children("a:first").attr("href");
  });
  
  //alert('wtf');
  
  
  $('.novinka-front').click(function () {
    var url = $(this).children("div").children("div.right").children("a").attr("href");
//    alert (url);
    if (url) {
      $(this).css('cursor', 'pointer');
      window.location = url;
    }
  });
  
  
  
});


$(function() {
	$('.fotolightbox, a.lightbox').lightBox({
   fixedNavigation:true,
   imageLoading: 'http://www.geosan-development.cz/js/lightbox-jquery/images/lightbox-ico-loading.gif',
   imageBtnClose: 'http://www.geosan-development.cz/js/lightbox-jquery/images/lightbox-btn-close.gif',
   imageBtnPrev: 'http://www.geosan-development.cz/js/lightbox-jquery/images/lightbox-btn-prev.gif',
   imageBtnNext: 'http://www.geosan-development.cz/js/lightbox-jquery/images/lightbox-btn-next.gif'
  });
});

$(document).ready(function(){
  $('#newsCycle').cycle('fade');
});