


$(document).ready(function(){
   var activeProcess = "";
   
   if($('#content.process').length > 0){
    	var imageArray = Array();
    	imageArray['analysis'] = '/img/process/marketing_analysis.jpg';
    	imageArray['moodboards'] = '/img/process/moodboard_1.jpg';
    	imageArray['brainstorm'] = '/img/process/sketch1.jpg';
    	imageArray['refinement'] = '/img/process/design_refinement.jpg';
    	imageArray['modeling'] = '/img/process/modelling.jpg';
    	imageArray['rendering'] = '/img/process/rendering.jpg';
    	imageArray['detailing'] = '/img/process/detailing.jpg';
    	imageArray['drawings'] = '/img/process/technical.jpg';
    	imageArray['testing'] = '/img/process/testing.jpg';
    	
    	$('#content.process ul li ul').css('display', 'none');

   	$('#content ul li a').click(function(){
   		$("#display .img-wrap").html("");
 			$("body.process #wrapper").css('background', 'none');
   		$('#content.process ul li ul').css('display', 'none');
   		$('#content.process li a').removeClass('active');
   		
   		$(this).addClass('active');
   		
   		if($(this).attr('id') != ''){
   			$("#display .img-wrap").css('display', 'none');
   			$("#display .img-wrap").html("<img src='"+imageArray[$(this).attr('id')]+"' alt='' />");
   			$("#display .img-wrap").fadeIn('medium');
   		}
   		
   		$(this).parent().parent().css('display', 'block');
   		$(this).next().slideToggle('medium');
   		return false;
   	});
   }

	/*
	$(".back").click(function(ev){
	history.go(-1);
	ev.preventDefault();
	});*/
	
	/*$('ul#info li:first ul').mouseover(function(){
	$(this).animate({opacity: 1}, 0);
	});
	
	$('ul#info li:first').mouseover(function(){
	//$('ul:first', this).css('display', 'none');
	$('ul:first', this).animate({opacity: 1}, 0);
	});
	
	$('ul#info li:first').mouseout(function(){
	$('ul:first', this).animate({opacity: 0}, 0);
	});
	*/
	
});
