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[5167272]=new thumbnail(5167272,"","","Gaelle_0076-web_thumb.jpg",130,81,15);thumbnails[3340237]=new thumbnail(3340237,"","","Jade-1_1095-website_thumb.jpg",130,194,15);thumbnails[3757233]=new thumbnail(3757233,"","","_DSC0076_1783-final_thumb.jpg",130,87,15);thumbnails[3319538]=new thumbnail(3319538,"","","Kojo_0740-web_thumb.jpg",130,86,15);thumbnails[3319529]=new thumbnail(3319529,"","","Belgium-6-aug_thumb.jpg",130,87,15);thumbnails[3332239]=new thumbnail(3332239,"","","Jade-hat2_thumb.jpg",130,87,15);thumbnails[3320594]=new thumbnail(3320594,"","","FUN-SMALL_thumb.jpg",130,89,15);thumbnails[3332257]=new thumbnail(3332257,"","","Jade-silversea_thumb.jpg",130,87,15);thumbnails[3320599]=new thumbnail(3320599,"","","GEMA_1981-Final_thumb.jpg",130,87,15);thumbnails[3340238]=new thumbnail(3340238,"","","Jade-WEBSITE-21_thumb.jpg",130,87,15);thumbnails[3340231]=new thumbnail(3340231,"","","Cal-Ste_0576-web_thumb.jpg",130,86,15);thumbnails[3333326]=new thumbnail(3333326,"","","Jade-1_1129-website1_thumb.jpg",130,87,15);thumbnails[3396210]=new thumbnail(3396210,"","","Kobi-vintage-web_thumb.jpg",130,86,15);thumbnails[3320601]=new thumbnail(3320601,"","","DSC_0007_1430-web_thumb.jpg",130,92,15);thumbnails[3320591]=new thumbnail(3320591,"","","Animals_thumb.jpg",130,87,15);thumbnails[3757201]=new thumbnail(3757201,"201953","","_DSC0112_1828-WEB_thumb.jpg",130,195,15);thumbnails[3757204]=new thumbnail(3757204,"201953","","_DSC0140_1856-test_thumb.jpg",130,194,15);thumbnails[3757209]=new thumbnail(3757209,"201953","","_DSC0083_1790-web_thumb.jpg",130,195,15);thumbnails[3757210]=new thumbnail(3757210,"201953","","_DSC0047_1754-web_thumb.jpg",130,195,15);thumbnails[3757212]=new thumbnail(3757212,"201953","","CHLOE_2044-web1_thumb.jpg",130,194,15);thumbnails[3757228]=new thumbnail(3757228,"201953","","CHLOE_2084-WEB_thumb.jpg",130,194,15);thumbnails[3324138]=new thumbnail(3324138,"201953","","Gaelle-college_thumb.jpg",130,194,15);thumbnails[3324139]=new thumbnail(3324139,"201953","","Gaelle-brugge_thumb.jpg",130,196,15);thumbnails[3324148]=new thumbnail(3324148,"201953","","Sophie-horse_thumb.jpg",130,194,15);thumbnails[3351064]=new thumbnail(3351064,"201953","","Annabelle-039_thumb.jpg",130,198,15);thumbnails[3324141]=new thumbnail(3324141,"201953","","Gaelle-bw_thumb.jpg",130,194,15);thumbnails[3324142]=new thumbnail(3324142,"201953","","Gaelle-pool_thumb.jpg",130,192,15);thumbnails[3386327]=new thumbnail(3386327,"201953","","Kobi-edit_1203-WEB_thumb.jpg",130,196,15);thumbnails[3385562]=new thumbnail(3385562,"201953","","Kobi1200-web_thumb.jpg",130,84,15);thumbnails[3396286]=new thumbnail(3396286,"201953","","Kobi-vintage-web1_thumb.jpg",130,86,15);thumbnails[5167430]=new thumbnail(5167430,"202431","","Gaelle_0068-website_thumb.jpg",130,196,15);thumbnails[3324166]=new thumbnail(3324166,"202431","","Sina_thumb.jpg",130,194,15);thumbnails[3324168]=new thumbnail(3324168,"202431","","Hannah_thumb.jpg",130,194,15);thumbnails[3324169]=new thumbnail(3324169,"202431","","Sophie_thumb.jpg",130,194,15);thumbnails[3324171]=new thumbnail(3324171,"202431","","Gaelle-P_thumb.jpg",130,194,15);thumbnails[3757140]=new thumbnail(3757140,"202432","","Charlotte_2159-web_thumb.jpg",130,194,15);thumbnails[3757143]=new thumbnail(3757143,"202432","","Charlotte_2204-web_thumb.jpg",130,195,15);thumbnails[3757199]=new thumbnail(3757199,"202432","","Charlotte_2186-web_thumb.jpg",130,195,15);thumbnails[4169092]=new thumbnail(4169092,"202432","","Stuart-J_2523-web_thumb.jpg",130,195,15);thumbnails[4169100]=new thumbnail(4169100,"202432","","Stuart-J_2508-web_thumb.jpg",130,195,15);thumbnails[4169101]=new thumbnail(4169101,"202432","","Stuart-J_2606-web_thumb.jpg",130,194,15);thumbnails[4292112]=new thumbnail(4292112,"202432","","LAURA_3240-web_thumb.jpg",130,194,15);thumbnails[4292116]=new thumbnail(4292116,"202432","","LAURA_3245-web_thumb.jpg",130,195,15);thumbnails[4292118]=new thumbnail(4292118,"202432","","LAURA_3347-web_thumb.jpg",130,195,15);thumbnails[3757187]=new thumbnail(3757187,"202432","","GEMA_1901-WEB_thumb.jpg",130,195,15);thumbnails[3757174]=new thumbnail(3757174,"202432","","GEMA_1939_web1_thumb.jpg",130,194,15);thumbnails[3757186]=new thumbnail(3757186,"202432","","GEMA_1899-WEB_thumb.jpg",130,195,15);thumbnails[3324514]=new thumbnail(3324514,"202432","","Nathalie-better_thumb.jpg",130,194,15);thumbnails[3324531]=new thumbnail(3324531,"202432","","Nat2_thumb.jpg",130,194,15);thumbnails[3324532]=new thumbnail(3324532,"202432","","Nat_thumb.jpg",130,189,15);thumbnails[4292133]=new thumbnail(4292133,"202432","","Karen_3101-web_thumb.jpg",130,194,15);thumbnails[4292136]=new thumbnail(4292136,"202432","","Karen_3168-web_thumb.jpg",130,195,15);thumbnails[4292147]=new thumbnail(4292147,"202432","","JODY_3597-final_thumb.jpg",130,194,15);thumbnails[3340236]=new thumbnail(3340236,"202432","","Jade-1_1122-website_thumb.jpg",130,194,15);thumbnails[3332203]=new thumbnail(3332203,"202432","","Jade-hat_thumb.jpg",130,177,15);thumbnails[3324183]=new thumbnail(3324183,"202433","","Gaelle-laolla_thumb.jpg",130,194,15);thumbnails[3324184]=new thumbnail(3324184,"202433","","Gaelle-laolla2_thumb.jpg",130,194,15);thumbnails[3593400]=new thumbnail(3593400,"202433","","DSC_0014_1437-FINAL-WEB_thumb.jpg",130,194,15);thumbnails[3593353]=new thumbnail(3593353,"202433","","DSC_0010_1433-web_thumb.jpg",130,194,15);thumbnails[3593357]=new thumbnail(3593357,"202433","","DSC_0012_1423-web_thumb.jpg",130,194,15);thumbnails[3593392]=new thumbnail(3593392,"202433","","DSC_0014_1437-FINAL-CROP-WEB_thumb.jpg",130,195,15);thumbnails[3324187]=new thumbnail(3324187,"202433","","Gaelle-oldhouse_thumb.jpg",130,196,15);thumbnails[3324185]=new thumbnail(3324185,"202433","","Gaelle-brugge2_thumb.jpg",130,206,15);thumbnails[3324194]=new thumbnail(3324194,"202433","","Gaelle-Pink_thumb.jpg",130,203,15);thumbnails[3324196]=new thumbnail(3324196,"202433","","Ostend-beach_thumb.jpg",130,204,15);thumbnails[3324189]=new thumbnail(3324189,"202433","","Gaelle-oldhouse2_thumb.jpg",130,180,15);thumbnails[3324195]=new thumbnail(3324195,"202433","","Ostedn-bw_thumb.jpg",130,188,15);thumbnails[3324191]=new thumbnail(3324191,"202433","","Gaelle-ostend_thumb.jpg",130,194,15);thumbnails[3352150]=new thumbnail(3352150,"202433","","Fotofolio_GAELLE_DSC4156-Edit_thumb.jpg",130,196,15);thumbnails[3352153]=new thumbnail(3352153,"202433","","Fotofolio_GAELLE_DSC4409-Edit_thumb.jpg",130,196,15);thumbnails[3352155]=new thumbnail(3352155,"202433","","Fotofolio_GAELLE_DSC4716-Edit_thumb.jpg",130,196,15);thumbnails[3352159]=new thumbnail(3352159,"202433","","Fotofolio_GAELLE_collage1_thumb.jpg",130,86,15);thumbnails[3352161]=new thumbnail(3352161,"202433","","Fotofolio_GAELLE_DSC4819-Edit_thumb.jpg",130,86,15);thumbnails[3352165]=new thumbnail(3352165,"202433","","Fotofolio_GAELLE_DSC5283-Edit_thumb.jpg",130,86,15);thumbnails[3593367]=new thumbnail(3593367,"202433","","DSC_0007_1430-web1_thumb.jpg",130,92,15);thumbnails[3352125]=new thumbnail(3352125,"202435","","Gaelle-Autum070_thumb.jpg",130,201,15);thumbnails[3348621]=new thumbnail(3348621,"202435","","Gaelle-Fushia-2_thumb.jpg",130,197,15);thumbnails[3349060]=new thumbnail(3349060,"202435","","Gaelle-Autum48_thumb.jpg",130,194,15);thumbnails[3349059]=new thumbnail(3349059,"202435","","Gaelle-Autum055_thumb.jpg",130,220,15);thumbnails[3348756]=new thumbnail(3348756,"202435","","Gaelle-Fushia-outfit-025_thumb.jpg",130,217,15);thumbnails[3348759]=new thumbnail(3348759,"202435","","Gaelle-Fushia080_thumb.jpg",130,217,15);thumbnails[3348763]=new thumbnail(3348763,"202435","","Gaelle-BW2007_thumb.jpg",130,218,15);thumbnails[3348768]=new thumbnail(3348768,"202435","","Annabelle-facepainting_thumb.jpg",130,184,15);thumbnails[3348770]=new thumbnail(3348770,"202435","","Gaelle-facepaint1_thumb.jpg",130,185,15);thumbnails[4856548]=new thumbnail(4856548,"277092","","3976012954_30dd101d67_o_thumb.jpg",130,195,15);thumbnails[4856549]=new thumbnail(4856549,"277092","","2719670718_da02aa51ff_o_thumb.jpg",130,195,15);thumbnails[4856550]=new thumbnail(4856550,"277092","","3811210341_c6c7edd301_o_thumb.jpg",130,87,15);thumbnails[4856594]=new thumbnail(4856594,"277092","","2910426724_e1b95934cf_o_thumb.jpg",130,130,15);var galleries=new Object();galleries[201953]=new gallery(201953,"3757201","Children","gallery",[3757201,3757204,3757209,3757210,3757212,3757228,3324138,3324139,3324148,3351064,3324141,3324142,3386327,3385562,3396286]);galleries[202431]=new gallery(202431,"5167430","Portraits","gallery",[5167430,3324166,3324168,3324169,3324171]);galleries[202432]=new gallery(202432,"4169100,4169092","Models","gallery",[3757140,3757143,3757199,4169092,4169100,4169101,4292112,4292116,4292118,3757187,3757174,3757186,3324514,3324531,3324532,4292133,4292136,4292147,3340236,3332203]);galleries[202433]=new gallery(202433,"3593400","Model - Gaelle","gallery",[3324183,3324184,3593400,3593353,3593357,3593392,3324187,3324185,3324194,3324196,3324189,3324195,3324191,3352150,3352153,3352155,3352159,3352161,3352165,3593367]);galleries[202435]=new gallery(202435,"3348621","Old work","gallery",[3352125,3348621,3349060,3349059,3348756,3348759,3348763,3348768,3348770]);galleries[277092]=new gallery(277092,"4856548","Weddings","gallery",[4856548,4856549,4856550,4856594]);var imageSets=new Object();imageSets[1]="5167272,3757233,3396210,3340231,3320601,3320599,3320594,3320591,3319538,3319529";imageSets[2]="5167430,4856548,4169100,4169092,3757201,3593400,3348621";imageSets[3]="5167430,5167272,4856594,4856550,4856549,4856548,4292147,4292136,4292133,4292118,4292116,4292112,4169101,4169100,4169092,3757233,3757228,3757212,3757210,3757209,3757204,3757201,3757199,3757187,3757186,3757174,3757143,3757140,3593400,3593392,3593367,3593357,3593353,3396286,3396210,3386327,3385562,3352165,3352161,3352159,3352155,3352153,3352150,3352125,3351064,3349060,3349059,3348770,3348768,3348763";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/gteerlinck/images";break}switch(a){case 1:b="http://www1.clikpic.com/gteerlinck/images";break}switch(a){case 2:b="http://admin.clikpic.com/gteerlinck/images";break}switch(a){case 24:b="http://tpc15/clikpic/gteerlinck/images";break}switch(a){case 4:b="http://www.clikchurch.com/gteerlinck/images";break}switch(a){case 5:b="http://www2.clikpic.com/gteerlinck/images";break}switch(a){case 22:b="http://tpc5/clikpic/gteerlinck/images";break}switch(a){case 23:b="http://tpc10/clikpic/gteerlinck/images";break}switch(a){case 25:b="http://tpc16/clikpic/gteerlinck/images";break}switch(a){case 15:b="http://www3.clikpic.com/gteerlinck/images";break}switch(a){case 18:b="http://www4.clikpic.com/gteerlinck/images";break}switch(a){case 19:b="http://www5.clikpic.com/gteerlinck/images";break}switch(a){case 31:b="http://www7.clikpic.com/gteerlinck/images";break}switch(a){case 32:b="http://admin2.clikpic.com/gteerlinck/images";break}switch(a){case 33:b="http://www8.clikpic.com/gteerlinck/images";break}switch(a){case 34:b="http://www9.clikpic.com/gteerlinck/images";break}switch(a){case 35:b="http://admin3.clikpic.com/gteerlinck/images";break}switch(a){case 37:b="http://admin4.clikpic.com/gteerlinck/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="'+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="GT  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+'")'})}}};