//You need an anonymous function to wrap around your function to avoid conflict
(function($){

  $.fn.extend({ 
 		//This is where you write your plugin's name
 		cybermenu: function(options) {
        
			  //Iterate over the current set of matched elements
    		return this.each(function() {
							    
            var subs = $(this).find('ul.sub-menu');
                            
            subs.each(function() {
          
                width = 0;
                height = 0;
                $(this).children().each(function() {
                                            
                  a_width = $(this).outerWidth( true ) + 16;                             
                  height = height + $(this).outerHeight( true );               
                  if (a_width > width) { width = a_width; }                    
                });
        
                $(this).css('height', height);                                            
                $(this).css('width', width);
                $(this).children().each(function() {
                            
                  $(this).css('width', width);                    
                });

            });
            
            subs.each(function() {
            
                $(this).css('display', 'none').css('left', 'auto');
            });
			
			      $(this).find('ul.menu > li').hover(
             
                function () { 
                                                     
                  $(this).children('.sub-menu').slideDown();                                              
                },
                function () {
                                         
                  $(this).children('.sub-menu').slideUp();
                }           
            );
            
            $(this).find('ul.sub-menu > li.dir').hover(
                function () { 
                  
                  $width =  $(this).outerWidth(true);                                 
                  $(this).children('.sub-menu').css('margin-left', $width).show();          
                },
                function () {                       
                  $(this).children('.sub-menu').hide();
                }           
            );  
            			
    		});
    }
    
  });
//pass jQuery to the function, 
//So that we will able to use any valid Javascript variable name 
//to replace "$" SIGN. But, we'll stick to $ (I like dollar sign: ) )		
})(jQuery);
