   /*
	*	DOM load functions
	*
	*/
	
	// var base_url = 'http://localhost/brb';
	
	$(document).ready(function(){
	
		// geeft visueel meer rust wanneer een pagina buiten de workflow valt
		$("html").css("overflow-y", "scroll");
	
		// externe links krijgen een _blank target, oftewel openen in nieuw venster/tabblad
		$("a[@rel=external]").each(function(i){ this.target="_blank"; });


		$(".left-column img[align='right']").css({float: 'right'});

		/*
		*	Language picker
		*
		*/
		$("a#choose-language").click(function() {
										  
			$("div#language-picker").toggle();
				
			return false;
				
		});
		
		$("div#language-picker a").click(function() {
												  
			$(this).parent().toggle();
		
		});
		
		
		$("div.loc_links").tooltip({ 
			track: true, 
			delay: 0, 
			showURL: false, 
			showBody: " - ", 
			opacity: 0.85 
		});
		
		/*
		*	Image corner technique
		*
				
		$("#content .left-column img").each(function(e) {
													 
			$(this).wrap("<div></div>");
			
			var imgheight = 		$(this).height();
			var imgwidth = 			$(this).width();
			var imgalign = 			$(this).attr('align');
			
			$(this).parent().css({height: imgheight + 'px', width: imgwidth + 'px'});
			
			if(imgalign != 'undefined') $(this).parent().css({float: imgalign});
			
			// apply cornering
			$(this).parent().corner('10px');
													 
		});
		
		*/
	
	
		/*
		*	Footer positioning
		*
		*/	
		if( typeof( window.innerWidth ) == 'number' ) {
		
			var windowHeight = window.innerHeight;
		
		} else if( document.documentElement && document.documentElement.clientHeight ) {
		
			var windowHeight = document.documentElement.clientHeight;
		
		} else if( document.body && document.body.clientHeight ) {
		
			var windowHeight = document.body.clientHeight;
		
		}		

		var contentHeight = $("#content").height();

		if(contentHeight <= (windowHeight - 456)) {
			
			$("#content").css({height: windowHeight - 456});
		}

	});