function initcarousel()
{
  jQuery('#GenericList_List').jcarousel({
    vertical: true,
    scroll: 1
  });
  
  jQuery('#GenericList_List div.sys_subitem').each( function(i) {
    var url = jQuery("a", this).get(0).href;
    var link = document.createElement("a");
    link.href = url;
    jQuery("img", this).wrap(link);
  });
}

function dotheiframejig()
{
  if (jQuery.browser.safari) {
    jQuery(document).ready(function(){ initcarousel(); });
  } else {
    jQuery('#TB_iframeContent', top.document).load(function() {
        initcarousel();
    });
 }
}

if (top.location != location)
{
  //in an iframe
  dotheiframejig();
}
else
{
  //not in an iframe
  jQuery(document).ready(function() {
    initcarousel();    
  });
}


