/**
  *	Common Javascript Functions
	*	Author: TJ Kelly
	*/
$(window).load(function(){

	// Include Enriched CSS
	$('<link rel="stylesheet" type="text/css" href="/wp/wp-content/themes/mps/css/enriched.css"/>').appendTo('head');
	
	// Rel External for new window
	var $a=$('a[rel*="external"]');
	$a.attr('target','_blank');
	
	// Lightbox
	var lightbox=$('a[rel*="lightbox"],a.lightbox');
	lightbox.lightbox();
	
	// Footer comment menu
	var footer_hover=$('div.footer_hover li');
	footer_hover.live('mouseover',function(){
		$(this).addClass('footer_li_hover');
	}).live('mouseout',function(){
		$(this).removeClass('footer_li_hover');
	});
	
	// Footer comment menu
	var footer_comments=$('#footer_comments li');
	footer_comments.click(function(){
		var url=$(this).children('a').attr('href');
		document.location.href=(url);
	});
	
});
