var ads = {
	sponsorWrite: function(cssPath,urlPath) {
		document.write('<link href="' + cssPath + '" rel="stylesheet" type="text/css" />');
		if(!!urlPath){
			ads.clickableSkin(urlPath);
		}
	},
	sponsorJSAdditions: function(jsPath) {
		$('<sc' + 'ript src="' + jsPath + '" type="text/javasc' + 'ript"></sc' + 'ript>').appendTo('head');
	},
	clickableSkin: function(urlPath) {
		if ($("#outer-wrap").length <= 0) {
			window.setTimeout(function() {
				ads.clickableSkin(urlPath);
			}, 300);
		} else {
			$("#wrapper").add("#footer").css('cursor','default').click(function(event){
				event.stopPropagation(); //cancels propogation of the click event
			});
			$("#outer-wrap").css('cursor','pointer').click(function(){
				if ($(this).parent().get(0).tagName.toLowerCase() == 'body') {
					var newWindow = window.open(urlPath, '_blank');
					newWindow.focus();
					return false;
				}
			});
		}
	},
	writeVideoSkin: function(swfPath,height) {
		var videoCode = '<object width="100" height="'+height+'"> <param value="'+swfPath+'" name="video_ad" /><param name="mode" value="transparent"/><embed width="1000" height="'+height+'" wmode="transparent" type="application/x-shockwave-flash" src="'+swfPath+'"/></object>'; 
		$('#ad_bar').html(videoCode);
	}
}
