$(document).ready(function(){

  $(".menu li a").mouseover(function () {
    $(this).addClass("hover");
  });
  
  $(".menu li a").mouseout(function () {
    $(this).removeClass("hover");
  });
  
   $(".lista ul li:last").addClass("first");
   	$(".oldshopmenu .file").addClass('');
 		$(".oldshopmenu").treeview({
        collapsed: true, 
        unique: true, 
        persist: "cookie"
 		});
        
//  $(".folder a").click(function(){ return false; });

  $(".dropdownmenu").hide();
  //var lastSearchTerm = '';
  $(".dropdownmenu").parent("<li>").hover(
    function () {
        $(this).children('.dropdownmenu').show();
        //lastSearchTerm = $("#searchField").val();
        
        //alert($("#hns").parent("form").css("z-index"));
        //alert($("#hns").parent("form").css("zIndex"));
        //$("#hns").parent("form").children("*").hide(); 
        //$("#hns").html("");
        //replace = $('<div id="searchFormReplace">');
        //replace.html("mujdiv mujdiv mujdiv mujdiv mujdiv mujdiv mujdiv mujdiv mujdiv");
        //$("#hns").appendTo(replace);
        
        //$("#searchForm").remove();
        //replace.insertAfter($(".lista"));        
      }, 
      function () {
        //$("#searchFormReplace").remove();
        $(this).children('.dropdownmenu').hide();
        
        //$("#searchFormReplace").children(".submit").appendTo(form);
            
      }
    );
    
	$('a.lightbox').lightBox({
     fixedNavigation:true,
     imageLoading: '/repository/js/lightbox/images/lightbox-ico-loading2.gif',
     imageBtnClose: '/repository/js/lightbox/images/lightbox-btn-close.gif'
     //imageBtnPrev: '/repository/js/lightbox/images/lightbox-btn-prev.gif',
     //imageBtnNext: '/repository/js/lightbox/images/lightbox-btn-next.gif'
    });
  
   $.each($("div.obalclanku div>img"), function(key, value) {$(this).parent().replaceWith($(this))});

});


function Detail(path)
{
	window.open(path, '_blank', 'left=400, top=100, width=226, height=226, resizable=1');
}

function Detail2(path)
{
	window.open(path, '_blank', 'width=600, height=500, resizable=1');
}

function Detail3(path)
{
	window.open("detail3.php?soubor="+path, '_blank', 'width=700, height=500, resizable=1, scrollbars=yes');
}
