/**
* corefunctions - jQuery
*/

$(document).ready(function(){
	$('a, area').each(function() {
		if ($(this).attr('rel') == 'external' || this.tagName.match(/area/i)) {
			$(this).attr('target', '_blank');
		}
		// trackOutboundClick - promotion
		if ($(this).hasClass('promotion')) {
			$(this).removeClass('promotion');
			var aID = $(this).attr('class');
			$(this).bind('click', function () {
				sCode.trackOutboundClick(this.href, aID);
			});
		}
		// trackFeaturedContentClick - featured
		if ($(this).hasClass('featured')) {
			$(this).removeClass('featured');
			var aID = $(this).attr('class');
			$(this).bind('click', function () {
				sCode.trackFeaturedContentClick(this.href, aID);
			});
		}
		// trackOutboundClickToBuy - order
		if ($(this).hasClass('order')) {
			$(this).removeClass('order');
			var aID = $(this).attr('class');
			$(this).bind('click', function () {
				sCode.trackOutboundClickToBuy(this.href, aID);
			});
		}
	});
});

if(typeof(Cufon) != 'undefined') {
	Cufon.replace('#inner-content-intro h1');
	Cufon.replace('#prizes h2');
	Cufon.replace('#prizes h3');
	Cufon.replace('#prizes p');
	Cufon.replace('#rules p');
	Cufon.replace('#rules li');
}