/**
* @author Jordan Eldredge
* @url http://remysharp.com/2007/01/25/jquery-tutorial-text-box-hints/
*/

(function ($) {

$.fn.more = function (height) {
  if (!height) { 
    height = '50px';
  }
   
  return this.each(function () {
    // get jQuery version of 'this'
    var $input = $(this),
   
    // capture the rest of the variable to allow for reuse
      title = $input.attr('title'),
      $form = $(this.form),
      $win = $(window);
      $slackHeight = $input.height();
      $moreDiv = $input.next();
      $moreLink = $moreDiv.children();
      
    // hide more button if we don't need it
    if($slackHeight <= height){
    	$moreDiv.html("");
    }else{
    	$moreLink.click(function($slackHeight) {
  				$input.height("auto");
  				alert(this.html());
		});
    	$input.height(height);
    }
  });
};

})(jQuery);
