jQuery(document).ready(function() {
jQuery('#facebox').overlay({
    fixed: false,
left: 'auto',
top: 'auto',
    onBeforeLoad: function() {
        jQuery($('#facebox')).animate({
top: 'auto',
left: 'auto',

        });
        // other JavaScript code here
    }
})
// select the overlay element - and "make it an overlay"
jQuery("#facebox").overlay({

	// custom top position

	//top: 300,
	//left: '25%',

	// some mask tweaks suitable for facebox-looking dialogs
	mask: {

		// you might also consider a "transparent" color for the mask
		//color: '#A00',

		// load mask a little faster
		loadSpeed: 1000,

		// very transparent
		opacity: 0.1
	},

	// disable this for modal dialog-type of overlays
	closeOnClick: true,

	// we want to use the programming API
	api: true
});
// load it after delay

var ol = jQuery("#facebox").overlay({api: true});
// wait 5 seconds, then load the overlay
 setTimeout(function() {
   ol.load();
 }, 30000);

});
