window.thumbnails = {};
thumbnails[7468429] = clik.newPhoto({"link":"#","caption":"Cottingley Fairy Photograph","height":135,"id":7468429,"server_id":31,"src":"1-w12001_thumb.jpg","galleries_id":"","width":139});
thumbnails[7522056] = clik.newPhoto({"link":"#","caption":"finished mural","height":87,"id":7522056,"server_id":37,"src":"mural3-w1028-h8001_thumb.jpg","galleries_id":"","width":150});
thumbnails[7533661] = clik.newPhoto({"link":"#","caption":"self portrait","height":135,"id":7533661,"server_id":31,"src":"01tribe-w1028-h800_thumb.jpg","galleries_id":"","width":100});
thumbnails[8271035] = clik.newPhoto({"link":"#","caption":"paypal","height":51,"id":8271035,"server_id":31,"src":"PAYPALw150_thumb.jpg","galleries_id":"","width":150});
thumbnails[8395919] = clik.newPhoto({"link":"#","caption":"","height":58,"id":8395919,"server_id":37,"src":"steps001_thumb.jpg","galleries_id":"","width":150});
thumbnails[8434449] = clik.newPhoto({"link":"#","caption":"New North Road, Auckland","height":98,"id":8434449,"server_id":31,"src":"newnorthrd_thumb.jpg","galleries_id":"","width":150});
thumbnails[8434470] = clik.newPhoto({"link":"#","caption":"Greenlane, Auckland","height":98,"id":8434470,"server_id":31,"src":"greenlane_thumb.jpg","galleries_id":"","width":150});
thumbnails[8478545] = clik.newPhoto({"link":"#","caption":"Tane and I with one of the billboards","height":106,"id":8478545,"server_id":31,"src":"agrisea_thumb.jpg","galleries_id":"","width":160});
thumbnails[8558563] = clik.newPhoto({"link":"#","caption":"Ellerslie billboard","height":98,"id":8558563,"server_id":31,"src":"ellersilebillboard3_thumb.jpg","galleries_id":"","width":160});
thumbnails[8881898] = clik.newPhoto({"link":"#","caption":"me","height":231,"id":8881898,"server_id":31,"src":"1115_thumb.jpg","galleries_id":"","width":174});
thumbnails[8963450] = clik.newPhoto({"link":"#","caption":"","height":1,"id":8963450,"server_id":31,"src":"sprite_thumb.png","galleries_id":"","width":260});
thumbnails[7412423] = clik.newPhoto({"link":"photo_7412423.html","caption":"heritage","height":140,"id":7412423,"server_id":31,"src":"heritage_thumb.jpg","galleries_id":439659,"width":104});
thumbnails[7412433] = clik.newPhoto({"link":"photo_7412433.html","caption":"navigator","height":52,"id":7412433,"server_id":31,"src":"Navigator-w1000-h1000_thumb.jpg","galleries_id":401470,"width":160});
thumbnails[7482546] = clik.newPhoto({"link":"photo_7482546.html","caption":"possum bust (study)","height":120,"id":7482546,"server_id":31,"src":"PossumBust-h500_thumb.jpg","galleries_id":401541,"width":114});
thumbnails[7502410] = clik.newPhoto({"link":"photo_7502410.html","caption":"desperate housewives","height":84,"id":7502410,"server_id":31,"src":"desperate-h500_thumb.jpg","galleries_id":401476,"width":260});
thumbnails[7510036] = clik.newPhoto({"link":"photo_7510036.html","caption":"home kill (study)","height":112,"id":7510036,"server_id":31,"src":"HomeKill-h500_thumb.jpg","galleries_id":401541,"width":160});
thumbnails[7412412] = clik.newPhoto({"link":"photo_7412412.html","caption":"cow koru","height":120,"id":7412412,"server_id":31,"src":"Cow_Koru_thumb.jpg","galleries_id":401472,"width":83});
thumbnails[7412416] = clik.newPhoto({"link":"photo_7412416.html","caption":"fishy tale","height":120,"id":7412416,"server_id":31,"src":"FishyTail1_thumb.jpg","galleries_id":401476,"width":120});
thumbnails[7422630] = clik.newPhoto({"link":"photo_7422630.html","caption":"together alone","height":120,"id":7422630,"server_id":31,"src":"together_alone-w1000-h1000_thumb.jpg","galleries_id":401470,"width":184});
thumbnails[7422750] = clik.newPhoto({"link":"photo_7422750.html","caption":"royal wave","height":160,"id":7422750,"server_id":31,"src":"royalwave_thumb.jpg","galleries_id":401481,"width":110});
thumbnails[7422755] = clik.newPhoto({"link":"photo_7422755.html","caption":"the blokes","height":110,"id":7422755,"server_id":31,"src":"YZ1I3003-h520_thumb.jpg","galleries_id":401481,"width":109});
thumbnails[8254306] = clik.newPhoto({"link":"photo_8254306.html","caption":"rise up","height":107,"id":8254306,"server_id":31,"src":"riseup-Print2_thumb.jpg","galleries_id":439659,"width":160});
thumbnails[7412409] = clik.newPhoto({"link":"photo_7412409.html","caption":"bookends","height":98,"id":7412409,"server_id":31,"src":"Bookends-w1000-h1000_thumb.jpg","galleries_id":401470,"width":160});
thumbnails[7412410] = clik.newPhoto({"link":"photo_7412410.html","caption":"calloused veneer","height":120,"id":7412410,"server_id":31,"src":"CallousedVeneer_thumb.jpg","galleries_id":401472,"width":120});
thumbnails[7412418] = clik.newPhoto({"link":"photo_7412418.html","caption":"fowl deed","height":110,"id":7412418,"server_id":31,"src":"FoulDeed_thumb.jpg","galleries_id":401476,"width":110});
thumbnails[7422692] = clik.newPhoto({"link":"photo_7422692.html","caption":"black & white christmas","height":120,"id":7422692,"server_id":31,"src":"IMG_7561_thumb.jpg","galleries_id":401481,"width":120});
thumbnails[7422707] = clik.newPhoto({"link":"photo_7422707.html","caption":"smile","height":130,"id":7422707,"server_id":31,"src":"smile_thumb.jpg","galleries_id":401481,"width":182});
thumbnails[7422729] = clik.newPhoto({"link":"photo_7422729.html","caption":"black heart","height":140,"id":7422729,"server_id":31,"src":"YZ1I2996-w500_thumb.jpg","galleries_id":401481,"width":97});
thumbnails[7422732] = clik.newPhoto({"link":"photo_7422732.html","caption":"pink fade","height":135,"id":7422732,"server_id":31,"src":"YZ1I29971_thumb.jpg","galleries_id":401481,"width":134});
thumbnails[7422744] = clik.newPhoto({"link":"photo_7422744.html","caption":"backlit","height":160,"id":7422744,"server_id":31,"src":"backlit_D079E570-24E8-5EC4-4F60D56233D2F59F_thumb.jpg","galleries_id":401481,"width":160});
thumbnails[8254307] = clik.newPhoto({"link":"photo_8254307.html","caption":"the sheepfarmer","height":120,"id":8254307,"server_id":31,"src":"sheepfarmer-hPAPER_thumb.jpg","galleries_id":439659,"width":120});
thumbnails[7412429] = clik.newPhoto({"link":"photo_7412429.html","caption":"little swine","height":130,"id":7412429,"server_id":31,"src":"LittleSwine_thumb.jpg","galleries_id":401476,"width":130});
thumbnails[7412437] = clik.newPhoto({"link":"photo_7412437.html","caption":"one way traffic","height":86,"id":7412437,"server_id":31,"src":"onewaytraffic_thumb.jpg","galleries_id":401472,"width":160});
thumbnails[7412456] = clik.newPhoto({"link":"photo_7412456.html","caption":"steadfast","height":120,"id":7412456,"server_id":31,"src":"Steadfast-w1000-h1000_thumb.jpg","galleries_id":401470,"width":120});
thumbnails[7422702] = clik.newPhoto({"link":"photo_7422702.html","caption":"party people","height":108,"id":7422702,"server_id":31,"src":"IMG_7574_thumb.jpg","galleries_id":401481,"width":160});
thumbnails[7422752] = clik.newPhoto({"link":"photo_7422752.html","caption":"fish wife","height":160,"id":7422752,"server_id":31,"src":"fishwife_thumb.jpg","galleries_id":401481,"width":160});
thumbnails[7422767] = clik.newPhoto({"link":"photo_7422767.html","caption":"four eyes","height":120,"id":7422767,"server_id":31,"src":"IMG_7563_thumb.jpg","galleries_id":401481,"width":92});
thumbnails[7434950] = clik.newPhoto({"link":"photo_7434950.html","caption":"tribe","height":120,"id":7434950,"server_id":31,"src":"tribe-w600_thumb.jpg","galleries_id":401541,"width":89});
thumbnails[8254309] = clik.newPhoto({"link":"photo_8254309.html","caption":"morning mist ","height":64,"id":8254309,"server_id":31,"src":"Morningmist-w1000_9DC28CA5-1EC9-D45B-1C82B2C05C4B56D8_thumb.jpg","galleries_id":439659,"width":160});
thumbnails[7412415] = clik.newPhoto({"link":"photo_7412415.html","caption":"faith,hope & Shirley","height":130,"id":7412415,"server_id":31,"src":"Faith_Hope_Shirley-w1000-h1000_thumb.jpg","galleries_id":401470,"width":144});
thumbnails[7412425] = clik.newPhoto({"link":"photo_7412425.html","caption":"journeys","height":73,"id":7412425,"server_id":31,"src":"Journeys-w1000-h1000_thumb.jpg","galleries_id":401470,"width":200});
thumbnails[7412428] = clik.newPhoto({"link":"photo_7412428.html","caption":"line between B & W","height":100,"id":7412428,"server_id":31,"src":"LineBetween_thumb.jpg","galleries_id":401472,"width":100});
thumbnails[7412443] = clik.newPhoto({"link":"photo_7412443.html","caption":"rack of lamb","height":120,"id":7412443,"server_id":31,"src":"RackOfLamb-h500_thumb.jpg","galleries_id":401472,"width":83});
thumbnails[7412461] = clik.newPhoto({"link":"photo_7412461.html","caption":"the lair","height":90,"id":7412461,"server_id":31,"src":"thelair-h500_thumb.jpg","galleries_id":401472,"width":160});
thumbnails[7412475] = clik.newPhoto({"link":"photo_7412475.html","caption":"the trophy hunter","height":120,"id":7412475,"server_id":31,"src":"TrophyHunter_thumb.jpg","galleries_id":401476,"width":120});
thumbnails[7412479] = clik.newPhoto({"link":"photo_7412479.html","caption":"wet feet","height":120,"id":7412479,"server_id":31,"src":"wetfeet-w1000-h1000_thumb.jpg","galleries_id":401470,"width":120});
thumbnails[7422842] = clik.newPhoto({"link":"photo_7422842.html","caption":"bullrush","height":70,"id":7422842,"server_id":31,"src":"bullrush1_thumb.jpg","galleries_id":401472,"width":187});
thumbnails[7509873] = clik.newPhoto({"link":"photo_7509873.html","caption":"even split","height":43,"id":7509873,"server_id":31,"src":"evensplit-h500_thumb.jpg","galleries_id":401472,"width":160});
thumbnails[7774909] = clik.newPhoto({"link":"photo_7774909.html","caption":"view from the inside","height":120,"id":7774909,"server_id":31,"src":"viewfrominside-w2880_thumb.jpg","galleries_id":401472,"width":99});
thumbnails[8254308] = clik.newPhoto({"link":"photo_8254308.html","caption":"lambscape","height":120,"id":8254308,"server_id":31,"src":"lambscape_9DC135EF-1EC9-D45B-1CD0404A4C1FF022_thumb.jpg","galleries_id":439659,"width":147});
thumbnails[7412411] = clik.newPhoto({"link":"photo_7412411.html","caption":"chapter 2","height":53,"id":7412411,"server_id":31,"src":"Chapter_2-w1000-h1000_thumb.jpg","galleries_id":401470,"width":160});
thumbnails[7412422] = clik.newPhoto({"link":"photo_7412422.html","caption":"guide","height":110,"id":7412422,"server_id":31,"src":"guidea_thumb.jpg","galleries_id":401476,"width":220});
thumbnails[7412438] = clik.newPhoto({"link":"photo_7412438.html","caption":"the package","height":84,"id":7412438,"server_id":31,"src":"package-w1000-h1000_thumb.jpg","galleries_id":401470,"width":160});
thumbnails[7412459] = clik.newPhoto({"link":"photo_7412459.html","caption":"the lads","height":70,"id":7412459,"server_id":31,"src":"thelads_thumb.jpg","galleries_id":401472,"width":221});
thumbnails[7412468] = clik.newPhoto({"link":"photo_7412468.html","caption":"the minders","height":99,"id":7412468,"server_id":31,"src":"theminders-w1000-h1000_thumb.jpg","galleries_id":401470,"width":200});
thumbnails[7422765] = clik.newPhoto({"link":"photo_7422765.html","caption":"trophy","height":140,"id":7422765,"server_id":31,"src":"trophy_thumb.jpg","galleries_id":401481,"width":86});
thumbnails[7679798] = clik.newPhoto({"link":"photo_7679798.html","caption":"the chosen one","height":55,"id":7679798,"server_id":31,"src":"the-chosen-one-w1028-h8001_thumb.jpg","galleries_id":401472,"width":243});
thumbnails[8251294] = clik.newPhoto({"link":"photo_8251294.html","caption":"dog box","height":130,"id":8251294,"server_id":31,"src":"dogbox_thumb.jpg","galleries_id":401245,"width":130});
thumbnails[8264383] = clik.newPhoto({"link":"photo_8264383.html","caption":"counting sheep","height":120,"id":8264383,"server_id":31,"src":"counting-sheep_thumb.jpg","galleries_id":439659,"width":147});
thumbnails[8898210] = clik.newPhoto({"link":"photo_8898210.html","caption":"rubberneckers","height":79,"id":8898210,"server_id":31,"src":"rubberneckers_3B433783-1E4F-37DC-714B095894C37611_thumb.jpg","galleries_id":401472,"width":200});
thumbnails[7412413] = clik.newPhoto({"link":"photo_7412413.html","caption":"ebb tide","height":106,"id":7412413,"server_id":31,"src":"EbbTide-w1000-h1000_thumb.jpg","galleries_id":401470,"width":160});
thumbnails[7412424] = clik.newPhoto({"link":"photo_7412424.html","caption":"interior landscape ","height":120,"id":7412424,"server_id":31,"src":"interior_landscape_thumb.jpg","galleries_id":401472,"width":144});
thumbnails[7412427] = clik.newPhoto({"link":"photo_7412427.html","caption":"landscape in grey","height":80,"id":7412427,"server_id":31,"src":"LandscapeinGray1_thumb.jpg","galleries_id":401472,"width":160});
thumbnails[7412439] = clik.newPhoto({"link":"photo_7412439.html","caption":"the pighunter","height":120,"id":7412439,"server_id":31,"src":"PigHunter_thumb.jpg","galleries_id":401476,"width":120});
thumbnails[7412440] = clik.newPhoto({"link":"photo_7412440.html","caption":"pipi picker","height":140,"id":7412440,"server_id":31,"src":"Pipipicker-w1000-h1000_thumb.jpg","galleries_id":401470,"width":140});
thumbnails[7412448] = clik.newPhoto({"link":"photo_7412448.html","caption":"road's end","height":100,"id":7412448,"server_id":31,"src":"RoadsEnd_thumb.jpg","galleries_id":401472,"width":201});
thumbnails[7412452] = clik.newPhoto({"link":"photo_7412452.html","caption":"sink or swim","height":120,"id":7412452,"server_id":31,"src":"sinkorswim-w1000-h1000_thumb.jpg","galleries_id":401470,"width":97});
thumbnails[7412471] = clik.newPhoto({"link":"photo_7412471.html","caption":"the shepherd","height":120,"id":7412471,"server_id":31,"src":"theshepherd1_thumb.jpg","galleries_id":401472,"width":120});
thumbnails[7412474] = clik.newPhoto({"link":"photo_7412474.html","caption":"interior landscape 2","height":106,"id":7412474,"server_id":31,"src":"transfigure_thumb.jpg","galleries_id":401472,"width":160});
thumbnails[7422719] = clik.newPhoto({"link":"photo_7422719.html","caption":"floral dress","height":120,"id":7422719,"server_id":31,"src":"IMG_7591_thumb.jpg","galleries_id":401481,"width":120});
thumbnails[7509903] = clik.newPhoto({"link":"photo_7509903.html","caption":"portrait of a shed","height":120,"id":7509903,"server_id":31,"src":"portraitshed-h500_thumb.jpg","galleries_id":401472,"width":120});
thumbnails[8248711] = clik.newPhoto({"link":"photo_8248711.html","caption":"rise up","height":107,"id":8248711,"server_id":31,"src":"rise_up-h500_thumb.jpg","galleries_id":401245,"width":160});
thumbnails[8713598] = clik.newPhoto({"link":"photo_8713598.html","caption":"the fisherman","height":120,"id":8713598,"server_id":31,"src":"thefisherman-w1000-h1000_thumb.jpg","galleries_id":401470,"width":120});
thumbnails[7412419] = clik.newPhoto({"link":"photo_7412419.html","caption":"fresian freize  ","height":88,"id":7412419,"server_id":31,"src":"Frieze_thumb.jpg","galleries_id":401472,"width":160});
thumbnails[7412420] = clik.newPhoto({"link":"photo_7412420.html","caption":"gates 1 & 2","height":125,"id":7412420,"server_id":31,"src":"Gates2_3754C182-24E8-5EC4-4F63D9DAE459C956_thumb.jpg","galleries_id":401472,"width":155});
thumbnails[7412421] = clik.newPhoto({"link":"photo_7412421.html","caption":"guardian","height":120,"id":7412421,"server_id":31,"src":"guardian-h500_thumb.jpg","galleries_id":401472,"width":120});
thumbnails[7412434] = clik.newPhoto({"link":"photo_7412434.html","caption":"neolithic utopia ","height":92,"id":7412434,"server_id":31,"src":"neolithicutopia_thumb.jpg","galleries_id":401472,"width":160});
thumbnails[7412435] = clik.newPhoto({"link":"photo_7412435.html","caption":"nor'easterly","height":120,"id":7412435,"server_id":31,"src":"noreasterly_thumb.jpg","galleries_id":401472,"width":133});
thumbnails[7412436] = clik.newPhoto({"link":"photo_7412436.html","caption":"oilskin armour","height":105,"id":7412436,"server_id":31,"src":"oilskinarmour-w1000-h500_thumb.jpg","galleries_id":401472,"width":146});
thumbnails[7412441] = clik.newPhoto({"link":"photo_7412441.html","caption":"private property","height":120,"id":7412441,"server_id":31,"src":"privateproperty-w1000-h500_thumb.jpg","galleries_id":401472,"width":120});
thumbnails[7412442] = clik.newPhoto({"link":"photo_7412442.html","caption":"quiet word","height":70,"id":7412442,"server_id":31,"src":"QuietWord_thumb.jpg","galleries_id":401472,"width":212});
thumbnails[7412449] = clik.newPhoto({"link":"photo_7412449.html","caption":"rush hour","height":100,"id":7412449,"server_id":31,"src":"rushhour_thumb.jpg","galleries_id":401472,"width":244});
thumbnails[7412453] = clik.newPhoto({"link":"photo_7412453.html","caption":"sitting pretty","height":125,"id":7412453,"server_id":31,"src":"sitting-pretty-w750-h550-w1000-h1000_thumb.jpg","galleries_id":401470,"width":132});
thumbnails[7412455] = clik.newPhoto({"link":"photo_7412455.html","caption":"spiritaxe","height":106,"id":7412455,"server_id":31,"src":"spiritaxe_thumb.jpg","galleries_id":401472,"width":105});
thumbnails[7412478] = clik.newPhoto({"link":"photo_7412478.html","caption":"weathered","height":120,"id":7412478,"server_id":31,"src":"weathered1-h500-h500_thumb.jpg","galleries_id":401472,"width":144});
thumbnails[8373865] = clik.newPhoto({"link":"photo_8373865.html","caption":"national pastime","height":138,"id":8373865,"server_id":31,"src":"natpasstime1_thumb.jpg","galleries_id":401245,"width":260});
thumbnails[8521658] = clik.newPhoto({"link":"photo_8521658.html","caption":"oceania","height":120,"id":8521658,"server_id":31,"src":"Oceania-h500-w1000-h1000_thumb.jpg","galleries_id":401470,"width":63});
thumbnails[7412426] = clik.newPhoto({"link":"photo_7412426.html","caption":"lambscape","height":110,"id":7412426,"server_id":31,"src":"lambscape_thumb.jpg","galleries_id":401472,"width":135});
thumbnails[7412430] = clik.newPhoto({"link":"photo_7412430.html","caption":"lot 18","height":59,"id":7412430,"server_id":31,"src":"lot18_thumb.jpg","galleries_id":401472,"width":260});
thumbnails[7412432] = clik.newPhoto({"link":"photo_7412432.html","caption":"morning mist","height":100,"id":7412432,"server_id":31,"src":"Morningmist-w1000_thumb.jpg","galleries_id":401472,"width":250});
thumbnails[7412451] = clik.newPhoto({"link":"photo_7412451.html","caption":"the sheepfarmer","height":120,"id":7412451,"server_id":31,"src":"sheepfarmer-w1000-h500_thumb.jpg","galleries_id":401472,"width":120});
thumbnails[7412481] = clik.newPhoto({"link":"photo_7412481.html","caption":"worn","height":105,"id":7412481,"server_id":31,"src":"worn_thumb.jpg","galleries_id":401472,"width":105});
thumbnails[7425292] = clik.newPhoto({"link":"photo_7425292.html","caption":"friendly fight ","height":100,"id":7425292,"server_id":31,"src":"FriendlyFight-h500_thumb.jpg","galleries_id":401541,"width":137});
thumbnails[7425299] = clik.newPhoto({"link":"photo_7425299.html","caption":"pretty ugly","height":120,"id":7425299,"server_id":31,"src":"PrettyUgly-h500_thumb.jpg","galleries_id":401541,"width":153});
thumbnails[7434955] = clik.newPhoto({"link":"photo_7434955.html","caption":"quiet word","height":105,"id":7434955,"server_id":31,"src":"QuietWord-h500_thumb.jpg","galleries_id":401541,"width":137});
thumbnails[7478391] = clik.newPhoto({"link":"photo_7478391.html","caption":"tribe","height":120,"id":7478391,"server_id":31,"src":"tribe-h500_thumb.jpg","galleries_id":401246,"width":89});
thumbnails[7478394] = clik.newPhoto({"link":"photo_7478394.html","caption":"friendly fight ","height":117,"id":7478394,"server_id":31,"src":"FriendlyFight-h5001_thumb.jpg","galleries_id":401246,"width":160});
thumbnails[7502408] = clik.newPhoto({"link":"photo_7502408.html","caption":"the procession","height":64,"id":7502408,"server_id":31,"src":"procession-h500_thumb.jpg","galleries_id":401476,"width":260});
thumbnails[7510006] = clik.newPhoto({"link":"photo_7510006.html","caption":"the bach","height":88,"id":7510006,"server_id":31,"src":"TheBach-h500-w1000-h1000_thumb.jpg","galleries_id":401470,"width":160});
thumbnails[8415171] = clik.newPhoto({"link":"photo_8415171.html","caption":"the sisters","height":120,"id":8415171,"server_id":31,"src":"the-sisters_thumb.jpg","galleries_id":401245,"width":120});
thumbnails[7412417] = clik.newPhoto({"link":"photo_7412417.html","caption":"fleeced","height":120,"id":7412417,"server_id":31,"src":"Fleeced_thumb.jpg","galleries_id":401472,"width":120});
thumbnails[7412450] = clik.newPhoto({"link":"photo_7412450.html","caption":"scenic shed","height":90,"id":7412450,"server_id":31,"src":"ScenicShed_thumb.jpg","galleries_id":401472,"width":185});
thumbnails[7412457] = clik.newPhoto({"link":"photo_7412457.html","caption":"the stragglers","height":120,"id":7412457,"server_id":31,"src":"Stragglers_thumb.jpg","galleries_id":401472,"width":154});
thumbnails[7412462] = clik.newPhoto({"link":"photo_7412462.html","caption":"the mating game","height":80,"id":7412462,"server_id":31,"src":"TheMatingGame_thumb.jpg","galleries_id":401472,"width":160});
thumbnails[7412477] = clik.newPhoto({"link":"photo_7412477.html","caption":"walking the gaunlet","height":51,"id":7412477,"server_id":31,"src":"WalkingGauntlet_thumb.jpg","galleries_id":401472,"width":260});
thumbnails[7434945] = clik.newPhoto({"link":"photo_7434945.html","caption":"the changing room","height":140,"id":7434945,"server_id":31,"src":"the-changing-room-w600-w1000-h1000_thumb.jpg","galleries_id":401470,"width":99});
thumbnails[7477027] = clik.newPhoto({"link":"photo_7477027.html","caption":"untitled (pink pageant)","height":117,"id":7477027,"server_id":31,"src":"IMG_1017-h500_thumb.jpg","galleries_id":401541,"width":160});
thumbnails[7477036] = clik.newPhoto({"link":"photo_7477036.html","caption":"untitled (green pageant)","height":90,"id":7477036,"server_id":31,"src":"IMG_1019-h500_thumb.jpg","galleries_id":401541,"width":123});
thumbnails[7477047] = clik.newPhoto({"link":"photo_7477047.html","caption":"stutter","height":120,"id":7477047,"server_id":31,"src":"stutter-h500_thumb.jpg","galleries_id":401541,"width":97});
thumbnails[7505630] = clik.newPhoto({"link":"photo_7505630.html","caption":"sunday morning","height":120,"id":7505630,"server_id":31,"src":"SundayMorning-h500-w1000-h1000_thumb.jpg","galleries_id":401470,"width":99});
thumbnails[8415172] = clik.newPhoto({"link":"photo_8415172.html","caption":"the sale","height":125,"id":8415172,"server_id":31,"src":"the-sale_thumb.jpg","galleries_id":401245,"width":125});
thumbnails[7412454] = clik.newPhoto({"link":"photo_7412454.html","caption":"southern skies","height":120,"id":7412454,"server_id":31,"src":"southernskies_thumb.jpg","galleries_id":401472,"width":108});
thumbnails[7422705] = clik.newPhoto({"link":"photo_7422705.html","caption":"painted girl","height":140,"id":7422705,"server_id":31,"src":"YZ1I2990_thumb.jpg","galleries_id":401481,"width":100});
thumbnails[7434958] = clik.newPhoto({"link":"photo_7434958.html","caption":"oxymoron","height":88,"id":7434958,"server_id":31,"src":"oxymoron-h500_thumb.jpg","galleries_id":401541,"width":160});
thumbnails[7474471] = clik.newPhoto({"link":"photo_7474471.html","caption":"family man (Lundy)","height":120,"id":7474471,"server_id":31,"src":"lundy-h500_thumb.jpg","galleries_id":401541,"width":92});
thumbnails[7474478] = clik.newPhoto({"link":"photo_7474478.html","caption":"stain","height":58,"id":7474478,"server_id":31,"src":"stain-h500_thumb.jpg","galleries_id":401541,"width":160});
thumbnails[7474487] = clik.newPhoto({"link":"photo_7474487.html","caption":"september 10th","height":103,"id":7474487,"server_id":31,"src":"sept-h500_thumb.jpg","galleries_id":401541,"width":160});
thumbnails[7474513] = clik.newPhoto({"link":"photo_7474513.html","caption":"leaning towards what isn't there","height":120,"id":7474513,"server_id":31,"src":"leaning_towards_what_isnt_there-h5001_thumb.jpg","galleries_id":401541,"width":120});
thumbnails[7478128] = clik.newPhoto({"link":"photo_7478128.html","caption":"trophy hunter","height":120,"id":7478128,"server_id":31,"src":"TrophyHunter-h500_thumb.jpg","galleries_id":401246,"width":120});
thumbnails[7478399] = clik.newPhoto({"link":"photo_7478399.html","caption":"oxymoron","height":88,"id":7478399,"server_id":31,"src":"oxymoron-h5001_thumb.jpg","galleries_id":401246,"width":160});
thumbnails[7478402] = clik.newPhoto({"link":"photo_7478402.html","caption":"stain","height":58,"id":7478402,"server_id":31,"src":"stain-h5001_thumb.jpg","galleries_id":401246,"width":160});
thumbnails[7479845] = clik.newPhoto({"link":"photo_7479845.html","caption":"paint by numbers","height":130,"id":7479845,"server_id":31,"src":"IMG_7580_thumb.jpg","galleries_id":401541,"width":186});
thumbnails[7479846] = clik.newPhoto({"link":"photo_7479846.html","caption":"photobooth","height":112,"id":7479846,"server_id":31,"src":"photobooth-w800-h800_thumb.jpg","galleries_id":401541,"width":160});
thumbnails[7482481] = clik.newPhoto({"link":"photo_7482481.html","caption":"bridge","height":107,"id":7482481,"server_id":31,"src":"bridge-h500_thumb.jpg","galleries_id":401541,"width":160});
thumbnails[7482483] = clik.newPhoto({"link":"photo_7482483.html","caption":"bridge","height":107,"id":7482483,"server_id":31,"src":"bridge-h5001_thumb.jpg","galleries_id":401246,"width":160});
thumbnails[7482487] = clik.newPhoto({"link":"photo_7482487.html","caption":"proper","height":120,"id":7482487,"server_id":31,"src":"proper-h500_thumb.jpg","galleries_id":401246,"width":99});
thumbnails[7482492] = clik.newPhoto({"link":"photo_7482492.html","caption":"proper","height":120,"id":7482492,"server_id":31,"src":"proper-h5001_thumb.jpg","galleries_id":401541,"width":99});
thumbnails[8854950] = clik.newPhoto({"link":"photo_8854950.html","caption":"the catch","height":140,"id":8854950,"server_id":31,"src":"the-catch1_thumb.jpg","galleries_id":401245,"width":140});
thumbnails[7422697] = clik.newPhoto({"link":"photo_7422697.html","caption":"kiss","height":120,"id":7422697,"server_id":31,"src":"IMG_7569_thumb.jpg","galleries_id":401481,"width":80});
thumbnails[7422759] = clik.newPhoto({"link":"photo_7422759.html","caption":"blur","height":150,"id":7422759,"server_id":31,"src":"YZ1I3004_thumb.jpg","galleries_id":401481,"width":104});
thumbnails[7482646] = clik.newPhoto({"link":"photo_7482646.html","caption":"paint by numbers","height":115,"id":7482646,"server_id":31,"src":"paintbynumbers-h5001_thumb.jpg","galleries_id":401246,"width":160});
thumbnails[7482653] = clik.newPhoto({"link":"photo_7482653.html","caption":"photobooth","height":112,"id":7482653,"server_id":31,"src":"IMG_7581_thumb.jpg","galleries_id":401246,"width":160});
thumbnails[8867251] = clik.newPhoto({"link":"photo_8867251.html","caption":"self-taught (the master's apprentice)","height":125,"id":8867251,"server_id":31,"src":"mastersapprentice_thumb.jpg","galleries_id":401245,"width":125});
thumbnails[7422715] = clik.newPhoto({"link":"photo_7422715.html","caption":"whiteout","height":140,"id":7422715,"server_id":31,"src":"IMG_7571_thumb.jpg","galleries_id":401481,"width":140});
thumbnails[7422725] = clik.newPhoto({"link":"photo_7422725.html","caption":"picture window","height":135,"id":7422725,"server_id":31,"src":"picturewindow_thumb.jpg","galleries_id":401481,"width":135});
thumbnails[7510047] = clik.newPhoto({"link":"photo_7510047.html","caption":"night light","height":105,"id":7510047,"server_id":31,"src":"Nightlight-h500_thumb.jpg","galleries_id":401472,"width":105});
thumbnails[8529868] = clik.newPhoto({"link":"photo_8529868.html","caption":"heritage","height":140,"id":8529868,"server_id":31,"src":"heritage3-h450_thumb.jpg","galleries_id":401541,"width":104});
thumbnails[7412470] = clik.newPhoto({"link":"photo_7412470.html","caption":"the selection","height":59,"id":7412470,"server_id":31,"src":"TheSelection_thumb.jpg","galleries_id":401472,"width":260});
thumbnails[7422711] = clik.newPhoto({"link":"photo_7422711.html","caption":"front lawn","height":120,"id":7422711,"server_id":31,"src":"YZ1I2992_thumb.jpg","galleries_id":401481,"width":120});
thumbnails[7422762] = clik.newPhoto({"link":"photo_7422762.html","caption":"over exposed","height":140,"id":7422762,"server_id":31,"src":"overexposed_thumb.jpg","galleries_id":401481,"width":140});
thumbnails[7422741] = clik.newPhoto({"link":"photo_7422741.html","caption":"beach boys","height":119,"id":7422741,"server_id":31,"src":"YZ1I2999_thumb.jpg","galleries_id":401481,"width":120});
thumbnails[7422739] = clik.newPhoto({"link":"photo_7422739.html","caption":"mask","height":120,"id":7422739,"server_id":31,"src":"YZ1I2998_thumb.jpg","galleries_id":401481,"width":83});
thumbnails[7505409] = clik.newPhoto({"link":"photo_7505409.html","caption":"the swimmer","height":120,"id":7505409,"server_id":31,"src":"theswimmer-w1000-h1000_thumb.jpg","galleries_id":401470,"width":120});
thumbnails[7680301] = clik.newPhoto({"link":"photo_7680301.html","caption":"dog tucker","height":70,"id":7680301,"server_id":31,"src":"dog-tucker-w1028-h800_thumb.jpg","galleries_id":401472,"width":242});
thumbnails[7412408] = clik.newPhoto({"link":"photo_7412408.html","caption":"Bather ll","height":81,"id":7412408,"server_id":31,"src":"bather2-w1000-h1000_thumb.jpg","galleries_id":401470,"width":200});
thumbnails[7397125] = clik.newPhoto({"link":"photo_7397125.html","caption":"Debut 2","height":130,"id":7397125,"server_id":31,"src":"Debut2-w1000-h1000_thumb.jpg","galleries_id":401470,"width":130});
thumbnails[7412458] = clik.newPhoto({"link":"photo_7412458.html","caption":"the flock","height":130,"id":7412458,"server_id":31,"src":"theflock_thumb.jpg","galleries_id":401472,"width":125});
thumbnails[8713694] = clik.newPhoto({"link":"photo_8713694.html","caption":"the herd","height":120,"id":8713694,"server_id":31,"src":"the-herd_thumb.jpg","galleries_id":401472,"width":120});
thumbnails[7412446] = clik.newPhoto({"link":"photo_7412446.html","caption":"reprieve","height":120,"id":7412446,"server_id":31,"src":"Reprieve-w1000-h10001_thumb.jpg","galleries_id":401470,"width":120});
thumbnails[7412431] = clik.newPhoto({"link":"photo_7412431.html","caption":"morning drove","height":79,"id":7412431,"server_id":31,"src":"morningdrove_thumb.jpg","galleries_id":401472,"width":160});
thumbnails[8521659] = clik.newPhoto({"link":"photo_8521659.html","caption":"bather 1","height":64,"id":8521659,"server_id":31,"src":"bather-0ne_thumb.jpg","galleries_id":401470,"width":160});
thumbnails[8521673] = clik.newPhoto({"link":"photo_8521673.html","caption":"half a side of beef","height":155,"id":8521673,"server_id":31,"src":"half-a-side-of-beef-h510_thumb.jpg","galleries_id":401472,"width":43});
thumbnails[7412473] = clik.newPhoto({"link":"photo_7412473.html","caption":"the works","height":120,"id":7412473,"server_id":31,"src":"TheWorks_thumb.jpg","galleries_id":401472,"width":120});
thumbnails[8713617] = clik.newPhoto({"link":"photo_8713617.html","caption":"sunshed","height":114,"id":8713617,"server_id":31,"src":"sunshed-h425_thumb.jpg","galleries_id":401472,"width":120});
thumbnails[8713633] = clik.newPhoto({"link":"photo_8713633.html","caption":"the tool shed","height":80,"id":8713633,"server_id":31,"src":"the-tool-shed_thumb.jpg","galleries_id":401472,"width":190});
thumbnails[8713709] = clik.newPhoto({"link":"photo_8713709.html","caption":"wet and dry","height":120,"id":8713709,"server_id":31,"src":"wetanddry_thumb.jpg","galleries_id":401472,"width":120});
thumbnails[8521669] = clik.newPhoto({"link":"photo_8521669.html","caption":"ed & flo","height":70,"id":8521669,"server_id":31,"src":"ed-and-flo-h300_thumb.jpg","galleries_id":401472,"width":208});
thumbnails[8521672] = clik.newPhoto({"link":"photo_8521672.html","caption":"5 accross","height":52,"id":8521672,"server_id":31,"src":"five-across_thumb.jpg","galleries_id":401472,"width":160});
thumbnails[7505416] = clik.newPhoto({"link":"photo_7505416.html","caption":"reflections","height":120,"id":7505416,"server_id":31,"src":"reflections-w750-h550-w1000-h1000_thumb.jpg","galleries_id":401470,"width":120});
thumbnails[8713332] = clik.newPhoto({"link":"photo_8713332.html","caption":"judgement day","height":60,"id":8713332,"server_id":31,"src":"judgement-day_thumb.jpg","galleries_id":401472,"width":201});
thumbnails[8713396] = clik.newPhoto({"link":"photo_8713396.html","caption":"the shed","height":84,"id":8713396,"server_id":31,"src":"the-shed_thumb.jpg","galleries_id":401472,"width":160});
thumbnails[7505864] = clik.newPhoto({"link":"photo_7505864.html","caption":"the tourist","height":120,"id":7505864,"server_id":31,"src":"the-tourist-h500-w1000-h1000_thumb.jpg","galleries_id":401470,"width":120});
thumbnails[8521662] = clik.newPhoto({"link":"photo_8521662.html","caption":"the fishing trip","height":37,"id":8521662,"server_id":31,"src":"fishing-trip_thumb.jpg","galleries_id":401470,"width":160});
thumbnails[7920094] = clik.newPhoto({"link":"photo_7920094.html","caption":"dear hunter hunt me","height":135,"id":7920094,"server_id":31,"src":"deer-hunter-w2000_thumb.jpg","galleries_id":401472,"width":105});
thumbnails[8251274] = clik.newPhoto({"link":"photo_8251274.html","caption":"enlightenment","height":120,"id":8251274,"server_id":31,"src":"enlightenment1_thumb.jpg","galleries_id":401472,"width":126});

