(function($) {
//
// plugin definition
$.fn.dropdown = function(options) {
	$this = $(this);
	
	$.fn.dropdown.defaults  = $.extend({}, $.fn.dropdown.defaults, options);
	var opt = $.fn.dropdown.defaults;
	$this.each(function(){		
		$this.children("li").mouseenter(
			function(){
				
				$(this).css({
					background:'#fff',
					color:'#3da5e4'})
				$(this).children('a').addClass('TEST');
				Cufon.refresh();
				if(opt.effect_in == null){
					$(this).children("ul").css({"display":"block"});
				}else{
					eval( '$(this).children("ul").'+ opt.effect_in + '('+ opt.params_in +')');
					
				}
				
			}
		)
		
		$this.children('li').mouseleave(
			function(){          
				$(this).css({
					background:'transparent',
					color:'#fff'})
				$(this).children('a').removeClass('TEST');
				Cufon.refresh();
				$(this).children("ul").clearQueue().stop().css('opacity',1);
				if(opt.effect_out == null){
					$(this).children("ul").css({"display":"none"});
				}else{
					eval( '$(this).children("ul").'+ opt.effect_out + '('+ opt.params_out+')');
					Cufon.refresh();
				}
				
			}
		)
		
	/*$this.children("li").hover(		 
        function(){    
		$(this).css({
			background:'#fff',
			color:'#3da5e4'})
		if(opt.effect_in == null){
			$(this).children("ul").css({"display":"block"});
		}else{
			eval( '$(this).children("ul").'+ opt.effect_in + '('+ opt.params_in +')');
		}
	},
        function(){          
		$(this).css({
			background:'transparent',
			color:'#fff'})
		$(this).children("ul").clearQueue().stop().css('opacity',1);
		if(opt.effect_out == null){
			$(this).children("ul").css({"display":"none"});
		}else{
			eval( '$(this).children("ul").'+ opt.effect_out + '('+ opt.params_out+')');
		}
        }
		
	);*/
	})
};
//
$.fn.dropdown.defaults = {
  effect_in : null,	
  params_in : '',
  effect_out : null,	
  params_out : ''
}

//
})(jQuery);
