jQuery.fn.slideHtml = function(html, duration){
	if(!duration) duration = 1000;
	if(this.data('isSlidingHtml')) return;
	this.data('isSlidingHtml', true);
	
	if(!this.data('preCSSPosition')) this.data('preCSSPosition', this.css('position'));
	if(!this.data('preCSSOverflow')) this.data('preCSSOverflow', this.css('overflow'));
	
	this.css({position : 'relative', overflow : 'hidden'});
	var pos = this.position();
	var dim = {};
	dim.width = this.width();
	dim.height = this.outerHeight();
	
	this.append('<div class="sliderHtml" style="background-color: ' + this.css('backgroundColor') + '; position: absolute; left:' + dim.width + 'px; top: 0; width: ' + dim.width + 'px">' + html + '</div>');
	var slider = this.children('.sliderHtml');
	var newHeight = slider.outerHeight(true);
	
	if(newHeight > dim.height) this.height(newHeight);
	else slider.height(dim.height);
	
	slider.animate({left : 0}, duration, function(){
		var sliderParent = jQuery(this).parent();
		
		var sliderContent = jQuery(this).html();
		
		sliderParent.css({
			position : jQuery(this).data('preCSSPosition'),
			overflow : jQuery(this).data('preCSSOverflow')
		}).html(sliderContent).css({ height : 'auto' }).data('isSlidingHtml', false);

		jQuery(this).remove();
	});
};
