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[4897255]=new thumbnail(4897255,"","","tt_nobs__2_test1_thumb.jpg",130,433,1);thumbnails[5060199]=new thumbnail(5060199,"","","web_home1_thumb.jpg",130,241,1);thumbnails[5114739]=new thumbnail(5114739,"","","Website_ad_generic_thumb.jpg",130,520,1);thumbnails[5491605]=new thumbnail(5491605,"","","tt_pics1_thumb.jpg",130,683,1);thumbnails[2826047]=new thumbnail(2826047,"",'"Bringing affordable, Professional Portraiture out to the Community"',"On The Road logo web_thumb.jpeg",130,233,1);thumbnails[1476866]=new thumbnail(1476866,"101858",'<em>Wooden Blocks.</em><br>\r\n<br>\r\nLike the Perspex blocks, these can be displayed individually or as a set for guaranteed WOW factor. Our 3/4" wooden blocks have the <br>\r\nimages mounted and laminated onto the surface, and are then offset 3/4" from the wall. <br>\r\nClean and minimalist, we cut our blocks to size to accomodate the number of images you wish to incorporate into your design.<br>\r\n',"wood-block-set_thumb.jpg",130,188,1);thumbnails[1476882]=new thumbnail(1476882,"101858",'Perspex Blocks.<br>\r\nLike the Wooden blocks, these can be displayed individually or as a set for guaranteed WOW factor. Our 1/2" Perspex blocks have the <br>\r\nimages mounted behind so they are viewed through the crystal clear Perspex. They are then offset 1/2" from the wall. <br>\r\nClean and minimalist, we cut our blocks to size to accomodate the number of images you wish to incorporate into your design. The ultimate in contemporary style.<br>\r\n',"perspex-block-set_thumb.jpg",130,175,1);thumbnails[1476906]=new thumbnail(1476906,"101858",'Perspex Blocks with Backplates.<br>\r\nA great way to add a different dimension to your display, individual or sets of Perspex block displays can be mounted onto a backplate and the whole piece offset 1/2" from the wall.<br>\r\nChoose your backplate from stainless steel effect, mirror, gold mirror, clear, frosted, black or red.',"perspex-4_thumb.jpg",130,205,1);thumbnails[1476911]=new thumbnail(1476911,"101858","Perspex Clear Case.<br>\r\n Add a clear front to your Perspex Block & Backplate to create this fantastic look. There are nine small blocks shown here, but can be applied to any configuration. Finished off with either<br>\r\nchrome or gold fittings.<br>\r\n","perspex-9_thumb.jpg",130,155,1);thumbnails[1476919]=new thumbnail(1476919,"101858","Mosaic.<br>\r\n                Perfect for a breathtaking display in a good sized area; a single image split into a mosaic. Totally flexible to suit the picture and the display area. Available as Wood or Perspex blocks.<br>\r\n","mosaic_thumb.jpg",130,200,1);thumbnails[1476923]=new thumbnail(1476923,"101858","Frames.<br>\r\nWe do still offer a selection of frames of course; displays can be one main portrait or multi-aperture as shown here.","frame_thumb.jpg",130,197,1);thumbnails[1476928]=new thumbnail(1476928,"101858",'Canvas Wrap.<br>\r\nPrinted onto canvas, laminated and wrapped around a 2" deep framework. Seeing some of your image wrapped around the edges gives a 3D-like display.',"canvas_thumb.jpg",130,266,1);thumbnails[1476931]=new thumbnail(1476931,"101858","Chrome Rail Triple.<br>\r\nA bold statement featuring 3 square frames of your choice on a double chrome rail - can be displayed vertically or horizontally.<br>\r\n","chrome-rail_thumb.jpg",130,228,1);thumbnails[2319858]=new thumbnail(2319858,"134086","","Kids 9th - 12th web2_thumb.jpg",130,201,1);thumbnails[2319774]=new thumbnail(2319774,"134086","","Kids 9th - 12th web copy copy_thumb.jpg",130,2117,1);thumbnails[4343373]=new thumbnail(4343373,"134086","","Homepage_July_09_thumb.jpg",130,193,1);thumbnails[1449200]=new thumbnail(1449200,"100235","","291_thumb.jpg",130,92,1);thumbnails[1734760]=new thumbnail(1734760,"100235","","D1359-03_thumb.jpg",130,179,1);thumbnails[1449380]=new thumbnail(1449380,"100235","","D1317-15_thumb.jpg",130,52,1);thumbnails[1449367]=new thumbnail(1449367,"100235","","14_thumb.jpg",130,92,1);thumbnails[1449371]=new thumbnail(1449371,"100235","","1107-14_thumb.jpg",130,138,1);thumbnails[1449379]=new thumbnail(1449379,"100235","","D1097-14_thumb.jpg",130,170,1);thumbnails[1734809]=new thumbnail(1734809,"100235","","D1340-18_thumb.jpg",130,80,1);thumbnails[1734811]=new thumbnail(1734811,"100235","","D1376-27_thumb.jpg",130,87,1);thumbnails[1734822]=new thumbnail(1734822,"100235","","D1273-15_thumb.jpg",130,79,1);thumbnails[1734756]=new thumbnail(1734756,"100235","","D1329-11 copy_thumb.jpg",130,201,1);thumbnails[1617977]=new thumbnail(1617977,"109921","","baby_Frame_cover1_thumb1_thumb.jpg",130,638,1);thumbnails[4345847]=new thumbnail(4345847,"109921","","Baby_strip_31_thumb.jpg",130,851,1);thumbnails[4345888]=new thumbnail(4345888,"109921","","Baby_strip_212_thumb.jpg",130,778,1);thumbnails[4343862]=new thumbnail(4343862,"109921","","baby_Frame_cover1_thumb.jpg",130,285,1);thumbnails[5423132]=new thumbnail(5423132,"100234","","wedding_title_1ap_thumb.jpg",130,194,1);thumbnails[5423133]=new thumbnail(5423133,"100234","","wedding_title_2bp_thumb.jpg",130,194,1);thumbnails[5423134]=new thumbnail(5423134,"100234","","wedding_title_3bp_thumb.jpg",130,194,1);thumbnails[1449316]=new thumbnail(1449316,"100234","","1334_001_thumb.jpg",130,194,1);thumbnails[1449584]=new thumbnail(1449584,"100234","","1334_003_thumb.jpg",130,194,1);thumbnails[1449608]=new thumbnail(1449608,"100234","","1334_015_thumb.jpg",130,87,1);thumbnails[1449643]=new thumbnail(1449643,"100234","","1334_0161_thumb.jpg",130,87,1);thumbnails[1449660]=new thumbnail(1449660,"100234","","1334_020_thumb.jpg",130,194,1);thumbnails[1449673]=new thumbnail(1449673,"100234","","1334_039_thumb.jpg",130,194,1);thumbnails[1449690]=new thumbnail(1449690,"100234","","1334_043_thumb.jpg",130,194,1);thumbnails[1449703]=new thumbnail(1449703,"100234","","1334_054_thumb.jpg",130,194,1);thumbnails[1449732]=new thumbnail(1449732,"100234","","1334_086_thumb.jpg",130,87,1);thumbnails[1449746]=new thumbnail(1449746,"100234","","1334_087_thumb.jpg",130,194,1);thumbnails[1449762]=new thumbnail(1449762,"100234","","1334_102_thumb.jpg",130,194,1);thumbnails[1449775]=new thumbnail(1449775,"100234","","1334_109_thumb.jpg",130,194,1);thumbnails[1449776]=new thumbnail(1449776,"100234","","1334_117_thumb.jpg",130,194,1);thumbnails[1449777]=new thumbnail(1449777,"100234","","1334_124_thumb.jpg",130,87,1);thumbnails[1449778]=new thumbnail(1449778,"100234","","1334_125_thumb.jpg",130,194,1);thumbnails[1449784]=new thumbnail(1449784,"100234","","1334_134_thumb.jpg",130,87,1);thumbnails[1449791]=new thumbnail(1449791,"100234","","1334_154_thumb.jpg",130,194,1);thumbnails[1449793]=new thumbnail(1449793,"100234","","1334_157_thumb.jpg",130,87,1);thumbnails[1449794]=new thumbnail(1449794,"100234","","1334_1591_thumb.jpg",130,87,1);thumbnails[1449796]=new thumbnail(1449796,"100234","","1334_210_thumb.jpg",130,87,1);thumbnails[1449797]=new thumbnail(1449797,"100234","","1334_224_thumb.jpg",130,194,1);thumbnails[1449800]=new thumbnail(1449800,"100234","","1334_227_thumb.jpg",130,194,1);thumbnails[1449801]=new thumbnail(1449801,"100234","","1334_265_thumb.jpg",130,194,1);thumbnails[1449802]=new thumbnail(1449802,"100234","","1334_268_thumb.jpg",130,194,1);thumbnails[1449816]=new thumbnail(1449816,"100234","","1334_271_thumb.jpg",130,87,1);thumbnails[1449821]=new thumbnail(1449821,"100234","","1334_272_thumb.jpg",130,194,1);thumbnails[1449822]=new thumbnail(1449822,"100234","","1334_279_thumb.jpg",130,194,1);thumbnails[1449823]=new thumbnail(1449823,"100234","","1334_292_thumb.jpg",130,194,1);thumbnails[1449824]=new thumbnail(1449824,"100234","","1334_294_thumb.jpg",130,194,1);thumbnails[1449825]=new thumbnail(1449825,"100234","","1334_299_thumb.jpg",130,194,1);thumbnails[1449827]=new thumbnail(1449827,"100234","","1334_302_thumb.jpg",130,194,1);thumbnails[1449309]=new thumbnail(1449309,"100242","Client: Jersey Royal","commercial-header_thumb.jpg",130,73,1);thumbnails[1476940]=new thumbnail(1476940,"100242","Client: Aveda","D1262-087 copy_thumb.jpg",130,154,1);thumbnails[1476957]=new thumbnail(1476957,"100242","Client: Jersey Telecom","D1229-32_thumb.jpg",130,86,1);thumbnails[1476960]=new thumbnail(1476960,"100242","Client: Barnes Daniels","D1266-32_thumb.jpg",130,83,1);thumbnails[1477378]=new thumbnail(1477378,"100242","Client: Elmina","D1327-25 finished_thumb.jpg",130,158,1);var galleries=new Object();galleries[101858]=new gallery(101858,"1476919","How Your Portraits Could Look - Our Product Guide","section136064",[1476866,1476882,1476906,1476911,1476919,1476923,1476928,1476931]);galleries[134086]=new gallery(134086,"2319858","Kids' Klub","gallery",[2319858,2319774,4343373]);galleries[100235]=new gallery(100235,"1449200","Family Studios","section134123",[1449200,1734760,1449380,1449367,1449371,1449379,1734809,1734811,1734822,1734756]);galleries[109921]=new gallery(109921,"4343862","Baby 1st Year Wall Frame","section144950",[1617977,4345847,4345888,4343862]);galleries[100234]=new gallery(100234,"1449794","Weddings ","gallery",[5423132,5423133,5423134,1449316,1449584,1449608,1449643,1449660,1449673,1449690,1449703,1449732,1449746,1449762,1449775,1449776,1449777,1449778,1449784,1449791,1449793,1449794,1449796,1449797,1449800,1449801,1449802,1449816,1449821,1449822,1449823,1449824,1449825,1449827]);galleries[100242]=new gallery(100242,"1449309","Commercial","section134129",[1449309,1476940,1476957,1476960,1477378]);galleries[310858]=new gallery(310858,"","Toddler Team","section372550",[]);var imageSets=new Object();imageSets[1]="5060199";imageSets[2]="4343862,2319858,1476919,1449794,1449309,1449200";imageSets[3]="5491605,4345888,4345847,1617977";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/2Johns/images";break}switch(a){case 1:b="http://www1.clikpic.com/2Johns/images";break}switch(a){case 2:b="http://admin.clikpic.com/2Johns/images";break}switch(a){case 24:b="http://tpc15/clikpic/2Johns/images";break}switch(a){case 4:b="http://www.clikchurch.com/2Johns/images";break}switch(a){case 5:b="http://www2.clikpic.com/2Johns/images";break}switch(a){case 22:b="http://tpc5/clikpic/2Johns/images";break}switch(a){case 23:b="http://tpc10/clikpic/2Johns/images";break}switch(a){case 25:b="http://tpc16/clikpic/2Johns/images";break}switch(a){case 15:b="http://www3.clikpic.com/2Johns/images";break}switch(a){case 18:b="http://www4.clikpic.com/2Johns/images";break}switch(a){case 19:b="http://www5.clikpic.com/2Johns/images";break}switch(a){case 31:b="http://www7.clikpic.com/2Johns/images";break}switch(a){case 32:b="http://admin2.clikpic.com/2Johns/images";break}switch(a){case 33:b="http://www8.clikpic.com/2Johns/images";break}switch(a){case 34:b="http://www9.clikpic.com/2Johns/images";break}switch(a){case 35:b="http://admin3.clikpic.com/2Johns/images";break}switch(a){case 37:b="http://admin4.clikpic.com/2Johns/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("section136064"!=""){if(backgrounds[imageID].galleries_id!=""){html+='<a href="'+backgrounds[imageID].section_code+"_"+backgrounds[imageID].galleries_id+'.html">'}else{html+='<a href="section136064.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("section136064"!=""){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="2 Johns Photostudio: "+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> 				$"+(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="info@2johns.com">';b=b+'<input type="hidden" name="currency_code" value="USD">';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="info@2johns.com">';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+'")'})}}};