X.createSingleton('X.Omniture',
// Constructor
	function() { },
// Prototype Members
	{
	// Trigger's omniture's page load
	// fix me dammit

	triggerOmnitureTrack: function(props) {
	    return (this.update(props)) ? window.s.t() : '';
	},

	triggerOmnitureTrackLink: function(obj, props, type, filename) {
	    if (!props.linkName || props.linkName === '#') {
	        props.linkName = location.href;
	    }

	    if (typeof (type) == "undefined" || type == '') {
	        type = 'o';
	    }

	    var omnitureLinkName;
	    if (typeof (filename) == "undefined" || filename == '') {
	        omnitureLinkName = props.linkName;
	    }
	    else {
	        omnitureLinkName = filename;
	    }

	    return (this.update(props)) ? window.s.tl(obj || true, type, omnitureLinkName) : '';
	},

	// Called via the triggerOmnitureTrack and triggerOmnitureTrackLink methods,
	// as well as in page after the X.Omniture.register() method
	update: function(props) {
	    if (!props) {
	        return false;
	    }

	    // Uppercase the values
	    for (var prop in props) {
	        if (typeof (props[prop]) !== 'string') {
	            continue;
	        }	       
	        window.s[prop] = props[prop].toUpperCase();
	    }
	    return true;
	}
});

//trigger: function (props, obj, type, extendDefaults)
//{
//	if (!props.linkName || props.linkName === '#')
//	{
//		props.linkName = location.href;
//	}

//	if (type == 'e' || type == 'd')
//	{
//		extendDefaults = false;
//		if (props.data && this.lastPageName) props.data['pageName'] = this.lastPageName;
//	}

//	if (this.update(props, extendDefaults))
//	{
//		var o = this._getObject();

//		$.console.log('X.Omniture.trigger() - begin call');
//		switch (type)
//		{
//			case 'e':
//				if (obj)
//				{
//					o.tl(obj, type, props.data.prop25);
//				}
//				else if (props.data.url) // for flash which doesn't have an obj
//				{
//					o.tl(true, type, props.data.url.toLowerCase());
//				}
//				break;

//			case 'd':
//				o.tl(obj || true, type, props.data.fileName);
//				break;

//			default:
//				o.tl(obj || true, 'o', props.data.prop16 || props.linkName);
//				break;
//		}

//		$.console.log('X.Omniture.trigger() - end call');
//	}
//},

