// JK 2/15/10: Found a conflict with jQuery and Prototype using $ different, so reassigning jQuery's $ function to be $j and using $j instead.
// NOTE: $j is defined globally in the Theme HTML contents after the jQuery javascript files are included.

// Super Widget Javascript
var currentScroller = 0;
function switchTo(idx)
{
	if (idx == currentScroller) return;
	
	//$("#superWidgetNav li.selected").removeClass("selected");
	$j("#superWidgetNav li.selected").removeClass("selected");
	
	//$("#superWidgetNav li").eq(idx).addClass("selected");
	$j("#superWidgetNav li").eq(idx).addClass("selected");
	
	//h = $(".scroller-window").height();  //so we don't have to hardcode the row height;
	h = $j(".scroller-window").height();  //so we don't have to hardcode the row height;
	
	jQuery.easing.def = "easeInOutSine";
	
	//$("#superWidgetContent").animate({top: "-"+(h*idx)+"px"}, { "duration": 500 } );
	$j("#superWidgetContent").animate({top: "-"+(h*idx)+"px"}, { "duration": 500 } );
	
	currentScroller = idx;
}