(function($) {

	$.fn.dropMenu = function(settings) {
		var config = {'speed': 200};
 
		if (settings) $.extend(config, settings);
		
		this.each(function() {		
			$(this).find('li').each(function() {
				if ($(this).children('ul').length > 0) {
					$(this).children('a').addClass('more');
				}
				
				if ($(this).position().left>500) {
					$(this).addClass('right');
				}
								
				$(this).hover(function() {
					$(this).find('li a').stop().css({paddingTop:0, paddingBottom:0});
					$(this).addClass('hover');
					$(this).find('li a').animate({paddingTop:8, paddingBottom:8},{
						duration: config.speed
					});
				}, function() {
					$(this).removeClass('hover');
				});
			});	
		});
		return this;
	};
 })(jQuery);

