/* 
	Balloon links Tracker v0.1
	Author: Guillaume Potier
	Action: Track your desired links in a web page on GAnalytics
	Usage: add these tags in ALL a href you want to track as Events in Google Analytics
	class="toTrack" 	//Required
	cat="Your Category"	//Required
	act="Your Action"	//Required
	lab="Your Label"	//Optional
*/
$(function(){var dateChargementPage=new Date();var timestampDateChargementPage=Math.floor(dateChargementPage.getTime()/1000);$("a").each(function(e){var field=$(this);var categorie=new String();var action=new String();var label=new String();if(field.hasClass("toTrack")){field.click(function(e){categorie=field.attr('cat');action=field.attr('act');label=field.attr('lab');if(label==undefined)label='NULL';var dateClickLink=new Date();var tempsBeforeClick=Math.floor(dateClickLink.getTime()/1000)-timestampDateChargementPage;if((categorie!=undefined&&categorie.length>0)&&(action!=undefined&&action.length>0))_gaq.push(['_trackEvent',categorie,action,label,tempsBeforeClick]);});}});});
