var t;
$(document).ready(function(){
						   $("#others").scrollTo("#selImg",8,{offset: {top:0, left:-250} });
	   
	   $("#others #selImg a").each(function(){
		   $(this).html("<img src=\"http://img.davebutcher.co.uk/imgs/tiny/" + $(this).attr("href") + ".jpg\" />");
	   });
	   $("#refineButton").mousedown(function(){
										 var d=$("#refineDiv");
										 if(d.css("display")!="none"){
											 d.hide("fast");
										 } else {
											 d.show("fast");
										 }
										 
										 });
	   $("#openkeys").click(function(){
									 $("#keysdiv").toggle();
									 return false;
									 });
	   $("#openplaces").click(function(){
									   $("#placesdiv").toggle();
									   return false;
									   });
	   
		$("#others").scroll(function(){
        	$("#others a").each(function(){
										 var pos = $(this).offset();
										 if(pos.left>-100 && pos.left<1200 && $(this).attr("class")!="loaded"){
											 $(this).addClass("loaded");
											 $(this).html("<img src=\"http://img.davebutcher.co.uk/imgs/tiny/" + $(this).attr("href") + ".jpg\" />");
										 }
												 });
		}); 
		$("#others a").each(function(){
										 var pos = $(this).offset();
										 if(pos.left>-100 && pos.left<1200 && $(this).attr("class")!="loaded"){
											 $(this).addClass("loaded");
											 $(this).html("<img src=\"http://img.davebutcher.co.uk/imgs/tiny/" + $(this).attr("href") + ".jpg\" />");
										 }
												 });
											 
																			 
	   
     });

