
//here's the sIfr
var life = {  src: 'avgdemi.swf' };
sIFR.activate(life);

sIFR.replace(life, {
  selector: 'h1', 
  wmode: 'transparent', 
  src: 'avgdemi.swf', 
  css: [ '.sIFR-root {color:#000000;}' ]
});


jQuery(document).ready(function(){
	/*----- Navigation ------*/
	jQuery('#navigation').accordion({
		active: false,
		header: '.menuTitle',
		event: 'mouseover',
		autoheight:false,
		navigation:true,
		showSpeed: 400,
		hideSpeed: 800
	});
	
	// 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);
	});
	
	/* replace media classes */
	jQuery("a.media").media();
	
	/* remove box from links */
	jQuery("a").focus(function(){
		this.blur();
	});
	
});