(function($) {
	$(function() {
		var $sc = $('.small-caps');
		var $scope = $('#hd, #bd, #ft').find('h1, h2, h3, h4, h5, h6, a, label, .pricelist');
		Cufon.replace($scope.find('> span').not($sc).add( $scope.find('em, strong').not($sc) ), { fontFamily: 'Adobe Calson Pro'});
		var smallCapsFactor = 2/3;
		var size, numSize, regs, u, re = /^(\d*(\.\d+)?)\s*([a-z%]+)$/;
		$sc.each(function() {
			size = $(this).css('font-size');
			if (re.test(size)) {
				regs = re.exec(size);
				numSize = parseFloat(regs[1]);
				u = regs[3];
				numSize = Math.round(numSize * smallCapsFactor, 2);
				Cufon.replace($(this), {fontFamily: 'Adobe Calson Pro', fontWeight: 600, textTransform: 'uppercase', fontSize: (numSize + u), letterSpacing: '1px'});
			}
		});
	});
})(jQuery);
