
/*----- Navigation ------*/
$(document).ready(function(){
		$("#mainmenu")
	.superfish({
		hoverClass	: "sfHover",
		pathClass	: "overideThisToUse",
		delay		: 800,
		animation	: {opacity:"show", height:"show"},
		speed		: "normal",
		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", $(".nav>li:has(ul)")).bgIframe({opacity:true});
			});
	
	// Preload all rollovers
	$(".rollover").each(function() {
		// Set the original src
		rollsrc = $(this).attr("src");
		rollON = rollsrc.replace(/.gif$/ig,"_on.gif");
		$("<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(/.gif$/ig,"_on.gif"); // strip off extension
			$(this).attr("src", imgsrcON);
		}
	}).mouseout(function(){
		$(this).attr("src", imgsrc);
	});
	
	
	// gets rid of focus box on click
	$("a").focus(function(){
		this.blur();
	});
});


var fritz = {  src: 'fritz.swf' };
sIFR.activate(fritz);

sIFR.replace(fritz, {
  selector: '#addresses', 
  wmode: 'transparent', 
  src: 'fritz.swf', 
  css: [ '.sIFR-root {color:#0C3876; text-transform:uppercase;}' ]
});

sIFR.replace(fritz, {
  selector: '#subheading', 
  wmode: 'transparent', 
  src: 'fritz.swf', 
  css: [ '.sIFR-root {color:#0C3876; text-transform:uppercase;}' ]
});

var carpenter = {  src: 'carpenter.swf' };
sIFR.activate(carpenter);

sIFR.replace(carpenter, {
  selector: 'h1', 
  wmode: 'transparent', 
  src: 'carpenter.swf', 
  css: [ '.sIFR-root {color:#ffffff; }' ]
});

