Using Slimbox 2 to view slideshows for a training site. I need to capture the length of time from when they open the slideshow until they close it. User clicks on a link which opens Slimbox to view the slideshow. After viewing all the slides, they either click on the close button or on the overlay to close Slimbox. The time elapsed will need to be put into a PHP session that will then be read by the test page. How would I detect when Slimbox is closed? Below is the code currently used to view the slideshow. Any help is greatly appreciated.
$(document).ready(function() {
$("#slideshow").live('click',function(event){
var ratio = 1500 / 1125;
var viewportWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
var viewportHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
if (viewportWidth / viewportHeight > ratio) {
sheight = viewportHeight *.9;
swidth = viewportHeight * ratio *.9;
} else {
swidth = viewportWidth *.9;
sheight = viewportWidth / ratio *.9;
}
$.slimbox([["images/Slide1.JPG"], ["images/Slide2.JPG"], ["images/Slide3.JPG"]], 0, {slideWidth: + swidth, slideHeight: + sheight});
event.preventDefault();
});
});