/* POPUP STUFF */
/* popupWindow voor popups, mét check of er een basetag aanwezig is. Is dit het geval, wordt deze voor de url geplakt. */
function popupWindow(Name, width, height) {
    style = "height=" + height + ",width=" + width + ", status=no, toolbar=no, menubar=no, location=no, scrollbars=yes, resizable=no";
    if (document.getElementsByTagName('base')[0] && Name.substring(0, 1) != "/") {
        var prefix = document.getElementsByTagName('base')[0].href;
    }
    else {
        var prefix = "";
    }
    open(prefix + Name, '_blank', style);
}

$(document).ready(function() {

 // Random background toevoegen aan div #illustratie  
 /*   $(function() {
        var N = 3; // Aantal foto's 
        var id = 1 + Math.floor(Math.random() * N);
        $('#illustratie').css('background-image', 'url(/KleurrijkWonen/img/illustratie' + id + '.jpg)');
    }); 
 */

   if ($('#wide').length) { // Als de ID #wide bestaat word de layout aangepast

       $('#content_wrapper').css({ 'position': 'relative' });
       // Verplaatsen iconen div in html
       $('#iconen').appendTo('#content_wrapper').css({ 'position': 'absolute', 'top': '14px', 'right': '23px', 'display': 'inline-block' });
       // Rechterbalk onzichtbaar maken
       $("#extra").empty().remove();

       // Verander de background images zodat content 1 groot vlak is
       $("#container").css('background-image', 'url(/KleurrijkWonen/img/bg_page_wide.gif)');
       $("#content_wrapper").css('background-image', 'url(/KleurrijkWonen/img/bg_wrapper_wide.gif)');
       $("#footer").css('background-image', 'url(/KleurrijkWonen/img/bg_footer_wide.gif)');

       // Pas breedte content aan
       $("#content").css({ 'width': '598px', 'margin-top': '15px' });
      } 

});

