Drupal.behaviors.captcha=function(context){$("#edit-captcha-response").attr("autocomplete","off")};Drupal.behaviors.captchaAdmin=function(context){$("#edit-captcha-add-captcha-description").click(function(){if($("#edit-captcha-add-captcha-description").is(":checked")){$("#edit-captcha-description-wrapper").show("slow")}else $("#edit-captcha-description-wrapper").hide("slow")});if(!$("#edit-captcha-add-captcha-description").is(":checked"))$("#edit-captcha-description-wrapper").hide()};
Drupal.behaviors.textarea=function(context){$('textarea.resizable:not(.textarea-processed)',context).each(function(){if($(this).is(('textarea.teaser:not(.teaser-processed)')))return false;var textarea=$(this).addClass('textarea-processed'),staticOffset=null;$(this).wrap('<div class="resizable-textarea"><span></span></div>').parent().append($('<div class="grippie"></div>').mousedown(startDrag));var grippie=$('div.grippie',$(this).parent())[0];grippie.style.marginRight=(grippie.offsetWidth-$(this)[0].offsetWidth)+'px'
function startDrag(e){staticOffset=textarea.height()-e.pageY;textarea.css('opacity',0.25);$(document).mousemove(performDrag).mouseup(endDrag);return false}
function performDrag(e){textarea.height(Math.max(32,staticOffset+e.pageY)+'px');return false}
function endDrag(e){$(document).unbind("mousemove",performDrag).unbind("mouseup",endDrag);textarea.css('opacity',1)}})};

