/**** dnn conflict resolution
for this file to work
jQuery.noConflict(); must be called at some point before this file is called
*/

//here's the sIfr
var trajan = {  src: DNN_skinPath+'trajan.swf' };
sIFR.activate(trajan);

sIFR.replace(trajan, {
  selector: '.menuTitle', 
  wmode: 'transparent', 
  src: DNN_skinPath+'trajan.swf', 
  css: [
		'.sIFR-root {text-transform:uppercase; text-decoration:none; cursor:pointer;}',
		'a:link {color:#e9e7cc; text-decoration:none;}',
		'a:hover {color:#e9e7cc; text-decoration:none;}',
		'a:active {color:#e9e7cc; text-decoration:none;}',
		'a:visited {color:#e9e7cc; text-decoration:none;}',
		'.current {color:#e9e7cc; text-decoration:none;}'//crazy dnn class
		]
});

var bickhamScriptMM = {  src: DNN_skinPath+'bickhamScriptMM.swf' };
sIFR.activate(bickhamScriptMM);

sIFR.replace(bickhamScriptMM, {
  selector: '.content h1', 
  wmode: 'transparent', 
  src: DNN_skinPath+'bickhamScriptMM.swf', 
  css: ['.sIFR-root {color:#465028; text-indent:10px;}']
});

jQuery(document).ready(function(){
	/*----- Navigation ------*/
	jQuery('#navigation').accordion({
		active: false,
		header: '.menuTitle',
		event: 'click',
		autoheight:false,
		navigation:true,
		showSpeed: 1200,
		hideSpeed: 1400
	});
	/* THIS REMOVE THE LINE FROM THE EMPTY <UL> ELEMENTS (NOTE: be sure there is NO space between the <ul></ul> elements) */
	jQuery("#navigation li ul:empty").remove();
	
	// Preload all rollovers
	jQuery(".rolloverJPG").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(".rolloverJPG").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);
	});
	
	/* replace media classes */
	jQuery("a.media").media();

	/* remove box from links */
	jQuery("a").focus(function(){
		this.blur();
	});
	
});// JavaScript Document
