
jQuery.fn.equipoClick = function() {

	var lock = 0;
	var isShowing = null;
	var isHiding = null;
	var nextShow = null;
	var current = null;
	
	var doneShow = function() {
		var previous = null;
		if (current && current != isShowing) {
			previous = current;
    	}
		current = isShowing;
		isShowing = null;
		if (previous) {
			isHiding = previous;
    		$(previous).children(".info").hide("slow", doneHide);		
		}
	};
	
	var doneHide = function() {
		isHiding = null;
		if (nextShow) {
			isShowing = nextShow;
			nextShow = null;
			$(isShowing).children(".info").show("slow", doneShow);
		}
	};

	return this.each(function(){
	
    	$(this).click(function() {
    		if (isShowing || isHiding) {
    			if (isShowing && isShowing != this) {
    				nextShow = this;
    			}
    			return;
    		}
    		isShowing = this;
    		$(this).children(".info").show("slow", doneShow);
		});		
  	
  	});
};




jQuery.fn.equipoHover = function() {

	var lock = 0;
	var isShowing = null;
	var isHiding = null;
	var nextShow = null;
	var current = null;
	

	var doneShow = function() {
		var previous = null;
		if (current && current != isShowing) {
			previous = current;
    	}
		current = isShowing;
		isShowing = null;
		if (previous) {
			isHiding = previous;
    		$(previous).children(".info").hide("slow", doneHide);		
		}
	};
	
	var doneHide = function() {
		isHiding = null;
		if (nextShow) {
			isShowing = nextShow;
			nextShow = null;
			$(isShowing).children(".info").show("slow", doneShow);
		}
	};


	return this.each(function() {
	
    	$(this).hover(function() {
    		if (isShowing || isHiding) {
    			if (isShowing && isShowing != this) {
    				nextShow = this;
    			}
    			return;
    		}
    		isShowing = this;
    		$(this).children(".info").show("slow", doneShow);
		}, function() {
   			//$(this).children(".info").hide("slow", doneHide);
		});		
  	
  	});
};



jQuery.fn.bulletPanelHover = function() {

	var lock = 0;
	var isShowing = null;
	var isHiding = null;
	var nextShow = null;
	var current = null;


	var doneShow = function() {
		var previous = null;
		if (current && current != isShowing) {
			previous = current;
    	}
		current = isShowing;
		isShowing = null;
		if (previous) {
			isHiding = previous;
    		$(previous).children("ul").hide("normal", doneHide);		
		}
	};
	
	var doneHide = function() {
		isHiding = null;
		if (nextShow) {
			if ($(nextShow).children("ul").length > 0) {
				isShowing = nextShow;
				$(isShowing).children("ul").show("normal", doneShow);
			}
			nextShow = null;
		}
	};

	return this.each(function() {
	
    	$(this).hover(function() {
    		if (isShowing || isHiding) {
    			if (isShowing != this) {
    				nextShow = this;
    			}
    			return;
    		}
    		if ($(this).children("ul").length > 0) {
    		    isShowing = this;
    			$(this).children("ul").show("normal", doneShow);
    		}
		}, function() {
   			//$(this).children(".info").hide("slow", doneHide);
		});		
  	
  	});
  	
};
