/*
 * 
 * YCodaFeeds plugin 2.0
 * $Date:2008-05-18 12:38:59 +0200 (dom, 18 mag 2008) $
 * $Rev:82 $
 * @requires jQuery v1.2.3
 * @requires YCodaSlider v2.0
 * @requires jQuery Google Feed
 * @requires Api Google Feed and [VALID KEY]
 * @optional Easing v1.3
 * 
 * Copyright (c) 2008 Massimiliano Balestrieri
 * Examples and docs at: http://maxb.net/blog/
 * Licensed GPL licenses:
 * http://www.gnu.org/licenses/gpl.html
 * 
 */
YCodaSlider.Feeds = {
    init     : function(options)
    {
        
        return this.each(
            function(nr)
            {
                
                var that = this;
                var feeds = jQuery("a",this);
                feeds.each(function(nr){
                    var self = this;
                    var href = jQuery(self).attr("href");
                    var html = '<div class="yslider-panelwrapper" title="'+ jQuery(self).text() +'">';
                    jQuery(self).wrap(html);
                    var panel = jQuery(self).parent();
                    panel.empty();
                    jQuery(self).gFeed( { title : href, target: panel } ); 
                });
            }
        );
    }
};
jQuery.fn.ycodafeeds = YCodaSlider.Feeds.init;