
var web_urls = [];
	web_urls[0] = 'proj_dig_lpb.html';
	web_urls[1] = 'proj_dig_fabulous.html';
	web_urls[2] = 'proj_dig_annemari.html';
	web_urls[3] = 'proj_dig_claire.html';
	web_urls[4] = 'proj_dig_colleen.html';
	web_urls[5] = 'proj_dig_wesley.html';
	web_urls[6] = 'proj_dig_zarazoo.html';
	web_urls[7] = 'proj_dig_meltedtoffee.html';
	web_urls[8] = 'proj_dig_tasha.html';
	web_urls[9] = 'proj_dig_adene.html';	
	web_urls[10] = 'proj_dig_drCilliers.html';
	web_urls[11] = 'proj_dig_huntrex.html';
	web_urls[12] = 'proj_dig_langfontein.html';
	web_urls[13] = 'proj_dig_litenuf.html';
	web_urls[14] = 'proj_dig_pietmyvrou.html';
	web_urls[15] = 'proj_dig_rzs.html';
	web_urls[16] = 'proj_dig_ss.html';
	web_urls[17] = 'proj_dig_rag.html';
	web_urls[18] = 'proj_dig_michelle.html';
	web_urls[19] = 'proj_dig_kwalata.html';
    web_urls[20] = 'proj_dig_charlene.html';

var web_loaded = [];


var id_urls = [];
	id_urls[0] = 'proj_id_augustsun.html';	
	id_urls[1] = 'proj_id_goldenreef.html';	
	id_urls[2] = 'proj_id_de.html';	
	id_urls[3] = 'proj_id_hey.html';
	id_urls[4] = 'proj_id_layerLace.html';
	id_urls[5] = 'proj_id_litenuf.html';
	id_urls[6] = 'proj_id_mindmatters.html';
	id_urls[7] = 'proj_id_promgrow.html';
	id_urls[8] = 'proj_id_scieppan.html';
	id_urls[9] = 'proj_id_secondlife.html';
	id_urls[10] = 'proj_id_sevengifts.html';
	id_urls[11] = 'proj_id_ss.html';

var id_loaded = [];


var print_urls = [];
	print_urls[0] = 'proj_print_ds.html';	
	print_urls[1] = 'proj_print_drJay.html';
	print_urls[2] = 'proj_print_inscape.html';
	print_urls[3] = 'proj_print_jan.html';
	print_urls[4] = 'proj_print_kwalata.html';
	print_urls[5] = 'proj_print_netcure.html';
	print_urls[6] = 'proj_print_pdd.html';
	print_urls[7] = 'proj_print_pourHomme.html';
	print_urls[8] = 'proj_print_varsityCollege.html';
	print_urls[9] = 'proj_print_annemari.html';

var print_loaded = [];


var hand_urls = [];
	hand_urls[0] = 'proj_wed_30th.html';	
	hand_urls[1] = 'proj_wed_charlene.html';
	hand_urls[2] = 'proj_wed_jana.html';
	hand_urls[3] = 'proj_wed_vdwest.html';

var hand_loaded = [];



function show_lab(element, item, whichLab) {
	$('#lab_nav>a').each(function() {
		if($(this).hasClass('up')) {
			$(this).removeClass('up');
		}
	});
	$(item).addClass('up');
	
	$("#lab_all>div").hide();
	$(element).show();
	
	if(whichLab == 'web'){
		$("#lab_web").find("#id_0").click();
	} else if(whichLab == 'id'){
		$("#lab_id").find("#id_0").click();
	} else if(whichLab == 'print'){
		$("#lab_print").find("#id_0").click();
	} else if(whichLab == 'hand'){
		$("#lab_hand").find("#id_0").click();
	}	
	
	return false;
}

function item_web_load(element, item) {
	theID = item.attr('id').substr(3);
	$(element).load(web_urls[theID], function() {
		web_loaded[theID] = true;		
	});
}
function item_id_load(element, item) {
	//alert("item_id_load called");	
	theID = item.attr('id').substr(3);
	$(element).load(id_urls[theID], function() {
		id_loaded[theID] = true;
	});
}
function item_print_load(element, item) {
	//alert("item_print_load called");	
	theID = item.attr('id').substr(3);
	$(element).load(print_urls[theID], function() {
		print_loaded[theID] = true;
	});
}
function item_hand_load(element, item) {
	//alert("item_hand_load called");	
	theID = item.attr('id').substr(3);
	$(element).load(hand_urls[theID], function() {
		hand_loaded[theID] = true;
	});
}

function show_proj_test(id, item, holder) {
	//alert("show_proj_test: id: "+id+" holder: "+holder+" item: "+item);
	$(holder+' #thumbs>a').each(function() {
		if($(this).hasClass('up')) {
			$(this).removeClass('up');
		}
	});
	$(item).addClass('up');
	
	if(holder == '#lab_web'){
		url = web_urls[id];
		target = "#lab_web #info_web";
	}
	if(holder == '#lab_id'){
		url = id_urls[id];
		target = "#lab_id #info_id";
	}
	if(holder == '#lab_print'){
		url = print_urls[id];
		target = "#lab_print #info_print";
	}
	if(holder == '#lab_hand'){
		url = hand_urls[id];
		target = "#lab_hand #info_hand";
	}
	
	//$(target).fadeOut(0);
	$(target).load(url, function() {
		//$(target).fadeIn(400);
	});
	
	return false;
}


function show_proj(element, item, holder) {
	$(holder+' #thumbs>a').each(function() {
		if($(this).hasClass('up')) {
			$(this).removeClass('up');
		}
	});
	$(item).addClass('up');
	
	//alert("item: "+item);
	$(holder+" #info>div").hide();
	$(element).show();
	
	theID = item.attr('id').substr(3);
	//alert("show_proj theID: "+theID)
	if(holder == '#lab_web'){
		if(web_loaded[theID] == undefined){
			item_web_load(element, item);
		}
	} else if(holder == '#lab_id'){
		if(id_loaded[theID] == undefined){
			item_id_load(element, item);
		}
	} else if(holder == '#lab_print'){
		if(print_loaded[theID] == undefined){
			item_print_load(element, item);
		}
	} else if(holder == '#lab_hand'){
		if(hand_loaded[theID] == undefined){
			item_hand_load(element, item);
		}
	}
	
	return false;
}
