/**
 * Fixes a number of IE6 issues (transparency).
 * Also executes a check for trident4 (ie6 engine) and redirects
 * the user to a warning page.
 */
window.addEvent('domready', function(){
		
	if(Browser.Engine.trident4)
	{
		// Load the IE6 javascript
		var ie6JS = Asset.javascript('http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE8.js');
		
		// Lots of calls to fix. All pages.
		DD_belatedPNG.fix('#wrapper');
		DD_belatedPNG.fix('#logo');
		DD_belatedPNG.fix('ul#navigation li');
		DD_belatedPNG.fix('#content');
		DD_belatedPNG.fix('h1.replace, h2.replace, h3.replace, h4.replace, h5.replace, h6.replace');
		DD_belatedPNG.fix('div#footer');
		DD_belatedPNG.fix('a#footer-logo');
			
			// Home
			DD_belatedPNG.fix('#case-studies-wrapper');
			DD_belatedPNG.fix('div.home-copy-block h2');
			if($('case-studies-wrapper')) $('case-studies-wrapper').setStyle('padding-bottom', '20px');
			
		// Remove all HRs
		$$('hr').each(function(item, index){
			item.setStyles({
				height: '2px',
				background: 'transparent',
				border: '1px solid #7e5d3a'
			});
		});
		
		
		// Cookie check for IE6 warning page
		/*
		var ie6Checked = Cookie.read('ie6Check');
		
		if(ie6Checked != true)
		{
			var url = window.location; 

			if(ie6Checked != 'checking')
			{
				Cookie.write('ie6Check', 'checking', { domain: 'dev.stasismedia.com', path: '/', duration: 1 });
				window.location = ieWarningUrl;
			}
			else if(String(url).indexOf('ieWarning') == -1)
			{
				window.location = ieWarningUrl;	
			}
		}
		*/
		
	}

});
