
/* Creating modal dialogs with overlay
[ demo index | overlay docs ]
Overlays with different styles »

Overlay demo 4 / 8 : Opening overlays programmatically

Sometimes you want to open dialogs or info boxes for your users directly from your JavaScript code. In this case, you don't need any trigger element and the setup is slightly different. This page loads the overlay upon page load but you can also do it from your JavaScript anytime you like.
JavaScript coding

This time our installation is different from the earlier examples. We select the overlay element in the jQuery selector and not the trigger element. And then we simply enable the load configuration variable.
*/

// select the overlay element - and "make it an overlay"
var $J = jQuery.noConflict();
var TTG = {
    overlay :  {
        init:function(){
            $J("#IBM_popup").overlay({
                // some mask tweaks suitable for facebox-looking dialogs
                mask: {
                    // you might also consider a "transparent" color for the mask
                    color: '#fff',
                    // load mask a little faster
                    loadSpeed: 200,
                    // very transparent
                    opacity: 0.5
                },
                // disable this for modal dialog-type of overlays
                closeOnClick: false,
                // load it immediately after the construction
                load: true
            });
        }
    }
};


/*
$J(document).ready(function() {
    if ($J(".IBM_popup").length > 0) {
         TTG.overlay.init();
    }
});
*/

