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[3275316]=new thumbnail(3275316,"176850","","_DSC07441_thumb.jpg",130,141,5);thumbnails[4673104]=new thumbnail(4673104,"176850","","_DSC4994_thumb.jpg",130,132,5);thumbnails[5113212]=new thumbnail(5113212,"176850","","_DSC0710_thumb.jpg",130,87,5);thumbnails[5113222]=new thumbnail(5113222,"176850","","_DSC5291_thumb.jpg",130,87,5);thumbnails[5113230]=new thumbnail(5113230,"176850","","_DSC5322_thumb.jpg",130,87,5);thumbnails[5123378]=new thumbnail(5123378,"176850","","_DSC0288-Edit_thumb.jpg",130,80,5);thumbnails[5123380]=new thumbnail(5123380,"176850","","_DSC0322_thumb.jpg",130,87,5);thumbnails[5123383]=new thumbnail(5123383,"176850","","_DSC5124_thumb.jpg",130,149,5);thumbnails[5123632]=new thumbnail(5123632,"176850","","DSC00090_thumb.jpg",130,87,5);thumbnails[5123635]=new thumbnail(5123635,"176850","","_DSC5158_thumb.jpg",130,87,5);thumbnails[5123637]=new thumbnail(5123637,"176850","","_DSC5184_thumb.jpg",130,87,5);thumbnails[5389630]=new thumbnail(5389630,"176850","","DSC00164_thumb.jpg",130,98,5);thumbnails[5389656]=new thumbnail(5389656,"176850","","DSC00202_thumb.jpg",130,98,5);thumbnails[5962630]=new thumbnail(5962630,"176850","","_DSC1299_thumb.jpg",130,195,5);thumbnails[5962633]=new thumbnail(5962633,"176850","","_DSC1393_thumb.jpg",130,87,5);thumbnails[5962634]=new thumbnail(5962634,"176850","","_DSC5580_thumb.jpg",130,142,5);thumbnails[3274549]=new thumbnail(3274549,"176850","","DSC02637_thumb.jpg",130,87,5);thumbnails[3274544]=new thumbnail(3274544,"176850","","DSC026331_thumb.jpg",130,87,5);thumbnails[3274546]=new thumbnail(3274546,"176850","","_DSC08091_thumb.jpg",130,82,5);thumbnails[3274535]=new thumbnail(3274535,"176850","","_DSC0214_thumb.jpg",130,99,5);thumbnails[3274531]=new thumbnail(3274531,"176850","","DSC026561_thumb.jpg",130,87,5);thumbnails[3274561]=new thumbnail(3274561,"176850","","DSC02658_thumb.jpg",130,89,5);thumbnails[3274567]=new thumbnail(3274567,"176850","","DSC027111_thumb.jpg",130,101,5);thumbnails[5183690]=new thumbnail(5183690,"176850","","_DSC0313_thumb.jpg",130,87,5);thumbnails[3271403]=new thumbnail(3271403,"173298","Paul Rankin","_DSC0927_thumb.jpg",130,98,5);thumbnails[3271405]=new thumbnail(3271405,"173298","","DSC00522_thumb.jpg",130,87,5);thumbnails[3271408]=new thumbnail(3271408,"173298","","DSC002621_thumb.jpg",130,97,5);thumbnails[3271415]=new thumbnail(3271415,"173298","","DSC03370_thumb.jpg",130,87,5);thumbnails[3711645]=new thumbnail(3711645,"173298","","_DSC2484_thumb.jpg",130,82,5);thumbnails[3711646]=new thumbnail(3711646,"173298","Ashby 20 Road Race","_DSC2783_thumb.jpg",130,130,5);thumbnails[4745317]=new thumbnail(4745317,"173298","","_DSC4819-Edit_thumb.jpg",130,111,5);thumbnails[4781602]=new thumbnail(4781602,"173298","","_DSC3391_thumb.jpg",130,94,5);thumbnails[4793353]=new thumbnail(4793353,"173298","Calor Village of the Year Awards (Leicestershire & Rutland)","_DSC0238_thumb.jpg",130,93,5);thumbnails[4793356]=new thumbnail(4793356,"173298","Calor Village of the Year Awards (Leicestershire & Rutland)","_DSC0269_thumb.jpg",130,91,5);thumbnails[4793120]=new thumbnail(4793120,"173298","","_DSC0339_thumb.jpg",130,106,5);thumbnails[4334974]=new thumbnail(4334974,"173298","Ashby Court Nursing Home","_DSC3810_thumb.jpg",130,123,5);thumbnails[5191244]=new thumbnail(5191244,"173298","School Food Trust - Taste test for business managers","_DSC0814_thumb.jpg",130,89,5);thumbnails[5191245]=new thumbnail(5191245,"173298","School Food Trust - Taste test for business managers","_DSC0811_thumb.jpg",130,195,5);thumbnails[5658919]=new thumbnail(5658919,"266534","","_DSC1545_thumb.jpg",130,87,5);thumbnails[5658924]=new thumbnail(5658924,"266534","","_DSC1792_thumb.jpg",130,130,5);thumbnails[4418616]=new thumbnail(4418616,"266534","","_DSC3081_thumb.jpg",130,130,5);thumbnails[4418615]=new thumbnail(4418615,"266534","","_DSC3186_thumb.jpg",130,126,5);thumbnails[3825227]=new thumbnail(3825227,"266534","","_DSC3125_thumb.jpg",130,159,5);thumbnails[4909414]=new thumbnail(4909414,"266534","","_DSC0375-Edit_thumb.jpg",130,87,5);thumbnails[4909417]=new thumbnail(4909417,"266534","","_DSC0388_thumb.jpg",130,87,5);thumbnails[4909418]=new thumbnail(4909418,"266534","","_DSC0558_thumb.jpg",130,87,5);thumbnails[4909424]=new thumbnail(4909424,"266534","","_DSC0476_thumb.jpg",130,195,5);thumbnails[4909427]=new thumbnail(4909427,"266534","","_DSC0462_thumb.jpg",130,131,5);thumbnails[5123220]=new thumbnail(5123220,"266534","Packington Memorial Hall","DSC00312_thumb.jpg",130,87,5);thumbnails[5123213]=new thumbnail(5123213,"266534","Packington Memorial Hall","DSC00318_thumb.jpg",130,87,5);thumbnails[4607411]=new thumbnail(4607411,"266534","","_DSC4764_thumb.jpg",130,87,5);thumbnails[4607407]=new thumbnail(4607407,"266534","","_DSC4761_thumb.jpg",130,87,5);thumbnails[4607408]=new thumbnail(4607408,"266534","","_DSC4762_thumb.jpg",130,195,5);thumbnails[4607405]=new thumbnail(4607405,"266534","","_DSC4759_thumb.jpg",130,195,5);thumbnails[5658921]=new thumbnail(5658921,"266534","","_DSC1749_thumb.jpg",130,195,5);thumbnails[3264819]=new thumbnail(3264819,"289514","","_DSC14151_thumb.jpg",130,165,5);thumbnails[4204097]=new thumbnail(4204097,"289514","","DSC00013_thumb.jpg",130,150,5);thumbnails[4204099]=new thumbnail(4204099,"289514","","DSC00100_thumb.jpg",130,139,5);thumbnails[5123372]=new thumbnail(5123372,"289514","","_DSC0342_thumb.jpg",130,144,5);thumbnails[5123374]=new thumbnail(5123374,"289514","","_DSC0351_thumb.jpg",130,156,5);thumbnails[3264885]=new thumbnail(3264885,"289514","","DSC008712_thumb.jpg",130,137,5);thumbnails[3271419]=new thumbnail(3271419,"289514","","_DSC02261_thumb.jpg",130,172,5);thumbnails[5781084]=new thumbnail(5781084,"175453","Gordon Giltrap","_DSC5978-Edit_thumb.jpg",130,91,5);thumbnails[5776617]=new thumbnail(5776617,"175453","Gordon Giltrap","_DSC5961-Edit_thumb.jpg",130,121,5);thumbnails[5776620]=new thumbnail(5776620,"175453","Gordon Giltrap","_DSC6014-Edit_thumb.jpg",130,95,5);thumbnails[5776623]=new thumbnail(5776623,"175453","Gordon Giltrap","_DSC6043-Edit_thumb.jpg",130,95,5);thumbnails[4418614]=new thumbnail(4418614,"175453","Wreckless Venture","DSC00663-Edit_thumb.jpg",130,94,5);thumbnails[4418613]=new thumbnail(4418613,"175453","Wreckless Venture","P8310149-Edit_thumb.jpg",130,98,5);thumbnails[3270847]=new thumbnail(3270847,"175453","Wreckless Venture","DSC00657_thumb.jpg",130,83,5);thumbnails[3270867]=new thumbnail(3270867,"175453","Secret Agent","_DSC4227_thumb.jpg",130,87,5);thumbnails[3270866]=new thumbnail(3270866,"175453","Secret Agent","_DSC4164_thumb.jpg",130,103,5);thumbnails[3270864]=new thumbnail(3270864,"175453","Victoria Bourne","_DSC1315_thumb.jpg",130,126,5);thumbnails[3270863]=new thumbnail(3270863,"175453","Victoria Bourne","_DSC1313_thumb.jpg",130,100,5);thumbnails[4673107]=new thumbnail(4673107,"175453","Ibstock Brick Brass Band","_DSC5005_thumb.jpg",130,195,5);thumbnails[5962663]=new thumbnail(5962663,"336490","","_DSC2281_thumb.jpg",130,87,5);thumbnails[5962664]=new thumbnail(5962664,"336490","","_DSC2287_thumb.jpg",130,195,5);thumbnails[5962666]=new thumbnail(5962666,"336490","","_DSC2293_thumb.jpg",130,87,5);thumbnails[5962670]=new thumbnail(5962670,"336490","","_DSC2324_thumb.jpg",130,195,5);thumbnails[5962671]=new thumbnail(5962671,"336490","","_DSC2340_thumb.jpg",130,87,5);thumbnails[5962678]=new thumbnail(5962678,"336490","","_DSC22661_thumb.jpg",130,195,5);thumbnails[3278878]=new thumbnail(3278878,"174186","","DSC034511_thumb.jpg",130,87,5);thumbnails[3361678]=new thumbnail(3361678,"174186","","_DSC39761_thumb.jpg",130,104,5);thumbnails[4425095]=new thumbnail(4425095,"174186","","_DSC4589_thumb.jpg",130,87,5);thumbnails[4425097]=new thumbnail(4425097,"174186","","DSC01512_thumb.jpg",130,87,5);thumbnails[5183895]=new thumbnail(5183895,"174186","","DSC00531_thumb.jpg",130,87,5);thumbnails[5183898]=new thumbnail(5183898,"174186","","DSC01587_thumb.jpg",130,87,5);thumbnails[5554949]=new thumbnail(5554949,"174186","","DSC00058_thumb.jpg",130,111,5);thumbnails[3275847]=new thumbnail(3275847,"174186","","DSC03628_thumb.jpg",130,179,5);thumbnails[3275854]=new thumbnail(3275854,"174186","","DSC03495_thumb.jpg",130,203,5);var galleries=new Object();galleries[176850]=new gallery(176850,"5962634,5962633,5962630,5389656,5389630,5183690,5123637,5123635,5123632,5123383","Conferences, Exhibitions & Events","gallery",[3275316,4673104,5113212,5113222,5113230,5123378,5123380,5123383,5123632,5123635,5123637,5389630,5389656,5962630,5962633,5962634,3274549,3274544,3274546,3274535,3274531,3274561,3274567,5183690]);galleries[173298]=new gallery(173298,"3711646","Press and PR","gallery",[3271403,3271405,3271408,3271415,3711645,3711646,4745317,4781602,4793353,4793356,4793120,4334974,5191244,5191245]);galleries[266534]=new gallery(266534,"5658924,5658921,5658919,5123220,5123213,4909427,4909424,4909418,4909417,4909414","Commercial, Industrial & Products","gallery",[5658919,5658924,4418616,4418615,3825227,4909414,4909417,4909418,4909424,4909427,5123220,5123213,4607411,4607407,4607408,4607405,5658921]);galleries[289514]=new gallery(289514,"5123374,5123372,4204099,4204097,3271419,3264885,3264819","Commercial Portraits","gallery",[3264819,4204097,4204099,5123372,5123374,3264885,3271419]);galleries[175453]=new gallery(175453,"5781084,5776623,5776620,5776617,4673107,4418614,4418613,3270867,3270866,3270864","In Concert","gallery",[5781084,5776617,5776620,5776623,4418614,4418613,3270847,3270867,3270866,3270864,3270863,4673107]);galleries[336490]=new gallery(336490,"5962678,5962671,5962670,5962666,5962664,5962663","Performance and Shows","gallery",[5962663,5962664,5962666,5962670,5962671,5962678]);galleries[174186]=new gallery(174186,"3361678,3278878","Miscellaneous","gallery",[3278878,3361678,4425095,4425097,5183895,5183898,5554949,3275847,3275854]);var imageSets=new Object();imageSets[1]="3711646,3361678,3278878,3275847,3275316,3274567,3274561,3274549,3274546,3274544,3274531,3271419,3271415,3271405,3271403,3270867,3270866,3270864,3270863,3270847";imageSets[2]="3711646,3361678,3278878";imageSets[3]="3275854";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/askelding/images";break}switch(a){case 1:b="http://www1.clikpic.com/askelding/images";break}switch(a){case 2:b="http://admin.clikpic.com/askelding/images";break}switch(a){case 24:b="http://tpc15/clikpic/askelding/images";break}switch(a){case 4:b="http://www.clikchurch.com/askelding/images";break}switch(a){case 5:b="http://www2.clikpic.com/askelding/images";break}switch(a){case 22:b="http://tpc5/clikpic/askelding/images";break}switch(a){case 23:b="http://tpc10/clikpic/askelding/images";break}switch(a){case 25:b="http://tpc16/clikpic/askelding/images";break}switch(a){case 15:b="http://www3.clikpic.com/askelding/images";break}switch(a){case 18:b="http://www4.clikpic.com/askelding/images";break}switch(a){case 19:b="http://www5.clikpic.com/askelding/images";break}switch(a){case 31:b="http://www7.clikpic.com/askelding/images";break}switch(a){case 32:b="http://admin2.clikpic.com/askelding/images";break}switch(a){case 33:b="http://www8.clikpic.com/askelding/images";break}switch(a){case 34:b="http://www9.clikpic.com/askelding/images";break}switch(a){case 35:b="http://admin3.clikpic.com/askelding/images";break}switch(a){case 37:b="http://admin4.clikpic.com/askelding/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="Normanton 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>"}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="askelding@btinternet.com">';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="askelding@btinternet.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+'")'})}}};