function thumbnail(g,e,b,f,d,a,c){this.id=g;this.galleries_id=e;this.caption=b;this.src=getServerPath(c)+"/"+f;this.width=d;this.height=a}function gallery(e,c,d,b,a){this.id=e;this.featured_images=c;this.title=d;this.section_code=b;this.photoIDs=a}var thumbnails=new Object();thumbnails[3565853]=new thumbnail(3565853,"217924","","260908_1453_thumb.jpg",130,87,15);thumbnails[3565855]=new thumbnail(3565855,"217924","","260908_1449_thumb.jpg",130,104,15);thumbnails[3565859]=new thumbnail(3565859,"217924","","260908_1464_thumb.jpg",130,87,15);thumbnails[3565861]=new thumbnail(3565861,"217924","","260908_1479_thumb.jpg",130,87,15);thumbnails[5195734]=new thumbnail(5195734,"217924","","DSC_0025_thumb.jpg",130,93,15);thumbnails[5195736]=new thumbnail(5195736,"217924","","DSC_0038_thumb.jpg",130,93,15);thumbnails[3565865]=new thumbnail(3565865,"217924","","260908_1499_thumb.jpg",130,195,15);thumbnails[3565868]=new thumbnail(3565868,"217924","","260908_1512_thumb.jpg",130,91,15);thumbnails[3566189]=new thumbnail(3566189,"217831","Digital Photo Magazine 2009","Jynxx11_thumb.jpg",130,94,15);thumbnails[4625585]=new thumbnail(4625585,"217831","","010209_2887_copy_thumb.jpg",112,100,15);thumbnails[3566181]=new thumbnail(3566181,"217831","","Shade2_thumb.jpg",67,100,15);thumbnails[3565881]=new thumbnail(3565881,"217831","","070209_3236_thumb.jpg",130,163,15);thumbnails[3565946]=new thumbnail(3565946,"217831","","070209_3192_thumb.jpg",130,87,15);thumbnails[3566175]=new thumbnail(3566175,"217831","","070209_3242_thumb.jpg",130,87,15);thumbnails[3566176]=new thumbnail(3566176,"217831","","070209_3251_thumb.jpg",130,87,15);thumbnails[3566185]=new thumbnail(3566185,"217831","","310808_0569_thumb.jpg",67,100,15);thumbnails[3566187]=new thumbnail(3566187,"217831","","Jynxx1b_thumb.jpg",130,86,15);thumbnails[3566190]=new thumbnail(3566190,"217831","","030109_2692_thumb.jpg",125,100,15);thumbnails[3566196]=new thumbnail(3566196,"217831","","211208_2418_thumb.jpg",67,100,15);thumbnails[3566198]=new thumbnail(3566198,"217831","","121008_1631_thumb.jpg",73,100,15);thumbnails[3566201]=new thumbnail(3566201,"217831","","010209_2881_thumb.jpg",80,100,15);thumbnails[3566225]=new thumbnail(3566225,"217831","","211208_2409_thumb.jpg",130,87,15);thumbnails[3566310]=new thumbnail(3566310,"217831","","020309_3541_thumb.jpg",80,100,15);thumbnails[5199486]=new thumbnail(5199486,"217831","","DSC_0035_copy_thumb.jpg",130,91,15);thumbnails[3568597]=new thumbnail(3568597,"217831","","kids12_copy_thumb.jpg",130,90,15);thumbnails[5195961]=new thumbnail(5195961,"217831","","DSC_0079_thumb.jpg",130,93,15);thumbnails[5195962]=new thumbnail(5195962,"217831","","DSC_0059b_thumb.jpg",130,93,15);thumbnails[5678898]=new thumbnail(5678898,"217831","","DSCF0825_copy_thumb.jpg",130,87,15);thumbnails[5678900]=new thumbnail(5678900,"217831","","DSCF0829_copy_thumb.jpg",130,87,15);thumbnails[5678901]=new thumbnail(5678901,"217831","","DSCF0831_copy_thumb.jpg",72,100,15);thumbnails[5413572]=new thumbnail(5413572,"217831","","DSC_0204b_copy_thumb.jpg",67,100,15);thumbnails[4625731]=new thumbnail(4625731,"217831","","17_thumb.jpg",130,87,15);thumbnails[5934021]=new thumbnail(5934021,"218007","","080209_3120b_thumb.jpg",130,87,15);thumbnails[3565788]=new thumbnail(3565788,"218007","","PenelopesGirls_thumb.jpg",130,87,15);thumbnails[3565793]=new thumbnail(3565793,"218007","","080209_3001_thumb.jpg",130,87,15);thumbnails[3565809]=new thumbnail(3565809,"218007","","280209_3466_thumb.jpg",130,87,15);thumbnails[5413569]=new thumbnail(5413569,"218007","","DSC_0025b_copy_thumb.jpg",130,87,15);thumbnails[5413571]=new thumbnail(5413571,"218007","","DSC_0027_copy_thumb.jpg",130,87,15);thumbnails[3565735]=new thumbnail(3565735,"217925","","110908_0762_thumb.jpg",130,87,15);thumbnails[3565738]=new thumbnail(3565738,"217925","","110908_0749_thumb.jpg",130,87,15);thumbnails[5195686]=new thumbnail(5195686,"217925","","DSC_0024_thumb.jpg",130,87,15);thumbnails[3565739]=new thumbnail(3565739,"217925","","WhiteHorses2_thumb.jpg",130,87,15);thumbnails[3565757]=new thumbnail(3565757,"217926","","120908_0710_thumb.jpg",130,87,15);thumbnails[3565759]=new thumbnail(3565759,"217926","","120908_0727_thumb.jpg",130,87,15);thumbnails[5195700]=new thumbnail(5195700,"217926","","DSC_0222_thumb.jpg",130,87,15);thumbnails[5195702]=new thumbnail(5195702,"217926","","DSC_0139_thumb.jpg",130,87,15);thumbnails[3564374]=new thumbnail(3564374,"217832","","160808_0281copy_thumb.jpg",130,179,15);thumbnails[3565680]=new thumbnail(3565680,"217832","","160808_0283_thumb.jpg",130,91,15);thumbnails[3568419]=new thumbnail(3568419,"217832","","BW2_thumb.jpg",130,91,15);thumbnails[3565768]=new thumbnail(3565768,"218006","Hug a Husky!","070209_3265_thumb.jpg",130,195,15);thumbnails[3565773]=new thumbnail(3565773,"218006","Dances with Dogs!","DanceswithDogs_thumb.jpg",130,91,15);thumbnails[3565892]=new thumbnail(3565892,"218015","Digital Photo Magazine 2009","161108_1987b_thumb.jpg",130,173,15);thumbnails[4625721]=new thumbnail(4625721,"218015","","12_thumb.jpg",130,87,15);thumbnails[4625724]=new thumbnail(4625724,"218015","","14_thumb.jpg",125,100,15);thumbnails[4625728]=new thumbnail(4625728,"218015","","16_thumb.jpg",130,87,15);thumbnails[5669856]=new thumbnail(5669856,"321203","","1_thumb.jpg",80,100,15);thumbnails[5669859]=new thumbnail(5669859,"321203","","2_thumb.jpg",130,87,15);thumbnails[5669861]=new thumbnail(5669861,"321203","","3_thumb.jpg",67,100,15);thumbnails[5669862]=new thumbnail(5669862,"321203","","4_thumb.jpg",73,100,15);thumbnails[5669867]=new thumbnail(5669867,"321203","","5_thumb.jpg",82,100,15);thumbnails[5669868]=new thumbnail(5669868,"321203","","6_thumb.jpg",89,100,15);thumbnails[5669869]=new thumbnail(5669869,"321203","","7_78D665A5-1D09-001F-9923517E39B7CE28_thumb.jpg",100,100,15);thumbnails[5669870]=new thumbnail(5669870,"321203","","8_thumb.jpg",120,100,15);thumbnails[5669871]=new thumbnail(5669871,"321203","","9_thumb.jpg",130,87,15);thumbnails[5669872]=new thumbnail(5669872,"321203","","10_thumb.jpg",130,65,15);thumbnails[5678922]=new thumbnail(5678922,"321203","","15_copy_thumb.jpg",80,100,15);thumbnails[5678924]=new thumbnail(5678924,"321203","","16_copy_thumb.jpg",80,100,15);thumbnails[5678926]=new thumbnail(5678926,"321203","","17_copy_thumb.jpg",67,100,15);thumbnails[5678928]=new thumbnail(5678928,"321203","","19_copy_thumb.jpg",130,87,15);thumbnails[5678930]=new thumbnail(5678930,"321203","","18_copy_thumb.jpg",130,87,15);thumbnails[5678931]=new thumbnail(5678931,"321203","","20_copy_thumb.jpg",130,87,15);thumbnails[5678933]=new thumbnail(5678933,"321203","","21_copy_thumb.jpg",130,93,15);thumbnails[5833594]=new thumbnail(5833594,"321203","","DSC_0097_copy_thumb.jpg",130,93,15);thumbnails[5833597]=new thumbnail(5833597,"321203","","DSC_0079_copy_thumb.jpg",130,93,15);thumbnails[5833598]=new thumbnail(5833598,"321203","","DSC_0063_copy_thumb.jpg",130,93,15);thumbnails[5833599]=new thumbnail(5833599,"321203","","DSC_0059b_copy_thumb.jpg",130,93,15);thumbnails[5833601]=new thumbnail(5833601,"321203","","030109_2712TT_copy_thumb.jpg",130,87,15);var galleries=new Object();galleries[217924]=new gallery(217924,"5195734","Animals","gallery",[3565853,3565855,3565859,3565861,5195734,5195736,3565865,3565868]);galleries[217831]=new gallery(217831,"3565881","Huskies","gallery",[3566189,4625585,3566181,3565881,3565946,3566175,3566176,3566185,3566187,3566190,3566196,3566198,3566201,3566225,3566310,5199486,3568597,5195961,5195962,5678898,5678900,5678901,5413572,4625731]);galleries[218007]=new gallery(218007,"5934021","Huskies in Harness","gallery",[5934021,3565788,3565793,3565809,5413569,5413571]);galleries[217925]=new gallery(217925,"5195686","Landscapes","gallery",[3565735,3565738,5195686,3565739]);galleries[217926]=new gallery(217926,"5195700","People","gallery",[3565757,3565759,5195700,5195702]);galleries[217832]=new gallery(217832,"3564374","Weddings","gallery",[3564374,3565680,3568419]);galleries[218006]=new gallery(218006,"3565768","Miscellaneous","gallery",[3565768,3565773]);galleries[218015]=new gallery(218015,"3565892","Black & White","gallery",[3565892,4625721,4625724,4625728]);galleries[321203]=new gallery(321203,"5669856","TriTone","gallery",[5669856,5669859,5669861,5669862,5669867,5669868,5669869,5669870,5669871,5669872,5678922,5678924,5678926,5678928,5678930,5678931,5678933,5833594,5833597,5833598,5833599,5833601]);var imageSets=new Object();imageSets[1]="5669856";imageSets[2]="5934021,5669856,5195734,5195700,5195686,3565892,3565881,3565768,3564374";imageSets[3]="5934021,5833601,5833599,5833598,5833597,5833594,5678933,5678931,5678930,5678928,5678926,5678924,5678922,5678901,5678900,5678898,5669872,5669871,5669870,5669869,5669868,5669867,5669862,5669861,5669859,5669856,5413572,5413571,5413569,5199486,5195962,5195961,5195736,5195734,5195702,5195700,5195686,4625731,4625728,4625724,4625721,4625585,3568597,3568419,3566310,3566225,3566201,3566198,3566196,3566190";function randomListVal(a){arrayVals=a.split(",");if(arrayVals.length){pos=Math.round(Math.random()*(arrayVals.length-1));val=arrayVals[pos]}else{val=0}return val}function getServerPath(a){var b=-1;switch(a){case 21:b="http://www6.clikpic.com/siman23/images";break}switch(a){case 1:b="http://www1.clikpic.com/siman23/images";break}switch(a){case 2:b="http://admin.clikpic.com/siman23/images";break}switch(a){case 24:b="http://tpc15/clikpic/siman23/images";break}switch(a){case 4:b="http://www.clikchurch.com/siman23/images";break}switch(a){case 5:b="http://www2.clikpic.com/siman23/images";break}switch(a){case 22:b="http://tpc5/clikpic/siman23/images";break}switch(a){case 23:b="http://tpc10/clikpic/siman23/images";break}switch(a){case 25:b="http://tpc16/clikpic/siman23/images";break}switch(a){case 15:b="http://www3.clikpic.com/siman23/images";break}switch(a){case 18:b="http://www4.clikpic.com/siman23/images";break}switch(a){case 19:b="http://www5.clikpic.com/siman23/images";break}switch(a){case 31:b="http://www7.clikpic.com/siman23/images";break}switch(a){case 32:b="http://admin2.clikpic.com/siman23/images";break}switch(a){case 33:b="http://www8.clikpic.com/siman23/images";break}switch(a){case 34:b="http://www9.clikpic.com/siman23/images";break}switch(a){case 35:b="http://admin3.clikpic.com/siman23/images";break}switch(a){case 37:b="http://admin4.clikpic.com/siman23/images";break}return b}function showHomeImage(a){imageID=randomListVal("");if(!basic){a.src=photos[imageID].src;a.width=photos[imageID].width;a.height=photos[imageID].height}else{newImage=new Image(photos[imageID].width,photos[imageID].height);newImage.src=photos[imageID].src;document.images[a.name]=newImage}}function showHomeImageInline(){html="";imageID=randomListVal(imageSets[1]);if("gallery"!=""){if(backgrounds[imageID].galleries_id!=""){html+='<a href="'+backgrounds[imageID].section_code+"_"+backgrounds[imageID].galleries_id+'.html">'}else{html+='<a href="gallery.html">'}}html+='<img src="'+backgrounds[imageID].src+'" width="'+backgrounds[imageID].width+'" height="'+backgrounds[imageID].height+'" class="mainhomepageimage photo" id="mainSample" name="mainSample" alt="'+escape(backgrounds[imageID].caption)+'" border="0">';if("gallery"!=""){html+="</a>"}$("#homepageimage").html(html)}function getNextId(b,d,a){var c=getArrayPos(d,b);if(a){if(c==0){nextImgPos=d.length-1}else{nextImgPos=c-1}}else{if(c==d.length-1){nextImgPos=0}else{nextImgPos=c+1}}nextImg=d[nextImgPos];return nextImg}function next(d,b){var c=d.value;var a=galleries[photos[c].galleries_id].photoIDs;nextImg=getNextId(c,a);if(nextImg!=-1){updateImage(nextImg,d,b)}}function updateImage(f,e,b){if(!basic){document.getElementById("imagePhoto").innerHTML='<img class="mainphoto photo" src="'+photos[f].src+' " id="mainPic" name="mainPic" width="'+photos[f].width+'" height="'+photos[f].height+'" alt="'+photos[f].caption+'">';e.value=photos[f].id;$("#imageTitle").html(photos[f].caption);document.title="sc-photography: "+photos[f].caption;if(photos[f].caption==""){document.getElementById("imageTitle").style.display="none"}else{document.getElementById("imageTitle").style.display="block"}var a=fnGetImageDetails(f);if(a==""){document.getElementById("imageDetails").style.display="none";var c=document.getElementById("infoWrap");var d=document.getElementById("photoInfo");if(photos[f].caption==""){if(c!=null){c.className="empty"}if(d!=null){d.className="empty"}}else{if(c!=null){c.className="noinfo"}if(d!=null){d.className="noinfo"}}}else{document.getElementById("imageDetails").style.display="block";var c=document.getElementById("infoWrap");if(c!=null){c.className="normal"}var d=document.getElementById("photoInfo");if(d!=null){d.className="normal"}}document.getElementById("imageDetails").innerHTML=a;toggleAddToCartConfirm()}else{window.location="photo_"+photos[f].id+".html"}}function toggleAddToCartConfirm(){if($("#paymentConfirm").size()){$("#paymentConfirm").hide();$("#paymentAddButton").unbind().click(function(){form=document.getElementById("paymentForm");option_id=0;if(form.item_option.value){option_id=form.item_option.value}if(addItemToBasket(form.item_number.value,photos,form.site.value,parseInt(form.quantity.value,10),option_id)){if($.browser.msie){$("#paymentConfirm").text("Item added to cart").show()}else{$("#paymentConfirm").text("Item added to cart").fadeIn()}}else{$("#paymentConfirm").text("Item not added - check cookies are enabled in your browser.").fadeIn()}})}}function fnGetImageDetails(b){var a="";if(photos[b].description!=""){a=a+'<p id="imageDescription">'+photos[b].description+"</p>"}if(photos[b].photo_ref!=""){a=a+'<p class="imageinfo" id="imageRef"><strong>Ref: </strong>'+photos[b].photo_ref+"</p>"}if(photos[b].takendate!=""){a=a+'<p class="imageinfo" id="imageDate"><strong>Date: </strong>'+photos[b].takendate+"</p>"}if(photos[b].location!=""){a=a+'<p class="imageinfo" id="imageLocation"><strong>Location: </strong>'+photos[b].location+"</p>"}if(photos[b].photographer!=""){a=a+'<p class="imageinfo" id="imagePhotographer"><strong>Photographer: </strong>'+photos[b].photographer+"</p>"}if(a!=""){a=a+'<div class="spacer"></div>'}return a}function fnGetPaymentInfo(c){var b="";if(c.item_price!==""){b=b+"<p>Order this print:</p>";b=b+'<p class="imageinfo" id="imagePrice"><strong>'+c.purchase_instruction+"</strong> 							"+(c.item_price).toFixed(2)+"</p>";var e=c.purchase_instruction;var d=(c.item_price).toFixed(2);var a=0}else{if(c.payment_groups_id!==""){b=b+"<p>Buy this print online:</p>";b=b+'<form id="paymentOptions" style="margin:0px;border:0px;" name="paymentOptions">';b=b+'<select class="paymentlink" name="payment_options_id" onchange="updateItemValues(document.forms.paymentForm,this.form.payment_options_id.options[this.form.payment_options_id.options.selectedIndex].value);">';b=b+getPaymentOptions(c.payment_groups_id);b=b+"</select>";b=b+"</form>";var a=paymentGroups[c.payment_groups_id].options[0];if(paymentOptions[a]){var e=paymentOptions[a].payment_option;var d=paymentOptions[a].price}}else{}}if(c.item_price!==""||c.payment_groups_id!==""){b=b+'<div class="clearing">&nbsp;</div>'}return b}function previous(d,b){var c=d.value;var a=galleries[photos[c].galleries_id].photoIDs;nextImg=getNextId(c,a,1);if(nextImg!=-1){updateImage(nextImg,d,b)}}function showGalleryImage(c,b){imageID=randomListVal(galleries[c].featured_images);if(imageID!=0){b.src=thumbnails[imageID].src;b.width=thumbnails[imageID].width;b.height=thumbnails[imageID].height;if(b.width<130){var f=$("img#gallery"+c);f.parents(".thumbWrap").width(b.width);var a=f.siblings("h3").size()==1?f.siblings("h3"):f.parent(".thumbWrap").siblings("h3");var g=parseInt(a.css("padding-left"))+parseInt(a.css("padding-right"));var d=parseInt(a.css("border-left-width"))+parseInt(a.css("border-right-width"));var e=parseInt(f.parents(".thumbWrap").css("border-left-width"))+parseInt(f.parents(".thumbWrap").css("border-right-width"));a.width(f.outerWidth(true)-g-d+e)}}}function showGalleries(a){if(!basic){temp="";for(i=0;i<galleries.length;i++){if(galleries[i].id!=a){if(temp!=""){temp=temp+" | "}temp=temp+'<a href="gallery_'+galleries[i].id+'.html">'+galleries[i].title+"</a>"}}document.all.galleryLinks.innerHTML="Other galleries: "+temp}}function resizePhotoInfo(n){var b=$.extend({centre:false},n||{});var d=3;$("div#photoPanelOuter").height("auto");$("div#infoWrap").width(200);$("div#photoDetail").css("width","auto");var h=$("div#maincolContent").width();var j=$("div#photoWrap").outerWidth(true);var m=$("div#infoWrap").outerWidth(true);var k=$("div#photoWrap").outerHeight();var f=$("div#infoWrap").outerHeight();var c=$("div#infoWrap").hasClass("empty");floatDrop=0;var g=j;if(!c){if(h<(j+m)){floatDrop=1}if(!floatDrop){var a=$("div#infoWrap").innerWidth();$("div#infoWrap").width(a+(h-j-m-d));m=$("div#infoWrap").outerWidth(true);g=j+m;if(k>f){var e=$("div#photoPanelOuter").height();$("div#photoPanelOuter").height(e+(k-f));var f=$("div#infoWrap").outerHeight()}}else{var l=$("div#photoWrap").outerWidth();$("div#infoWrap").width(l)}}if(b.centre){$("div#photoDetail").width(g);$("div#photoDetail").css("margin-left","auto");$("div#photoDetail").css("margin-right","auto")}else{$("div#photoDetail").css("margin-left","0");$("div#photoDetail").css("margin-right","0")}}function getArrayPos(c,b){for(var a=0;a<c.length;a++){if(c[a]==b){return a}}return -1}function changeBgImg(a,e){var c=randomListVal(imageSets[e]);var d=backgrounds[c].src;var b=$(a);if(b.size()>0){if(/\bimg$/.test(a)){b.attr({src:d})}else{b.css({"background-image":'url("'+d+'")'})}}};