(function( $ ){
	var settings = {'bgColor':'#666'};

	var methods = {
		init:function(options){
			var IR = this;
			
			return this.each(function(){				
				var $this = $(this), 
					data = $this.data(IR.attr('id')),
					myData = {color	: $this.css("color")};
				
				$.extend(myData, settings, options);       		
				// If the plugin hasn't been initialized yet
				if ( ! data ) {
					$(this).data(IR.attr('id'), {
						target 		: $this,
						bgColor		: myData.bgColor,
						rollColor	: myData.rollColor,
						color		: myData.color
					});
				}
				
				setTimeout(function(){$this.prepend("<div id='mainNavButton-background' style='background:"+myData.bgColor+"; height:"+$this.innerHeight()+"px; width:"+$this.innerWidth()+"px; position:absolute; top:"+$this.innerHeight()+"px; left:0;'></div>");},1000)
				
				$this.mouseenter(function(){
					$this.children('#mainNavButton-background').animate({top:0}, 300);
					$this.css('color',myData.rollColor);
				});
				
				$this.mouseleave(function(){
					$this.children('#mainNavButton-background').animate({top:$this.innerHeight()}, 300);
					$this.css('color',myData.color);
				});
			});
			
		}
	};
	
	$.fn.mainNavButton = function(method) {
		// Method calling logic
		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.mainNavButton' );
		}
	};
})( jQuery );
