
/*----- Navigation ------*/
$(document).ready(function(){
	$("#mainmenu")
	.superfish({
		hoverClass	: "sfHover",
		pathClass	: "overideThisToUse",
		delay		: 800,
		animation	: {width:"show"},
		speed		: "slow",
		oldJquery	: false, /* set to true if using jQuery version below 1.2 */
		disableHI	: false, /* set to true to disable hoverIntent detection */
		onInit		: function(){},
		onBeforeShow	: function(){},
		onShow		: function(){},
		onHide		: function(){}
	})

		.find(">li:has(ul)") //fixes ie6 bug
		.mouseover(function(){
			$("ul", this).bgIframe({opacity:true});
		})
		.find("a")
			.focus(function(){
				$("ul", $("#mainmenu>li:has(ul)")).bgIframe({opacity:true});
			});
	// Preload all rollovers
	$(".rollover").each(function() {
		// Set the original src
		rollsrc = $(this).attr("src");
		rollON = rollsrc.replace(/.jpg$/ig,"_on.jpg");
		$("<img>").attr("src", rollON);
	});
	
	// Navigation rollovers
	$(".rollover").mouseover(function(){
		imgsrc = $(this).attr("src");
		matches = imgsrc.match(/_on/);
		// don't do the rollover if state is already ON
		if (!matches) {
			imgsrcON = imgsrc.replace(/.jpg$/ig,"_on.jpg"); // strip off extension
			$(this).attr("src", imgsrcON);
		}
	}).mouseout(function(){
		$(this).attr("src", imgsrc);
	});
	
	/* replace flash files */
	var flashpics = new SWFObject("mainani.swf", "slideshow", "565", "241", "6", "#000000");
    flashpics.addParam("wmode", "transparent");
	flashpics.write("mainani");
	
	// gets rid of focus box on click
	$("a").focus(function(){
		this.blur();
	});
});

//here's the sIfr
//code for the h1 tags
var futura = {  src: 'futura.swf' };
sIFR.activate(futura);
sIFR.replace(futura, {
  selector: 'h1', 
  wmode: 'transparent', 
  src: 'futura.swf', 
  css: [ '.sIFR-root {color:#d3321a; }'  ]
});

var homeheading = {  src: 'futura.swf' };
sIFR.activate(homeheading);
sIFR.replace(homeheading, {
  selector: '.home', 
  wmode: 'transparent', 
  src: 'futura.swf', 
  css: [ '.sIFR-root {color:#d3321a; text-align:center;}'  ]
});