
// list tag actions
var dart_actions = {}
dart_actions["/es-es/shavecare/home"] = "http://ad.es.doubleclick.net/activity;src=2229746;type=gille451;cat=gille657;ord=";
dart_actions["/es-es/shavecare/path"] = "http://ad.es.doubleclick.net/activity;src=2229746;type=gille451;cat=gille629;ord=";
dart_actions["/es-es/shavecare/path/question1"] = "http://ad.es.doubleclick.net/activity;src=2229746;type=gille451;cat=gille400;ord=";
dart_actions["/es-es/shavecare/path/question2"] = "http://ad.es.doubleclick.net/activity;src=2229746;type=gille451;cat=gille637;ord=";
dart_actions["/es-es/shavecare/path/question3"] = "http://ad.es.doubleclick.net/activity;src=2229746;type=gille451;cat=gille946;ord=";
dart_actions["/es-es/shavecare/path/question4"] = "http://ad.es.doubleclick.net/activity;src=2229746;type=gille451;cat=gille192;ord=";
dart_actions["/es-es/shavecare/path/question5"] = "http://ad.es.doubleclick.net/activity;src=2229746;type=gille451;cat=gille821;ord=";
dart_actions["/es-es/shavecare/path/recommended_products"] = "http://ad.es.doubleclick.net/activity;src=2229746;type=gille451;cat=gille292;ord=";
dart_actions["/es-es/shavecare/total_shavecare"] = "http://ad.es.doubleclick.net/activity;src=2229746;type=gille451;cat=gille179;ord=";
dart_actions["/es-es/shavecare/productlineup/prepare"] = "http://ad.es.doubleclick.net/activity;src=2229746;type=gille451;cat=gille142;ord=";
dart_actions["/es-es/shavecare/productlineup/shield"] = "http://ad.es.doubleclick.net/activity;src=2229746;type=gille451;cat=gille647;ord=";
dart_actions["/es-es/shavecare/productlineup/refuel"] = "http://ad.es.doubleclick.net/activity;src=2229746;type=gille451;cat=gille414;ord=";
dart_actions["/es-es/exemple/doubletag"] = [
	"http://ad.es.doubleclick.net/activity;src=2229746;type=gille451;cat=gille414;ord=",
	"http://ad.es.doubleclick.net/activity;src=2229746;type=gille451;cat=gille414;ord="];


// plug in analytics
var console;
var dart_img = [];
var dart_lastId;
if (!pageTracker.$_trackPageview)
{
	pageTracker.$_trackPageview = pageTracker._trackPageview;
	
	pageTracker._trackPageview = function(id, $1, $2, $3) 
	{
		// ignore double calls
		if (id == dart_lastId) return; 
		dart_lastId = id;
		
		// original GA
		pageTracker.$_trackPageview(id, $1, $2, $3);
		
		// id cleanup
		id = id.toLowerCase();
		if (id.charAt(id.length-1) == "/") id = id.substr(0, id.length-1);
		
		// debug
		//if (console) console.info('tag: "' + id + '"');
		
		// call dart
		var dart = dart_actions[id];
		if (!dart) return;
		
		if (dart.pop) // several tags
		{
			for(var i=0; i<dart.length; i++) push_dart(dart[i]);
		}
		else dart_push(dart);
	}
	
	function dart_push(id)
	{
		var img = new Image();
		var a = Math.floor(Math.random() * 10000000);
		img.src = id + a + "?";
		dart_img.push(img);
	}
}