function documentReady(){
	// Get the source directory of this script
	/*trueUrl = $('script[@src$=jquery.js]').attr('src').match(/^((?:\.\.\/)*)/)[1];

	truePath = $('script[@src$=jquery.js]').attr('src').replace("js/jquery.js", "");
          */
	langArray = new Array("/es/","/en/","/nl/");
	for(var i = 0; i < langArray.length; i++){
		if(location.href.match(langArray[i]) != null){
			langCode = i;
		}
	}
	
	// General hover image function
	$('img.hoverimage').hover(
		function(){	this.src = this.src.replace(/_out./, "_over."); }, 
		function(){	this.src = this.src.replace(/_over./, "_out."); } 
	);
	
	// Showcase Hover
	$('#showcase .hoverbutton').hover(
		function(){	$('div', this).addClass('over');
					$('div div', this).addClass('over');
					$('a', this).addClass('over');}, 
		function(){	$('div', this).removeClass('over');
					$('div div', this).removeClass('over');
					$('div a', this).removeClass('over');} 
	);
	
	// Showcase fold out function
	$('#demo_btn').toggle(function(){
		$('#showcase .hoverbutton').css("display","none");
		$('#showcase').append("<div id='flashcontent'>&nbsp;</div>");
		$('#showcase').animate({ height: 272 }, "slow", function(){
				var so = new SWFObject(truePath + 'swf/main.swf', 'mymovie', '820', '250', '8', '');
				so.addParam('Base',$('#demo_btn').attr("rel"));
				so.addParam('wmode','transparent');
				so.addVariable('taalkeuze', langCode);
				so.write('flashcontent');
		});
	},function(){
		$('#showcase .hoverimage').css("display","auto");
		$('#showcase').animate({ height: 62 }, "slow", function(){
		   		$('#flashcontent').remove();
		});
	});
	
	// Hover over the loginform to show it
	$('#logform').hover(
		function(){
			$('#loginbut', this).hide();
			$('form', this).show();
		},function(){	
			$('form', this).hide();
			$('#loginbut', this).show();
		} 
	);
	
	$('.tab').click(function(){
		$('.tab').removeClass('active');
		$(this).addClass('active');
		
		$('.tabbed .white > div').removeClass('active');
		$('.tabbed .white > .' + $(this).attr('id')).addClass('active');
	});
	
	// niceforms bouwen
	$.NiceJForms.build();
	
	
	$("#cSelect").change(function() {
		eval("top.location='"+$(this).val()+"'");
	});
	$("#lSelect").change(function() {
		eval("top.location='"+$(this).val()+"'");
	});
	
	/* [20.08.2008 : let's move this to the HTML for faster rendering
	// Sifr headers
	var street = {
		//src: trueUrl + 'swf/street.swf'
		src: 'https://www.cameramanager.com/acato/swf/street.swf'
	};

	sIFR.useDomContentLoaded = false;
	
	sIFR.activate();

	sIFR.replace(street, {
		selector: 'h1'
		,wmode: 'transparent'
		,css: {
			'.sIFR-root': { 'color': '#333333', 'font-size': '30px' }
			,'.wit': { 'color': '#FFFFFF' }
		}
	});

	sIFR.replace(street, {
		selector: 'h2'
		,wmode: 'transparent'
		,css: {
			'.sIFR-root': { 'color': '#333333', 'font-size': '22px' }
			,'.wit': { 'color': '#FFFFFF' }
		}
	});
	*/
	
	// Make all bars in the middle bit of equal height	
	//equaliseBars($('#content .bar'));

}


// Function for equalising the height of items
function equaliseBars(thisItem){
	var max = 0;
	thisItem.each(function(){
		var cur = $(this).height();
		if(cur > max){ max = cur; }
	});
	thisItem.height($('#content').height());
}