
var AlexDickson=function(){var userAgent=navigator.userAgent.toLowerCase();var iPhone=(userAgent.indexOf('iphone')!=-1);$('html').addClass('javascript');$(document).ready(function(){$('html').addClass('dom-loaded');$('#search-box input[type=text]').inputLabel({defaultLabel:'search',dulledClass:'dulled'});$('#input-gotcha').val('Alex');$('#secondary-content .recent-posts').before('<div class="section latest-tweets"><h3>Latest Tweets</h3><div></div><a href="http://www.twitter.com/alexdickson" class="more">more &raquo;</a></div>');$('#secondary-content .latest-tweets div').buzzard({userName:'alexdickson'});if($('#post-comment').length){if(iPhone){var inputModifications=[{source:'#input-email',newType:'email'},{source:'#input-url',newType:'url'}];var copyAttr=['class','id','name','maxlength'];$.each(inputModifications,function(i,modification){var $originalInput=$(modification.source);var $newInput=$('<input />').val($originalInput.val()).attr({type:modification.newType});$.each(copyAttr,function(i){$newInput.attr(copyAttr[i],$originalInput.attr(copyAttr[i]));});$newInput.insertAfter($originalInput);$originalInput.remove();});};$('#input-url').blur(function(){if($(this).val()&&!$(this).val().match(/^(?:https?|ftp):\/\//)){$(this).val('http://'+$(this).val());$('#input-url').valid();};});$('#post-comment form').validate({rules:{name:{required:true},email:{required:true,email:true},url:{url:true},comment:{required:true}},messages:{url:{url:'Please enter a valid URL, or leave it blank.'}}});};if($('#contact-form').length){$('#contact-form').validate({rules:{name:{required:true},email:{required:true,email:true},message:{required:true}}});};$('textarea').elastic();});$(window).load(function(){$('html').addClass('window-loaded');try{var pageTracker=_gat._getTracker('UA-5978044-1');pageTracker._trackPageview();}catch(err){}});}();(function(jQuery){jQuery.fn.extend({elastic:function(){var mimics=['paddingTop','paddingRight','paddingBottom','paddingLeft','fontSize','lineHeight','fontFamily','width','fontWeight'];return this.each(function(){if(this.type!='textarea'){return false}var $textarea=jQuery(this),$twin=jQuery('<div />').css({'position':'absolute','display':'none','word-wrap':'break-word'}),lineHeight=parseInt($textarea.css('line-height'),10)||parseInt($textarea.css('font-size'),'10'),minheight=parseInt($textarea.css('height'),10)||lineHeight*3,maxheight=parseInt($textarea.css('max-height'),10)||Number.MAX_VALUE,goalheight=0,i=0;if(maxheight<0){maxheight=Number.MAX_VALUE}$twin.appendTo($textarea.parent());var i=mimics.length;while(i--){$twin.css(mimics[i].toString(),$textarea.css(mimics[i].toString()))}function setHeightAndOverflow(height,overflow){curratedHeight=Math.floor(parseInt(height,10));if($textarea.height()!=curratedHeight){$textarea.css({'height':curratedHeight+'px','overflow':overflow})}}function update(){var textareaContent=$textarea.val().replace(/&/g,'&amp;').replace(/  /g,'&nbsp;').replace(/<|>/g,'&gt;').replace(/\n/g,'<br />');var twinContent=$twin.html();if(textareaContent+'&nbsp;'!=twinContent){$twin.html(textareaContent+'&nbsp;');if(Math.abs($twin.height()+lineHeight-$textarea.height())>3){var goalheight=$twin.height()+lineHeight;if(goalheight>=maxheight){setHeightAndOverflow(maxheight,'auto')}else if(goalheight<=minheight){setHeightAndOverflow(minheight,'hidden')}else{setHeightAndOverflow(goalheight,'hidden')}}}}$textarea.css({'overflow':'hidden'});$textarea.keyup(function(){update()});$textarea.live('input paste',function(e){setTimeout(update,250)});update()})}})})(jQuery);eval(function(p,a,c,k,e,d){e=function(c){return c.toString(36)};if(!''.replace(/^/,String)){while(c--){d[c.toString(a)]=k[c]||c.toString(a)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(6($){$.m.2=6(1){4 c={8:\'\',7:\'n\',d:\'l-k\'};4 1=$.h(c,1);f e.j(6(){4 0=$(e);5(!0.p(\':g, :v, w\')){f};5(1.8==\'\'&&0.a(\'b\')){4 2=0.a(\'b\');4 2=$(\'r[s=\'+2+\']\').9(1.d).g()}q{4 2=1.8};5(!0.3()||0.3()===2){0.9(1.7);0.3(2)};0.t(6(){5(0.3()==2){0.u(1.7);0.3(\'\')}});0.o(6(){5($.i(0.3())==\'\'){0.9(1.7);0.3(2)}})})}})(x);',34,34,'obj|options|inputLabel|val|var|if|function|dullClass|defaultLabel|addClass|attr|id|defaults|labelClass|this|return|text|extend|trim|each|use|in|fn|dulled|blur|is|else|label|for|focus|removeClass|password|textarea|jQuery'.split('|'),0,{}))