/*ajax rq to change the faces on the front page*/

 $.fn.wait = function(time, type) {
        time = time || 1000;
        type = type || "fx";
        return this.queue(type, function() {
            var self = this;
            setTimeout(function() {
                $(self).dequeue();
            }, time);
        });
    };

toggle=1;
function rotate_home()
{
	$.ajax({
	   type: "GET",
	   url: "/ajax.php?action=spotlight",
	   data: "",
	   success: function(msg){
	   		if (toggle==1)
		   		{
		        $("#rotate_spotlight")
		   		.fadeOut("slow")
				toggle=2;
				$("#rotate_spotlight2")
	  			
	  			.html(msg)
		   		
		   		.fadeIn("slow");
		   		}
	   		else
		   		{
		        $("#rotate_spotlight2")
		   		.fadeOut("slow")
				toggle=1;
				$("#rotate_spotlight")
	  			
	  			.html(msg)
		   		
		   		.fadeIn("slow");
		   		}
	   	}
	});
}

