var DPCodaSite = {
	
	verticalName: null,
	landingPages: null,
	
	declareLandingPages: function( pages )
	{
		DPCodaSite.landingPages = pages;
	},
	
	isHomePage: function()
	{
		return DPCodaSite.landingPages[ location.pathname ] == 'home';
	},
	
	isLandingPage: function()
	{
		return DPCodaSite.landingPages[ location.pathname ] != undefined;
	},
	
	generateKeyValues: function()
	{
		return "!category=vertical;!category=" + DPCodaSite.verticalName;
	},
	
	generateSections: function()
	{
		requestUri = location.pathname;
		
		if ( DPCodaSite.isHomePage() )
		{
			reportingUri = "_hp";
		}
		else if ( DPCodaSite.isLandingPage() )
		{
			reportingUri = DPCodaSite.landingPages[ requestUri ] + "/" + "_mn";
		}
		else
		{
			reportingUri = requestUri.substring(1);
		}
		
		return DPCodaSite.verticalName +'/'+ reportingUri;
	},

	generateZoneOverride: function()
	{
		return 'atf_j_s/'+ DPCodaSite.generateSections();
	}
	
}


// ### BEGIN UPDATABLE VALUES ###############################################

DPCodaSite.verticalName = 'mtvcasting';

// declare landing pages
DPCodaSite.declareLandingPages({
	"/"                                                                     : "home",
	"/browse/new_videos"                                                    : "videos",
	"/browse/voters"                                                        : "voters",
	"/browse/recently_updated"                                              : "recentlyupdated",
	"/browse/tags"                                                          : "tags",
	"/browse/hometowns"                                                     : "hometowns",
	"/browse/star_sign"                                                     : "starsign",
	"/pages/site_blog"                                                      : "blog",
	"/shows/nivea-good-bye-cellulite-hello-bikini-challenge"                : "nivea",
	"/shows/nivea-good-bye-cellulite-hello-bikini-challenge/experts"        : "niveaexperts",
	"/shows/nivea-good-bye-cellulite-hello-bikini-challenge/weekly-lessons" : "nivealessons"
});

// ### END UPDATABLE VALUES #################################################


com.mtvi.ads.AdManager.setDefaultContentType("adj");
com.mtvi.ads.AdManager.setDartSite("mtv.vt");
com.mtvi.ads.AdManager.setKeyValues( DPCodaSite.generateKeyValues() );
com.mtvi.ads.AdManager.setPositionThreshold(2);

com.mtvi.ads.AdManager.setDefaultSections( DPCodaSite.generateSections() );
