(function($){
	$.fn.jsMenu = function(vars) {
		var element		= $(this[0]);
		var items		= $("#" + element.attr("id") + " .item");
		var subitems	= $("#" + element.attr("id") + " .subitem");

		items.each(function() {
			$(this).mouseover(function() {
				$(this).children('.subitem').css('display', 'block');
			});
		});

		items.each(function() {
			$(this).mouseout(function() {
				$(this).children('.subitem').css('display', 'none');
			});
		});

		subitems.each(function() {
			$(this).css('display', 'none');

			$(this).mouseover(function() {
				
			});
		});

/*
		prevBtn.click(function() {
			$(element).stopTime("move");
			showPrev();
		});

		nextBtn.click(function() {
			$(element).stopTime("move");
			showNext();
		});

		var moveOut = function() {
			$(tape).animate({"margin-left": "+=" + width + "px"}, {
				duration: 0,
				easing: "easeInOutBack",
				complete: function() {
					$(views).css('display', 'none');
					moveIn();
				}
			});
		}

		var moveIn = function() {
			$(views).css('display', 'none');
			$(views[next]).css('display', '');
			$(tape).css('margin-left', width + 'px')

			current = next;

			$(tape).animate({"margin-left": "-=" + width + "px"}, {
				duration: 0,
				easing: "easeInOutBack",
				complete: function() {
					updateDisplay();
				}
			});
		}

		var updateDisplay = function() {
			$(display).html((current + 1) + "/" + views.length);
		}

        var showPrev = function() {
        	next = current - 1;
        	if (next < 0)
        		next = views.length - 1;

			moveOut();
        }

        var showNext = function() {
        	next = current + 1;
        	if (next >= views.length)
        		next = 0;

			moveOut();
        	//animate(next);
        }

		updateDisplay();
		moveIn();
		$(element).everyTime(10000, "move", function(i) {
			showNext();
		});
*/
	};
})(jQuery);
