$(document).ready(function() {
 // hides the slickbox as soon as the DOM is ready
 // (a little sooner than page load)
  $('#product-dev').hide();
  $('#research-dev').hide();
  $('#chem-dev').hide();
  $('#fermentation').hide();
  $('#analytical').hide();
  $('#regulatory').hide();
  $('#quality').hide();
  $('#strategy').hide();
  $('#chain').hide();
  $('#plan').hide();
  $('#schedule').hide();
  $('#budget').hide();
  $('#tools').hide();
  


  function hideAll() {
   $('#research-dev').hide(0);
   $('#chem-dev').hide(0);
   $('#fermentation').hide(0);
   $('#analytical').hide(0);
   $('#regulatory').hide(0);
   $('#quality').hide(0);
   $('#strategy').hide(0);
   $('#chain').hide(0);
   $('#product-dev').hide(0);
   $('#plan').hide(0);
   $('#schedule').hide(0);
   $('#budget').hide(0);
   $('#tools').hide(0);
   $('a').removeClass("active"); // Also remove class on anchor
  }; 


 // toggles the slickbox on clicking the noted link
  $('a.prod-dev').click(function() {
	hideAll();
	$('#product-dev').show(0);
	$(this).addClass("active");
	return false;
  });

$('a.prod-dev').hover(function() {
	hideAll();
	$('#product-dev').show(0);
     }, 
      function () {
        $('#product-dev').show();
      }
    );



$('a.research-dev').click(function() {
   hideAll();
   $('#research-dev').show(0);
   $(this).addClass("active");
   return false;
  });

$('a.research-dev').hover(function() {
	hideAll();
	$('#research-dev').show(0);
     }, 
      function () {
        $('#research-dev').show();
      }
    );

  $('a.chem-dev').click(function() {
  hideAll();
	$('#chem-dev').show(0);
	$(this).addClass("active");
	return false;
  });

$('a.chem-dev').hover(function() {
	hideAll();
	$('#chem-dev').show(0);
     }, 
      function () {
        $('#chem-dev').show();
      }
    );
  
  $('a.fermentation').click(function() {
	hideAll();
	$('#fermentation').show(0);
	$(this).addClass("active");
	return false;
  });

$('a.fermentation').hover(function() {
	hideAll();
	$('#fermentation').show(0);
     }, 
      function () {
        $('#fermentation').show();
      }
    );
  
  $('a.analytical').click(function() {
	hideAll();
	$('#analytical').show(0);
	$(this).addClass("active");
	return false;
  });

$('a.analytical').hover(function() {
	hideAll();
	$('#analytical').show(0);
     }, 
      function () {
        $('#analytical').show();
      }
    );
  
  $('a.regulatory').click(function() {
	hideAll();
	$('#regulatory').show(0);
	$(this).addClass("active");
	return false;
  });
  
$('a.regulatory').hover(function() {
	hideAll();
	$('#regulatory').show(0);
     }, 
      function () {
        $('#regulatory').show();
      }
    );
  $('a.quality').click(function() {
	hideAll();
	$('#quality').show(0);
	$(this).addClass("active");
	return false;
  });

$('a.quality').hover(function() {
	hideAll();
	$('#quality').show(0);
     }, 
      function () {
        $('#quality').show();
      }
    );
  
  $('a.strategy').click(function() {
	hideAll();
	$('#strategy').show(0);
	$(this).addClass("active");
	return false;
  });
  
$('a.strategy').hover(function() {
	hideAll();
	$('#strategy').show(0);
     }, 
      function () {
        $('#strategy').show();
      }
    );

  $('a.chain').click(function() {
	hideAll();
	$('#chain').show(0);
	$(this).addClass("active");
	return false;
  });

$('a.chain').hover(function() {
	hideAll();
	$('#chain').show(0);
     }, 
      function () {
        $('#chain').show();
      }
    );
  
$('a.plan').click(function() {
	hideAll();
	$('#plan').show(0);
	$(this).addClass("active");
	return false;
  });

$('a.plan').hover(function() {
	hideAll();
	$('#plan').show(0);
     }, 
      function () {
        $('#plan').show();
      }
    ); 

$('a.schedule').click(function() {
	hideAll();
	$('#schedule').show(0);
	$(this).addClass("active");
	return false;
  });

$('a.schedule').hover(function() {
	hideAll();
	$('#schedule').show(0);
     }, 
      function () {
        $('#schedule').show();
      }
    ); 
 
$('a.budget').click(function() {
	hideAll();
	$('#budget').show(0);
	$(this).addClass("active");
	return false;
  });

$('a.budget').hover(function() {
	hideAll();
	$('#budget').show(0);
     }, 
      function () {
        $('#budget').show();
      }
    ); 

$('a.tools').click(function() {
	hideAll();
	$('#tools').show(0);
	$(this).addClass("active");
	return false;
  });

$('a.tools').hover(function() {
	hideAll();
	$('#tools').show(0);
     }, 
      function () {
        $('#tools').show();
      }
    ); 
  
});
