if ((parseFloat(navigator.appVersion.split("MSIE")[1])<8) ) {	//alert('crappie IE 6 or 7');
	IE6HoverFix();
}
//	document.getElementById('img_shader_left').style.height = '1%';
// stretch container-id          ,- px substract from height
//             \                /   ,- min height
//fix_height('container_content',520,250);// IE6 hates the min-height..
//fix_height('content_left' ,322,300);// IE6 hates the min-height..
//fix_height('content'      ,322,300);// IE6 hates the min-height..
//fix_height('content_right',322,300);// IE6 hates the min-height..


$(document).ready(function(){ fix_it_all();re_scan(1);
  $(".info_frame").colorbox({width:"80%", height:"80%", iframe:true});
	$("a[rel='album']").colorbox({slideshow:true});
});
$(window).resize(function() { fix_it_all() });

function fix_it_all() {
	content_height = $('#content').height();
//	document.title = content_height;
	if(content_height<440) {
		content_height=440;
		$('#content').height(content_height);
	}
	$('#content_left').height(content_height);
	$('#content_right').height(content_height);
	// stretch container-id     ,- px other divs || width one div second option = 0
	//             \           /
	fix_width('content_right',152,390); //expand div to use full widht of viewport (jquery)
}
function re_scan(init){
	if (typeof(init) == 'undefined' || init != 1 ) { init = 0 }
  
	$('#content').find('a').each(function(){
		if (jQuery(this).attr('href').indexOf('http://www.rudolfdejong.nl/?nl/uitgelicht/') == 0
		 || jQuery(this).attr('href').indexOf('./?nl/uitgelicht/') == 0 ) { {
		    jQuery(this).attr('class' , "info_frame");//http://www.knoopmail.nl/?nl/pro/1/
/*				alert(jQuery(this).attr('href')+"\n"+
							jQuery(this).attr('class')+"\n"+
							test_id+"\n"+
							$('#'+test_id).length);
/* */
			}
		}
	});
		
//    if (jQuery(this).attr('class').indexOf('active') >= 0 ) { // remember first id for #

//echo '		<a href="javascript:void(\'\')" onclick="$(\'#nl-pro-1\').click();">test</a>'."\n";


	//Colorbox Iframe.
	$(".info_frame").colorbox({
		width:"80%",
		height:"80%",
		iframe:true
	}); 	

/*
	//Colorbox.
	$(".more").colorbox({
		width:"700px",
		height:"500px",
		inline:true,
		href:"#read_more"
	});
*/
	$(".lees_meer").colorbox({
		width:"80%",
		height:"80%",
		inline:true,
		href:"#internal_link",
		onOpen:function(){
//document.title = this.href+'&a'+a_bit_of_salt+'=1';
			$.ajax({
				url: this.href+'&a'+a_bit_of_salt+'=1',
				success: function(data) {
//          alert(data);
//          alert(the_id+"_content");
					$("#internal_link").html(data);
//					CMScontent[CMS_id] = data; // cache it :D
					re_scan();
				}
			});
		}
	});
}
a_bit_of_salt = 'jax';
