/**
 * Tracking.js
 * @fileOverview This file has some of the main functions used on the BT Tradespace project.
 * @version 0.1
 * @author LBi - http://www.lbi.com/en
 * @requires jQuery Core 1.3.2 - http://www.jquery.com/
 */

/*jslint eqeqeq: true, undef: true */
/*global $, jQuery, BTT, window, document, swfobject, confirm, prompt  */




/**
 * Object that stores tracking functions
 * @namespace Object that stores tracking functions
 * @member BTT
 */
BTT.Tracking = {
	
   /**
	* Tracking function that sends settings object to tracking URL after page is loaded
	* Expects an object 'BTT.Tracking.settings' to be written into page by backend. 
	*/
   track: function() {
		   
	   var url = (BTT.ctx ? BTT.ctx : '/ts') + "/utilities/ajax/track",
		   data = BTT.Tracking.settings || "undefined";
	   
	   if (data !== "undefined") {
		   $.get( url, data );
	   }
   }
	
	
};
		



/* Execute once page is fully loaded
-------------------------------- */
$(window).load(function () {
	BTT.Tracking.track();
});
