		var RotationTabCount = 0;
		var RotationCurrentTab = 0;

jQuery(document).ready(function() {
  
  
	jQuery('.RSSFeed li.RSSTab a.RSSTabButton')
	.click(function(e) {
	    jQuery('.RSSFeed li')
	        .removeClass('active');
	
	    jQuery(this)
	        .parent()
	        .addClass('active');
	
	    var currentTab = jQuery(this).attr('href');
	    MoveContent(jQuery(currentTab), jQuery('#RSSDisplay'));
	    return false;
	});
	
	 RotationTabCount = jQuery('.RSSFeed li.RSSTab a.RSSTabButton').length - 1;
	 RotationCurrentTab = 0;
		
    updateTabs();
    // clean up to avoid memory leaks in certain versions of IE 6
    jQuery(window).bind('unload', function() {
        jQuery('.RSSFeed li.RSSTab a.RSSTabButton').unbind('click');
    });
});


   function MoveContent(content, destination)
    {
        destination.html(content.html());
        if (typeof myLytebox != 'undefined') {
                var anchors = destination[0].getElementsByTagName('a');
        for (var i = 0; i < anchors.length; i++) {
                var anchor = anchors[i];
                var relAttribute = String(anchor.getAttribute('rel'));
                if (anchor.getAttribute('href')) {
                  if (relAttribute.toLowerCase().match('lytebox')) {
                    anchor.onclick = function () { myLytebox.start(this, false, false); return false; }
                  } else if (relAttribute.toLowerCase().match('lyteshow')) {
                    anchor.onclick = function () { myLytebox.start(this, true, false); return false; }
                  } else if (relAttribute.toLowerCase().match('lyteframe')) {
                    anchor.onclick = function () { myLytebox.start(this, false, true); return false; }
                  }
                }
              }
          }
    }
    
 	 function updateTabs()
    {
    jQuery('.RSSFeed li:eq(' + RotationCurrentTab + ') a.RSSTabButton').click();	
	    if (RotationCurrentTab < RotationTabCount) {
	    	RotationCurrentTab += 1;
		} else {
			RotationCurrentTab = 0;
	    }
		setTimeout("updateTabs()", 5000);	
		
	    

   	}
  

