// JavaScript Document
$(function() {
	var body_ad = $("body");
	var ad_url = $(".fullpage_takeover").attr("rel");

	if(body_ad && ad_url) 
	{
		body_ad.click(function(e){
			//alert(e.target.id);
			
			var targ;
			if (!e) var e = window.event;
			if (e.target) targ = e.target;
			else if (e.srcElement) targ = e.srcElement;
			if (targ.nodeType == 3) // defeat Safari bug
			{
				targ = targ.parentNode;
			}
			if( targ.id == "home" ) 
			{
				document.location = ad_url;
				return false;
			}
			else if( targ == document.body ) 
			{
				var newWindow = window.open(ad_url, '_blank');
				newWindow.focus();
				return false;
			}
			else {
				return true;
			}


		
		});
	}
	
	
});