/***************************************************************************
* Create the array of Gallery objects                                      *
***************************************************************************/
var galleries = new Object();
galleries[401470] = clik.newGallery({"photoIDs":[7412433,7422630,7412409,7412456,7412415,7412425,7412479,7412411,7412438,7412468,7412413,7412440,7412452,8713598,7412453,8521658,7510006,7434945,7505630,7505409,7412408,7397125,7412446,8521659,7505416,7505864,8521662],"link":"gallery_401470.html","skipIndex":0,"section_code":"gallery","id":401470,"parentGallery":"","featured_images":"8713598,8521662,8521659,8521658,7510006,7505864,7505630,7505416,7505409,7434945","maxRecords":0,"usePopups":false,"singleSection":false,"title":"the ocean"});galleries[401472] = clik.newGallery({"photoIDs":[7412412,7412410,7412437,7412428,7412443,7412461,7422842,7509873,7774909,7412459,7679798,8898210,7412424,7412427,7412448,7412471,7412474,7509903,7412419,7412420,7412421,7412434,7412435,7412436,7412441,7412442,7412449,7412455,7412478,7412426,7412430,7412432,7412451,7412481,7412417,7412450,7412457,7412462,7412477,7412454,7510047,7412470,7680301,7412458,8713694,7412431,8521673,7412473,8713617,8713633,8713709,8521669,8521672,8713332,8713396,7920094,8251274],"link":"gallery_401472.html","skipIndex":0,"section_code":"gallery","id":401472,"parentGallery":"","featured_images":"8898210,8713709,8713694,8713633,8713617,8713396,8713332,8521673,8521672,8521669","maxRecords":0,"usePopups":false,"singleSection":false,"title":"the land"});galleries[401476] = clik.newGallery({"photoIDs":[7502410,7412416,7412418,7412429,7412475,7412422,7412439,7502408],"link":"gallery_401476.html","skipIndex":0,"section_code":"gallery","id":401476,"parentGallery":"","featured_images":"7502410,7502408,7412475,7412439,7412429,7412422,7412418,7412416","maxRecords":0,"usePopups":false,"singleSection":false,"title":"hunters & consumers -2007"});galleries[401541] = clik.newGallery({"photoIDs":[7482546,7510036,7434950,7425292,7425299,7434955,7477027,7477036,7477047,7434958,7474471,7474478,7474487,7474513,7479845,7479846,7482481,7482492,8529868],"link":"gallery_401541.html","skipIndex":0,"section_code":"gallery","id":401541,"parentGallery":"","featured_images":"8529868,7510036,7482546,7482492,7482481,7479846,7479845,7477047,7477036,7477027","maxRecords":0,"usePopups":false,"singleSection":false,"title":"studio works"});galleries[401481] = clik.newGallery({"photoIDs":[7422750,7422755,7422692,7422707,7422729,7422732,7422744,7422702,7422752,7422767,7422765,7422719,7422705,7422697,7422759,7422715,7422725,7422711,7422762,7422741,7422739],"link":"gallery_401481.html","skipIndex":0,"section_code":"gallery","id":401481,"parentGallery":"","featured_images":"7422767,7422765,7422762,7422759,7422755,7422752,7422750,7422744,7422741,7422739","maxRecords":0,"usePopups":false,"singleSection":false,"title":"everyday fictions - 2011"});galleries[401246] = clik.newGallery({"photoIDs":[7478391,7478394,7478128,7478399,7478402,7482483,7482487,7482646,7482653],"link":"gallery_401246.html","skipIndex":0,"section_code":"gallery","id":401246,"parentGallery":"","featured_images":"7482653,7482646,7482487,7482483,7478402,7478399,7478394,7478391,7478128","maxRecords":0,"usePopups":false,"singleSection":false,"title":"works available"});galleries[401245] = clik.newGallery({"photoIDs":[8251294,8248711,8373865,8415171,8415172,8854950,8867251],"link":"gallery_401245.html","skipIndex":0,"section_code":"gallery","id":401245,"parentGallery":"","featured_images":"8867251,8854950,8415172,8415171,8373865,8251294,8248711","maxRecords":0,"usePopups":false,"singleSection":false,"title":"new works"});galleries[439659] = clik.newGallery({"photoIDs":[7412423,8254306,8254307,8254309,8254308,8264383],"link":"gallery_439659.html","skipIndex":0,"section_code":"gallery","id":439659,"parentGallery":"","featured_images":"8264383,8254309,8254308,8254307,8254306,7412423","maxRecords":0,"usePopups":false,"singleSection":false,"title":"buy a print"});/***************************************************************************
* Create the array of image sets                                           *
***************************************************************************/
var imageSets = {};
imageSets[3] = '8963450,8898210,8881898,8867251,8854950,8713709,8713694,8713633,8713617,8713598,8713396,8713332,8558563,8529868,8521673,8521672,8521669,8521662,8521659,8521658,8478545,8434470,8434449,8415172,8415171,8395919,8373865,8271035,8264383,8254309,8254308,8254307,8254306,8251294,8251274,8248711,7920094,7774909,7680301,7679798,7533661,7522056,7510047,7510036,7510006,7509903,7509873,7505864,7505630,7505416';
imageSets[1] = '7412423,8254306,7422630,7412415,8251294,7412439,8373865,7412453,7412417,8867251';
imageSets[241079] = '7482546,7412441,7425299,7412451,7920094';
 /***************************************************************************
* Get a server path given an ID                                            *
***************************************************************************/
function getServerPath(server_id) {
	var val = -1;
		switch (server_id) {
		case 19:
		val = 'http://www5.clikpic.com/willow654/images';
		break;
	}
		switch (server_id) {
		case 35:
		val = 'http://admin3.clikpic.com/willow654/images';
		break;
	}
		switch (server_id) {
		case 18:
		val = 'http://www4.clikpic.com/willow654/images';
		break;
	}
		switch (server_id) {
		case 15:
		val = 'http://www3.clikpic.com/willow654/images';
		break;
	}
		switch (server_id) {
		case 34:
		val = 'http://www9.clikpic.com/willow654/images';
		break;
	}
		switch (server_id) {
		case 39:
		val = 'http://www10.clikpic.com/willow654/images';
		break;
	}
		switch (server_id) {
		case 37:
		val = 'http://admin4.clikpic.com/willow654/images';
		break;
	}
		switch (server_id) {
		case 38:
		val = 'http://admin5.clikpic.com/willow654/images';
		break;
	}
		switch (server_id) {
		case 21:
		val = 'http://www6.clikpic.com/willow654/images';
		break;
	}
		switch (server_id) {
		case 42:
		val = 'db2.clikpic.com/willow654/images';
		break;
	}
		switch (server_id) {
		case 40:
		val = 'http://www11.clikpic.com/willow654/images';
		break;
	}
		switch (server_id) {
		case 22:
		val = 'http://tpc5/clikpic/willow654/images';
		break;
	}
		switch (server_id) {
		case 23:
		val = 'http://tpc10/clikpic/willow654/images';
		break;
	}
		switch (server_id) {
		case 24:
		val = 'http://tpc15/clikpic/willow654/images';
		break;
	}
		switch (server_id) {
		case 25:
		val = 'http://tpc16/clikpic/willow654/images';
		break;
	}
		switch (server_id) {
		case 26:
		val = 'http://tpc20/clikpic/willow654/images';
		break;
	}
		switch (server_id) {
		case 2:
		val = 'http://admin.clikpic.com/willow654/images';
		break;
	}
		switch (server_id) {
		case 1:
		val = 'http://www1.clikpic.com/willow654/images';
		break;
	}
		switch (server_id) {
		case 0:
		val = 'http://www.clikpic.com/willow654/images';
		break;
	}
		switch (server_id) {
		case 5:
		val = 'http://www2.clikpic.com/willow654/images';
		break;
	}
		switch (server_id) {
		case 32:
		val = 'http://www8.clikpic.com/willow654/images';
		break;
	}
		switch (server_id) {
		case 4:
		val = 'http://clikchurch.clikpic.com/willow654/images';
		break;
	}
		switch (server_id) {
		case 31:
		val = 'http://www7.clikpic.com/willow654/images';
		break;
	}
		switch (server_id) {
		case 51:
		val = 'http://www12.clikpic.com/willow654/images';
		break;
	}
		switch (server_id) {
		case 52:
		val = 'http://tpc22/clikpic/willow654/images';
		break;
	}
		switch (server_id) {
		case 53:
		val = 'http://images.clikpic.com/willow654/images';
		break;
	}
		switch (server_id) {
		case 50:
		val = '[cliktext value=article.servers_id type=servers_id]/willow654/images';
		break;
	}
		return val;
}

