$(document).ready(function() {
   $("li").each(function(i){
	  var active = false;
	  
	   $(this).children('ul').each(function(){
		  active = true;
	  });
	  var colomname = $(this).parent().parent().parent().parent().attr('id');
   		
   var color = '';

   if(colomname == 'left-colomn-three' || colomname == 'middle-colomn-three')
   {
	   color = 'grey';
   }
   
   if(colomname == 'right-colomn-three')
   {
	   color = 'green';
   }
   
	  if(active)
	  {
		 $(this).css({
			 'background':'url(/static/interface/list-arrow-right-'+color+'.jpg)',
			 'background-repeat':'no-repeat',
			 'background-position':'2px 7px',
			 'cursor': 'pointer'
			 });
		 $('ul li ul').css({
			 'text-decoration': 'none',
			 'cursor': 'default'
			 });

		 $(this).click(function(){
			 
			 
			 if($(this).attr('open') == 'open')
			 {
				 $(this).css({
					 'background':'url(/static/interface/list-arrow-right-'+color+'.jpg)',
					 'background-repeat':'no-repeat',
					 'background-position':'2px 7px'
				 });
				 
				 $(this).attr('open', 'close');
				 $(this).children('ul').hide();
			 }else
			 {
				 $(this).css({
					 'background':'url(/static/interface/list-arrow-down-'+color+'.jpg)',
					 'background-repeat':'no-repeat',
					 'background-position':'2px 7px'
				 });
				 $(this).attr('open', 'open');
				
				 $(this).children('ul').show();
			 }
		 });
	  }
   });
   
   $(function() {

		$('a.lightbox').lightBox({
			overlayOpacity: 0.6,
			imageLoading: '/static/interface/lightbox-ico-loading.gif',
			imageBtnClose: '/static/interface/lightbox-btn-close.gif',
			imageBtnPrev: '/static/interface/lightbox-btn-prev.gif',
			imageBtnNext: '/static/interface/lightbox-btn-next.gif',
			containerResizeSpeed: 350,
			txtImage: 'Afbeelding',
			txtOf: 'van'
		   }); // Select all links with lightbox class

	});
 });



