// JavaScript Document
$(document).ready(function(){
 $('img#bckgrnd').maxImage({isBackground: true, verticalAlign: 'top', horizontalAlign: 'center',  zIndex: -10});
 resetDiv();
 $("a[rel]").overlay({left : 'center', top : 'center'});
});
$(window).resize(function(){
 resetDiv();
});
function resetDiv() {
 var c = $("#container");
 var b = $("body");
 var top = Math.round((b.outerHeight()-c.outerHeight())/2);
 var left = Math.round((b.outerWidth()-c.outerWidth())/2);
 c.css({'top' : top + 'px', 'left' : left + 'px'});
 var o = $("#overlay");
 o.css({'width' : b.outerWidth() + 'px', 'height' : b.outerHeight() + 'px'});
 var z = $("#zwart");
 z.css({'width' : b.outerWidth() + 'px', 'height' : b.outerHeight() + 'px', 'z-index' : '-5'});
 var l = $("#imgl");
 var r = $("#imgr");
 var m = $("#midden");
 l.css({'height' : m.outerHeight() + 'px'});
 r.css({'height' : m.outerHeight() + 'px'});
 var b = $("#orderBtn");
 b.css({'display' : "", 'top' : (top+150)+'px', 'left' : (left+460) + 'px'});
 
}
