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[3435526]=new thumbnail(3435526,"107134","","jjj_thumb.jpg",130,201,18);thumbnails[3928306]=new thumbnail(3928306,"107134","GEMMA","G26P03932_thumb.JPG",130,194,18);thumbnails[3929838]=new thumbnail(3929838,"107134","","G26P037512_thumb.JPG",130,196,18);thumbnails[3932097]=new thumbnail(3932097,"107134","","G26P040011_thumb.JPG",130,196,18);thumbnails[4897234]=new thumbnail(4897234,"107134","ALICE","011_1_thumb.jpg",130,187,18);thumbnails[1571397]=new thumbnail(1571397,"107134","MICHELLE","mich wedding 21.jpg",130,175,18);thumbnails[1571407]=new thumbnail(1571407,"107134","","mich wedding 3jpg1.jpg",130,173,18);thumbnails[2749801]=new thumbnail(2749801,"107134","JANETTE","109_thumb.JPG",130,173,18);thumbnails[2749781]=new thumbnail(2749781,"107134","LYNN","003_thumb.JPG",130,173,18);thumbnails[2749786]=new thumbnail(2749786,"107134","","019_thumb.JPG",130,173,18);thumbnails[3272179]=new thumbnail(3272179,"107134","","IMG_2195_thumb.jpg",130,195,18);thumbnails[2155632]=new thumbnail(2155632,"107134","CAROLINE AND HUBBY","caroline4_thumb.jpg",130,195,18);thumbnails[3715537]=new thumbnail(3715537,"107134","CLAIRE","032A1_thumb.jpg",130,175,18);thumbnails[3715542]=new thumbnail(3715542,"107134","CLAIRE AND HUBBY","099A1_thumb.jpg",130,96,18);thumbnails[3715550]=new thumbnail(3715550,"107134","","237A1_thumb.jpg",130,175,18);thumbnails[3228983]=new thumbnail(3228983,"107134","","wedding 2_thumb.jpg",130,195,18);thumbnails[3929959]=new thumbnail(3929959,"107134","","091_thumb.JPG",130,173,18);thumbnails[3920977]=new thumbnail(3920977,"107134","PIP AND BRIDESMAIDS","PnB_0221_thumb.jpg",130,148,18);thumbnails[3928578]=new thumbnail(3928578,"107134","","PnB_0211_thumb.jpg",130,161,18);thumbnails[1581972]=new thumbnail(1581972,"107134","","sam doing1.jpg",130,87,18);thumbnails[1581958]=new thumbnail(1581958,"107134","Natalie","nat1.jpg",130,87,18);thumbnails[3710530]=new thumbnail(3710530,"107134","Louise and bridesmaids","079_thumb.JPG",130,98,18);thumbnails[3710610]=new thumbnail(3710610,"107134","","080_thumb.JPG",130,104,18);thumbnails[1582146]=new thumbnail(1582146,"107134","NICKY","nik1.jpg",130,87,18);thumbnails[1585341]=new thumbnail(1585341,"107134","","nicky1.jpg",130,193,18);thumbnails[2876188]=new thumbnail(2876188,"107134","BRIDESMAIDS","106_thumb.JPG",130,171,18);thumbnails[3932088]=new thumbnail(3932088,"107134","BRIDESMAID","092_thumb.JPG",130,173,18);thumbnails[3435627]=new thumbnail(3435627,"107134","BRIDESMAIDS","picky_thumb.jpg",130,98,18);thumbnails[6572559]=new thumbnail(6572559,"108108","","51_thumb.jpg",130,195,18);thumbnails[6572579]=new thumbnail(6572579,"108108","","41_thumb.jpg",130,193,18);thumbnails[6572598]=new thumbnail(6572598,"108108","","71_thumb.jpg",130,187,18);thumbnails[4619807]=new thumbnail(4619807,"108108","","Lauren2011_thumb.jpg",130,200,18);thumbnails[5266902]=new thumbnail(5266902,"108108","","Lauren205220BW1_thumb.jpg",130,195,18);thumbnails[4671857]=new thumbnail(4671857,"108108","","7620_130319393605_77300033605_2322509_4564168_n_thumb.jpg",130,210,18);thumbnails[4890552]=new thumbnail(4890552,"108108","","8734_166133194533_773499533_3671981_6332590_n_thumb.jpg",130,195,18);thumbnails[4631717]=new thumbnail(4631717,"108108","","Lauren20220-20colour1_thumb.jpg",130,199,18);thumbnails[4671984]=new thumbnail(4671984,"108108","","7620_130319408605_77300033605_2322510_6187105_n_thumb.jpg",130,181,18);thumbnails[4263692]=new thumbnail(4263692,"108108","","81_thumb.jpg",130,195,18);thumbnails[4897247]=new thumbnail(4897247,"108108","","013_thumb.jpg",130,198,18);thumbnails[4897271]=new thumbnail(4897271,"108108","","011_2_thumb.jpg",130,187,18);thumbnails[4263740]=new thumbnail(4263740,"108108","","101_thumb.jpg",130,182,18);thumbnails[4164753]=new thumbnail(4164753,"108108","","CloseUp1_thumb.jpg",130,195,18);thumbnails[4209062]=new thumbnail(4209062,"108108","","4969_97800323605_77300033605_1891919_3935810_n_thumb.jpg",130,196,18);thumbnails[4246666]=new thumbnail(4246666,"108108","","Plastik20321_thumb.jpg",130,186,18);thumbnails[4246667]=new thumbnail(4246667,"108108","","plastik2031_thumb.jpg",130,194,18);thumbnails[4164672]=new thumbnail(4164672,"108108","","plastik2021_thumb.jpg",130,191,18);thumbnails[3456736]=new thumbnail(3456736,"108108","","DSC_0106_thumb.JPG",130,194,18);thumbnails[5266898]=new thumbnail(5266898,"108108","","Photo20Bohdan20Warchomij_MG_8336WEB1_thumb.jpg",130,195,18);thumbnails[3456176]=new thumbnail(3456176,"108108","","n565336090_1939516_637_thumb.jpg",130,194,18);thumbnails[1581929]=new thumbnail(1581929,"108108","","tracey1.jpg",130,194,18);thumbnails[3453140]=new thumbnail(3453140,"108108","","3282934564_7117b04d54_thumb.jpg",130,194,18);thumbnails[3733933]=new thumbnail(3733933,"108108","","Kitty1_thumb.jpg",130,195,18);thumbnails[3453190]=new thumbnail(3453190,"108108","","DSC_0186a_thumb.JPG",130,87,18);thumbnails[3569913]=new thumbnail(3569913,"108108","","n773499533_2229324_6823252_thumb.jpg",130,88,18);thumbnails[3958999]=new thumbnail(3958999,"108108","","DSC_0396_thumb.JPG",130,87,18);thumbnails[4263906]=new thumbnail(4263906,"108108","","21_thumb.jpg",130,87,18);thumbnails[4890805]=new thumbnail(4890805,"108108","","8_thumb.jpg",130,88,18);thumbnails[3564632]=new thumbnail(3564632,"108108","","49b549d0050bc_thumb.jpg",130,87,18);thumbnails[3853873]=new thumbnail(3853873,"108108","","love_it_thumb.jpg",130,94,18);thumbnails[4216898]=new thumbnail(4216898,"108108","","5770_98854453605_77300033605_1905456_5240037_n_thumb.jpg",130,85,18);thumbnails[4263646]=new thumbnail(4263646,"108108","","11_thumb.jpg",130,77,18);thumbnails[6572627]=new thumbnail(6572627,"108108","","61_thumb.jpg",130,191,18);thumbnails[1582445]=new thumbnail(1582445,"108108","","hair1.jpg",130,188,18);thumbnails[3921001]=new thumbnail(3921001,"108108","","n595065431_1958664_5265532_thumb.jpg",130,195,18);thumbnails[6572657]=new thumbnail(6572657,"156187","","35278_419788993605_77300033605_4468947_672889_n_thumb.jpg",130,95,18);thumbnails[6572659]=new thumbnail(6572659,"156187","","35278_419788998605_77300033605_4468948_8102980_n_thumb.jpg",130,94,18);thumbnails[6572663]=new thumbnail(6572663,"156187","","35278_419789008605_77300033605_4468950_4508327_n_thumb.jpg",130,94,18);thumbnails[6572546]=new thumbnail(6572546,"156187","","35278_419789003605_77300033605_4468949_1758455_n_thumb.jpg",130,94,18);thumbnails[6572517]=new thumbnail(6572517,"156187","","35278_419789013605_77300033605_4468951_3438424_n_thumb.jpg",130,95,18);thumbnails[6572534]=new thumbnail(6572534,"156187","","35278_419789018605_77300033605_4468952_235653_n_thumb.jpg",130,94,18);thumbnails[6572503]=new thumbnail(6572503,"156187","","Jonte20Pike_STMlogoWEB1_thumb.jpg",130,194,18);thumbnails[6229607]=new thumbnail(6229607,"156187","","X-Press20Fashion20Winter202010_9WEB1_thumb.jpg",130,175,18);thumbnails[6229159]=new thumbnail(6229159,"156187","","Amanda20Norton_STMWEB1_thumb.jpg",130,195,18);thumbnails[6222318]=new thumbnail(6222318,"156187","","X-Press20Fashion20Winter202010_7WEB1_thumb.jpg",130,175,18);thumbnails[6222321]=new thumbnail(6222321,"156187","","X-Press20Fashion20Winter202010_2WEB1_thumb.jpg",130,175,18);thumbnails[6229579]=new thumbnail(6229579,"156187","","4707981834_58d4202f8d_thumb.jpg",130,178,18);thumbnails[6229585]=new thumbnail(6229585,"156187","","X-Press20Fashion20Winter202010_6WEB1_thumb.jpg",130,175,18);thumbnails[5629652]=new thumbnail(5629652,"156187","","4419768084_1beed79e6d_b1_thumb.jpg",130,195,18);thumbnails[6222329]=new thumbnail(6222329,"156187","","X-Press20Fashion20Winter202010_11WEB1_thumb.jpg",130,175,18);thumbnails[5629723]=new thumbnail(5629723,"156187","","26393_359303566772_8815791772_3841828_3861559_n_thumb.jpg",130,195,18);thumbnails[5629718]=new thumbnail(5629718,"156187","","26393_359303556772_8815791772_3841826_4870726_n_thumb.jpg",130,195,18);thumbnails[5629725]=new thumbnail(5629725,"156187","","26393_359303586772_8815791772_3841830_6936393_n_thumb.jpg",130,195,18);thumbnails[5629824]=new thumbnail(5629824,"156187","","26393_359303596772_8815791772_3841831_3508031_n_thumb.jpg",130,195,18);thumbnails[5629828]=new thumbnail(5629828,"156187","","26393_359303606772_8815791772_3841832_1428831_n_thumb.jpg",130,195,18);thumbnails[5629832]=new thumbnail(5629832,"156187","","front_cover_thumb.jpg",130,178,18);thumbnails[5629867]=new thumbnail(5629867,"156187","","4419779268_fc096f267b_b1_thumb.jpg",130,195,18);thumbnails[5266918]=new thumbnail(5266918,"156187","","x-press_11_thumb.jpg",130,195,18);thumbnails[5266924]=new thumbnail(5266924,"156187","","xpress2_thumb.jpg",130,195,18);thumbnails[5266963]=new thumbnail(5266963,"156187","","4186571107_acfc288a75_o1_thumb.jpg",130,200,18);thumbnails[5266967]=new thumbnail(5266967,"156187","","4187333582_66e3e5af3e_o2_thumb.jpg",130,176,18);thumbnails[5430014]=new thumbnail(5430014,"156187","","shoot_thumb.jpg",130,195,18);thumbnails[5430020]=new thumbnail(5430020,"156187","","4250129285_020e183622_o_thumb.jpg",130,197,18);thumbnails[4849046]=new thumbnail(4849046,"156187","","28_IMG_6655_thumb.jpg",130,205,18);thumbnails[5266984]=new thumbnail(5266984,"156187","","Photo20Bohdan20Warchomij_MG_8466WEB1_thumb.jpg",130,195,18);thumbnails[4849056]=new thumbnail(4849056,"156187","","18_IMG_7800_thumb.jpg",130,193,18);thumbnails[4164522]=new thumbnail(4164522,"156187","","FurStole_thumb.jpg",130,195,18);thumbnails[4849060]=new thumbnail(4849060,"156187","","43_IMG_6781_thumb.jpg",130,195,18);var galleries=new Object();galleries[107134]=new gallery(107134,"3928306,3715550","weddings","gallery",[3435526,3928306,3929838,3932097,4897234,1571397,1571407,2749801,2749781,2749786,3272179,2155632,3715537,3715542,3715550,3228983,3929959,3920977,3928578,1581972,1581958,3710530,3710610,1582146,1585341,2876188,3932088,3435627]);galleries[108108]=new gallery(108108,"6572579,6572559,3453140","fashion","gallery",[6572559,6572579,6572598,4619807,5266902,4671857,4890552,4631717,4671984,4263692,4897247,4897271,4263740,4164753,4209062,4246666,4246667,4164672,3456736,5266898,3456176,1581929,3453140,3733933,3453190,3569913,3958999,4263906,4890805,3564632,3853873,4216898,4263646,6572627,1582445,3921001]);galleries[156187]=new gallery(156187,"6229607,6222329,6222321","EDITORIAL","gallery",[6572657,6572659,6572663,6572546,6572517,6572534,6572503,6229607,6229159,6222318,6222321,6229579,6229585,5629652,6222329,5629723,5629718,5629725,5629824,5629828,5629832,5629867,5266918,5266924,5266963,5266967,5430014,5430020,4849046,5266984,4849056,4164522,4849060]);var imageSets=new Object();imageSets[1]="6229607,6229159,6222329,6222321,5629652";imageSets[2]="6572579,6572559,6229607,6222329,6222321,3928306,3715550,3453140";imageSets[3]="6572663,6572659,6572657,6572627,6572598,6572579,6572559,6572546,6572534,6572517,6572503,6229607,6229585,6229579,6229159,6222329,6222321,6222318,5629867,5629832,5629828,5629824,5629725,5629723,5629718,5629652,5430020,5430014,5266984,5266967,5266963,5266924,5266918,5266902,5266898,4897271,4897247,4897234,4890805,4890552,4849060,4849056,4849046,4671984,4671857,4631717,4619807,4263906,4263740,4263692";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/samtictac/images";break}switch(a){case 1:b="http://www1.clikpic.com/samtictac/images";break}switch(a){case 2:b="http://admin.clikpic.com/samtictac/images";break}switch(a){case 24:b="http://tpc15/clikpic/samtictac/images";break}switch(a){case 4:b="http://www.clikchurch.com/samtictac/images";break}switch(a){case 5:b="http://www2.clikpic.com/samtictac/images";break}switch(a){case 22:b="http://tpc5/clikpic/samtictac/images";break}switch(a){case 23:b="http://tpc10/clikpic/samtictac/images";break}switch(a){case 25:b="http://tpc16/clikpic/samtictac/images";break}switch(a){case 15:b="http://www3.clikpic.com/samtictac/images";break}switch(a){case 18:b="http://www4.clikpic.com/samtictac/images";break}switch(a){case 19:b="http://www5.clikpic.com/samtictac/images";break}switch(a){case 31:b="http://www7.clikpic.com/samtictac/images";break}switch(a){case 32:b="http://admin2.clikpic.com/samtictac/images";break}switch(a){case 33:b="http://www8.clikpic.com/samtictac/images";break}switch(a){case 34:b="http://www9.clikpic.com/samtictac/images";break}switch(a){case 35:b="http://admin3.clikpic.com/samtictac/images";break}switch(a){case 37:b="http://admin4.clikpic.com/samtictac/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="Sam Enticknap Make-Up Artist : "+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+'")'})}}};