$(document).ready(function()
{
	// rounded corners //
	$(".rounded").corner("round 8px").parent().css("padding", "2px").corner("round 10px");

	// vertical slider //
	var visible_height = $("#event-news-body" ).height();
	var total_height = $("#dyncontent-news" ).height();
	var interval = 30;
	var offset = 0;
	var my_interval;

	$("#event-news-buttons .nextPage" ).mouseover(function(){
		my_interval = setInterval(function(){
			total_height = $("#dyncontent-news" ).height();
			if(total_height > visible_height)
			{
				if((0-offset) < (total_height-(interval*2)))
				{
					offset -= interval;
					$("#dyncontent-news").stop().animate({"marginTop": offset+"px"});
				}
			}
		}, 150);
	}).mouseout(function(){
		$("#dyncontent-news").stop();
		clearInterval(my_interval);
	});
	$("#event-news-buttons .prevPage" ).mouseover(function(){
		my_interval = setInterval(function(){
			if(total_height > visible_height)
			{
				if(offset < 0)
				{
					offset += interval;
					$("#dyncontent-news").animate({"marginTop": offset+"px"});
				}
			}
		}, 150);
	}).mouseout(function(){
		$("#dyncontent-news").stop();
		clearInterval(my_interval);
	});

});
