Yes. You can do that with jQuery document.ready function:
(function($) {
$(function() {
$.easybox([{url: '#hello1'}, {url: '#hello2'}, {url: '#hello3'}], 0, {hideBottom: true, noNavigation: true, noClose: true, slideshow: 1000, autoClose: 1000});
$("a.slideshow").click(function() {
return $.easybox([{url: '#container1'}, {url: '#container2'}, {url: '#container3'}, {url: '#container4'}], 0, {});
});
});
})(jQuery);
This code snippet is from the demo.