_satellite.pushAsyncScript(function(event, target, $variables){
  //taboola global tab

function tabPageView(eventID){

	window._tfa = window._tfa || [];

	window._tfa.push({notify: 'event', name: 'page_view', id: eventID});

	!function (t, f, a, x) {

		if (!document.getElementById(x)) {

			t.async = 1;t.src = a;t.id=x;f.parentNode.insertBefore(t, f);

		}

	}(document.createElement('script'),

	document.getElementsByTagName('script')[0],

	'//cdn.taboola.com/libtrc/unip/'+eventID+'/tfa.js',

	'tb_tfa_script');
	
}

tabPageView(1110770);

if(new RegExp("\/lifestyle\/elite-dating\/").test(window.location.href) || new RegExp("\/education\/finito-career-development\/").test(window.location.href))
{

	function buildTbPix(eventID, action){
		if(action == "complete_registration")
		{
			_tfa.push({notify: 'event', name: 'complete_registration', id: eventID});
		}
		
		var img = document.createElement('img');
		img.src = '//trc.taboola.com/'+eventID+'/log/3/unip?en='+action;
		img.width = '0';
		img.height = '0';
		img.style.display = 'none';
		document.getElementsByTagName('body')[0].appendChild(img);
	}

	function mkEventBuilder(eventID){

		document.querySelector('.sponsor-slot__logo a, #learnMore').addEventListener('mousedown', function(e){
			buildTbPix(eventID, "complete_registration");
		})

		document.querySelector('#learnMore').addEventListener('mousedown', function(e){
			buildTbPix(eventID, "complete_registration");
		})
	}

	if(new RegExp("\/lifestyle\/elite-dating\/").test(window.location.href))
	{
		eventID = "1156246";
	}
	else if(new RegExp("\/education\/finito-career-development\/").test(window.location.href))
	{
		eventID = "1156293";
	}
	
	tabPageView(eventID);
	buildTbPix(eventID, "page_view")

	//form submit
	mkEventBuilder(eventID);
}
});
