﻿function mainmenu(){
 $(".M0 ul").css({display: "none"}); // Opera Fix
 $(".M0 li").hover(function(){
   $(this).find('ul:first').css({visibility: "visible",display: "none"}).show(10);
   },function(){
   $(this).find('ul:first').css({visibility: "hidden"});
   });
}
 
 
$(document).ready(function(){
    mainmenu();
 //$("#topmenu ul ul").pngfix({sizingMethod: "scale"});
 //$(".M1").pngfix({sizingMethod: "scale"});
 //$(".ST_Gallery a").lightBox();

    // addede 12.02.2010 by Lars Skelboe <lars@skelboe.dk>
    fixAndGallery(); 
});

function fixAndGallery() {
    if ( !jQuery.browser.safari ) { $("ul.gallery li").css('margin-bottom', '0px'); }

    // fix alt tekst
/*
    $("ul.gallery a").each(function(){
        // add to the gallery
        if ( $(this).hasClass('lightbox') ) { $(this).attr('rel','gallery'); }
        
        // get the image alt
        var alt = $(this).children('img').attr('alt');
        if ( alt ) { $(this).attr('title', alt); }
    }); */
    
    $("a.lightbox").each(function(){
        // add to the gallery
        $(this).attr('rel','gallery');
        
        // get the image alt
        var alt = $(this).children('img').attr('alt');
        if ( alt ) { $(this).attr('title', alt); }
    });

    //$(".gallery a.lightbox").fancybox({overlayOpacity: 0.75, overlayColor: '#000'});
    $("a.lightbox").fancybox({overlayOpacity: 0.75, overlayColor: '#000'});
}

