jQuery(document).ready(function() {
	// Centering the main navigation. Not done in css due to IE7 problems 
	theNavWidth = (980 - jQuery('.sf-menu').width() ) / 2 ;
	jQuery('.sf-menu').css('marginLeft', theNavWidth); 
	
	
	//Remove the title atribute for the menu. It just get's in the way.
	jQuery("li.cat-item a").each(function(){
		jQuery(this).removeAttr('title');
	})                

	jQuery("li.page_item a").each(function(){
		jQuery(this).removeAttr('title');
	})	
	
	
	//Change the date from the RSS
	jQuery('.fbg-date').each(function(){
		rss_date = jQuery(this).text();
		//alert(rss_date);
		d1 = Date.parse(rss_date);
		if (d1 != null) { 
			jQuery(this).text(d1.toString('MMMM dd, yyyy')); 
		}
	})
	
	
	/* add extra divs to submenu 
	
	jQuery('.sf-menu > li  > ul ').prepend('<div class="submenu-top"></div><div class="mason-wrapper"></div>');
	
	jQuery('.sf-menu > li  > ul ').append('<div class="submenu-bottom"></div>');	
	
	jQuery('.sf-menu > li  > ul > li').addClass('masonry');
	jQuery('#menu-item-168 .masonry').each(function(){
		jQuery('#menu-item-168 .mason-wrapper').append(this);
	});
	jQuery('#menu-item-162 .masonry').each(function(){
		jQuery('#menu-item-162 .mason-wrapper').append(this);
	});
	jQuery('#menu-item-140 .masonry').each(function(){
		jQuery('#menu-item-140 .mason-wrapper').append(this);
	});
	jQuery('#menu-item-132 .masonry').each(function(){
		jQuery('#menu-item-132 .mason-wrapper').append(this);
	});
	
	jQuery('#menu-item-377 .masonry').each(function(){
		jQuery('#menu-item-377 .mason-wrapper').append(this);
	});
	jQuery('.mason-wrapper').masonry({
		columnWidth: 325, 
		itemSelector: '.masonry' 
	});*/
	
	jQuery('#menu-revised-quick-links .spacer a, #menu-item-227>a').each(function(){
		if (jQuery(this).attr('href') == '#') jQuery(this).attr('href', 'javascript:none').css({cursor:'default', color: '#666666'});
	});
	
	
});
