jQuery(document).ready(function(){
	/*----- Navigation ------*/
	jQuery('#navigation ul').superfish({
		hoverClass	: "hover",
		pathClass	: "overideThisToUse",
		delay		: 1600,
		animation	: {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(){
			jQuery("ul", this).bgIframe({opacity:true});
		})
		.find("a")
			.focus(function(){
				jQuery("ul", jQuery("#mainmenu ul>li:has(ul)")).bgIframe({opacity:true});
			});
			
			

	
	// Preload all rollovers
	jQuery(".rollover").each(function() {
		// Set the original src
		rollsrc = jQuery(this).attr("src");
		rollON = rollsrc.replace(/.jpg$/ig,"_on.jpg");
		jQuery("<img>").attr("src", rollON);
	});
	
	// Navigation rollovers
	jQuery(".rollover").mouseover(function(){
		imgsrc = jQuery(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
			jQuery(this).attr("src", imgsrcON);
		}
	}).mouseout(function(){
		jQuery(this).attr("src", imgsrc);
	});
	
	/* THIS REMOVE THE LINE FROM THE EMPTY <UL> ELEMENTS (NOTE: be sure there is NO space between the <ul></ul> elements) */
	jQuery("#mainmenu li ul:empty").remove();
	
	
	/* remove box from links */
	jQuery("a").focus(function(){
		this.blur();
	});
	
		/*pushes over sIFR*/
	jQuery("h1 .Head").prepend("&nbsp;");
	
});


var edwardian = {  src: DNN_skinPath+'edwardian.swf' };
sIFR.activate(edwardian);
sIFR.replace(edwardian, {
  selector: 'h1', 
  wmode: 'transparent',
  src: DNN_skinPath+'edwardian.swf',
  css: [
      '.sIFR-root {color:#79271b; text-align:left; font-style:normal; }'
    ]
});


