(function($){
  $.fn.shuffle = function() {
    return this.each(function(){
      var items = $(this).children();
      return (items.length)
        ? $(this).html($.shuffle(items))
        : this;
    });
  }
 
  $.shuffle = function(arr) {
    for(
      var j, x, i = arr.length; i;
      j = parseInt(Math.random() * i),
      x = arr[--i], arr[i] = arr[j], arr[j] = x
    );
    return arr;
  }
})(jQuery);

$(document).ready(function() {

$('#rotator ul').shuffle();

  // Enable rotator
  $("#rotator").easySlider({
controlsFade: true,
auto: false,
autoplayDuration: 10000,
continuous: true,
prevText:'',
nextText:'',
prevId: 'prevBtn',
nextId: 'nextBtn',
loop: true
});
  
  // Enable Cufon
  Cufon.replace("h1");
  Cufon.replace("span.heading");
  Cufon.now(); 
});




