﻿////////////////////
/*
This file is used for common javascript to be used on all pages regardless of visibilty
*/
////////////////////
//Display a wait cursor
function InitializeRequest(sender, args) 
{
    $get('wrapper').style.cursor = 'wait'; 
}
//Display the normal cursor and refresh the shadow box on end ajax load 
function EndRequest(sender, args)
{
    $get('wrapper').style.cursor = 'auto';  
    
    if (true)//if this page has showbox elements!!!
    {
        if( jQuery("a.shadow").length > 0) //if there is at least one anchor shadow element
        {            
            //Shadowbox.clearCache();          
           
            try
            {    
                // set up all anchor elements with a "shadow" class to work with Shadowbox  
                Shadowbox.init({skipSetup: true, continuous:true}); // skip the automatic setup                
                Shadowbox.setup(jQuery("a.shadow"), { }); 
              /*  jQuery(function()
                {
                    // set up all anchor elements with a "shadow" class to work with Shadowbox
                    Shadowbox.setup(jQuery("a.shadow"), {});
                });*/
            }
            catch(err)
            {}
        }  
    }       
}