function feature(objectName, height, type){
	if(type == 'fade'){
	    $(document).ready(function () {
	        $(objectName + ' div.inner').each(function () {
	            var featureBlock = this;
	            var featureImage = new Array();
	            var featureDisplay = 0;
	            stringList = '<ul class="control">';
	            this.style.height = height + 'px';
	            width = this.offsetWidth;
	            i = 0;
	            $(featureBlock).find('li').each(function () {
	                this.style.position = 'absolute';
	                this.style.top = '0';
	                this.style.left = '0';
	                this.style.width = width + 'px';
	                this.style.height = height + 'px';
	                this.style.lineHeight = height + 'px';
	                if (i > 0) {
	                    $(this).hide();
	                }
	                featureImage[i] = this;
	                i++;
	                stringList = stringList + '<li><a href="#">' + i + '</a></li>';
	            });
	            stringList = stringList + '</ul>';
	            $(this).append(stringList);
	            j = 0;
	            $(featureBlock).find('ul.control li').each(function () {
	                if (j == featureDisplay) {
	                    this.className = 'selected';
	                }
	                j++;
	                $(this).find('a').click(function () {
	                    trigger = $(this).parent('li').index();
	                    $(featureBlock).find('ul.control li').get(featureDisplay).className = '';
	                    $(featureBlock).find('ul.control li').get(trigger).className = 'selected';

	                    $(featureImage[featureDisplay]).fadeOut(200);
	                    $(featureImage[trigger]).fadeIn(200);
	                    $(featureImage[trigger]).find('img').each(function () {
	                        imgHeight = this.offsetHeight;
	                        imgWidth = this.offsetWidth;

	                        if (imgHeight > height) {
	                            this.style.height = height + 'px';
	                        }

	                        if (imgWidth > width) {
	                            this.style.width = width + 'px';
	                        }

	                        imgHeight = this.offsetHeight;
	                        imgWidth = this.offsetWidth;

	                        this.style.marginLeft = ((width - imgWidth) / 2) + 'px';
	                        this.style.marginTop = ((height - imgHeight) / 2) + 'px';
	                    });

	                    featureDisplay = trigger;
	                    return false;
	                });
	            });
	        });
	    });
		$(window).load(function(){
			$(objectName + ' div.inner').each(function(){
				$(this).find('img').each(function(){
					imgHeight = this.offsetHeight;
					imgWidth = this.offsetWidth;
					
					if(imgHeight > height) {
						this.style.height = height+'px';
					}
					 
					if(imgWidth > width) {
						this.style.width = width+'px';
					}
					
					imgHeight = this.offsetHeight;
					imgWidth = this.offsetWidth;
					
					this.style.marginLeft = ((width - imgWidth)/2) + 'px';
					this.style.marginTop = ((height - imgHeight)/2) + 'px';
				});
			});
		});
	}
};
