// google.js determines what site we are currently on, sets the correct
// google analytics _uacct variable, and calls the google analytics tracking
// code. The google analytics tracking source file must be included into the 
// containing document BEFORE google.js is included. For example:
//   <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
//   <script src="google.js" type="text/javascript"></script>

// Default the google account variable to an empty string and set the session
// timeout to 1 hour
_uacct    = '';
_utimeout = '3600';

// Set the following variables to track customers across multiple domains
_ulink = 1;
_uhash = 'off';

// Hash to hold the site code to google account translations
var g_siteAccounts = new Array();
g_siteAccounts['KX'] = 'UA-1501063-1';
g_siteAccounts['LP'] = 'UA-1501063-2';
g_siteAccounts['AM'] = 'UA-1501063-3';
g_siteAccounts['AP'] = 'UA-1501063-4';
g_siteAccounts['CM'] = 'UA-1501063-5';
g_siteAccounts['EF'] = 'UA-1501063-6';
g_siteAccounts['FH'] = 'UA-1501063-7';
g_siteAccounts['DS'] = 'UA-1501063-8';
g_siteAccounts['SM'] = 'UA-1501063-9';
g_siteAccounts['SV'] = 'UA-1501063-10';
g_siteAccounts['TS'] = 'UA-1501063-11';
g_siteAccounts['X5'] = 'UA-1501063-12';
g_siteAccounts['XT'] = 'UA-1501063-13';
g_siteAccounts['4U'] = 'UA-1501063-14';

// Hash to hold the domain to google account translations
var g_domAccounts = new Array();
g_domAccounts['karasxxx']           = 'UA-1501063-1';
g_domAccounts['lesbianpink']        = 'UA-1501063-2';
g_domAccounts['absolutelymale']     = 'UA-1501063-3';
g_domAccounts['asianpleasures']     = 'UA-1501063-4';
g_domAccounts['classicmature']      = 'UA-1501063-5';
g_domAccounts['ebonyfantasy']       = 'UA-1501063-6';
g_domAccounts['fetishhotel']        = 'UA-1501063-7';
g_domAccounts['porndvdshack']       = 'UA-1501063-8';
g_domAccounts['sexmovievault']      = 'UA-1501063-9';
g_domAccounts['smutvideos']         = 'UA-1501063-10';
g_domAccounts['teensteam']          = 'UA-1501063-11';
g_domAccounts['xratedhardcoreporn'] = 'UA-1501063-12';
g_domAccounts['xxxporntheater']     = 'UA-1501063-13';
g_domAccounts['xxxvideos4u']        = 'UA-1501063-14';

// If we are NOT on the lvent3.com domain, use the "hostname" property of the
// current "location" object to determine the correct google account
var g_location = window.location.hostname.toLowerCase();
if ( g_location.indexOf('lvent3') < 0 ) {
	
	// Grab just the domain name without any prefix or suffix and account for
	// URLs like www.domain.com or domain.com
	g_location = g_location.split('.');
	if ( g_location.length > 2 ) {
		_uacct = g_domAccounts[g_location[1]];
		_udn   = g_location[1] + '.' + g_location[2];
	}
	else {
		_uacct = g_domAccounts[g_location[0]];
		_udn   = g_location[0] + '.' + g_location[1];
	}
}
// If we ARE on the lvent3.com domain, grab the two letter site code from the
// "site" property of the "signup" form object
else {
	_uacct = g_siteAccounts[document.signup.site.value];
	
	// Set the correct _udn variable for lvent3.com
	_udn = 'lvent3.com';
}

// Now call the google analytics tracking code
if ( _uacct && _uacct.length > 0 ) {
	urchinTracker();
}


