$(document).ready(function()
    {
    	$('#featured').bind('tabsselect', function(event, ui) {
    		   $('#command').attr('class', 'pause');
    	});

    	$("#featured").stop().tabs({fx:{opacity: "toggle"}}).tabs("rotate", 5000, true);
    	
        $("#command").click(function() {          
            if (this.className!='play') {
                this.className = 'play';
                $("#featured").stop().tabs("rotate", 0);
            } else {
            	 this.className = 'pause';
                $("#featured").stop().tabs({fx:{opacity: "toggle"}}).tabs("rotate", 5000, true);
            }
        });
	});