/***************************************************************************
* img = reference to image object in which to show image                   *
***************************************************************************/
function showHomeImage(img) {
	imageID = randomListVal('');
	if (!basic) {
		img.src = photos[imageID].src;
		img.width = photos[imageID].width;
		img.height = photos[imageID].height;
		img.parentNode.title = img.alt = photos[imageID].caption;
	} else {
		newImage = new Image(photos[imageID].width,photos[imageID].height);
		newImage.src = photos[imageID].src;
		document.images[img.name] = newImage;
		
	}
}

function getHomeImageLink(imageID) {
  	var href='', photo = (backgrounds || photos || {})[imageID];
	if(photo){
		if (photo && photo.galleries_id != '') {
  			href = photo.fnGalleryLink();
  		}
  		  		else {
  				href += 'gallery.html';
  	  		}
	}
    return href;
}

/***************************************************************************
* Show a random image on home page from featured images                    *
***************************************************************************/
function showHomeImageInline(el, image_sets_id, href) {
	
	var css = {}, imageID,
	    imageSetsId = 1;
	if(image_sets_id){
		imageSetsId = image_sets_id;
	}
	imageID = randomListVal(imageSets[imageSetsId]);
	if (href == null && 'gallery' != '') {
					href = getHomeImageLink(imageID);
	}
	
	updateImage({nextPhoto: backgrounds[imageID], img:el.find('img')[0],
                $photo:el, $title:$('#homeimageTitleContainer'), $detail:$('#homeimageDetailsContainer'),                speed:0, href:href, css:css, onAfter: function(){                  this.closest('.contentsection').doManualAlign({				    inner: 'img',				    crop: 'a'				  });                }              });
}

