// JavaScript Document
$(window).ready(function() { 
	var userAgent = navigator.userAgent;
	/*Firefox 2.0 is dead!  Mozilla killed it, and ended all support for it. 
	For those still using it, it has parsing errors with "unidentified" tags such as the HTML5 tags, this is for replacing them.
	Modernizr handles the problems with IE and HTML5 tags already
	*/
	if (/Firefox[\/\s](\d+\.\d+)/.test(userAgent)){ //test for Firefox/x.x or Firefox x.x (ignoring remaining digits);
		var ffversion=new Number(RegExp.$1); // capture x.x portion and store as a number		
		if (ffversion<3){
			$('nav, aside, section, article, header, footer').each(function(){
				$(this).replaceWith('<div id=' + $(this).attr('id') + '>' + $(this).html() + '</div>');
			});
		}
	}
});
