From 029b1196db0fd361f6f5f3562ac78627864c2abc Mon Sep 17 00:00:00 2001
From: Christopher McCulloh <cmcculloh@gmail.com>
Date: Thu, 26 Aug 2010 13:20:14 -0700
Subject: [PATCH 1/2] Attempted fix for ticket #4771
 http://dev.jqueryui.com/ticket/4771

---
 ui/jquery.ui.tabs.js | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ui/jquery.ui.tabs.js b/ui/jquery.ui.tabs.js
index 98b90c289ca..ee660321e70 100644
--- a/ui/jquery.ui.tabs.js
+++ b/ui/jquery.ui.tabs.js
@@ -304,6 +304,7 @@ $.widget( "ui.tabs", {
 		var showTab = showFx
 			? function( clicked, $show ) {
 				$( clicked ).closest( "li" ).addClass( "ui-tabs-selected ui-state-active" );
+$show.stop(true,true);//prevent "stacking" content spots if user clicks another tab while current animation is running.
 				$show.hide().removeClass( "ui-tabs-hide" ) // avoid flicker that way
 					.animate( showFx, showFx.duration || "normal", function() {
 						resetStyle( $show, showFx );

From 371bc6c8b66ce35d05aa0da88f290e2e7e5f0fb3 Mon Sep 17 00:00:00 2001
From: Christopher McCulloh <cmcculloh@finishline.com>
Date: Tue, 31 Aug 2010 14:20:58 -0400
Subject: [PATCH 2/2] added check to determine if a tab rotation has been
 triggered and if fx are being used. If so, disables any further tab rotations
 from being triggered until the current tab rotation has completed. Fixes bug
 #4771 http://dev.jqueryui.com/ticket/4771

---
 ui/jquery.ui.tabs.js | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/ui/jquery.ui.tabs.js b/ui/jquery.ui.tabs.js
index ee660321e70..5d9b6feb2e0 100644
--- a/ui/jquery.ui.tabs.js
+++ b/ui/jquery.ui.tabs.js
@@ -46,6 +46,8 @@ $.widget( "ui.tabs", {
 		tabTemplate: "<li><a href='#{href}'><span>#{label}</span></a></li>"
 	},
 
+	isRotating: false,
+
 	_create: function() {
 		this._tabify( true );
 	},
@@ -304,11 +306,11 @@ $.widget( "ui.tabs", {
 		var showTab = showFx
 			? function( clicked, $show ) {
 				$( clicked ).closest( "li" ).addClass( "ui-tabs-selected ui-state-active" );
-$show.stop(true,true);//prevent "stacking" content spots if user clicks another tab while current animation is running.
 				$show.hide().removeClass( "ui-tabs-hide" ) // avoid flicker that way
 					.animate( showFx, showFx.duration || "normal", function() {
 						resetStyle( $show, showFx );
 						self._trigger( "show", null, self._ui( clicked, $show[ 0 ] ) );
+						self.isRotating = false;
 					});
 			}
 			: function( clicked, $show ) {
@@ -352,6 +354,20 @@ $show.stop(true,true);//prevent "stacking" content spots if user clicks another
 				return false;
 			}
 
+			//if fx are being used
+			if(o.fx && ((jQuery.isArray( o.fx ) && o.fx[1]) || (!jQuery.isArray( o.fx ) && o.fx))){
+				//if is rotating
+				if(self.isRotating){
+					//return beacuse rotatin is in progress
+					return false;
+				}else{
+					//continue starting new rotating
+					self.isRotating = true;
+				}
+			}else{
+				//not using fx
+			}
+
 			o.selected = self.anchors.index( this );
 
 			self.abort();
@@ -720,7 +736,7 @@ $.extend( $.ui.tabs.prototype, {
 				var t = o.selected;
 				self.select( ++t < self.anchors.length ? t : 0 );
 			}, ms );
-			
+
 			if ( e ) {
 				e.stopPropagation();
 			}