/***************************************************************************
* Set 'img' to be a new image given its photo() object                     *
***************************************************************************/
function updateImage (options) {
	var defaults = {nextPhoto:'',field:'',img:'',$photo:'',$title:'',$detail:'',$detailContainer:'',
                    updateDocumentTitle:false,speed:0,href:false,css:false,updateHash:false,onAfter:null,onBefore:null},
		op = $.extend({},defaults,options),
		html = '', temp = '',
		photoId = op.nextPhoto.id,
		photoCaption = ''+op.nextPhoto.caption,
		photoSrc = op.nextPhoto.src;
	
	if (op.updateHash && clik.getIDInUrl(location.href,'photo') != op.nextPhoto.id) {
		clik.changeHash('photos_id=' + op.nextPhoto.id, true);
	}
		
	    if (op.$title.length > 0) {
  		op.$title.fadeGalleryDetails(photoCaption, op.speed);
    }
        if (op.updateDocumentTitle) {
				  document.title = 'Barry Ross Smith';
			    }
        if (op.$detail.length > 0) {
      	temp = op.nextPhoto.fnGetImageDetails();
	    op.$detail.fadeGalleryDetails(temp, op.speed, function(){
			if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
				toggleAddToCartConfirm(backgrounds, op.$detail);
			} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
				toggleAddToCartConfirm(photos, op.$detail);
			}
			$('body').trigger('clikUpdate.popup');
	    });
    }
        $(op.$detailContainer).find('.replaceable[class*=replaceable_photo-]').each(function(){
    	var field = clik.getPrefixedClass(this.className, 'replaceable_photo-');
    	if (field in op.nextPhoto) {
    		$(this).fadeGalleryDetails(op.nextPhoto[field], op.speed);
    	}
    }).end().find('.replaceable.photoPayment').fadeGalleryDetails(op.nextPhoto.fnGetPaymentInfo(), op.speed, function(){
		if (typeof(backgrounds) != 'undefined' && op.nextPhoto == backgrounds[op.nextPhoto.id]) {
			toggleAddToCartConfirm(backgrounds, op.$detailContainer);
		} else if (typeof(photos) != 'undefined' && op.nextPhoto == photos[op.nextPhoto.id]) {
			toggleAddToCartConfirm(photos, op.$detailContainer);
		}
		$('body').trigger('clikUpdate.popup');
	});
		if (op.$photo.length > 0) {
		html = $('<img/>',{
			'class': 'mainphoto photo',
			src: photoSrc,
			id: 'mainPic',
			name: 'mainPic',
			width: op.nextPhoto.width,
			height: op.nextPhoto.height,
			alt: photoCaption,
			css: op.css || {}
		});
		if (op.href) {
			if (op.href.match(/<a/)) {
				html = $(op.href).append(html);
			} else {
				html = $('<a/>', {
					href: op.href,
					title: photoCaption
				}).append(html);
			}
		} else {
			html = $('<a/>', {
				title: photoCaption
			}).append(html);
		}
		if (op.speed == 0) {			op.$photo.html(html);			if (op.onBefore) {			  	op.onBefore.apply(op.$photo);			}			if (op.onAfter) {			  	op.onAfter.apply(op.$photo);			}		} else {			op.$photo.stop(true,true).fadeReplaceWith(html,op.speed,'',function(){  				if (op.onAfter) {				  	op.onAfter.apply(this);				}				clik.doColumnResize(false, $(this).add(op.$detail).add(op.$title));			}, op.onBefore);
		}	}
    if (op.field) {
		op.field.value = photoId;
	} else {
		op.$photo.data('image_id', photoId);
    }
        if (!op.speed) {
      	clik.doColumnResize(false, op.$photo.add(op.$detail).add(op.$title));
    }
        
    return html;
	}

