$(document).ready(function(){	
	$('.rssselector').change(function(){
		// alert('yop');
		var reader_id = $(this).parent().parent().attr('id');
		var url = $(this).val();
		rssreader_load(reader_id,url)
	});
});


function rssreader_load(reader_id,url)
{
 
	// $("#"+reader_id+" .reader_cnt").css('display','none');
	$("#"+reader_id+" .reader_cnt").html('').css('display','none').fadeIn(1000, null);
	$("#"+reader_id+"").rssReader({
		targetdomitem: '#'+reader_id+" .reader_cnt",
		targeturl: 'admin_/include_global/rssreader/rssreader.php?url='+url,
		items: 5,
		Maxlength:80,
		loadingImg: '35-1.gif'
	});
	
	 /*
    
     function jQuery.getFeed({
        url: 'admin_/include_global/rssreader/proxy.php?url='+rss_url,
        success: function(feed) {
            jQuery("#"+reader_id+" .reader_cnt").append('<h2>'
            + '<a href="'
            + feed.link
            + '">'
            + feed.title
            + '</a>'
            + '</h2>');
            
            var html = "";
            
            for(var i = 0; i < feed.items.length && i < 5; i++) {
                var item = feed.items[i];
                
                html += '<h3>'
                + '<a href="'
                + item.link
                + '">'
                + item.title
                + '</a>'
                + '</h3>';
                
                html += '<div class="updated">'
                + item.updated
                + '</div>';
                
                html += '<div>'
                + item.description
                + '</div>';
            }
            
            jQuery("#"+reader_id+" .reader_cnt").append(html);
        }    
    });				
*/
}

