$(function(){

	// Accordion
	$("#accordion").accordion({ header: "h3" });
	
	//hover states on the static widgets
	$('#dialog_link, ul#icons li').hover(
		function() { $(this).addClass('ui-state-hover'); }, 
		function() { $(this).removeClass('ui-state-hover'); }
	);
	

});

$(function()
	{
		$('#list_wrapper').jScrollPane({showArrows:true, scrollbarWidth: 19, dragMaxHeight:14, topCapHeight:10, bottomCapHeight:40});

	});
$(function(){
	$(".newsitem").hover(function () {
    $(this).addClass("hilite");
  }, function () {
    $(this).removeClass("hilite");
  });
});

$(function(){
	$(".newsitem").bind("click", function(){
		var NewLink= $(this).attr("link");
		window.location.href = NewLink;
	});
});

$(window).load(function() {
	$("img").each(function () {
		if ($(this).attr("align")=='left')
			$(this).css({
				'margin' : '0 10px 0 0'
			});
		else if ($(this).attr("align")=='right')
			$(this).css({
				'margin' : '0 0 0 10px'
			});
	});

});