jQuery(document).ready(function() {
	
	// initialize newsticker
	$(".newsticker ul").newsTicker();
	
	// onclick event setup for reporting
	$(".newsticker li a").click(function () {
		// use the link "title" attribute as the parameter value
		// if not present, then use link text node
		var $attTitle = ($(this).attr("title")) ? $(this).attr("title") : $(this).text();
		var $attURL = ($(this).attr("href"));
		var $region = $("meta[name=region]").attr("content");
		// prepend "sdc" to the url for organizational purposes
		var $fakeURL = "/sdc/"+$region+"/homepage-newsticker.jsp";
		var $trackURL = $fakeURL+"?linkText="+$attTitle+"&linkURL="+$attURL+"&eol";
		dcsMultiTrack('DCS.dcsuri',$trackURL);
		
		// set to debug - print msg and stop the link
		//alert("dcsMultiTrack('DCS.dcsuri',"+$trackURL+")");
		//return false;
	});

});