/***************************************************************************
* Toggle add to cart confirmation element and set up the click event for   *
* the 'Add to cart' button.                                                *
***************************************************************************/
function toggleAddToCartConfirm(array, root){
	if (typeof(array) !== 'object' || array === null) {
	  	array = photos;
	}
	if (!$(root).length) {		root = $('body');	}	if($('#paymentConfirm', root).length > 0){
		$('#paymentConfirm', root).hide();
		$('#paymentAddButton', root)
		.unbind()
		.click(function(){
						form = $('#paymentForm', root)[0];
			option_id = 0;
			if(form.item_option.value){
				option_id = form.item_option.value;
			}
			if(addItemToBasket(form.item_number.value,array,form.site.value,parseInt(form.quantity.value, 10),option_id)){
				if($.browser.msie){$('#paymentConfirm', root).text('Item added to cart').show();}
				else{
					$('#paymentConfirm', root).text('Item added to cart').fadeIn();
					dspOrderDetails(form.site.value);
				}
			}
			else{
				$('#paymentConfirm', root).text('Item not added - check cookies are enabled in your browser.').fadeIn();
			}
		});
	}
}

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetImageDetails = function(){
	var temp = '';
	if (this.description != '') {
		temp +=  '<div id="imageDescription">' + this.description + '</div>';
	}
		if (this.photo_ref != '') {
		temp += '<div class="imageinfo" id="imageRef"><strong>Ref: </strong>' + this.photo_ref + '</div>';
	}
		if (this.takendate != '') {
		
		temp += '<div class="imageinfo" id="imageDate"><strong>Date: </strong>' + this.takendate + '</div>';
	}
	
	if (this.location != '') {
		
		temp += '<div class="imageinfo" id="imageLocation"><strong>Location: </strong>' +  this.location + '</div>';
	}
	
	if (this.photographer != '') {
		
		temp += '<div class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>' + this.photographer + '</div>';
	}
			
	temp += this.fnGetPaymentInfo();
				if (temp != '') {
		temp += '<div class="spacer"></div>';
	}
	return temp;
};

