(function($) {  
    $.fn.dropDown = function(options) {
        
        // Set some default options
        var defaults = {
           	top: 35, // Top value defaults to 35px
 			left: 0, // Left value defaults to 0px
			width: 200 // Width value defaults to 200px
        };  
        
        // Extend function with options
        var options = $.extend(defaults,options);
        
        // Apply function to all matched objects
        return this.each(function() {
        
            var dropDown = $(this);
            var nav = $('.nav-item',dropDown);
            var subNav = $('.secnav',nav);
            var children = $('<li>',subNav);
            
            //Setup
            nav.css({
                'position' : 'relative'
            });
            nav.each(function(i) {
                $(this).addClass('item'+(i+1));
            });

            subNav.css({
                'position' : 'absolute',
                'top' : options.top+'px',
                'left' : options.left+'px',
				'width' : options.width+'px',
                'z-index' : '25'
            });
            subNav.hide();
            
            children.css({
                'display' : 'list-item'
            });
            
            //Functions            
            function showNav(itemNumber) {
                dropDown.children('.item'+itemNumber).children('.nav').show();
            }
            function hideNav(itemNumber) {
                dropDown.children('.item'+itemNumber).children('.nav').fadeOut('fast');
            }
            
            //Control
            nav.each(function(i) {
                $(this).hover(function() {
                    showNav(i+1);
                }, function() {
                    hideNav(i+1);
                });
            });
            
        });
        
    };
})(jQuery);
