// references slider
function slider(obj, json) {
  var num = $('span.cufon-alt', obj) ? $('span.cufon-alt', obj).text() : obj.text();
  var current = num - 1;
  var j = json[current];
  
  // load image
  $('#ref img:first').after(images[current]);
  $('#ref img:first').fadeOut('slow', function(){$(this).remove();});
  $('#ref img:last').fadeIn('slow', function() {
    // load position
    var li = $('#ref .ref li');
    li.each(function() {
      $(this).removeClass('active');
    });
    $(li[current]).addClass('active');
    Cufon.set('fontWeight', 900).refresh('#ref .ref a', {hover: true});
  });
  
  // load text
  var c = $('#ref .content');
  $('h1', c).html('<strong>' + j.ordering + '</strong> ' + j.title);
  var appendix = $('h4', c);
  $('.text', c).html(j.content).append(appendix);
}

