(function($){
	$.fn.effects = function(options) {
		
		this.each(function() {
			$(this).each(function() {
				if ($(this).attr('onmouseover') && $(this).attr('onmouseout')) {
					var over = $(this).attr('onmouseover');
					var out = $(this).attr('onmouseout');
					var w = $(this).width();
					var h = $(this).height();
					
					$(this)	.removeAttr('onmouseover')
							.removeAttr('onmouseout')
							.wrap('<span style="display: inline-block; position: relative; width: '+w+'px; height: '+h+'px;"></span>')
							.before($(this).clone())
							.css({
								'position': 'absolute',
								'z-index': '2000',
								'top': 0,
								'left': 0
							})
							.hover(function() {
								$(this).css('opacity', 0);
								eval(over);						
								$(this).animate({
									  opacity: 1
								}, 300);
							}, function() {
								$(this).animate({
									  opacity: 0
								}, 250, function() {
									eval(out);						
							});
					});
				}
			});
		});
		
		return this;
	};
})(jQuery);
