//Intended to centralize global tracking events

//global tracking for left nav
AX.trackLeftNav = function() {


}; 
//end: trackLeftNav

/*ad tracking */
AX.trackAds = function() {
	//section identification
	var topicName = parseTitle('topic');
		
	var vanity_page = location.pathname;
	vanity_page = vanity_page.split('/');
	
	exclusionVar = "";
	
	switch(topicName) {
		case 'overview':
			topicName = 'OF_Homepage';
			break;
		case 'ideahub':
			topicName = 'OF_Ideahub';
			break;
		case 'innovation':
			topicName = 'OF_Innovation';
			break;
		case 'lifestyle':
			topicName = 'OF_Lifestyle';
			exclusionVar = "ad4=exclude;";
			break;
		case 'managing':
			topicName = 'OF_Managing';
			break;
		case 'marketing':
			topicName = 'OF_Marketing';
			break;
		case 'money':
			topicName = 'OF_Money';
			break;
		case 'technology':
			topicName = 'OF_Technology';
			break;
		case 'theworld':
			topicName = 'OF_World';
			exclusionVar = "ad4=exclude;";
			break;
		case 'booming':
			topicName = 'OF_Memberspotlight';
			exclusionVar = "ad5=exclude;";
			break;
		default:
			topicName = 'Default';
			break;
	}
	
	switch (vanity_page[1]) {
		case 'acceptpay':
			topicName = "OF_Acceptpay";
			exclusionVar = "ad1=exclude;";
			break;
		case 'booming':
		case 'whatsbooming':
			topicName = "OF_Booming";
			exclusionVar = "ad6=exclude;";
			break;
        case 'CES2010':
        case 'CES2011':
            topicName = "OF_CES";
            break;
        case 'governmentcontracting':
            topicName = "OF_Govcontract";
            break;
        case 'insuranceedge':
			topicName = "OF_Insuranceedge";
			exclusionVar = "ad2=exclude;";
			break;
        case 'projectrebrand':
            topicName = "OF_Projectreband";
            break;
        case 'yourbusinesstv':
            topicName = "OF_MSNBC";
            break;
        case 'msnbc':
            topicName = "OF_MSNBC";
            break;
        case 'searchmanager':
			topicName = "OF_Searchmanager";
			exclusionVar = "ad3=exclude;";
			break;
        case 'women':
            topicName = "OF_Womensbusiness";
            break;
        //'special-featured' and 'special_feature' url catch 
        case 'special-feature':
        case 'special_feature':
            switch (vanity_page[2]) {
                case 'openbook':
                    topicName = "OF_Books";
                    break;
                case 'leadership':
                    topicName = "OF_Leadership";
                    break;
                case 'financialmanagement.aspx':
                    topicName = "OF_Finman";
                    break;
                case 'insights':
                    topicName = "OF_Insightguide";
                    break;
                case 'sema':
                    topicName = "OF_SEMA"; ;
                    break;
                case 'socialmedia':
                    topicName = "OF_Socialmedia";
                    break;
                case 'women':
                    topicName = "OF_Womensbusiness";
                    break;
            }
            break;
        default:
            break;
    }
}

$(document).ready(function() {
	AX.trackLeftNav();
	AX.trackAds();
});
