//activates the sIFR3
var pageHeader = {src: DNN_skinPath+'futura.swf'};
sIFR.activate(pageHeader);

sIFR.replace(pageHeader, {
  selector:'h1', 
  wmode:'transparent', 
  src: DNN_skinPath+'futura.swf', 
  css:['.sIFR-root {color:#ffffff;}' ]
});


// Get the full path to the siteSkin folder
var VirtualPath = location.href.substring(0,location.href.lastIndexOf(".com")+4 )
var DNN_skinPath = "Portals/_default/Skins/siteSkin/index.html"
var FilePath = VirtualPath + DNN_skinPath
//alert(FilePath)



//Start jQuery Functions
jQuery(document).ready(function(){
										  
	jQuery("#nav>ul")
	.superfish({
		hoverClass	: "sfHover",
		pathClass	: "overideThisToUse",
		delay		: 500,
		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("#nav>ul>li:has(ul)") //fixes ie6 bug
		.mouseover(function(){jQuery("ul", this).bgIframe({opacity:true});})
		.find("a").focus(function(){jQuery("ul", jQuery("#nav>ul>li:has(ul)")).bgIframe({opacity:true});});
	
	// remove last navDivider img
	jQuery("#nav>ul>li>a:last").css("border","none");
	
	/*/ center a horizontal menu /*/
	jQuery(function(){
		var pageWidth = jQuery("div#shell").width();
		var navWidth =  jQuery("div#nav").outerWidth();
		var navWidth2 =  navWidth - 20;
		var menuWidth = navWidth + 20;
		var centerMargin = (pageWidth - menuWidth)/2;
		jQuery("div#menu").css({width:menuWidth, left:centerMargin});
		jQuery("div#nav").css("width",navWidth2);
		jQuery("div#nav>ul").css("width",navWidth2);
	});

	// Add Titles to All Links
	jQuery("a").each(function() {
		var title = jQuery(this).text();
		jQuery(this).attr("title", title);
	});
	
	// Remove Box from Links
	jQuery("a").focus(function(){this.blur();});
	
	// Add class to Submit Button
	jQuery("a.CommandButton:contains('Submit')").removeClass("CommandButton").addClass("submitButton");

	// Applet
	jQuery("#nav>ul>li:has(ul)");
	
	
	// Adjust iFrame Height
	//var theFrame = jQuery('#iSurvey', parent.document.body);
	//theFrame.height(jQuery(document.body).height() + 30);

});

function getFrameHeight(){
	var height = document.documentElement.clientHeight;
	height -= document.getElementById('iFrame').offsetTop;
	
	// not sure how to get this dynamically
	height -= 20; /* whatever you set your body bottom margin/padding to be */
	document.getElementById('iFrame').style.height = height +"px";
}


/*
function mouseOver() {
	var shimmer = document.createElement('iframe');
	shimmer.id='shimmer';
	shimmer.style.position='absolute';
	shimmer.style.width='320px';
	shimmer.style.height='240px';
	shimmer.style.top='0px';
	shimmer.style.left='0px';
	shimmer.style.zIndex='999';
	shimmer.style.background='#00ff00';
	//shimmer.setAttribute('allowtransparency','true');
	shimmer.setAttribute('frameborder','0');
	shimmer.setAttribute('src','javascript:false;');
	document.body.appendChild(shimmer);
	// make sub div visible
//	var sd = document.getElementById('subdiv');
//	sd.style.visibility='visible';
}
function mouseOut() {
//	var sd = document.getElementById('subdiv');
//	sd.style.visibility='hidden';
	var shimmer = document.getElementById('shimmer');
	document.body.removeChild(shimmer);
}
*/