(function($) {
	//public functions
	var methods = {
		init : function(options) {
			var defaults = {
				navLinkSelector	: "a.subNav"
			}, opts = $.extend(defaults, options),
			t = this;
						
			$(this).find(this.navLinkSelector).click(function(){
				subNavClick.apply(t, [this]);
			});
		}
	};
	
	/*
		private vars
	*/
	
	
	/*
		private functions
	*/
	function subNavClick(link){
		$(this.navLinkSelector+".current").removeClass("current");
		$(link).addClass("current");
	}
	
	
	$.fn.subNav = function(method) {
		//Method Calling Login
		if (methods[method]) {
			return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
		} else if (typeof method === 'object' || !method) {
			return methods.init.apply(this, arguments);
		} else {
			$.error('Method ' + method + ' does not exist on jQuery.');
		}
	};
})(jQuery);
