$(function () {
	// IE hacks
	if ($.browser.msie) {
		// IE6 hacks
		 if ($.browser.version == '6.0') {
			 // PNG Fixer-upper
			var imagesToTransform		= $('img[src$=".png"]')
											.not('.CM_pngFix')
											.addClass('CM_pngFix');							
			/*
			var totalTransformations    = imagesToTransform.length;
			var backgroundsToTransform	= $('div, ul, p, a, span')
											.not('.CM_pngFix')
											.each(function (i) {
												var element = $(this);
												if (element.css('background-image').match('\.png')) {
													element.addClass('CM_pngFix');
													totalTransformations++;
												}
											});
			var whileLoopInfiniteRecursionStopper = 0;
			while ($('.CM_pngFix').length <= totalTransformations) {
				whileLoopInfiniteRecursionStopper++;
				if (whileLoopInfiniteRecursionStopper > 5000) {
					break;
				}
			}
			*/
			DD_belatedPNG.fix('.CM_pngFix');
			// Navigation Fixer-upper
			var primaryNav = $('#header ul.navigation');
			$('> li:first-child', primaryNav).addClass('first-child');
			$('li', primaryNav).hover(
				function () {$(this).addClass('hover');},
				function () {$(this).removeClass('hover');}
			);
		}
	}
	// Safari
	if ($.browser.safari && (!navigator.userAgent.match('Chrome'))) {$('body').addClass('safari');}
	// Firefox (Mac)
	if ($.browser.mozilla && (navigator.userAgent.match('Macintosh'))) {$('body').addClass('firefoxmac');}
});