/***************************************************************************
* Get payment info for image - add as 'method' to photo object             *
***************************************************************************/
clik.photo.fnGetPaymentInfo = function(){
	var temp = '';
	if (this.item_price !== '') {
				temp += '<p>Buy now using PayPal:</p>';
				temp += '<div class="imageinfo" id="imagePrice"><strong>' + this.purchase_instruction + '</strong> NZ$' + (this.item_price).toFixed(2) + '</div>';
		var item_name  = this.purchase_instruction;
		var amount = (this.item_price).toFixed(2);
		var item_option  = 0;
	}
		else {
		
	}
	if (this.item_price !== '') {
					temp += '<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
			temp += '<input type="hidden" name="item_name" value="'+item_name+'">';
			ref = '';
			if(this.photo_ref != ''){
				ref = this.photo_ref+' - '+this.caption;
			}
			else{
				ref = this.id+' - '+this.caption;
			}
			price = amount;								temp += '<input type="hidden" name="cmd" value="_cart">';
					temp += '<input type="hidden" name="business" value="info@barryrosssmith.co.nz">';
					temp += '<input type="hidden" name="currency_code" value="NZD">';
					temp += '<input type="hidden" name="add" value="1">';
													temp += '<input type="hidden" name="amount" value="'+amount+'">';
					temp += '<input type="hidden" name="item_number" value="'+ref+'">';
													temp += '<input type=\"Submit\" value=\"Add to cart\" id=\"paymentAddButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
										temp += '</form>';
										temp += '<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';
				temp += '<input type="hidden" name="cmd" value="_cart">';
				temp += '<input type="hidden" name="business" value="info@barryrosssmith.co.nz">';
				temp += '<input type="hidden" name="display" value="1">';
				temp += '<input type=\"Submit\" value=\"View cart\" id=\"paymentViewButton\" class=\"button\" onmouseover=\"this.className=\'buttonHi\';\" onmouseout=\"this.className=\'button\';\">';
				temp += '</form>';
				temp += '<div class="clearing">&nbsp;</div>';
	}
	return temp;};

