var SlideshowAutoLoad = {
  load: function() {
    var js = /slideshow-autoload\.js(\?.*)?$/;
    $$('head script[src]').findAll(function(s) {
      return s.src.match(js);
    }).each(function(s) {
      var t = document.createElement('script');
      t.type = 'text/javascript';
      t.src = (s.src.replace(js, '')+'slideshow.js?immediate=yes'); 
      document.getElementsByTagName('head')[0].appendChild(t);
	});
  }
};

$(document).observe('dom:loaded', function () {
	var l = $$('.slideshow');
	if (l.length > 0) {
		l.each(function(u){u.setStyle({'visibility':'hidden','position':'relative'})});
		SlideshowAutoLoad.load();
	}
});

