
$(function(){
  $(".rollover").hover(
    function(){
        if($(this).attr("src").indexOf("_active") == -1) {
            var newSrc = $(this).attr("src").replace(".gif","_active.gif");
            $(this).attr("src",newSrc);
        }
    },
    function(){
        if($(this).attr("src").indexOf("_active.gif") != -1) {
            var oldSrc = $(this).attr("src").replace("_active.gif",".gif");
            $(this).attr("src",oldSrc);
        }
    });
  $(".rollover_bottom").hover(
    function(){
        if($(this).attr("src").indexOf("_active") == -1) {
            var newSrc = $(this).attr("src").replace(".jpg","_active.jpg");
            $(this).attr("src",newSrc);
        }
    },
    function(){
        if($(this).attr("src").indexOf("_active.jpg") != -1) {
            var oldSrc = $(this).attr("src").replace("_active.jpg",".jpg");
            $(this).attr("src",oldSrc);
        }
    });

   $('.topmenu').hover(
        function() {
            $(this).addClass("active");
		$(this).find('iframe').height($(this).find('div').height());
            $(this).find('div').show();
		  $(this).find('iframe').show();
	

        },
        function() {
            $(this).removeClass("active");        
            $(this).find('div').hide();
  $(this).find('iframe').hide();
	
        }
    );
$("div.menu_punkt").click(function() {
  var t_id=$(this).attr("id");
  if(t_id!="open_menu"){
  /*$("#open_menu").attr("class","menu_punkt");
  $("#open_menu").next('div.menu_podpunkt').hide(); 
  $("#open_menu").attr("id","close_menu");*/
 
  $(this).attr("class","menu_punkt2");  
  $(this).attr("id","open_menu");
  $(this).next('div.menu_podpunkt').show();
  }else{ 
  $(this).attr("class","menu_punkt");
  $(this).attr("id","close_menu");
  $(this).next('div.menu_podpunkt').hide();
 /* $("#open_menu").next('div.menu_podpunkt').hide(); 
  $("#open_menu").attr("id","close_menu"); */
	  
  }
  return false;
 });
});
