/**
 * Products Mediabox Event Handler
 * Dependencies: Mootools v1.1+
 * @author Kevin Dew <kev@dewsolutions.co.uk>
 * @copyright Copyright Kevin Dew, 2007
 */

window.addEvent('domready', function()
{
        if($('submit_continue'))
        {
                $('submit_continue').addEvent('click', function(e)
                {
                        if(typeof parent.Mediabox != 'undefined')
                        {
                                new Event(e).stop();
                                parent.Mediabox.close();
                        }
                        else if($('val_form'))
                                $('val_form').removeEvents('submit');
                });
        }
});
