

var nav_items = document.getElementById('navigation').getElementsByTagName('a');
var stripped_url = document.location.href.match(/([^\/]+)\/(#.+)?$/)[1];
for(var i = 0; i < nav_items.length; i++) {
  var slug = nav_items[i].href.match(/([^\/]+)\/$/);
	var stripped_href = (slug) ? slug[1] : '';
	if(stripped_url == stripped_href) {
		nav_items[i].parentNode.className = 'selected';
		break;
	}
}

   	$('#News2').remove();
	$('#Projects2').hide();
	
/*
 $('#Projects').click( function() {
							$('#oldnews').toggle();
		
    $('#Projects2').slideToggle(250);
    	$(this).toggleClass("highlight");
*/




			
				var width = 0;
$('.image').each(function() {
    width += $(this).outerWidth( true );
    var parentTag = $(this).parent().get(0).tagName;

});
/*$('').css('width', width + 250);*/



var widthnews = 0;
$('.news').each(function() {
    widthnews += $(this).outerWidth( true );
});
$('.newspage').css('width', width + widthnews + 0);
	


 $('#langE').click( function() {
    $('.nl').hide();
    $('.eng').show();
   });
    $('#langN').click( function() {
    $('.nl').show();
    $('.eng').hide();
   });


