function justifyColumns() {
    var aColumns = $(".column");
    
    if(aColumns.length == 2) {
        if(aColumns[0].offsetHeight > aColumns[1].offsetHeight){
            //alert(aColumns[0].id);
            $(aColumns[1]).height(aColumns[0].offsetHeight + "px");
        } else if (aColumns[0].offsetHeight < aColumns[1].offsetHeight) {
            //alert(aColumns[1].id);
            $(aColumns[0]).height(aColumns[1].offsetHeight + "px");
        }
    }
    
}

$.ajaxSetup({
    'xhr':function(){return window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();}
});

$(document).ready(function(){
    setTimeout("justifyColumns()", 100);
    
     $('a[rel*="lightbox"]').lightBox({
        overlayOpacity:    '0.5',
        txtImage:        'Foto',
        txtOf:            'van',  
        imageLoading:   sBaseUrl + 'html/images/lightbox/loading.gif',
        imageBtnClose:  sBaseUrl + 'html/images/lightbox/close.gif',
        imageBtnPrev:   sBaseUrl + 'html/images/lightbox/prev.gif',
        imageBtnNext:   sBaseUrl + 'html/images/lightbox/next.gif',
        imageBlank:     sBaseUrl + 'html/images/lightbox/blank.gif',
        fixedNavigation:true  
    });
    
    $('a[rel="external"]').click(function () {
        $(this).attr({'target':'_blank'});
    });    
    
    $("#showAanmeldModal").click(function(e) {
        e.preventDefault();
        // load the contact form using ajax
        $.get(sBaseUrl + "/ajax/aanmelden.php", function(data){

            // create a modal dialog with the data
            
            $(data).modal({
                //closeHTML: "",
                position: ["5%"],
                opacity:50,
                maxHeight: 650,
                close: false,
                minHeight: 600,
                overlayId: 'aanmelden-modal-overlay',
                containerId: 'aanmelden-modal-container',
                onShow: function() {
                    Cufon.refresh();  
                    $(".modal-close, #aanmelden-modal-overlay").click(function(e) {
                        $.modal.close();
                        return false;
                    }); 
                }
            });
        });  
    });
});


