// Random Cutout Selector
// ==============================================================================================================

// v 1.1 - 19 January 2009

// This JavaScript file is used to pick a cutout image at random to display at the bottom of the page
// If only one cutout is associated with a given page, no action is taken
// If more than one cutout is present, the cutouts are read into an array using the JQuery class selector
// Again using JQuery, the class 'hide' is then applied to all cutouts to hide them
// We then select one cutout at random, from which we remove the 'hide' class - again using JQuery

// Version History
// ---------------
// 1.0 - Original version
// 1.1 - Use JQuery hide() and show() methods instead of applying the hide class and removing it. This avoids problems with horizontal scrollbar appearing.


$(document).ready(function(){
  var cutouts = $('.cutoutImage');
  if(cutouts.length > 1){
    //cutouts.addClass('hide');
    //jQuery(cutouts[Math.floor(Math.random()*cutouts.length)]).removeClass('hide');
	cutouts.hide();
	jQuery(cutouts[Math.floor(Math.random()*cutouts.length)]).show();
	}
  });




