var jQ =  jQuery.noConflict();

// Weergeven van de schaduw achter de category items
jQ(document).ready(function(){

    // Externe Links
    jQ('a[rev=ext]').attr('target','_blank');

    // Print link
    jQ('a[rel=print]').click(function(){
        window.print();
        return false;
    });

	var $_hoog = jQ('#container').height()+200;
	var $_hoog2 = jQ('body').height()-90;
	var $_breed = jQ('#container').width()-459;
	var $_breed2 = jQ('body').width()-459;
	var $_hooghtml=0;
	if($_hoog2>$_hoog)	$_hooghtml=$_hoog2-609;
	else $_hooghtml=$_hoog-609;
	//console.log($_hoog);
	//console.log($_hoog2);
	//console.log($_hooghtml);
	//console.log($_breed);
	//console.log($_breed2);
	//jQ('#wrapper').css({'background':'url(/img/bottom.gif) right '+$_hoog+'px no-repeat'});
	//jQ('#wrapper').css({'background':'url(/img/bottom.gif) 100px right no-repeat'});
	jQ('#driehoek').css({'position':'absolute'});
	if($_hoog2>$_hoog)	jQ('#driehoek').css({'top':''+$_hoog2+'px'});
	else jQ('#driehoek').css({'top':''+$_hoog+'px'});
	if($_breed2>$_breed) jQ('#driehoek').css({'left':''+$_breed2+'px'});
	else jQ('#driehoek').css({'left':''+$_breed+'px'});
	jQ('html').css({'background':'url(/img/container_bg.gif) left '+$_hooghtml+'px no-repeat'});

	});

window.onresize = function(event) {

	var $_hoog = jQ('#container').height()+200;
	var $_hoog2 = jQ('body').height()-90;
	var $_breed = jQ('#container').width()-459;
	var $_breed2 = jQ('body').width()-459;
	var $_hooghtml=0;
	if($_hoog2>$_hoog)	$_hooghtml=$_hoog2-609;
	else $_hooghtml=$_hoog-609;
	//console.log($_hoog);
	//console.log($_hoog2);
	//console.log($_hooghtml);
	//console.log($_breed);
	//console.log($_breed2);
	//jQ('#wrapper').css({'background':'url(/img/bottom.gif) right '+$_hoog+'px no-repeat'});
	//jQ('#wrapper').css({'background':'url(/img/bottom.gif) 100px right no-repeat'});
	jQ('#driehoek').css({'position':'absolute'});
	if($_hoog2>$_hoog)	jQ('#driehoek').css({'top':''+$_hoog2+'px'});
	else jQ('#driehoek').css({'top':''+$_hoog+'px'});
	if($_breed2>$_breed) jQ('#driehoek').css({'left':''+$_breed2+'px'});
	else jQ('#driehoek').css({'left':''+$_breed+'px'});
	jQ('html').css({'background':'url(/img/container_bg.gif) left '+$_hooghtml+'px no-repeat'});

}
