function setCookie(name,value,expires,path,domain,secure)
{var curCookie=name+"="+escape(value)+
(expires?"; expires="+expires.toGMTString():"")+
(path?"; path="+path:"")+
(domain?"; domain="+domain:"")+
(secure?"; secure":"");return document.cookie=curCookie;}
function getCookie(name)
{var dc=document.cookie;var prefix=name+"=";var begin=dc.indexOf("; "+prefix);if(begin==-1)
{begin=dc.indexOf(prefix);if(begin!=0)return null;}
else
{begin+=2;}
var end=document.cookie.indexOf(";",begin);if(end==-1)
{end=dc.length;}
return unescape(dc.substring(begin+prefix.length,end));}
if(!getCookie('imgIndex'))
{setCookie('imgIndex',0,now,null,null,null);}
var homePic=new Array();for(i=1;i<32;i++){homePic[i]='<img src="i/h'+i+'.jpg" />'};
var now=new Date();
now.setTime(now.getTime() + 1000 * 60 * 60 * 24 * 1460)
var imgIndex=parseInt(getCookie('imgIndex'),10);
imgIndex++;
if(imgIndex>=homePic.length){imgIndex=1;}
setCookie('imgIndex',imgIndex,now,null,null,null);
picTitle = new Array("&nbsp;","concrete wafer conferencing - january 2006.","provincial plumbing - may 2007.","formal courtyards and back kitchen theatre - july 2003.","backstreet relief and the slaughterhouse vanity- march 2007.","arboreal cover and a hidden brick ark - march 2007.","pitbull beauty and the bite of dogconcrete - october 2008.","painted brick, perforated planes and sunlight molasses - novenber 2007.","uneven walls, steel pins and a folded plane - november 2007.","parties in a park and the ashtray garden - may 2005.","formal forestry and garden room lobbies - july 2009.","deep lawns and gardenshell rooms - august 2007.","jute stubble, cement grey and blue-collar flowers - january 2006.","clipped brick and gangster architecture - march 2010.","smoke breaks, fence chatter, vertical neighbourhoods and highway architecture - march 2010.","brick floored lobbies and textured signage - march 2010.","concrete scrolls with moss and shadow etching - june 2006.","junctions of an architectural crash test dummy - 2002/ongoing.","raised louvred boxes and the terengganu house- september 2004.","screened sunlight and the radiator railing - july 2009.","vented screens and an equatorial evening face - july 2009.","dense diversity and a forest cooling sink - may 2005.","rearward bulwarks and the gardenshell house - august 2007.","salt water, budget formwork and the scrapwood pool - august 2005.","park toilet formality and the compost wall - april 2006.","a two way entry and the timberblind door- november 2008.","moving insulation and the safari roof - june 2004.","screened views and the ventblock wall - november 2008.","diet masonry and the bricklite house - november 2008.","corporate protocol and fishnet stocking railings - may 2009.","fire escapes and smoking balconies - june 2009.","toilet bustle and the vertical backstreet - june 2009.");
projNum = new Array ("#",25,51,23,17,17,32,26,26,54,54,3,3,8,8,8,12,12,7,48,48,21,3,43,42,9,29,29,35,44,8,8);
$(function() {
	$('.navscreen').html('<img src="i/blank.gif" />');	   
	$('.caro-skin-1').caro({vertical: true,scroll: 32});
	$('#pic').append(homePic[imgIndex]);
	$('h4').append('<a href="p'+projNum[imgIndex]+'.html">'+picTitle[imgIndex]+'</a>');
	$('.caro-skin-1 ul li').css('opacity',0);
	$('.caro-next, .caro-prev').hide();
	$('#overlay').hide().css('opacity',0.1);
	$("#home h2 a").click(function () { $('#overlay,h1').fadeIn();$('h4,.navscreen').fadeOut();
	$('.caro-skin-1 ul li').animate({'opacity': 1});$('.caro-next, .caro-prev').show();});
}); 