
  $(document).ready(function(){

   	 var myindex = $("#thumbs img").attr("title");
           $("#col2text").hide();
           $("#col2text").load("/detailtext.php", {caller: myindex}, function(){
	       $("#col2text").show();
	    });
	   $("#col3").hide();
	    $("#col3").load("/detailimage.php", {caller: myindex}, function(){
	    $("#col3").fadeIn("slow");
	    });
           
         
         
         $("#godn").click(function() {
   		 var imcount = $('#thumbsinner').children().size();
   		 var slimit = ((imcount-3)*(-150));
   		 var name = "#thumbsinner";
   		 var Yloc = null;
   	 	 Yloc = parseInt($(name).css("top").substring(0,$(name).css("top").indexOf("px")))
   	 	 Yloc -=150;
   	 	 if (Yloc<slimit) { Yloc=slimit; }
   	 	 $("#thumbsinner").animate({'top' : Yloc});
   	 });

   	 $("#goup").click(function() {
   	 	 var name = "#thumbsinner";
   		 var Yloc = null;
   	 	 Yloc = parseInt($(name).css("top").substring(0,$(name).css("top").indexOf("px")))
   	 	 Yloc +=150;
   	 	 if (Yloc>0) { Yloc=0; }
   	 	 $("#thumbsinner").animate({'top' : Yloc});
   	 });

         $("#thumbs img").click(function () {
           var myindex = $(this).attr("title");
           $("#col2text").hide();
           $("#col2text").load("/detailtext.php", {caller: myindex}, function(){
	       $("#col2text").show();
	    });
	   $("#col3").hide();
	    $("#col3").load("/detailimage.php", {caller: myindex}, function(){
	    $("#col3").fadeIn("slow");
	    });
           
         });

	$("#thumbs img").hover(
	      function () {
		$(this).fadeTo("fast", 0.90);
	      }, 
	      function () {
		$(this).fadeTo(1, 1.0);
	      }
	    );


       });