$(document).ready(function() 
{
	if (jQuery("#standaloneArticle").length == 0) {
		var news = jQuery("#newsList li").get();
		jQuery.each(news, function() {
			var articleId = jQuery(this).attr('class').split('_').slice(-1) + "";
			$('#right_' + articleId).before('<div id="nav_' + articleId + '" class="nav">').cycle( {
				fx :'scrollRight',
				click :'#nav_' + articleId + 'a',
				timeout :0,
				easing :'backinout',
				pager :'#nav_' + articleId
			});
			var images = jQuery('#right_' + articleId + ' img').get();
			jQuery.each(images, function() {
				$(this).css('display', 'inline');
			})		
		});
	} 
	
	else 
	{
		if (jQuery("#standaloneArticle").length > 0) {
			var articleId = jQuery("#standaloneArticle").attr('class').split('_').slice(-1) + "";
			$('#right_' + articleId).before('<div id="nav_' + articleId + '" class="nav">').cycle( {
				fx :'scrollRight',
				click :'#nav_' + articleId + 'a',
				timeout :0,
				easing :'backinout',
				pager :'#nav_' + articleId
			});
			
			var images = jQuery('#right_' + articleId + ' img').get();
			jQuery.each(images, function() {
				$(this).css('display', 'inline');
			});
		}
	}
});
