function init(){ 
	$.hover.init();
   var x = 0;
   var num = $("//ul[@id = scosaquotes]/li").size();
   var rannum= Math.floor(Math.random()*num);
   $("//ul[@id = scosaquotes]/li").filter(function()
   {
   var foo = (x != rannum);
   x++;
   return foo
   }).hide();

   var x = 0;
   var num = $("//ul[@id = woofquotes]/li").size();
   var rannum= Math.floor(Math.random()*num);
   $("//ul[@id = woofquotes]/li").filter(function()
   {
   var foo = (x != rannum);
   x++;
   return foo
   }).hide();
	
}

$(document).ready(init);


// This function is used for rollovers
// If an image has a class="rollover" then it will display imagename_roll.gif 

jQuery.hover =
{
	init: function()
	{
		$("img.rollover")
		.mouseover($.hover.over)
		.mouseout($.hover.out)
		.each($.hover.preload);
	},
	preload: function()
	{
		this.preloaded = new Image;
		var ftype = this.src.substring(this.src.lastIndexOf('.'), this.src.length);
		this.preloaded.src =  this.src.replace(ftype, '_roll'+ftype);
	},

	over: function()
	{
		var ftype = this.src.substring(this.src.lastIndexOf('.'), this.src.length);
		var hsrc = this.src.replace(ftype, '_roll'+ftype);
		this.src = hsrc 
	},

	out: function()
	{
		this.src = this.src.replace('_roll','');
	}
};


