// bookoverlays.js
// Copyright (c) 2009 Bob Cook

var bookoverlay_unpredictable = null;
var bookoverlay_wwed = null;
var bookoverlay_revenge = null;

function bookoverlays_init() 
{
   bookoverlay_unpredictable
      = new YAHOO.widget.Overlay( "bookoverlay_unpredictable", 
                                  { context: [ "bookoverlay_unpredictable_image", "tl", "tl" ],
                                    visible: false,
                                    width: "470px",
                                    effect:  { effect: YAHOO.widget.ContainerEffect.FADE, duration: 0.25 }
                                  } );
                                              
   bookoverlay_wwed
      = new YAHOO.widget.Overlay( "bookoverlay_whatwouldemmado", 
                                  { context: [ "bookoverlay_wwed_image", "tl", "tl" ],
                                    visible: false,
                                    width: "470px",
                                    effect:  { effect: YAHOO.widget.ContainerEffect.FADE, duration: 0.25 }
                                  } );

   bookoverlay_revenge
      = new YAHOO.widget.Overlay( "bookoverlay_gettingrevenge", 
                                  { context: [ "bookoverlay_revenge_image", "tl", "tl" ],
                                    visible: false,
                                    width: "470px",
                                    effect:  { effect: YAHOO.widget.ContainerEffect.FADE, duration: 0.25 }
                                  } );
                                              
   bookoverlay_unpredictable.render();
   bookoverlay_wwed.render();
   bookoverlay_revenge.render();
}
        
YAHOO.util.Event.addListener( window, "load", bookoverlays_init );

function bookoverlays_hide_all()
{
   bookoverlay_unpredictable.hide();
   bookoverlay_wwed.hide();
   bookoverlay_revenge.hide();
}

function bookoverlays_reveal_unpredictable()
{
   bookoverlays_hide_all();
   bookoverlay_unpredictable.show();
}

function bookoverlays_reveal_wwed()
{
   bookoverlays_hide_all();
   bookoverlay_wwed.show();
}

function bookoverlays_reveal_revenge()
{
   bookoverlays_hide_all();
   bookoverlay_revenge.show();
}

