/**
 * @author faraujo
 */

var collegiateNationals  = {
	
	loadModules : function(){
		BillBoard.activate();		
	},
	
	/* Template System - this js modifies the body tag allow for a more complete control over 
	 * different layout using similiar naming conventions ie. sidebar, main, right. 
	 * Also allows for complete site restructure using css only */
	loadTemplate : function(page_id){
		document.getElementsByTagName("BODY")[0].className = page_id;
	}
}

var BillBoard = {
	
	activate : function(target){
		cstv.modules.load("cstv.modules.leadstory.billboard3","ls1","fnbillboard", site + "/modules/mod_lead.php?sport=" + sport);
		//	cstv.modules.load("cstv.modules.leadstory.billboard2","ls1","fnbillboard","http://www.cstv.com/library/ls_xml/ls_hp.xml");	
		//	fnhl.click(cstv.$id('topstories'))
	
		ls1.events.add
		(	// this is to keep autoPlay hidden, without switching back to headlines panel
			"onchange"
			,new Function("e","fnhl.autoclick(e.n);")
		);	
		ls1.events.add
		( // this is to switch "active" panel to headlines
			"onclick"
			,new Function("e","return(fnhl.click(e.el));")
		);
		ls1.events.add
		( // this is to switch "active" panel to headlines
			"onAutoPlayStart"
			,new Function("e","fnhl.autoplayStart();")
			);
			
		ls1.events.add
		( // this is to switch "active" panel to headlines
			"onAutoPlayStop"
			,new Function("e","fnhl.autoplayStop();")
		);
		//	ls1.autoPlayStart();

		vh1=cstv.modules.load("cstv.modules.videoHighlights.billboard1","vh1","fnbillboard", site + "/modules/mod_video.php?sport=" + sport);
		vh1.setProperty('vidFrameURL1',"http://www.cstv.com/media_server/play.smil?school=cs&media_type=video&width=389&height=341&swstat=n&specialtemplate=playeronlyTest"+((eval("false;/*@cc_on@if(@\x5fwin32)isMSIE=true@end@*/"))?"&windowless=y":"")+"&bumper=both&content=");
		vh1.setProperty('vidFrameURL2',"http://www.cstv.com/media_server/play.smil?school=cs&media_type=video&width=389&height=341&swstat=n&specialtemplate=playeronlyTest"+((eval("false;/*@cc_on@if(@\x5fwin32)isMSIE=true@end@*/"))?"&windowless=y":"")+"&bumper=first&content=");
		
		vh1.events.add
		( // this is to switch "active" panel to video
			"onclick"
			,new Function("e","fnvideo.click(e.el);ls1.autoPlayStop();")
		);	
		vh1.start();
	}
}


//POP UP FOR EPIC//
function launchEpic(){
	var win = window.open('http://cstv.collegesports.com/cn/video/index_popup.php','Epic','height=1000,width=250,toolbar=no,scrollbars=no');
	}


