// JavaScript Document

$(window).bind("load", function() { 

   $("div.items").children("img:first").fadeIn('slow');
   
   $("div.items").children("img").click(function() {
   $(this).fadeOut("slow", function() {
   $(this).next("img").fadeIn("slow");
   });
   });
   
   $("div.items").children("img:last").click(function() {
   $(this).fadeOut("slow", function() {
   $(this).parent().parent().find("a.catalogue").fadeIn('slow');
   });
   });

});

$(window).bind("load", function() { 

   $("a.rarrow").click( function() {
   $(this).parent().children("div.items").children("img:visible").fadeOut("slow", function() {
   $(this).next("img").fadeIn("slow");
   });
   });
   
   $("a.larrow").click( function() {
   $(this).parent().children("div.items").children("img:visible").fadeOut("slow", function() {
   $(this).prev("img").fadeIn("slow");
   });
   });

});

$(window).bind("load", function() { 

   $("div#info a").click( function() {
   $(this).parent().children("div#bubble").slideToggle("fast");
   });

});

$(window).bind("load", function() { 

   $("div#restart a").click( function() {
   $("img:visible").fadeOut("slow", function() {
   $("img:first").fadeIn("slow");
   });
   });

});

$(window).bind("load", function() { 

   $("div#loader").contents().css("display","none");

});
