function viewProject(id, url, category){
	jQuery.noConflict();
	
	var moreinfo;
	if(url){
		moreinfo = '398';
	}else{
		moreinfo = '431';
	}
	
	var h = null;
	var h_exp = null;
	
	if(category == "interactive"){
		h = (window.project_count_interactive * (196 + 45) + 1);
		h_exp = h + 304;
	}else if(category == "print"){
		h = (window.project_count_print * (196 + 45) + 1);
		h_exp = h + 304;
	}else if(category == "identity"){
		h = (window.project_count_identity * (246 + 45) + 1);
		h_exp = h + 304;
		id = null;
	}else if(category == "product-photography"){
		h = (window.project_count_product-photography * (196 + 45) + 1);
		h_exp = h + 304;
		id = null;
	}
	
	if(expanded){
		//alert(expanded);
		if (id == expanded){
			//collapse expanded project
			jQuery('#proj-' + expanded).animate({
			  height: '194'
			}, 800, function() {
			    expanded = null;
			  });
			  			  
			jQuery('#myslider').animate({
				height: h
			}, 400 );
			  
			jQuery('#proj-' + expanded + ' .project_image').animate({
			  height: '194'
			}, 800 );
			
			jQuery('#proj-' + expanded + ' .project_moreinfo').animate({
				top: '125'
			}, 800 );
			
			/*jQuery('#proj-' + expanded + ' .project_description').animate({
				width: '210',
				display: 'none',
				opacity: '0'
			}, 800 );*/
			jQuery('#proj-' + expanded + ' .project_description').hide(800);
			
			jQuery('#proj-' + expanded + ' a.view_project').html(
				'view project'
			);
			
			var temp_expanded = expanded;
			
			/*jQuery('#proj-' + expanded + ' a.site_url').animate({
				opacity: '0',
			}, 700, function() {
			    jQuery('#proj-' + temp_expanded + ' a.site_url').css("visibility", "hidden");
			    temp_expanded = null;
			  });*/
			//jQuery('#proj-' + expanded + ' a.site_url').hide("slow");
			jQuery('#proj-' + temp_expanded + ' a.site_url').hide("slow");
			tempE = setTimeout(resetTempExp, 2000, temp_expanded);
			
			
		}else{
			//collapse expanded project
			jQuery('#proj-' + expanded).animate({
			  height: '194'
			}, 800, function() {
			    //expanded = id;
			  });
			  
			jQuery('#proj-' + expanded + ' .project_image').animate({
			  height: '194'
			}, 800 );
			
			jQuery('#proj-' + expanded + ' .project_moreinfo').animate({
				top: '125'
			}, 800 );
			
			/*jQuery('#proj-' + expanded + ' .project_description').animate({
				width: '210',
				display: 'none',
				opacity: '0'
			}, 800, function() {
				jQuery('#proj-' + expanded + ' a.site_url').css("visibility", "hidden");
			} );*/
			jQuery('#proj-' + expanded + ' .project_description').hide(800, function(){
				jQuery('#proj-' + expanded + ' a.site_url').hide(0);
			});
			
			jQuery('#proj-' + expanded + ' a.view_project').html(
				'view project'
			);
			
			var temp_expanded = expanded;
			
			/*jQuery('#proj-' + expanded + ' a.site_url').animate({
				opacity: '0',
			}, 700, function() {
			    jQuery('#proj-' + temp_expanded + ' a.site_url').css("visibility", "hidden");
			    temp_expanded = null;
			  });*/
			//jQuery('#proj-' + expanded + ' a.site_url').hide("slow");
			jQuery('#proj-' + temp_expanded + ' a.site_url').hide("slow");
			tempE = setTimeout(resetTempExp, 2000, temp_expanded);
			
		
			//expand new project
						
			jQuery('#proj-' + id).animate({
			  height: '500'
			}, 800, function() {
			    expanded = id;
			  });
			  
			jQuery('#proj-' + id + ' .project_image').animate({
			  height: '500'
			}, 800 );
			
			jQuery('#proj-' + id + ' .project_moreinfo').animate({
				top: moreinfo
			}, 800 );
			
			/*jQuery('#proj-' + id + ' .project_description').animate({
				width: '210',
				display: 'inline',
				opacity: '1'
			}, 800 );*/
			jQuery('#proj-' + id + ' .project_description').animate({
				width: '210'
			}, 800 );
			jQuery('#proj-' + id + ' .project_description').show(800);
			
			jQuery('#proj-' + id + ' a.view_project').html(
				'hide project'
			);
			
			//jQuery('#proj-' + id + ' a.site_url').css("visibility", "visible");
			/*jQuery('#proj-' + id + ' a.site_url').animate({
				opacity: '1',
			}, 800);*/
			jQuery('#proj-' + id + ' a.site_url').show("slow");
			
			setTimeout(function(){
				jQuery('html,body').animate({scrollTop: jQuery("#proj-"+id).offset().top},'slow');
			}, 800);
			
			
			
		}
	}else{
	
	
	//expand new project
	
	jQuery('#proj-' + id).animate({
	  height: '500'
	}, 600, function() {
	    expanded = id;
	  });
	  
	jQuery('#myslider').animate({
		height: h_exp
	}, 400 );
	  
	jQuery('#proj-' + id + ' .project_image').animate({
	  height: '500'
	}, 800 );
	
	jQuery('#proj-' + id + ' .project_moreinfo').animate({
		top: moreinfo
	}, 800 );
	
	/*jQuery('#proj-' + id + ' .project_description').animate({
		width: '210',
		display: 'inline',
		opacity: '1'
	}, 800 );*/
	jQuery('#proj-' + id + ' .project_description').show(800);
	/*jQuery('#proj-' + id + ' .project_description').animate({
		width: '210'
	}, 800);
	jQuery('#proj-' + id + ' .project_description').show(800);*/
	
	jQuery('#proj-' + id + ' a.view_project').html(
		'hide project'
	);
	
	/*jQuery('#proj-' + id + ' a.site_url').css("visibility", "visible");
	jQuery('#proj-' + id + ' a.site_url').animate({
		opacity: '1',
	}, 800 );*/
	jQuery('#proj-' + id + ' a.site_url').show("slow");
	
	jQuery('html,body').animate({scrollTop: jQuery("#proj-"+id).offset().top},'slow');
	
	}
	
	
	
	
}

function resetTempExp(variable){
	variable = null;
}
