function init()
{ 
   if (arguments.callee.done) return;
   arguments.callee.done = true;

   jQuery.noConflict();

   swfobject.embedSWF("/richmedia/homebanner2.swf", "flashcontent", "940", "236", "8", null, null, { bgcolor: "#ffffff", wmode: "opaque" });
   swfobject.embedSWF("/richmedia/ticker.swf", "flashcontent1", "940", "31", "8", null, null, { bgcolor: "#999999", wmode: "opaque" });

	jQuery.hover.init();
   var x = 0;
   var num = jQuery("ul#news > li").size();
   var rannum= Math.floor(Math.random()*num);
   jQuery("ul#news > li").filter(function()
   {
   var foo = (x != rannum);
   x++;
   return foo
   }).hide();

	var x = 0;
   var num = jQuery("ul#woofquotes > li").size();
   var rannum= Math.floor(Math.random()*num);
   jQuery("ul#woofquotes > li").filter(function()
   {
   var foo = (x != rannum);
   x++;
   return foo
   }).hide();
}

jQuery(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()
	{
		jQuery("img.rollover")
		.mouseover(jQuery.hover.over)
		.mouseout(jQuery.hover.out)
		.each(jQuery.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','');
	}
};


// NEED TO MAKE SURE THE SURROUNDING DIV OF THE NAV IS CALLED #nav-one, AND MAKE SURE YOU MAKE THE CSS FOR HORIZONTAL NAV 
// REFLECT THE NAMING OF THIS DIV

jQuery(document).ready(function(){
	jQuery("#nav-one li").hover(
		function(){ jQuery("ul", this).fadeIn("fast"); }, 
		function() { } 
	);
	if (document.all) {
		jQuery("#nav-one li").hoverClass ("sfHover");
	}
});

jQuery.fn.hoverClass = function(c) {
	return this.each(function(){
		jQuery(this).hover( 
			function() { jQuery(this).addClass(c);  },
			function() { jQuery(this).removeClass(c); }
		);
	});
};