/**
 *
 *   General 6 Nations Rugby Fast Scripts 
 *
 */   
jQuery(document).ready(function(){
    
    // Handle horizontal menu dropdowns
    jQuery('#menu li').hover(
        function(){ jQuery('ul', this).css('display', 'block'); 
                    jQuery(this).addClass('current'); },
        function(){ jQuery('ul', this).css('display', 'none'); 
                    jQuery(this).removeClass('current'); 
    });
    
    //Menu Highlighting!
    var body = jQuery("body").attr("id");
    jQuery("#menu li#tab_"+body).addClass("tab-cur");
    
	if(typeof document.body.style.maxHeight == "undefined") {
	    DD_belatedPNG.fix('#pitchdiv .player-hover, #pitchdiv .total-points, #pitchdiv #players ul li p, #pitchdiv #players ul li span');
	}
    
    /**
    * Feed using Google API, limited to most recent 4
    **/ 


    jQuery.jGFeed('http://www.rte.ie/rss/sport.xml',
    function(feeds){
        if(!feeds){
            return false;
        }
     
        for(var i=0; i<7; i++){
            var entry = feeds.entries[i];
            jQuery("#rss ul").append("<li><a href="+entry.link+">"+entry.title+"</a><br />"+entry.contentSnippet+"<br /><small>"+entry.publishedDate+"</small></li>");
        }
    }, 10);

     
});