$(function(){

  $(".intro #langs a").hover(
    function(){
      var ajdy = $(this).attr("class");
      if(!($(this).hasClass("active"))) {
        $("#langs a").removeClass("active");
        $("#logo em:visible").fadeOut();
        $(".hidden:visible").fadeOut();
        $("#" + ajdy).fadeIn();
        $("#logo em." + ajdy).fadeIn();
        $(this).addClass("active");
      }
    },
    function(){
    }
  );
  $(".intro #langs a").click(function(){
    //return false;
  });

// HP
  $(".hpmedia .fancy").fancybox(
    {
      transitionOut: "elastic",
      showCloseButton: true
    }
  );
  $(".hpmedia .button").fancybox(
    {
      type:"iframe",
      onComplete: function() {
                            $("iframe").attr("scrolling", "no");
                          }
    }
  );
  $(".hpmedia a.button").css({opacity: .5});
  $(".hpmedia a.button").each(function(){
    var url = $(this).next("img").attr("longdesc");
    $(this).attr("href", url);
  });
  $(".hpmedia a.button").hover(
    function () { $(this).animate({opacity: 1}, 500) },
    function () { $(this).animate({opacity: .5}, 500) }
  );
  
  
// METODY
  $(".metody .more").css("display","none");
  $(".metody h2").addClass("active");
  $(".metody:first .more").css("display","block");
  $(".metody h2").hover(
    function () { $(this).addClass("hover"); },
    function () { $(this).removeClass("hover"); }
  );
  $(".metody h2").click(function () {
    $(this).next(".more").slideToggle(300);
  });

});

