function Aide() {
    this.id      = 'analyser.hohli.com';
    this.url     = 'http://api.aiderss.com/';
	this.urlFull = '';
	this.name    = '';
	this.type    = 'web'; // not support
    this.q       = null;
    this.query   = null;
    this.src1    = null;
    this.src2    = null;
    this.params  = '';
    this.limit   = 10; // less than 30, default 1

    this.exec=function(){
        targ   = this.params.split(";"); 
        params = new Array();
		empty  = true;
        for (i=0;i<targ.length;i++){ 
            params[i] = $(targ[i]).val();
			if (params[i] != '') {
				empty = false;
			}
        }
		if (empty) {
			$(this.src1).html('0');
			return true;
		}
		
        this.img    = $('li#pl-'+this.name+' img.icon');
        this.imgsrc = $('li#pl-'+this.name+' img.icon').attr('src');		
        this.img.attr('src','/public/images/preloading.gif');
		        
		this.queryFull = $.vsprintf(this.query, params);
		this.queryFull = this.queryFull.replace('"" OR ','');
		this.queryFull = this.queryFull.replace(' OR ""','');
		this.queryFull = encodeURIComponent(this.queryFull);
		
		// http://api.aiderss.com/feed_id?appkey=analyser.hohli.com&format=json&url=http://feeds.feedburner.com/AntonShevchuk
		
		// http://api.aiderss.com/top_posts?appkey=aiderss.com&format=json&feed_id=67531&period=year&num=1
		
        var url_FeedId   = this.url + 'feed_id?appkey='+this.id+'&format=json&url='+this.queryFull+'&callback=?'; 
        
        var plugin = this;
        
        $.getJSON(url_FeedId, function(data, textStatus){
            
            if (data.error=="Feed URL is missing or invalid") {
                $(plugin.src1).html('0');
                plugin.img.attr('src',plugin.imgsrc);
                return false;
            } else {
            
                var FeedId  = data.feed_id;     
                var FeedUrl = data.url;
                
                var url_TopPosts = plugin.url + 'top_posts?appkey='+plugin.id+'&format=json&num='+plugin.limit+'&feed_id='+FeedId+'&callback=?'; 
    
                $.ajax({
                    // AJAX-specified URL
                   url: url_TopPosts,
                   dataType : "jsonp",
                   // Handle the success event
                   success: function (data) {
        				var ul = document.createElement("ul");
        
        		        $.each(data,
        					function(i, val) {
        						var li = document.createElement("li");
        						var inner = '';
        						inner += '<span class="r" style="width:25px;text-align:right;font-weight:bold;color:#fff;background-color:'+val.postrank_color+';">'+val.postrank+'</span>';
        						inner += '<a href="'+val.uri+'" title="'+val.title+'" target="_blank">'+val.title+'</a>';
        						//inner += '<span><b>'+val.EditorsRating.$+'/'+val.EditorsRating["@outOf"]+'</b>&nbsp;'+val.Name.$+'<br/><small>'+val.Specs.$+'</small></span>';  
        						li.innerHTML = inner;      		
        						ul.appendChild(li);
        					}
        				);
        
        				/*
        				
        				*/
        				link = '<a href="http://www.aiderss.com/hits/'+FeedUrl+'" title="View All Results (in new window)" target="_blank">All</a>';
        				$(plugin.src1).html(link);
        				$(plugin.src2).html(ul);
        				plugin.img.attr('src',plugin.imgsrc);
        			}
                });
            }                  
        });
    };

}