(function($){  
  $.fn.jtease = function(options) {  
   
   var defaults = {  
   teaserHeight : '150px', // any height in pixels (over 60px recommended)
   fadeAmount : 'high', // ...'medium' or 'high' > the distance the fade covers (max 60px)
   imgURL : 'url(/@@/images/fades.png)' // location of 'fades' image in server file system
   };
   
   var options = $.extend(defaults, options);    

   var fadePosition = {low : "0 -120px", medium : "0 -60px", high : "0 0"};
   
   return this.each(function() {   
   
		$(this).css({
			 'position' : 'relative', // for the absolute positioning of .fade-block
			 'overflow' : 'hidden', // hide the continued content
			 'height'   : options.teaserHeight // set the height of the teaser
			});
		
		///////// SET THE LOCATION OF THE FADE PNG IMAGE: ////////////////////////
		
		// var imgLocale = 'url(images/fades.png)'; 
		
		//////////////////////////////////////////////////////////////////////////

		var fadeBlock = $('<div class="fade-block"></div>');

		$(fadeBlock).css({
			 'position' : 'absolute',
			 'bottom' : '0',
			 'left' : '0',
			 'width' : '100%', // just in case...
			 'height' : '60px',
			 'background-image' : options.imgURL,
			 'background-repeat' : 'repeat-x', 
			 'background-position' : fadePosition[options.fadeAmount]
			});
			
		fadeBlock.prependTo(this);
   
   });  
  };  
 })(jQuery);  
