/*
New suckerfish menu
*/
$(document).ready(function(){
	$("#nav-one li").hover(
		function(){ $("ul", this).fadeIn("fast"); }, 
		function() { } 
	);

  	if (document.all) {
		$("#nav-one li").hoverClass ("sfHover");
	}
	
	rollovers();
	headerFlash();
	
	if($('div.scroller').length)
		$('div.scroller').jScrollPane({showArrows:true, scrollbarWidth: 15, arrowSize: 16});
});
	  
$.fn.hoverClass = function(c) {
	return this.each(function(){
		$(this).hover( 
			function() { $(this).addClass(c);  },
			function() { $(this).removeClass(c); }
		);
	});
};


function rollovers()
{
	$(".rollover").hover(
		function () {
			imgSrc = $(this).attr("src");
			newImgSrc = imgSrc.replace("_off","_on");
			
			$(this).attr("src",newImgSrc);
		}, 
		function () {
			imgSrc = $(this).attr("src");
			newImgSrc = imgSrc.replace("_on","_off");
			
			$(this).attr("src",newImgSrc);
		}
	);
}

function headerFlash()
{
	var so = new SWFObject("/designs/blueroom/flash/header.swf", "header_flash", "976", "199", "6", "");
	so.addParam("wmode","transparent");
	so.write("header");
}

function clearField(el, str)
{
	el = $(el);

	if(el.val() == str)
		el.val("");
}