/*jQuery.preloadImages = function(){
  for(var i = 0; i<arguments.length; i++){
    jQuery("<img/>").attr("src", arguments[i]);
  }
}*/	
 $(document).ready(function(){
 	
	/*$.fn.image = function(src, f){ 
		return this.each(function(){ 
			var i = new Image();  
			i.onload = f; 
			i.src = src;
			this.appendChild(i);
		}); 
		
		$("#container").image(, function(){
			$(this).fadeIn("slow");
			$(this).addClass("showing");
			//$("#loadbar").css("display", "none");
		});
		
	}*/

	$("#boximages a, #boximagestall a").mouseover(function(){
		$("#container img.showing").attr("src", $(this).attr("href"));
	});
	
	$("#boximages a, #boximagestall a").click(function(){
		return false;
	});

 	
   $("#libox a, .libox a").mouseover(function(){
   		$("#boxlist").fadeIn("fast");
   });
   
   $("#libox a, .libox a").click(function(){
   		return false;
   });
   
   $("#nav a, #newnav a").not($("#libox a, .libox a")).mouseover(function(){
   		$("#boxlist").fadeOut("fast");
   });
   
   $("#header, #meat, #homecontent").mouseover(function(){
   		$("#boxlist").fadeOut("fast");
   });
   
   $("#moreboxes").toggle(function(){
   		$("#frame").animate({marginTop: "-350px"}, 500);
   },
   function(){
   		$("#frame").animate({marginTop: "0px"}, 500);
   });   
   
 });