jQuery(document).ready( function() {
  if (typeof(YStore) != 'undefined' && typeof(YStore.CrossSellRecs) != 'undefined' && typeof(YStore.crossSellUrl) != 'undefined' && YStore.crossSellUrl != '')
  {
    jQuery.getJSON(YStore.crossSellUrl + "&callback=?",
        function(data){
          if (typeof(data.r) != 'undefined' && data.r.length > 0)
          {
             ;
             // there are cross sells
          }
          else
          {
             // there are no cross sells
             jQuery("#ys_relatedItems").css("display", "none");
          }
        });

  }
  else
  {
    jQuery("#ys_relatedItems").css("display", "none");
  }
}
)