﻿
(function ($) {
	$.fn.extend({
		accordion: function () {
			var thisObj = this;
			if (thisObj.length == 0) return false;
			$('li:odd:gt(0)', thisObj).hide();   //hide all except first one
			//$('li:first', thisObj).animate({ paddingLeft: "30px" });
			$('li:even', thisObj).hover(function () {
				var cur = $(this).next();
				var old = $('li:odd:visible', thisObj);

				if (cur.is(':visible'))
					return false;
				//old.slideToggle(500);
				old.hide(300);
				cur.stop().slideToggle(500);

				//$(this).stop().animate({ paddingLeft: "30px" });
				//old.prev().stop().animate({ paddingLeft: "10px" });
			});
			return this;
		}
	});
})(jQuery);
