$(document).ready(function(){
	/*----- Navigation ------*/
	$('#mainmenu').accordion({
		active: false,
		header: '.menuTitle',
		event: 'click',
		autoheight:false,
		navigation:true,
		showSpeed: 1200,
		hideSpeed: 1400
	});
		
	// 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);
	});
	
		//ie6 fix for png image map
	if($.browser.msie && $.browser.version < 7){
		$("#callout > img").attr("src","images/pageElements/callout.gif");	
	}
	
	
	/* replace media classes */
	$("a.media").media();
	
	/* remove box from links */
	$("a").focus(function(){
		this.blur();
	});

});





	

