$.fn.pinnedslide = function(options) {
	this.settings = {
		closeLink: 'none',
		height: '50'
	}
	if(options) $.extend(this.settings, options);
  settings = this.settings;

	$(this).css('padding', '0').css('height', this.settings.height + 'px').css('margin', '0').css('width', '100%');
	$('html').css('padding', '0 0 ' + ( this.settings.height * 1 + 50 ) + 'px 0');
	if ( typeof document.body.style.maxHeight != "undefined" ) { 
		$(this).css('position', 'fixed').css('bottom', '0').css('left', '0');
	}

	$(this).slideDown('slow');

	if ( this.settings.closeLink != 'none' ) {
	  var id = this.attr('id');
		$(this.settings.closeLink).click(function(){
			$.closepinnedslide(id);
			return false;
		});
	}
	return this;
};
$.closepinnedslide = function(id) {
	this.pinnedslide = $('#' + id);
	$(this.pinnedslide).slideUp('slow');
	$('html').css('padding', '0');
	$('body').css('overflow', 'visible'); // Change IE6 hack back
};
