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[5364462]=new thumbnail(5364462,"302727","","24hrs3_thumb.jpg",130,87,5);thumbnails[5406862]=new thumbnail(5406862,"305398","","SE9B5630_thumb.JPG",130,87,5);thumbnails[5406881]=new thumbnail(5406881,"305398","","IMG_0361_thumb.JPG",130,87,5);thumbnails[5406995]=new thumbnail(5406995,"302723","","IMG_0356_thumb.JPG",130,87,5);thumbnails[5407076]=new thumbnail(5407076,"305398","","IMG_7415_thumb.JPG",130,87,5);thumbnails[5407078]=new thumbnail(5407078,"302727","","IMG_75111_thumb.JPG",130,87,5);thumbnails[5407080]=new thumbnail(5407080,"302717","","AbuDhabiTeamWINS1_thumb.jpg",130,87,5);thumbnails[5407091]=new thumbnail(5407091,"302723","","IMG_6803_thumb.JPG",130,87,5);thumbnails[5409764]=new thumbnail(5409764,"302727","","Shk_Hasher_Al_Maktoum_on_track_with_the_BMW_ALPINA_B6_GT3_Hockenheim_circuit_Germany_thumb.jpg",130,85,5);thumbnails[5413667]=new thumbnail(5413667,"305398","","IMG_7033_thumb.JPG",130,87,5);thumbnails[5414203]=new thumbnail(5414203,"","","F2_logo_2_thumb.jpg",130,110,5);thumbnails[5414309]=new thumbnail(5414309,"302727","","SE9B6929_thumb.JPG",130,87,5);thumbnails[5414312]=new thumbnail(5414312,"305398","","DSC_0008_thumb.JPG",130,86,5);thumbnails[5414314]=new thumbnail(5414314,"305398","","DSC_0013_thumb.JPG",130,192,5);thumbnails[5414316]=new thumbnail(5414316,"302717","","IMG_6456_thumb.JPG",130,87,5);thumbnails[5414338]=new thumbnail(5414338,"302727","","Dubai_Autodrome_Feb_13_08_thumb.JPG",130,87,5);thumbnails[5421139]=new thumbnail(5421139,"302717","","_DSC6982a_thumb.jpg",130,83,5);thumbnails[5422970]=new thumbnail(5422970,"302717","","IMG_1624_thumb.JPG",130,87,5);thumbnails[5422971]=new thumbnail(5422971,"302717","","IMG_1675_thumb.JPG",130,87,5);thumbnails[5422973]=new thumbnail(5422973,"302717","","LEX-2007-11-17_00002b_thumb.jpg",130,87,5);thumbnails[5432873]=new thumbnail(5432873,"302717","","IMG_1002_thumb.JPG",130,87,5);thumbnails[5432880]=new thumbnail(5432880,"302727","","IMG_7095_thumb.JPG",130,87,5);thumbnails[5434635]=new thumbnail(5434635,"302717","","IMG_7374_thumb.JPG",130,195,5);thumbnails[5434663]=new thumbnail(5434663,"302727","","img_8937dubai24hr_thumb.jpg",130,87,5);thumbnails[5434664]=new thumbnail(5434664,"302717","","SE9B7301_thumb.JPG",130,87,5);thumbnails[5544598]=new thumbnail(5544598,"","","F2_logo_2_F6BAD34D-1EC9-D45B-1C2C4E9C29B81883_thumb.jpg",130,107,5);thumbnails[5544634]=new thumbnail(5544634,"314147","","KIF_1447_thumb.JPG",130,98,5);thumbnails[5544647]=new thumbnail(5544647,"314147","","IMG_7891_thumb.JPG",130,87,5);thumbnails[5544651]=new thumbnail(5544651,"314147","","Barbican_Turbo_2009_show_pictures_614_F6C7388F-1EC9-D45B-1CF1ED20F95FF780_thumb.jpg",130,87,5);thumbnails[5544664]=new thumbnail(5544664,"314147","","ATP_36041_thumb.JPG",130,84,5);thumbnails[5547996]=new thumbnail(5547996,"302717","","F2GroupShot_thumb.jpg",130,87,5);thumbnails[5547997]=new thumbnail(5547997,"302727","","IMG_1858_thumb.JPG",130,87,5);thumbnails[5547998]=new thumbnail(5547998,"302717","","KIF_2427_thumb.JPG",130,87,5);thumbnails[5547999]=new thumbnail(5547999,"305398","","IMG_1102_thumb.JPG",130,87,5);thumbnails[5581533]=new thumbnail(5581533,"314147","","Michael_1_1F3529FC-1EC9-D45B-1CABB0DE2CE3BA2B_thumb.jpg",130,87,5);thumbnails[5581541]=new thumbnail(5581541,"314147","","IMG_5767_thumb.JPG",130,87,5);thumbnails[5581640]=new thumbnail(5581640,"314147","","IMG_6675_thumb.JPG",130,87,5);thumbnails[5725591]=new thumbnail(5725591,"305398","","Turbo_Barbican_Hi_Res_Logo__189081_thumb.jpg",130,143,5);thumbnails[5725611]=new thumbnail(5725611,"302727","","Turbo_Barbican_Hi_Res_Logo__large_thumb.jpg",130,143,5);thumbnails[5725663]=new thumbnail(5725663,"314147","","Turbo_Barbican_Hi_Res_Logo__large1_thumb.jpg",130,143,5);thumbnails[5725665]=new thumbnail(5725665,"314147","","F2_logo_2_AFD7A2BE-24E8-5EC4-4FAEE4C9F6CA0EF5_thumb.jpg",130,107,5);thumbnails[5725684]=new thumbnail(5725684,"302727","","F2_logo_2_AFDA5FDD-24E8-5EC4-4F45902D513C3714_thumb.jpg",130,107,5);thumbnails[5747672]=new thumbnail(5747672,"302727","","SE9B9309_thumb.JPG",130,87,5);thumbnails[5747703]=new thumbnail(5747703,"302727","","Fabienne_Lanz_copy2_thumb.jpg",130,162,5);thumbnails[5747711]=new thumbnail(5747711,"302727","","Lex_with_Fabienne_Lanz_World_GoKarting_driver1_thumb.jpg",130,163,5);thumbnails[5747757]=new thumbnail(5747757,"302727","","IMG_0410_thumb.JPG",130,98,5);thumbnails[5881090]=new thumbnail(5881090,"302731","","tire_warmers_anyone1_thumb.jpg",130,87,5);thumbnails[5881092]=new thumbnail(5881092,"302731","","IMG_3494_thumb.JPG",130,87,5);thumbnails[5881692]=new thumbnail(5881692,"302731","","IMG_30211_thumb.JPG",130,87,5);thumbnails[5413669]=new thumbnail(5413669,"305398","","Michael_1_thumb.jpg",130,87,5);thumbnails[5591440]=new thumbnail(5591440,"314147","","check_flag_finish_line_thumb.jpg",130,87,5);thumbnails[5591464]=new thumbnail(5591464,"314147","","SE9B7119_F1x3_thumb.jpg",130,87,5);thumbnails[5406678]=new thumbnail(5406678,"301332","","UIM_F2_Race_start_Fuj_Dec_2009_thumb.jpg",130,87,5);thumbnails[5406695]=new thumbnail(5406695,"301332","","IMG_2434_raceday_thumb.jpg",130,87,5);thumbnails[5413670]=new thumbnail(5413670,"301332","","Yachting_Dubai_2009_thumb.jpg",130,87,5);thumbnails[5413672]=new thumbnail(5413672,"301332","","Yousef_practice_thumb.jpg",130,87,5);thumbnails[5413678]=new thumbnail(5413678,"301332","","IMG_5668_thumb.JPG",130,87,5);thumbnails[5413680]=new thumbnail(5413680,"301332","","IMG_5753_thumb.JPG",130,87,5);thumbnails[5413685]=new thumbnail(5413685,"301332","","IMG_5805_thumb.JPG",130,87,5);thumbnails[5414215]=new thumbnail(5414215,"301332","","IMG_5829_thumb.JPG",130,87,5);thumbnails[5422968]=new thumbnail(5422968,"301332","","IMG_3996_thumb.JPG",130,87,5);thumbnails[5424898]=new thumbnail(5424898,"301332","","IMG_0294_711F8000-2219-B5B5-4CBFB6020B5E6F53_thumb.JPG",130,87,5);thumbnails[5432856]=new thumbnail(5432856,"301332","","IMG_2251_thumb.JPG",130,87,5);thumbnails[5406788]=new thumbnail(5406788,"301333","","SE9B7703_thumb.JPG",130,87,5);thumbnails[5406991]=new thumbnail(5406991,"301333","","IMG_7511_thumb.JPG",130,87,5);thumbnails[5406993]=new thumbnail(5406993,"301333","","IMG_8733_thumb.JPG",130,87,5);thumbnails[5407116]=new thumbnail(5407116,"301333","","IMG_6958_thumb.JPG",130,87,5);thumbnails[5407202]=new thumbnail(5407202,"301333","","IMG_6598_thumb.JPG",130,87,5);thumbnails[5409740]=new thumbnail(5409740,"301333","","IMG_7285_thumb.JPG",130,87,5);thumbnails[5409744]=new thumbnail(5409744,"301333","","IMG_8733_609F6D5F-2219-B5B5-4C76D619C24D7F38_thumb.JPG",130,87,5);thumbnails[5406809]=new thumbnail(5406809,"305375","","IMG_8962_thumb.JPG",130,87,5);thumbnails[5413677]=new thumbnail(5413677,"305375","","grant_pres2_thumb.jpg",130,87,5);thumbnails[5414311]=new thumbnail(5414311,"305375","","SE9B2483_thumb.JPG",130,87,5);thumbnails[5424910]=new thumbnail(5424910,"305375","","IMG_8914_thumb.JPG",130,87,5);thumbnails[5434764]=new thumbnail(5434764,"305375","","IMG_8938_thumb.JPG",130,87,5);thumbnails[5747643]=new thumbnail(5747643,"305375","","SE9B2569_thumb.JPG",130,87,5);thumbnails[5406784]=new thumbnail(5406784,"305378","","Fabienne_leads_the_way_in_practice_thumb.jpg",130,87,5);thumbnails[5406787]=new thumbnail(5406787,"305378","","IMG_3941_cr_thumb.jpg",130,98,5);thumbnails[5406988]=new thumbnail(5406988,"305378","","IMG_3947_ROK_Final_Race_LonatoOct25th2009_thumb.jpg",130,86,5);thumbnails[5406989]=new thumbnail(5406989,"305378","","IMG_4025_ROK_Final_Race_LonatoOct25th2009_thumb.jpg",130,87,5);thumbnails[5409747]=new thumbnail(5409747,"305378","","IMG_3081_ROK_Parade_Race_LonatoOct25th2009_thumb.jpg",130,195,5);thumbnails[5432847]=new thumbnail(5432847,"307035","","Barbican_Turbo_2009_show_pictures_614_thumb.jpg",130,87,5);thumbnails[5432849]=new thumbnail(5432849,"307035","","F2_logo_2_7AE61166-2219-B5B5-4C19E283BC31A1D8_thumb.jpg",130,110,5);thumbnails[5591481]=new thumbnail(5591481,"307035","","SE9B7119_F1x31_thumb.jpg",130,87,5);thumbnails[5591498]=new thumbnail(5591498,"307035","","Lex_conducton_Road_Safety_campaign_in_Dubai_thumb.jpg",130,87,5);thumbnails[5406660]=new thumbnail(5406660,"305384","","IMG_0294_thumb.JPG",130,87,5);thumbnails[5409751]=new thumbnail(5409751,"305384","","IMG_0368_thumb.JPG",130,196,5);thumbnails[5421185]=new thumbnail(5421185,"305384","","IMG_8202_thumb.JPG",130,87,5);thumbnails[5428091]=new thumbnail(5428091,"305384","","IMG_0361_749E706D-2219-B5B5-4C0852B117FF5240_thumb.JPG",130,87,5);thumbnails[5428092]=new thumbnail(5428092,"305384","","IMG_0343_thumb.JPG",130,87,5);var galleries=new Object();galleries[302731]=new gallery(302731,"5881692,5881092,5881090","Clients","section360870",[5881090,5881092,5881692]);galleries[302717]=new gallery(302717,"5547998,5547996,5434664,5434635,5432873,5422973,5422971,5422970,5421139,5414316","Communications","section360491",[5407080,5414316,5421139,5422970,5422971,5422973,5432873,5434635,5434664,5547996,5547998]);galleries[314147]=new gallery(314147,"5725665,5725663,5591464,5591440,5581640,5581541,5581533,5544664,5544651,5544647","Consulting","section376502",[5544634,5544647,5544651,5544664,5581533,5581541,5581640,5725663,5725665,5591440,5591464]);galleries[305398]=new gallery(305398,"5725591,5547999,5414314,5414312,5413669,5413667,5407076,5406881,5406862","Events","section365475",[5406862,5406881,5407076,5413667,5414312,5414314,5547999,5725591,5413669]);galleries[302727]=new gallery(302727,"5414309","Management","section360869",[5364462,5407078,5409764,5414309,5414338,5432880,5434663,5547997,5725611,5725684,5747672,5747703,5747711,5747757]);galleries[302723]=new gallery(302723,"5407091,5406995","Sponsorship","section360868",[5406995,5407091]);galleries[301332]=new gallery(301332,"5413680,5413678,5406695,5406678","Watersports","gallery",[5406678,5406695,5413670,5413672,5413678,5413680,5413685,5414215,5422968,5424898,5432856]);galleries[301333]=new gallery(301333,"5409744,5409740,5407202,5407116,5406993,5406991,5406788","Auto Racing","gallery",[5406788,5406991,5406993,5407116,5407202,5409740,5409744]);galleries[305375]=new gallery(305375,"5406809","Moto Racing","gallery",[5406809,5413677,5414311,5424910,5434764,5747643]);galleries[305378]=new gallery(305378,"5409747,5406989,5406988,5406787,5406784","Karting","gallery",[5406784,5406787,5406988,5406989,5409747]);galleries[307035]=new gallery(307035,"5591498,5591481,5432849,5432847","Events","gallery",[5432847,5432849,5591481,5591498]);galleries[305384]=new gallery(305384,"5406660","Misc","gallery",[5406660,5409751,5421185,5428091,5428092]);var imageSets=new Object();imageSets[1]="5881692,5881092,5881090,5422970,5414311,5414309,5413677,5413672,5413669,5413667,5407202,5407091,5407080,5407076,5406995,5406881,5406788,5406784,5406695,5406678,5364462";imageSets[2]="5414309,5413680,5413678,5406809,5406695,5406678,5406660";imageSets[3]="5407091,5407076,5406788,5406695,5406678";imageSets[234323]="5725591,5591481,5414215,5414203,5413670,5409751,5407116,5406881,5406862,5406784,5406678,5364462";imageSets[234106]="5432873";imageSets[234124]="5725591,5422973,5406695,5406660";imageSets[234192]="5432873,5413670";imageSets[234156]="5591498,5591464,5591440,5581640,5581533,5544664,5544651,5544647,5544634,5544598,5406695";imageSets[234157]="5432873,5422973,5421139,5406695";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/lex/images";break}switch(a){case 1:b="http://www1.clikpic.com/lex/images";break}switch(a){case 2:b="http://admin.clikpic.com/lex/images";break}switch(a){case 24:b="http://tpc15/clikpic/lex/images";break}switch(a){case 4:b="http://www.clikchurch.com/lex/images";break}switch(a){case 5:b="http://www2.clikpic.com/lex/images";break}switch(a){case 22:b="http://tpc5/clikpic/lex/images";break}switch(a){case 23:b="http://tpc10/clikpic/lex/images";break}switch(a){case 25:b="http://tpc16/clikpic/lex/images";break}switch(a){case 15:b="http://www3.clikpic.com/lex/images";break}switch(a){case 18:b="http://www4.clikpic.com/lex/images";break}switch(a){case 19:b="http://www5.clikpic.com/lex/images";break}switch(a){case 31:b="http://www7.clikpic.com/lex/images";break}switch(a){case 32:b="http://admin2.clikpic.com/lex/images";break}switch(a){case 33:b="http://www8.clikpic.com/lex/images";break}switch(a){case 34:b="http://www9.clikpic.com/lex/images";break}switch(a){case 35:b="http://admin3.clikpic.com/lex/images";break}switch(a){case 37:b="http://admin4.clikpic.com/lex/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("section376502"!=""){if(backgrounds[imageID].galleries_id!=""){html+='<a href="'+backgrounds[imageID].section_code+"_"+backgrounds[imageID].galleries_id+'.html">'}else{html+='<a href="section376502.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("section376502"!=""){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="XSport Motorsports Management: "+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+'")'})}}};