//-- Google Analytics Urchin Module
//-- Copyright 2005 Google, All Rights Reserved.

//******************************
// Epipeline(EPL) Google Analytics Tracking Code
//******************************

var _gaq = _gaq || []; 

function _mdfga() {

	try { 
		/* Set the account passed in, this will be different per environment */
		/* These codes (for EPL) should be 'UA-6552590-1' in prod, 'UA-6552590-2' other environments */
		
		var wDomainName = window.location.hostname.toLowerCase(); 
		var wQueryString = document.location.search.toUpperCase();
		
		var wTrackingAccount = 'UA-6552590-2'; /* Initialize to non-prod as the default */
		/* Check if we are in prod */
		if (wDomainName == "www.epipeline.com" || wDomainName == "epipeline.com") {
			wTrackingAccount = 'UA-6552590-1';
		}
	
		/* Set the correct Google Analytics Account */
		_gaq.push([ '_setAccount', wTrackingAccount ] ); 

		/* Use override path if specified */
		_gaq.push([ '_trackPageview' ]); 

		(function() { 
		var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; 
		ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; 
		var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); 
		})(); 
	} catch( e ) {
		/* Ignore exceptions */
	}
}

function _trackEventGA( pCategory, pAction, pLabel, pValue ) {
	try {
	    _gaq.push(['_trackEvent',pCategory, pAction, pLabel, pValue]);
	} catch (err) { }
} 

function _setCustomVarGA( pIndex, pName, pValue, pScope ) { 
	try { 
	    _gaq.push(['_setCustomVar', pIndex, pName, pValue, pScope]);
	} catch (err) { } 
} 
