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[1332015]=new thumbnail(1332015,"66663","Glass Panel above Front door.<br>\r\nCommission.","finishedfullinside_thumb.jpg",130,85,1);thumbnails[868580]=new thumbnail(868580,"66759","Two Tulips","141 Tulips part2_thumb.jpg",86,130,1);thumbnails[868592]=new thumbnail(868592,"66663","Door Panels","bathroom door stained glass_thumb.JPG",98,130,1);thumbnails[1111071]=new thumbnail(1111071,"66662","Red Lily","red lily closeup_thumb.jpg",129,130,1);thumbnails[1111353]=new thumbnail(1111353,"66662","Tulips","Tulips_thumb.jpg",104,130,1);thumbnails[1111400]=new thumbnail(1111400,"66661","Bubbles","Bubbles_thumb.JPG",95,130,1);thumbnails[1111415]=new thumbnail(1111415,"66661","100","100_thumb.jpg",102,130,1);thumbnails[1111427]=new thumbnail(1111427,"66661","Fireworks","fireworks_thumb.jpg",102,130,1);thumbnails[1111431]=new thumbnail(1111431,"66662","Lilies","Lilies_thumb.jpg",111,130,1);thumbnails[1111432]=new thumbnail(1111432,"66661","Vortex","Vortex_thumb.jpg",93,130,1);thumbnails[1504458]=new thumbnail(1504458,"66759","","card170_thumb.jpg",98,130,1);thumbnails[1504469]=new thumbnail(1504469,"66759","","card172_thumb.jpg",98,130,1);thumbnails[1504470]=new thumbnail(1504470,"66759","","card187_thumb.jpg",94,130,1);thumbnails[1504478]=new thumbnail(1504478,"66759","","card177_thumb.jpg",94,130,1);thumbnails[1526156]=new thumbnail(1526156,"66663","Glass panel in Serving Hatch.<br>\r\nCommission.","S3700004_thumb.JPG",98,130,1);thumbnails[1526161]=new thumbnail(1526161,"66661","Untitled","89_thumb.jpg",130,129,1);thumbnails[1526163]=new thumbnail(1526163,"66662","Orange Lilies","OrangeLilies_thumb.jpg",120,130,1);thumbnails[1526164]=new thumbnail(1526164,"66661","Shapes in Purple","ShapesinPurple_thumb.JPG",84,130,1);thumbnails[1526221]=new thumbnail(1526221,"66662","Yellow Lilies","Yellow Lillies_thumb.jpg",91,130,1);thumbnails[1538574]=new thumbnail(1538574,"66663","Fanlight for Front door","fanlight no_thumb.16.jpg",130,78,1);thumbnails[1538582]=new thumbnail(1538582,"66663","Front door fanlight Number 6","Number 6_thumb.jpg",130,90,1);thumbnails[1538585]=new thumbnail(1538585,"66663","Door panel","David P panel 7_thumb.jpg",130,98,1);thumbnails[1538589]=new thumbnail(1538589,"66663","Fanlight panel","fanlight 1_thumb.jpg",130,73,1);thumbnails[1538593]=new thumbnail(1538593,"66663","Tulips Light Catcher","Tulips1_thumb.jpg",91,130,1);thumbnails[1618433]=new thumbnail(1618433,"66663","Stained Glass Picture Frame","pictureframe3_thumb.jpg",103,130,1);thumbnails[1618439]=new thumbnail(1618439,"66663","Mirror","mirror3_thumb.jpg",87,130,1);thumbnails[1618442]=new thumbnail(1618442,"66663","Blue Square mirror","mirror21_thumb.jpg",128,130,1);thumbnails[1734291]=new thumbnail(1734291,"66661","Blue Horizons","bluehorizonsdetail_thumb.jpg",130,129,1);thumbnails[1734296]=new thumbnail(1734296,"66661","Rainbow","rainbowdetail_thumb.jpg",130,130,1);thumbnails[1734298]=new thumbnail(1734298,"66661","Red Stripe","redstripe1detail_thumb.jpg",129,130,1);thumbnails[1766427]=new thumbnail(1766427,"66661","Blue & Silver","bluensilverdetail_thumb.jpg",88,130,1);thumbnails[1766429]=new thumbnail(1766429,"66662","","red tulips detail_thumb.jpg",80,130,1);thumbnails[1766430]=new thumbnail(1766430,"66661","","shapes in blue&red detail_thumb.jpg",103,130,1);thumbnails[1799646]=new thumbnail(1799646,"66661","Shoreline","S3700007_1_thumb.jpg",62,130,1);thumbnails[1833618]=new thumbnail(1833618,"123357","Feethams Flyer","S3700456sparky600_thumb.jpg",130,85,1);thumbnails[1915682]=new thumbnail(1915682,"66663","Round stained glass mirror.","mirror_thumb.jpg",98,130,1);thumbnails[1915695]=new thumbnail(1915695,"66663","Round mirror wirh red flowers.","mirror22_thumb.jpg",123,130,1);thumbnails[2001577]=new thumbnail(2001577,"66663","Mirror","S3700015_thumb.JPG",98,130,1);thumbnails[2152428]=new thumbnail(2152428,"66663","Red Flower Mirror","red flower mirror_thumb.jpg",128,130,1);thumbnails[2152442]=new thumbnail(2152442,"66663","Square Pink and blue textured galss mirror.","mirror41_thumb.jpg",126,130,1);thumbnails[2216903]=new thumbnail(2216903,"66661","Circles in Pink","CirclesinPink_thumb.jpg",91,130,1);thumbnails[2216905]=new thumbnail(2216905,"66759","Abstract art card","card 111 MG crop border_thumb.jpg",87,130,1);thumbnails[2343903]=new thumbnail(2343903,"66663","Blue Light Catcher","blue light catcher_thumb.jpg",56,130,1);thumbnails[2343905]=new thumbnail(2343905,"66663","Leaded Light Catcher","light catcher 1_thumb.jpg",46,130,1);thumbnails[2343907]=new thumbnail(2343907,"66663","Commissioned Stained Glass Photo Frame ","mo's frame_thumb.jpg",97,130,1);thumbnails[2343910]=new thumbnail(2343910,"66663","Leaded Light Catcher<br>\r\n","light catcher 2_thumb.jpg",46,130,1);thumbnails[2343922]=new thumbnail(2343922,"66663","Tulip Light Catcher","Tuliplightcatcher_thumb.jpg",72,130,1);thumbnails[2402841]=new thumbnail(2402841,"66663","Green Stained Glass Photo Frame","greenphotoframe1_thumb.jpg",97,130,1);thumbnails[2535395]=new thumbnail(2535395,"66663","Black and White stained glass photo frame.","blackandwhiteframe1front_thumb.jpg",126,130,1);thumbnails[2621805]=new thumbnail(2621805,"66663","Blue stained glass photo frame","bluesquareframe_thumb.jpg",130,123,1);thumbnails[2698547]=new thumbnail(2698547,"66759","Set of three swirly  art cards","set of 3 swirlcards_thumb.jpg",130,68,1);thumbnails[4142498]=new thumbnail(4142498,"66663","Blue Square Stained Glass Mirror","blue_square_mirror_thumb.jpg",121,130,1);thumbnails[4143066]=new thumbnail(4143066,"66663","Red Flower Stained Glass Light Catcher","flowerlightcatcher_thumb.jpg",98,130,1);thumbnails[1177306]=new thumbnail(1177306,"81531","More glass has been cut out for the design.","katyheartview_thumb.jpg",130,98,1);thumbnails[1177303]=new thumbnail(1177303,"81531","","katycutglass_thumb.jpg",130,98,1);thumbnails[1177315]=new thumbnail(1177315,"81531","Close up of left hand side.","katyviewleft_thumb.jpg",130,98,1);thumbnails[1177309]=new thumbnail(1177309,"81531","Glass with lead work. Coming together.","katyrightview_thumb.jpg",130,98,1);thumbnails[1238456]=new thumbnail(1238456,"81531","Finished panel.","S3700001_thumb.jpg",130,98,1);var galleries=new Object();galleries[66661]=new gallery(66661,"2216903,1799646,1766430,1766427,1734298,1734296,1734291,1526164,1526161,1111432","Abstracts","gallery",[1111400,1111415,1111427,1111432,1526161,1526164,1734291,1734296,1734298,1766427,1766430,1799646,2216903]);galleries[66759]=new gallery(66759,"2698547,2216905,1504478,1504470,1504469,1504458,868580","Art Cards","gallery",[868580,1504458,1504469,1504470,1504478,2216905,2698547]);galleries[66662]=new gallery(66662,"1766429,1526221,1526163,1111431,1111353,1111071","Florals","gallery",[1111071,1111353,1111431,1526163,1526221,1766429]);galleries[123357]=new gallery(123357,"1833618","Other Artwork","gallery",[1833618]);galleries[66663]=new gallery(66663,"4143066,4142498,2621805,2535395,2402841,2343922,2343910,2343907,2343905,2343903","Stained Glass","gallery",[1332015,868592,1526156,1538574,1538582,1538585,1538589,1538593,1618433,1618439,1618442,1915682,1915695,2001577,2152428,2152442,2343903,2343905,2343907,2343910,2343922,2402841,2535395,2621805,4142498,4143066]);galleries[81531]=new gallery(81531,"1238456,1177315,1177309,1177306,1177303","Work in progress","gallery",[1177306,1177303,1177315,1177309,1238456]);var imageSets=new Object();imageSets[1]="4143066,4142498,2698547,2621805,2535395,2402841,2343922,2343910,2343907,2343905,2343903,2216905,2216903,2152442,2152428,2001577,1915695,1915682,1833618,1799646,1766430,1766429,1766427,1734298,1734296,1734291,1618442,1618439,1618433,1538593,1538589,1538585,1538582,1538574,1526221,1526164,1526163,1526161,1526156,1504478,1504470,1504469,1504458,1332015,1238456,1177315,1177309,1177306,1177303,1111432";imageSets[3]="4143066,4142498,2698547,2621805,2535395,2402841,2343922,2343910,2343907,2343905,2343903,2216905,2216903,2152442,2152428,2001577,1915695,1915682,1833618,1799646,1766430,1766429,1766427,1734298,1734296,1734291,1618442,1618439,1618433,1538593,1538589,1538585,1538582,1538574,1526221,1526164,1526163,1526161,1526156,1504478,1504470,1504469,1504458,1332015,1238456,1177315,1177309,1177306,1177303,1111432";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/susanjeff/images";break}switch(a){case 1:b="http://www1.clikpic.com/susanjeff/images";break}switch(a){case 2:b="http://admin.clikpic.com/susanjeff/images";break}switch(a){case 24:b="http://tpc15/clikpic/susanjeff/images";break}switch(a){case 4:b="http://www.clikchurch.com/susanjeff/images";break}switch(a){case 5:b="http://www2.clikpic.com/susanjeff/images";break}switch(a){case 22:b="http://tpc5/clikpic/susanjeff/images";break}switch(a){case 23:b="http://tpc10/clikpic/susanjeff/images";break}switch(a){case 25:b="http://tpc16/clikpic/susanjeff/images";break}switch(a){case 15:b="http://www3.clikpic.com/susanjeff/images";break}switch(a){case 18:b="http://www4.clikpic.com/susanjeff/images";break}switch(a){case 19:b="http://www5.clikpic.com/susanjeff/images";break}switch(a){case 31:b="http://www7.clikpic.com/susanjeff/images";break}switch(a){case 32:b="http://admin2.clikpic.com/susanjeff/images";break}switch(a){case 33:b="http://www8.clikpic.com/susanjeff/images";break}switch(a){case 34:b="http://www9.clikpic.com/susanjeff/images";break}switch(a){case 35:b="http://admin3.clikpic.com/susanjeff/images";break}switch(a){case 37:b="http://admin4.clikpic.com/susanjeff/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="Art by Susan Jefferson: "+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>"}a=a+fnGetPaymentInfo(photos[b]);if(a!=""){a=a+'<div class="spacer"></div>'}return a}function fnGetPaymentInfo(c){var b="";if(c.item_price!==""){b=b+"<p>Buy now using PayPal:</p>";b=b+'<p class="imageinfo" id="imagePrice"><strong>'+c.purchase_instruction+"</strong> 				&pound;"+(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+'<form id="paymentForm" style="margin:0px;border:0px;" name="paymentForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';b=b+'<input type="hidden" name="item_name" value="'+e+'">';ref="";if(c.photo_ref!=""){ref=c.photo_ref+" - "+c.caption}else{ref=c.id+" - "+c.caption}price=d;b=b+'<input type="hidden" name="cmd" value="_cart">';b=b+'<input type="hidden" name="business" value="susanjefferson@hotmail.co.uk">';b=b+'<input type="hidden" name="currency_code" value="GBP">';b=b+'<input type="hidden" name="add" value="1">';b=b+'<input type="hidden" name="amount" value="'+d+'">';b=b+'<input type="hidden" name="item_number" value="'+ref+'">';b=b+'<input type="Submit" value="Add to cart" id="paymentAddButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';">';b=b+"</form>";b=b+'<form id="paymentCartForm" style="margin:0px;" name="paymentCartForm" target="_blank" action="https://www.paypal.com/cgi-bin/webscr" method="post">';b=b+'<input type="hidden" name="cmd" value="_cart">';b=b+'<input type="hidden" name="business" value="susanjefferson@hotmail.co.uk">';b=b+'<input type="hidden" name="display" value="1">';b=b+'<input type="Submit" value="View cart" id="paymentViewButton" class="button" onmouseover="this.className=\'buttonHi\';" onmouseout="this.className=\'button\';">';b=b+"</form>";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+'")'})}}};