

$(document).ready(function() {
	$(".imgpop").fancybox({ 'overlayShow': true });
	
    $("#navigation ul li").hover(function() {
        $(this).addClass("over");
        if ($(this).find("a").hasClass("act"))
        {
            $(this).find("a").addClass("actief");
        };
        $(this).find("a").addClass("act"); 
        
        $('.sub1', this).css('display', 'block');
    }, function() {
        $(this).removeClass("over"); 
        if ($(this).find("a").hasClass("actief"))
        {
            $(this).find("a").removeClass("actief"); 
            $(this).find("a").addClass("act"); 
        }
        else
        {
            $(this).find("a").removeClass("act"); 
        }
        
        $('.sub1', this).css('display', 'none');
    }); 
      
    $(".hoofdmenu .sub1 li").hover(function() {
        $(this).addClass("over"); 
        $('.sub2', this).css('display', 'block');
    }, function() {
        $(this).removeClass("over"); 
        $('.sub2', this).css('display', 'none');
    });
    
    $('.slideshow').cycle({
        fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
    });
    
    $('a[id^="bestuur"]').click(function(event){
        event.preventDefault();
        //console.log($(this));
        $("#smoelenboektekst").html("");
        $("#smoelenboektekst").html($("div[id=" + $(this).attr("id") + "]").html());
        //console.log($("div[id=" + $(this).attr("id") + "]").html());
        $('a[id^="bestuur"].act').removeClass("act");
        $(this).addClass("act");
        activate_sifr();
    });
    
    function activate_sifr() {
        sIFR.replace(klil, {
            selector: '#smoelenboektekst h1',
            wmode: 'transparent',
            css: '.sIFR-root { background:none transparent; color: #003399; }'
        });

        sIFR.replace(klil, {
            selector: '#smoelenboektekst h2',
            wmode: 'transparent',
            css: '.sIFR-root { background:none transparent; color: #003399; }'
        });

        sIFR.replace(klil, {
            selector: '#smoelenboektekst h3',
            wmode: 'transparent',
            css: '.sIFR-root { background:none transparent; color: #003399; }'
        });

        sIFR.replace(klil, {
            selector: '#smoelenboektekst h4',
            wmode: 'transparant',
            css: '.sIFR-root { background:none transparent; color: #003399; }'
        });
    }
});
