$(document).ready(function(){
      about();
	  toggleslide();
	  dynamicload();
   });
  
function toggleslide(){
	$('li.slide').click(function(event) {
			$(this).find('ul.options').slideToggle().end();
				/*if($(this).css('background')  == 'transparent url(http://advocatenbureau-gevaco.be/images/interface/arrowdown.jpg) no-repeat scroll 158px 12px')
					$(this).css('background', 'transparent url(http://advocatenbureau-gevaco.be/images/interface/arrowright.jpg) no-repeat scroll 158px 10px');
				else
				$(this).css('background', 'transparent url(http://advocatenbureau-gevaco.be/images/interface/arrowdown.jpg) no-repeat scroll 158px 12px');
				$(this).css('border', 'none');
			 	*/ //}
	});
	$('ul.options').css('display', 'none');
	 $('li.active').parents('ul.options').css('display', 'block');
}; 

function dynamicload() {
	$('ul.projectnav').animate({'opacity': '1'}, 5000);
   	$('div.projectname').animate({'opacity': '1'}, 5000);
   	$('div.showcase').animate({'opacity': '1'}, 5000);
   	projectnavinteraction();
}; //dynamicload

function projectnavinteraction(){
$('ul.projectnav').children('li').eq(0).addClass('active');
$('ul.projectnav').children('li').click(function(){
$(this).addClass('active').siblings('li').removeClass('active');
whichdidiclick = $('ul.projectnav').children('li').index(this);
$('.showcase ul').animate({'left': -$('.showcase ul').children('li').eq(whichdidiclick).position().left}, {duration: 1000, easing: "expoinout"});
}); //click projectnav child li
}; //projectnavinteraction

function about() {
   $('.nav_about').toggle(function(){
      $('#worldcontainer').animate({'left': '400px'}, {duration: 700, easing: 'expoinout'})
   }, function() {
      $('#worldcontainer').animate({'left': '0px'}, {duration: 700, easing: 'expoinout'})
   }); //toggle

   $('a.closethis').click(function() {
      $('.nav_about').click();
      return false;
   });
}; //about




