function sequenceElement() {
	var args = Array.prototype.slice.call(arguments);
	jQuery(args).each(function() {
		jQuery(this + ':first-child').addClass('first-elm');
		jQuery(this + ':last-child').addClass('last-elm');
		jQuery(this + ':nth-child(odd)').addClass('odd-elm');
		jQuery(this + ':nth-child(even)').addClass('even-elm');
	});
};


jQuery(function(){
	jQuery(".ace").each(function(){
		jQuery("li.product-set > div", this).each(function(index){
			var $this = jQuery(this);

			$this.click(function(){
				var params = {height:"toggle", opacity:"toggle"};
				jQuery(this).next().animate(params).parent().siblings()
				.children("ul:visible").animate(params);
				return false;
			});
		});
	});
});

function setActiveTag() {
	var args = Array.prototype.slice.call(arguments);
	jQuery(".ace").each(function(){
		if (args == "#products-bath") {
			$("#products-hair > ul").hide();
			$("#products-cleanser > ul").hide();
			$("#products-mailorder > ul").hide();
		} else if (args == "#products-hair") {
			$("#products-bath > ul").hide();
			$("#products-cleanser > ul").hide();
			$("#products-mailorder > ul").hide();
		} else if (args == "#products-cleanser") {
			$("#products-bath > ul").hide();
			$("#products-hair > ul").hide();
			$("#products-mailorder > ul").hide();
		} else if (args == "#products-mailorder") {
			$("#products-bath > ul").hide();
			$("#products-hair > ul").hide();
			$("#products-cleanser > ul").hide();
		}
		
	});
}
