/**
 * @author Andreas Wiberg, Stillfront
 */

// Fonts
Cufon.replace('h1');
Cufon.replace('h2');
Cufon.replace('h3');
Cufon.replace('h4');

 // Rounded corners for IE
(function () {
	var cssBorderRadiusSupported = (function () {
		var docEl = document.documentElement, s;
		if (docEl && (s = docEl.style)) {
			return (typeof s.borderRadius == 'string' ||
				typeof s.MozBorderRadius == 'string' ||
				typeof s.WebkitBorderRadius == 'string' ||
				typeof s.KhtmlBorderRadius == 'string');
		}
		
	 	return false;
	})();
	
	if (!cssBorderRadiusSupported) {
		var brElms = $$('.rounded');
		var imgs = [
			'<img src="/images/transparent.png" width="3" height="3" alt="" class="tl" />',
			'<img src="/images/transparent.png" width="3" height="3" alt="" class="tr" />',
			'<img src="/images/transparent.png" width="3" height="3" alt="" class="bl" />',
			'<img src="/images/transparent.png" width="3" height="3" alt="" class="br" />'
		];
		
		brElms.each(function (el) {
			el.innerHTML = el.innerHTML + imgs.join('');
		});
	}
})();
