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[5963882]=new thumbnail(5963882,"336557","Bowens","web170_thumb.jpg",130,98,18);thumbnails[5963889]=new thumbnail(5963889,"336557","Bowens","web171_thumb.jpg",130,98,18);thumbnails[5963940]=new thumbnail(5963940,"336557","W25","web172_thumb.jpg",130,98,18);thumbnails[5963942]=new thumbnail(5963942,"336557","W25","web174_thumb.jpg",130,98,18);thumbnails[5963965]=new thumbnail(5963965,"336557","Supplementaire","web175_thumb.jpg",130,98,18);thumbnails[5964016]=new thumbnail(5964016,"336557","Supplementaire","web176_thumb.jpg",130,98,18);thumbnails[5964019]=new thumbnail(5964019,"336557","Supplementaire","web177_thumb.jpg",130,98,18);thumbnails[5964023]=new thumbnail(5964023,"336557","Supplementaire","web178_thumb.jpg",130,98,18);thumbnails[5964027]=new thumbnail(5964027,"336557","Supplementaire","web179_thumb.jpg",130,98,18);thumbnails[6294573]=new thumbnail(6294573,"336557","OMGee","web196_thumb.jpg",130,98,18);thumbnails[6294576]=new thumbnail(6294576,"336557","OMGee","web197_thumb.jpg",130,98,18);thumbnails[6294577]=new thumbnail(6294577,"336557","OMGee","web198_thumb.jpg",130,98,18);thumbnails[6612934]=new thumbnail(6612934,"336557","YEAH Mag","yeah1_thumb.jpg",130,98,18);thumbnails[6612941]=new thumbnail(6612941,"336557","YEAH Mag","yeah3_thumb.jpg",130,98,18);thumbnails[6612949]=new thumbnail(6612949,"336557","YEAH Mag","_yeah5_thumb.jpg",130,98,18);thumbnails[6612955]=new thumbnail(6612955,"336557","Oh Comely Cover","ohc1_thumb.jpg",130,98,18);thumbnails[6612974]=new thumbnail(6612974,"336557","BOOK DEBUT","72Ald-7_thumb.jpg",130,87,18);thumbnails[6633715]=new thumbnail(6633715,"305320","Wild","1_thumb.jpg",130,78,18);thumbnails[6633717]=new thumbnail(6633717,"305320","Wild","2_thumb.jpg",130,78,18);thumbnails[6633720]=new thumbnail(6633720,"305320","Wild","3_thumb.jpg",130,78,18);thumbnails[6633724]=new thumbnail(6633724,"305320","Wild","4_thumb.jpg",130,78,18);thumbnails[6633725]=new thumbnail(6633725,"305320","Wild","5_thumb.jpg",130,78,18);thumbnails[6633727]=new thumbnail(6633727,"305320","Daisy","6_thumb.jpg",130,78,18);thumbnails[6633728]=new thumbnail(6633728,"305320","Daisy","7_thumb.jpg",130,78,18);thumbnails[6633729]=new thumbnail(6633729,"305320","Daisy","8_thumb.jpg",130,78,18);thumbnails[6633730]=new thumbnail(6633730,"305320","Daisy","9_thumb.jpg",130,78,18);thumbnails[6633733]=new thumbnail(6633733,"305320","Streets","11_thumb.jpg",130,78,18);thumbnails[6633736]=new thumbnail(6633736,"305320","Streets","12_thumb.jpg",130,78,18);thumbnails[6633737]=new thumbnail(6633737,"305320","Streets","13_thumb.jpg",130,78,18);thumbnails[6633740]=new thumbnail(6633740,"305320","Streets","14_thumb.jpg",130,78,18);thumbnails[6633743]=new thumbnail(6633743,"305320","Paper","15_thumb.jpg",130,78,18);thumbnails[6633745]=new thumbnail(6633745,"305320","Paper","16_thumb.jpg",130,78,18);thumbnails[6633749]=new thumbnail(6633749,"305320","Paper","17_thumb.jpg",130,78,18);thumbnails[6633754]=new thumbnail(6633754,"305320","Glass","18_thumb.jpg",130,78,18);thumbnails[6633758]=new thumbnail(6633758,"305320","Glass","19_thumb.jpg",130,78,18);thumbnails[6633759]=new thumbnail(6633759,"305320","Glass","20_thumb.jpg",130,78,18);thumbnails[6633792]=new thumbnail(6633792,"305320","Glass","21_thumb.jpg",130,78,18);thumbnails[6633821]=new thumbnail(6633821,"305320","Glass","22_thumb.jpg",130,78,18);thumbnails[6633823]=new thumbnail(6633823,"305320","Deer","23_thumb.jpg",130,78,18);thumbnails[6633826]=new thumbnail(6633826,"305320","Deer","24_thumb.jpg",130,78,18);thumbnails[6633827]=new thumbnail(6633827,"305320","Deer","25_thumb.jpg",130,78,18);thumbnails[6633828]=new thumbnail(6633828,"305320","Deer","26_thumb.jpg",130,78,18);thumbnails[6633829]=new thumbnail(6633829,"305320","Deer","27_thumb.jpg",130,78,18);thumbnails[6633830]=new thumbnail(6633830,"305320","Deer","28_thumb.jpg",130,78,18);thumbnails[6633831]=new thumbnail(6633831,"305320","Blossom","29_thumb.jpg",130,78,18);thumbnails[6633832]=new thumbnail(6633832,"305320","Blossom","30_thumb.jpg",130,78,18);thumbnails[6633833]=new thumbnail(6633833,"305320","Blossom","31_thumb.jpg",130,78,18);thumbnails[6633835]=new thumbnail(6633835,"305320","Blossom","32_thumb.jpg",130,78,18);thumbnails[6633837]=new thumbnail(6633837,"305320","Blossom","33_thumb.jpg",130,78,18);thumbnails[6633839]=new thumbnail(6633839,"305320","Dreams","34_thumb.jpg",130,78,18);thumbnails[6633853]=new thumbnail(6633853,"305320","Dreams","35_thumb.jpg",130,78,18);thumbnails[6633854]=new thumbnail(6633854,"305320","Dreams","36_thumb.jpg",130,78,18);thumbnails[6633855]=new thumbnail(6633855,"305320","Dreams","37_thumb.jpg",130,78,18);thumbnails[6633861]=new thumbnail(6633861,"305320","Dreams","38_thumb.jpg",130,78,18);thumbnails[4833249]=new thumbnail(4833249,"349201","I","web94_thumb.jpg",130,98,18);thumbnails[4833260]=new thumbnail(4833260,"349201","IV","web86_thumb.jpg",130,98,18);thumbnails[4833283]=new thumbnail(4833283,"349201","Retro Rehab","web74_thumb.jpg",130,98,18);thumbnails[4833326]=new thumbnail(4833326,"349201","Lora Avedian","web40_thumb.jpg",130,98,18);thumbnails[4833348]=new thumbnail(4833348,"349201","Annie","web16_thumb.jpg",130,98,18);thumbnails[4841131]=new thumbnail(4841131,"349201","VIII","web107_thumb.jpg",130,196,18);thumbnails[4841132]=new thumbnail(4841132,"349201","IX","web108_thumb.jpg",130,201,18);thumbnails[4976483]=new thumbnail(4976483,"349201","Annie","web118_thumb.jpg",130,98,18);thumbnails[4976513]=new thumbnail(4976513,"349201","Riz","web124_thumb.jpg",130,98,18);thumbnails[4976585]=new thumbnail(4976585,"349201","Hilde","web127_thumb.jpg",130,98,18);thumbnails[4990382]=new thumbnail(4990382,"349201","Katy","web130_thumb.jpg",130,98,18);thumbnails[4990393]=new thumbnail(4990393,"349201","Lousie Broad","web134_thumb.jpg",130,98,18);thumbnails[5378158]=new thumbnail(5378158,"349201","'White'","web141_thumb.jpg",130,98,18);thumbnails[5378217]=new thumbnail(5378217,"349201","Empirical","web146_thumb.jpg",130,98,18);thumbnails[5378224]=new thumbnail(5378224,"349201","Becky","web150_thumb.jpg",130,98,18);thumbnails[5378235]=new thumbnail(5378235,"349201","'White'","_web149_thumb.jpg",130,98,18);thumbnails[5434711]=new thumbnail(5434711,"349201","Yasmin","web155_thumb.jpg",130,98,18);thumbnails[5670752]=new thumbnail(5670752,"349201","J W A","web164_thumb.jpg",130,98,18);thumbnails[5670754]=new thumbnail(5670754,"349201","Massey","web165_thumb.jpg",130,98,18);thumbnails[5670769]=new thumbnail(5670769,"349201","Lookbook","web163_thumb.jpg",130,98,18);thumbnails[5964032]=new thumbnail(5964032,"349201","Linear","web181_thumb.jpg",130,98,18);thumbnails[5964096]=new thumbnail(5964096,"349201","","web182_thumb.jpg",130,98,18);thumbnails[5964213]=new thumbnail(5964213,"349201","Fade","web183_thumb.jpg",130,98,18);thumbnails[5964295]=new thumbnail(5964295,"349201","Shoreditch","web187_thumb.jpg",130,98,18);thumbnails[5964369]=new thumbnail(5964369,"349201","Flora","web188_thumb.jpg",130,98,18);thumbnails[5964372]=new thumbnail(5964372,"349201","Flora","web189_thumb.jpg",130,98,18);thumbnails[5964373]=new thumbnail(5964373,"349201","Flora","web190_thumb.jpg",130,98,18);thumbnails[5964381]=new thumbnail(5964381,"349201","Taxidermy","web191_thumb.jpg",130,98,18);thumbnails[5964383]=new thumbnail(5964383,"349201","Taxidermy","web192_thumb.jpg",130,98,18);thumbnails[6454804]=new thumbnail(6454804,"349201","Amie","web203_thumb.jpg",130,98,18);thumbnails[6454808]=new thumbnail(6454808,"349201","Amie","web204_thumb.jpg",130,98,18);thumbnails[6454815]=new thumbnail(6454815,"349201","Art School","web206_thumb.jpg",130,98,18);thumbnails[6633707]=new thumbnail(6633707,"349201","Jayne","40_thumb.jpg",130,78,18);thumbnails[6633712]=new thumbnail(6633712,"349201","Hattie","39_thumb.jpg",130,78,18);var galleries=new Object();galleries[336557]=new gallery(336557,"6612974,6612955,6612949,6612941,6612934,6294577,6294576,6294573,5964027,5964023","Published","gallery",[5963882,5963889,5963940,5963942,5963965,5964016,5964019,5964023,5964027,6294573,6294576,6294577,6612934,6612941,6612949,6612955,6612974]);galleries[305320]=new gallery(305320,"6633861,6633855,6633854,6633853,6633839,6633837,6633835,6633833,6633832,6633831","Book 1","gallery",[6633715,6633717,6633720,6633724,6633725,6633727,6633728,6633729,6633730,6633733,6633736,6633737,6633740,6633743,6633745,6633749,6633754,6633758,6633759,6633792,6633821,6633823,6633826,6633827,6633828,6633829,6633830,6633831,6633832,6633833,6633835,6633837,6633839,6633853,6633854,6633855,6633861]);galleries[349201]=new gallery(349201,"5378224","Book 2","gallery",[4833249,4833260,4833283,4833326,4833348,4841131,4841132,4976483,4976513,4976585,4990382,4990393,5378158,5378217,5378224,5378235,5434711,5670752,5670754,5670769,5964032,5964096,5964213,5964295,5964369,5964372,5964373,5964381,5964383,6454804,6454808,6454815,6633707,6633712]);var imageSets=new Object();imageSets[1]="5964372,5964213,5964032,5963889";imageSets[2]="5378224";imageSets[3]="6294577,6294576,6294573,5964383,5964381,5964373,5964372,5964369,5964295,5964213,5964096,5964032,5964027,5964023,5964019,5964016,5963965,5963942,5963940,5963889,5963882,5670769,5670754,5670752,5434711,5378235,5378224,5378217,5378158,4990393";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/INDIA/images";break}switch(a){case 1:b="http://www1.clikpic.com/INDIA/images";break}switch(a){case 2:b="http://admin.clikpic.com/INDIA/images";break}switch(a){case 24:b="http://tpc15/clikpic/INDIA/images";break}switch(a){case 4:b="http://www.clikchurch.com/INDIA/images";break}switch(a){case 5:b="http://www2.clikpic.com/INDIA/images";break}switch(a){case 22:b="http://tpc5/clikpic/INDIA/images";break}switch(a){case 23:b="http://tpc10/clikpic/INDIA/images";break}switch(a){case 25:b="http://tpc16/clikpic/INDIA/images";break}switch(a){case 15:b="http://www3.clikpic.com/INDIA/images";break}switch(a){case 18:b="http://www4.clikpic.com/INDIA/images";break}switch(a){case 19:b="http://www5.clikpic.com/INDIA/images";break}switch(a){case 31:b="http://www7.clikpic.com/INDIA/images";break}switch(a){case 32:b="http://admin2.clikpic.com/INDIA/images";break}switch(a){case 33:b="http://www8.clikpic.com/INDIA/images";break}switch(a){case 34:b="http://www9.clikpic.com/INDIA/images";break}switch(a){case 35:b="http://admin3.clikpic.com/INDIA/images";break}switch(a){case 37:b="http://admin4.clikpic.com/INDIA/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="IndiaHobsonPhotography: "+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(b,a){imageID=randomListVal(galleries[b].featured_images);if(imageID!=0){a.src=thumbnails[imageID].src;a.width=thumbnails[imageID].width;a.height=thumbnails[imageID].height}}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+'")'})}}};