/*
//here's the sIfr
//code for the h1 tags
var trajan = {  src: 'trajan.swf' };
sIFR.activate(trajan);

sIFR.replace(trajan, {
  selector: 'h1', 
  wmode: 'transparent', 
  src: 'trajan.swf', 
  css: [ '.sIFR-root {color:#234e92;}'  ]
});

var trajan2 = {  src: 'trajan.swf' };
sIFR.activate(trajan2);

sIFR.replace(trajan2, {
  selector: 'h6', 
  wmode: 'transparent', 
  src: 'trajan.swf', 
  css: [ '.sIFR-root {color:#234e92;}'  ]
});

*/

$(document).ready(function(){
	/*----- Navigation ------*/
	$("ul.nav")
	.superfish({
		hoverClass	: "sfHover",
		pathClass	: "overideThisToUse",
		delay		: 10000000,
		animation	: {opacity:"show", height:"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", $(".nav>li:has(ul)")).bgIframe({opacity:false});
			});;
	
	// 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);
	});
	
	/* remove box from links */
	$("a").focus(function(){
		this.blur();
	});
	
});
$(".rollover").mouseover(function () {
      $("div").show("70000");
    });