/***************************************************************************
* Pick a photo at random from the featured images of a gallery.            *
* Gallery_id = id of gallery to choose,                                    *
* img = reference to html image in                                         *
* which to show image                                                      *
***************************************************************************/
function showGalleryImage(gallery_id, img, updateLink) {
	
	if(img){
		if (location.hash.match('galleries_id=' + gallery_id) && (imageID = location.hash.match('.*photos_id=(.+)$'))) {
		  	imageID = imageID[1];
		} else {
		  	imageID = randomListVal(galleries[gallery_id].featured_images);
		}
		
		if (imageID != 0) {
			img.src = thumbnails[imageID].src;
			img.width = thumbnails[imageID].width;
			img.height = thumbnails[imageID].height;
			img.alt = galleries[gallery_id].title;
			if (updateLink) {
				$(img).parent().attr({					title: galleries[gallery_id].title				}).filter(function(){return this.href;}).attr({					href: thumbnails[imageID].fnGalleryLink(gallery_id)				});
			}
		}
	}
}

/***************************************************************************
* If we have dynamic HTML, replace the galleries link with a list that     *
* doesn't include thecurrent gallery                                       *
***************************************************************************/
function showGalleries(gallery_id) {
		
	
	if (!basic) {
		temp = '';
		for (i = 0; i < galleries.length; i++) {
						
			
			if (galleries[i].id != gallery_id) {
								
				if (temp != '') {
					temp += ' | ';
				}
								temp += '<a href="' + galleries[i].section_code + '_' + galleries[i].id + '.html">' + galleries[i].title + '</a>';
							}
		}
		document.all.galleryLinks.innerHTML = 'Other galleries: ' + temp;
	}
}

		

