// Image Rotator
$(function(){ $('#imgRotate, .imgRotate2').innerfade({ speed: 'slow', timeout: 6000, type: 'sequence', containerheight: '375px' }); });

$(function(){ $('.imgRotate3').innerfade({ speed: 'slow', timeout: 6000, type: 'sequence', containerheight: '192px' }); });

// Top Menu
$(function() {
	$('#mainNav li ul').hide();
	$('#mainNav li').hover(function() {
		var linkid = '#mainNavHover'+$(this).attr('id');
		$(this).css("font-weight","bold");
		$(linkid).show();
	}, function(){
		var linkid = '#mainNavHover'+$(this).attr('id');
		$(this).css("font-weight","normal");
		$(linkid).hide();
	});
});

/*
// Left Menu
$(function() {
	$('#leftNav li').hover(function() {
		liid = $(this).attr('id')+'on.jpg';
		$(this).css({"background-image" : "url(images/icons/"+liid+")", "background-position" : "center 0"});
	}, function() {
		liid = $(this).attr('id')+'off.jpg';
		$(this).css({"background-image" : "url(images/icons/"+liid+")", "background-position" : "center 0"});
	});
});
*/

// Clear Default Text in Search Box
$(function() {
	$('.sphiderInput,.sphiderInput2').focus(function() {
		if ($(this).val() == "Search Our Site") { $(this).val(''); }
	});
});

// Preload Hover Images
jQuery.preloadImages = function()
{
  for(var i = 0; i<arguments.length; i++)
  {
    jQuery("<img>").attr("src", arguments[i]);
  }
}
$.preloadImages("images/icons/icon1on.png","images/icons/icon2on.png","images/icons/icon3on.png","images/icons/icon4on.png","images/icons/icon5on.png","images/icons/icon6on.png","images/icons/icon7on.png","images/icons/icon8on.png","images/icons/icon9on.png","images/icons/icon10on.png","images/icons/icon11on.png","images/icons/icon12on.png");

// Top Text Rotator
$(function() {
    $('#headerText').cycle({ timeout: 7000, speed: 400, random: 1 });
});
