jQuery.noConflict();

function mainmenu(){
jQuery("#nav-one ul").css({display: "none"}); // Opera Fix

jQuery("#nav-one li").hover(function(){//rollover
	jQuery(this).find('ul:first').css({visibility: "visible",display: "none"}).fadeIn(400);
  	jQuery(this).addClass('activeHover');
  	}, function(){//rollout
  	jQuery(this).find('ul:first').fadeOut(200);
   	jQuery(this).removeClass('activeHover');
  });
  
  //add in Top & bottom extra LIs for style
 jQuery("#nav-one UL LI:first-child").before("<li class='navcap'>&nbsp; </li>");
 jQuery("#nav-one UL LI:last-child").after("<li class='navbot'>&nbsp; </li>"); 
 
}


jQuery(document).ready(function(){

	mainmenu();
	
	//add pretty curved top and bottom
	//jQuery("#sidebarHolder").prepend("<div id='sidebarTop'></div>");
	//jQuery("#sidebarHolder").append("<div id='sidebarBottom'>&nbsp;</div>")
	
	//isolate offsite links and make blank
	jQuery("a[href*='http://']:not([href*='"+location.hostname+"'])").attr("target","_blank");
	
	
	//attachment links
	jQuery('#maincontent a[href$=".pdf"]').each(function(){
    		jQuery(this).wrap("<span class='pdf'></span>");
			jQuery(this).attr("target","_blank");
		}); 
		
	jQuery('#maincontent a[href$=".doc"]').each(function(){
    		jQuery(this).wrap("<span class='doc'></span>");
			jQuery(this).attr("target","_blank");
		}); 
		
	jQuery('#maincontent a[href$=".ppt"]').each(function(){
    		jQuery(this).wrap("<span class='ppt'></span>");
			jQuery(this).attr("target","_blank");
		}); 
		
	jQuery('#maincontent a[href$=".xls"]').each(function(){
    		jQuery(this).wrap("<span class='xls'></span>");
			jQuery(this).attr("target","_blank");
		}); 	
	
	
	//clear the search box
	jQuery("#s").focus(function(){jQuery(this).val("")});
	
});

jQuery.fn.hoverClass = function(c) {
	return this.each(function(){
		jQuery(this).hover( 
			function() { jQuery(this).addClass(c); },
			function() { jQuery(this).removeClass(c);}
		);
	});
};	



