$(document).ready(function() {
    
    $("#menu a")
        .hover(
            function(){
      			    $(this).find("em").stop().animate({left: "30px" }, {duration:300});
         		},function(){
      				  $(this).find("em").stop().animate({ left: "20px" }, 100);
          })
          
          .click(function(){
              $(this).css({ backgroundPosition: "-170px -29px" })
          
          });
          
      $(".more")
        .hover(
            function(){
      			    $(this).stop().animate({backgroundPosition: "6px 3px" }, {duration:300});
         		},function(){
      				  $(this).stop().animate({backgroundPosition: "0px 3px" }, {duration:100});
            });
          
	$(".galPic").css({border: "1px solid #000"});
	var fadeTime = 300;
	

	$(".pujcovnaList tr:odd").css("background-color", "#eefcff");
  $(".pujcovnaList th").css("background-color", "#ffffff");

	  

  $(".pujcovnaList tr:odd").hover(
      function(){
          $(this).stop().animate({ backgroundColor: "#a7dde9"}, fadeTime);
      },
      function(){
          $(this).stop().animate({ backgroundColor: "#eefcff"}, fadeTime);
      }
  );
  
  $(".pujcovnaList tr:even").hover(
      function(){
          $(this).stop().animate({ backgroundColor: "#a7dde9"}, fadeTime);
      },
      function(){
          $(this).stop().animate({ backgroundColor: "#ffffff"}, fadeTime);
      }
  );
  
  $(".pujcovnaList tr > th").hover(
      function(){
          $(this).stop().animate({ backgroundColor: "#ffffff"}, fadeTime);
      },
      function(){
          $(this).stop().animate({ backgroundColor: "#ffffff"}, fadeTime);
      }
  );
  /**/
  $(".pujcovnaList tr.selected").css("background-color", "#a7dde9");
  
  $(".pujcovnaList tr:odd").click(redirect);
  $(".pujcovnaList tr:even").click(redirect);
  
  function redirect(){
      var url = $(this).find("a").attr("href");
      if(url) window.location = url;
  }

});

