;(function(){$.fn.europanSlider = function(options) {
		this.each(function(){
			var slider = $(this).css('overflow','hidden').hover(
				function(){
					buttons.fadeIn('500');
				},
				function(){
					buttons.fadeOut('100');
				}
			);
			var width = 0;
			var height = 0;
			var images = slider.children().css('float','left').each(function(){
				if (height == 0) height = $(this).height();
				width += $(this).width();
			});
			var max_left = -(width-(width/images.length));
			var previous = $('<a class="previous disabled">').css('float','left').click(function(){
				if (parseInt(wrapper.css('left'),10) < 0)
					wrapper.animate({'left' : '+='+(width/images.length)},"slow","swing",function(){
						previous.toggleClass('disabled',(parseInt($(this).css('left'),10) == 0));
						next.removeClass('disabled');
					});
			});
			var next = $('<a class="next">').css('float','right').click(function(){
				if (parseInt(wrapper.css('left'),10) > max_left)
					wrapper.animate({'left' : '-='+(width/images.length)},"slow","swing",function(){
						next.toggleClass('disabled',(parseInt($(this).css('left'),10) == max_left));
						previous.removeClass('disabled');
					});
			});
			var buttons = $('<div>').css('position','absolute').css('zIndex',100).width(slider.width()).append(next).append(previous);
			var wrapper = $('<div class="wrapper">').css('position','relative').css('zIndex',1).width(width)
								  .append(images).appendTo(slider).before(buttons);
			next.css('marginTop',height/2-(next.height()/2));
			previous.css('marginTop',height/2-(previous.height()/2)).parent().hide();
		});
		if (typeof options === "function") options();
		return this;
}})($);