$(function() {
	//featured
    $('#articles').cycle({
        fx:      'fade',
        delay:  -1000,
        prev:    '#previous',
        next:    '#next',
        pager:   '#dots',
        pagerAnchorBuilder: pagerFactory
    });
    //featured tabs
    function pagerFactory(idx, slide) {
        var s = idx > 5 ? ' style="display:block"' : '';
        return '<li'+s+'><a href="#" title="article '+(idx+1)+'"></a></li>';
    };
	// news ticker
	if(typeof $().newsTicker == "function") {
		var options = {
  		newsList: "#latest_updates ul",
 			tickerRate: 40,
 			startDelay: 10,
 			loopDelay: 4000,
 			placeHolder1: " -",
 			placeHolder2: ""
		};
		$().newsTicker(options);
	};
    //hover handlers
	$("#content ol li").mouseover(function() {
		$(this).addClass('hover');
	});
	$("#content ol li").mouseout(function() {
		$(this).removeClass('hover');
	});
	//bring links to parent level
	$("#content ol li").live("click",function() {
		self.location = $(this).find('a').attr("href");
	});
});
